Skip to content
Table of Contents

Note that all rings considered here are commutative and have a multiplicative identity.

Each written proof or proof sketch is followed by a separate folded Lean 4 proof. The snippets are collected and compiled in mathlib-in-lean/commutative-algebra/Ring.lean. They assume that file's imports, namespace CommAlg, and variable {A : Type*} [CommRing A]; later snippets may use earlier declarations.

Rings and Ideals ​

Special Elements of Ring ​

  1. A set of units, A∗={a∈A∣∃b∈A,a⋅b=1}

  2. A set of zero divisors, D(A)={a∈A∣∃b∈A∖{0},a⋅b=0}

  3. A set of nilpotent elements, N(A)={a∈A∣∃n∈N,an=0}

  4. a is idempotent if a2=a


Facts on Special Elements of Ring ​

  1. If A≠0, then N(A)⊆D(A), i.e., every nilpotent element is a zero divisor.

    Proof

    It is suffice to show that ∀y∈N(A)→y∈D(A).

    By definition (3), choose the least n∈N such that yn=0. Since y0=1≠0, we have n≥1, so 0=yn=y⋅yn−1. By minimality of n, yn−1≠0. By definition (2), use b=yn−1, we have y⋅b=0 with b≠0, hence y∈D(A).

    Lean 4 proof
    lean
    /-- `a` is a zero divisor if `a * b = 0` for some nonzero `b`. -/
    def IsZeroDivisor (a : A) : Prop := ∃ b : A, b ≠ 0 ∧ a * b = 0
    
    /- Fact 1: in a nonzero ring, every nilpotent element is a zero divisor. -/
    theorem isZeroDivisor_of_isNilpotent [Nontrivial A] {y : A} (hy : IsNilpotent y) :
        IsZeroDivisor y := by
      classical
      -- choose the least `n` with `y ^ n = 0`
      set n := Nat.find hy with hn_def
      have hn : y ^ n = 0 := Nat.find_spec hy
      -- `n ≠ 0`, since `y ^ 0 = 1 ≠ 0`
      have hn0 : n ≠ 0 := by
        intro h
        rw [h, pow_zero] at hn
        exact one_ne_zero hn
      obtain ⟨m, hm⟩ := Nat.exists_eq_succ_of_ne_zero hn0
      -- take `b = y ^ (n - 1)`, which is nonzero by minimality of `n`
      refine ⟨y ^ m, fun h => ?_, ?_⟩
      · have : n ≤ m := Nat.find_min' hy h
        omega
      · calc y * y ^ m = y ^ (m + 1) := (pow_succ' y m).symm
          _ = y ^ n := by rw [hm]
          _ = 0 := hn

  2. If A≠0, then A∗∩D(A)=∅, i.e., no unit is a zero divisor.

    Proof

    By contradiction, assume A∗∩D(A)≠∅, let x∈A∗∩D(A).

    By definition (1), there exists y∈A such that x⋅y=1. By definition (2), there exists an non-zero z∈A such that x⋅z=0.

    So, we have :

    (x⋅y)⋅z=1⋅z=z≠0

    By the associativity and commutativity of A (as we mentioned earlier that A is commutative ring with identity), the left-hand side (x⋅y)⋅z=(y⋅x)⋅z=y⋅(x⋅z)=y⋅0=0.

    This is a contradiction since the right-hand side is z≠0. Hence no unit can be a zero divisor.

    Lean 4 proof
    lean
    /- Fact 2: no unit is a zero divisor. -/
    theorem not_isZeroDivisor_of_isUnit {x : A} (hx : IsUnit x) : ¬ IsZeroDivisor x := by
      rintro ⟨z, hz, hxz⟩
      obtain ⟨y, hy⟩ := hx.exists_right_inv
      -- `z = (x * y) * z = y * (x * z) = y * 0 = 0`, contradicting `z ≠ 0`
      apply hz
      calc z = (x * y) * z := by rw [hy, one_mul]
        _ = y * (x * z) := by ring
        _ = 0 := by rw [hxz, mul_zero]
    
    example {x z : A} (hx : IsUnit x) : x * z = 0 ↔ z = 0 := hx.mul_right_eq_zero

  3. Let A be a finite ring. Then, A=A∗∪D(A), i.e., every element of a finite ring is either a unit or a zero divisor.

    Proof

    Firstly, considering A={0}, then 0⋅0=0=1, so A∗={0} and D(A)=∅. Hence, A=A∗∪D(A) in this case.

    Secondly, if A≠{0}. By (b), we have A∗∩D(A)=∅. Since A∗⊆A and D(A)⊆A, we have A∗∪D(A)⊆A. So it is suffice to show that A⊆A∗∪D(A), which implies that

    ∀x∈A→x∈A∗∪D(A)

    Assume x∈A. Consider the function f:A→A defined by f(y)=x⋅y. Since A is finite, f is either injective or not.

    • If f is not injective, then there exist distinct y1,y2∈A such that x⋅y1=x⋅y2, which implies x⋅(y1−y2)=0. Let z=y1−y2≠0, then x⋅z=0, hence x∈D(A).

    • If f is injective, since A is finite, by the pigeonhole principle, f is also surjective, then there exists y∈A such that f(y)=x⋅y=1, hence x∈A∗.

    Therefore, every element x∈A is either a unit or a zero divisor, i.e., x∈A∗∪D(A).

    Lean 4 proof
    lean
    /- Fact 3: every element of a finite ring is a unit or a zero divisor. -/
    theorem isUnit_or_isZeroDivisor [Finite A] (x : A) : IsUnit x ∨ IsZeroDivisor x := by
      -- consider `f : A → A`, `f y = x * y`
      by_cases hinj : Function.Injective (fun y : A => x * y)
      · -- injective ⇒ surjective (pigeonhole), so `x * y = 1` for some `y`
        left
        obtain ⟨y, hy⟩ := Finite.injective_iff_surjective.mp hinj 1
        exact IsUnit.of_mul_eq_one y hy
      · -- not injective ⇒ `x * (y₁ - y₂) = 0` with `y₁ ≠ y₂`
        right
        simp only [Function.Injective, not_forall] at hinj
        obtain ⟨y₁, y₂, h, hne⟩ := hinj
        exact ⟨y₁ - y₂, sub_ne_zero.mpr hne, by rw [mul_sub, h, sub_self]⟩

Domain VS Field ​

  1. Commutative ring + (multiplicative) identity + D(A)=0 is an integeral domain (or domain)

  2. Commutative ring + (multiplicative) identity + A∗=A∖{0} is a field.

  3. A finite (integral) domain is a field.

    Proof

    By the proof of fact (3), D(A)=0 implies function f is injective for every non-zero x∈A.

    By pigeonhole principle, finite implies that every injective function from the domain to itself is also surjective, which ensures that every non-zero element has a multiplicative inverse, hence the domain is a field.

    Lean 4 proof
    lean
    /- Fact 3: a finite integral domain is a field. -/
    theorem isField_of_finite_domain [IsDomain A] [Finite A] : IsField A := by
      refine ⟨exists_pair_ne A, mul_comm, ?_⟩
      intro x hx
      -- no zero divisors ⇒ `y ↦ x * y` is injective, hence surjective
      have hinj : Function.Injective (fun y : A => x * y) :=
        fun y₁ y₂ h => mul_left_cancel₀ hx h
      exact Finite.injective_iff_surjective.mp hinj 1
    
    example [IsDomain A] [Finite A] : IsField A := Finite.isField_of_domain A

Ideal ​

Ideal is a subset of a ring such that

  1. It is an additive subgroup of the ring. i.e. for any a,b∈I, we have a−b∈I
  2. It is closed under multiplication by any element of the ring, i.e., for all a∈A and x∈I, we have a⋅x∈I.

Definitions of Some Ideals ​

  1. If an ideal I is proper, then 1∉I.

  2. If a proper ideal I is maximal if it is not strictly contained in any other proper ideal of the ring.

  3. Ideal generated by a strict subset S⊂A is

    ⟨S⟩={∑i=1nai⋅si∣n∈N,ai∈A,si∈S},

    the elements of S are generators of ideal I=⟨S⟩. Since cardinality |S|=n∈N is a finite number, the ideal I is finitely generated. Let S={s1,...,sn}, then I=⟨s1,...,sn⟩.

  4. If the cardinality of S is 1, i.e., S={s}, then the ideal I generated by S is principal, i.e., I=⟨s⟩.

  5. A ring A always contains two special ideals, one is the bottom ideal ⟨0⟩={0} (denoted as ⊥ lean), and the other is the top ideal ⟨1⟩=A (denoted as ⊤ lean).


Special Ring ​

  1. A ring A is called Principal Ideal Ring (PIR) if every ideal of A is principal, i.e., can be generated by a single element. Moreover, if A is also an integral domain, it is called a Principal Ideal Domain (PID).

Facts on Ideals ​

  1. 1∉I⟺A∗∩I=∅, i.e. No unit exists in a proper ideal of a ring.

    Proof

    (a) Regarding the forward direction, in a contrapositive way, we assume a∈A∗,a∈I.

    • Since a∈A∗, there exists b∈A such that a⋅b=1.

    • Since a∈I, we have ∀c∈A,a⋅c∈I.

    Putting these two hypotheses together. we obtain a⋅b=1∈I, which contradicts the assumption that I is proper.

    (b) Regarding the backward direction, assume A∗∩I=∅, which implies that:

    ∀a∈I→⌝(∃b∈A,a⋅b=1)⇕∀a∈I→∀b∈A,a⋅b≠1

    By definition of ideal, ∀b∈A,a⋅b∈I, therefore, 1∉I.

    Lean 4 proof
    lean
    /- Fact 1: an ideal is proper iff it contains no unit. -/
    theorem one_not_mem_iff (I : Ideal A) : (1 : A) ∉ I ↔ ∀ a ∈ I, ¬ IsUnit a := by
      constructor
      · -- if a unit `a` with `a * b = 1` lies in `I`, then `1 = a * b ∈ I`
        intro h1 a ha hu
        obtain ⟨b, hb⟩ := hu.exists_right_inv
        apply h1
        rw [← hb]
        exact I.mul_mem_right b ha
      · -- `1` is itself a unit
        intro h h1
        exact h 1 h1 isUnit_one
    
    example (I : Ideal A) {a : A} (ha : a ∈ I) (hu : IsUnit a) : I = ⊤ :=
      Ideal.eq_top_of_isUnit_mem I ha hu

  1. If A is a field, then it has only has two ideals: the zero ideal ⟨0⟩ and the field itself ⟨1⟩=A.

    Proof

    (a) Firstly, considering the special case of A={0}, then the only ideal is ⟨0⟩={0}.

    (b) Secondly, consider the case when A is a non-zero field. Let I be a non-zero ideal of A. By the definition of field A :

    ∀a≠0∈A,∃b∈A,a⋅b=1.

    Take any non-zero element a∈I⊆A, by definition of ideal, we have :

    ∀b∈A,a⋅b∈I

    Putting these two hypotheses together, we obtain a⋅b=1∈I. Since 1∈I, thus I=⟨1⟩=A.

    Completing the proof.

    Lean 4 proof
    lean
    /- Fact 2: a field has only the ideals `⟨0⟩` and `⟨1⟩`. -/
    theorem eq_bot_or_top_of_field {K : Type*} [Field K] (I : Ideal K) : I = ⊥ ∨ I = ⊤ := by
      by_cases h : I = ⊥
      · exact Or.inl h
      · -- take a nonzero `a ∈ I`; then `1 = a⁻¹ * a ∈ I`
        right
        obtain ⟨a, ha, ha0⟩ := Submodule.exists_mem_ne_zero_of_ne_bot h
        rw [Ideal.eq_top_iff_one, ← inv_mul_cancel₀ ha0]
        exact I.mul_mem_left a⁻¹ ha
    
    example {K : Type*} [Field K] (I : Ideal K) : I = ⊥ ∨ I = ⊤ := Ideal.eq_bot_or_top I

Ideal Operations ​

  1. Intersection. For any family of ideals {Ih}h∈H of A, their intersection ⋂h∈HIh is also an ideal of A.

  1. Sum. For any family of ideals {Ih}h∈H of A, the ideal generated by their union ⋃h∈HIh is also an ideal of A. It is denoted by ∑h∈HIh. That is exists a function :f:⋃h∈HIh→∑h∈HIh={∑i=1nai∣ai∈Ihi,hi∈H,n∈N}which is inclusion map. ∑h∈HIh is smallest ideal containing ⋃h∈HIh.

  1. Product. For any finite family of ideals {Ih}h∈H of A, their product ideal ∏h∈HIh is generated by

    {∏h∈Hxh∣xh∈Ih for all h∈H}.

    Observations

    Fact : Ik⊆Ik−1⊆⋯⊆I⊆I0=A for all k∈N.

    Two cases considered, (a) if 1∈I⟺I=A, then Ik=Ik−1=⋯=I0=A. (b) if 1∉I, then we must have Ik⊆Ik−1⊆⋯⊆I⊆I0=A. For example, for A=Z/(6), it is possible that (⟨2⟩)2=⟨2⟩.


  1. Quotient and Annihilator. For any two ideals I,J of A, we define the quotient of I by J as the set

    I:J={a∈A∣a⋅J⊆I}.

    In particular, when I=⟨0⟩, then the quotient I:J is called the annihilator of J and is denoted by Ann(J). When J is principal J=⟨a⟩, we simply denote it by Ann(a).

    Observations

    As J is an ideal, so ∀a∈A,aJ=J. So

    1. if J⊆I, then I:J=A.

    2. if I⊊J, then I:J⊊A.

    3. if I∩J=∅, then I:J=∅.


  1. Radical. For any ideal I of A, the radical of I is defined as the setI={a∈A∣∃n∈N,an∈I}.

Facts on Ideal Operations ​

  1. Intersection of a family of ideals is also an ideal.

    Proof

    Since ⋂h∈HIh⊆Ik for all k∈H, then :

    • for any a,b∈⋂h∈HIh, we have a+b∈Ih for all h∈H. That implies that a+b∈⋂h∈HIh.
    • for any a∈A and x∈⋂h∈HIh, we have x∈Ih for all h∈H. Since each Ih is an ideal, a⋅x∈Ih for all h∈H. That implies that a⋅x∈⋂h∈HIh.
    Lean 4 proof
    lean
    /- Fact 1: the intersection of a family of ideals is an ideal. -/
    def iInter {ι : Type*} (I : ι → Ideal A) : Ideal A where
      carrier := {x | ∀ h, x ∈ I h}
      zero_mem' := by
        intro h
        exact (I h).zero_mem
      add_mem' := by
        intro a b ha hb h
        exact (I h).add_mem (ha h) (hb h)
      smul_mem' := by
        intro a x hx h
        exact (I h).mul_mem_left a (hx h)
    
    example {ι : Type*} (I : ι → Ideal A) : iInter I = ⨅ h, I h := by
      ext x
      exact (Submodule.mem_iInf I).symm

  2. Quotient is also an ideal.

    Proof that quotient is also an ideal

    For addition closure, let a,b∈I:J, we need to show that a−b∈I:J. Since

    • a⋅J⊆I⟺∀x∈J,a⋅x∈I
    • b⋅J⊆I⟺∀x∈J,b⋅x∈I

    By addition closure property of ideal, we have ∀x∈J,(a−b)⋅x∈I, which implies that a−b∈I:J.

    For multiplicity closure, let a∈I:J and for any r∈A, we need to show that r⋅a∈I:J.

    • if r=0, it trivially holds that r⋅a=0∈I:J.

    • if r≠0. Since a⋅J⊆I⟺∀x∈J,a⋅x∈I, then ∀x∈J,(r⋅a)⋅x=r⋅(a⋅x)∈I always holds, which implies that r⋅a∈I:J.

    Lean 4 proof
    lean
    /- Fact 2: the quotient `I : J = {a | a * J ⊆ I}` is an ideal. -/
    def colon (I J : Ideal A) : Ideal A where
      carrier := {a | ∀ x ∈ J, a * x ∈ I}
      zero_mem' := by
        intro x _
        rw [zero_mul]
        exact I.zero_mem
      add_mem' := by
        intro a b ha hb x hx
        rw [add_mul]
        exact I.add_mem (ha x hx) (hb x hx)
      smul_mem' := by
        -- `(r * a) * x = r * (a * x) ∈ I`
        intro r a ha x hx
        rw [smul_eq_mul, mul_assoc]
        exact I.mul_mem_left r (ha x hx)
    
    example (I J : Ideal A) (a : A) : a ∈ colon I J ↔ a ∈ I.colon J := by
      rw [Submodule.mem_colon]
      rfl

  3. Radical is also an ideal.

    Proof that radical is also an ideal

    For the addition closure, let a,b∈I, we need to show that a−b∈I.

    • ∃m∈N,am∈I
    • ∃n∈N,bn∈I

    Consider (a−b)m+n. By the binomial theorem,

    (a−b)m+n=∑k=0m+n(m+nk)ak(−b)m+n−k.

    Each term in this sum is in I because either k≥m or m+n−k≥n, so ak∈I or bm+n−k∈I:

    (a−b)m+n=(−b)n⋅∑k=0m(mk)ak(−b)m−k+am⋅∑k=m+1m+n(m+nk)ak−m(−b)m+n−k

    Since I is an ideal and closed under addition, (a−b)m+n∈I, which implies that a−b∈I.

    For the multiplicity closure, let a∈I and r∈A, we need to show that r⋅a∈I.

    • ∃n∈N,an∈I Consider (r⋅a)n=rn⋅an. Since an∈I and I is an ideal, rn⋅an∈I, which implies that (r⋅a)n∈I. Therefore, r⋅a∈I.
    Lean 4 proof
    lean
    /- Fact 3: the radical `√I = {a | ∃ n, a ^ n ∈ I}` is an ideal. -/
    def radical (I : Ideal A) : Ideal A where
      carrier := {a | ∃ n : ℕ, a ^ n ∈ I}
      zero_mem' := by
        refine ⟨1, ?_⟩
        rw [pow_one]
        exact I.zero_mem
      add_mem' := by
        -- binomial theorem: each term of `(a + b) ^ (m + n)` has `a ^ k` with `k ≥ m`
        -- or `b ^ (m + n - k)` with `m + n - k ≥ n`
        rintro a b ⟨m, hm⟩ ⟨n, hn⟩
        refine ⟨m + n, ?_⟩
        rw [add_pow]
        refine I.sum_mem fun k _ => ?_
        by_cases h : m ≤ k
        · have e : a ^ k = a ^ m * a ^ (k - m) := by rw [← pow_add, Nat.add_sub_cancel' h]
          rw [e]
          exact I.mul_mem_right _ (I.mul_mem_right _ (I.mul_mem_right _ hm))
        · have hk : n ≤ m + n - k := by omega
          have e : b ^ (m + n - k) = b ^ n * b ^ (m + n - k - n) := by
            rw [← pow_add, Nat.add_sub_cancel' hk]
          rw [e]
          exact I.mul_mem_right _ (I.mul_mem_left _ (I.mul_mem_right _ hn))
      smul_mem' := by
        -- `(r * a) ^ n = r ^ n * a ^ n ∈ I`
        rintro r a ⟨n, hn⟩
        refine ⟨n, ?_⟩
        rw [smul_eq_mul, mul_pow]
        exact I.mul_mem_left _ hn
    
    example (I : Ideal A) (a : A) : a ∈ radical I ↔ a ∈ I.radical := Iff.rfl

  4. The set of nipotent elements N(A) is also an ideal.

    Proof

    In particular, the set of nilpotent elements is a special case of the radical: N(A)=⟨0⟩. Indeed, an∈⟨0⟩ if and only if an=0. Since the radical is an ideal, the nilpotent elements form an ideal too.

    Lean 4 proof
    lean
    /- Fact 4: the nilpotent elements form the ideal `√⟨0⟩`. -/
    theorem isNilpotent_iff_mem_radical_bot (a : A) : IsNilpotent a ↔ a ∈ radical ⊥ := by
      show (∃ n : ℕ, a ^ n = 0) ↔ ∃ n : ℕ, a ^ n ∈ (⊥ : Ideal A)
      simp only [Ideal.mem_bot]
    
    example (a : A) : a ∈ nilradical A ↔ IsNilpotent a := mem_nilradical
  5. The set of zero-divisors D(A) is not an ideal in general.

    Proof

    Not an ideal means either addition or multiplicity closure fails, we choose the former one. That is

    ∃a,b∈D(A) such that a+b∉D(A).

    Take A=Z/(6), a=2 and b=3. Since 2⋅3=0 with 3≠0 and 2≠0, both a and b are zero-divisors.

    However, a+b=5 and 5⋅5=25=1, so a+b is a unit. By fact (2) on special elements, no unit is a zero divisor, so a+b∉D(A).

    Lean 4 proof
    lean
    /- Fact 5: the zero divisors need not form an ideal.
    In `ℤ/6ℤ`, `2` and `3` are zero divisors (`2 * 3 = 0`), but `2 + 3 = 5` is a unit. -/
    theorem zeroDivisors_not_ideal :
        ¬ ∃ I : Ideal (ZMod 6), ∀ a, a ∈ I ↔ IsZeroDivisor a := by
      rintro ⟨I, hI⟩
      have h2 : (2 : ZMod 6) ∈ I := (hI 2).mpr ⟨3, by decide, by decide⟩
      have h3 : (3 : ZMod 6) ∈ I := (hI 3).mpr ⟨2, by decide, by decide⟩
      have h5 : IsUnit (2 + 3 : ZMod 6) := IsUnit.of_mul_eq_one 5 (by decide)
      exact not_isZeroDivisor_of_isUnit h5 ((hI _).mp (I.add_mem h2 h3))

  6. If I,J are two ideals of a ring A, then IJ⊆I∩J.

    Proof

    Firstly we decompose the argument :

    IJ⊆I∩J⟺∀x∈IJ,x∈I∩J⟺∀a∈I,∀b∈J,a⋅b∈I∩J

    Since a∈I, so we have a⋅b∈I. Similarly, since b∈J, we have a⋅b∈J. Therefore, a⋅b∈I∩J. Completing the proof.

    Lean 4 proof
    lean
    /- Fact 6: `I J ⊆ I ∩ J`. -/
    theorem mul_le_inf' (I J : Ideal A) : I * J ≤ I ⊓ J := by
      -- it suffices to check the generators `a * b` with `a ∈ I`, `b ∈ J`
      rw [Ideal.mul_le]
      intro a ha b hb
      exact Submodule.mem_inf.mpr ⟨I.mul_mem_right b ha, J.mul_mem_left a hb⟩
    
    example (I J : Ideal A) : I * J ≤ I ⊓ J := Ideal.mul_le_inf

  7. If I,J are two ideals of a ring A, and I+J=⟨1⟩, then I∩J=IJ. I and J are comaximal.

    Proof

    By (6), we only need to show the converse inclusion: I∩J⊆IJ when I+J=⟨1⟩.

    By I+J=⟨1⟩⟺A⊆I+J⟺∀x∈A,∃y∈I,∃z∈J,x=y+z, thus for any x∈I∩J, we can write x=y+z with existence of y∈I and z∈J.

    So for any x∈I∩J, we can write it as x=x⋅1=x⋅(y+z)∈I∩J with the existence of y∈I and z∈J. After some expanding, and x∈J and x∈I, we have :

    x=x⋅(y+z)=x⋅y+x⋅z∈IJ

    which proves ∀x∈I∩J,x∈IJ. Therefore, I∩J⊆IJ. Completing the proof.

    Lean 4 proof
    lean
    /- Fact 7: if `I + J = ⟨1⟩`, then `I ∩ J = I J`. -/
    theorem inf_eq_mul_of_sup_eq_top (I J : Ideal A) (h : I ⊔ J = ⊤) : I ⊓ J = I * J := by
      refine le_antisymm ?_ (mul_le_inf' I J)
      intro x hx
      obtain ⟨hxI, hxJ⟩ := Submodule.mem_inf.mp hx
      -- write `1 = y + z` with `y ∈ I`, `z ∈ J`
      have h1 : (1 : A) ∈ I ⊔ J := by
        rw [h]
        exact Submodule.mem_top
      obtain ⟨y, hy, z, hz, hyz⟩ := Submodule.mem_sup.mp h1
      -- `x = x * (y + z) = y * x + x * z ∈ I J`
      have e : x = y * x + x * z := by
        calc x = x * (y + z) := by rw [hyz, mul_one]
          _ = y * x + x * z := by ring
      rw [e]
      exact Ideal.add_mem _ (Ideal.mul_mem_mul hy hxJ) (Ideal.mul_mem_mul hxI hz)
    
    example (I J : Ideal A) (h : I ⊔ J = ⊤) : I * J = I ⊓ J := Ideal.mul_eq_inf_of_coprime h

  8. Let I1,...,In are pairwise comaximal ideals of a ring A. Then

    I1∩...∩In=I1⋅...⋅In.

    This is a general form of the result in (7) for two comaximal ideals. We omit the proof here.


  1. Let I,J,H be ideals of a ring A. Then(a) (I+J)H=IH+JH(b) (I+J)(I∩J)⊆IJ(c) (I∩J)+(I∩H)⊆I∩(J+H)(d) J⊂I or I⊂H→I∩(J+H)=(I∩J)+(I∩H)(e) I+JH⊆(I+J)∩(I+H)

Properties of the Radical ​

Let A be a ring, and let I,J,H be ideals of A. Then :

  1. if I⊆J, then I⊆J.

    Proof

    In order to show I⊆J, it is suffices to show :

    ∀x∈I⟹x∈J⟺∀x∈I,∃n∈N,xn∈I⟹∃m∈N,xm∈J

    Since xn∈I⊆J, use m=n, we have xm∈J. Completing the proof.

    Lean 4 proof
    lean
    theorem radical_mono' (I J : Ideal A) (h : I ≤ J) : I.radical ≤ J.radical := by
      rintro x ⟨n, hn⟩
      exact ⟨n, h hn⟩

  2. I⊆I and I=I

    Proof

    For any x∈I, we have x1=x∈I, hence x∈I. This shows I⊆I.

    In order to show I=I, since I⊆I follows from the fact that I⊆I, it suffices to show the forward inclusion is true, i.e., I⊆I. That is,

    I⊆I⟺∀x∈I⟹x∈I⟺∀x∈I,∃n∈N,xn∈I⟹∃m∈N,xm∈I

    Since xn∈I for some n∈N, by definition of I, there exists p∈N such that (xn)p=xnp∈I. So use m=np, we have xm∈I. Completing the proof.

    Lean 4 proof
    lean
    theorem le_radical_and_idem (I : Ideal A) :
        I ≤ I.radical ∧ I.radical.radical = I.radical := by
      have hle : I ≤ I.radical := fun x hx => ⟨1, by simpa using hx⟩
      refine ⟨hle, le_antisymm ?_ Ideal.le_radical⟩
      rintro x ⟨n, m, h⟩
      exact ⟨n * m, by simpa only [pow_mul] using h⟩

  3. IJ=I∩J=I∩J

    Proof

    (a) First, we show IJ=I∩J. Since IJ⊆I∩J, by property (1) above, we have IJ⊆I∩J. So it suffices to show the backward direction inclusion I∩J⊆IJ. That is,

    I∩J⊆IJ⟺∀x∈I∩J⟹x∈IJ⟺∀x∈I∩J,∃n∈N,xn∈I∩J⟹∃m∈N,xm∈IJ

    xn∈I∩J for some n∈N implies xn∈I and xn∈J, hence by definition we have x2n=(xn)2∈IJ. So use m=2n, we have xm∈IJ. Completing the proof of (a).


    (b) Next, in order to show the equality I∩J=I∩J, we first show the forward inclusion direction I∩J⊆I∩J. That is,

    I∩J⊆I∩J⟺∀x∈I∩J⟹x∈I∩J⟺∀x∈I∩J,∃n∈N,xn∈I∩J⟹∃m1,m2∈N,xm1∈I and xm2∈J

    xn∈I∩J for some n∈N implies xn∈I and xn∈J, hence use m1=n,m2=n, we have xm1∈I and xm2∈J. Completing the proof of the forward inclusion.


    Then we show the backward inclusion direction I∩J⊆I∩J. That is,

    I∩J⊆I∩J⟺∀x∈I∩J⟹x∈I∩J⟺∀x∈I∩J,∃m1,m2∈N,xm1∈I and xm2∈J⟹∃n∈N,xn∈I∩J

    Since xm1∈I,xm2∈J, by definition, we have xm1⋅xm2=xm1+m2∈IJ. Hence, using n=m1+m2, we have xn∈IJ. Again by IJ⊆I∩J, we have xn∈I∩J. Completing the proof of the backward inclusion.

    Lean 4 proof
    lean
    theorem radical_mul_inf (I J : Ideal A) :
        (I * J).radical = (I ⊓ J).radical ∧
          (I ⊓ J).radical = I.radical ⊓ J.radical := by
      have hi : (I ⊓ J).radical = I.radical ⊓ J.radical := by
        apply le_antisymm
        · exact le_inf (radical_mono' _ _ inf_le_left) (radical_mono' _ _ inf_le_right)
        · rintro x ⟨⟨m, hm⟩, ⟨n, hn⟩⟩
          refine ⟨m + n, ?_⟩
          rw [pow_add]
          exact ⟨I.mul_mem_right _ hm, J.mul_mem_left _ hn⟩
      refine ⟨le_antisymm (radical_mono' _ _ Ideal.mul_le_inf) ?_, hi⟩
      rintro x ⟨n, hn⟩
      refine ⟨n + n, ?_⟩
      rw [pow_add]
      exact Ideal.mul_mem_mul hn.1 hn.2

  1. In=I for any integer n≥1.

    Proof

    Induct on n≥1. The case n=1 is immediate. For the induction step, property (3) gives In+1=InI=In∩I=I. The restriction is necessary: I0=A, whose radical is A.

    Lean 4 proof
    lean
    theorem radical_pow_positive (I : Ideal A) (n : ℕ) (hn : n ≠ 0) :
        (I ^ n).radical = I.radical := by
      obtain ⟨k, rfl⟩ := Nat.exists_eq_succ_of_ne_zero hn
      induction k with
      | zero => simp
      | succ k ih =>
        rw [pow_succ, (radical_mul_inf _ _).1, (radical_mul_inf _ _).2,
          ih (Nat.succ_ne_zero k), inf_idem]

  2. I=⟨1⟩ if and only if I=⟨1⟩.

  3. I+J=I+J

    Proof

    In order to show the equality I+J=I+J, we first show the forward inclusion directions. That is,

    I+J⊆I+J⟺∀x∈I+J⟹x∈I+J⟺∀x∈I+J,∃n∈N,xn∈I+J⟹∃m∈N,xm∈I+J

    As xn∈I+J implies ∃x1∈I,x2∈J such that xn=x1+x2. We use m=n, then by the property (2) above, we have x1∈I,x2∈J, thus xm=x1+x2∈I+J. Completing the proof of the forward inclusion.


    Next, we show the backward inclusion direction I+J⊆I+J. That is,

    I+J⊆I+J⟺∀x∈I+J⟹x∈I+J⟺∀x∈I+J,∃m∈N,xm∈I+J⟹∃n∈N,xn∈I+J

    Since xm∈I+J, write xm=x1+x2 with x1k1∈I and x2k2∈J. In the binomial expansion of (x1+x2)k1+k2, every term has either at least k1 factors of x1 or at least k2 factors of x2, so every term belongs to I+J. Thus xm(k1+k2)∈I+J, completing the backward inclusion.

    Lean 4 proof
    lean
    theorem radical_sup' (I J : Ideal A) :
        (I ⊔ J).radical = (I.radical ⊔ J.radical).radical := by
      apply le_antisymm
      · exact radical_mono' _ _ (sup_le_sup Ideal.le_radical Ideal.le_radical)
      · have h : I.radical ⊔ J.radical ≤ (I ⊔ J).radical :=
          sup_le (radical_mono' _ _ le_sup_left) (radical_mono' _ _ le_sup_right)
        exact (radical_mono' _ _ h).trans_eq (le_radical_and_idem _).2

  4. I+JH=I+J∩I+H

    Proof

    In order to prove the equality I+JH=I+J∩I+H, we need to show both inclusions.

    Forward inclusion: I+JH⊆I+J∩I+H, that is,

    I+JH⊆I+J∩I+H⟺∀x∈I+JH⟹x∈I+J∩I+H⟺∀x∈I+JH,∃n∈N,xn∈I+JH⟹∃m1,m2∈N,xm1∈I+J and xm2∈I+H

    As xn∈I+JH implies ∃x1∈I,x2∈JH such that xn=x1+x2. We use m1=m2=n, as H⊆A thus we have JH⊆J, then xm1=x1+x2∈I+JH⊆I+J, similarly we have xm2=x1+x2∈I+JH⊆I+H. Completing the proof of the forward inclusion.


    Backward inclusion: I+J∩I+H⊆I+JH, that is,

    I+J∩I+H⊆I+JH⟺∀x∈I+J∩I+H⟹x∈I+JH⟺∀x∈I+J∩I+H,∃m1,m2∈N,xm1∈I+J and xm2∈I+H⟹∃n∈N,xn∈I+JH

    Since xm1∈I+J and xm2∈I+H, thus we have xm1⋅xm2=xm1+m2∈(I+J)(I+H)⊆I+JH. Let n=m1+m2, then xn∈I+JH. Completing the proof of the backward inclusion.

    Lean 4 proof
    lean
    theorem radical_sup_mul (I J H : Ideal A) :
        (I ⊔ J * H).radical = (I ⊔ J).radical ⊓ (I ⊔ H).radical := by
      apply le_antisymm
      · exact le_inf
          (radical_mono' _ _ (sup_le_sup_left ((mul_le_inf' J H).trans inf_le_left) I))
          (radical_mono' _ _ (sup_le_sup_left ((mul_le_inf' J H).trans inf_le_right) I))
      · rintro x ⟨⟨m, hm⟩, ⟨n, hn⟩⟩
        refine ⟨m + n, ?_⟩
        rw [pow_add]
        obtain ⟨a, ha, b, hb, hab⟩ := Submodule.mem_sup.mp hm
        obtain ⟨c, hc, d, hd, hcd⟩ := Submodule.mem_sup.mp hn
        rw [← hab, ← hcd]
        have hi : a * c + a * d + b * c ∈ I :=
          I.add_mem (I.add_mem (I.mul_mem_right _ ha) (I.mul_mem_right _ ha))
            (I.mul_mem_left _ hc)
        have hj : b * d ∈ J * H := Ideal.mul_mem_mul hb hd
        have he : (a + b) * (c + d) = (a * c + a * d + b * c) + b * d := by ring
        rw [he]
        exact (I ⊔ J * H).add_mem
          ((show I ≤ I ⊔ J * H from le_sup_left) hi)
          ((show J * H ≤ I ⊔ J * H from le_sup_right) hj)

Maximal Ideal ​

As we know, maximal ideal is derived from the concept of proper ideal. A few important facts upon maximal ideal are derived from Zorn's Lemma.

Zorn's Lemma ​

Poset Definition : A poset (Σ,≤) is a set Σ equipped with a partial order ≤ which is reflexive, antisymmetric, and transitive. Every chain in a poset is a totally ordered subset of Σ.


Zorn's Lemma : Let (Σ,≤) be a partially ordered set in which every chain has an upper bound in Σ. Then Σ contains maximal elements with respect to the partial order ≤.

Facts on Maximal Ideal ​

Let A be a non-zero ring. Then

  1. A has at least one maximal ideal m.

  2. For any proper ideal I of A, there exists a maximal ideal m such that I⊆m.

  3. Every non-invertible element of A is contained in some maximal ideal of A.

Proof

Regarding (1), we can treat A as a poset whose elements are the proper ideals of A, ordered by inclusion ⊆.

Σ={I⊊A∣I is a ideal of A}

For example, ⟨a⟩⊆⟨a,b⟩⊆⟨a,b,c⟩⊆⋯.

By Zorn's Lemma, in order to show A contains maximal ideals with respect to order relation ⊆, it suffices to show that for any chain of proper ideals C={Ih:h∈H} in A, there exists an upper bound in A.

For any chain of proper ideals C={Ih:h∈H} in A, the upper bound of this chain is the minimal set containing all the proper ideals, it can defined by

I=⋃h∈HIh.

Then we need to show that :

  1. I is an ideal of A.
    • Addition closure, i.e. for any x,y∈I, we have x+y∈I.
    • Multiplication closure, i.e. for any a∈A and x∈I, we have a⋅x∈I.
  2. I is a proper ideal of A, i.e. I⊊A.
    • 1∉I proof details are ignored here.

Regarding (2), it is trivially holds for any chain of proper ideals in A.


Regarding (3), if a∈A is not invertible, implying that

⌝(∃b∈A,a⋅b=1)⟺∀b∈A,a⋅b≠1

Then the principal ideal ⟨a⟩ do not contains 1, which means ⟨a⟩ is a proper ideal of A. By (2), there exists a maximal ideal m such that ⟨a⟩⊆m.

Lean 4 proof
lean
/- Fact 2: every proper ideal is contained in a maximal ideal (Zorn's lemma). -/
theorem exists_le_maximal' (I : Ideal A) (hI : I ≠ ⊤) :
    ∃ M : Ideal A, M.IsMaximal ∧ I ≤ M := by
  -- every nonempty chain of proper ideals has a proper upper bound: its union
  have ih : ∀ c ⊆ {J : Ideal A | J ≠ ⊤}, IsChain (· ≤ ·) c →
      ∀ J ∈ c, ∃ ub ∈ {J : Ideal A | J ≠ ⊤}, ∀ K ∈ c, K ≤ ub := by
    intro c hcs hchain J hJ
    refine ⟨sSup c, ?_, fun K hK => le_sSup hK⟩
    -- `1 ∉ ⋃ c`, since `1` would lie in some proper ideal of the chain
    show sSup c ≠ ⊤
    rw [Ne, Ideal.eq_top_iff_one]
    intro h1
    obtain ⟨K, hKc, h1K⟩ := (Submodule.mem_sSup_of_directed ⟨J, hJ⟩ hchain.directedOn).mp h1
    exact hcs hKc ((Ideal.eq_top_iff_one K).mpr h1K)
  obtain ⟨M, hIM, hM⟩ := zorn_le_nonempty₀ {J : Ideal A | J ≠ ⊤} ih I hI
  -- a maximal element of the proper ideals is a maximal ideal
  refine ⟨M, ⟨⟨hM.prop, fun J hMJ => ?_⟩⟩, hIM⟩
  by_contra hJ
  exact hMJ.ne' (le_antisymm (hM.2 hJ hMJ.le) hMJ.le)

example (I : Ideal A) (hI : I ≠ ⊤) : ∃ M : Ideal A, M.IsMaximal ∧ I ≤ M :=
  Ideal.exists_le_maximal I hI

/- Fact 1: a nonzero ring has at least one maximal ideal. -/
theorem exists_maximal' [Nontrivial A] : ∃ M : Ideal A, M.IsMaximal := by
  obtain ⟨M, hM, -⟩ := exists_le_maximal' (⊥ : Ideal A) bot_ne_top
  exact ⟨M, hM⟩

example [Nontrivial A] : ∃ M : Ideal A, M.IsMaximal := Ideal.exists_maximal A

/- Fact 3: every non-invertible element lies in some maximal ideal. -/
theorem exists_maximal_of_not_isUnit {a : A} (ha : ¬ IsUnit a) :
    ∃ M : Ideal A, M.IsMaximal ∧ a ∈ M := by
  -- `⟨a⟩` is proper, so apply Fact 2
  have hprop : Ideal.span {a} ≠ ⊤ := fun h => ha (Ideal.span_singleton_eq_top.mp h)
  obtain ⟨M, hM, haM⟩ := exists_le_maximal' _ hprop
  exact ⟨M, hM, haM (Ideal.mem_span_singleton_self a)⟩

example {a : A} (ha : a ∈ nonunits A) : ∃ M : Ideal A, M.IsMaximal ∧ a ∈ M :=
  exists_max_ideal_of_mem_nonunits ha

Other Special Ideals ​

Let A be a ring, and let I,I1,I2⊂A be proper ideals. Then, I is :

  1. prime, if ab∈I implies a∈I or b∈I for all a,b∈A;

    Prime ideal means any element of the ideal can be decomposed into a product of elements, at least one of which lies in the ideal. We give out an couter-example, suppose A=Z and I=⟨6⟩, then :

    6=2⋅3

    where 2,3∉I

  2. radical, if I=I;

    Note the difference between radical of an ideal and radical ideal, by the property (2) of radical, I⊆I, we see that radical ideal is a special case where the ideal coincides with its radical.

  3. primary, if ab∈I implies a∈I or b∈I;

    Note the difference between primary ideal and prime ideal, a prime ideal is always primary, but a primary ideal need not be prime. This is reflected by the fact that I⊆I, and the inclusion can be strict.

  4. irreducible, if I=I1∩I2 implies I=I1 or I=I2.

    Irreducible ideal only exists when I1⊆I2 or I2⊆I1.


Facts on Special Ideals ​

Let I be a proper ideal of A. Then we have the following facts:

  1. If I is primary, then I is prime.

    Proof

    Since I is proper, I is proper: 1∈I would imply 1n=1∈I. If ab∈I, choose n with anbn=(ab)n∈I. Primaryness gives either an∈I, hence a∈I, or bn∈I. In the latter case choose m with bnm∈I, so b∈I. This proves that I is prime.

    Lean 4 proof
    lean
    theorem primary_radical_prime (I : Ideal A) (hI : I.IsPrimary) : I.radical.IsPrime := by
      refine ⟨?_, ?_⟩
      · exact fun h => (Ideal.isPrimary_iff.mp hI).1 (Ideal.radical_eq_top.mp h)
      · intro a b hab
        obtain ⟨n, hn⟩ := hab
        rw [mul_pow] at hn
        rcases (Ideal.isPrimary_iff.mp hI).2 hn with ha | hb
        · exact Or.inl ⟨n, ha⟩
        · exact Or.inr (Ideal.mem_radical_of_pow_mem hb)

  2. If I is a maximal ideal, then A/I is a field.

    Proof

    By the definition of field, it is suffices to show :

    ∀x+I∈A/I,x∉I⟹∃m+I∈A/I,(x+I)(m+I)=1

    If x∉I, I is maximal, then we must have :

    I⊆⟨x⟩+I=A

    because ⟨x⟩+I strictly contains I, and maximality forces it to equal A.


    So any element a∈A can be represented as a=mx+i for i∈I, we take a=1. Then modulo I on both sides, we get

    1+I=mx+I=(m+I)(x+I)

    Completing the proof.

    Lean 4 proof
    lean
    theorem maximal_quotient_field (I : Ideal A) (hI : I.IsMaximal) : IsField (A ⧸ I) := by
      letI := hI
      letI := Ideal.Quotient.field I
      exact Field.toIsField _

  3. If I=m is a maximal ideal, then I is primary.

    Proof

    By the definition of primary ideal, it is suffices to show that for any ab∈I when a∉I, we must have b∈I. By contradiction, we assume b∉I.


    Since I is maximal, by fact (2) above, we know that the quotient ring A/I is a field, which implies every nonzero element in A/I is invertible. More specially,

    b+I∈A/I,b∉I,∃c+I∈A/I,(b+I)(c+I)=1

    Thus we have :

    (b+I)(c+I)=bc+I=1+I⟹bc−1∈I⟺∃n∈N,(bc−1)n∈I⟹∃n∈N,a(bc−1)n∈I

    After expanding :

    a(bc−1)n=(−1)na+∑k=1n(nk)a(bc)k(−1)n−k∈I

    We have assumed that ab∈I, thus ∑k=1n(nk)a(bc)k(−1)n−k∈I as well, which implies (−1)na∈I, and hence a∈I. Contradiction happens, which completes the proof.

    Lean 4 proof
    lean
    theorem primary_of_maximal_radical (I : Ideal A) (h : I.radical.IsMaximal) :
        I.IsPrimary := by
      -- Mathlib packages the maximal-ideal argument, avoiding a binomial expansion.
      exact Ideal.isPrimary_of_isMaximal_radical h

Krull Dimension ​

Let A be a ring. The Krull Dimension of A, denoted by dim⁡(A), is defined as the supremum of the lengths n of all chains of prime ideals:

p0⊊p1⊊⋯⊊pn

in A.


For example,

  • if A is a field, there are only two ideals ⟨0⟩ and A, but only ⟨0⟩ is prime, ⟨0⟩ forms the longest chain of prime ideals,

    ⟨0⟩

    so the Krull dimension is 0.

  • if A=Z, there are two prime ideals ⟨0⟩ and ⟨p⟩ for any prime number p, and a strict inclusion exists between them

    ⟨0⟩⊊⟨p⟩

    so the Krull dimension is 1 for the longest chain of prime ideals.

  • if A=k[X], similar with A=Z, there are two prime ideals ⟨0⟩ and ⟨f⟩ for any irreducible polynomial f∈k[X], and a strict inclusion exists between them

    ⟨0⟩⊊⟨f⟩

    so the Krull dimension is 1 for the longest chain of prime ideals.


Homomorphisms and Quotient Rings ​

Definition of Quotient Ring ​

Let A be a (commutative with identity) ring,

  1. Every ideal I of A is a normal subgroup of A, thus A/I forms a quotient group. The reasons behind this are as follows:

    • A itself is a commutative additive group.
    • Additive closure of ideal ensures I is a subgroup of A.
    • Commutative property ensure this subgroup is normal.
    • That I is normal ensure that A/I is a quotient group.
  2. The element of A/I is denoted as x―=x+I where x∈A is a representative of the coset x―.

  3. The addition and multiplication in the quotient ring A/I are defined as follows:

    x―+y―=x+y―,x―⋅y―=xy―,∀x,y∈A.

We need to show that the addition and multiplication in the quotient ring A/I are well-defined, i.e., if x―=x′― and y―=y′―, then

x―+y―=x′―+y′―,x―⋅y―=x′―⋅y′―.
Proof

For addition, by definition, we have :

  • x―+y―=x+y―
  • x′―+y′―=x′+y′―

So, we need to show that x+y―=x′+y′―. This is equivalent to showing that (x+y)−(x′+y′)∈I. Since x―=x′― and y―=y′―, we have x−x′∈I and y−y′∈I. Therefore,

(x+y)−(x′+y′)=(x−x′)+(y−y′)∈I,

which proves that addition is well-defined.

For multiplication, xy−x′y′=(x−x′)y+x′(y−y′)∈I by absorption and additive closure of the ideal. Thus multiplication is well-defined too.

Lean 4 proof
lean
theorem quotient_operations_well_defined (I : Ideal A) (x x' y y' : A)
    (hx : Ideal.Quotient.mk I x = Ideal.Quotient.mk I x')
    (hy : Ideal.Quotient.mk I y = Ideal.Quotient.mk I y') :
    Ideal.Quotient.mk I (x + y) = Ideal.Quotient.mk I (x' + y') ∧
      Ideal.Quotient.mk I (x * y) = Ideal.Quotient.mk I (x' * y') := by
  have hxi := Ideal.Quotient.eq.mp hx
  have hyi := Ideal.Quotient.eq.mp hy
  constructor
  · apply Ideal.Quotient.eq.mpr
    have he : (x + y) - (x' + y') = (x - x') + (y - y') := by ring
    rw [he]
    exact I.add_mem hxi hyi
  · apply Ideal.Quotient.eq.mpr
    have he : x * y - x' * y' = (x - x') * y + x' * (y - y') := by ring
    rw [he]
    exact I.add_mem (I.mul_mem_right _ hxi) (I.mul_mem_left _ hyi)

Ring Homomorphism ​

Let A and B be two rings. A function ϕ:A→B is called a ring homomorphism if for all a,b∈A, the following conditions hold:

  1. ϕ(a+b)=ϕ(a)+ϕ(b)
  2. ϕ(a⋅b)=ϕ(a)⋅ϕ(b)
  3. ϕ(1A)=1B (if A and B have multiplicative identities)

which implies :

  1. ker⁡(ϕ) is an ideal of A.
  2. ϕ is injective iff ker⁡(ϕ)={0}.
  3. range(ϕ) is a subring of B.

If ϕ is bijective (i.e., both injective and surjective), then ϕ is called a ring isomorphism, and A and B are said to be isomorphic rings.


Ring Homomorphism Theorems ​

If I⊆ker⁡(ϕ), then ϕ induces a well-defined ring homomorphism ϕ―:A/I→B such that ϕ=ϕ―∘π, where π:A→A/I is the canonical projection which sends a∈A to a―=a+I∈A/I. The following diagram commutes:

A→ϕB↓π‖A/I→ϕ―B
Explanation

Why the commutative diagram holds? Because by definition, the equivalence of two functions ϕ=ϕ―∘π implies :

∀a∈A,ϕ(a)=ϕ―(π(a))=ϕ―(a―)

This defines ϕ―(a―)=ϕ(a), and we need to check that it is well-defined. If a―=a′―, then a−a′∈I⊆ker⁡(ϕ), so ϕ(a)−ϕ(a′)=ϕ(a−a′)=0. Hence the definition is independent of the representative. Preservation of addition, multiplication, and one follows from the corresponding properties of ϕ.

Lean 4 proof
lean
def inducedHom {B : Type*} [CommRing B] (I : Ideal A) (f : A →+* B)
    (h : I ≤ RingHom.ker f) : A ⧸ I →+* B :=
  Ideal.Quotient.lift I f (fun _ ha => h ha)

theorem inducedHom_factorization {B : Type*} [CommRing B] (I : Ideal A)
    (f : A →+* B) (h : I ≤ RingHom.ker f) :
    (inducedHom I f h).comp (Ideal.Quotient.mk I) = f := by
  ext a
  exact Ideal.Quotient.lift_mk I f (fun _ ha => h ha)

Three theorems are particularly important in the study of ring homomorphisms:

  1. First Isomorphism Theorem: If ϕ:A→B is a ring homomorphism, then A/ker⁡(ϕ)≅range(ϕ).

  2. Second Isomorphism Theorem: If A is a ring, I and J are ideals of A with I⊆J, then (A/I)/(J/I)≅A/J.

  3. Third Isomorphism Theorem: If I⊂A be an ideal, and let B⊂A be a subring. Then :

    (a) B+I⊂A is a subring containing I. (b) I is an ideal of B+I. (c) B∩I is an ideal of B. Moreover,

    (B+I)/I≅B/(B∩I)
Proof

For the first isomorphism theorem, let ϕ―:A/ker⁡(ϕ)→range(ϕ) be defined by ϕ―(a+ker⁡(ϕ))=ϕ(a). In order to show the isomorphism, we need to prove :

  • (a) ϕ― is well-defined.
  • (b) ϕ― is a ring homomorphism.
  • (c) ϕ― is injective.
  • (d) ϕ― is surjective.

The factorization argument verifies (a) and (b). For (c), equality of the images of a+ker⁡(ϕ) and a′+ker⁡(ϕ) means ϕ(a−a′)=0, hence the cosets are equal. For (d), every element of the range has the form ϕ(a) and is the image of a+ker⁡(ϕ).


For the second isomorphism theorem, let ϕ:A/I→A/J be a projection map defined by ϕ(a+I)=a+J. By the first isomorphism theorem, we need to show :

  1. ϕ is well-defined since I⊆J, and it is surjective because b+J=ϕ(b+I) for every b∈A.
  2. ϕ(a+I)=0 if and only if a∈J, so ker⁡(ϕ)=J/I.

Therefore, by the first isomorphism theorem, we have (A/I)/(J/I)≅A/J, as required.


For the third isomorphism theorem, consider a composition map :

ϕ:B→B+I→(B+I)/I

Here B+I={b+i∣b∈B, i∈I} is a subring: addition and negation preserve this form, 1=1+0, and (b+i)(b′+i′)=bb′+(bi′+ib′+ii′) with the parenthesized term in I. Restricting I to B+I gives an ideal, and restricting it to B gives B∩I.

The map is composed of the inclusion and the natural projection. It is surjective because each (b+i)+I equals b+I, and its kernel is precisely B∩I. By the first isomorphism theorem, we have :

B/(B∩I)≅(B+I)/I
Lean 4 proof

The numbering follows these notes; Mathlib calls the double-quotient result the third isomorphism theorem. Ideal.map represents J/I, and Ideal.comap restricts I to a subring. Below, subringAddIdeal defines B+I as the preimage of the image of B in A/I; mem_subringAddIdeal verifies its usual description.

lean
noncomputable def firstIsomorphism {B : Type*} [CommRing B] (f : A →+* B) :
    A ⧸ RingHom.ker f ≃+* f.range :=
  RingHom.quotientKerEquivRange f

def secondIsomorphism (I J : Ideal A) (h : I ≤ J) :
    (A ⧸ I) ⧸ J.map (Ideal.Quotient.mk I) ≃+* A ⧸ J :=
  DoubleQuot.quotQuotEquivQuotOfLE h

noncomputable def subringQuotientImage (I : Ideal A) (B : Subring A) :
    B ⧸ I.comap B.subtype ≃+* ((Ideal.Quotient.mk I).comp B.subtype).range := by
  let f := (Ideal.Quotient.mk I).comp B.subtype
  have hk : RingHom.ker f = I.comap B.subtype := by
    ext b
    exact Ideal.Quotient.eq_zero_iff_mem
  exact (Ideal.quotEquivOfEq hk.symm).trans (RingHom.quotientKerEquivRange f)

-- The preimage of the image of B under A → A/I is precisely B + I.
def subringAddIdeal (I : Ideal A) (B : Subring A) : Subring A :=
  ((Ideal.Quotient.mk I).comp B.subtype).range.comap (Ideal.Quotient.mk I)

theorem mem_subringAddIdeal (I : Ideal A) (B : Subring A) (a : A) :
    a ∈ subringAddIdeal I B ↔ ∃ b ∈ B, ∃ i ∈ I, a = b + i := by
  change (∃ b : B, Ideal.Quotient.mk I (b : A) = Ideal.Quotient.mk I a) ↔ _
  constructor
  · rintro ⟨b, hb⟩
    refine ⟨b, b.property, a - b, Ideal.Quotient.eq.mp hb.symm, ?_⟩
    ring
  · rintro ⟨b, hb, i, hi, rfl⟩
    refine ⟨⟨b, hb⟩, ?_⟩
    rw [map_add, Ideal.Quotient.eq_zero_iff_mem.mpr hi, add_zero]

def subringAddIdealProjection (I : Ideal A) (B : Subring A) :
    subringAddIdeal I B →+* ((Ideal.Quotient.mk I).comp B.subtype).range where
  toFun a := ⟨Ideal.Quotient.mk I a, a.property⟩
  map_zero' := Subtype.ext (map_zero _)
  map_one' := Subtype.ext (map_one _)
  map_add' a b := Subtype.ext (map_add (Ideal.Quotient.mk I) (a : A) (b : A))
  map_mul' a b := Subtype.ext (map_mul (Ideal.Quotient.mk I) (a : A) (b : A))

noncomputable def thirdIsomorphism (I : Ideal A) (B : Subring A) :
    B ⧸ I.comap B.subtype ≃+*
      (subringAddIdeal I B) ⧸ I.comap (subringAddIdeal I B).subtype := by
  let g := subringAddIdealProjection I B
  have hg : Function.Surjective g := by
    rintro ⟨x, b, rfl⟩
    refine ⟨⟨b, ?_⟩, rfl⟩
    exact ⟨b, rfl⟩
  have hk : RingHom.ker g = I.comap (subringAddIdeal I B).subtype := by
    ext a
    change (⟨Ideal.Quotient.mk I a, a.property⟩ :
      ((Ideal.Quotient.mk I).comp B.subtype).range) = 0 ↔ (a : A) ∈ I
    rw [Subtype.ext_iff]
    exact Ideal.Quotient.eq_zero_iff_mem
  let e := (Ideal.quotEquivOfEq hk.symm).trans
    (RingHom.quotientKerEquivOfSurjective hg)
  exact (subringQuotientImage I B).trans e.symm

Special Ideals ​

Let I be an ideal of a ring A. Then :

  1. I is proper iff A/I≠0;
  2. I is maximal iff A/I is a field.
  3. I is prime iff A/I is an (integral) domain.
  4. I is radical iff A/I is reduced.
  5. If I is proper, then I is primary iff N(A/I)=D(A/I).
  6. If I is maximal, then I is prime.
  7. If I is prime, then I is radical.
  8. If I is prime, then I is primary.
Proof

For (1), I is proper means 1∉I, equivalently I≠A. This is equivalent to 1+I≠0+I, hence to A/I≠0.

For (2), if I is maximal and a∉I, then I+⟨a⟩=A. Write 1=i+ba with i∈I; modulo I, this gives (b+I)(a+I)=1+I. Thus A/I is a field; a need not be invertible in A itself. Conversely, if A/I is a field and an ideal J strictly contains I, choose a∈J∖I and an inverse b+I of a+I. Then 1−ab∈I⊆J and ab∈J, so 1∈J and J=A. Therefore I is maximal.

For (3), by definition, A/I is a domain means, for any non-zero element a+I∈A/I, there is not any non-zero b+I∈A/I such that (a+I)⋅(b+I)=0. In other words,

0≠a+I,0≠b+I→(a+I)⋅(b+I)=ab+I≠0⟺ab∈I→a∈I or b∈I.

For (4), by definition, A/I is reduced means it has no non-zero nilpotent elements. That is, for any a+I∈A/I, if (a+I)n=an+I=0 for some n∈Z+, then a+I=0. Furthermore,

an+I=0→a+I=0⟺a∈I→a∈I⟺I⊆I

In previous sections, we have already concluded that I⊆I, and hence I=I. Therefore, I is radical if and only if A/I is reduced.


For (5), by definition of primary ideal :

I is primary ⟺ab∈I→a∈I or b∈I

, the definition of N(A/I), we have:

N(A/I)={a―∈A/I∣∃n∈Z+,a―n=0}

and the definition of D(A/I), we have:

D(A/I)={a―∈A/I∣∃b―≠0∈A/I,a―⋅b―=0}

Since I is proper, A/I is nonzero, and the earlier nilpotent-element argument gives N(A/I)⊆D(A/I). Properness is essential: in the zero ring the only element is nilpotent, but there is no nonzero annihilator. So, we only need to show :

ab∈I→a∈I or b∈I⟺D(A/I)⊆N(A/I)

For the backward direction, we need to show :

D(A/I)⊆N(A/I)⟹ab∈I→a∈I or b∈I

Expanding the left-hand side, we have :

D(A/I)⊆N(A/I)⟺∀a―∈A/I,(∃b―≠0∈A/I,a―⋅b―=0)→(∃n∈Z+,a―n=0)

that is, for any a―∈A/I, if there exists b―∈A/I such that a―⋅b―=0, then there exists n∈Z+ such that a―n=0. Two cases involved :

  • case a―=0⟺a∈I, our goal always holds when we choose the left argument a―=0.

  • case a―≠0⟺a∉I, then proposition a―⋅b―=0 implies that b―∈D(A/I), since D(A/I)⊆N(A/I), we have b―∈N(A/I), i.e., ∃n∈Z+,b―n=bn―=0⟺bn∈I. The right arugment b∈I always holds.

Proof complete for D(A/I)⊆N(A/I)⟹ab∈I→a∈I or b∈I.

For the forward direction, if b― is a zero divisor, choose a―≠0 with a―b―=0. Then ab∈I and a∉I, so primaryness implies b∈I, equivalently b― is nilpotent.


For (6), by (2), if I is maximal, then A/I is a field, thus A/I must be a (integral) domain. By (3), it follows that I is prime. Completing the proof.

For (7), by (3), A/I is a (integral) domain, which implies D(A/I)={0}, and since N(A/I)⊆D(A/I), we have N(A/I)={0} (A/I is reduced) as well. By (4), it follows that I is radical.

For (8), by definition of prime ideal:

I is prime ⟺ab∈I→a∈I or b∈I⟺a―⋅b―=0→a―=0 or b―=0

, by definition of primary ideal :

I is primary ⟺ab∈I→a∈I or bn∈I⟺a―⋅b―=0→a―=0 or b―n=0

So, we need to show that :

a―⋅b―=0→a―=0 or b―=0⟹a―⋅b―=0→a―=0 or b―n=0

Two cases involved :

 (a) a―=0⟹a―⋅b―=0→a―=0 or b―n=0 (b) b―=0⟹a―⋅b―=0→a―=0 or b―n=0

For case (a), it trivially holds when we choose the left argument a―=0.

For case (b), it trivially holds when we choose the right argument b―=0 for n=1.

Lean 4 proof
lean
theorem proper_iff_nontrivial_quotient (I : Ideal A) :
    I ≠ ⊤ ↔ Nontrivial (A ⧸ I) :=
  Ideal.Quotient.nontrivial_iff.symm

theorem maximal_iff_field_quotient (I : Ideal A) :
    I.IsMaximal ↔ IsField (A ⧸ I) :=
  Ideal.Quotient.maximal_ideal_iff_isField_quotient I

theorem prime_iff_domain_quotient (I : Ideal A) :
    I.IsPrime ↔ IsDomain (A ⧸ I) :=
  (Ideal.Quotient.isDomain_iff_prime I).symm

theorem radical_iff_reduced_quotient (I : Ideal A) :
    I.IsRadical ↔ IsReduced (A ⧸ I) :=
  Ideal.isRadical_iff_quotient_reduced I

theorem nilpotent_mk_iff (I : Ideal A) (a : A) :
    IsNilpotent (Ideal.Quotient.mk I a) ↔ a ∈ I.radical := by
  simp only [IsNilpotent, Ideal.mem_radical_iff, ← map_pow,
    Ideal.Quotient.eq_zero_iff_mem]

theorem primary_iff_quotient_zeroDivisors (I : Ideal A) (hI : I ≠ ⊤) :
    I.IsPrimary ↔ ∀ x : A ⧸ I, IsNilpotent x ↔ IsZeroDivisor x := by
  letI : Nontrivial (A ⧸ I) := Ideal.Quotient.nontrivial_iff.mpr hI
  constructor
  · intro hp x
    constructor
    · exact isZeroDivisor_of_isNilpotent
    · rintro ⟨y, hy, hxy⟩
      obtain ⟨a, rfl⟩ := Ideal.Quotient.mk_surjective x
      obtain ⟨b, rfl⟩ := Ideal.Quotient.mk_surjective y
      have hba : b * a ∈ I := Ideal.Quotient.eq_zero_iff_mem.mp (by
        rw [map_mul, mul_comm]
        exact hxy)
      rcases (Ideal.isPrimary_iff.mp hp).2 hba with hb | ha
      · exact False.elim (hy (Ideal.Quotient.eq_zero_iff_mem.mpr hb))
      · exact (nilpotent_mk_iff I a).mpr ha
  · intro h
    refine Ideal.isPrimary_iff.mpr ⟨hI, ?_⟩
    intro a b hab
    by_cases ha : a ∈ I
    · exact Or.inl ha
    · right
      apply (nilpotent_mk_iff I b).mp
      apply (h _).mpr
      refine ⟨Ideal.Quotient.mk I a, ?_, ?_⟩
      · exact fun hz => ha (Ideal.Quotient.eq_zero_iff_mem.mp hz)
      · rw [← map_mul, mul_comm]
        exact Ideal.Quotient.eq_zero_iff_mem.mpr hab

theorem maximal_prime (I : Ideal A) (h : I.IsMaximal) : I.IsPrime :=
  h.isPrime

theorem prime_radical (I : Ideal A) (h : I.IsPrime) : I.IsRadical := by
  rintro x ⟨n, hn⟩
  exact h.mem_of_pow_mem n hn

theorem prime_primary (I : Ideal A) (h : I.IsPrime) : I.IsPrimary := by
  refine Ideal.isPrimary_iff.mpr ⟨h.ne_top, ?_⟩
  intro a b hab
  exact (h.mem_or_mem hab).imp id (fun hb => Ideal.le_radical hb)

Prime Avoidance Lemma ​

  1. Let p1,…,pn be prime ideals of a commutative ring A. If an ideal I of A is contained in the union of these prime ideals, then I is contained in one of them. This is known as the Prime Avoidance Lemma. That is,
I⊆⋃i=1npi⟹I⊆pj for some j∈{1,…,n}.

Prime Avoidance Lemma 1

  1. Let I1,...,In be ideals, and let p be a prime such that⋂i=1nIi⊆p.Then Ii⊆p for some i∈{1,…,n}. Furthermore, if ⋂i=1nIi=p, then Ii=p for some i∈{1,…,n}.

Prime Avoidance Lemma 2

  1. Every prime ideal is irreducible.
Explanation

We use contrapositive way to prove these theorems, i,e. p⟹Q⟺¬Q⟹¬p.


Regarding (1), let's first consider a more simpler case when n=2. Let b=a1+a2, where a1∈p1∖p2, and a2∈p2∖p1. Then we have below proposition :

b∉p1,b∉p2⟹b∉p1∪p2

The argument (1) holds for any general ideals pi, the primality is not a necessary condition for the case of n=2. So why do we need the primality?

Now, let's consider the general case when n≥2. A natural question arises: how to choose a proper b such that b∉pi for all i∈{1,…,n}? There is a simple fact :

a∈pi,b∉pi⟹a+b∉pi

Let b=∑i=1n∏j≠inaj, where aj∈pj and aj∉pi for all i≠j. Then for the i-th term of b ,

∏j≠inaj∉pi

it does not belong to pi since pi are prime and all factors of the product are not in pi. And for other terms except the i-th one are belong to pi since one factor of each of these terms is in pi. Therefore, b∉pi for all i∈{1,…,n}, moreover b∉⋃i=1npi.


As shown in the above figure, the i-th term of b, a1⋅a2, is not in pi. This mainly owe to the primality of pi which ensures that the product of elements not in pi is also not in pi.


Regarding (2), let J=∩iIi, the contrapositive way to show the statement is to prove

¬(∃i≤n,Ii⊆p)⟹¬(J⊆p)⟺(∀i≤n,∃ai∈Ii,ai∉p)⟹∃x∈J,x∉p

We use x=∏i=1nai where ai∈Ii and ai∉p. By the definition of ideal, x∈∩iIi=J. And since p is prime and none of the ai are in p, it follows that x∉p. This completes the proof of the contrapositive.


As shown in the above figure, x=a1⋅a2⋅a3∈∩iIi but x∉p, this mainly owe to the primality of p which ensures that the product of elements not in p is also not in p.


For (3), we wan to show :

p is prime⟹p is irreducible⟺p is prime⟹I=I1∩I2,I1⊆I or I2⊆I

Since I=I1∩I2, then ∀x∈I, we have ∃a∈I1,b∈I2 such that x=a⋅b. By I is prime, we have a∈I or b∈I, which implies I1⊆I or I2⊆I. This completes the proof.


Published with GitHub Pages.