Compare commits

9 Commits

Author SHA1 Message Date
Zheyuan Wu
9ee7805a0f update
Some checks failed
Sync from Gitea (main→main, keep workflow) / mirror (push) Has been cancelled
2026-03-30 13:25:02 -05:00
Zheyuan Wu
f3f57cbefb update 2026-03-30 12:58:35 -05:00
Zheyuan Wu
461135ee9d updates
Some checks failed
Sync from Gitea (main→main, keep workflow) / mirror (push) Has been cancelled
2026-03-27 13:51:39 -05:00
Zheyuan Wu
0e0ca39f0a updates 2026-03-27 11:50:01 -05:00
Zheyuan Wu
87a5182ac6 update
Some checks failed
Sync from Gitea (main→main, keep workflow) / mirror (push) Has been cancelled
2026-03-25 20:18:14 -05:00
Zheyuan Wu
b94eef4848 Merge branch 'main' of https://git.trance-0.com/Trance-0/NoteNextra-origin 2026-03-25 18:35:23 -05:00
Zheyuan Wu
37707302bb update 2026-03-25 11:49:59 -05:00
Zheyuan Wu
dbdc8f528b Update Math4202_L23.md
Some checks failed
Sync from Gitea (main→main, keep workflow) / mirror (push) Has been cancelled
2026-03-24 15:47:02 -05:00
Zheyuan Wu
04cda8c4ca updates 2026-03-24 15:28:40 -05:00
16 changed files with 700 additions and 19 deletions

View File

@@ -59,6 +59,14 @@
### Post-Quantum (PQ) crypto ### Post-Quantum (PQ) crypto
- Fundamentally different computation paradigm than "classical" von Neumann or dataflow models
- Relies on properties of quantum physics to solve problems efficiently
- Superposition: state of quantum bit ("qubit") expressed by probability model over continuous range of values (vs. classic bit: 0 or 1 only)
- Like being able to operate on all possible bit combos of a register simultaneously, instead of operating on only one among all possibilities
- Entanglement: operating on one qubit affects others
### Zero-Knowledge (ZK) proofs ### Zero-Knowledge (ZK) proofs
### Homomorphic encryption ### Homomorphic encryption

View File

@@ -38,10 +38,14 @@ Context: computing stack
- 2. Complete mediation (reference monitor) - 2. Complete mediation (reference monitor)
- 3. Correct - 3. Correct
Isolating User Processes from Each Other Isolating OS from Untrusted User Code
- How do we meet the first requirement of a TCB (e.g., isolation or tamper-proofness)?
- Hardware support for memory protection
- Processor execution modes (system AND user modes, execution rings)
- Privileged instructions which can only be executed in system mode
- System calls used to transfer control between user and system code
- How do we meet the user/user isolation and separation?
- OS uses hardware support for memory protection to ensure this.
System Calls: Going from User to OS Code System Calls: Going from User to OS Code
@@ -50,16 +54,107 @@ System Calls: Going from User to OS Code
- The processor execution mode or privilege ring changes when call and return happen. - The processor execution mode or privilege ring changes when call and return happen.
- x86 `sysenter` / `sysexit` instructions - x86 `sysenter` / `sysexit` instructions
## Isolating OS from Untrusted User Code Isolating User Processes from Each Other
- How do we meet the first requirement of a TCB (e.g., isolation or tamper-proofness)? - How do we meet the user/user isolation and separation?
- Hardware support for memory protection - OS uses hardware support for memory protection to ensure this.
- Processor execution modes (system AND user modes, execution rings)
- Privileged instructions which can only be executed in system mode Virtualization
- System calls used to transfer control between user and system code
- OS is large and complex, even different operating systems may be desired by different customers
- Compromise of an OS impacts all applications
Complete Mediation: The TCB
- Make sure that no protected resource (e.g., memory page or file) could be accessed without going through the TCB
- TCB acts as a reference monitor that cannot be bypassed
- Privileged instructions
Limiting the Damage oa a Hacked OS
Use: Hypervisor, virtual machines, guest OS and applications
Compromise of OS in VM1 only impacts applications running on VM1
### Secure boot and Root of Trust (RoT) ### Secure boot and Root of Trust (RoT)
Goal: create chain of trust back to hardware-stored cryptographic keys
#### Secure enclave: overview (Intel SGX)
![Intel SGX](https://notenextra.com/CSE4303/Intel_SGX.png)
Goal: keep sensitive data within hardware-isolated encrypted environment
### Access control ### Access control
Controlling Accesses to Resources
- TCB (reference monitor) sees a request for a resource, how does it decide whether it should be granted?
- Example: Should John's process making a request to read a certain file be allowed to do so?
- Authentication establishes the source of a request (e.g., John's UID)
- Authorization (or access control) answers the question if a certain source of a request (User ID) is allowed to read the file
- Subject who owns a resource (creates it) should be able to control access to it (sometimes this is not true)
- Access control
- Basically, it is about who is allowed to access what.
- Two parts
- Part I - Policy: decide who should have access to certain resources (access control policy)
- Part II - Enforcement: only accesses defined by the access control policy are granted.
- Complete mediation is essential for successful enforcement
Discretionary Access Control
- In discretionary access control (DAC), owner of a resource decides how it can be shared
- Owner can choose to give read or write access to other users
- Two problems with DAC:
- You cannot control if someone you share a file with will not further share the data contained in it
- Cannot control "information flow"
- In many organizations, a user does not get to decide how certain type of data can be shared
- Typically the employer may mandate how to share various types of sensitive data
- Mandatory Access Control (MAC) helps address these problems
Mandatory Access Control (MAC) Models
- User works in a company and the company decides how data should be shared
- Hospital owns patient records and limits their sharing
- Regulatory requirements may limit sharing
- HIPAA for health information
#### Example: Linux system controls
Unix file access control list
- Each file has owner and group
- Permissions set by owner
- Read, write, execute
- Owner, group, other
- Represented by vector of four octal values
- Only owner, root can change permissions
- This privilege cannot be delegated or shared
- Setid bits -- Discuss in a few slides
Process effective user id (EUID)
- Each process has three IDs (+ more under Linux)
- Real user ID (RUID)
- Same as the user ID of parent (unless changed)
- Used to determine which user started the process
- Effective user ID (EUID)
- From set user ID bit on the file being executed, or sys call
- Determines the permissions for process
- File access and port binding
- Saved user ID (SUID)
- So previous EUID can be restored
- Real group ID, effective group ID used similarly
#### Weaknesses in Unix isolation, privileges
- Shared resources
- Since any process can create files in `/tmp` directory, an untrusted process may create files that are used by arbitrary system processes
- Time-of-Check-to-Time-of-Use (TOCTTOU), i.e. race conditions
- Typically, a root process uses system call to determine if initiating user has permission to a particular file, e.g. `/tmp/X`.
- After access is authorized and before the file open, user may change the file `/tmp/X` to a symbolic link to a target file `/etc/shadow`.
### Hazard: race conditions ### Hazard: race conditions

View File

@@ -5,8 +5,8 @@ I made this little book for my Honor Thesis, showing the relevant parts of my wo
Contents updated as displayed and based on my personal interest and progress with Prof.Feres. Contents updated as displayed and based on my personal interest and progress with Prof.Feres.
<iframe src="https://git.trance-0.com/Trance-0/HonorThesis/raw/branch/main/main.pdf" width="100%" height="600px" style="border: none;" title="Embedded PDF Viewer"> <iframe src="https://git.trance-0.com/Trance-0/HonorThesis/raw/branch/main/latex/main.pdf" width="100%" height="600px" style="border: none;" title="Embedded PDF Viewer">
<!-- Fallback content for browsers that do not support iframes or PDFs within them --> <!-- Fallback content for browsers that do not support iframes or PDFs within them -->
<iframe src="https://git.trance-0.com/Trance-0/HonorThesis/raw/branch/main/main.pdf" width="100%" height="500px"> <iframe src="https://git.trance-0.com/Trance-0/HonorThesis/raw/branch/main/latex/main.pdf" width="100%" height="500px">
<p>Your browser does not support iframes. You can <a href="https://git.trance-0.com/Trance-0/HonorThesis/raw/branch/main/main.pdf">download the PDF</a> file instead.</p> <p>Your browser does not support iframes. You can <a href="https://git.trance-0.com/Trance-0/HonorThesis/raw/branch/main/latex/main.pdf">download the PDF</a> file instead.</p>
</iframe> </iframe>

View File

@@ -29,6 +29,8 @@ $f|_{B^2}$ is a continuous map from $B^2\to \mathbb{R}^2-\{0\}$.
$f|_{S^1=\partial B^2}:S^1\to \mathbb{R}-\{0\}$ **is nulhomotopic**. $f|_{S^1=\partial B^2}:S^1\to \mathbb{R}-\{0\}$ **is nulhomotopic**.
> Recall that: Any map $g:S^1\to Y$ is nulhomotopic whenever it extends to a continuous map $G:B^2\to Y$.
Construct a homotopy between $f|_{S^1}$ and $g$ Construct a homotopy between $f|_{S^1}$ and $g$
$$ $$
@@ -57,10 +59,9 @@ Therefore $f$ must have a root in $B^2$.
<details> <details>
<summary>Proof: part 2</summary> <summary>Proof: part 2</summary>
If \|a_{n-1}\|+\|a_{n-2}\|+\cdots+\|a_0\|< R$ has a root in the disk $B^2_R$. (and $R\geq 1$, otherwise follows part 1) If $\|a_{n-1}\|+\|a_{n-2}\|+\cdots+\|a_0\|< R$ has a root in the disk $B^2_R$. (and $R\geq 1$, otherwise follows part 1)
Consider $\tilde{f}(x)=f(Rx)$. Consider $\tilde{f}(x)=f(Rx)$.
$$ $$
\begin{aligned} \begin{aligned}
\tilde{f}(x) \tilde{f}(x)
@@ -71,7 +72,7 @@ $$
$$ $$
\begin{aligned} \begin{aligned}
\|\frac{a_{n-1}}{R}\|+\|\frac{a_{n-2}}{R^2}\|+\cdots+\|\frac{a_0}{R^n}\|&=\frac{1}{R}\|a_{n-1}\|+\frac{1}{R^2}\|a_{n-2}\|+\cdots+\frac{1}{R^n}\|a_0\|\\ \left\|\frac{a_{n-1}}{R}\right\|+\left\|\frac{a_{n-2}}{R^2}\right\|+\cdots+\left\|\frac{a_0}{R^n}\right\|&=\frac{1}{R}\|a_{n-1}\|+\frac{1}{R^2}\|a_{n-2}\|+\cdots+\frac{1}{R^n}\|a_0\|\\
&<\frac{1}{R}\left(\|a_{n-1}\|+\|a_{n-2}\|+\cdots+\|a_0\|\right)\\ &<\frac{1}{R}\left(\|a_{n-1}\|+\|a_{n-2}\|+\cdots+\|a_0\|\right)\\
&<\frac{1}{R}<1 &<\frac{1}{R}<1
\end{aligned} \end{aligned}

View File

@@ -76,7 +76,7 @@ $$
</details> </details>
#### Lemma #### Lemma of homotopy equivalence
Let $f,g:X\to Y$ be continuous maps. let $f(x_0)=y_0$ and $g(x_0)=y_1$. If $f$ and $g$ are homotopic, then there is a path $\alpha:I\to Y$ such that $\alpha(0)=y_0$ and $\alpha(1)=y_1$. Let $f,g:X\to Y$ be continuous maps. let $f(x_0)=y_0$ and $g(x_0)=y_1$. If $f$ and $g$ are homotopic, then there is a path $\alpha:I\to Y$ such that $\alpha(0)=y_0$ and $\alpha(1)=y_1$.

View File

@@ -0,0 +1,90 @@
# Math4202 Topology II (Lecture 26)
## Algebraic Topology
### Deformation Retracts and Homotopy Type
#### Lemma of homotopy equivalence
Let $f,g:X\to Y$ be continuous maps. let
$$
f_*=\pi_1(X,f(x_0))\quad\text{and}\quad g_*=\pi_1(Y,g(x_0))
$$
And $H:X\times I\to Y$ is a homotopy from $f$ to $g$ with a path $H(x_0,t)=\alpha(t)$ for all $t\in I$.
Then $\hat{\alpha}\circ f_*=[\bar{\alpha}*(f\circ \gamma)*\alpha]=[g\circ \gamma]=g_*$. where $\gamma$ is a loop in $X$ based at $x_0$.
<details>
<summary>Proof</summary>
$I\times I\xrightarrow{\gamma_{id}} X\times I\xrightarrow{H} Y$
- $I\times \{0\}\mapsto f\circ\gamma$
- $I\times \{1\}\mapsto g\circ\gamma$
- $\{0\}\times I\mapsto \alpha$
- $\{1\}\times I\mapsto \alpha$
As $I\times I$ is convex, $I\times \{0\}\simeq (\{0\}\times I)*(I\times \{1\})*(\{1\}\times I)$.
</details>
#### Corollary for homotopic continuous maps
Let $h,k$ be homotopic continuous maps. And let $h(x_0)=y_0,k(x_0)=y_1$. If $h_*:\pi_1(X,x_0)\to \pi_1(Y,y_0)$ is injective, then $k_*:\pi_1(X,x_0)\to \pi_1(Y,y_1)$ is injective.
<details>
<summary>Proof</summary>
$\hat{\alpha}$ is an isomorphism of $\pi_1(Y,y_0)$ to $\pi_1(Y,y_1)$.
</details>
#### Corollary for nulhomotopic maps
Let $h:X\to Y$ be nulhomotopic. Then $h_*:\pi_1(X,x_0)\to \pi_1(Y,h(x_0))$ is a trivial group homomorphism (mapping to the constant map on $h(x_0)$).
#### Theorem for fundamental group isomorphism by homotopy equivalence
Let $f:X\to Y$ be a continuous map. Let $f(x_0)=y_0$. If $f$ is a [homotopy equivalence](https://notenextra.trance-0.com/Math4202/Math4202_L25/#definition-of-homotopy-equivalence) ($\exists g:Y\to X$ such that $fg\simeq id_X$, $gf\simeq id_Y$), then
$$
f_*:\pi_1(X,x_0)\to \pi_1(Y,y_0)
$$
is an isomorphism.
<details>
<summary>Proof</summary>
Let $g:Y\to X$ be the homotopy inverse of $f$.
Then,
$f_*\circ g_*=\alpha \circ id_{\pi_1(Y,y_0)}=\alpha$
And $g_*\circ f_*=\bar{\alpha}\circ id_{\pi_1(X,x_0)}=\bar{\alpha}$
So $f_*\circ (g_*\circ \hat{\alpha}^-1)=id_{\pi_1(X,x_0)}$
And $g_*\circ (f_*\circ \hat{\alpha}^-1)=id_{\pi_1(Y,y_0)}$
So $f_*$ is an isomorphism (have left and right inverse).
</details>
### Fundamental group of higher dimensional sphere
$\pi_1(S^n,x_0)=\{e\}$ for $n\geq 2$.
We can decompose the sphere to the union of two hemisphere and compute $\pi_1(S^n_+,x_0)=\pi_1(S^n_-,x_0)=\{e\}$
But for $n\geq 2$, $S^n_+\cap S^n_-=S^{n-1}$, where $S^1_+\cap S^1_-$ is two disjoint points.
#### Theorem for "gluing" fundamental group
Suppose $X=U\cup V$, where $U$ and $V$ are open subsets of $X$. Suppose that $U\cap V$ is path connected, and $x\in U\cap V$. Let $i,j$ be the inclusion maps of $U$ and $V$ into $X$, the images of the induced homomorphisms
$$
i_*:\pi_1(U,x_0)\to \pi_1(X,x_0)\quad j_*:\pi_1(V,x_0)\to \pi_1(X,x_0)
$$
The image of the two map generate $\pi_1(X,x_0)$.

View File

@@ -0,0 +1,69 @@
# Math4202 Topology II (Lecture 27)
## Algebraic Topology
### Fundamental Groups for Higher Dimensional Sphere
#### Theorem for "gluing" fundamental group
Suppose $X=U\cup V$, where $U$ and $V$ are open subsets of $X$. Suppose that $U\cap V$ is path connected, and $x\in U\cap V$. Let $i,j$ be the inclusion maps of $U$ and $V$ into $X$, the images of the induced homomorphisms
$$
i_*:\pi_1(U,x_0)\to \pi_1(X,x_0)\quad j_*:\pi_1(V,x_0)\to \pi_1(X,x_0)
$$
The image of the two map generate $\pi_1(X,x_0)$.
$G$ is a group, and let $S\subseteq G$, where $G$ is generated by $S$, if $\forall g\in G$, $\exists s_1,s_2,\ldots,s_n\in S$ such that $g=s_1s_2\ldots s_n\in G$. (We can write $G$ as a word of elements in $S$.)
<details>
<summary>Proof</summary>
Let $f$ be a loop in $X$, $f\simeq g_1*g_2*\ldots*g_n$, where $g_i$ is a loop in $U$ or $V$.
For example, consider the function, $f=f_1*f_2*f_3*f_4$, where $f_1\in S_+$, $f_2\in S_-$, $f_3\in S_+$, $f_4\in S_-$.
Take the functions $\bar{\alpha_1}*\alpha_1\simeq e_{x_1}$ where $x_1$ is the intersecting point on $f_1$ and $f_2$.
Therefore,
$$
\begin{aligned}
f&=f_1*f_2*f_3*f_4\\
&(f_1*\bar{\alpha})*(\alpha_1*f_2*\bar{\alpha_2})*(\alpha_2*f_3*\bar{\alpha_3})*(\alpha_4*f_4)
\end{aligned}
$$
This decompose $f$ into a word of elements in either $S_+$ or $S_-$.
---
Note that $f$ is a continuous function $I\to X$, for $t\in I$, $\exists I_t$ being a small neighborhood of $t$ such that $f(I_t)\subseteq U$ or $f(I_t)\subseteq V$.
Since $U_{t\in I}I_t=I$, then $\{I_t\}_{t\in I}$ is an open cover of $I$.
By compactness of $I$, there is a finite subcover $\{I_{t_1},\ldots,I_{t_n}\}$.
Therefore, we can create a partition of $I$ into $[s_i,s_{i+1}]\subseteq I_{t_k}$ for some $k$.
Then with the definition of $I_{t_k}$, $f([s_i,s_{i+1}])\subseteq U$ or $V$.
Then we can connect $x_0$ to $f(s_i)$ with a path $\alpha_i\subseteq U\cap V$.
$$
\begin{aligned}
f&=f|_{[s_0,s_1]}*f|_{[s_1,s_2]}*\ldots**f|_{[s_{n-1},s_n]}\\
&\simeq f|_{[s_0,s_1]}*(\bar{\alpha_1}*\alpha_1)*f|_{[s_1,s_2]}*(\bar{\alpha_2}*\alpha_2)*\ldots*f|_{[s_{n-1},s_n]}*(\bar{\alpha_n}*\alpha_n
)\\
&=(f|_{[s_0,s_1]}*\bar{\alpha_1})*(\alpha_1*f|_{[s_1,s_2]}*\bar{\alpha_2})*\ldots*(\alpha_{n-1}*f|_{[s_{n-1},s_n]}*\bar{\alpha_n})\\
&=g_1*g_2*\ldots*g_n
\end{aligned}
$$
</details>
#### Corollary in higher dimensional sphere
Since $S^n_+$ and $S^n_-$ are homeomorphic to open balls $B^n$, then $\pi_1(S^n_+,x_0)=\pi_1(S^n_-,x_0)=\pi_1(B^n,x_0)=\{e\}$ for $n\geq 2$.
> Preview: Van Kampen Theorem

View File

@@ -0,0 +1,72 @@
# Math4202 Topology II (Lecture 28)
## Algebraic Topology
### Fundamental Groups of Some Surfaces
Recall from last week, we will see the fundamental group of $T^2=S^1\times S^1$, and $\mathbb{R}P^2$, Torus with genus $2$.
Some of them are abelian, and some are not.
#### Theorem for fundamental groups of product spaces
Let $X,Y$ be two manifolds. Then the fundamental group of $X\times Y$ is the direct product of their fundamental groups,
i.e.
$$
\pi_1(X\times Y,(x_0,y_0))=\pi_1(X,x_0)\times \pi_1(Y,y_0)
$$
<details>
<summary>Proof</summary>
We need to find group homomorphism: $\phi:\pi_1(X\times Y,(x_0,y_0))\to \pi_1(X,x_0)\times \pi_1(Y,y_0)$.
Let $P_x,P_y$ be the projection from $X\times Y$ to $X$ and $Y$ respectively.
$$
(P_x)_*:\pi_1(X\times Y,(x_0,y_0))\to \pi_1(X,x_0)
$$
$$
(P_y)_*:\pi_1(X\times Y,(x_0,y_0))\to \pi_1(Y,y_0)
$$
Given $\alpha\in \pi_1(X\times Y,(x_0,y_0))$, then $\phi(\alpha)=((P_x)_*\alpha,(P_y)_*\alpha)\in \pi_1(X,x_0)\times \pi_1(Y,y_0)$.
Since $(P_x)_*$ and $(P_y)_*$ are group homomorphism, so $\phi$ is a group homomorphism.
**Then we need to show that $\phi$ is bijective.** Then we have the isomorphism of fundamental groups.
To show $\phi$ is injective, then it is sufficient to show that $\ker(\phi)=\{e\}$.
Given $\alpha\in \ker(\phi)$, then $(P_x)_*\alpha=\{e_x\}$ and $(P_y)_*\alpha=\{e_y\}$, so we can find a path homotopy $P_X(\alpha)\simeq e_x$ and $P_Y(\alpha)\simeq e_y$.
So we can build $(H_x,H_y):X\times Y\times I\to X\times I$ by $(x,y,t)\mapsto (H_x(x,t),H_y(y,t))$ is a homotopy from $\alpha$ and $e_x\times e_y$.
So $[\alpha]=[(e_x\times e_y)]$. $\ker(\phi)=\{[(e_x\times e_y)]\}$.
Next, we show that $\phi$ is surjective.
Given $(\alpha,\beta)\in \pi_1(X,x_0)\times \pi_1(Y,y_0)$, then $(\alpha,\beta)$ is a loop in $X\times Y$ based at $(x_0,y_0)$. and $(P_x)_*([\alpha,\beta])=[\alpha]$ and $(P_y)_*([\alpha,\beta])=[\beta]$.
</details>
#### Corollary for fundamental groups of $T^2$
The fundamental group of $T^2=S^1\times S^1$ is $\mathbb{Z}\times \mathbb{Z}$.
#### Theorem for fundamental groups of $\mathbb{R}P^2$
$\mathbb{R}P^2$ is a compact 2-dimensional manifold with the universal covering space $S^2$ and a $2-1$ covering map $q:S^2\to \mathbb{R}P^2$.
#### Corollary for fundamental groups of $\mathbb{R}P^2$
$\pi_1(\mathbb{R}P^2)=\#q^{-1}(\{x_0\})=\{a,b\}=\mathbb{Z}/2\mathbb{Z}$
Using the path-lifting correspondence.
#### Lemma for The fundamental group of figure-8
The fundamental group of figure-8 is not abelian.

View File

@@ -31,4 +31,7 @@ export default {
Math4202_L23: "Topology II (Lecture 23)", Math4202_L23: "Topology II (Lecture 23)",
Math4202_L24: "Topology II (Lecture 24)", Math4202_L24: "Topology II (Lecture 24)",
Math4202_L25: "Topology II (Lecture 25)", Math4202_L25: "Topology II (Lecture 25)",
Math4202_L26: "Topology II (Lecture 26)",
Math4202_L27: "Topology II (Lecture 27)",
Math4202_L28: "Topology II (Lecture 28)",
} }

View File

@@ -0,0 +1 @@
# Math 4302 Exam 2 Review

View File

@@ -2,7 +2,7 @@
## Rings ## Rings
### Integral Domains ### Fermats and Eulers Theorems
Recall from last lecture, we consider $\mathbb{Z}_p$ and $\mathbb{Z}_p^*$ denote the group of units in $\mathbb{Z}_p$ with multiplication. Recall from last lecture, we consider $\mathbb{Z}_p$ and $\mathbb{Z}_p^*$ denote the group of units in $\mathbb{Z}_p$ with multiplication.
@@ -104,7 +104,7 @@ Solution for $2x\equiv 1\mod 3$
So solution for $2x\equiv 1\mod 3$ is $\{3k+2|k\in \mathbb{Z}\}$. So solution for $2x\equiv 1\mod 3$ is $\{3k+2|k\in \mathbb{Z}\}$.
#### Theorem for solving modular equations #### Theorem for exsistence of solution of modular equations
$ax\equiv b\mod n$ has a solution if and only if $\operatorname{gcd}(a,n)|b$ and in that case the equation has $d$ solutions in $\mathbb{Z}_n$. $ax\equiv b\mod n$ has a solution if and only if $\operatorname{gcd}(a,n)|b$ and in that case the equation has $d$ solutions in $\mathbb{Z}_n$.

View File

@@ -0,0 +1,126 @@
# Math4302 Modern Algebra (Lecture 27)
## Rings
### Fermats and Eulers Theorems
Recall from last lecture, $ax\equiv b \mod n$, if $x\equiv y\mod n$, then $x$ is a solution if and only if $y$ is a solution.
#### Theorem for existence of solution of modular equations
$ax\equiv b\mod n$ has a solution if and only if $d=\operatorname{gcd}(a,n)|b$ And if there is a solution, then there are exactly $d$ solutions in $\mathbb{Z}_n$.
<details>
<summary>Proof</summary>
For the forward direction, we proved if $ax\equiv b\mod n$ then $ax-b=ny$, $y\in\mathbb{Z}$.
then $b=ax-ny$, $d|(ax-ny)$ implies that $d|b$.
---
For the backward direction, assume $d=\operatorname{gcd}(a,n)=1$. Then we need to show, there is exactly $1$ solution between $0$ and $n-1$.
If $ax\equiv b\mod n$, then in $\mathbb{Z}_n$, $[a][x]=[b]$. (where $[a]$ denotes the remainder of $a$ by $n$ and $[b]$ denotes the remainder of $b$ by $n$)
Since $\operatorname{gcd}(a,n)=1$, then $[a]$ is a unit in $\mathbb{Z}_n$, so we can multiply the above equation by the inverse of $[a]$. and get $[x]=[a]^{-1}[b]$.
Now assume $d=\operatorname{gcd}(a,n)$ where $n$ is arbitrary. Then $a=a'd$, then $n=n'd$, with $\operatorname{gcd}(a',n')=1$.
Also $d|b$ so $b=b'd$. So
$$
\begin{aligned}
ax\equiv b \mod n&\iff n|(ax-b)\\
&\iff n'd|(a'dx-b'd)\\
&\iff n'|(a'x-b')\\
&\iff a'x\equiv b'\mod n'
\end{aligned}
$$.
Since $\operatorname{gcd}(a',n')=1$, there is a unique solution $x_0\in \mathbb{Z}_{n'}$. $0\leq x_0\leq n'+1$. Other solution in $\mathbb{Z}$ are of the form $x_0+kn'$ for $k\in \mathbb{Z}$.
And there will be $d$ solutions in $\mathbb{Z}_n$,
</details>
<details>
<summary>Examples</summary>
Solve $12x\equiv 25\mod 7$.
$12\equiv 5\mod 7$, $25\equiv 4\mod 7$. So the equation becomes $5x\equiv 4\mod 7$.
$[5]^{-1}=3\in \mathbb{Z}_7$, so $[5][x]\equiv [4]$ implies $[x]\equiv [3][4]\equiv [5]\mod 7$.
So solution in $\mathbb{Z}$ is $\{5+7k:k\in \mathbb{Z}\}$.
---
Solve $6x\equiv 32\mod 20$.
$\operatorname{gcd}(6,20)=2$, so $6x\equiv 12\mod 20$ if and only if $3x\equiv 6\mod 10$.
$[3]^{-1}=[7]\in \mathbb{Z}_{10}$, so $[3][x]\equiv [6]$ implies $[x]\equiv [7][6]\equiv [2]\mod 10$.
So solution in $\mathbb{Z}_{20}$ is $[2]$ and $[12]$
So solution in $\mathbb{Z}$ is $\{2+10k:k\in \mathbb{Z}\}$
</details>
### Ring homomorphisms
#### Definition of ring homomorphism
Let $R,S$ be two rings, $f:R\to S$ is a ring homomorphism if $\forall a,b\in R$,
- $f(a+b)=f(a)+f(b)\implies f(0)=0, f(-a)=-f(a)$
- $f(ab)=f(a)f(b)$
#### Definition of ring isomorphism
If $f$ is a ring homomorphism and a bijection, then $f$ is called a ring isomorphism.
<details>
<summary>Example</summary>
Let $f:(\mathbb{Z},+,\times)\to(2\mathbb{Z},+,\times)$ by $f(a)=2a$.
Is not a ring homomorphism since $f(ab)\neq f(a)f(b)$ in general.
---
Let $f:(\mathbb{Z},+,\times)\to(\mathbb{Z}_n,+,\times)$ by $f(a)=a\mod n$
Is a ring homomorphism.
</details>
### Integral domains and their file fo fractions.
Let $R$ be an integral domain: (i.e. $R$ is commutative with unity and no zero divisors).
#### Definition of field of fractions
If $R$ is an integral domain, we can construct a field containing $R$ called the field of fractions (or called field of quotients) of $R$.
$$
S=\{(a,b)|a,b\in R, b\neq 0\}
$$
a relation on $S$ is defined as follows:
$(a,b)\sim (c,d)$ if and only if $ad=bc$.
<details>
<summary>This equivalence relation is well defined</summary>
- Reflectivity: $(a,b)\sim (a,b)$ $ab=ab$
- Symmetry: $(a,b)\sim (c,d)\Rightarrow (c,d)\sim (a,b)$
- Transitivity: $(a,b)\sim (c,d)$ and $(c,d)\sim (e,f)\Rightarrow (a,b)\sim (e,f)$
- $ad=bc$, and $cf=ed$, we want to conclude that $af=be$. since $ad=bc$, then $adf=bcf$, since $cf=ed$, then $cfb=edb$, therefore $adf=edb$.
- Then $d(af-be)=0$ since $d\neq 0$ then $af=be$.
</details>
Then $S/\sim$ is a field.

View File

@@ -0,0 +1,153 @@
# Math4302 Modern Algebra (Lecture 28)
## Rings
### Field of quotients
Let $R$ be an integral domain ($R$ has unity and commutative with no zero divisors).
Consider the pair $S=\{(a,b)|a,b\in R, b\neq 0\}$.
And define the equivalence relation on $S$ as follows:
$(a,b)\sim (c,d)$ if and only if $ad=bc$.
We denote $[(a,b)]$ as set of all elements in $S$ equivalent to $(a,b)$.
Let $F$ be the set of all equivalent classes. We define addition and multiplication on $F$ as follows:
$$
[(a,b)]+[(c,d)]=[(ad+bc,bd)]
$$
$$
[(a,b)]\cdot[(c,d)]=[(ac,bd)]
$$
<details>
<summary>The multiplication and addition is well defined </summary>
Addition:
If $(a,b)\sim (a',b')$, and $(c,d)\sim (c',d')$, then we want to show that $(ad+bc,bd)\sim (a'd+c'd,b'd)$.
Since $(a,b)\sim (a',b')$, then $ab'=a'b$; $(c,d)\sim (c',d')$, then $cd'=dc'$,
So $ab'dd'=a'bdd'$, and $cd'bb'=dc'bb'$.
$adb'd'+bcb'd'=a'd'bd+b'c'bd$, therefore $(ad+bc,bd)\sim (a'd+c'd,b'd)$.
---
Multiplication:
If $(a,b)\sim (a',b')$, and $(c,d)\sim (c',d')$, then we want to show that $(ac,bd)\sim (a'c',b'd')$.
Since $(a,b)\sim (a',b')$, then $ab'=a'b$; $(c,d)\sim (c',d')$, then $cd'=dc'$, so $(ac,bd)\sim (a'c',b'd')$
</details>
#### Claim (F,+,*) is a field
- additive identity: $(0,1)\in F$
- additive inverse: $(a,b)\in F$, then $(-a,b)\in F$ and $(-a,b)+(a,b)=(0,1)\in F$
- additive associativity: bit long.
- multiplicative identity: $(1,1)\in F$
- multiplicative inverse: $[(a,b)]$ is non zero if and only if $a\neq 0$, then $a^{-1}=[(b,a)]\in F$.
- multiplicative associativity: bit long
- distributivity: skip, too long.
Such field is called a quotient field of $R$.
And $F$ contains $R$ by $\phi:R\to F$, $\phi(a)=[(a,1)]$.
This is a ring homomorphism.
- $\phi(a+b)=[(a+b,1)]=[(a,1)][(b,1)]\phi(a)+\phi(b)$
- $\phi(ab)=[(ab,1)]=[(a,1)][(b,1)]\phi(a)\phi(b)$
and $\phi$ is injective.
If $\phi(a)=\phi(b)$, then $a=b$.
<details>
<summary>Example</summary>
Let $D\subset \mathbb R$ and
$$
\mathbb Z \subset D\coloneqq \{a+b\sqrt{2}:a,b\in \mathbb Z\}
$$
Then $D$ is a subring of $\mathbb R$, and integral domain, with usual addition and multiplication.
$$
(a+b\sqrt{2})(c+d\sqrt{2})=(ac+2bd)+(ad+bc)\sqrt{2}
$$
$$
-(a+b\sqrt{2})=(-a)+(-b)\sqrt{2})
$$
...
$D$ is a integral domain since $\mathbb R$ has no zero divisors, therefore $D$ has no zero divisors.
Consider the field of quotients of $D$. $[(a+b\sqrt{2},c+d\sqrt{2})]$. This is isomorphic to $\mathbb Q(\sqrt2)=\{r+s\sqrt{2}:r,s\in \mathbb Q\}$
$$
m+n\sqrt{2}=\frac{m}{n}+\frac{m'}{n'}\sqrt{2}\mapsto [(mn'+nm'\sqrt{2},nn')]
$$
And use rationalization on the forward direction.
</details>
#### Polynomial rings
Let $R$ be a ring, a polynomial with coefficients in $R$ is a sum
$$
a_0+a_1x+\cdots+a_nx^n
$$
where $a_i\in R$. $x$ is indeterminate, $a_0,a_1,\cdots,a_n$ are called coefficients. $a_0$ is the constant term.
If $f$ is a non-zero polynomial, then the degree of $f$ is defined as the largest $n$ such that $a_n\neq 0$.
<details>
<summary>Example</summary>
Let $f=1+2x+0x^2-1x^3+0x^4$, then $deg f=3$
</details>
If $R$ has a unity $1$, then we write $x^m$ instead of $1x^m$.
Let $R[x]$ denote the set of all polynomials with coefficients in $R$.
We define multiplication and addition on $R[x]$.
$f:a_0+a_1x+\cdots+a_nx^n$
$g:b_0+b_1x+\cdots+b_mx^m$
Define,
$$
f+g=a_0+b_0+a_1x+b_1x+\cdots+a_nx^n+b_mx^m
$$
$$
fg=(a_0b_0)+(a_1b_0)x+\cdots+(a_nb_m)x^m
$$
In general, the coefficient of $x^m=\sum_{i=0}^{m}a_ix^{m-i}$.
> [!CAUTION]
>
> The field $R$ may not be commutative, follow the order of computation matters.
We will show that this is a ring and explore additional properties.

View File

@@ -0,0 +1,60 @@
# Math4302 Modern Algebra (Lecture 29)
## Rings
### Polynomial Rings
$$
R[x]=\{a_0+a_1x+\cdots+a_nx^n:a_0,a_1,\cdots,a_n\in R,n>1\}
$$
Then $(R[x],+,\cdot )$ is a ring.
If $R$ has a unity $1$, then $R[x]$ has a unity $1$.
If $R$ is commutative, then $(R[x],+,\cdot )$ is commutative.
#### Definition of evaluation map
Let $F$ be a field, and $F[x]$. Fix $\alpha\in F$. $\phi_\alpha:F[x]\to F$ defined by $f(x)\mapsto f(\alpha)$ (the evaluation map).
Then $\phi_\alpha$ is a ring homomorphism. $\forall f,g\in F[x]$,
- $(f+g)(\alpha)=f(\alpha)+g(\alpha)$
- $(fg)(\alpha)=f(\alpha)g(\alpha)$ (use commutativity of $\cdot$ of $F$, $f(\alpha)g(\alpha)=\sum_{k=0}^{n+m}c_k x^k$, where $c_k=\sum_{i=0}^k a_ib_{k-i}$)
#### Definition of roots
Let $\alpha\in F$ is zero (or root) of $f\in F[x]$, if $f(\alpha)=0$.
<details>
<summary>Example</summary>
$f(x)=x^3-x, F=\mathbb{Z}_3$
$f(0)=f(1)=0$, $f(2)=8-2=2-2=0$
but note that $f(x)$ is not zero polynomial $f(x)=0$, but all the evaluations are zero.
</details>
#### Factorization of polynomials
Division algorithm. Let $F$ be a field, $f(x),g(x)\in F[x]$ with $g(x)$ non-zero. Then there are unique polynomials $q(x),r(x)\in F[x]$ such that
$f(x)=q(x)g(x)+r(x)$
$r(x)$ is the zero polynomial or $\deg r(x)<\deg g(x)$.
<details>
<summary>Proof</summary>
Uniqueness: exercise
---
Existence:
Let $S=\{f(x)-h(x)g(x):h(x)\in F[x]\}$.
</details>

View File

@@ -29,4 +29,7 @@ export default {
Math4302_L24: "Modern Algebra (Lecture 24)", Math4302_L24: "Modern Algebra (Lecture 24)",
Math4302_L25: "Modern Algebra (Lecture 25)", Math4302_L25: "Modern Algebra (Lecture 25)",
Math4302_L26: "Modern Algebra (Lecture 26)", Math4302_L26: "Modern Algebra (Lecture 26)",
Math4302_L27: "Modern Algebra (Lecture 27)",
Math4302_L28: "Modern Algebra (Lecture 28)",
Math4302_L29: "Modern Algebra (Lecture 29)",
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 KiB