PID Implies UFD

lean4-proofring-theoryvisualization
PID    UFD\text{PID} \implies \text{UFD}

Statement

A principal ideal domain (PID) is an integral domain in which every ideal is principal (generated by a single element). A unique factorisation domain (UFD) is an integral domain in which every non-zero non-unit factors into irreducibles uniquely up to order and associates.

Theorem. Every PID is a UFD.

Examples: Z\mathbb{Z}, k[x]k[x] for a field kk, and the Gaussian integers Z[i]\mathbb{Z}[i] are PIDs (hence UFDs).

Visualization

The Gaussian integers Z[i]\mathbb{Z}[i] form a PID. Factor 2Z[i]2 \in \mathbb{Z}[i]:

2 = (1+i)(1-i)
  = -i · (1+i)^2          [since 1-i = -i(1+i)]

Norm check: N(1+i)=12+12=2N(1+i) = 1^2 + 1^2 = 2, so N(2)=4=N(1+i)2N(2) = 4 = N(1+i)^2. The element 1+i1+i is irreducible in Z[i]\mathbb{Z}[i] (its norm 22 is prime in Z\mathbb{Z}).

FactorisationNotes
2=(1+i)(1i)2 = (1+i)(1-i)both irreducible, norms =2= 2
1i=i(1+i)1-i = -i(1+i)i-i is a unit (norm 11)
so 2=i(1+i)22 = -i(1+i)^2unique up to units

Any other factorisation of 22 in Z[i]\mathbb{Z}[i] is obtained by multiplying factors by units {1,1,i,i}\{1, -1, i, -i\}.

Proof Sketch

  1. Every irreducible is prime. In a PID, if pabp \mid ab and pap \nmid a, then (p,a)=(d)(p, a) = (d) for some dd. Since pp is irreducible, dd is a unit, so (p,a)=R(p, a) = R. Write 1=rp+sa1 = rp + sa, then b=rpb+sabb = rpb + sab; since pabp \mid ab, we get pbp \mid b. So pp is prime.

  2. Existence of factorisations. A PID is Noetherian (all ideals are finitely generated — trivially, by one element). In a Noetherian domain, every non-zero non-unit has an irreducible factorisation: if aa is not irreducible, write a=bca = bc and continue; this cannot go on indefinitely by the ascending chain condition on ideals (a)(b)(a) \subset (b) \subset \cdots.

  3. Uniqueness. Since every irreducible is prime (step 1), uniqueness of factorisation follows by the standard argument: if p1pr=q1qsp_1 \cdots p_r = q_1 \cdots q_s, then p1p_1 divides some qjq_j; since qjq_j is irreducible, p1p_1 and qjq_j are associates. Cancel and induct.

Connections

The chain Euclidean domain \to PID \to UFD is the backbone of commutative algebra; see Euclidean DomainEuclidean Domaina,b0,  q,r:  a=qb+r,  N(r)<N(b)\forall a, b \ne 0,\; \exists q, r:\; a = qb + r,\; N(r) < N(b)A domain with a division algorithm: any a, b give a = qb + r with r smaller than b under a norm function.Read more → for the first implication. UFD structure is what makes Gauss's Lemma (Polynomial)Gauss's Lemma (Polynomial)f,g primitive    fg primitivef,g \text{ primitive} \implies fg \text{ primitive}The product of primitive polynomials is primitive; irreducibility over a UFD transfers to irreducibility over its fraction field.Read more → work: the content map is multiplicative precisely when RR is a UFD.

Lean4 Proof

-- Mathlib: IsPrincipalIdealRing.to_uniqueFactorizationMonoid
-- in Mathlib.RingTheory.PrincipalIdealDomain (line 344)
/-- Every PID is a UFD.
    Mathlib provides this as an automatic instance. -/
example (R : Type*) [CommRing R] [IsDomain R] [IsPrincipalIdealRing R] :
    UniqueFactorizationMonoid R :=
  inferInstance