Every principal ideal domain is a unique factorization domain
ProvedFamousTheorems.pid_is_ufd_7bEvery principal ideal domain is a unique factorization domain. Let be an integral domain in which every ideal is principal. Then every nonzero nonunit of is a product of irreducible elements, and this factorization is unique up to order and multiplication by units.
This is the classical route to unique factorization in , in for a field , and in the Gaussian integers. The proof has two parts: principal ideal domains are Noetherian, so factorizations into irreducibles exist, and irreducible elements generate maximal ideals and are therefore prime, which gives uniqueness.
Formalization note. Mathlib's PrincipalIdealRing.to_uniqueFactorizationMonoid. UniqueFactorizationMonoid R says that every nonzero element has a factorization into irreducibles and that irreducible elements are prime. This is equivalent to the usual uniqueness condition.
import Mathlib
namespace FamousTheorems
theorem pid_is_ufd_7b {R : Type*} [CommRing R] [IsDomain R] [IsPrincipalIdealRing R] : UniqueFactorizationMonoid R := by sorry
end FamousTheorems