Skip to content

Commit

Permalink
feat: first isomorphism theorem for rings (#7536)
Browse files Browse the repository at this point in the history
This matches the textbook version which does not assume surjectivity, and is also consistent with the Mathlib group theory version.
  • Loading branch information
PatrickMassot committed Oct 6, 2023
1 parent 167880b commit 911cd30
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Mathlib/RingTheory/Ideal/Operations.lean
Original file line number Diff line number Diff line change
Expand Up @@ -2105,6 +2105,10 @@ variable {F : Type*} [Ring R] [Ring S] [rc : RingHomClass F R S] (f : F)
theorem sub_mem_ker_iff {x y} : x - y ∈ ker f ↔ f x = f y := by rw [mem_ker, map_sub, sub_eq_zero]
#align ring_hom.sub_mem_ker_iff RingHom.sub_mem_ker_iff

@[simp]
theorem ker_rangeRestrict (f : R →+* S) : ker f.rangeRestrict = ker f :=
Ideal.ext fun _ ↦ Subtype.ext_iff

end RingRing

/-- The kernel of a homomorphism to a domain is a prime ideal. -/
Expand Down
7 changes: 6 additions & 1 deletion Mathlib/RingTheory/Ideal/QuotientOperations.lean
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,16 @@ theorem quotientKerEquivOfRightInverse.Symm.apply {g : S → R} (hf : Function.R
rfl
#align ring_hom.quotient_ker_equiv_of_right_inverse.symm.apply RingHom.quotientKerEquivOfRightInverse.Symm.apply

/-- The **first isomorphism theorem** for commutative rings. -/
/-- The **first isomorphism theorem** for commutative rings, surjective case. -/
noncomputable def quotientKerEquivOfSurjective (hf : Function.Surjective f) : R ⧸ (ker f) ≃+* S :=
quotientKerEquivOfRightInverse (Classical.choose_spec hf.hasRightInverse)
#align ring_hom.quotient_ker_equiv_of_surjective RingHom.quotientKerEquivOfSurjective

/-- The **first isomorphism theorem** for commutative rings. -/
noncomputable def quotientKerEquivRange (f : R →+* S) : R ⧸ ker f ≃+* f.range :=
(Ideal.quotEquivOfEq f.ker_rangeRestrict.symm).trans <|
quotientKerEquivOfSurjective f.rangeRestrict_surjective

end RingHom

namespace Ideal
Expand Down

0 comments on commit 911cd30

Please sign in to comment.