# Abstract Algebra/Integral domains
## Integral Domains

Motivation: The concept of divisibility is central to the study of ring theory. Integral domains are a useful tool for studying the conditions under which concepts like divisibility and unique factorization are well-behaved. In fact, they are very important for polynomial rings as well.
The integral domain was already defined before on the page on rings. We provide the definition again for reference.
Definition An integral domain is a commutative ring $R$ with $1_{R}\neq 0_{R}$ such that for all $a,b\in R$, the statement $ab=0$ implies either $a=0$ or $b=0$.
An equivalent definition is as follows:
Definition Given a ring $R$, a zero-divisor is an element $a\in R$ such that $\exists x\in R,x\neq 0$ such that $a*x=0_{R}$.
Definition An integral domain is a commutative ring $R$ with $1_{R}\neq 0_{R}$ and with no non-zero zero-divisors.
Remark An integral domain has a useful cancellation property: Let $R$ be an integral domain and let $a,b,c\in R$ with $a\neq 0$. Then $ab=ac$ implies $b=c$. For this reason an integral domain is sometimes called a cancellation ring.
Examples:
* The set $\mathbb {Z}$ of integers under addition and multiplication is an integral domain. However, it is not a field since the element $2\in {Z}$ has no multiplicative inverse.
* The set trivial ring {0} is not an integral domain since it does not satisfy $0\neq 1$.
* The set $\mathbb {Z} _{6}$ of congruence classes of the integers modulo 6 is not an integral domain because $[2]*[3]=[0]$ in $\mathbb {Z} _{6}$.
Theorem: Any field $F$ is an integral domain.
Proof: Suppose that $F$ is a field and let $a\in F,a\neq 0$. If $ax=0$ for some $x$ in $F$, then multiply by $a^{-1}$ to see that $ax=0\Rightarrow a^{-1}(ax)=a^{-1}0\Rightarrow 1x=0\Rightarrow x=0$. $F$ cannot, therefore, contain any zero divisors. Thus, $F$ is an integral domain.$\square$
Definition If $R$ is a ring, then the set of polynomials in powers of $x$ with coefficients from $R$ is also a ring, called the polynomial ring of $R$ and written $R[x]$. Each such polynomial is a finite sum of terms, each term being of the form $rx^{n}$ where $r\in R$ and $x^{n}$ represents the $n$-th power of $x$. The leading term of a polynomial is defined as that term of the polynomial which contains the highest power of $x$ in the polynomial.
Remark A polynomial equals $0$ if and only if each of its coefficients equals $0$.
Theorem: Let $R$ be a commutative ring and let $R[x]$ be the ring of polynomials in powers of $x$ whose coefficients are elements of $R$. Then $R[x]$ is an integral domain if and only if $R$ is.
Proof If commutative ring $R$ is not an integral domain, it contains two non-zero elements $a$ and $b$ such that $ab=0$. Then the polynomials $ax$ and $bx$ are non-zero elements of $R[x]$ and $axbx=abxx=0xx=0$. Thus if $R$ is not an integral domain, neither is $R[x]$.
Now let $R$ be an integral domain and let $A$ and $B$ be polynomials in $R[x]$. If the polynomials are both non-zero, then each one has a non-zero leading term, call them $ax^{m}$ and $bx^{n}$. That these are the leading terms of polynomials $A$ and $B$ means that the leading term of the product $AB$ of these polynomials is $abx^{m+n}$. Since $R$ is an integral domain and $a,b\in R$, $ab\neq 0$. This means, by the Remark above, that the product $AB$ is not zero either. This means that $R[x]$ is an integral domain.

## Unique Factorization Domains, Principal Ideal Domains, and Euclidean Domains

Unique Factorization Domains, Principal Ideal Domains, and Euclidean Domains are ideas that work only on integral domains.

### Some definitions

* Two ring elements a and b are associates if a=ub for some unit u, we write a~b
* A nonzero nonunit a is irreducible if a=bc (b,c in domain)=>a~b or a~c.
* a divides b if b=ar for some r within R. When this happens, we write a|b.
* A nonzero nonunit is prime when a|bc implies that a|b or a|c.
Theorem: If a is prime, then a is irreducible.
Let a be prime, and let a=bc, so that either a|b or a|c. Without loss of generality, assume that a|b, so that b=ad for some element d. Then you can factor a=bc into a=adc, implying that cd=1, or that c is a unit.
Now that we have proven that all prime elements are irreducible, is the converse true? The answer to that is no, for we can easily obtain counterexamples to it. However, we will prove a sufficient and necessary condition for all irreducible elements to be prime.

### Unique Factorization Domains

Definition: Let R be an integral domain. If the following two conditions hold:
* If a is nonzero, then a=up$_1$p$_2$...p$_n$ where u is a unit, and p$_i$ are irreducible.
* Let a=uq$_1$q$_2$...q$_m$ be another factorization of irreducibles. Then n = m and after a suitable re-ordering, each p$_i$ and q$_i$ are associates.
Then we call (the integral domain) R a unique factorization domain (UFD).
The converse to the above theorem holds true in a UFD.
Theorem: In a UFD, all irreducibles are prime.
Proof Let a|bc, where a is irreducible. Then ad=bc for some element d. Taking the factorization, a = ud$_1$d$_2$...d$_l$ = vb$_1$b$_2$...b$_m$wc$_1$c$_2$...c$_n$ = bc where u, v, and w are units. Because it is a UFD, a must be an associate of some b$_i$ or c$_i$, implying that a|b or a|c.
The following theorem provides a sufficient and necessary condition for an integral domain R to be an integral domain.
Theorem:
* Let R be a UFD. R satisfies the following ascending chain condition on principal ideals: let $a_{1},a_{2},a_{3},...$ be a sequence of elements of R such that the principal ideals $(a_{1}),(a_{2}),(a_{3}),...$ satisfy the condition that $(a_{1})\subseteq (a_{2})\subseteq (a_{3})\subseteq ,...$. Then there exists an N such that for all n>N, all the $(a_{n})$ are the same.
* If an integral domain R satisfies the ascending chain condition, then every nonzero element can be factored into irreducible elements, meaning that it satisfies the first condition for being a UFD.
* If, in addition to satisfying the ascending chain condition, all irreducible elements are prime, then the integral domain is a UFD.
Proof
* Consider a sequence $a_{1},a_{2},a_{3},...$ of elements of R such that $(a_{1})\subseteq (a_{2})\subseteq (a_{3})\subseteq ,...$. Then obviously $a_{n+1}|a_{n}$ for all natural numbers n, since $a_{n}\in (a_{n+1})$. Then due to unique factorization, all the factors of $a_{n+1}$ are associates of the factors $a_{n}$, counting multiplicity of factors. Therefore, the number of non-unit factors is a decreasing sequence on the whole numbers. However, $a_{1}$ has finitely many factors, so there is an N such that for all n>N, all the factors are $a_{n}$ associates, meaning that all the $(a_{n})$ are also the same.
* Clearly any nonzero irreducible $a_{1}$ can be factored into irreducibles, which is itself. Otherwise, let $a_{1}=a_{2}b_{2}$ be a product of nonunits. If this is not a product of irreducibles, then suppose that one of them is not irreducible, say $a_{2}$. Then obviously $a_{2}|a_{1}$ so the principal ideals satisfy the relations $(a_{1})\subseteq (a_{2})$. We can factor $a_{2}$ in the same way, to obtain $a_{2}=a_{3}b_{3}$ as a product of nonunits. Thus, if $a_{1}$ cannot be factored into irreducibles, we can get an increasing chain $(a_{1})\subseteq (a_{2})\subseteq (a_{3})\subseteq ...$ of principal ideals, meaning that it does not satisfy the ascending chain condition.
* Let $a=sp_{1}p_{2}p_{3}...p_{n}=rq_{1}q_{2}q_{3}...q_{n}$ where r and s are units and each $p_{i}$ and $q_{i}$ are irreducible, and thus prime. Since $p_{1}$ divides a, it divides one of the factors, and after suitably re-arranging the second factorization, $p_{1}$ can divide $q_{1}$. However, $q_{1}$ is irreducible, so they must be associates, and thus can be factored out and replaced by a unit. We can continue this process until there are no factors left, at which point we conclude that all the factors are associates.

### Principal Ideal Domains

Definition: a principal ideal domain (PID) is an integral domain such that every ideal can be generated by a single element (i. e. every ideal is a principal ideal).
Theorem: All PIDs are UFDs.
Proof: Suppose we have an ascending chain of principal ideals $(a_{1})\subseteq (a_{2})\subseteq ...$ and let I be the union $I=\bigcup _{i=1}^{\infty }(a_{i})$. Obviously I is an ideal, and is a principal ideal because it is in a PID. Therefore, it is generated by a single element, $I=(a)$. Since $a\in I$, $a\in (a_{N})$ for some N. Then if $i\geq N$, then we have $(a)=(a_{N})$, so it satisfies the ascending chain condition of principal ideals.
Let an element $a$ be irreducible. If $1\in (a)$, then $a$ would be a unit, so (a) must be a proper ideal. If there is no maximal proper ideal containing (a), then the ascending chain condition would not be satisfied, so we can conclude that there is a maximal ideal proper ideal I containing (a) (Note: This does not require the Zorn's lemma or axiom of choice, since we did not use the theorem on maximal ideals). This ideal must be a principal ideal (b), but since $a\in (b)$, b|a, and since $a$ is irreducible, b must either be a unit or an associate of a. Since (b) is a proper ideal, b must not be a unit, so it must be an associate of $a$. Therefore, (a)=(b), so (a) is maximal. However, all maximal ideals are clearly prime, so (a) is a prime ideal, which implies that $a$ is prime.
Theorem: A UFD is a PID if and only if every nontrivial prime ideal is maximal.
Proof: Suppose R is a PID, so that consequently, it is a UFD. Let (a) be an ideal of R, which in turn must be contained in a maximal proper ideal (b) due to the ascending chain condition (Note: again, this does not make use of Zorn's lemma). Since $a\in (b)$, b|a. Since $a$ is irreducible, b must either be a unit or an associate of $a$. However, since (b) is a proper ideal, it must not be a unit, so it must be an associate of $a$. Therefore, (a)=(b), so (a) is maximal. Conversely,

### Euclidean Domains

Definition: An integral domain R is a Euclidean domain (ED) if there is a function f from the nonzero elements of R to the whole numbers such that for any element $a\in R$ and any nonzero element b, that a=bq+r for some $q,r\in R$ and such that f(r)<f(b) or such that r=0.
Note: In an ED, the Euclidean algorithm to find the greatest common divisor is applicable.
Theorem: All EDs are PIDs.
Proof: Suppose we have an ideal of R. If it contains only 0, then it is principal. Otherwise, it contains elements other than 0. Then f(I), the image of I under f, is a nonempty set of nonnegative integers. Choose the minimum x of this set, and consider an element b within I which mapped to this x. Let a be another element of I, and there exists $q,r\in R$ such that a=qb+r and such that either f(r)<f(b) or r=0. Since both a and b belong to I, r must also belong to I since r=a-qb. However, f(b) is the minimum, so it must be less than or equal to f(r). Thus, r must be 0, so a=qb, proving that b is the generator of the principal ideal (b).