\classheader{2012-10-01}

Today we'll be talking about the Chinese Remainder Theorem and some of its consequences.

\newtheorem*{theorem-lecture1-lagrange}{Lagrange Interpolation Formula}
\begin{theorem-lecture1-lagrange}
Let $k$ be a field. Then for any $c_1,\ldots,c_n\in k$, and any distinct $x_1,\ldots,x_n\in k$, there exists a $p\in k[t]$ such that $p(x_i)=c_i$ for all $i$.
\end{theorem-lecture1-lagrange}
\begin{proof}
The proof comes in three steps.

\textit{Step 1:} For each $i=1,\ldots,n$, define
\[p_{ij}(t)=\frac{t-x_j}{x_i-x_j}.\]
Note that
\[p_{ij}(t)=\begin{cases}1 & \text{if } t= x_i,\\ 0 & \text{if }t=x_j.\end{cases}\]
\textit{Step 2:} For each $i=1,\ldots,n$, define
\[p_i(t)=\prod_{j\neq i}p_{ij}(t).\]
Note that
\[p_{i}(t)=\begin{cases}1 & \text{if } t= x_i,\\ 0 & \text{if }t=x_j\text{ for any }j\neq i.\end{cases}\]
\textit{Step 3:} Define
\[p(t)=\sum_{i=1}^n c_ip_i(t).\]
It is easy to verify that this $p$ satisfies the claimed property.
\end{proof}

In this course, rings will always be unital, though they will not necessarily be commutative. 

Given a ring $A$ and two-sided ideals $I_1,\ldots,I_n\subset A$, there are some important ways we can create new two-sided ideals.

The sum of the $I_i$ is defined by
\[I_1+\cdots+I_n=\{x_1+\cdots+x_n\mid x_i\in I_i\}.\]
The product of the $I_i$ is defined by
\[I_1\cdots I_n=\{\sum x_1\cdots x_n\mid x_i\in I_i\}.\]
The intersection of the $I_i$ is just their intersection as subsets of $A$.

Note that we always have $I_1\cdots I_n\subseteq I_1\cap \cdots \cap I_n$.

We can re-express the Lagrange Interpolation Formula as follows:
\newtheorem*{theorem-lecture1-lagrange2}{Lagrange Interpolation Formula}
\begin{theorem-lecture1-lagrange2}
Let $k$ be a field, and let $A=k[t]$. For any $c_1,\ldots,c_n\in k$, and any distinct $x_1,\ldots,x_n\in k$, let $I_i=(t-x_i)$. There exists a $p\in A$ such that $p-c_i\in I_i$ for all $i$.
\end{theorem-lecture1-lagrange2}

Note that
\begin{align*}\text{the }x_i\text{ are distinct}&\iff \text{for any }i\neq j,\,-(t-x_i)+(t-x_j)=x_i-x_j\neq 0\\
&\iff \text{for any }i\neq j,\,I_i+I_j=A.
\end{align*}

\newtheorem*{theorem-lecture1-crt}{Chinese Remainder Theorem}
\begin{theorem-lecture1-crt}
Let $A$ be a not-necessarily-commutative ring, and $I_1,\ldots,I_n$ two-sided ideals of $A$ such that $I_i+I_j=A$ for all $i\neq j$. Then
\begin{enumerate}
\item For any $c_1,\ldots,c_n\in A$, there exists $p\in A$ such that $p-c_i\in I_i$ for all $i$.
\item If $A$ is commutative, then $I_1\cdots I_n=I_1\cap \cdots \cap I_n$.
\end{enumerate}
\end{theorem-lecture1-crt}
\begin{proof}[Proof of Part 1]
The proof comes in three steps.

\textit{Step 1:} For any $i\neq j$, we have that $I_i+I_j=A$. Thus, for any $i\neq j$ there are some $q_{ij}\in I_i$ and $p_{ij}\in I_j$ such that $q_{ij}+p_{ij}=1$. Note that $1-p_{ij}=q_{ij}\in I_i$.

\textit{Step 2:} For each $i$, let
\[p_i=\prod_{j\neq i}p_{ij}\in\prod_{j\neq i} I_j\subset I_j\text{ for all }j\neq i.\]
We claim that $1-p_i\in I_i$. This follows from observing that
\[p_i=\prod_{j\neq i}(1-q_{ij})=1+(\text{terms involving the }q_{ij})\]
and that for all $j\neq i$, $q_{ij}\in I_i$.

\textit{Step 3:} Let 
\[p=\sum_{i=1}^n c_ip_i.\]
Checking that this $p$ works, we see that for any $i$,
\[p-c_i=c_i(1-p_i)+\sum_{j\neq i}c_jp_j,\]
and $(1-p_i)\in I_i$ and each $p_j\in I_i$ by Step 2, so that $p-c_i\in I_i$ for all $i$.
\end{proof}
\begin{proof}[Proof of Part 2]
We proceed by induction. For the case of $n=2$, note that because $I_1+I_2=A$, there are some $u_1\in I_1$, $u_2\in I_2$ such that $u_1+u_2=1$. For any $a\in I_1\cap I_2$, we then have
\[a=au_1+au_2.\]
Because $a\in I_2$ and $u_1\in I_1$, we have that $au_1\in I_2I_1$. Because $a\in I_1$ and $u_2\in I_2$, we have that $au_2\in I_1I_2$. Now using the assumption that $A$ is commutative, we have that $I_2I_1=I_1I_2$ and therefore $a\in I_1I_2$. This proves that $I_1\cap I_2\subseteq I_1I_2$, and hence $I_1\cap I_2=I_1I_2$.

Now for the inductive step. By the inductive hypothesis, we know that
\[I_2\cap \cdots \cap I_n=I_2\cdots I_n,\]
and therefore
\[I_1\cap (I_2\cap \cdots \cap I_n)=I_1\cap(I_2\cdots I_n).\]
We would like to show that
\[I_1\cap(I_2\cdots I_n)=I_1I_2\cdots I_n.\]
This will follow from the $n=2$ case, provided that we can show that
\[I_1+(I_2\cdots I_n)=A.\]
Recall that in the proof of part 1, we constructed a $p_1\in A$ such that $1-p_1\in I_1$ and
\[p_1\in \prod_{j\neq i}I_j= I_2\cdots I_n.\]
Then the fact that
\[1=p_1+(1-p_1)\]
implies that $1\in I_1+(I_2\cdots I_n)$, and hence $I_1+(I_2\cdots I_n)=A$.
\end{proof}
Because the $I_i$ are two-sided ideals, we can quotient the ring $A$ by them. Define the homomorphisms $\pi_i:A\to A/I_i$ to be the quotient maps, so that $\ker(\pi_i)=I_i$.

Define $\pi$ to be the composition
\[\pi:A\xrightarrow{\;\text{diag}\;}\bigoplus_{i=1}^n A\xrightarrow{\;\oplus \pi_i\;}\bigoplus_{i=1}^n A/I_i,\]
so that
\[\pi(a)=(a\bmod I_1,\ldots,a\bmod I_n).\]
Clearly, $\ker(\pi)=\bigcap \ker(\pi_i)=\bigcap I_i$.

We can now restate the Chinese Remainder Theorem in a more abstract form.

\newtheorem*{theorem-lecture1-crt2}{Chinese Remainder Theorem}
\begin{theorem-lecture1-crt2}
Let $A$ be a not-necessarily-commutative ring, and $I_1,\ldots,I_n$ two-sided ideals of $A$ such that $I_i+I_j=A$ for all $i\neq j$. Then the map $\pi$ is surjective, and induces an isomorphism
\[\overline{\pi}:A/(I_1\cap\cdots\cap I_2)\to \bigoplus_{i=1}^n A/I_i.\]
\end{theorem-lecture1-crt2}
\begin{proof}
Because we induced the map $\overline{\pi}$ by quotienting out by the kernel of $\pi$, we have that $\ker(\overline{\pi})=0$. Therefore, $\overline{\pi}$ is injective. Also, $\overline{\pi}$ is surjective, because for any choice of $\overline{c_i}\in A/I_i$ for each $i$, there is some $a\in A$ such that $a\bmod I_i=\overline{c_i}$ by the Chinese Remainder Theorem.
\end{proof}

Now we will review some basics about PIDs.

A ring $A$ is a PID when
\begin{enumerate}
\item $A$ is commutative,
\item $A$ has no zero-divisors, and
\item Any ideal of $A$ is principal.
\end{enumerate}
Examples of PIDs include the ring $\Z$, and the polynomial ring $k[t]$ over a field $k$.

Let $A$ be a PID. For any $a,b\in A\setminus\{0\}$, we say that $d\in A$ is a $\gcd$ of $a$ and $b$ when $d\mid a$ and $d\mid b$, and when for any $g\in A$ such that $g\mid a$ and $g\mid b$, we also have $g\mid d$.

The following is a fundamental result about PIDs.
\begin{theorem}
Let $A$ be a PID. For any $a,b\in A\setminus\{0\}$,
\[Aa+Ab=A\gcd(a,b).\]
\end{theorem}
\begin{proof}
Since $A$ is a PID, we know the ideal $Aa+Ab$ is equal to $Ad$ for some $d$. Note that
\[a\in Aa\subset Aa+Ab=Ad\]
implies that $d\mid a$. By symmetry, $d\mid b$ as well. If $g\mid a$ and $g\mid b$, then $a,b\in Ag$, so that
\[Ad=Aa+Ab\subset Ag,\]
which implies that $d\in Ag$ and hence $g\mid d$.
\end{proof}
\begin{corollary}
Let $A$ be a PID. Then
\[\gcd(a,b)=1\iff Aa+Ab=A\iff\text{ there exist }u,v\in A\text{ such that }au+bv=1.\]
\end{corollary}
\begin{corollary}
Let $A$ be a PID, and let $a=a_1\cdots a_n$ where $\gcd(a_i,a_j)=1$ for all $i\neq j$. Then
\[A/(a)\cong A/(a_1)\oplus\cdots\oplus A/(a_n).\]
\end{corollary}

