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
Ideal.finiteHeight_of_le {I J : Ideal R} (e : I ≤ J) (hJ : J ≠ ⊤) [FiniteHeight J] : FiniteHeight I where eq_top_or_height_ne_top := Or.inr <| by rw [← lt_top_iff_ne_top] exact (height_mono e).trans_lt (height_lt_top hJ)
lemma
RingTheory
[ "Mathlib.Algebra.Module.SpanRank", "Mathlib.RingTheory.Spectrum.Prime.Noetherian", "Mathlib.RingTheory.Ideal.MinimalPrime.Localization" ]
Mathlib/RingTheory/Ideal/Height.lean
Ideal.finiteHeight_of_le
If J has finite height and I ≤ J, then I has finite height
Ideal.mem_minimalPrimes_of_height_eq {I J : Ideal R} (e : I ≤ J) [J.IsPrime] [FiniteHeight J] (e' : J.height ≤ I.height) : J ∈ I.minimalPrimes := by obtain ⟨p, h₁, h₂⟩ := Ideal.exists_minimalPrimes_le e convert h₁ refine (eq_of_le_of_not_lt h₂ fun h₃ ↦ ?_).symm have := h₁.1.1 have := finiteHeight_of_le h₂ IsPrime.ne_top' exact lt_irrefl _ ((height_strict_mono_of_is_prime h₃).trans_le (e'.trans <| height_mono h₁.1.2))
lemma
RingTheory
[ "Mathlib.Algebra.Module.SpanRank", "Mathlib.RingTheory.Spectrum.Prime.Noetherian", "Mathlib.RingTheory.Ideal.MinimalPrime.Localization" ]
Mathlib/RingTheory/Ideal/Height.lean
Ideal.mem_minimalPrimes_of_height_eq
If J is a prime ideal containing I, and its height is less than or equal to the height of I, then J is a minimal prime over I
Ideal.primeHeight_eq_zero_iff {I : Ideal R} [I.IsPrime] : primeHeight I = 0 ↔ I ∈ minimalPrimes R := by rw [Ideal.primeHeight, Order.height_eq_zero, minimalPrimes, Ideal.minimalPrimes] simp only [bot_le, and_true, Set.mem_setOf_eq, Minimal, IsMin] constructor · intro h by_contra! h' obtain ⟨P, ⟨hP₁, ⟨hP₂, hP₃⟩⟩⟩ := h' (inferInstance) exact hP₃ (h (b := ⟨P, hP₁⟩) hP₂) · rintro ⟨hI, hI'⟩ b hb exact hI' (y := b.asIdeal) b.isPrime hb @[simp]
lemma
RingTheory
[ "Mathlib.Algebra.Module.SpanRank", "Mathlib.RingTheory.Spectrum.Prime.Noetherian", "Mathlib.RingTheory.Ideal.MinimalPrime.Localization" ]
Mathlib/RingTheory/Ideal/Height.lean
Ideal.primeHeight_eq_zero_iff
A prime ideal has height zero if and only if it is minimal
Ideal.height_bot [Nontrivial R] : (⊥ : Ideal R).height = 0 := by obtain ⟨p, hp⟩ := Ideal.nonempty_minimalPrimes (R := R) (I := ⊥) top_ne_bot.symm simp only [Ideal.height, ENat.iInf_eq_zero] exact ⟨p, hp, haveI := hp.1.1; primeHeight_eq_zero_iff.mpr hp⟩
lemma
RingTheory
[ "Mathlib.Algebra.Module.SpanRank", "Mathlib.RingTheory.Spectrum.Prime.Noetherian", "Mathlib.RingTheory.Ideal.MinimalPrime.Localization" ]
Mathlib/RingTheory/Ideal/Height.lean
Ideal.height_bot
null
@[simp, nontriviality] Ideal.height_of_subsingleton [Subsingleton R] : I.height = ⊤ := by rw [Subsingleton.elim I ⊤, Ideal.height_top]
lemma
RingTheory
[ "Mathlib.Algebra.Module.SpanRank", "Mathlib.RingTheory.Spectrum.Prime.Noetherian", "Mathlib.RingTheory.Ideal.MinimalPrime.Localization" ]
Mathlib/RingTheory/Ideal/Height.lean
Ideal.height_of_subsingleton
In a trivial commutative ring, the height of any ideal is `∞`.
Ideal.isMaximal_of_primeHeight_eq_ringKrullDim {I : Ideal R} [I.IsPrime] [FiniteRingKrullDim R] (e : I.primeHeight = ringKrullDim R) : I.IsMaximal := by have h : I ≠ ⊤ := by intro h simp only [h, ← Ideal.height_eq_primeHeight, Ideal.height_top, WithBot.coe_top] at e exact ringKrullDim_ne_top e.symm obtain ⟨M, hM, hM'⟩ := Ideal.exists_le_maximal I h rcases lt_or_eq_of_le hM' with (hM' | hM') · have h1 := Ideal.primeHeight_strict_mono hM' have h2 := e ▸ M.primeHeight_le_ringKrullDim simp [← not_lt, h1] at h2 · exact hM' ▸ hM
theorem
RingTheory
[ "Mathlib.Algebra.Module.SpanRank", "Mathlib.RingTheory.Spectrum.Prime.Noetherian", "Mathlib.RingTheory.Ideal.MinimalPrime.Localization" ]
Mathlib/RingTheory/Ideal/Height.lean
Ideal.isMaximal_of_primeHeight_eq_ringKrullDim
null
@[simp] IsLocalRing.maximalIdeal_primeHeight_eq_ringKrullDim [IsLocalRing R] : (IsLocalRing.maximalIdeal R).primeHeight = ringKrullDim R := by rw [ringKrullDim, Ideal.primeHeight, ← Order.height_top_eq_krullDim] rfl
theorem
RingTheory
[ "Mathlib.Algebra.Module.SpanRank", "Mathlib.RingTheory.Spectrum.Prime.Noetherian", "Mathlib.RingTheory.Ideal.MinimalPrime.Localization" ]
Mathlib/RingTheory/Ideal/Height.lean
IsLocalRing.maximalIdeal_primeHeight_eq_ringKrullDim
The prime height of the maximal ideal equals the Krull dimension in a local ring
@[simp] IsLocalRing.maximalIdeal_height_eq_ringKrullDim [IsLocalRing R] : (IsLocalRing.maximalIdeal R).height = ringKrullDim R := by rw [Ideal.height_eq_primeHeight, IsLocalRing.maximalIdeal_primeHeight_eq_ringKrullDim]
theorem
RingTheory
[ "Mathlib.Algebra.Module.SpanRank", "Mathlib.RingTheory.Spectrum.Prime.Noetherian", "Mathlib.RingTheory.Ideal.MinimalPrime.Localization" ]
Mathlib/RingTheory/Ideal/Height.lean
IsLocalRing.maximalIdeal_height_eq_ringKrullDim
The height of the maximal ideal equals the Krull dimension in a local ring.
Ideal.primeHeight_eq_ringKrullDim_iff [FiniteRingKrullDim R] [IsLocalRing R] {I : Ideal R} [I.IsPrime] : Ideal.primeHeight I = ringKrullDim R ↔ I = IsLocalRing.maximalIdeal R := by constructor · intro h exact IsLocalRing.eq_maximalIdeal (Ideal.isMaximal_of_primeHeight_eq_ringKrullDim h) · rintro rfl exact IsLocalRing.maximalIdeal_primeHeight_eq_ringKrullDim
theorem
RingTheory
[ "Mathlib.Algebra.Module.SpanRank", "Mathlib.RingTheory.Spectrum.Prime.Noetherian", "Mathlib.RingTheory.Ideal.MinimalPrime.Localization" ]
Mathlib/RingTheory/Ideal/Height.lean
Ideal.primeHeight_eq_ringKrullDim_iff
For a local ring with finite Krull dimension, a prime ideal has height equal to the Krull dimension if and only if it is the maximal ideal.
Ideal.height_le_iff {p : Ideal R} {n : ℕ} [p.IsPrime] : p.height ≤ n ↔ ∀ q : Ideal R, q.IsPrime → q < p → q.height < n := by rw [height_eq_primeHeight, primeHeight, Order.height_le_coe_iff, (PrimeSpectrum.equivSubtype R).forall_congr_left, Subtype.forall] congr! rw [height_eq_primeHeight, primeHeight] rfl
lemma
RingTheory
[ "Mathlib.Algebra.Module.SpanRank", "Mathlib.RingTheory.Spectrum.Prime.Noetherian", "Mathlib.RingTheory.Ideal.MinimalPrime.Localization" ]
Mathlib/RingTheory/Ideal/Height.lean
Ideal.height_le_iff
null
Ideal.height_le_iff_covBy {p : Ideal R} {n : ℕ} [p.IsPrime] [IsNoetherianRing R] : p.height ≤ n ↔ ∀ q : Ideal R, q.IsPrime → q < p → (∀ q' : Ideal R, q'.IsPrime → q < q' → ¬ q' < p) → q.height < n := by rw [Ideal.height_le_iff] constructor · intro H q hq e _ exact H q hq e · intro H q hq e obtain ⟨⟨x, hx⟩, hqx, hxp⟩ := @exists_le_covBy_of_lt { I : Ideal R // I.IsPrime } ⟨q, hq⟩ ⟨p, ‹_›⟩ _ _ e exact (Ideal.height_mono hqx).trans_lt (H _ hx hxp.1 (fun I hI e ↦ hxp.2 (show Subtype.mk x hx < ⟨I, hI⟩ from e)))
lemma
RingTheory
[ "Mathlib.Algebra.Module.SpanRank", "Mathlib.RingTheory.Spectrum.Prime.Noetherian", "Mathlib.RingTheory.Ideal.MinimalPrime.Localization" ]
Mathlib/RingTheory/Ideal/Height.lean
Ideal.height_le_iff_covBy
null
private RingEquiv.height_comap_of_isPrime {S : Type*} [CommRing S] (e : R ≃+* S) (p : Ideal S) [p.IsPrime] : (p.comap e).height = p.height := by rw [height_eq_primeHeight, height_eq_primeHeight, primeHeight, primeHeight, ← Order.height_orderIso (PrimeSpectrum.comapEquiv e.symm) ⟨p, ‹_›⟩] have := p.map_comap_of_equiv e.symm congr @[simp]
lemma
RingTheory
[ "Mathlib.Algebra.Module.SpanRank", "Mathlib.RingTheory.Spectrum.Prime.Noetherian", "Mathlib.RingTheory.Ideal.MinimalPrime.Localization" ]
Mathlib/RingTheory/Ideal/Height.lean
RingEquiv.height_comap_of_isPrime
Use `RingEquiv.height_comap` instead, which does not assume `IsPrime`.
RingEquiv.height_comap {S : Type*} [CommRing S] (e : R ≃+* S) (I : Ideal S) : (I.comap e).height = I.height := by refine (Equiv.iInf_congr e.idealComapOrderIso fun J ↦ (Equiv.iInf_congr ?_ fun h ↦ ?_).symm).symm · refine .ofIff ?_ rw [← Ideal.comap_coe, Ideal.comap_minimalPrimes_eq_of_surjective (f := (↑e : R →+* S)) e.surjective] exact e.idealComapOrderIso.injective.mem_set_image.symm · have : J.IsPrime := h.1.1 simp only [EquivLike.coe_coe, RingEquiv.idealComapOrderIso_apply, ← Ideal.height_eq_primeHeight, RingEquiv.height_comap_of_isPrime] @[simp]
lemma
RingTheory
[ "Mathlib.Algebra.Module.SpanRank", "Mathlib.RingTheory.Spectrum.Prime.Noetherian", "Mathlib.RingTheory.Ideal.MinimalPrime.Localization" ]
Mathlib/RingTheory/Ideal/Height.lean
RingEquiv.height_comap
null
RingEquiv.height_map {S : Type*} [CommRing S] (e : R ≃+* S) (I : Ideal R) : (I.map e).height = I.height := by rw [← Ideal.comap_symm e, height_comap]
lemma
RingTheory
[ "Mathlib.Algebra.Module.SpanRank", "Mathlib.RingTheory.Spectrum.Prime.Noetherian", "Mathlib.RingTheory.Ideal.MinimalPrime.Localization" ]
Mathlib/RingTheory/Ideal/Height.lean
RingEquiv.height_map
null
ringKrullDim_le_iff_height_le {R : Type*} [CommRing R] (n : WithBot ℕ∞) : ringKrullDim R ≤ n ↔ ∀ ⦃p : Ideal R⦄, p.IsPrime → p.height ≤ n := by rw [ringKrullDim, Order.krullDim_eq_iSup_height, iSup_le_iff] refine ⟨fun h p hp ↦ ?_, fun h p ↦ ?_⟩ · rw [Ideal.height_eq_primeHeight] exact h ⟨p, hp⟩ · specialize h p.2 rwa [Ideal.height_eq_primeHeight] at h
lemma
RingTheory
[ "Mathlib.Algebra.Module.SpanRank", "Mathlib.RingTheory.Spectrum.Prime.Noetherian", "Mathlib.RingTheory.Ideal.MinimalPrime.Localization" ]
Mathlib/RingTheory/Ideal/Height.lean
ringKrullDim_le_iff_height_le
`dim R ≤ n` if and only if the height of all prime ideals is less than `n`.
ringKrullDim_le_iff_isMaximal_height_le {R : Type*} [CommRing R] (n : WithBot ℕ∞) : ringKrullDim R ≤ n ↔ ∀ ⦃m : Ideal R⦄, m.IsMaximal → m.height ≤ n := by rw [ringKrullDim_le_iff_height_le] refine ⟨fun h m hm ↦ h hm.isPrime, fun h p hp ↦ ?_⟩ obtain ⟨m, hm, hle⟩ := p.exists_le_maximal hp.ne_top refine le_trans ?_ (h hm) norm_cast exact Ideal.height_mono hle
lemma
RingTheory
[ "Mathlib.Algebra.Module.SpanRank", "Mathlib.RingTheory.Spectrum.Prime.Noetherian", "Mathlib.RingTheory.Ideal.MinimalPrime.Localization" ]
Mathlib/RingTheory/Ideal/Height.lean
ringKrullDim_le_iff_isMaximal_height_le
`dim R ≤ n` if and only if the height of all maximal ideals is less than `n`.
IsLocalization.primeHeight_comap (S : Submonoid R) {A : Type*} [CommRing A] [Algebra R A] [IsLocalization S A] (J : Ideal A) [J.IsPrime] : (J.comap (algebraMap R A)).primeHeight = J.primeHeight := by rw [eq_comm, Ideal.primeHeight, Ideal.primeHeight, ← WithBot.coe_inj, Order.height_eq_krullDim_Iic, Order.height_eq_krullDim_Iic] let e := IsLocalization.orderIsoOfPrime S A have H (p : Ideal R) (hp : p ≤ J.comap (algebraMap R A)) : Disjoint (S : Set R) p := Set.disjoint_of_subset_right hp (e ⟨_, ‹J.IsPrime›⟩).2.2 exact Order.krullDim_eq_of_orderIso { toFun I := ⟨⟨I.1.1.comap (algebraMap R A), (e ⟨_, I.1.2⟩).2.1⟩, Ideal.comap_mono I.2⟩ invFun I := ⟨⟨_, (e.symm ⟨_, I.1.2, H _ I.2⟩).2⟩, Ideal.map_le_iff_le_comap.mpr I.2⟩ left_inv I := Subtype.ext <| PrimeSpectrum.ext_iff.mpr <| congrArg (fun I ↦ I.1) (e.left_inv ⟨_, I.1.2⟩) right_inv I := Subtype.ext <| PrimeSpectrum.ext_iff.mpr <| congrArg (fun I ↦ I.1) (e.right_inv ⟨_, I.1.2, H _ I.2⟩) map_rel_iff' {I₁ I₂} := @RelIso.map_rel_iff _ _ _ _ e ⟨_, I₁.1.2⟩ ⟨_, I₂.1.2⟩ }
theorem
RingTheory
[ "Mathlib.Algebra.Module.SpanRank", "Mathlib.RingTheory.Spectrum.Prime.Noetherian", "Mathlib.RingTheory.Ideal.MinimalPrime.Localization" ]
Mathlib/RingTheory/Ideal/Height.lean
IsLocalization.primeHeight_comap
null
IsLocalization.height_comap (S : Submonoid R) {A : Type*} [CommRing A] [Algebra R A] [IsLocalization S A] (J : Ideal A) : (J.comap (algebraMap R A)).height = J.height := by rw [Ideal.height, Ideal.height] simp_rw [← IsLocalization.primeHeight_comap S, IsLocalization.minimalPrimes_comap S A, ← Ideal.height_eq_primeHeight, iInf_image]
theorem
RingTheory
[ "Mathlib.Algebra.Module.SpanRank", "Mathlib.RingTheory.Spectrum.Prime.Noetherian", "Mathlib.RingTheory.Ideal.MinimalPrime.Localization" ]
Mathlib/RingTheory/Ideal/Height.lean
IsLocalization.height_comap
null
IsLocalization.AtPrime.ringKrullDim_eq_height (I : Ideal R) [I.IsPrime] (A : Type*) [CommRing A] [Algebra R A] [IsLocalization.AtPrime A I] : ringKrullDim A = I.height := by have := IsLocalization.AtPrime.isLocalRing A I rw [← IsLocalRing.maximalIdeal_primeHeight_eq_ringKrullDim, ← IsLocalization.primeHeight_comap I.primeCompl, ← IsLocalization.AtPrime.comap_maximalIdeal A I, Ideal.height_eq_primeHeight]
theorem
RingTheory
[ "Mathlib.Algebra.Module.SpanRank", "Mathlib.RingTheory.Spectrum.Prime.Noetherian", "Mathlib.RingTheory.Ideal.MinimalPrime.Localization" ]
Mathlib/RingTheory/Ideal/Height.lean
IsLocalization.AtPrime.ringKrullDim_eq_height
null
mem_minimalPrimes_of_primeHeight_eq_height {I J : Ideal R} [J.IsPrime] (e : I ≤ J) (e' : J.primeHeight = I.height) [J.FiniteHeight] : J ∈ I.minimalPrimes := by rw [← J.height_eq_primeHeight] at e' exact mem_minimalPrimes_of_height_eq e (e' ▸ le_refl _)
lemma
RingTheory
[ "Mathlib.Algebra.Module.SpanRank", "Mathlib.RingTheory.Spectrum.Prime.Noetherian", "Mathlib.RingTheory.Ideal.MinimalPrime.Localization" ]
Mathlib/RingTheory/Ideal/Height.lean
mem_minimalPrimes_of_primeHeight_eq_height
null
exists_spanRank_le_and_le_height_of_le_height [IsNoetherianRing R] (I : Ideal R) (r : ℕ) (hr : r ≤ I.height) : ∃ J ≤ I, J.spanRank ≤ r ∧ r ≤ J.height := by induction r with | zero => refine ⟨⊥, bot_le, ?_, zero_le _⟩ rw [Submodule.spanRank_bot] exact le_refl 0 | succ r ih => obtain ⟨J, h₁, h₂, h₃⟩ := ih ((WithTop.coe_le_coe.mpr r.le_succ).trans hr) let S := { K | K ∈ J.minimalPrimes ∧ Ideal.height K = r } have hS : Set.Finite S := Set.Finite.subset J.finite_minimalPrimes_of_isNoetherianRing (fun _ h => h.1) have : ¬(I : Set R) ⊆ ⋃ K ∈ hS.toFinset, (K : Set R) := by refine (Ideal.subset_union_prime ⊥ ⊥ ?_).not.mpr ?_ · rintro K hK - - rw [Set.Finite.mem_toFinset] at hK exact hK.1.1.1 · push_neg intro K hK e have := hr.trans (Ideal.height_mono e) rw [Set.Finite.mem_toFinset] at hK rw [hK.2, ← not_lt] at this norm_cast at this exact this r.lt_succ_self simp_rw [Set.not_subset, Set.mem_iUnion, not_exists, Set.Finite.mem_toFinset] at this obtain ⟨x, hx₁, hx₂⟩ := this refine ⟨J ⊔ Ideal.span {x}, sup_le h₁ ?_, ?_, ?_⟩ · rwa [Ideal.span_le, Set.singleton_subset_iff] · apply Submodule.spanRank_sup_le_sum_spanRank.trans push_cast exact add_le_add h₂ ((Submodule.spanRank_span_le_card _).trans (by simp)) · refine le_iInf₂ (fun p hp ↦ ?_) have := hp.1.1 by_cases h : p.height = ⊤ · rw [← p.height_eq_primeHeight, h] exact le_top have : p.FiniteHeight := ⟨Or.inr h⟩ have := Ideal.height_mono (le_sup_left.trans hp.1.2) suffices h : (r : ℕ∞) ≠ p.primeHeight by push_cast have := h₃.trans this rw [Ideal.height_eq_primeHeight] at this exact Order.add_one_le_of_lt (lt_of_le_of_ne this h) intro e apply hx₂ p · have : J.height = p.primeHeight := by apply le_antisymm · rwa [← p.height_eq_primeHeight] · rwa [← e] refine ⟨mem_minimalPrimes_of_primeHeight_eq_height (le_sup_left.trans hp.1.2) this.symm, ?_⟩ rwa [p.height_eq_primeHeight, eq_comm] ...
lemma
RingTheory
[ "Mathlib.Algebra.Module.SpanRank", "Mathlib.RingTheory.Spectrum.Prime.Noetherian", "Mathlib.RingTheory.Ideal.MinimalPrime.Localization" ]
Mathlib/RingTheory/Ideal/Height.lean
exists_spanRank_le_and_le_height_of_le_height
null
Ideal.sup_height_eq_ringKrullDim [Nontrivial R] : ↑(⨆ (I : Ideal R) (_ : I ≠ ⊤), I.height) = ringKrullDim R := by apply le_antisymm · rw [WithBot.coe_iSup ⟨⊤, fun _ _ => le_top⟩] refine iSup_le fun I => ?_ by_cases h : I = ⊤ · simp [h, ringKrullDim_nonneg_of_nontrivial] · simp [h, height_le_ringKrullDim_of_ne_top] · refine iSup_le fun p => WithBot.coe_le_coe.mpr (le_trans (b := p.last.asIdeal.height) ?_ ?_) · rw [height_eq_primeHeight] apply le_trans (b := ⨆ (_ : p.last ≤ p.last), ↑p.length) · exact le_iSup (fun _ => (↑p.length : ℕ∞)) le_rfl · exact le_iSup (fun p' => (⨆ _, p'.length : ℕ∞)) p · apply le_trans (b := ⨆ (_ : (p.last).asIdeal ≠ ⊤), p.last.asIdeal.height) · exact le_iSup_of_le p.last.isPrime.ne_top' le_rfl · exact le_iSup (fun I => ⨆ _, I.height) p.last.asIdeal
lemma
RingTheory
[ "Mathlib.Algebra.Module.SpanRank", "Mathlib.RingTheory.Spectrum.Prime.Noetherian", "Mathlib.RingTheory.Ideal.MinimalPrime.Localization" ]
Mathlib/RingTheory/Ideal/Height.lean
Ideal.sup_height_eq_ringKrullDim
In a nontrivial commutative ring `R`, the supremum of heights of all ideals is equal to the Krull dimension of `R`.
Ideal.sup_primeHeight_eq_ringKrullDim [Nontrivial R] : ↑(⨆ (I : Ideal R) (_ : I.IsPrime), I.primeHeight) = ringKrullDim R := by rw [← sup_height_eq_ringKrullDim, WithBot.coe_inj] apply le_antisymm · exact iSup_mono fun I => iSup_mono' fun hI => ⟨hI.ne_top, by rw [← height_eq_primeHeight]⟩ · refine iSup_mono' fun I => ?_ by_cases I_top : I = ⊤ · exact ⟨⊥, by simp [I_top]⟩ · obtain ⟨P, hP⟩ : I.minimalPrimes.Nonempty := Set.nonempty_coe_sort.mp (nonempty_minimalPrimes I_top) refine ⟨P, iSup_pos (α := ℕ∞) I_top ▸ le_iSup_of_le (hP.left.left) ?_⟩ exact iInf_le_of_le P (iInf_le_of_le hP le_rfl)
lemma
RingTheory
[ "Mathlib.Algebra.Module.SpanRank", "Mathlib.RingTheory.Spectrum.Prime.Noetherian", "Mathlib.RingTheory.Ideal.MinimalPrime.Localization" ]
Mathlib/RingTheory/Ideal/Height.lean
Ideal.sup_primeHeight_eq_ringKrullDim
In a nontrivial commutative ring `R`, the supremum of prime heights of all prime ideals is equal to the Krull dimension of `R`.
Ideal.sup_primeHeight_of_maximal_eq_ringKrullDim [Nontrivial R] : ↑(⨆ (I : Ideal R) (_ : I.IsMaximal), I.primeHeight) = ringKrullDim R := by rw [← Ideal.sup_primeHeight_eq_ringKrullDim, WithBot.coe_inj] apply le_antisymm · exact iSup_mono fun I => iSup_mono' fun hI => ⟨IsMaximal.isPrime hI, le_rfl⟩ · refine iSup_mono' fun I => ?_ obtain rfl | I_top := eq_or_ne I ⊤ · exact ⟨⊥, by grind [iSup_le_iff, Ideal.IsPrime.ne_top]⟩ · obtain ⟨M, hM, hIM⟩ := exists_le_maximal I I_top exact ⟨M, iSup_mono' (fun hI ↦ ⟨hM, primeHeight_mono hIM⟩)⟩
lemma
RingTheory
[ "Mathlib.Algebra.Module.SpanRank", "Mathlib.RingTheory.Spectrum.Prime.Noetherian", "Mathlib.RingTheory.Ideal.MinimalPrime.Localization" ]
Mathlib/RingTheory/Ideal/Height.lean
Ideal.sup_primeHeight_of_maximal_eq_ringKrullDim
In a nontrivial commutative ring `R`, the supremum of prime heights of all maximal ideals is equal to the Krull dimension of `R`.
isIdempotentElem_iff_of_fg {R : Type*} [CommRing R] (I : Ideal R) (h : I.FG) : IsIdempotentElem I ↔ ∃ e : R, IsIdempotentElem e ∧ I = R ∙ e := by constructor · intro e obtain ⟨r, hr, hr'⟩ := Submodule.exists_mem_and_smul_eq_self_of_fg_of_le_smul I I h (by rw [smul_eq_mul] exact e.ge) simp_rw [smul_eq_mul] at hr' refine ⟨r, hr' r hr, antisymm ?_ ((Submodule.span_singleton_le_iff_mem _ _).mpr hr)⟩ intro x hx rw [← hr' x hx] exact Ideal.mem_span_singleton'.mpr ⟨_, mul_comm _ _⟩ · rintro ⟨e, he, rfl⟩ simp [IsIdempotentElem, Ideal.span_singleton_mul_span_singleton, he.eq]
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Idempotent", "Mathlib.Order.Basic", "Mathlib.RingTheory.Finiteness.Nakayama" ]
Mathlib/RingTheory/Ideal/IdempotentFG.lean
isIdempotentElem_iff_of_fg
A finitely generated idempotent ideal is generated by an idempotent element
isIdempotentElem_iff_eq_bot_or_top {R : Type*} [CommRing R] [IsDomain R] (I : Ideal R) (h : I.FG) : IsIdempotentElem I ↔ I = ⊥ ∨ I = ⊤ := by constructor · intro H obtain ⟨e, he, rfl⟩ := (I.isIdempotentElem_iff_of_fg h).mp H simp only [Ideal.submodule_span_eq, Ideal.span_singleton_eq_bot] apply Or.imp id _ (IsIdempotentElem.iff_eq_zero_or_one.mp he) rintro rfl simp · rintro (rfl | rfl) <;> simp [IsIdempotentElem]
theorem
RingTheory
[ "Mathlib.Algebra.Ring.Idempotent", "Mathlib.Order.Basic", "Mathlib.RingTheory.Finiteness.Nakayama" ]
Mathlib/RingTheory/Ideal/IdempotentFG.lean
isIdempotentElem_iff_eq_bot_or_top
null
Int.ideal_span_isMaximal_of_prime (p : ℕ) [Fact (Nat.Prime p)] : (Ideal.span {(p : ℤ)}).IsMaximal := Ideal.Quotient.maximal_of_isField _ <| (Int.quotientSpanNatEquivZMod p).toMulEquiv.isField (Field.toIsField _) open Ideal variable {R : Type*}
instance
RingTheory
[ "Mathlib.Algebra.Field.ZMod", "Mathlib.RingTheory.Ideal.Norm.AbsNorm" ]
Mathlib/RingTheory/Ideal/Int.lean
Int.ideal_span_isMaximal_of_prime
null
liesOver_span_absNorm (I : Ideal R) : I.LiesOver (span {(absNorm (under ℤ I) : ℤ)}) := by rw [liesOver_iff, under_def, Int.ideal_span_absNorm_eq_self]
instance
RingTheory
[ "Mathlib.Algebra.Field.ZMod", "Mathlib.RingTheory.Ideal.Norm.AbsNorm" ]
Mathlib/RingTheory/Ideal/Int.lean
liesOver_span_absNorm
null
cast_mem_ideal_iff {d : ℤ} : (d : R) ∈ I ↔ (absNorm (under ℤ I) : ℤ) ∣ d := by rw [← mem_span_singleton, ideal_span_absNorm_eq_self, under_def, mem_comap, eq_intCast] variable (I)
theorem
RingTheory
[ "Mathlib.Algebra.Field.ZMod", "Mathlib.RingTheory.Ideal.Norm.AbsNorm" ]
Mathlib/RingTheory/Ideal/Int.lean
cast_mem_ideal_iff
null
absNorm_under_mem : (absNorm (under ℤ I) : R) ∈ I := by rw [← cast_natCast, cast_mem_ideal_iff]
theorem
RingTheory
[ "Mathlib.Algebra.Field.ZMod", "Mathlib.RingTheory.Ideal.Norm.AbsNorm" ]
Mathlib/RingTheory/Ideal/Int.lean
absNorm_under_mem
null
absNorm_under_eq_sInf : absNorm (under ℤ I) = sInf {d : ℕ | 0 < d ∧ (d : R) ∈ I} := by by_cases h : absNorm (under ℤ I) = 0 · have : {d : ℕ | 0 < d ∧ ↑d ∈ I} = ∅ := by refine Set.eq_empty_of_forall_notMem ?_ intro x ⟨hx₁, hx₂⟩ rw [← cast_natCast, cast_mem_ideal_iff, h, natCast_dvd_natCast, Nat.zero_dvd] at hx₂ rw [Nat.pos_iff_ne_zero] at hx₁ exact hx₁ hx₂ rw [h, this, Nat.sInf_empty] · have h₁ : absNorm (under ℤ I) ∈ {d : ℕ | 0 < d ∧ ↑d ∈ I} := ⟨Nat.pos_of_ne_zero h, absNorm_under_mem I⟩ refine le_antisymm ?_ (Nat.sInf_le h₁) by_contra! h₀ have h₂ := (Nat.sInf_mem (Set.nonempty_of_mem h₁)).2 rw [← cast_natCast, cast_mem_ideal_iff, natCast_dvd_natCast] at h₂ exact lt_iff_not_ge.mp h₀ <| Nat.le_of_dvd (Nat.sInf_mem (Set.nonempty_of_mem h₁)).1 h₂
theorem
RingTheory
[ "Mathlib.Algebra.Field.ZMod", "Mathlib.RingTheory.Ideal.Norm.AbsNorm" ]
Mathlib/RingTheory/Ideal/Int.lean
absNorm_under_eq_sInf
null
absNorm_under_dvd_absNorm {S : Type*} [CommRing S] [IsDedekindDomain S] [Module.Free ℤ S] (I : Ideal S) : absNorm (under ℤ I) ∣ absNorm I := by by_cases h : Finite (S ⧸ I) · have : Fintype (S ⧸ I) := Fintype.ofFinite (S ⧸ I) have h_main {d : ℕ} : (d : S) ∈ I ↔ ∀ (x : S ⧸ I), d • x = 0 := by simp_rw [nsmul_eq_mul, ← map_natCast (Ideal.Quotient.mk I), ← Quotient.eq_zero_iff_mem] exact ⟨fun h _ ↦ by simp [h], fun h ↦ by simpa using h 1⟩ rw [Ideal.absNorm_apply I, Submodule.cardQuot_apply, Nat.card_eq_fintype_card] simp_rw [absNorm_under_eq_sInf, h_main, ← AddMonoid.exponent_eq_sInf] exact AddGroup.exponent_dvd_card (G := S ⧸ I) · push_neg at h rw [show absNorm I = 0 by exact AddSubgroup.index_eq_zero_iff_infinite.mpr h] exact Nat.dvd_zero _
theorem
RingTheory
[ "Mathlib.Algebra.Field.ZMod", "Mathlib.RingTheory.Ideal.Norm.AbsNorm" ]
Mathlib/RingTheory/Ideal/Int.lean
absNorm_under_dvd_absNorm
null
Nat.absNorm_under_prime (P : Ideal R) [P.IsPrime] [NeZero P] : (absNorm (under ℤ P)).Prime := by rw [Nat.prime_iff_prime_int, ← span_singleton_prime, Int.ideal_span_absNorm_eq_self] · infer_instance · refine Int.natCast_ne_zero.mpr <| absNorm_eq_zero_iff.not.mpr ?_ have : P ≠ ⊥ := NeZero.ne _ contrapose! this exact eq_bot_of_comap_eq_bot this
theorem
RingTheory
[ "Mathlib.Algebra.Field.ZMod", "Mathlib.RingTheory.Ideal.Norm.AbsNorm" ]
Mathlib/RingTheory/Ideal/Int.lean
Nat.absNorm_under_prime
null
IsPrimary (I : Ideal R) : Prop := Submodule.IsPrimary I
abbrev
RingTheory
[ "Mathlib.RingTheory.IsPrimary", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/IsPrimary.lean
IsPrimary
A proper ideal `I` is primary as a submodule.
isPrimary_iff {I : Ideal R} : I.IsPrimary ↔ I ≠ ⊤ ∧ ∀ {x y : R}, x * y ∈ I → x ∈ I ∨ y ∈ radical I := by rw [IsPrimary, Submodule.IsPrimary, forall_comm] simp only [mul_comm, mem_radical_iff, ← Submodule.ideal_span_singleton_smul, smul_eq_mul, mul_top, span_singleton_le_iff_mem]
lemma
RingTheory
[ "Mathlib.RingTheory.IsPrimary", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/IsPrimary.lean
isPrimary_iff
A proper ideal `I` is primary iff `xy ∈ I` implies `x ∈ I` or `y ∈ radical I`.
IsPrime.isPrimary {I : Ideal R} (hi : IsPrime I) : I.IsPrimary := isPrimary_iff.mpr ⟨hi.1, fun {_ _} hxy => (hi.mem_or_mem hxy).imp id fun hyi => le_radical hyi⟩
theorem
RingTheory
[ "Mathlib.RingTheory.IsPrimary", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/IsPrimary.lean
IsPrime.isPrimary
null
isPrime_radical {I : Ideal R} (hi : I.IsPrimary) : IsPrime (radical I) := ⟨mt radical_eq_top.1 hi.1, fun {x y} ⟨m, hxy⟩ => by rw [mul_pow] at hxy; rcases (isPrimary_iff.mp hi).2 hxy with h | h · exact Or.inl ⟨m, h⟩ · exact Or.inr (mem_radical_of_pow_mem h)⟩
theorem
RingTheory
[ "Mathlib.RingTheory.IsPrimary", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/IsPrimary.lean
isPrime_radical
null
isPrimary_inf {I J : Ideal R} (hi : I.IsPrimary) (hj : J.IsPrimary) (hij : radical I = radical J) : (I ⊓ J).IsPrimary := isPrimary_iff.mpr ⟨ne_of_lt <| lt_of_le_of_lt inf_le_left (lt_top_iff_ne_top.2 hi.1), fun {x y} ⟨hxyi, hxyj⟩ => by rw [radical_inf, hij, inf_idem] rcases (isPrimary_iff.mp hi).2 hxyi with hxi | hyi · rcases (isPrimary_iff.mp hj).2 hxyj with hxj | hyj · exact Or.inl ⟨hxi, hxj⟩ · exact Or.inr hyj · rw [hij] at hyi exact Or.inr hyi⟩ open Finset in
theorem
RingTheory
[ "Mathlib.RingTheory.IsPrimary", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/IsPrimary.lean
isPrimary_inf
null
isPrimary_finset_inf {ι} {s : Finset ι} {f : ι → Ideal R} {i : ι} (hi : i ∈ s) (hs : ∀ ⦃y⦄, y ∈ s → (f y).IsPrimary) (hs' : ∀ ⦃y⦄, y ∈ s → (f y).radical = (f i).radical) : IsPrimary (s.inf f) := by classical induction s using Finset.induction_on generalizing i with | empty => simp at hi | insert a s ha IH => rcases s.eq_empty_or_nonempty with rfl | ⟨y, hy⟩ · simp only [insert_empty_eq, mem_singleton] at hi simpa [hi] using hs simp only [inf_insert] have H : ∀ ⦃x : ι⦄, x ∈ s → (f x).radical = (f y).radical := by intro x hx rw [hs' (mem_insert_of_mem hx), hs' (mem_insert_of_mem hy)] refine isPrimary_inf (hs (by simp)) (IH hy ?_ H) ?_ · intro x hx exact hs (by simp [hx]) · rw [radical_finset_inf hy H, hs' (mem_insert_self _ _), hs' (mem_insert_of_mem hy)]
lemma
RingTheory
[ "Mathlib.RingTheory.IsPrimary", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/IsPrimary.lean
isPrimary_finset_inf
null
isPrincipalSubmonoid : Submonoid (Ideal R) where carrier := {I | IsPrincipal I} mul_mem' := by rintro _ _ ⟨x, rfl⟩ ⟨y, rfl⟩ exact ⟨x * y, span_singleton_mul_span_singleton x y⟩ one_mem' := ⟨1, one_eq_span⟩
def
RingTheory
[ "Mathlib.RingTheory.PrincipalIdealDomain" ]
Mathlib/RingTheory/Ideal/IsPrincipal.lean
isPrincipalSubmonoid
The principal ideals of `R` form a submonoid of `Ideal R`.
mem_isPrincipalSubmonoid_iff {I : Ideal R} : I ∈ isPrincipalSubmonoid R ↔ IsPrincipal I := Iff.rfl
theorem
RingTheory
[ "Mathlib.RingTheory.PrincipalIdealDomain" ]
Mathlib/RingTheory/Ideal/IsPrincipal.lean
mem_isPrincipalSubmonoid_iff
null
span_singleton_mem_isPrincipalSubmonoid (a : R) : span {a} ∈ isPrincipalSubmonoid R := mem_isPrincipalSubmonoid_iff.mpr ⟨a, rfl⟩ variable (R) in
theorem
RingTheory
[ "Mathlib.RingTheory.PrincipalIdealDomain" ]
Mathlib/RingTheory/Ideal/IsPrincipal.lean
span_singleton_mem_isPrincipalSubmonoid
null
isPrincipalNonZeroDivisorsSubmonoid : Submonoid (Ideal R)⁰ where carrier := {I | IsPrincipal I.val} mul_mem' := by rintro ⟨_, _⟩ ⟨_, _⟩ ⟨x, rfl⟩ ⟨y, rfl⟩ exact ⟨x * y, by simp_rw [Submonoid.mk_mul_mk, submodule_span_eq, span_singleton_mul_span_singleton]⟩ one_mem' := ⟨1, by simp⟩ variable [IsDomain R] variable (R) in
def
RingTheory
[ "Mathlib.RingTheory.PrincipalIdealDomain" ]
Mathlib/RingTheory/Ideal/IsPrincipal.lean
isPrincipalNonZeroDivisorsSubmonoid
The non-zero-divisors principal ideals of `R` form a submonoid of `(Ideal R)⁰`.
noncomputable associatesEquivIsPrincipal : Associates R ≃ {I : Ideal R // IsPrincipal I} where toFun := _root_.Quotient.lift (fun x ↦ ⟨span {x}, x, rfl⟩) (fun _ _ _ ↦ by simpa [span_singleton_eq_span_singleton]) invFun I := .mk I.2.generator left_inv := Quotient.ind fun _ ↦ by simpa using Ideal.span_singleton_eq_span_singleton.mp (@Ideal.span_singleton_generator _ _ _ ⟨_, rfl⟩) right_inv I := by simp only [_root_.Quotient.lift_mk, span_singleton_generator, Subtype.coe_eta] @[simp]
def
RingTheory
[ "Mathlib.RingTheory.PrincipalIdealDomain" ]
Mathlib/RingTheory/Ideal/IsPrincipal.lean
associatesEquivIsPrincipal
The equivalence between `Associates R` and the principal ideals of `R` defined by sending the class of `x` to the principal ideal generated by `x`.
associatesEquivIsPrincipal_apply (x : R) : associatesEquivIsPrincipal R (.mk x) = span {x} := rfl @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.PrincipalIdealDomain" ]
Mathlib/RingTheory/Ideal/IsPrincipal.lean
associatesEquivIsPrincipal_apply
null
associatesEquivIsPrincipal_symm_apply {I : Ideal R} (hI : IsPrincipal I) : (associatesEquivIsPrincipal R).symm ⟨I, hI⟩ = .mk hI.generator := rfl
theorem
RingTheory
[ "Mathlib.RingTheory.PrincipalIdealDomain" ]
Mathlib/RingTheory/Ideal/IsPrincipal.lean
associatesEquivIsPrincipal_symm_apply
null
associatesEquivIsPrincipal_mul (x y : Associates R) : (associatesEquivIsPrincipal R (x * y) : Ideal R) = (associatesEquivIsPrincipal R x) * (associatesEquivIsPrincipal R y) := by rw [← quot_out x, ← quot_out y] simp_rw [mk_mul_mk, associatesEquivIsPrincipal_apply, span_singleton_mul_span_singleton] @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.PrincipalIdealDomain" ]
Mathlib/RingTheory/Ideal/IsPrincipal.lean
associatesEquivIsPrincipal_mul
null
associatesEquivIsPrincipal_map_zero : (associatesEquivIsPrincipal R 0 : Ideal R) = 0 := by rw [← mk_zero, associatesEquivIsPrincipal_apply, Submodule.zero_eq_bot, span_singleton_eq_bot] @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.PrincipalIdealDomain" ]
Mathlib/RingTheory/Ideal/IsPrincipal.lean
associatesEquivIsPrincipal_map_zero
null
associatesEquivIsPrincipal_map_one : (associatesEquivIsPrincipal R 1 : Ideal R) = 1 := by rw [one_eq_mk_one, associatesEquivIsPrincipal_apply, span_singleton_one, one_eq_top] variable (R) in
theorem
RingTheory
[ "Mathlib.RingTheory.PrincipalIdealDomain" ]
Mathlib/RingTheory/Ideal/IsPrincipal.lean
associatesEquivIsPrincipal_map_one
null
noncomputable associatesMulEquivIsPrincipal : Associates R ≃* isPrincipalSubmonoid R where __ := associatesEquivIsPrincipal R map_mul' _ _ := by rw [Subtype.ext_iff] erw [associatesEquivIsPrincipal_mul] rfl variable (R) in
def
RingTheory
[ "Mathlib.RingTheory.PrincipalIdealDomain" ]
Mathlib/RingTheory/Ideal/IsPrincipal.lean
associatesMulEquivIsPrincipal
The `MulEquiv` version of `Ideal.associatesEquivIsPrincipal`.
noncomputable associatesNonZeroDivisorsEquivIsPrincipal : Associates R⁰ ≃ {I : (Ideal R)⁰ // IsPrincipal (I : Ideal R)} := calc Associates R⁰ ≃ (Associates R)⁰ := associatesNonZeroDivisorsEquiv.toEquiv.symm _ ≃ {I : {I : Ideal R // IsPrincipal I} // I.1 ∈ (Ideal R)⁰} := Equiv.subtypeEquiv (associatesEquivIsPrincipal R) (fun x ↦ by rw [← quot_out x, mk_mem_nonZeroDivisors_associates, associatesEquivIsPrincipal_apply, span_singleton_nonZeroDivisors]) _ ≃ {I : Ideal R // IsPrincipal I ∧ I ∈ (Ideal R)⁰} := Equiv.subtypeSubtypeEquivSubtypeInter (fun I ↦ IsPrincipal I) (fun I ↦ I ∈ (Ideal R)⁰) _ ≃ {I : Ideal R // I ∈ (Ideal R)⁰ ∧ IsPrincipal I} := Equiv.setCongr (by simp_rw [and_comm]) _ ≃ {I : (Ideal R)⁰ // IsPrincipal I.1} := (Equiv.subtypeSubtypeEquivSubtypeInter _ _).symm @[simp]
def
RingTheory
[ "Mathlib.RingTheory.PrincipalIdealDomain" ]
Mathlib/RingTheory/Ideal/IsPrincipal.lean
associatesNonZeroDivisorsEquivIsPrincipal
A version of `Ideal.associatesEquivIsPrincipal` for non-zero-divisors generators.
associatesNonZeroDivisorsEquivIsPrincipal_apply (x : R⁰) : associatesNonZeroDivisorsEquivIsPrincipal R (.mk x) = Ideal.span {(x : R)} := rfl
theorem
RingTheory
[ "Mathlib.RingTheory.PrincipalIdealDomain" ]
Mathlib/RingTheory/Ideal/IsPrincipal.lean
associatesNonZeroDivisorsEquivIsPrincipal_apply
null
associatesNonZeroDivisorsEquivIsPrincipal_coe (x : Associates R⁰) : (associatesNonZeroDivisorsEquivIsPrincipal R x : Ideal R) = (associatesEquivIsPrincipal R (associatesNonZeroDivisorsEquiv.symm x)) := rfl
theorem
RingTheory
[ "Mathlib.RingTheory.PrincipalIdealDomain" ]
Mathlib/RingTheory/Ideal/IsPrincipal.lean
associatesNonZeroDivisorsEquivIsPrincipal_coe
null
associatesNonZeroDivisorsEquivIsPrincipal_mul (x y : Associates R⁰) : (associatesNonZeroDivisorsEquivIsPrincipal R (x * y) : Ideal R) = (associatesNonZeroDivisorsEquivIsPrincipal R x) * (associatesNonZeroDivisorsEquivIsPrincipal R y) := by simp_rw [associatesNonZeroDivisorsEquivIsPrincipal_coe, map_mul, Submonoid.coe_mul, associatesEquivIsPrincipal_mul] @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.PrincipalIdealDomain" ]
Mathlib/RingTheory/Ideal/IsPrincipal.lean
associatesNonZeroDivisorsEquivIsPrincipal_mul
null
associatesNonZeroDivisorsEquivIsPrincipal_map_one : (associatesNonZeroDivisorsEquivIsPrincipal R 1 : Ideal R) = 1 := by rw [associatesNonZeroDivisorsEquivIsPrincipal_coe, map_one, OneMemClass.coe_one, associatesEquivIsPrincipal_map_one] variable (R) in
theorem
RingTheory
[ "Mathlib.RingTheory.PrincipalIdealDomain" ]
Mathlib/RingTheory/Ideal/IsPrincipal.lean
associatesNonZeroDivisorsEquivIsPrincipal_map_one
null
noncomputable associatesNonZeroDivisorsMulEquivIsPrincipal : Associates R⁰ ≃* (isPrincipalNonZeroDivisorsSubmonoid R) where __ := associatesNonZeroDivisorsEquivIsPrincipal R map_mul' _ _ := by rw [Subtype.ext_iff, Subtype.ext_iff, Equiv.toFun_as_coe, associatesNonZeroDivisorsEquivIsPrincipal_mul] rfl
def
RingTheory
[ "Mathlib.RingTheory.PrincipalIdealDomain" ]
Mathlib/RingTheory/Ideal/IsPrincipal.lean
associatesNonZeroDivisorsMulEquivIsPrincipal
The `MulEquiv` version of `Ideal.associatesNonZeroDivisorsEquivIsPrincipal`.
noncomputable isoBaseOfIsPrincipal {I : Ideal R} [hprinc : I.IsPrincipal] (hI : I ≠ ⊥) : R ≃ₗ[R] I := letI x := IsPrincipal.generator I have hx : x ≠ 0 := by rwa [Ne, ← IsPrincipal.eq_bot_iff_generator_eq_zero] (LinearEquiv.toSpanNonzeroSingleton R R x hx).trans (LinearEquiv.ofEq (Submodule.span R {x}) I (IsPrincipal.span_singleton_generator I)) @[simp]
def
RingTheory
[ "Mathlib.RingTheory.PrincipalIdealDomain" ]
Mathlib/RingTheory/Ideal/IsPrincipal.lean
isoBaseOfIsPrincipal
A nonzero principal ideal in an integral domain `R` is isomorphic to `R` as a module. The isomorphism we choose here sends `1` to the generator chosen by `Ideal.generator`.
isoBaseOfIsPrincipal_apply {I : Ideal R} [hprinc : I.IsPrincipal] (hI : I ≠ ⊥) (x : R) : (Ideal.isoBaseOfIsPrincipal hI) x = x * IsPrincipal.generator I := rfl
theorem
RingTheory
[ "Mathlib.RingTheory.PrincipalIdealDomain" ]
Mathlib/RingTheory/Ideal/IsPrincipal.lean
isoBaseOfIsPrincipal_apply
null
subtype_isoBaseOfIsPrincipal_eq_mul {I : Ideal R} [hprinc : I.IsPrincipal] (h : I ≠ ⊥) : Submodule.subtype I ∘ₗ ↑(Ideal.isoBaseOfIsPrincipal h) = LinearMap.mul R R (IsPrincipal.generator I) := by ext simp
theorem
RingTheory
[ "Mathlib.RingTheory.PrincipalIdealDomain" ]
Mathlib/RingTheory/Ideal/IsPrincipal.lean
subtype_isoBaseOfIsPrincipal_eq_mul
null
noncomputable quotEquivPowQuotPowSucc (h : I.IsPrincipal) (h' : I ≠ ⊥) (n : ℕ) : (R ⧸ I) ≃ₗ[R] (I ^ n : Ideal R) ⧸ (I • ⊤ : Submodule R (I ^ n : Ideal R)) := by let f : (I ^ n : Ideal R) →ₗ[R] (I ^ n : Ideal R) ⧸ (I • ⊤ : Submodule R (I ^ n : Ideal R)) := Submodule.mkQ _ let ϖ := h.principal.choose have hI : I = Ideal.span {ϖ} := h.principal.choose_spec have hϖ : ϖ ^ n ∈ I ^ n := hI ▸ (Ideal.pow_mem_pow (Ideal.mem_span_singleton_self _) n) let g : R →ₗ[R] (I ^ n : Ideal R) := (LinearMap.mulRight R ϖ^n).codRestrict _ fun x ↦ by simp only [LinearMap.pow_mulRight, LinearMap.mulRight_apply] exact Ideal.mul_mem_left _ _ hϖ have : I = LinearMap.ker (f.comp g) := by ext x simp only [LinearMap.codRestrict, LinearMap.pow_mulRight, LinearMap.mulRight_apply, LinearMap.mem_ker, LinearMap.coe_comp, LinearMap.coe_mk, AddHom.coe_mk, Function.comp_apply, Submodule.mkQ_apply, Submodule.Quotient.mk_eq_zero, Submodule.mem_smul_top_iff, smul_eq_mul, f, g] constructor <;> intro hx · exact Submodule.mul_mem_mul hx hϖ · rw [← pow_succ', hI, Ideal.span_singleton_pow, Ideal.mem_span_singleton] at hx obtain ⟨y, hy⟩ := hx rw [mul_comm, pow_succ, mul_assoc, mul_right_inj' (pow_ne_zero _ _)] at hy · rw [hI, Ideal.mem_span_singleton] exact ⟨y, hy⟩ · contrapose! h' rw [hI, h', Ideal.span_singleton_eq_bot] let e : (R ⧸ I) ≃ₗ[R] R ⧸ (LinearMap.ker (f.comp g)) := Submodule.quotEquivOfEq I (LinearMap.ker (f ∘ₗ g)) this refine e.trans ((f.comp g).quotKerEquivOfSurjective ?_) refine (Submodule.mkQ_surjective _).comp ?_ rintro ⟨x, hx⟩ rw [hI, Ideal.span_singleton_pow, Ideal.mem_span_singleton] at hx refine hx.imp ?_ simp [g, LinearMap.codRestrict, eq_comm, mul_comm]
def
RingTheory
[ "Mathlib.LinearAlgebra.Isomorphisms", "Mathlib.RingTheory.Ideal.Operations", "Mathlib.RingTheory.Ideal.Quotient.Defs" ]
Mathlib/RingTheory/Ideal/IsPrincipalPowQuotient.lean
quotEquivPowQuotPowSucc
For a principal ideal `I`, `R ⧸ I ≃ₗ[R] I ^ n ⧸ I ^ (n + 1)`. To convert into a form that uses the ideal of `R ⧸ I ^ (n + 1)`, compose with `Ideal.powQuotPowSuccLinearEquivMapMkPowSuccPow`.
noncomputable quotEquivPowQuotPowSuccEquiv (h : I.IsPrincipal) (h' : I ≠ ⊥) (n : ℕ) : (R ⧸ I) ≃ (I ^ n : Ideal R) ⧸ (I • ⊤ : Submodule R (I ^ n : Ideal R)) := quotEquivPowQuotPowSucc h h' n
def
RingTheory
[ "Mathlib.LinearAlgebra.Isomorphisms", "Mathlib.RingTheory.Ideal.Operations", "Mathlib.RingTheory.Ideal.Quotient.Defs" ]
Mathlib/RingTheory/Ideal/IsPrincipalPowQuotient.lean
quotEquivPowQuotPowSuccEquiv
For a principal ideal `I`, `R ⧸ I ≃ I ^ n ⧸ I ^ (n + 1)`. Supplied as a plain equiv to bypass typeclass synthesis issues on complex `Module` goals. To convert into a form that uses the ideal of `R ⧸ I ^ (n + 1)`, compose with `Ideal.powQuotPowSuccEquivMapMkPowSuccPow`.
IsLocalRing.quotient_artinian_of_mem_minimalPrimes_of_isLocalRing [IsLocalRing R] (I : Ideal R) (hp : IsLocalRing.maximalIdeal R ∈ I.minimalPrimes) : IsArtinianRing (R ⧸ I) := have : Ring.KrullDimLE 0 (R ⧸ I) := Ring.krullDimLE_zero_iff.mpr fun J prime ↦ Ideal.isMaximal_of_isIntegral_of_isMaximal_comap _ <| by convert IsLocalRing.maximalIdeal.isMaximal R rw [Ideal.minimalPrimes, Set.mem_setOf] at hp have := prime.comap (Ideal.Quotient.mk I) exact hp.eq_of_le ⟨this, .trans (by simp) (Ideal.ker_le_comap _)⟩ (le_maximalIdeal this.1) IsNoetherianRing.isArtinianRing_of_krullDimLE_zero
lemma
RingTheory
[ "Mathlib.RingTheory.HopkinsLevitzki", "Mathlib.RingTheory.Ideal.Height", "Mathlib.RingTheory.Localization.Submodule", "Mathlib.RingTheory.Nakayama" ]
Mathlib/RingTheory/Ideal/KrullsHeightTheorem.lean
IsLocalRing.quotient_artinian_of_mem_minimalPrimes_of_isLocalRing
null
Ideal.height_le_one_of_isPrincipal_of_mem_minimalPrimes_of_isLocalRing [IsLocalRing R] (I : Ideal R) [I.IsPrincipal] (hp : (IsLocalRing.maximalIdeal R) ∈ I.minimalPrimes) : (IsLocalRing.maximalIdeal R).height ≤ 1 := by refine Ideal.height_le_iff.mpr fun q h₁ h₂ ↦ ?_ suffices q.height = 0 by rw [this]; exact zero_lt_one rw [← WithBot.coe_inj, ← IsLocalization.AtPrime.ringKrullDim_eq_height q (Localization.AtPrime q), WithBot.coe_zero, ← ringKrullDimZero_iff_ringKrullDim_eq_zero, ← isArtinianRing_iff_krullDimLE_zero, isArtinianRing_iff_isNilpotent_maximalIdeal, ← Localization.AtPrime.map_eq_maximalIdeal] have : IsArtinianRing (R ⧸ I) := IsLocalRing.quotient_artinian_of_mem_minimalPrimes_of_isLocalRing I hp let f := algebraMap R (Localization.AtPrime q) let qs : ℕ →o (Ideal (R ⧸ I))ᵒᵈ := { toFun n := ((q.map f ^ n).comap f).map (Ideal.Quotient.mk I) monotone' i j e := Ideal.map_mono (Ideal.comap_mono (Ideal.pow_le_pow_right e)) } obtain ⟨n, hn⟩ := IsArtinian.monotone_stabilizes qs refine ⟨n, ?_⟩ apply Submodule.eq_bot_of_le_smul_of_le_jacobson_bot (q.map f) _ (IsNoetherian.noetherian _) rotate_left · rw [IsLocalRing.jacobson_eq_maximalIdeal, Localization.AtPrime.map_eq_maximalIdeal] exact bot_ne_top rw [smul_eq_mul, ← pow_succ', ← (IsLocalization.orderEmbedding q.primeCompl (Localization.AtPrime q)).map_rel_iff] refine Submodule.le_of_le_smul_of_le_jacobson_bot (I := I) (IsNoetherian.noetherian _) ?_ ?_ · rw [IsLocalRing.jacobson_eq_maximalIdeal] exacts [hp.1.2, bot_ne_top] · replace hn := congr(Ideal.comap (Ideal.Quotient.mk I) $(hn _ n.le_succ)) simp only [qs, OrderHom.coe_mk, ← RingHom.ker_eq_comap_bot, Ideal.mk_ker, Ideal.comap_map_of_surjective _ Ideal.Quotient.mk_surjective] at hn intro x hx obtain ⟨y, hy, z, hz, rfl⟩ := Submodule.mem_sup.mp (hn.le (Ideal.mem_sup_left hx)) refine Submodule.add_mem_sup hy ?_ obtain ⟨z, rfl⟩ := (Submodule.IsPrincipal.mem_iff_eq_smul_generator I).mp hz rw [smul_eq_mul, smul_eq_mul, mul_comm] refine Ideal.mul_mem_mul ?_ (Submodule.IsPrincipal.generator_mem _) dsimp [IsLocalization.orderEmbedding] at hx rwa [Ideal.mem_comap, f.map_add, f.map_mul, Ideal.add_mem_iff_right _ (Ideal.pow_le_pow_right n.le_succ hy), mul_comm, Ideal.unit_mul_mem_iff_mem] at hx refine IsLocalization.map_units (M := q.primeCompl) _ ⟨_, ?_⟩ change Submodule.IsPrincipal.generator I ∉ (↑q : Set R) rw [← Set.singleton_subset_iff, ← Ideal.span_le, Ideal.span_singleton_generator] exact fun e ↦ h₂.not_ge (hp.2 ⟨h₁, e⟩ h₂.le)
lemma
RingTheory
[ "Mathlib.RingTheory.HopkinsLevitzki", "Mathlib.RingTheory.Ideal.Height", "Mathlib.RingTheory.Localization.Submodule", "Mathlib.RingTheory.Nakayama" ]
Mathlib/RingTheory/Ideal/KrullsHeightTheorem.lean
Ideal.height_le_one_of_isPrincipal_of_mem_minimalPrimes_of_isLocalRing
null
Ideal.height_le_one_of_isPrincipal_of_mem_minimalPrimes (I : Ideal R) [I.IsPrincipal] (p : Ideal R) (hp : p ∈ I.minimalPrimes) : p.height ≤ 1 := by have := hp.1.1 let f := algebraMap R (Localization.AtPrime p) have := Ideal.height_le_one_of_isPrincipal_of_mem_minimalPrimes_of_isLocalRing (I.map f) ?_ · rwa [← IsLocalization.height_comap p.primeCompl, Localization.AtPrime.comap_maximalIdeal] at this · rwa [IsLocalization.minimalPrimes_map p.primeCompl (Localization.AtPrime p) I, Set.mem_preimage, Localization.AtPrime.comap_maximalIdeal]
lemma
RingTheory
[ "Mathlib.RingTheory.HopkinsLevitzki", "Mathlib.RingTheory.Ideal.Height", "Mathlib.RingTheory.Localization.Submodule", "Mathlib.RingTheory.Nakayama" ]
Mathlib/RingTheory/Ideal/KrullsHeightTheorem.lean
Ideal.height_le_one_of_isPrincipal_of_mem_minimalPrimes
**Krull's principal ideal theorem** (also known as **Krullscher Hauptidealsatz**) : In a commutative Noetherian ring `R`, any prime ideal that is minimal over a principal ideal has height at most 1.
Ideal.map_height_le_one_of_mem_minimalPrimes {I p : Ideal R} {x : R} (hp : p ∈ (I ⊔ span {x}).minimalPrimes) : (p.map (Ideal.Quotient.mk I)).height ≤ 1 := let f := Ideal.Quotient.mk I have : p.IsPrime := hp.1.1 have hfp : RingHom.ker f ≤ p := I.mk_ker.trans_le (le_sup_left.trans hp.1.2) height_le_one_of_isPrincipal_of_mem_minimalPrimes ((span {x}).map f) (p.map f) ⟨⟨map_isPrime_of_surjective Quotient.mk_surjective hfp, map_mono (le_sup_right.trans hp.1.2)⟩, fun _ ⟨hr, hxr⟩ hrp ↦ map_le_iff_le_comap.mpr <| hp.2 ⟨hr.comap f, sup_le_iff.mpr ⟨I.mk_ker.symm.trans_le <| ker_le_comap (Ideal.Quotient.mk I), le_comap_of_map_le hxr⟩⟩ <| (comap_mono hrp).trans <| Eq.le <| (p.comap_map_of_surjective _ Quotient.mk_surjective).trans <| sup_eq_left.mpr hfp⟩
theorem
RingTheory
[ "Mathlib.RingTheory.HopkinsLevitzki", "Mathlib.RingTheory.Ideal.Height", "Mathlib.RingTheory.Localization.Submodule", "Mathlib.RingTheory.Nakayama" ]
Mathlib/RingTheory/Ideal/KrullsHeightTheorem.lean
Ideal.map_height_le_one_of_mem_minimalPrimes
null
Ideal.mem_minimalPrimes_span_of_mem_minimalPrimes_span_insert {q p : Ideal R} [q.IsPrime] (hqp : q < p) (x : R) (s : Set R) (hp : p ∈ (span (insert x s)).minimalPrimes) (t : Set R) (htq : t ⊆ q) (hsp : s ⊆ (span (insert x t)).radical) : q ∈ (span t).minimalPrimes := by let f := Quotient.mk (span t) have hf : Function.Surjective f := Quotient.mk_surjective have hI'q : span t ≤ q := span_le.mpr htq have hI'p : span t ≤ p := hI'q.trans hqp.le have := minimalPrimes_isPrime hp have : (p.map f).IsPrime := map_isPrime_of_surjective hf (by rwa [mk_ker]) suffices h : (p.map f).height ≤ 1 by have h_lt : q.map f < p.map f := (map_mono hqp.le).lt_of_not_ge fun e ↦ hqp.not_ge <| by simpa only [comap_map_of_surjective f hf, ← RingHom.ker_eq_comap_bot, f, mk_ker, sup_eq_left.mpr hI'q, sup_eq_left.mpr hI'p] using comap_mono (f := f) e have : (q.map f).IsPrime := map_isPrime_of_surjective hf (by rwa [mk_ker]) have : (p.map f).FiniteHeight := ⟨Or.inr (h.trans_lt (WithTop.coe_lt_top 1)).ne⟩ rw [height_eq_primeHeight] at h have := (primeHeight_strict_mono h_lt).trans_le h rw [ENat.lt_one_iff_eq_zero, primeHeight_eq_zero_iff] at this have := minimal_primes_comap_of_surjective hf this rwa [comap_map_of_surjective f hf, ← RingHom.ker_eq_comap_bot, mk_ker, sup_eq_left.mpr hI'q] at this refine height_le_one_of_isPrincipal_of_mem_minimalPrimes ((span {x}).map f) (p.map f) ⟨⟨this, map_mono <| span_le.mpr <| Set.singleton_subset_iff.mpr <| hp.1.2 <| subset_span <| .inl rfl⟩, fun r ⟨hr, hxr⟩ hrp ↦ map_le_iff_le_comap.mpr (hp.2 ⟨hr.comap f, ?_⟩ ?_)⟩ · rw [span_le, Set.insert_subset_iff] have := map_le_iff_le_comap.mp hxr (subset_span rfl) refine ⟨this, hsp.trans ((hr.comap f).isRadical.radical_le_iff.mpr ?_)⟩ rw [span_le, Set.insert_subset_iff] exact ⟨this, span_le.mp (mk_ker.symm.trans_le (ker_le_comap _))⟩ · conv_rhs => rw [← sup_eq_left.mpr hI'p, ← (span t).mk_ker, RingHom.ker_eq_comap_bot, ← comap_map_of_surjective f hf p] exact comap_mono hrp open IsLocalRing in
theorem
RingTheory
[ "Mathlib.RingTheory.HopkinsLevitzki", "Mathlib.RingTheory.Ideal.Height", "Mathlib.RingTheory.Localization.Submodule", "Mathlib.RingTheory.Nakayama" ]
Mathlib/RingTheory/Ideal/KrullsHeightTheorem.lean
Ideal.mem_minimalPrimes_span_of_mem_minimalPrimes_span_insert
If `q < p` are prime ideals such that `p` is minimal over `span (s ∪ {x})` and `t` is a set contained in `q` such that `s ⊆ √span (t ∪ {x})`, then `q` is minimal over `span t`. This is used in the induction step for the proof of Krull's height theorem.
Ideal.height_le_spanRank_toENat (I : Ideal R) (hI : I ≠ ⊤) : I.height ≤ I.spanRank.toENat := by obtain ⟨J, hJ⟩ := nonempty_minimalPrimes hI refine (iInf₂_le J hJ).trans ?_ convert (I.height_le_spanRank_toENat_of_mem_minimal_primes J hJ) exact Eq.symm (@height_eq_primeHeight _ _ J hJ.1.1)
lemma
RingTheory
[ "Mathlib.RingTheory.HopkinsLevitzki", "Mathlib.RingTheory.Ideal.Height", "Mathlib.RingTheory.Localization.Submodule", "Mathlib.RingTheory.Nakayama" ]
Mathlib/RingTheory/Ideal/KrullsHeightTheorem.lean
Ideal.height_le_spanRank_toENat
**Krull's height theorem** (also known as **Krullscher Höhensatz**) : In a commutative Noetherian ring `R`, any prime ideal that is minimal over an ideal generated by `n` elements has height at most `n`. -/ nonrec lemma Ideal.height_le_spanRank_toENat_of_mem_minimal_primes (I : Ideal R) (p : Ideal R) (hp : p ∈ I.minimalPrimes) : p.height ≤ I.spanRank.toENat := by classical rw [I.spanRank_toENat_eq_iInf_finset_card, le_iInf_iff] rintro ⟨s, (rfl : span s = I)⟩ induction hn : s.card using Nat.strong_induction_on generalizing R with | h n H => replace hn : s.card ≤ n := hn.le have := hp.1.1 cases n with | zero => rw [ENat.coe_zero, nonpos_iff_eq_zero, height_eq_primeHeight p, primeHeight_eq_zero_iff, minimalPrimes] simp_all | succ n => wlog hR : ∃ (_ : IsLocalRing R), p = maximalIdeal R · rw [← Localization.AtPrime.comap_maximalIdeal (I := p)] at hp ⊢ rw [IsLocalization.height_comap p.primeCompl] rw [← Set.mem_preimage, ← IsLocalization.minimalPrimes_map p.primeCompl, map_span] at hp exact this _ (s.image (algebraMap R (Localization p.primeCompl))) (by simpa using hp) inferInstance _ H (Finset.card_image_le.trans hn) ⟨inferInstance, rfl⟩ obtain ⟨_, rfl⟩ := hR simp_rw [height_le_iff_covBy, ENat.coe_add, ENat.coe_one, ENat.lt_coe_add_one_iff] intro q hq hpq hq' obtain ⟨x, s', hxs', rfl, hxq⟩ : ∃ x s', x ∉ s' ∧ s = insert x s' ∧ x ∉ q := by have : ¬(s : Set R) ⊆ q := by rw [← span_le] exact fun e ↦ lt_irrefl _ ((hp.2 ⟨hq, e⟩ hpq.le).trans_lt hpq) obtain ⟨x, hxt, hxq⟩ := Set.not_subset.mp this exact ⟨x, _, fun e ↦ (Finset.mem_erase.mp e).1 rfl, (Finset.insert_erase hxt).symm, hxq⟩ have : maximalIdeal R ≤ (q ⊔ span {x}).radical := by rw [radical_eq_sInf, le_sInf_iff] exact fun J ⟨hJ, hJ'⟩ ↦ by_contra fun h ↦ hq' J hJ' ((SetLike.lt_iff_le_and_exists.mpr ⟨le_sup_left, x, mem_sup_right (mem_span_singleton_self _), hxq⟩).trans_le hJ) ((le_maximalIdeal hJ'.ne_top).lt_of_not_ge h) have h : (s' : Set R) ⊆ (q ⊔ span {x}).radical := by have := hp.1.2.trans this rw [span_le, Finset.coe_insert, Set.insert_subset_iff] at this exact this.2 obtain ⟨t, ht, hspan⟩ := exists_subset_radical_span_sup_of_subset_radical_sup _ _ _ h let t := Finset.univ.image t suffices hq : q ∈ (span t).minimalPrimes from have tcard : t.card ≤ n := Nat.le_of_lt_succ ((Finset.card_image_le.trans_lt <| by simpa using Finset.card_lt_card (Finset.ssubset_insert hxs')).trans_le hn) (H _ (tcard.trans_lt n.lt_succ_self) q t hq rfl).trans (by norm_cast) rw [Finset.coe_insert] at hp convert mem_minimalPrimes_span_of_mem_minimalPrimes_span_insert hpq _ _ hp _ ht ?_ · simp [t] refine hspan.trans <| radical_mono ?_ rw [← Set.union_singleton, span_union] /-- In a commutative Noetherian ring `R`, the height of a (finitely-generated) ideal is smaller than or equal to the minimum number of generators for this ideal.
Ideal.height_le_spanFinrank (I : Ideal R) (hI : I ≠ ⊤) : I.height ≤ I.spanFinrank := by have : I.spanFinrank = I.spanRank.toENat := by rw [Submodule.fg_iff_spanRank_eq_spanFinrank.mpr (IsNoetherian.noetherian I), map_natCast] exact this ▸ height_le_spanRank_toENat I hI
lemma
RingTheory
[ "Mathlib.RingTheory.HopkinsLevitzki", "Mathlib.RingTheory.Ideal.Height", "Mathlib.RingTheory.Localization.Submodule", "Mathlib.RingTheory.Nakayama" ]
Mathlib/RingTheory/Ideal/KrullsHeightTheorem.lean
Ideal.height_le_spanFinrank
null
Ideal.height_le_spanRank (I : Ideal R) (hI : I ≠ ⊤) : I.height ≤ I.spanRank := by trans ↑I.spanRank.toENat · exact_mod_cast I.height_le_spanRank_toENat hI · exact I.spanRank.ofENat_toENat_le
lemma
RingTheory
[ "Mathlib.RingTheory.HopkinsLevitzki", "Mathlib.RingTheory.Ideal.Height", "Mathlib.RingTheory.Localization.Submodule", "Mathlib.RingTheory.Nakayama" ]
Mathlib/RingTheory/Ideal/KrullsHeightTheorem.lean
Ideal.height_le_spanRank
null
Ideal.finiteHeight_of_isNoetherianRing (I : Ideal R) : I.FiniteHeight := finiteHeight_iff_lt.mpr <| Or.elim (em (I = ⊤)) Or.inl fun h ↦ Or.inr <| (I.height_le_spanFinrank h).trans_lt (ENat.coe_lt_top _)
instance
RingTheory
[ "Mathlib.RingTheory.HopkinsLevitzki", "Mathlib.RingTheory.Ideal.Height", "Mathlib.RingTheory.Localization.Submodule", "Mathlib.RingTheory.Nakayama" ]
Mathlib/RingTheory/Ideal/KrullsHeightTheorem.lean
Ideal.finiteHeight_of_isNoetherianRing
null
Ideal.exists_spanRank_eq_and_height_eq (I : Ideal R) (hI : I ≠ ⊤) : ∃ J ≤ I, J.spanRank = I.height ∧ J.height = I.height := by obtain ⟨J, hJ₁, hJ₂, hJ₃⟩ := exists_spanRank_le_and_le_height_of_le_height I _ (ENat.coe_toNat_le_self I.height) rw [ENat.coe_toNat_eq_self.mpr (Ideal.height_ne_top hI)] at hJ₃ refine ⟨J, hJ₁, le_antisymm ?_ (le_trans ?_ (J.height_le_spanRank ?_)), le_antisymm (Ideal.height_mono hJ₁) hJ₃⟩ · convert hJ₂ exact Cardinal.ofENat_eq_nat.mpr (ENat.coe_toNat (I.height_ne_top hI)).symm · exact Cardinal.ofENat_le_ofENat_of_le hJ₃ · rintro rfl exact hI (top_le_iff.mp hJ₁)
lemma
RingTheory
[ "Mathlib.RingTheory.HopkinsLevitzki", "Mathlib.RingTheory.Ideal.Height", "Mathlib.RingTheory.Localization.Submodule", "Mathlib.RingTheory.Nakayama" ]
Mathlib/RingTheory/Ideal/KrullsHeightTheorem.lean
Ideal.exists_spanRank_eq_and_height_eq
null
Ideal.height_le_iff_exists_minimalPrimes (p : Ideal R) [p.IsPrime] (n : ℕ∞) : p.height ≤ n ↔ ∃ I : Ideal R, p ∈ I.minimalPrimes ∧ I.spanRank ≤ n := by constructor · intro h obtain ⟨I, hI, e₁, e₂⟩ := exists_spanRank_eq_and_height_eq p (IsPrime.ne_top ‹_›) refine ⟨I, Ideal.mem_minimalPrimes_of_height_eq hI e₂.ge, e₁.symm ▸ ?_⟩ norm_cast · rintro ⟨I, hp, hI⟩ exact le_trans (Ideal.height_le_spanRank_toENat_of_mem_minimal_primes I p hp) (by simpa using (Cardinal.toENat.monotone' hI))
lemma
RingTheory
[ "Mathlib.RingTheory.HopkinsLevitzki", "Mathlib.RingTheory.Ideal.Height", "Mathlib.RingTheory.Localization.Submodule", "Mathlib.RingTheory.Nakayama" ]
Mathlib/RingTheory/Ideal/KrullsHeightTheorem.lean
Ideal.height_le_iff_exists_minimalPrimes
In a commutative Noetherian ring `R`, a prime ideal `p` has height no greater than `n` if and only if it is a minimal ideal over some ideal generated by no more than `n` elements.
Ideal.exists_finset_card_eq_height_of_isNoetherianRing (p : Ideal R) [p.IsPrime] : ∃ s : Finset R, p ∈ (span s).minimalPrimes ∧ s.card = p.height := by obtain ⟨I, hI, hr⟩ := (p.height_le_iff_exists_minimalPrimes <| p.height).mp le_rfl have hs : I.generators.Finite := (IsNoetherian.noetherian I).finite_generators refine ⟨hs.toFinset, by rwa [hs.coe_toFinset, span, I.span_generators], ?_⟩ rw [← Set.ncard_eq_toFinset_card (hs := hs), (IsNoetherian.noetherian I).generators_ncard] refine le_antisymm ?_ ?_ · rw [Submodule.fg_iff_spanRank_eq_spanFinrank.mpr (IsNoetherian.noetherian I)] at hr exact Cardinal.nat_le_ofENat.mp hr · convert_to p.height ≤ I.spanRank.toENat · symm simpa [Submodule.fg_iff_spanRank_eq_spanFinrank] using (IsNoetherian.noetherian I) · exact I.height_le_spanRank_toENat_of_mem_minimal_primes _ hI
lemma
RingTheory
[ "Mathlib.RingTheory.HopkinsLevitzki", "Mathlib.RingTheory.Ideal.Height", "Mathlib.RingTheory.Localization.Submodule", "Mathlib.RingTheory.Nakayama" ]
Mathlib/RingTheory/Ideal/KrullsHeightTheorem.lean
Ideal.exists_finset_card_eq_height_of_isNoetherianRing
If `p` is a prime in a Noetherian ring `R`, there exists a `p`-primary ideal `I` spanned by `p.height` elements.
eq_top_of_unit_mem (x y : α) (hx : x ∈ I) (h : y * x = 1) : I = ⊤ := eq_top_iff.2 fun z _ => calc z * y * x ∈ I := I.mul_mem_left _ hx _ = z * (y * x) := mul_assoc z y x _ = z := by rw [h, mul_one]
theorem
RingTheory
[ "Mathlib.Algebra.Module.Submodule.Lattice", "Mathlib.RingTheory.Ideal.Defs", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Ideal/Lattice.lean
eq_top_of_unit_mem
null
eq_top_of_isUnit_mem {x} (hx : x ∈ I) (h : IsUnit x) : I = ⊤ := let ⟨y, hy⟩ := h.exists_left_inv eq_top_of_unit_mem I x y hx hy
theorem
RingTheory
[ "Mathlib.Algebra.Module.Submodule.Lattice", "Mathlib.RingTheory.Ideal.Defs", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Ideal/Lattice.lean
eq_top_of_isUnit_mem
null
eq_top_iff_one : I = ⊤ ↔ (1 : α) ∈ I := ⟨by rintro rfl; trivial, fun h => eq_top_of_unit_mem _ _ 1 h (by simp)⟩
theorem
RingTheory
[ "Mathlib.Algebra.Module.Submodule.Lattice", "Mathlib.RingTheory.Ideal.Defs", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Ideal/Lattice.lean
eq_top_iff_one
null
ne_top_iff_one : I ≠ ⊤ ↔ (1 : α) ∉ I := not_congr I.eq_top_iff_one
theorem
RingTheory
[ "Mathlib.Algebra.Module.Submodule.Lattice", "Mathlib.RingTheory.Ideal.Defs", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Ideal/Lattice.lean
ne_top_iff_one
null
mem_sup_left {S T : Ideal R} : ∀ {x : R}, x ∈ S → x ∈ S ⊔ T := @le_sup_left _ _ S T
theorem
RingTheory
[ "Mathlib.Algebra.Module.Submodule.Lattice", "Mathlib.RingTheory.Ideal.Defs", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Ideal/Lattice.lean
mem_sup_left
null
mem_sup_right {S T : Ideal R} : ∀ {x : R}, x ∈ T → x ∈ S ⊔ T := @le_sup_right _ _ S T
theorem
RingTheory
[ "Mathlib.Algebra.Module.Submodule.Lattice", "Mathlib.RingTheory.Ideal.Defs", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Ideal/Lattice.lean
mem_sup_right
null
mem_iSup_of_mem {ι : Sort*} {S : ι → Ideal R} (i : ι) : ∀ {x : R}, x ∈ S i → x ∈ iSup S := @le_iSup _ _ _ S _
theorem
RingTheory
[ "Mathlib.Algebra.Module.Submodule.Lattice", "Mathlib.RingTheory.Ideal.Defs", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Ideal/Lattice.lean
mem_iSup_of_mem
null
mem_sSup_of_mem {S : Set (Ideal R)} {s : Ideal R} (hs : s ∈ S) : ∀ {x : R}, x ∈ s → x ∈ sSup S := @le_sSup _ _ _ _ hs
theorem
RingTheory
[ "Mathlib.Algebra.Module.Submodule.Lattice", "Mathlib.RingTheory.Ideal.Defs", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Ideal/Lattice.lean
mem_sSup_of_mem
null
mem_sInf {s : Set (Ideal R)} {x : R} : x ∈ sInf s ↔ ∀ ⦃I⦄, I ∈ s → x ∈ I := ⟨fun hx I his => hx I ⟨I, iInf_pos his⟩, fun H _I ⟨_J, hij⟩ => hij ▸ fun _S ⟨hj, hS⟩ => hS ▸ H hj⟩
theorem
RingTheory
[ "Mathlib.Algebra.Module.Submodule.Lattice", "Mathlib.RingTheory.Ideal.Defs", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Ideal/Lattice.lean
mem_sInf
null
mem_inf {I J : Ideal R} {x : R} : x ∈ I ⊓ J ↔ x ∈ I ∧ x ∈ J := Iff.rfl
theorem
RingTheory
[ "Mathlib.Algebra.Module.Submodule.Lattice", "Mathlib.RingTheory.Ideal.Defs", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Ideal/Lattice.lean
mem_inf
null
mem_iInf {ι : Sort*} {I : ι → Ideal R} {x : R} : x ∈ iInf I ↔ ∀ i, x ∈ I i := Submodule.mem_iInf _
theorem
RingTheory
[ "Mathlib.Algebra.Module.Submodule.Lattice", "Mathlib.RingTheory.Ideal.Defs", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Ideal/Lattice.lean
mem_iInf
null
mem_bot {x : R} : x ∈ (⊥ : Ideal R) ↔ x = 0 := Submodule.mem_bot _
theorem
RingTheory
[ "Mathlib.Algebra.Module.Submodule.Lattice", "Mathlib.RingTheory.Ideal.Defs", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Ideal/Lattice.lean
mem_bot
null
eq_bot_or_top : I = ⊥ ∨ I = ⊤ := by rw [or_iff_not_imp_right] change _ ≠ _ → _ rw [Ideal.ne_top_iff_one] intro h1 rw [eq_bot_iff] intro r hr by_cases H : r = 0; · simpa simpa [H, h1] using I.mul_mem_left r⁻¹ hr
theorem
RingTheory
[ "Mathlib.Algebra.Module.Submodule.Lattice", "Mathlib.RingTheory.Ideal.Defs", "Mathlib.Tactic.Ring" ]
Mathlib/RingTheory/Ideal/Lattice.lean
eq_bot_or_top
All ideals in a division (semi)ring are trivial.
map (I : Ideal R) : Ideal S := span (f '' I)
def
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
map
`I.map f` is the span of the image of the ideal `I` under `f`, which may be bigger than the image itself.
comap [RingHomClass F R S] (I : Ideal S) : Ideal R where carrier := f ⁻¹' I add_mem' {x y} hx hy := by simp only [Set.mem_preimage, SetLike.mem_coe, map_add f] at hx hy ⊢ exact add_mem hx hy zero_mem' := by simp only [Set.mem_preimage, map_zero, SetLike.mem_coe, Submodule.zero_mem] smul_mem' c x hx := by simp only [smul_eq_mul, Set.mem_preimage, map_mul, SetLike.mem_coe] at * exact mul_mem_left I _ hx @[simp]
def
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
comap
`I.comap f` is the preimage of `I` under `f`.
coe_comap [RingHomClass F R S] (I : Ideal S) : (comap f I : Set R) = f ⁻¹' I := rfl
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
coe_comap
null
comap_coe [RingHomClass F R S] (I : Ideal S) : I.comap (f : R →+* S) = I.comap f := rfl
lemma
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
comap_coe
null
map_coe [RingHomClass F R S] (I : Ideal R) : I.map (f : R →+* S) = I.map f := rfl variable {f}
lemma
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
map_coe
null
map_mono (h : I ≤ J) : map f I ≤ map f J := span_mono <| Set.image_mono h
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
map_mono
null
mem_map_of_mem (f : F) {I : Ideal R} {x : R} (h : x ∈ I) : f x ∈ map f I := subset_span ⟨x, h, rfl⟩
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
mem_map_of_mem
null
apply_coe_mem_map (f : F) (I : Ideal R) (x : I) : f x ∈ I.map f := mem_map_of_mem f x.2
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
apply_coe_mem_map
null
map_le_iff_le_comap [RingHomClass F R S] : map f I ≤ K ↔ I ≤ comap f K := span_le.trans Set.image_subset_iff @[simp]
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
map_le_iff_le_comap
null
mem_comap [RingHomClass F R S] {x} : x ∈ comap f K ↔ f x ∈ K := Iff.rfl
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
mem_comap
null
comap_mono [RingHomClass F R S] (h : K ≤ L) : comap f K ≤ comap f L := Set.preimage_mono fun _ hx => h hx variable (f)
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
comap_mono
null
comap_ne_top [RingHomClass F R S] (hK : K ≠ ⊤) : comap f K ≠ ⊤ := (ne_top_iff_one _).2 <| by rw [mem_comap, map_one]; exact (ne_top_iff_one _).1 hK
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
comap_ne_top
null
exists_ideal_comap_le_prime {S} [CommSemiring S] [FunLike F R S] [RingHomClass F R S] {f : F} (P : Ideal R) [P.IsPrime] (I : Ideal S) (le : I.comap f ≤ P) : ∃ Q ≥ I, Q.IsPrime ∧ Q.comap f ≤ P := have ⟨Q, hQ, hIQ, disj⟩ := I.exists_le_prime_disjoint (P.primeCompl.map f) <| Set.disjoint_left.mpr fun _ ↦ by rintro hI ⟨r, hp, rfl⟩; exact hp (le hI) ⟨Q, hIQ, hQ, fun r hp' ↦ of_not_not fun hp ↦ Set.disjoint_left.mp disj hp' ⟨_, hp, rfl⟩⟩ variable {G : Type*} [FunLike G S R]
lemma
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
exists_ideal_comap_le_prime
null
map_le_comap_of_inv_on [RingHomClass G S R] (g : G) (I : Ideal R) (hf : Set.LeftInvOn g f I) : I.map f ≤ I.comap g := by refine Ideal.span_le.2 ?_ rintro x ⟨x, hx, rfl⟩ rw [SetLike.mem_coe, mem_comap, hf hx] exact hx
theorem
RingTheory
[ "Mathlib.Data.DFinsupp.Module", "Mathlib.RingTheory.Ideal.Operations" ]
Mathlib/RingTheory/Ideal/Maps.lean
map_le_comap_of_inv_on
null