fact
stringlengths
6
3.84k
type
stringclasses
11 values
library
stringclasses
32 values
imports
listlengths
1
14
filename
stringlengths
20
95
symbolic_name
stringlengths
1
90
docstring
stringlengths
7
20k
ker_coe_toRingHom : ker (f : R →+* S) = ker f := rfl @[simp]
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
ker_coe_toRingHom
null
ker_equiv {F' : Type*} [EquivLike F' R S] [RingEquivClass F' R S] (f : F') : ker f = ⊥ := by ext; simp
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
ker_equiv
null
ker_equiv_comp (f : R →+* S) (e : S ≃+* T) : ker (e.toRingHom.comp f) = RingHom.ker f := by rw [← RingHom.comap_ker, RingEquiv.toRingHom_eq_coe, RingHom.ker_coe_equiv, RingHom.ker]
lemma
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
ker_equiv_comp
null
injective_iff_ker_eq_bot : Function.Injective f ↔ ker f = ⊥ := by rw [SetLike.ext'_iff, ker_eq, Set.ext_iff] exact injective_iff_map_eq_zero' f
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
injective_iff_ker_eq_bot
null
ker_eq_bot_iff_eq_zero : ker f = ⊥ ↔ ∀ x, f x = 0 → x = 0 := by rw [← injective_iff_map_eq_zero f, injective_iff_ker_eq_bot]
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
ker_eq_bot_iff_eq_zero
null
ker_comp_of_injective [Semiring T] (g : T →+* R) {f : R →+* S} (hf : Function.Injective f) : ker (f.comp g) = RingHom.ker g := by rw [← RingHom.comap_ker, (injective_iff_ker_eq_bot f).mp hf, RingHom.ker]
lemma
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
ker_comp_of_injective
null
@[simp] _root_.AlgHom.ker_coe_equiv {R A B : Type*} [CommSemiring R] [Semiring A] [Semiring B] [Algebra R A] [Algebra R B] (e : A ≃ₐ[R] B) : RingHom.ker (e : A →+* B) = ⊥ := RingHom.ker_coe_equiv (e.toRingEquiv)
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
_root_.AlgHom.ker_coe_equiv
Synonym for `RingHom.ker_coe_equiv`, but given an algebra equivalence.
sub_mem_ker_iff {x y} : x - y ∈ ker f ↔ f x = f y := by rw [mem_ker, map_sub, sub_eq_zero] @[simp]
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
sub_mem_ker_iff
null
ker_rangeRestrict (f : R →+* S) : ker f.rangeRestrict = ker f := Ideal.ext fun _ ↦ Subtype.ext_iff
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
ker_rangeRestrict
null
ker_isPrime {F : Type*} [Semiring R] [Semiring S] [IsDomain S] [FunLike F R S] [RingHomClass F R S] (f : F) : (ker f).IsPrime := have := Ideal.bot_prime (α := S) inferInstanceAs (Ideal.comap f ⊥).IsPrime
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
ker_isPrime
The kernel of a homomorphism to a domain is a prime ideal.
ker_isMaximal_of_surjective {R K F : Type*} [Ring R] [DivisionRing K] [FunLike F R K] [RingHomClass F R K] (f : F) (hf : Function.Surjective f) : (ker f).IsMaximal := have := Ideal.bot_isMaximal (K := K) Ideal.comap_isMaximal_of_surjective _ hf
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
ker_isMaximal_of_surjective
The kernel of a homomorphism to a field is a maximal ideal.
Module.annihilator : Ideal R := RingHom.ker (Module.toAddMonoidEnd R M)
def
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
Module.annihilator
`Module.annihilator R M` is the ideal of all elements `r : R` such that `r • M = 0`.
Module.mem_annihilator {r} : r ∈ Module.annihilator R M ↔ ∀ m : M, r • m = 0 := ⟨fun h ↦ (congr($h ·)), (AddMonoidHom.ext ·)⟩
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
Module.mem_annihilator
null
LinearMap.annihilator_le_of_injective (f : M →ₗ[R] M') (hf : Function.Injective f) : Module.annihilator R M' ≤ Module.annihilator R M := fun x h ↦ by rw [Module.mem_annihilator] at h ⊢; exact fun m ↦ hf (by rw [map_smul, h, f.map_zero])
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
LinearMap.annihilator_le_of_injective
null
LinearMap.annihilator_le_of_surjective (f : M →ₗ[R] M') (hf : Function.Surjective f) : Module.annihilator R M ≤ Module.annihilator R M' := fun x h ↦ by rw [Module.mem_annihilator] at h ⊢ intro m; obtain ⟨m, rfl⟩ := hf m rw [← map_smul, h, f.map_zero]
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
LinearMap.annihilator_le_of_surjective
null
LinearEquiv.annihilator_eq (e : M ≃ₗ[R] M') : Module.annihilator R M = Module.annihilator R M' := (e.annihilator_le_of_surjective e.surjective).antisymm (e.annihilator_le_of_injective e.injective)
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
LinearEquiv.annihilator_eq
null
Module.comap_annihilator {R₀} [CommSemiring R₀] [Module R₀ M] [Algebra R₀ R] [IsScalarTower R₀ R M] : (Module.annihilator R M).comap (algebraMap R₀ R) = Module.annihilator R₀ M := by ext x simp [mem_annihilator]
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
Module.comap_annihilator
null
Module.annihilator_eq_bot {R M} [Ring R] [AddCommGroup M] [Module R M] : Module.annihilator R M = ⊥ ↔ FaithfulSMul R M := by rw [← le_bot_iff] refine ⟨fun H ↦ ⟨fun {r s} H' ↦ ?_⟩, fun ⟨H⟩ {a} ha ↦ ?_⟩ · rw [← sub_eq_zero] exact H (Module.mem_annihilator (r := r - s).mpr (by simp only [sub_smul, H', sub_self, implies_true])) · exact @H a 0 (by simp [Module.mem_annihilator.mp ha])
lemma
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
Module.annihilator_eq_bot
null
Module.annihilator_eq_top_iff : annihilator R M = ⊤ ↔ Subsingleton M := ⟨fun h ↦ ⟨fun m m' ↦ by rw [← one_smul R m, ← one_smul R m'] simp_rw [mem_annihilator.mp (h ▸ Submodule.mem_top)]⟩, fun _ ↦ top_le_iff.mp fun _ _ ↦ mem_annihilator.mpr fun _ ↦ Subsingleton.elim _ _⟩
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
Module.annihilator_eq_top_iff
null
Module.annihilator_prod : annihilator R (M × M') = annihilator R M ⊓ annihilator R M' := by ext simp_rw [Ideal.mem_inf, mem_annihilator, Prod.forall, Prod.smul_mk, Prod.mk_eq_zero, forall_and_left, ← forall_and_right]
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
Module.annihilator_prod
null
Module.annihilator_finsupp {ι : Type*} [Nonempty ι] : annihilator R (ι →₀ M) = annihilator R M := by ext r; simp_rw [mem_annihilator] constructor <;> intro h · refine Nonempty.elim ‹_› fun i : ι ↦ ?_ simpa using fun m ↦ congr($(h (Finsupp.single i m)) i) · intro m; ext i; exact h _
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
Module.annihilator_finsupp
null
Module.annihilator_dfinsupp : annihilator R (Π₀ i, M i) = ⨅ i, annihilator R (M i) := by ext r; simp only [mem_annihilator, Ideal.mem_iInf] constructor <;> intro h · intro i m classical simpa using DFunLike.congr_fun (h (DFinsupp.single i m)) i · intro m; ext i; exact h i _
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
Module.annihilator_dfinsupp
null
Module.annihilator_pi : annihilator R (Π i, M i) = ⨅ i, annihilator R (M i) := by ext r; simp only [mem_annihilator, Ideal.mem_iInf] constructor <;> intro h · intro i m classical simpa using congr_fun (h (Pi.single i m)) i · intro m; ext i; exact h i _
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
Module.annihilator_pi
null
annihilator (N : Submodule R M) : Ideal R := Module.annihilator R N
abbrev
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
annihilator
`N.annihilator` is the ideal of all elements `r : R` such that `r • N = 0`.
annihilator_top : (⊤ : Submodule R M).annihilator = Module.annihilator R M := topEquiv.annihilator_eq variable {I J : Ideal R} {N P : Submodule R M}
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
annihilator_top
null
mem_annihilator {r} : r ∈ N.annihilator ↔ ∀ n ∈ N, r • n = (0 : M) := by simp_rw [annihilator, Module.mem_annihilator, Subtype.forall, Subtype.ext_iff]; rfl
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
mem_annihilator
null
annihilator_bot : (⊥ : Submodule R M).annihilator = ⊤ := top_le_iff.mp fun _ _ ↦ mem_annihilator.mpr fun _ ↦ by rintro rfl; rw [smul_zero]
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
annihilator_bot
null
annihilator_eq_top_iff : N.annihilator = ⊤ ↔ N = ⊥ := by rw [annihilator, Module.annihilator_eq_top_iff, Submodule.subsingleton_iff_eq_bot]
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
annihilator_eq_top_iff
null
annihilator_mono (h : N ≤ P) : P.annihilator ≤ N.annihilator := fun _ hrp => mem_annihilator.2 fun n hn => mem_annihilator.1 hrp n <| h hn
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
annihilator_mono
null
annihilator_iSup (ι : Sort w) (f : ι → Submodule R M) : annihilator (⨆ i, f i) = ⨅ i, annihilator (f i) := le_antisymm (le_iInf fun _ => annihilator_mono <| le_iSup _ _) fun r H => mem_annihilator.2 fun n hn ↦ iSup_induction f (motive := (r • · = 0)) hn (fun i ↦ mem_annihilator.1 <| (mem_iInf _).mp H i) (smul_zero _) fun m₁ m₂ h₁ h₂ ↦ by simp_rw [smul_add, h₁, h₂, add_zero]
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
annihilator_iSup
null
le_annihilator_iff {N : Submodule R M} {I : Ideal R} : I ≤ annihilator N ↔ I • N = ⊥ := by simp_rw [← le_bot_iff, smul_le, SetLike.le_def, mem_annihilator]; rfl @[simp]
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
le_annihilator_iff
null
annihilator_smul (N : Submodule R M) : annihilator N • N = ⊥ := eq_bot_iff.2 (smul_le.2 fun _ => mem_annihilator.1) @[simp]
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
annihilator_smul
null
annihilator_mul (I : Ideal R) : annihilator I * I = ⊥ := annihilator_smul I
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
annihilator_mul
null
mem_annihilator' {r} : r ∈ N.annihilator ↔ N ≤ comap (r • (LinearMap.id : M →ₗ[R] M)) ⊥ := mem_annihilator.trans ⟨fun H n hn => (mem_bot R).2 <| H n hn, fun H _ hn => (mem_bot R).1 <| H hn⟩
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
mem_annihilator'
null
mem_annihilator_span (s : Set M) (r : R) : r ∈ (Submodule.span R s).annihilator ↔ ∀ n : s, r • (n : M) = 0 := by rw [Submodule.mem_annihilator] constructor · intro h n exact h _ (Submodule.subset_span n.prop) · intro h n hn refine Submodule.span_induction ?_ ?_ ?_ ?_ hn · intro x hx exact h ⟨x, hx⟩ · exact smul_zero _ · intro x y _ _ hx hy rw [smul_add, hx, hy, zero_add] · intro a x _ hx rw [smul_comm, hx, smul_zero]
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
mem_annihilator_span
null
mem_annihilator_span_singleton (g : M) (r : R) : r ∈ (Submodule.span R ({g} : Set M)).annihilator ↔ r • g = 0 := by simp [mem_annihilator_span] open LinearMap in
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
mem_annihilator_span_singleton
null
annihilator_span (s : Set M) : (Submodule.span R s).annihilator = ⨅ g : s, ker (toSpanSingleton R M g.1) := by ext; simp [mem_annihilator_span] open LinearMap in
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
annihilator_span
null
annihilator_span_singleton (g : M) : (Submodule.span R {g}).annihilator = ker (toSpanSingleton R M g) := by simp [annihilator_span] @[simp]
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
annihilator_span_singleton
null
mul_annihilator (I : Ideal R) : I * annihilator I = ⊥ := by rw [mul_comm, annihilator_mul]
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
mul_annihilator
null
map_eq_bot_iff_le_ker {I : Ideal R} (f : F) : I.map f = ⊥ ↔ I ≤ RingHom.ker f := by rw [RingHom.ker, eq_bot_iff, map_le_iff_le_comap]
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
map_eq_bot_iff_le_ker
null
ker_le_comap {K : Ideal S} (f : F) : RingHom.ker f ≤ comap f K := fun _ hx => mem_comap.2 (RingHom.mem_ker.1 hx ▸ K.zero_mem)
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
ker_le_comap
null
map_isPrime_of_equiv {F' : Type*} [EquivLike F' R S] [RingEquivClass F' R S] (f : F') {I : Ideal R} [IsPrime I] : IsPrime (map f I) := by have h : I.map f = I.map ((f : R ≃+* S) : R →+* S) := rfl rw [h, map_comap_of_equiv (f : R ≃+* S)] exact Ideal.IsPrime.comap (RingEquiv.symm (f : R ≃+* S))
instance
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
map_isPrime_of_equiv
A ring isomorphism sends a prime ideal to a prime ideal.
map_eq_bot_iff_of_injective {I : Ideal R} {f : F} (hf : Function.Injective f) : I.map f = ⊥ ↔ I = ⊥ := by simp [map, span_eq_bot, ← map_zero f, -map_zero, hf.eq_iff, I.eq_bot_iff]
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
map_eq_bot_iff_of_injective
null
comap_map_of_surjective' (f : F) (hf : Function.Surjective f) (I : Ideal R) : (I.map f).comap f = I ⊔ RingHom.ker f := comap_map_of_surjective f hf I
lemma
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
comap_map_of_surjective'
null
map_sInf {A : Set (Ideal R)} {f : F} (hf : Function.Surjective f) : (∀ J ∈ A, RingHom.ker f ≤ J) → map f (sInf A) = sInf (map f '' A) := by refine fun h => le_antisymm (le_sInf ?_) ?_ · intro j hj y hy obtain ⟨x, hx⟩ := (mem_map_iff_of_surjective f hf).1 hy obtain ⟨J, hJ⟩ := (Set.mem_image _ _ _).mp hj rw [← hJ.right, ← hx.right] exact mem_map_of_mem f (sInf_le_of_le hJ.left (le_of_eq rfl) hx.left) · intro y hy obtain ⟨x, hx⟩ := hf y refine hx ▸ mem_map_of_mem f ?_ have : ∀ I ∈ A, y ∈ map f I := by simpa using hy rw [Submodule.mem_sInf] intro J hJ rcases (mem_map_iff_of_surjective f hf).1 (this J hJ) with ⟨x', hx', rfl⟩ have : x - x' ∈ J := by apply h J hJ rw [RingHom.mem_ker, map_sub, hx, sub_self] simpa only [sub_add_cancel] using J.add_mem this hx'
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
map_sInf
null
map_isPrime_of_surjective {f : F} (hf : Function.Surjective f) {I : Ideal R} [H : IsPrime I] (hk : RingHom.ker f ≤ I) : IsPrime (map f I) := by refine ⟨fun h => H.ne_top (eq_top_iff.2 ?_), fun {x y} => ?_⟩ · replace h := congr_arg (comap f) h rw [comap_map_of_surjective _ hf, comap_top] at h exact h ▸ sup_le (le_of_eq rfl) hk · refine fun hxy => (hf x).recOn fun a ha => (hf y).recOn fun b hb => ?_ rw [← ha, ← hb, ← map_mul f, mem_map_iff_of_surjective _ hf] at hxy rcases hxy with ⟨c, hc, hc'⟩ rw [← sub_eq_zero, ← map_sub] at hc' have : a * b ∈ I := by convert I.sub_mem hc (hk (hc' : c - a * b ∈ RingHom.ker f)) using 1 abel exact (H.mem_or_mem this).imp (fun h => ha ▸ mem_map_of_mem f h) fun h => hb ▸ mem_map_of_mem f h
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
map_isPrime_of_surjective
null
IsMaximal.map_of_surjective_of_ker_le {f : F} (hf : Function.Surjective f) {m : Ideal R} [m.IsMaximal] (hk : RingHom.ker f ≤ m) : (m.map f).IsMaximal := by refine m.map_eq_top_or_isMaximal_of_surjective f hf ‹_› |>.resolve_left fun h => ?_ apply congr_arg (comap f) at h rw [comap_map_of_surjective _ hf, comap_top, ← RingHom.ker_eq_comap_bot, sup_of_le_left hk] at h exact IsMaximal.ne_top ‹_› h
lemma
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
IsMaximal.map_of_surjective_of_ker_le
null
map_ne_bot_of_ne_bot {S : Type*} [Ring S] [Nontrivial S] [Algebra R S] [NoZeroSMulDivisors R S] {I : Ideal R} (h : I ≠ ⊥) : map (algebraMap R S) I ≠ ⊥ := (map_eq_bot_iff_of_injective (FaithfulSMul.algebraMap_injective R S)).mp.mt h
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
map_ne_bot_of_ne_bot
null
map_eq_iff_sup_ker_eq_of_surjective {I J : Ideal R} (f : R →+* S) (hf : Function.Surjective f) : map f I = map f J ↔ I ⊔ RingHom.ker f = J ⊔ RingHom.ker f := by rw [← (comap_injective_of_surjective f hf).eq_iff, comap_map_of_surjective f hf, comap_map_of_surjective f hf, RingHom.ker_eq_comap_bot]
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
map_eq_iff_sup_ker_eq_of_surjective
null
map_radical_of_surjective {f : R →+* S} (hf : Function.Surjective f) {I : Ideal R} (h : RingHom.ker f ≤ I) : map f I.radical = (map f I).radical := by rw [radical_eq_sInf, radical_eq_sInf] have : ∀ J ∈ {J : Ideal R | I ≤ J ∧ J.IsPrime}, RingHom.ker f ≤ J := fun J hJ => h.trans hJ.left convert map_sInf hf this refine funext fun j => propext ⟨?_, ?_⟩ · rintro ⟨hj, hj'⟩ haveI : j.IsPrime := hj' exact ⟨comap f j, ⟨⟨map_le_iff_le_comap.1 hj, comap_isPrime f j⟩, map_comap_of_surjective f hf j⟩⟩ · rintro ⟨J, ⟨hJ, hJ'⟩⟩ haveI : J.IsPrime := hJ.right exact ⟨hJ' ▸ map_mono hJ.left, hJ' ▸ map_isPrime_of_surjective hf (le_trans h hJ.left)⟩
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
map_radical_of_surjective
null
liftOfRightInverseAux (hf : Function.RightInverse f_inv f) (g : A →+* C) (hg : RingHom.ker f ≤ RingHom.ker g) : B →+* C := { AddMonoidHom.liftOfRightInverse f.toAddMonoidHom f_inv hf ⟨g.toAddMonoidHom, hg⟩ with toFun := fun b => g (f_inv b) map_one' := by rw [← map_one g, ← sub_eq_zero, ← map_sub g, ← mem_ker] apply hg rw [mem_ker, map_sub f, sub_eq_zero, map_one f] exact hf 1 map_mul' := by intro x y rw [← map_mul g, ← sub_eq_zero, ← map_sub g, ← mem_ker] apply hg rw [mem_ker, map_sub f, sub_eq_zero, map_mul f] simp only [hf _] } @[simp]
def
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
liftOfRightInverseAux
Auxiliary definition used to define `liftOfRightInverse`
liftOfRightInverseAux_comp_apply (hf : Function.RightInverse f_inv f) (g : A →+* C) (hg : RingHom.ker f ≤ RingHom.ker g) (a : A) : (f.liftOfRightInverseAux f_inv hf g hg) (f a) = g a := f.toAddMonoidHom.liftOfRightInverse_comp_apply f_inv hf ⟨g.toAddMonoidHom, hg⟩ a
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
liftOfRightInverseAux_comp_apply
null
liftOfRightInverse (hf : Function.RightInverse f_inv f) : { g : A →+* C // RingHom.ker f ≤ RingHom.ker g } ≃ (B →+* C) where toFun g := f.liftOfRightInverseAux f_inv hf g.1 g.2 invFun φ := ⟨φ.comp f, fun x hx => mem_ker.mpr <| by simp [mem_ker.mp hx]⟩ left_inv g := by ext simp only [comp_apply, liftOfRightInverseAux_comp_apply] right_inv φ := by ext b simp [liftOfRightInverseAux, hf b]
def
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
liftOfRightInverse
`liftOfRightInverse f hf g hg` is the unique ring homomorphism `φ` * such that `φ.comp f = g` (`RingHom.liftOfRightInverse_comp`), * where `f : A →+* B` has a right_inverse `f_inv` (`hf`), * and `g : B →+* C` satisfies `hg : f.ker ≤ g.ker`. See `RingHom.eq_liftOfRightInverse` for the uniqueness lemma. ``` A . | \ f | \ g | \ v \⌟ B ----> C ∃!φ ```
@[simp] noncomputable liftOfSurjective (hf : Function.Surjective f) : { g : A →+* C // RingHom.ker f ≤ RingHom.ker g } ≃ (B →+* C) := f.liftOfRightInverse (Function.surjInv hf) (Function.rightInverse_surjInv hf)
abbrev
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
liftOfSurjective
A non-computable version of `RingHom.liftOfRightInverse` for when no computable right inverse is available, that uses `Function.surjInv`.
liftOfRightInverse_comp_apply (hf : Function.RightInverse f_inv f) (g : { g : A →+* C // RingHom.ker f ≤ RingHom.ker g }) (x : A) : (f.liftOfRightInverse f_inv hf g) (f x) = g.1 x := f.liftOfRightInverseAux_comp_apply f_inv hf g.1 g.2 x
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
liftOfRightInverse_comp_apply
null
liftOfRightInverse_comp (hf : Function.RightInverse f_inv f) (g : { g : A →+* C // RingHom.ker f ≤ RingHom.ker g }) : (f.liftOfRightInverse f_inv hf g).comp f = g := RingHom.ext <| f.liftOfRightInverse_comp_apply f_inv hf g
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
liftOfRightInverse_comp
null
eq_liftOfRightInverse (hf : Function.RightInverse f_inv f) (g : A →+* C) (hg : RingHom.ker f ≤ RingHom.ker g) (h : B →+* C) (hh : h.comp f = g) : h = f.liftOfRightInverse f_inv hf ⟨g, hg⟩ := by simp_rw [← hh] exact ((f.liftOfRightInverse f_inv hf).apply_symm_apply _).symm
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
eq_liftOfRightInverse
null
@[simps apply] RingEquiv.idealComapOrderIso {R S : Type*} [Semiring R] [Semiring S] (e : R ≃+* S) : Ideal S ≃o Ideal R where toFun I := I.comap e invFun I := I.map e left_inv I := I.map_comap_of_surjective _ e.surjective right_inv I := I.comap_map_of_bijective _ e.bijective map_rel_iff' := by simp [← Ideal.map_le_iff_le_comap, Ideal.map_comap_of_surjective _ e.surjective] @[simp]
def
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
RingEquiv.idealComapOrderIso
Any ring isomorphism induces an order isomorphism of ideals.
RingEquiv.idealComapOrderIso_symm_apply {R S : Type*} [Semiring R] [Semiring S] (e : R ≃+* S) (I : Ideal R) : e.idealComapOrderIso.symm I = I.map e := rfl
lemma
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
RingEquiv.idealComapOrderIso_symm_apply
null
ker_coe : RingHom.ker f = RingHom.ker (f : A →+* B) := rfl
lemma
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
ker_coe
null
coe_ideal_map (I : Ideal A) : Ideal.map f I = Ideal.map (f : A →+* B) I := rfl
lemma
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
coe_ideal_map
null
comap_ker {C : Type*} [Semiring C] [Algebra R C] (f : B →ₐ[R] C) (g : A →ₐ[R] B) : (RingHom.ker f).comap g = RingHom.ker (f.comp g) := RingHom.comap_ker f.toRingHom g.toRingHom
lemma
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
comap_ker
null
@[simps!] idealMap (I : Ideal R) : I →ₗ[R] I.map (algebraMap R S) := (Algebra.linearMap R S).restrict (q := (I.map (algebraMap R S)).restrictScalars R) (fun _ ↦ Ideal.mem_map_of_mem _)
def
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
idealMap
The induced linear map from `I` to the span of `I` in an `R`-algebra `S`.
@[simp] FaithfulSMul.ker_algebraMap_eq_bot (R A : Type*) [CommSemiring R] [Semiring A] [Algebra R A] [FaithfulSMul R A] : RingHom.ker (algebraMap R A) = ⊥ := by ext; simp
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
FaithfulSMul.ker_algebraMap_eq_bot
null
IsMaximal (I : Ideal α) : Prop where /-- The maximal ideal is a coatom in the ordering on ideals; that is, it is not the entire ring, and there are no other proper ideals strictly containing it. -/ out : IsCoatom I
class
RingTheory
[ "Mathlib.RingTheory.Ideal.Prime", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/RingTheory/Ideal/Maximal.lean
IsMaximal
An ideal is maximal if it is maximal in the collection of proper ideals.
isMaximal_def {I : Ideal α} : I.IsMaximal ↔ IsCoatom I := ⟨fun h => h.1, fun h => ⟨h⟩⟩
theorem
RingTheory
[ "Mathlib.RingTheory.Ideal.Prime", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/RingTheory/Ideal/Maximal.lean
isMaximal_def
null
IsMaximal.ne_top {I : Ideal α} (h : I.IsMaximal) : I ≠ ⊤ := (isMaximal_def.1 h).1
theorem
RingTheory
[ "Mathlib.RingTheory.Ideal.Prime", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/RingTheory/Ideal/Maximal.lean
IsMaximal.ne_top
null
isMaximal_iff {I : Ideal α} : I.IsMaximal ↔ (1 : α) ∉ I ∧ ∀ (J : Ideal α) (x), I ≤ J → x ∉ I → x ∈ J → (1 : α) ∈ J := by simp_rw [isMaximal_def, SetLike.isCoatom_iff, Ideal.ne_top_iff_one, ← Ideal.eq_top_iff_one]
theorem
RingTheory
[ "Mathlib.RingTheory.Ideal.Prime", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/RingTheory/Ideal/Maximal.lean
isMaximal_iff
null
IsMaximal.eq_of_le {I J : Ideal α} (hI : I.IsMaximal) (hJ : J ≠ ⊤) (IJ : I ≤ J) : I = J := eq_iff_le_not_lt.2 ⟨IJ, fun h => hJ (hI.1.2 _ h)⟩
theorem
RingTheory
[ "Mathlib.RingTheory.Ideal.Prime", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/RingTheory/Ideal/Maximal.lean
IsMaximal.eq_of_le
null
IsMaximal.coprime_of_ne {M M' : Ideal α} (hM : M.IsMaximal) (hM' : M'.IsMaximal) (hne : M ≠ M') : M ⊔ M' = ⊤ := by contrapose! hne with h exact hM.eq_of_le hM'.ne_top (le_sup_left.trans_eq (hM'.eq_of_le h le_sup_right).symm)
theorem
RingTheory
[ "Mathlib.RingTheory.Ideal.Prime", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/RingTheory/Ideal/Maximal.lean
IsMaximal.coprime_of_ne
null
exists_le_maximal (I : Ideal α) (hI : I ≠ ⊤) : ∃ M : Ideal α, M.IsMaximal ∧ I ≤ M := let ⟨m, hm⟩ := (eq_top_or_exists_le_coatom I).resolve_left hI ⟨m, ⟨⟨hm.1⟩, hm.2⟩⟩ variable (α) in
theorem
RingTheory
[ "Mathlib.RingTheory.Ideal.Prime", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/RingTheory/Ideal/Maximal.lean
exists_le_maximal
**Krull's theorem**: if `I` is an ideal that is not the whole ring, then it is included in some maximal ideal.
exists_maximal [Nontrivial α] : ∃ M : Ideal α, M.IsMaximal := let ⟨I, ⟨hI, _⟩⟩ := exists_le_maximal (⊥ : Ideal α) bot_ne_top ⟨I, hI⟩
theorem
RingTheory
[ "Mathlib.RingTheory.Ideal.Prime", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/RingTheory/Ideal/Maximal.lean
exists_maximal
Krull's theorem: a nontrivial ring has a maximal ideal.
ne_top_iff_exists_maximal {I : Ideal α} : I ≠ ⊤ ↔ ∃ M : Ideal α, M.IsMaximal ∧ I ≤ M := by refine ⟨exists_le_maximal I, ?_⟩ contrapose! rintro rfl _ hMmax rw [top_le_iff] exact IsMaximal.ne_top hMmax
theorem
RingTheory
[ "Mathlib.RingTheory.Ideal.Prime", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/RingTheory/Ideal/Maximal.lean
ne_top_iff_exists_maximal
null
maximal_of_no_maximal {P : Ideal α} (hmax : ∀ m : Ideal α, P < m → ¬IsMaximal m) (J : Ideal α) (hPJ : P < J) : J = ⊤ := by by_contra hnonmax rcases exists_le_maximal J hnonmax with ⟨M, hM1, hM2⟩ exact hmax M (lt_of_lt_of_le hPJ hM2) hM1
theorem
RingTheory
[ "Mathlib.RingTheory.Ideal.Prime", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/RingTheory/Ideal/Maximal.lean
maximal_of_no_maximal
If P is not properly contained in any maximal ideal then it is not properly contained in any proper ideal
IsMaximal.exists_inv {I : Ideal α} (hI : I.IsMaximal) {x} (hx : x ∉ I) : ∃ y, ∃ i ∈ I, y * x + i = 1 := by obtain ⟨H₁, H₂⟩ := isMaximal_iff.1 hI rcases mem_span_insert.1 (H₂ (span (insert x I)) x (Set.Subset.trans (subset_insert _ _) subset_span) hx (subset_span (mem_insert _ _))) with ⟨y, z, hz, hy⟩ refine ⟨y, z, ?_, hy.symm⟩ rwa [← span_eq I]
theorem
RingTheory
[ "Mathlib.RingTheory.Ideal.Prime", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/RingTheory/Ideal/Maximal.lean
IsMaximal.exists_inv
null
sInf_isPrime_of_isChain {s : Set (Ideal α)} (hs : s.Nonempty) (hs' : IsChain (· ≤ ·) s) (H : ∀ p ∈ s, p.IsPrime) : (sInf s).IsPrime := ⟨fun e => let ⟨x, hx⟩ := hs (H x hx).ne_top (eq_top_iff.mpr (e.symm.trans_le (sInf_le hx))), fun e => or_iff_not_imp_left.mpr fun hx => by rw [Ideal.mem_sInf] at hx e ⊢ push_neg at hx obtain ⟨I, hI, hI'⟩ := hx intro J hJ rcases hs'.total hI hJ with h | h · exact h (((H I hI).mem_or_mem (e hI)).resolve_left hI') · exact ((H J hJ).mem_or_mem (e hJ)).resolve_left fun x => hI' <| h x⟩
theorem
RingTheory
[ "Mathlib.RingTheory.Ideal.Prime", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/RingTheory/Ideal/Maximal.lean
sInf_isPrime_of_isChain
null
span_singleton_prime {p : α} (hp : p ≠ 0) : IsPrime (span ({p} : Set α)) ↔ Prime p := by simp [isPrime_iff, Prime, span_singleton_eq_top, hp, mem_span_singleton]
theorem
RingTheory
[ "Mathlib.RingTheory.Ideal.Prime", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/RingTheory/Ideal/Maximal.lean
span_singleton_prime
null
IsMaximal.isPrime {I : Ideal α} (H : I.IsMaximal) : I.IsPrime := ⟨H.1.1, @fun x y hxy => or_iff_not_imp_left.2 fun hx => by let J : Ideal α := Submodule.span α (insert x ↑I) have IJ : I ≤ J := Set.Subset.trans (subset_insert _ _) subset_span have xJ : x ∈ J := Ideal.subset_span (Set.mem_insert x I) obtain ⟨_, oJ⟩ := isMaximal_iff.1 H specialize oJ J x IJ hx xJ rcases Submodule.mem_span_insert.mp oJ with ⟨a, b, h, oe⟩ obtain F : y * 1 = y * (a • x + b) := congr_arg (fun g : α => y * g) oe rw [← mul_one y, F, mul_add, mul_comm, smul_eq_mul, mul_assoc] refine Submodule.add_mem I (I.mul_mem_left a hxy) (Submodule.smul_mem I y ?_) rwa [Submodule.span_eq] at h⟩
theorem
RingTheory
[ "Mathlib.RingTheory.Ideal.Prime", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/RingTheory/Ideal/Maximal.lean
IsMaximal.isPrime
null
exists_disjoint_powers_of_span_eq_top (s : Set α) (hs : span s = ⊤) (I : Ideal α) (hI : I ≠ ⊤) : ∃ r ∈ s, Disjoint (I : Set α) (Submonoid.powers r) := by have ⟨M, hM, le⟩ := exists_le_maximal I hI have := hM.1.1 rw [Ne, eq_top_iff, ← hs, span_le, Set.not_subset] at this have ⟨a, has, haM⟩ := this exact ⟨a, has, Set.disjoint_left.mpr fun x hx ⟨n, hn⟩ ↦ haM (hM.isPrime.mem_of_pow_mem _ (le <| hn ▸ hx))⟩
theorem
RingTheory
[ "Mathlib.RingTheory.Ideal.Prime", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/RingTheory/Ideal/Maximal.lean
exists_disjoint_powers_of_span_eq_top
null
span_singleton_lt_span_singleton [IsDomain α] {x y : α} : span ({x} : Set α) < span ({y} : Set α) ↔ DvdNotUnit y x := by rw [lt_iff_le_not_ge, span_singleton_le_span_singleton, span_singleton_le_span_singleton, dvd_and_not_dvd_iff]
theorem
RingTheory
[ "Mathlib.RingTheory.Ideal.Prime", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/RingTheory/Ideal/Maximal.lean
span_singleton_lt_span_singleton
null
isPrime_of_maximally_disjoint (I : Ideal α) (S : Submonoid α) (disjoint : Disjoint (I : Set α) S) (maximally_disjoint : ∀ (J : Ideal α), I < J → ¬ Disjoint (J : Set α) S) : I.IsPrime where ne_top' := by rintro rfl have : 1 ∈ (S : Set α) := S.one_mem simp_all mem_or_mem' {x y} hxy := by by_contra! rid have hx := maximally_disjoint (I ⊔ span {x}) (Submodule.lt_sup_iff_notMem.mpr rid.1) have hy := maximally_disjoint (I ⊔ span {y}) (Submodule.lt_sup_iff_notMem.mpr rid.2) simp only [Set.not_disjoint_iff, SetLike.mem_coe, Submodule.mem_sup, mem_span_singleton] at hx hy obtain ⟨s₁, ⟨i₁, hi₁, ⟨_, ⟨r₁, rfl⟩, hr₁⟩⟩, hs₁⟩ := hx obtain ⟨s₂, ⟨i₂, hi₂, ⟨_, ⟨r₂, rfl⟩, hr₂⟩⟩, hs₂⟩ := hy refine disjoint.ne_of_mem (I.add_mem (I.mul_mem_left (i₁ + x * r₁) hi₂) <| I.add_mem (I.mul_mem_right (y * r₂) hi₁) <| I.mul_mem_right (r₁ * r₂) hxy) (S.mul_mem hs₁ hs₂) ?_ rw [← hr₁, ← hr₂] ring
lemma
RingTheory
[ "Mathlib.RingTheory.Ideal.Prime", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/RingTheory/Ideal/Maximal.lean
isPrime_of_maximally_disjoint
null
exists_le_prime_disjoint (S : Submonoid α) (disjoint : Disjoint (I : Set α) S) : ∃ p : Ideal α, p.IsPrime ∧ I ≤ p ∧ Disjoint (p : Set α) S := by have ⟨p, hIp, hp⟩ := zorn_le_nonempty₀ {p : Ideal α | Disjoint (p : Set α) S} (fun c hc hc' x hx ↦ ?_) I disjoint · exact ⟨p, isPrime_of_maximally_disjoint _ _ hp.1 (fun _ ↦ hp.not_prop_of_gt), hIp, hp.1⟩ cases isEmpty_or_nonempty c · exact ⟨I, disjoint, fun J hJ ↦ isEmptyElim (⟨J, hJ⟩ : c)⟩ refine ⟨sSup c, Set.disjoint_left.mpr fun x hx ↦ ?_, fun _ ↦ le_sSup⟩ have ⟨p, hp⟩ := (Submodule.mem_iSup_of_directed _ hc'.directed).mp (sSup_eq_iSup' c ▸ hx) exact Set.disjoint_left.mp (hc p.2) hp
theorem
RingTheory
[ "Mathlib.RingTheory.Ideal.Prime", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/RingTheory/Ideal/Maximal.lean
exists_le_prime_disjoint
null
exists_le_prime_notMem_of_isIdempotentElem (a : α) (ha : IsIdempotentElem a) (haI : a ∉ I) : ∃ p : Ideal α, p.IsPrime ∧ I ≤ p ∧ a ∉ p := have : Disjoint (I : Set α) (Submonoid.powers a) := Set.disjoint_right.mpr <| by rw [ha.coe_powers] rintro _ (rfl | rfl) exacts [I.ne_top_iff_one.mp (ne_of_mem_of_not_mem' Submodule.mem_top haI).symm, haI] have ⟨p, h1, h2, h3⟩ := exists_le_prime_disjoint _ _ this ⟨p, h1, h2, Set.disjoint_right.mp h3 (Submonoid.mem_powers a)⟩ @[deprecated (since := "2025-05-24")] alias exists_le_prime_nmem_of_isIdempotentElem := exists_le_prime_notMem_of_isIdempotentElem
theorem
RingTheory
[ "Mathlib.RingTheory.Ideal.Prime", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/RingTheory/Ideal/Maximal.lean
exists_le_prime_notMem_of_isIdempotentElem
null
isPrime_iff_of_isPrincipalIdealRing {P : Ideal α} (hP : P ≠ ⊥) : P.IsPrime ↔ ∃ p, Prime p ∧ P = span {p} where mp h := by obtain ⟨p, rfl⟩ := Submodule.IsPrincipal.principal P exact ⟨p, (span_singleton_prime (by simp [·] at hP)).mp h, rfl⟩ mpr := by rintro ⟨p, hp, rfl⟩ rwa [span_singleton_prime (by simp [hp.ne_zero])]
theorem
RingTheory
[ "Mathlib.RingTheory.Ideal.Prime", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/RingTheory/Ideal/Maximal.lean
isPrime_iff_of_isPrincipalIdealRing
null
isPrime_iff_of_isPrincipalIdealRing_of_noZeroDivisors [NoZeroDivisors α] [Nontrivial α] {P : Ideal α} : P.IsPrime ↔ P = ⊥ ∨ ∃ p, Prime p ∧ P = span {p} := by rw [or_iff_not_imp_left, ← forall_congr' isPrime_iff_of_isPrincipalIdealRing, ← or_iff_not_imp_left, or_iff_right_of_imp] rintro rfl; exact bot_prime
theorem
RingTheory
[ "Mathlib.RingTheory.Ideal.Prime", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/RingTheory/Ideal/Maximal.lean
isPrime_iff_of_isPrincipalIdealRing_of_noZeroDivisors
null
bot_isMaximal : IsMaximal (⊥ : Ideal K) := ⟨⟨fun h => absurd ((eq_top_iff_one (⊤ : Ideal K)).mp rfl) (by rw [← h]; simp), fun I hI => or_iff_not_imp_left.mp (eq_bot_or_top I) (ne_of_gt hI)⟩⟩
theorem
RingTheory
[ "Mathlib.RingTheory.Ideal.Prime", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/RingTheory/Ideal/Maximal.lean
bot_isMaximal
null
Nat.mem_maximalIdeal_iff {n : ℕ} : n ∈ maximalIdeal ℕ ↔ n ≠ 1 := by simp
theorem
RingTheory
[ "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Order.Ring.Int", "Mathlib.Data.Nat.Prime.Int", "Mathlib.RingTheory.Int.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.KrullDimension.Basic", "Mathlib.RingTheory.PrincipalIdealDomain" ]
Mathlib/RingTheory/Ideal/NatInt.lean
Nat.mem_maximalIdeal_iff
null
Nat.coe_maximalIdeal : (maximalIdeal ℕ : Set ℕ) = {1}ᶜ := by ext; simp
theorem
RingTheory
[ "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Order.Ring.Int", "Mathlib.Data.Nat.Prime.Int", "Mathlib.RingTheory.Int.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.KrullDimension.Basic", "Mathlib.RingTheory.PrincipalIdealDomain" ]
Mathlib/RingTheory/Ideal/NatInt.lean
Nat.coe_maximalIdeal
null
Nat.maximalIdeal_eq_span_two_three : maximalIdeal ℕ = span {2, 3} := by refine le_antisymm (fun n h ↦ ?_) (span_le.mpr <| Set.pair_subset (by simp) (by simp)) obtain lt | lt := (mem_maximalIdeal_iff.mp h).lt_or_gt · obtain rfl := lt_one_iff.mp lt; exact zero_mem _ exact mem_span_pair.mpr <| exists_add_mul_eq_of_gcd_dvd_of_mul_pred_le 2 3 n (by simp) (show 2 ≤ n by cutsat)
theorem
RingTheory
[ "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Order.Ring.Int", "Mathlib.Data.Nat.Prime.Int", "Mathlib.RingTheory.Int.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.KrullDimension.Basic", "Mathlib.RingTheory.PrincipalIdealDomain" ]
Mathlib/RingTheory/Ideal/NatInt.lean
Nat.maximalIdeal_eq_span_two_three
null
Nat.one_mem_span_iff {s : Set ℕ} : 1 ∈ span s ↔ 1 ∈ s := by rw [← SetLike.mem_coe, ← not_iff_not] simp_rw [← Set.mem_compl_iff, ← Set.singleton_subset_iff, Set.subset_compl_comm, ← coe_maximalIdeal, SetLike.coe_subset_coe, span_le]
theorem
RingTheory
[ "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Order.Ring.Int", "Mathlib.Data.Nat.Prime.Int", "Mathlib.RingTheory.Int.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.KrullDimension.Basic", "Mathlib.RingTheory.PrincipalIdealDomain" ]
Mathlib/RingTheory/Ideal/NatInt.lean
Nat.one_mem_span_iff
null
Nat.one_mem_closure_iff {s : Set ℕ} : 1 ∈ AddSubmonoid.closure s ↔ 1 ∈ s := by rw [← Submodule.span_nat_eq_addSubmonoidClosure] exact one_mem_span_iff
theorem
RingTheory
[ "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Order.Ring.Int", "Mathlib.Data.Nat.Prime.Int", "Mathlib.RingTheory.Int.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.KrullDimension.Basic", "Mathlib.RingTheory.PrincipalIdealDomain" ]
Mathlib/RingTheory/Ideal/NatInt.lean
Nat.one_mem_closure_iff
null
Ideal.isPrime_nat_iff {P : Ideal ℕ} : P.IsPrime ↔ P = ⊥ ∨ P = maximalIdeal ℕ ∨ ∃ p : ℕ, p.Prime ∧ P = span {p} := by refine .symm ⟨?_, fun h ↦ or_iff_not_imp_left.mpr fun h0 ↦ or_iff_not_imp_right.mpr fun hsp ↦ (le_maximalIdeal h.ne_top).antisymm fun n hn ↦ ?_⟩ · rintro (rfl | rfl | ⟨p, hp, rfl⟩) · exact bot_prime · exact (maximalIdeal.isMaximal ℕ).isPrime · rwa [span_singleton_prime (by simp [hp.ne_zero]), ← Nat.prime_iff] rw [← le_bot_iff, SetLike.not_le_iff_exists] at h0 classical let p := Nat.find h0 have ⟨(hp : p ∈ P), (hp0 : p ≠ 0)⟩ := Nat.find_spec h0 have : p ≠ 1 := ne_of_mem_of_not_mem hp P.one_notMem have prime : p.Prime := Nat.prime_iff_not_exists_mul_eq.mpr <| .intro (by cutsat) fun ⟨m, n, hm, hn, eq⟩ ↦ have := mul_ne_zero_iff.mp (eq ▸ hp0) (h.mem_or_mem (eq ▸ hp)).elim (Nat.find_min h0 hm ⟨·, this.1⟩) (Nat.find_min h0 hn ⟨·, this.2⟩) push_neg at hsp have ⟨q, hq, hqp⟩ := SetLike.exists_of_lt ((P.span_singleton_le_iff_mem.mpr hp).lt_of_ne (hsp p prime).symm) obtain rfl | hn1 := eq_or_ne n 0 · exact Ideal.zero_mem _ have : n ≠ 1 := Nat.mem_maximalIdeal_iff.mp hn have ⟨a, b, eq⟩ := Nat.exists_add_mul_eq_of_gcd_dvd_of_mul_pred_le p q _ (by simp [prime.coprime_iff_not_dvd.mpr (Ideal.mem_span_singleton.not.mp hqp)]) (Nat.lt_pow_self (show 1 < n by cutsat)).le exact h.mem_of_pow_mem _ (eq ▸ add_mem (P.mul_mem_left _ hp) (P.mul_mem_left _ hq))
theorem
RingTheory
[ "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Order.Ring.Int", "Mathlib.Data.Nat.Prime.Int", "Mathlib.RingTheory.Int.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.KrullDimension.Basic", "Mathlib.RingTheory.PrincipalIdealDomain" ]
Mathlib/RingTheory/Ideal/NatInt.lean
Ideal.isPrime_nat_iff
null
Ideal.map_comap_natCastRingHom_int {I : Ideal ℤ} : (I.comap (Nat.castRingHom ℤ)).map (Nat.castRingHom ℤ) = I := map_comap_le.antisymm fun n hn ↦ n.sign_mul_natAbs ▸ mul_mem_left _ _ <| mem_map_of_mem _ (mem_comap.mpr <| show (n.natAbs : ℤ) ∈ I from n.sign_mul_self ▸ mul_mem_left _ _ hn)
theorem
RingTheory
[ "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Order.Ring.Int", "Mathlib.Data.Nat.Prime.Int", "Mathlib.RingTheory.Int.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.KrullDimension.Basic", "Mathlib.RingTheory.PrincipalIdealDomain" ]
Mathlib/RingTheory/Ideal/NatInt.lean
Ideal.map_comap_natCastRingHom_int
null
Ideal.isPrime_int_iff {P : Ideal ℤ} : P.IsPrime ↔ P = ⊥ ∨ ∃ p : ℕ, p.Prime ∧ P = span {(p : ℤ)} := isPrime_iff_of_isPrincipalIdealRing_of_noZeroDivisors.trans <| or_congr_right ⟨fun ⟨p, hp, eq⟩ ↦ ⟨_, Int.prime_iff_natAbs_prime.mp hp, eq.trans p.span_natAbs.symm⟩, fun ⟨_p, hp, eq⟩ ↦ ⟨_, Nat.prime_iff_prime_int.mp hp, eq⟩⟩
theorem
RingTheory
[ "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Order.Ring.Int", "Mathlib.Data.Nat.Prime.Int", "Mathlib.RingTheory.Int.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.KrullDimension.Basic", "Mathlib.RingTheory.PrincipalIdealDomain" ]
Mathlib/RingTheory/Ideal/NatInt.lean
Ideal.isPrime_int_iff
null
ringKrullDim_nat : ringKrullDim ℕ = 2 := by refine le_antisymm (iSup_le fun s ↦ le_of_not_gt fun hs ↦ ?_) ?_ · replace hs : 2 < s.length := ENat.coe_lt_coe.mp (WithBot.coe_lt_coe.mp hs) let s := s.take ⟨3, by cutsat⟩ have : NeZero s.length := ⟨three_ne_zero⟩ have h1 : ⊥ < (s 1).asIdeal := bot_le.trans_lt (s.step 0) obtain hmax | ⟨p, hp, hsp⟩ := (Ideal.isPrime_nat_iff.mp (s 1).2).resolve_left h1.ne' · exact (le_maximalIdeal_of_isPrime (s 2).asIdeal).not_gt (hmax.symm.trans_lt (s.step 1)) obtain hmax | ⟨q, hq, hsq⟩ := (Ideal.isPrime_nat_iff.mp (s 2).2).resolve_left (h1.trans (s.step 1)).ne' · exact (le_maximalIdeal_of_isPrime (s 3).asIdeal).not_gt (hmax.symm.trans_lt (s.step 2)) · exact hq.not_isUnit <| (Ideal.span_singleton_lt_span_singleton.mp ((hsp.symm.trans_lt (s.step 1)).trans_eq hsq)).isUnit_of_irreducible_right hp · refine le_iSup_of_le ⟨2, ![⊥, ⟨_, (span_singleton_prime two_ne_zero).mpr <| Nat.prime_iff.mp Nat.prime_two⟩, ⟨_, (maximalIdeal.isMaximal ℕ).isPrime⟩], fun i ↦ ?_⟩ le_rfl fin_cases i · exact bot_lt_iff_ne_bot.mpr (Ideal.span_singleton_eq_bot.not.mpr two_ne_zero) · simp_rw [Nat.maximalIdeal_eq_span_two_three] exact SetLike.lt_iff_le_and_exists.mpr ⟨Ideal.span_mono (by simp), 3, Ideal.subset_span (by simp), Ideal.mem_span_singleton.not.mpr <| by simp⟩
theorem
RingTheory
[ "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Order.Ring.Int", "Mathlib.Data.Nat.Prime.Int", "Mathlib.RingTheory.Int.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.KrullDimension.Basic", "Mathlib.RingTheory.PrincipalIdealDomain" ]
Mathlib/RingTheory/Ideal/NatInt.lean
ringKrullDim_nat
null
nonunits (α : Type*) [Monoid α] : Set α := { a | ¬IsUnit a } @[simp]
def
RingTheory
[ "Mathlib.RingTheory.Ideal.Maximal" ]
Mathlib/RingTheory/Ideal/Nonunits.lean
nonunits
The set of non-invertible elements of a monoid.
mem_nonunits_iff [Monoid α] : a ∈ nonunits α ↔ ¬IsUnit a := Iff.rfl
theorem
RingTheory
[ "Mathlib.RingTheory.Ideal.Maximal" ]
Mathlib/RingTheory/Ideal/Nonunits.lean
mem_nonunits_iff
null
mul_mem_nonunits_right [CommMonoid α] : b ∈ nonunits α → a * b ∈ nonunits α := mt isUnit_of_mul_isUnit_right
theorem
RingTheory
[ "Mathlib.RingTheory.Ideal.Maximal" ]
Mathlib/RingTheory/Ideal/Nonunits.lean
mul_mem_nonunits_right
null
mul_mem_nonunits_left [CommMonoid α] : a ∈ nonunits α → a * b ∈ nonunits α := mt isUnit_of_mul_isUnit_left
theorem
RingTheory
[ "Mathlib.RingTheory.Ideal.Maximal" ]
Mathlib/RingTheory/Ideal/Nonunits.lean
mul_mem_nonunits_left
null
zero_mem_nonunits [MonoidWithZero α] : 0 ∈ nonunits α ↔ (0 : α) ≠ 1 := not_congr isUnit_zero_iff @[simp high] -- High priority shortcut lemma
theorem
RingTheory
[ "Mathlib.RingTheory.Ideal.Maximal" ]
Mathlib/RingTheory/Ideal/Nonunits.lean
zero_mem_nonunits
null