\subsection{$\mathbb{Z}$ and $K[X]$, two Principal Ideal Domains}
\begin{lemma}{}
$\mathbb{Z}$ is a PID.
\end{lemma}
\begin{proof}
Let $I$ a nonzero ideal of $\mathbb{Z}$.
Since $I \neq\{0\}$, there is at least one nonzero integer in $I$. Choose the smallest element of $I$, namely $d$.
Observe that $(d)\subseteq I$, since $d \in I$. Then, every multiple $nd \in I$, since $I$ is an ideal.
Take $a \in I$. By the Euclidean division algorithm in $\mathbb{Z}$, $a=qd+r$, with $q,r \in\mathbb{Z}$ and $0\leq r \leq d$.
Then $r = a - qd \in I$, but $d$ was chosen to be the smallest positive element of $I$, so the only possibility is $r=0$.
Hence, $a=qd$, so $a \in(d)$, giving $I \subseteq(d)$.
Since we had $(d)\subseteq I$ and now we got $I \subseteq(d)$, we have $I =(d)$, so every ideal of $\mathbb{Z}$ is principal. Thus $\mathbb{Z}$ is a Principal Ideal Domain(PID).
\end{proof}
\begin{lemma}{}
$K[X]$ is a PID.
\end{lemma}
\begin{proof}
This proof follows very similarly to the previous proof.\\
Let $K$ be a field, $K[X]$ a polynomial ring.
Take $\{0\}\neq I \subseteq K[X]$.
Since $I \neq\{0\}$, there is at least one non-zero polynomial in $I$.
Let $p(X)\in I$ be of minimal degree among nonzero elements of $I$.
Observe that $(p(X))\subseteq I$, because $p(X)\in I$ and $I$ is an ideal.
Let $f(X)\in I$. By Euclidean division algorithm in $K[X]$, $\exists q, r \in K[X]$ such that $f(X)= q(X)\cdot p(X)+ r(X)$ with eithr $r(X)=0$ or $deg(r) < deg(p)$.
Since $f,p \in I$, then $r(X)= f(X)- q(X)\cdot p(X)\in I$
If $r(X)\neq0$, then $deg(r) < deg(p)$, which contradicts the minimality of $deg(p)$ in $I$.
Then, since $(p(X))\subseteq I$ and $I \subseteq(p(X))$, we have that $I =(p(X))$.
So every ideal of $K[X]$ is principal; thus $K[X]$ is a PID.
\end{proof}
\subsection{Lemmas, propositions and corollaries}
Let $\Sigma$ be a partially orddered set. Given subset $S \subset\Sigma$, an \emph{upper bound} of $S$ is an element $u \in\Sigma$ such that $s<u \forall s \in S$.
@ -237,7 +292,7 @@ A subset $S \subset \Sigma$ is \emph{totally ordered} if for every pair $s_1,s_2
\section{Modules}
\subsection{Modules}
\subsection{Modules concepts}
Let $A$ be a ring. An $A$-module is an Abelian group $M$ with a multiplication
map
@ -792,6 +847,8 @@ The exercises that start with \textbf{R} are the ones from the book \cite{reid},
\item the intersection of two prime ideals is prime
\item the ideal $P_1+P_2$ generated by $2$ prime ideals $P_1,P_2$ is prime
\item if $\psi: A \longrightarrow B$ ring homomorphism, then $\psi^{-1}$ takes maximal ideals of $B$ to maximal ideals of $A$
\item the map $\psi^{-1}$ of Proposition 1.2 takes maximal ideals of $A/I$
to maximal ideals of $A$
\end{enumerate}
\end{ex}
\begin{proof}
@ -832,9 +889,116 @@ The exercises that start with \textbf{R} are the ones from the book \cite{reid},
But $(0)$ is not maximal in $\mathbb{Z}$, because $\mathbb{Z}/(0)\cong\mathbb{Z}$ is not a field.
Thus the preimages of maximal ideals under arbitrary ring homomorphisms need not be maximal.
\item$\psi: A \longrightarrow A/I$ quotient homomorphism, $I \subseteq A$ an ideal.
Let $M$ a maximal ideal of $A/I$, then $\frac{(A/I)}{M}$ is a field (Proposition 1.3).
By the isomorphism theorems,
$$\frac{(A/I)}{M}\cong\frac{A}{\psi^{-1}(M)}$$
Since $\frac{(A/I)}{M}$ is a field, the quotient $\frac{A}{\psi^{-1}(M)}$ is a field, so $\psi^{-1}(M)$ is a maximal ideal of $A$.
$\Longrightarrow~$ under $\psi$, preimages of maximal ideals are maximal.
\end{enumerate}
\end{proof}
\begin{ex}{R.1.12.a}
if $I,J$ ideals and $P$ prime ideal, prove that
$$IJ \subset P ~\Longleftrightarrow~ I \cap J \subset P ~\Longleftrightarrow~ I ~\text{or}~ J \subset P$$
\end{ex}
\begin{proof}
assume $I \subseteq P$ (for $J \subseteq P$ will be the same, symmetric), take $x \in IJ$,
then
$$x =\sum_{k=1}^n a_k b_k$$
with $a_k \in I,~ b_k \in J$.
Each $a_k \in I \subseteq P$. Since $P$ an ideal,
$$\sum_{k=1}^n a_k b_k \in P$$
thus $x \in P$, hence $IJ \subseteq P$.
So $I \subseteq P$ or $J \subseteq P$$~\Longrightarrow IJ \subseteq P$.
\vspace{0.5cm}
Conversely,\\
assume $P$ prime and $IJ \subseteq P$.
Suppose by contradiction that $I \not\subseteq P$ and $J \not\subseteq P$.
\begin{itemize}
\item[-] since $I \not\subseteq P,~ \exists a \in I$ with $a \not\in P$
\item[-] since $J \not\subseteq P,~ \exists b \in J$ with $b \not\in P$
\end{itemize}
Since $a \in I,~ b \in J,~~ ab \in IJ \subseteq P$, but $P$ is prime, so $ab \in P$ implies that $a \in P$ or $b \in P$. This contradicts $a,b$ being taken outside of $P$.
Thus $I \not\subseteq P$ and $J \not\subseteq P$ are false.
\vspace{0.3cm}
So both directions are proven, hence
$$IJ \subseteq P ~\Longrightarrow~ I \subseteq P ~\text{or}~ J \subseteq P$$
\end{proof}
\begin{ex}{R.1.18}
Use Zorn's lemma to prove that any prime ideal $P$ contains a minimal prime ideal.
\end{ex}
\begin{proof}
Let $P$ prime ideal of $R$.
$$S =\{ Q \subseteq R ~|~ Q ~\text{a prime ideal AND}~ Q \subseteq P \}$$
Goal: show that $S$ has a minimal element, the minimal ideal contained in $P$.
$P \subset S$, so $S$ is nonempty.
Let $C \subseteq S$ be a chain (= totally ordered subset) with respect to inclusion.
Define
$$Q_C =\bigcap_{Q \in C} Q$$
Clearly $Q_C \subseteq P$, since each $Q \in C$ is $Q \subseteq P$.
Since $C$ is ordered by inclusion, it is a decreasing chain of prime ideals.
Intersection of a decreasing chain of prime ideals is again a prime ideal:
\begin{itemize}
\item[-] if $ab \in Q_C$, then $ab \in Q ~\forall Q \in C$
\item[-] since $Q$ prime, $\forall Q \in C$ either $a \in Q$ or $b \in Q$
\end{itemize}
If there were some $Q_1,~ Q_2\in C$ with $a \in Q_1$ and $b \not\in Q_2$, then by total ordering, either $Q_1\subseteq Q_2$ or $Q_2\subseteq Q_1$.
In either case: contradiction, since the smaller one would have to contain the element that was assumed to be excluded.
Thus $\forall Q \in C$ the same element $a, b$ must lie in all $Q$. $\Longrightarrow~$ lies in the intersection of them, $Q_C$.
Henceforth, $Q_C$ is a prime ideal and lies in $S$, and its a lower bound of $C$ in $S$.
Now, $S$ is nonempty, and every chain in $S$ has a lower bound in $S$ (its intersection).\\
Therefore, $S$ has a minimal element $P_{min}$.
By construction, $P_{min}$ is a prime ideal $P_{min}\subseteq P$, and by minimality there are no strictly smaller prime ideals inside $P$.
So $P_{min}$ is a minimal prime ideal, contained in $P$.