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
_root_.LinearEquiv.isWeaklyRegular_congr' (e : M ≃ₛₗ[σ] M₂) (rs : List R) : IsWeaklyRegular M rs ↔ IsWeaklyRegular M₂ (rs.map σ) := e.toAddEquiv.isWeaklyRegular_congr <| List.forall₂_map_right_iff.mpr <| List.forall₂_same.mpr fun r _ x => e.map_smul' r x
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
_root_.LinearEquiv.isWeaklyRegular_congr'
null
_root_.LinearEquiv.isWeaklyRegular_congr [Module R M₂] (e : M ≃ₗ[R] M₂) (rs : List R) : IsWeaklyRegular M rs ↔ IsWeaklyRegular M₂ rs := Iff.trans (e.isWeaklyRegular_congr' rs) <| iff_of_eq <| congrArg _ rs.map_id
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
_root_.LinearEquiv.isWeaklyRegular_congr
null
_root_.AddEquiv.isRegular_congr {e : M ≃+ M₂} {as bs} (h : List.Forall₂ (fun (r : R) (s : S) => ∀ x, e (r • x) = s • e x) as bs) : IsRegular M as ↔ IsRegular M₂ bs := by conv => congr <;> rw [isRegular_iff, ne_eq, eq_comm, ← subsingleton_quotient_iff_eq_top] let e' := QuotientAddGroup.congr _ _ e <| AddHom.map_smul_top_toAddSubgroup_of_surjective e.surjective h exact and_congr (e.isWeaklyRegular_congr h) e'.subsingleton_congr.not
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
_root_.AddEquiv.isRegular_congr
null
_root_.LinearEquiv.isRegular_congr' (e : M ≃ₛₗ[σ] M₂) (rs : List R) : IsRegular M rs ↔ IsRegular M₂ (rs.map σ) := e.toAddEquiv.isRegular_congr <| List.forall₂_map_right_iff.mpr <| List.forall₂_same.mpr fun r _ x => e.map_smul' r x
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
_root_.LinearEquiv.isRegular_congr'
null
_root_.LinearEquiv.isRegular_congr [Module R M₂] (e : M ≃ₗ[R] M₂) (rs : List R) : IsRegular M rs ↔ IsRegular M₂ rs := Iff.trans (e.isRegular_congr' rs) <| iff_of_eq <| congrArg _ rs.map_id
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
_root_.LinearEquiv.isRegular_congr
null
isWeaklyRegular_map_algebraMap_iff [CommRing R] [CommRing S] [Algebra R S] [AddCommGroup M] [Module R M] [Module S M] [IsScalarTower R S M] (rs : List R) : IsWeaklyRegular M (rs.map (algebraMap R S)) ↔ IsWeaklyRegular M rs := (AddEquiv.refl M).isWeaklyRegular_congr <| List.forall₂_map_left_iff.mpr <| List.forall₂_same.mpr fun r _ => algebraMap_smul S r variable [CommRing R] [AddCommGroup M] [AddCommGroup M₂] [AddCommGroup M₃] [AddCommGroup M₄] [Module R M] [Module R M₂] [Module R M₃] [Module R M₄] @[simp]
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
isWeaklyRegular_map_algebraMap_iff
null
isWeaklyRegular_cons_iff (r : R) (rs : List R) : IsWeaklyRegular M (r :: rs) ↔ IsSMulRegular M r ∧ IsWeaklyRegular (QuotSMulTop r M) rs := have := Eq.trans (congrArg (· • ⊤) Ideal.ofList_nil) (bot_smul ⊤) let e i := quotOfListConsSMulTopEquivQuotSMulTopInner M r (rs.take i) Iff.trans (isWeaklyRegular_iff_Fin _ _) <| Iff.trans Fin.forall_iff_succ <| and_congr ((quotEquivOfEqBot _ this).isSMulRegular_congr r) <| Iff.trans (forall_congr' fun i => (e i).isSMulRegular_congr (rs.get i)) (isWeaklyRegular_iff_Fin _ _).symm
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
isWeaklyRegular_cons_iff
null
isWeaklyRegular_cons_iff' (r : R) (rs : List R) : IsWeaklyRegular M (r :: rs) ↔ IsSMulRegular M r ∧ IsWeaklyRegular (QuotSMulTop r M) (rs.map (Ideal.Quotient.mk (Ideal.span {r}))) := Iff.trans (isWeaklyRegular_cons_iff M r rs) <| and_congr_right' <| Iff.symm <| isWeaklyRegular_map_algebraMap_iff (R ⧸ Ideal.span {r}) _ rs @[simp]
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
isWeaklyRegular_cons_iff'
null
isRegular_cons_iff (r : R) (rs : List R) : IsRegular M (r :: rs) ↔ IsSMulRegular M r ∧ IsRegular (QuotSMulTop r M) rs := by rw [isRegular_iff, isRegular_iff, isWeaklyRegular_cons_iff M r rs, ne_eq, top_eq_ofList_cons_smul_iff, and_assoc]
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
isRegular_cons_iff
null
isRegular_cons_iff' (r : R) (rs : List R) : IsRegular M (r :: rs) ↔ IsSMulRegular M r ∧ IsRegular (QuotSMulTop r M) (rs.map (Ideal.Quotient.mk (Ideal.span {r}))) := by conv => congr <;> rw [isRegular_iff, ne_eq] rw [isWeaklyRegular_cons_iff', ← restrictScalars_inj R (R ⧸ _), ← Ideal.map_ofList, ← Ideal.Quotient.algebraMap_eq, Ideal.smul_restrictScalars, restrictScalars_top, top_eq_ofList_cons_smul_iff, and_assoc] variable {M}
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
isRegular_cons_iff'
null
@[simp] nil : IsWeaklyRegular M ([] : List R) := .mk (False.elim <| Nat.not_lt_zero · ·)
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
nil
null
cons {r : R} {rs : List R} (h1 : IsSMulRegular M r) (h2 : IsWeaklyRegular (QuotSMulTop r M) rs) : IsWeaklyRegular M (r :: rs) := (isWeaklyRegular_cons_iff M r rs).mpr ⟨h1, h2⟩
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
cons
null
cons' {r : R} {rs : List R} (h1 : IsSMulRegular M r) (h2 : IsWeaklyRegular (QuotSMulTop r M) (rs.map (Ideal.Quotient.mk (Ideal.span {r})))) : IsWeaklyRegular M (r :: rs) := (isWeaklyRegular_cons_iff' M r rs).mpr ⟨h1, h2⟩
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
cons'
null
@[induction_eliminator] recIterModByRegular {motive : (M : Type v) → [AddCommGroup M] → [Module R M] → (rs : List R) → IsWeaklyRegular M rs → Sort*} (nil : (M : Type v) → [AddCommGroup M] → [Module R M] → motive M [] (nil R M)) (cons : {M : Type v} → [AddCommGroup M] → [Module R M] → (r : R) → (rs : List R) → (h1 : IsSMulRegular M r) → (h2 : IsWeaklyRegular (QuotSMulTop r M) rs) → (ih : motive (QuotSMulTop r M) rs h2) → motive M (r :: rs) (cons h1 h2)) : {M : Type v} → [AddCommGroup M] → [Module R M] → {rs : List R} → (h : IsWeaklyRegular M rs) → motive M rs h | M, _, _, [], _ => nil M | M, _, _, r :: rs, h => let ⟨h1, h2⟩ := (isWeaklyRegular_cons_iff M r rs).mp h cons r rs h1 h2 (recIterModByRegular nil cons h2)
def
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
recIterModByRegular
Weakly regular sequences can be inductively characterized by: * The empty sequence is weakly regular on any module. * If `r` is regular on `M` and `rs` is a weakly regular sequence on `M⧸rM` then the sequence obtained from `rs` by prepending `r` is weakly regular on `M`. This is the induction principle produced by the inductive definition above. The motive will usually be valued in `Prop`, but `Sort*` works too.
ndrecIterModByRegular {motive : (M : Type v) → [AddCommGroup M] → [Module R M] → (rs : List R) → Sort*} (nil : (M : Type v) → [AddCommGroup M] → [Module R M] → motive M []) (cons : {M : Type v} → [AddCommGroup M] → [Module R M] → (r : R) → (rs : List R) → IsSMulRegular M r → IsWeaklyRegular (QuotSMulTop r M) rs → motive (QuotSMulTop r M) rs → motive M (r :: rs)) {M} [AddCommGroup M] [Module R M] {rs} : IsWeaklyRegular M rs → motive M rs := recIterModByRegular (motive := fun M _ _ rs _ => motive M rs) nil cons
def
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
ndrecIterModByRegular
A simplified version of `IsWeaklyRegular.recIterModByRegular` where the motive is not allowed to depend on the proof of `IsWeaklyRegular`.
recIterModByRegularWithRing {motive : (R : Type u) → [CommRing R] → (M : Type v) → [AddCommGroup M] → [Module R M] → (rs : List R) → IsWeaklyRegular M rs → Sort*} (nil : (R : Type u) → [CommRing R] → (M : Type v) → [AddCommGroup M] → [Module R M] → motive R M [] (nil R M)) (cons : {R : Type u} → [CommRing R] → {M : Type v} → [AddCommGroup M] → [Module R M] → (r : R) → (rs : List R) → (h1 : IsSMulRegular M r) → (h2 : IsWeaklyRegular (QuotSMulTop r M) (rs.map (Ideal.Quotient.mk (Ideal.span {r})))) → (ih : motive (R ⧸ Ideal.span {r}) (QuotSMulTop r M) (rs.map (Ideal.Quotient.mk (Ideal.span {r}))) h2) → motive R M (r :: rs) (cons' h1 h2)) : {R : Type u} → [CommRing R] → {M : Type v} → [AddCommGroup M] → [Module R M] → {rs : List R} → (h : IsWeaklyRegular M rs) → motive R M rs h | R, _, M, _, _, [], _ => nil R M | _, _, M, _, _, r :: rs, h => let ⟨h1, h2⟩ := (isWeaklyRegular_cons_iff' M r rs).mp h cons r rs h1 h2 (recIterModByRegularWithRing nil cons h2) termination_by _ _ _ _ _ rs => List.length rs
def
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
recIterModByRegularWithRing
An alternate induction principle from `IsWeaklyRegular.recIterModByRegular` where we mod out by successive elements in both the module and the base ring. This is useful for propagating certain properties of the initial `M`, e.g. faithfulness or freeness, throughout the induction.
ndrecWithRing {motive : (R : Type u) → [CommRing R] → (M : Type v) → [AddCommGroup M] → [Module R M] → (rs : List R) → Sort*} (nil : (R : Type u) → [CommRing R] → (M : Type v) → [AddCommGroup M] → [Module R M] → motive R M []) (cons : {R : Type u} → [CommRing R] → {M : Type v} → [AddCommGroup M] → [Module R M] → (r : R) → (rs : List R) → IsSMulRegular M r → IsWeaklyRegular (QuotSMulTop r M) (rs.map (Ideal.Quotient.mk (Ideal.span {r}))) → motive (R ⧸ Ideal.span {r}) (QuotSMulTop r M) (rs.map (Ideal.Quotient.mk (Ideal.span {r}))) → motive R M (r :: rs)) {R} [CommRing R] {M} [AddCommGroup M] [Module R M] {rs} : IsWeaklyRegular M rs → motive R M rs := recIterModByRegularWithRing (motive := fun R _ M _ _ rs _ => motive R M rs) nil cons
def
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
ndrecWithRing
A simplified version of `IsWeaklyRegular.recIterModByRegularWithRing` where the motive is not allowed to depend on the proof of `IsWeaklyRegular`.
isWeaklyRegular_singleton_iff (r : R) : IsWeaklyRegular M [r] ↔ IsSMulRegular M r := Iff.trans (isWeaklyRegular_cons_iff M r []) (and_iff_left (.nil R _))
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
isWeaklyRegular_singleton_iff
null
isWeaklyRegular_append_iff (rs₁ rs₂ : List R) : IsWeaklyRegular M (rs₁ ++ rs₂) ↔ IsWeaklyRegular M rs₁ ∧ IsWeaklyRegular (M ⧸ (Ideal.ofList rs₁ • ⊤ : Submodule R M)) rs₂ := by induction rs₁ generalizing M with | nil => refine Iff.symm <| Iff.trans (and_iff_right (.nil R M)) ?_ refine (quotEquivOfEqBot _ ?_).isWeaklyRegular_congr rs₂ rw [Ideal.ofList_nil, bot_smul] | cons r rs₁ ih => let e := quotOfListConsSMulTopEquivQuotSMulTopInner M r rs₁ rw [List.cons_append, isWeaklyRegular_cons_iff, isWeaklyRegular_cons_iff, ih, ← and_assoc, ← e.isWeaklyRegular_congr rs₂]
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
isWeaklyRegular_append_iff
null
isWeaklyRegular_append_iff' (rs₁ rs₂ : List R) : IsWeaklyRegular M (rs₁ ++ rs₂) ↔ IsWeaklyRegular M rs₁ ∧ IsWeaklyRegular (M ⧸ (Ideal.ofList rs₁ • ⊤ : Submodule R M)) (rs₂.map (Ideal.Quotient.mk (Ideal.ofList rs₁))) := Iff.trans (isWeaklyRegular_append_iff M rs₁ rs₂) <| and_congr_right' <| Iff.symm <| isWeaklyRegular_map_algebraMap_iff (R ⧸ Ideal.ofList rs₁) _ rs₂
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
isWeaklyRegular_append_iff'
null
nil [Nontrivial M] : IsRegular M ([] : List R) where toIsWeaklyRegular := IsWeaklyRegular.nil R M top_ne_smul h := by rw [Ideal.ofList_nil, bot_smul, eq_comm, subsingleton_iff_bot_eq_top] at h exact not_subsingleton M ((Submodule.subsingleton_iff _).mp h)
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
nil
null
cons {r : R} {rs : List R} (h1 : IsSMulRegular M r) (h2 : IsRegular (QuotSMulTop r M) rs) : IsRegular M (r :: rs) := (isRegular_cons_iff M r rs).mpr ⟨h1, h2⟩
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
cons
null
cons' {r : R} {rs : List R} (h1 : IsSMulRegular M r) (h2 : IsRegular (QuotSMulTop r M) (rs.map (Ideal.Quotient.mk (Ideal.span {r})))) : IsRegular M (r :: rs) := (isRegular_cons_iff' M r rs).mpr ⟨h1, h2⟩
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
cons'
null
@[induction_eliminator] recIterModByRegular {motive : (M : Type v) → [AddCommGroup M] → [Module R M] → (rs : List R) → IsRegular M rs → Sort*} (nil : (M : Type v) → [AddCommGroup M] → [Module R M] → [Nontrivial M] → motive M [] (nil R M)) (cons : {M : Type v} → [AddCommGroup M] → [Module R M] → (r : R) → (rs : List R) → (h1 : IsSMulRegular M r) → (h2 : IsRegular (QuotSMulTop r M) rs) → (ih : motive (QuotSMulTop r M) rs h2) → motive M (r :: rs) (cons h1 h2)) {M} [AddCommGroup M] [Module R M] {rs} (h : IsRegular M rs) : motive M rs h := h.toIsWeaklyRegular.recIterModByRegular (motive := fun N _ _ rs' h' => ∀ h'', motive N rs' ⟨h', h''⟩) (fun N _ _ h' => haveI := (nontrivial_iff R).mp (nontrivial_of_ne _ _ h'); nil N) (fun r rs' h1 h2 h3 h4 => have ⟨h5, h6⟩ := (isRegular_cons_iff _ _ _).mp ⟨h2.cons h1, h4⟩ cons r rs' h5 h6 (h3 h6.top_ne_smul)) h.top_ne_smul
def
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
recIterModByRegular
Regular sequences can be inductively characterized by: * The empty sequence is regular on any nonzero module. * If `r` is regular on `M` and `rs` is a regular sequence on `M⧸rM` then the sequence obtained from `rs` by prepending `r` is regular on `M`. This is the induction principle produced by the inductive definition above. The motive will usually be valued in `Prop`, but `Sort*` works too.
ndrecIterModByRegular {motive : (M : Type v) → [AddCommGroup M] → [Module R M] → (rs : List R) → Sort*} (nil : (M : Type v) → [AddCommGroup M] → [Module R M] → [Nontrivial M] → motive M []) (cons : {M : Type v} → [AddCommGroup M] → [Module R M] → (r : R) → (rs : List R) → IsSMulRegular M r → IsRegular (QuotSMulTop r M) rs → motive (QuotSMulTop r M) rs → motive M (r :: rs)) {M} [AddCommGroup M] [Module R M] {rs} : IsRegular M rs → motive M rs := recIterModByRegular (motive := fun M _ _ rs _ => motive M rs) nil cons
def
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
ndrecIterModByRegular
A simplified version of `IsRegular.recIterModByRegular` where the motive is not allowed to depend on the proof of `IsRegular`.
recIterModByRegularWithRing {motive : (R : Type u) → [CommRing R] → (M : Type v) → [AddCommGroup M] → [Module R M] → (rs : List R) → IsRegular M rs → Sort*} (nil : (R : Type u) → [CommRing R] → (M : Type v) → [AddCommGroup M] → [Module R M] → [Nontrivial M] → motive R M [] (nil R M)) (cons : {R : Type u} → [CommRing R] → {M : Type v} → [AddCommGroup M] → [Module R M] → (r : R) → (rs : List R) → (h1 : IsSMulRegular M r) → (h2 : IsRegular (QuotSMulTop r M) (rs.map (Ideal.Quotient.mk (Ideal.span {r})))) → (ih : motive (R ⧸ Ideal.span {r}) (QuotSMulTop r M) (rs.map (Ideal.Quotient.mk (Ideal.span {r}))) h2) → motive R M (r :: rs) (cons' h1 h2)) {R} [CommRing R] {M} [AddCommGroup M] [Module R M] {rs} (h : IsRegular M rs) : motive R M rs h := h.toIsWeaklyRegular.recIterModByRegularWithRing (motive := fun R _ N _ _ rs' h' => ∀ h'', motive R N rs' ⟨h', h''⟩) (fun R _ N _ _ h' => haveI := (nontrivial_iff R).mp (nontrivial_of_ne _ _ h'); nil R N) (fun r rs' h1 h2 h3 h4 => have ⟨h5, h6⟩ := (isRegular_cons_iff' _ _ _).mp ⟨h2.cons' h1, h4⟩ cons r rs' h5 h6 <| h3 h6.top_ne_smul) h.top_ne_smul
def
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
recIterModByRegularWithRing
An alternate induction principle from `IsRegular.recIterModByRegular` where we mod out by successive elements in both the module and the base ring. This is useful for propagating certain properties of the initial `M`, e.g. faithfulness or freeness, throughout the induction.
ndrecIterModByRegularWithRing {motive : (R : Type u) → [CommRing R] → (M : Type v) → [AddCommGroup M] → [Module R M] → (rs : List R) → Sort*} (nil : (R : Type u) → [CommRing R] → (M : Type v) → [AddCommGroup M] → [Module R M] → [Nontrivial M] → motive R M []) (cons : {R : Type u} → [CommRing R] → {M : Type v} → [AddCommGroup M] → [Module R M] → (r : R) → (rs : List R) → IsSMulRegular M r → IsRegular (QuotSMulTop r M) (rs.map (Ideal.Quotient.mk (Ideal.span {r}))) → motive (R ⧸ Ideal.span {r}) (QuotSMulTop r M) (rs.map (Ideal.Quotient.mk (Ideal.span {r}))) → motive R M (r :: rs)) {R} [CommRing R] {M} [AddCommGroup M] [Module R M] {rs} : IsRegular M rs → motive R M rs := recIterModByRegularWithRing (motive := fun R _ M _ _ rs _ => motive R M rs) nil cons
def
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
ndrecIterModByRegularWithRing
A simplified version of `IsRegular.recIterModByRegularWithRing` where the motive is not allowed to depend on the proof of `IsRegular`.
quot_ofList_smul_nontrivial {rs : List R} (h : IsRegular M rs) (N : Submodule R M) : Nontrivial (M ⧸ Ideal.ofList rs • N) := Submodule.Quotient.nontrivial_of_lt_top _ <| lt_of_le_of_lt (smul_mono_right _ le_top) h.top_ne_smul.symm.lt_top
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
quot_ofList_smul_nontrivial
null
nontrivial {rs : List R} (h : IsRegular M rs) : Nontrivial M := haveI := quot_ofList_smul_nontrivial h ⊤ (mkQ_surjective (Ideal.ofList rs • ⊤ : Submodule R M)).nontrivial
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
nontrivial
null
isRegular_iff_isWeaklyRegular_of_subset_jacobson_annihilator [Nontrivial M] [Module.Finite R M] {rs : List R} (h : ∀ r ∈ rs, r ∈ Ideal.jacobson (Module.annihilator R M)) : IsRegular M rs ↔ IsWeaklyRegular M rs := Iff.trans (isRegular_iff M rs) <| and_iff_left <| top_ne_ideal_smul_of_le_jacobson_annihilator <| Ideal.span_le.mpr h
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
isRegular_iff_isWeaklyRegular_of_subset_jacobson_annihilator
null
_root_.IsLocalRing.isRegular_iff_isWeaklyRegular_of_subset_maximalIdeal [IsLocalRing R] [Nontrivial M] [Module.Finite R M] {rs : List R} (h : ∀ r ∈ rs, r ∈ IsLocalRing.maximalIdeal R) : IsRegular M rs ↔ IsWeaklyRegular M rs := have H h' := bot_ne_top.symm <| annihilator_eq_top_iff.mp <| Eq.trans annihilator_top h' isRegular_iff_isWeaklyRegular_of_subset_jacobson_annihilator fun r hr => IsLocalRing.jacobson_eq_maximalIdeal (Module.annihilator R M) H ▸ h r hr open IsWeaklyRegular IsArtinian in
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
_root_.IsLocalRing.isRegular_iff_isWeaklyRegular_of_subset_maximalIdeal
null
eq_nil_of_isRegular_on_artinian [IsArtinian R M] : {rs : List R} → IsRegular M rs → rs = [] | [], _ => rfl | r :: rs, h => by rw [isRegular_iff, ne_comm, ← lt_top_iff_ne_top, Ideal.ofList_cons, sup_smul, ideal_span_singleton_smul, isWeaklyRegular_cons_iff] at h refine absurd ?_ (ne_of_lt (lt_of_le_of_lt le_sup_left h.right)) exact Eq.trans (Submodule.map_top _) <| LinearMap.range_eq_top.mpr <| surjective_of_injective_endomorphism (LinearMap.lsmul R M r) h.left.left
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
eq_nil_of_isRegular_on_artinian
null
IsWeaklyRegular.isWeaklyRegular_lTensor [Module.Flat R M₂] {rs : List R} (h : IsWeaklyRegular M rs) : IsWeaklyRegular (M₂ ⊗[R] M) rs := by induction h with | nil N => exact nil R (M₂ ⊗[R] N) | @cons N _ _ r rs' h1 _ ih => let e := tensorQuotSMulTopEquivQuotSMulTop r M₂ N exact ((e.isWeaklyRegular_congr rs').mp ih).cons (h1.lTensor M₂)
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
IsWeaklyRegular.isWeaklyRegular_lTensor
null
IsWeaklyRegular.isWeaklyRegular_rTensor [Module.Flat R M₂] {rs : List R} (h : IsWeaklyRegular M rs) : IsWeaklyRegular (M ⊗[R] M₂) rs := by induction h with | nil N => exact nil R (N ⊗[R] M₂) | @cons N _ _ r rs' h1 _ ih => let e := quotSMulTopTensorEquivQuotSMulTop r M₂ N exact ((e.isWeaklyRegular_congr rs').mp ih).cons (h1.rTensor M₂)
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
IsWeaklyRegular.isWeaklyRegular_rTensor
null
map_first_exact_on_four_term_right_exact_of_isSMulRegular_last {rs : List R} {f₁ : M →ₗ[R] M₂} {f₂ : M₂ →ₗ[R] M₃} {f₃ : M₃ →ₗ[R] M₄} (h₁₂ : Exact f₁ f₂) (h₂₃ : Exact f₂ f₃) (h₃ : Surjective f₃) (h₄ : IsWeaklyRegular M₄ rs) : Exact (mapQ _ _ _ (smul_top_le_comap_smul_top (Ideal.ofList rs) f₁)) (mapQ _ _ _ (smul_top_le_comap_smul_top (Ideal.ofList rs) f₂)) := by induction h₄ generalizing M M₂ M₃ with | nil => apply (Exact.iff_of_ladder_linearEquiv ?_ ?_).mp h₁₂ any_goals exact quotEquivOfEqBot _ <| Eq.trans (congrArg (· • ⊤) Ideal.ofList_nil) (bot_smul ⊤) all_goals exact quot_hom_ext _ _ _ fun _ => rfl | cons r rs h₄ _ ih => specialize ih (map_first_exact_on_four_term_exact_of_isSMulRegular_last h₁₂ h₂₃ h₄) (map_exact r h₂₃ h₃) (map_surjective r h₃) have H₁ := quotOfListConsSMulTopEquivQuotSMulTopInner_naturality r rs f₁ have H₂ := quotOfListConsSMulTopEquivQuotSMulTopInner_naturality r rs f₂ exact (Exact.iff_of_ladder_linearEquiv H₁.symm H₂.symm).mp ih
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
map_first_exact_on_four_term_right_exact_of_isSMulRegular_last
null
private IsWeaklyRegular.swap {a b : R} (h1 : IsWeaklyRegular M [a, b]) (h2 : torsionBy R M b = a • torsionBy R M b → torsionBy R M b = ⊥) : IsWeaklyRegular M [b, a] := by rw [isWeaklyRegular_cons_iff, isWeaklyRegular_singleton_iff] at h1 ⊢ obtain ⟨ha, hb⟩ := h1 rw [← isSMulRegular_iff_torsionBy_eq_bot] at h2 specialize h2 (le_antisymm ?_ (smul_le_self_of_tower a (torsionBy R M b))) · refine le_of_eq_of_le ?_ <| smul_top_inf_eq_smul_of_isSMulRegular_on_quot <| ha.of_injective _ <| ker_eq_bot.mp <| ker_liftQ_eq_bot' _ (lsmul R M b) rfl rw [← (isSMulRegular_on_quot_iff_lsmul_comap_eq _ _).mp hb] exact (inf_eq_right.mpr (ker_le_comap _)).symm · rwa [ha.isSMulRegular_on_quot_iff_smul_top_inf_eq_smul, inf_comm, smul_comm, ← h2.isSMulRegular_on_quot_iff_smul_top_inf_eq_smul, and_iff_left hb]
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
IsWeaklyRegular.swap
null
IsWeaklyRegular.prototype_perm {rs : List R} (h : IsWeaklyRegular M rs) {rs'} (h'' : rs ~ rs') (h' : ∀ a b rs', (a :: b :: rs') <+~ rs → let K := torsionBy R (M ⧸ (Ideal.ofList rs' • ⊤ : Submodule R M)) b K = a • K → K = ⊥) : IsWeaklyRegular M rs' := have H := LinearEquiv.isWeaklyRegular_congr <| quotEquivOfEqBot _ <| Eq.trans (congrArg (· • ⊤) Ideal.ofList_nil) (bot_smul ⊤) (H rs').mp <| (aux [] h'' (.refl rs) (h''.symm.subperm)) <| (H rs).mpr h where aux {rs₁ rs₂} (rs₀ : List R) (h₁₂ : rs₁ ~ rs₂) (H₁ : rs₀ ++ rs₁ <+~ rs) (H₃ : rs₀ ++ rs₂ <+~ rs) (h : IsWeaklyRegular (M ⧸ (Ideal.ofList rs₀ • ⊤ : Submodule R M)) rs₁) : IsWeaklyRegular (M ⧸ (Ideal.ofList rs₀ • ⊤ : Submodule R M)) rs₂ := by { induction h₁₂ generalizing rs₀ with | nil => exact .nil R _ | cons r _ ih => let e := quotOfListConsSMulTopEquivQuotSMulTopOuter M r rs₀ rw [isWeaklyRegular_cons_iff, ← e.isWeaklyRegular_congr] at h ⊢ refine h.imp_right (ih (r :: rs₀) ?_ ?_) <;> exact List.perm_middle.subperm_right.mp ‹_› | swap a b t => rw [show ∀ x y z, x :: y :: z = [x, y] ++ z from fun _ _ _ => rfl, isWeaklyRegular_append_iff] at h ⊢ have : Ideal.ofList [b, a] = Ideal.ofList [a, b] := congrArg Ideal.span <| Set.ext fun _ => (List.Perm.swap a b []).mem_iff rw [(quotEquivOfEq _ _ (congrArg₂ _ this rfl)).isWeaklyRegular_congr] at h rw [List.append_cons, List.append_cons, List.append_assoc _ [b] [a]] at H₁ apply (List.sublist_append_left (rs₀ ++ [b, a]) _).subperm.trans at H₁ apply List.perm_append_comm.subperm.trans at H₁ exact h.imp_left (swap · (h' b a rs₀ H₁)) | trans h₁₂ _ ih₁₂ ih₂₃ => have H₂ := (h₁₂.append_left rs₀).subperm_right.mp H₁ exact ih₂₃ rs₀ H₂ H₃ (ih₁₂ rs₀ H₁ H₂ h) }
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
IsWeaklyRegular.prototype_perm
null
IsWeaklyRegular.of_perm_of_subset_jacobson_annihilator [IsNoetherian R M] {rs rs' : List R} (h1 : IsWeaklyRegular M rs) (h2 : List.Perm rs rs') (h3 : ∀ r ∈ rs, r ∈ (Module.annihilator R M).jacobson) : IsWeaklyRegular M rs' := h1.prototype_perm h2 fun r _ _ h h' => eq_bot_of_eq_pointwise_smul_of_mem_jacobson_annihilator (IsNoetherian.noetherian _) h' (Ideal.jacobson_mono (le_trans (LinearMap.annihilator_le_of_surjective (R := R) _ (mkQ_surjective _)) (LinearMap.annihilator_le_of_injective _ (injective_subtype _))) (h3 r (h.subset List.mem_cons_self)))
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
IsWeaklyRegular.of_perm_of_subset_jacobson_annihilator
null
IsRegular.of_perm_of_subset_jacobson_annihilator [IsNoetherian R M] {rs rs' : List R} (h1 : IsRegular M rs) (h2 : List.Perm rs rs') (h3 : ∀ r ∈ rs, r ∈ (Module.annihilator R M).jacobson) : IsRegular M rs' := ⟨h1.toIsWeaklyRegular.of_perm_of_subset_jacobson_annihilator h2 h3, letI := h1.nontrivial top_ne_ideal_smul_of_le_jacobson_annihilator <| Ideal.span_le.mpr (h3 · <| h2.mem_iff.mpr ·)⟩
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
IsRegular.of_perm_of_subset_jacobson_annihilator
null
_root_.IsLocalRing.isWeaklyRegular_of_perm_of_subset_maximalIdeal [IsLocalRing R] [IsNoetherian R M] {rs rs' : List R} (h1 : IsWeaklyRegular M rs) (h2 : List.Perm rs rs') (h3 : ∀ r ∈ rs, r ∈ IsLocalRing.maximalIdeal R) : IsWeaklyRegular M rs' := IsWeaklyRegular.of_perm_of_subset_jacobson_annihilator h1 h2 fun r hr => IsLocalRing.maximalIdeal_le_jacobson _ (h3 r hr)
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
_root_.IsLocalRing.isWeaklyRegular_of_perm_of_subset_maximalIdeal
null
_root_.IsLocalRing.isRegular_of_perm [IsLocalRing R] [IsNoetherian R M] {rs rs' : List R} (h1 : IsRegular M rs) (h2 : List.Perm rs rs') : IsRegular M rs' := by obtain ⟨h3, h4⟩ := h1 refine ⟨IsLocalRing.isWeaklyRegular_of_perm_of_subset_maximalIdeal h3 h2 ?_, ?_⟩ · intro x (h6 : x ∈ { r | r ∈ rs }) refine IsLocalRing.le_maximalIdeal ?_ (Ideal.subset_span h6) exact h4 ∘ Eq.trans (top_smul _).symm ∘ Eq.symm ∘ congrArg (· • ⊤) · refine ne_of_ne_of_eq h4 (congrArg (Ideal.span · • ⊤) ?_) exact Set.ext fun _ => h2.mem_iff
lemma
RingTheory
[ "Mathlib.RingTheory.Artinian.Module", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.Nakayama", "Mathlib.RingTheory.Regular.IsSMulRegular" ]
Mathlib/RingTheory/Regular/RegularSequence.lean
_root_.IsLocalRing.isRegular_of_perm
null
@[algebraize RingHom.Etale.toAlgebra] Etale {R S : Type u} [CommRing R] [CommRing S] (f : R →+* S) : Prop := @Algebra.Etale R _ S _ f.toAlgebra
def
RingTheory
[ "Mathlib.RingTheory.RingHom.Smooth", "Mathlib.RingTheory.RingHom.Unramified" ]
Mathlib/RingTheory/RingHom/Etale.lean
Etale
A ring hom `R →+* S` is étale, if `S` is an étale `R`-algebra.
Etale.toAlgebra {f : R →+* S} (hf : Etale f) : @Algebra.Etale R _ S _ f.toAlgebra := hf variable {R S : Type u} [CommRing R] [CommRing S] (f : R →+* S)
lemma
RingTheory
[ "Mathlib.RingTheory.RingHom.Smooth", "Mathlib.RingTheory.RingHom.Unramified" ]
Mathlib/RingTheory/RingHom/Etale.lean
Etale.toAlgebra
Helper lemma for the `algebraize` tactic
etale_algebraMap [Algebra R S] : (algebraMap R S).Etale ↔ Algebra.Etale R S := by rw [RingHom.Etale, toAlgebra_algebraMap]
lemma
RingTheory
[ "Mathlib.RingTheory.RingHom.Smooth", "Mathlib.RingTheory.RingHom.Unramified" ]
Mathlib/RingTheory/RingHom/Etale.lean
etale_algebraMap
null
etale_iff_formallyUnramified_and_smooth : f.Etale ↔ f.FormallyUnramified ∧ f.Smooth := by algebraize [f] simp only [Etale, Smooth, FormallyUnramified] refine ⟨fun h ↦ ⟨inferInstance, ?_⟩, fun ⟨h1, h2⟩ ↦ ⟨?_, inferInstance⟩⟩ · constructor <;> infer_instance · rw [Algebra.FormallyEtale.iff_unramified_and_smooth] constructor <;> infer_instance
lemma
RingTheory
[ "Mathlib.RingTheory.RingHom.Smooth", "Mathlib.RingTheory.RingHom.Unramified" ]
Mathlib/RingTheory/RingHom/Etale.lean
etale_iff_formallyUnramified_and_smooth
null
Etale.eq_formallyUnramified_and_smooth : @Etale = fun R S (_ : CommRing R) (_ : CommRing S) f ↦ f.FormallyUnramified ∧ f.Smooth := by ext rw [etale_iff_formallyUnramified_and_smooth]
lemma
RingTheory
[ "Mathlib.RingTheory.RingHom.Smooth", "Mathlib.RingTheory.RingHom.Unramified" ]
Mathlib/RingTheory/RingHom/Etale.lean
Etale.eq_formallyUnramified_and_smooth
null
Etale.isStableUnderBaseChange : IsStableUnderBaseChange Etale := by rw [eq_formallyUnramified_and_smooth] exact FormallyUnramified.isStableUnderBaseChange.and Smooth.isStableUnderBaseChange
lemma
RingTheory
[ "Mathlib.RingTheory.RingHom.Smooth", "Mathlib.RingTheory.RingHom.Unramified" ]
Mathlib/RingTheory/RingHom/Etale.lean
Etale.isStableUnderBaseChange
null
Etale.propertyIsLocal : PropertyIsLocal Etale := by rw [eq_formallyUnramified_and_smooth] exact FormallyUnramified.propertyIsLocal.and Smooth.propertyIsLocal
lemma
RingTheory
[ "Mathlib.RingTheory.RingHom.Smooth", "Mathlib.RingTheory.RingHom.Unramified" ]
Mathlib/RingTheory/RingHom/Etale.lean
Etale.propertyIsLocal
null
Etale.respectsIso : RespectsIso Etale := propertyIsLocal.respectsIso
lemma
RingTheory
[ "Mathlib.RingTheory.RingHom.Smooth", "Mathlib.RingTheory.RingHom.Unramified" ]
Mathlib/RingTheory/RingHom/Etale.lean
Etale.respectsIso
null
Etale.ofLocalizationSpanTarget : OfLocalizationSpanTarget Etale := propertyIsLocal.ofLocalizationSpanTarget
lemma
RingTheory
[ "Mathlib.RingTheory.RingHom.Smooth", "Mathlib.RingTheory.RingHom.Unramified" ]
Mathlib/RingTheory/RingHom/Etale.lean
Etale.ofLocalizationSpanTarget
null
Etale.ofLocalizationSpan : OfLocalizationSpan Etale := propertyIsLocal.ofLocalizationSpan
lemma
RingTheory
[ "Mathlib.RingTheory.RingHom.Smooth", "Mathlib.RingTheory.RingHom.Unramified" ]
Mathlib/RingTheory/RingHom/Etale.lean
Etale.ofLocalizationSpan
null
Etale.stableUnderComposition : StableUnderComposition Etale := by rw [eq_formallyUnramified_and_smooth] exact FormallyUnramified.stableUnderComposition.and Smooth.stableUnderComposition
lemma
RingTheory
[ "Mathlib.RingTheory.RingHom.Smooth", "Mathlib.RingTheory.RingHom.Unramified" ]
Mathlib/RingTheory/RingHom/Etale.lean
Etale.stableUnderComposition
null
@[stacks 00HB "Part (4)", algebraize Module.FaithfullyFlat] FaithfullyFlat {R S : Type*} [CommRing R] [CommRing S] (f : R →+* S) : Prop := letI : Algebra R S := f.toAlgebra Module.FaithfullyFlat R S
def
RingTheory
[ "Mathlib.RingTheory.RingHom.Flat" ]
Mathlib/RingTheory/RingHom/FaithfullyFlat.lean
FaithfullyFlat
A ring map `f : R →+* S` is faithfully flat if `S` is faithfully flat as an `R`-algebra.
faithfullyFlat_algebraMap_iff [Algebra R S] : (algebraMap R S).FaithfullyFlat ↔ Module.FaithfullyFlat R S := by simp only [FaithfullyFlat] congr! exact Algebra.algebra_ext _ _ fun _ ↦ rfl
lemma
RingTheory
[ "Mathlib.RingTheory.RingHom.Flat" ]
Mathlib/RingTheory/RingHom/FaithfullyFlat.lean
faithfullyFlat_algebraMap_iff
null
flat (hf : f.FaithfullyFlat) : f.Flat := by algebraize [f] exact inferInstanceAs <| Module.Flat R S
lemma
RingTheory
[ "Mathlib.RingTheory.RingHom.Flat" ]
Mathlib/RingTheory/RingHom/FaithfullyFlat.lean
flat
null
iff_flat_and_comap_surjective : f.FaithfullyFlat ↔ f.Flat ∧ Function.Surjective f.specComap := by algebraize [f] rw [← algebraMap_toAlgebra f, faithfullyFlat_algebraMap_iff, flat_algebraMap_iff] exact ⟨fun h ↦ ⟨inferInstance, PrimeSpectrum.specComap_surjective_of_faithfullyFlat⟩, fun ⟨h, hf⟩ ↦ .of_specComap_surjective hf⟩
lemma
RingTheory
[ "Mathlib.RingTheory.RingHom.Flat" ]
Mathlib/RingTheory/RingHom/FaithfullyFlat.lean
iff_flat_and_comap_surjective
null
eq_and : FaithfullyFlat = fun (f : R →+* S) ↦ f.Flat ∧ Function.Surjective f.specComap := by ext rw [iff_flat_and_comap_surjective]
lemma
RingTheory
[ "Mathlib.RingTheory.RingHom.Flat" ]
Mathlib/RingTheory/RingHom/FaithfullyFlat.lean
eq_and
null
stableUnderComposition : StableUnderComposition FaithfullyFlat := by introv R hf hg algebraize [f, g, g.comp f] rw [← algebraMap_toAlgebra (g.comp f), faithfullyFlat_algebraMap_iff] exact .trans R S T
lemma
RingTheory
[ "Mathlib.RingTheory.RingHom.Flat" ]
Mathlib/RingTheory/RingHom/FaithfullyFlat.lean
stableUnderComposition
null
of_bijective (hf : Function.Bijective f) : f.FaithfullyFlat := by rw [iff_flat_and_comap_surjective] refine ⟨.of_bijective hf, fun p ↦ ?_⟩ use ((RingEquiv.ofBijective f hf).symm : _ →+* _).specComap p have : ((RingEquiv.ofBijective f hf).symm : _ →+* _).comp f = id R := by ext exact (RingEquiv.ofBijective f hf).injective (by simp) rw [← PrimeSpectrum.specComap_comp_apply, this, PrimeSpectrum.specComap_id]
lemma
RingTheory
[ "Mathlib.RingTheory.RingHom.Flat" ]
Mathlib/RingTheory/RingHom/FaithfullyFlat.lean
of_bijective
null
injective (hf : f.FaithfullyFlat) : Function.Injective ⇑f := by algebraize [f] exact FaithfulSMul.algebraMap_injective R S
lemma
RingTheory
[ "Mathlib.RingTheory.RingHom.Flat" ]
Mathlib/RingTheory/RingHom/FaithfullyFlat.lean
injective
null
respectsIso : RespectsIso FaithfullyFlat := stableUnderComposition.respectsIso (fun e ↦ .of_bijective e.bijective)
lemma
RingTheory
[ "Mathlib.RingTheory.RingHom.Flat" ]
Mathlib/RingTheory/RingHom/FaithfullyFlat.lean
respectsIso
null
isStableUnderBaseChange : IsStableUnderBaseChange FaithfullyFlat := by refine .mk respectsIso (fun R S T _ _ _ _ _ _ ↦ show (algebraMap _ _).FaithfullyFlat from ?_) rw [faithfullyFlat_algebraMap_iff] at * infer_instance
lemma
RingTheory
[ "Mathlib.RingTheory.RingHom.Flat" ]
Mathlib/RingTheory/RingHom/FaithfullyFlat.lean
isStableUnderBaseChange
null
finite_stableUnderComposition : StableUnderComposition @Finite := by introv R hf hg exact hg.comp hf
theorem
RingTheory
[ "Mathlib.RingTheory.LocalProperties.Basic", "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.TensorProduct.Finite" ]
Mathlib/RingTheory/RingHom/Finite.lean
finite_stableUnderComposition
null
finite_respectsIso : RespectsIso @Finite := by apply finite_stableUnderComposition.respectsIso intros exact Finite.of_surjective _ (RingEquiv.toEquiv _).surjective
theorem
RingTheory
[ "Mathlib.RingTheory.LocalProperties.Basic", "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.TensorProduct.Finite" ]
Mathlib/RingTheory/RingHom/Finite.lean
finite_respectsIso
null
finite_containsIdentities : ContainsIdentities @Finite := Finite.id
lemma
RingTheory
[ "Mathlib.RingTheory.LocalProperties.Basic", "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.TensorProduct.Finite" ]
Mathlib/RingTheory/RingHom/Finite.lean
finite_containsIdentities
null
finite_isStableUnderBaseChange : IsStableUnderBaseChange @Finite := by refine IsStableUnderBaseChange.mk finite_respectsIso ?_ classical introv h replace h : Module.Finite R T := by rw [RingHom.Finite] at h; convert h; ext; simp_rw [Algebra.smul_def]; rfl suffices Module.Finite S (S ⊗[R] T) by rw [RingHom.Finite]; convert this; congr; ext; simp_rw [Algebra.smul_def]; rfl exact inferInstance
theorem
RingTheory
[ "Mathlib.RingTheory.LocalProperties.Basic", "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.TensorProduct.Finite" ]
Mathlib/RingTheory/RingHom/Finite.lean
finite_isStableUnderBaseChange
null
Module.Finite.of_isLocalization (R S) {Rₚ Sₚ : Type*} [CommSemiring R] [CommSemiring S] [CommSemiring Rₚ] [CommSemiring Sₚ] [Algebra R S] [Algebra R Rₚ] [Algebra R Sₚ] [Algebra S Sₚ] [Algebra Rₚ Sₚ] [IsScalarTower R S Sₚ] [IsScalarTower R Rₚ Sₚ] (M : Submonoid R) [IsLocalization M Rₚ] [IsLocalization (Algebra.algebraMapSubmonoid S M) Sₚ] [hRS : Module.Finite R S] : Module.Finite Rₚ Sₚ := by classical have : algebraMap Rₚ Sₚ = IsLocalization.map (T := Algebra.algebraMapSubmonoid S M) Sₚ (algebraMap R S) (Submonoid.le_comap_map M) := by apply IsLocalization.ringHom_ext M simp only [IsLocalization.map_comp, ← IsScalarTower.algebraMap_eq] obtain ⟨T, hT⟩ := hRS use T.image (algebraMap S Sₚ) rw [eq_top_iff] rintro x - obtain ⟨y, ⟨_, ⟨r, hr, rfl⟩⟩, rfl⟩ := IsLocalization.mk'_surjective (Algebra.algebraMapSubmonoid S M) x rw [IsLocalization.mk'_eq_mul_mk'_one, mul_comm, Finset.coe_image] have hy : y ∈ Submodule.span R ↑T := by rw [hT]; trivial replace hy : algebraMap S Sₚ y ∈ Submodule.map (IsScalarTower.toAlgHom R S Sₚ).toLinearMap (Submodule.span R (T : Set S)) := Submodule.mem_map_of_mem (f := (IsScalarTower.toAlgHom R S Sₚ).toLinearMap) hy rw [Submodule.map_span (IsScalarTower.toAlgHom R S Sₚ).toLinearMap T] at hy have H : Submodule.span R (algebraMap S Sₚ '' T) ≤ (Submodule.span Rₚ (algebraMap S Sₚ '' T)).restrictScalars R := by rw [Submodule.span_le]; exact Submodule.subset_span convert (Submodule.span Rₚ (algebraMap S Sₚ '' T)).smul_mem (IsLocalization.mk' Rₚ (1 : R) ⟨r, hr⟩) (H hy) using 1 rw [Algebra.smul_def, this, IsLocalization.map_mk', map_one] @[deprecated (since := "2025-05-01")] alias Module.Finite_of_isLocalization := Module.Finite.of_isLocalization open Algebra nonZeroDivisors in
lemma
RingTheory
[ "Mathlib.RingTheory.LocalProperties.Basic", "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.TensorProduct.Finite" ]
Mathlib/RingTheory/RingHom/Finite.lean
Module.Finite.of_isLocalization
null
RingHom.finite_localizationPreserves : RingHom.LocalizationPreserves @RingHom.Finite := by introv R hf letI := f.toAlgebra letI := ((algebraMap S S').comp f).toAlgebra let f' : R' →+* S' := IsLocalization.map S' f (Submonoid.le_comap_map M) letI := f'.toAlgebra have : IsScalarTower R R' S' := IsScalarTower.of_algebraMap_eq' (IsLocalization.map_comp M.le_comap_map).symm have : IsScalarTower R S S' := IsScalarTower.of_algebraMap_eq' rfl have : IsLocalization (Algebra.algebraMapSubmonoid S M) S' := by rwa [Algebra.algebraMapSubmonoid, RingHom.algebraMap_toAlgebra] have : Module.Finite R S := hf exact .of_isLocalization R S M
theorem
RingTheory
[ "Mathlib.RingTheory.LocalProperties.Basic", "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.TensorProduct.Finite" ]
Mathlib/RingTheory/RingHom/Finite.lean
RingHom.finite_localizationPreserves
If `S` is a finite `R`-algebra, then `S' = M⁻¹S` is a finite `R' = M⁻¹R`-algebra.
RingHom.localization_away_map_finite (R S R' S' : Type u) [CommRing R] [CommRing S] [CommRing R'] [CommRing S'] [Algebra R R'] (f : R →+* S) [Algebra S S'] (r : R) [IsLocalization.Away r R'] [IsLocalization.Away (f r) S'] (hf : f.Finite) : (IsLocalization.Away.map R' S' f r).Finite := finite_localizationPreserves.away f r _ _ hf open scoped Classical in
theorem
RingTheory
[ "Mathlib.RingTheory.LocalProperties.Basic", "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.TensorProduct.Finite" ]
Mathlib/RingTheory/RingHom/Finite.lean
RingHom.localization_away_map_finite
null
IsLocalization.smul_mem_finsetIntegerMultiple_span [Algebra R S] [Algebra R S'] [IsScalarTower R S S'] [IsLocalization (M.map (algebraMap R S)) S'] (x : S) (s : Finset S') (hx : algebraMap S S' x ∈ Submodule.span R (s : Set S')) : ∃ m : M, m • x ∈ Submodule.span R (IsLocalization.finsetIntegerMultiple (M.map (algebraMap R S)) s : Set S) := by let g : S →ₐ[R] S' := AlgHom.mk' (algebraMap S S') fun c x => by simp [Algebra.algebraMap_eq_smul_one] have g_apply : ∀ x, g x = algebraMap S S' x := fun _ => rfl let y := IsLocalization.commonDenomOfFinset (M.map (algebraMap R S)) s have hx₁ : (y : S) • (s : Set S') = g '' _ := (IsLocalization.finsetIntegerMultiple_image _ s).symm obtain ⟨y', hy', e : algebraMap R S y' = y⟩ := y.prop have : algebraMap R S y' • (s : Set S') = y' • (s : Set S') := by simp_rw [Algebra.algebraMap_eq_smul_one, smul_assoc, one_smul] rw [← e, this] at hx₁ replace hx₁ := congr_arg (Submodule.span R) hx₁ rw [Submodule.span_smul] at hx₁ replace hx : _ ∈ y' • Submodule.span R (s : Set S') := Set.smul_mem_smul_set hx rw [hx₁, ← g_apply, ← map_smul g, g_apply, ← Algebra.linearMap_apply, ← Submodule.map_span] at hx obtain ⟨x', hx', hx'' : algebraMap _ _ _ = _⟩ := hx obtain ⟨⟨_, a, ha₁, rfl⟩, ha₂⟩ := (IsLocalization.eq_iff_exists (M.map (algebraMap R S)) S').mp hx'' use (⟨a, ha₁⟩ : M) * (⟨y', hy'⟩ : M) convert (Submodule.span R (IsLocalization.finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s : Set S)).smul_mem a hx' using 1 convert ha₂.symm using 1 · rw [Subtype.coe_mk, Submonoid.smul_def, Submonoid.coe_mul, ← smul_smul] exact Algebra.smul_def _ _ · exact Algebra.smul_def _ _
theorem
RingTheory
[ "Mathlib.RingTheory.LocalProperties.Basic", "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.TensorProduct.Finite" ]
Mathlib/RingTheory/RingHom/Finite.lean
IsLocalization.smul_mem_finsetIntegerMultiple_span
Let `S` be an `R`-algebra, `M` a submonoid of `R`, and `S' = M⁻¹S`. If the image of some `x : S` falls in the span of some finite `s ⊆ S'` over `R`, then there exists some `m : M` such that `m • x` falls in the span of `IsLocalization.finsetIntegerMultiple _ s` over `R`.
multiple_mem_span_of_mem_localization_span {N : Type*} [AddCommMonoid N] [Module R N] [Module R' N] [IsScalarTower R R' N] [IsLocalization M R'] (s : Set N) (x : N) (hx : x ∈ Submodule.span R' s) : ∃ (t : M), t • x ∈ Submodule.span R s := by classical obtain ⟨s', hss', hs'⟩ := Submodule.mem_span_finite_of_mem_span hx rsuffices ⟨t, ht⟩ : ∃ t : M, t • x ∈ Submodule.span R (s' : Set N) · exact ⟨t, Submodule.span_mono hss' ht⟩ clear hx hss' s induction s' using Finset.induction_on generalizing x with | empty => use 1; simpa using hs' | insert a s _ hs => simp only [Finset.coe_insert, Submodule.mem_span_insert] at hs' ⊢ rcases hs' with ⟨y, z, hz, rfl⟩ rcases IsLocalization.surj M y with ⟨⟨y', s'⟩, e⟩ apply congrArg (fun x ↦ x • a) at e simp only [algebraMap_smul] at e rcases hs _ hz with ⟨t, ht⟩ refine ⟨t * s', t * y', _, (Submodule.span R (s : Set N)).smul_mem s' ht, ?_⟩ rw [smul_add, ← smul_smul, mul_comm, ← smul_smul, ← smul_smul, ← e, mul_comm, ← Algebra.smul_def] simp [Submonoid.smul_def]
theorem
RingTheory
[ "Mathlib.RingTheory.LocalProperties.Basic", "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.TensorProduct.Finite" ]
Mathlib/RingTheory/RingHom/Finite.lean
multiple_mem_span_of_mem_localization_span
If `M` is an `R' = S⁻¹R` module, and `x ∈ span R' s`, then `t • x ∈ span R s` for some `t : S`.
multiple_mem_adjoin_of_mem_localization_adjoin [Algebra R' S] [Algebra R S] [IsScalarTower R R' S] [IsLocalization M R'] (s : Set S) (x : S) (hx : x ∈ Algebra.adjoin R' s) : ∃ t : M, t • x ∈ Algebra.adjoin R s := by change ∃ t : M, t • x ∈ Subalgebra.toSubmodule (Algebra.adjoin R s) change x ∈ Subalgebra.toSubmodule (Algebra.adjoin R' s) at hx simp_rw [Algebra.adjoin_eq_span] at hx ⊢ exact multiple_mem_span_of_mem_localization_span M R' _ _ hx
theorem
RingTheory
[ "Mathlib.RingTheory.LocalProperties.Basic", "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.TensorProduct.Finite" ]
Mathlib/RingTheory/RingHom/Finite.lean
multiple_mem_adjoin_of_mem_localization_adjoin
If `S` is an `R' = M⁻¹R` algebra, and `x ∈ adjoin R' s`, then `t • x ∈ adjoin R s` for some `t : M`.
RingHom.finite_ofLocalizationSpan : RingHom.OfLocalizationSpan @RingHom.Finite := by classical rw [RingHom.ofLocalizationSpan_iff_finite] introv R hs H letI := f.toAlgebra letI := fun r : s => (Localization.awayMap f r).toAlgebra have : ∀ r : s, IsLocalization ((Submonoid.powers (r : R)).map (algebraMap R S)) (Localization.Away (f r)) := by intro r; rw [Submonoid.map_powers]; exact Localization.isLocalization haveI : ∀ r : s, IsScalarTower R (Localization.Away (r : R)) (Localization.Away (f r)) := fun r => IsScalarTower.of_algebraMap_eq' (IsLocalization.map_comp (Submonoid.powers (r : R)).le_comap_map).symm constructor replace H := fun r => (H r).1 choose s₁ s₂ using H let sf := fun x : s => IsLocalization.finsetIntegerMultiple (Submonoid.powers (f x)) (s₁ x) use s.attach.biUnion sf rw [Submodule.span_attach_biUnion, eq_top_iff] rintro x - apply Submodule.mem_of_span_eq_top_of_smul_pow_mem _ (s : Set R) hs _ _ intro r obtain ⟨⟨_, n₁, rfl⟩, hn₁⟩ := multiple_mem_span_of_mem_localization_span (Submonoid.powers (r : R)) (Localization.Away (r : R)) (s₁ r : Set (Localization.Away (f r))) (algebraMap S _ x) (by rw [s₂ r]; trivial) dsimp only at hn₁ rw [Submonoid.smul_def, Algebra.smul_def, IsScalarTower.algebraMap_apply R S, ← map_mul] at hn₁ obtain ⟨⟨_, n₂, rfl⟩, hn₂⟩ := IsLocalization.smul_mem_finsetIntegerMultiple_span (Submonoid.powers (r : R)) (Localization.Away (f r)) _ (s₁ r) hn₁ rw [Submonoid.smul_def, ← Algebra.smul_def, smul_smul, ← pow_add] at hn₂ simp_rw [Submonoid.map_powers] at hn₂ use n₂ + n₁ exact le_iSup (fun x : s => Submodule.span R (sf x : Set S)) r hn₂
theorem
RingTheory
[ "Mathlib.RingTheory.LocalProperties.Basic", "Mathlib.RingTheory.Localization.Integer", "Mathlib.RingTheory.TensorProduct.Finite" ]
Mathlib/RingTheory/RingHom/Finite.lean
RingHom.finite_ofLocalizationSpan
`S` is a finite `R`-algebra if there exists a set `{ r }` that spans `R` such that `Sᵣ` is a finite `Rᵣ`-algebra.
of_span_eq_top_target_aux {A : Type*} [CommRing A] [Algebra R A] [Algebra.FinitePresentation R A] (f : A →ₐ[R] S) (hf : Function.Surjective f) (t : Finset A) (ht : Ideal.span (t : Set A) = ⊤) (H : ∀ g : t, Algebra.FinitePresentation R (Localization.Away (f g))) : Algebra.FinitePresentation R S := by apply Algebra.FinitePresentation.of_surjective hf apply RingHom.ker_fg_of_localizationSpan t ht intro g let f' : Localization.Away g.val →ₐ[R] Localization.Away (f g) := Localization.awayMapₐ f g.val have (g : t) : Algebra.FinitePresentation R (Localization.Away g.val) := haveI : Algebra.FinitePresentation A (Localization.Away g.val) := IsLocalization.Away.finitePresentation g.val Algebra.FinitePresentation.trans R A (Localization.Away g.val) apply Algebra.FinitePresentation.ker_fG_of_surjective f' exact IsLocalization.Away.mapₐ_surjective_of_surjective _ hf universe u
lemma
RingTheory
[ "Mathlib.RingTheory.Localization.Finiteness", "Mathlib.RingTheory.RingHom.FiniteType", "Mathlib.RingTheory.Localization.Away.AdjoinRoot" ]
Mathlib/RingTheory/RingHom/FinitePresentation.lean
of_span_eq_top_target_aux
If `S` is an `R`-algebra with a surjection from a finitely-presented `R`-algebra `A`, such that localized at a spanning set `{ r }` of elements of `A`, `Sᵣ` is finitely-presented, then `S` is finitely presented. This is almost `finitePresentation_ofLocalizationSpanTarget`. The difference is, that here the set `t` generates the unit ideal of `A`, while in the general version, it only generates a quotient of `A`.
of_span_eq_top_target (s : Set S) (hs : Ideal.span (s : Set S) = ⊤) (h : ∀ i ∈ s, Algebra.FinitePresentation R (Localization.Away i)) : Algebra.FinitePresentation R S := by obtain ⟨s, h₁, hs⟩ := (Ideal.span_eq_top_iff_finite s).mp hs replace h (i : s) : Algebra.FinitePresentation R (Localization.Away i.val) := h i (h₁ i.property) classical /- We already know that `S` is of finite type over `R`, so we have a surjection `MvPolynomial (Fin n) R →ₐ[R] S`. To reason about the kernel, we want to check it on the stalks of preimages of `s`. But the preimages do not necessarily span `MvPolynomial (Fin n) R`, so we quotient out by an ideal and apply `finitePresentation_ofLocalizationSpanTarget_aux`. -/ have hfintype : Algebra.FiniteType R S := by apply Algebra.FiniteType.of_span_eq_top_target s hs intro x hx have := h ⟨x, hx⟩ infer_instance obtain ⟨n, f, hf⟩ := Algebra.FiniteType.iff_quotient_mvPolynomial''.mp hfintype obtain ⟨l, hl⟩ := (Finsupp.mem_span_iff_linearCombination S (s : Set S) 1).mp (show (1 : S) ∈ Ideal.span (s : Set S) by rw [hs]; trivial) choose g' hg' using (fun g : s ↦ hf g) choose h' hh' using (fun g : s ↦ hf (l g)) let I : Ideal (MvPolynomial (Fin n) R) := Ideal.span { ∑ g : s, g' g * h' g - 1 } let A := MvPolynomial (Fin n) R ⧸ I have hfI : ∀ a ∈ I, f a = 0 := by intro p hp simp only [Finset.univ_eq_attach, I, Ideal.mem_span_singleton] at hp obtain ⟨q, rfl⟩ := hp simp only [map_mul, map_sub, map_sum, map_one, hg', hh'] rw [Finsupp.linearCombination_apply_of_mem_supported (α := (s : Set S)) S (s := s.attach)] at hl · rw [← hl] simp only [Finset.coe_sort_coe, smul_eq_mul, mul_comm, sub_self, zero_mul] · rintro a - simp let f' : A →ₐ[R] S := Ideal.Quotient.liftₐ I f hfI have hf' : Function.Surjective f' := Ideal.Quotient.lift_surjective_of_surjective I hfI hf let t : Finset A := Finset.image (fun g ↦ g' g) Finset.univ have ht : Ideal.span (t : Set A) = ⊤ := by rw [Ideal.eq_top_iff_one] have : ∑ g : { x // x ∈ s }, g' g * h' g = (1 : A) := by apply eq_of_sub_eq_zero rw [← map_one (Ideal.Quotient.mk I), ← map_sub, Ideal.Quotient.eq_zero_iff_mem] apply Ideal.subset_span simp simp_rw [← this, Finset.univ_eq_attach, map_sum, map_mul] refine Ideal.sum_mem _ (fun g _ ↦ Ideal.mul_mem_right _ _ <| Ideal.subset_span ?_) simp [t] have : Algebra.FinitePresentation R A := by apply Algebra.FinitePresentation.quotient simp only [Finset.univ_eq_attach, I] ...
lemma
RingTheory
[ "Mathlib.RingTheory.Localization.Finiteness", "Mathlib.RingTheory.RingHom.FiniteType", "Mathlib.RingTheory.Localization.Away.AdjoinRoot" ]
Mathlib/RingTheory/RingHom/FinitePresentation.lean
of_span_eq_top_target
Finite-presentation can be checked on a standard covering of the target.
finitePresentation_stableUnderComposition : StableUnderComposition @FinitePresentation := by introv R hf hg exact hg.comp hf
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Finiteness", "Mathlib.RingTheory.RingHom.FiniteType", "Mathlib.RingTheory.Localization.Away.AdjoinRoot" ]
Mathlib/RingTheory/RingHom/FinitePresentation.lean
finitePresentation_stableUnderComposition
Being finitely-presented is stable under composition.
finitePresentation_respectsIso : RingHom.RespectsIso @RingHom.FinitePresentation := finitePresentation_stableUnderComposition.respectsIso fun e ↦ .of_surjective _ e.surjective <| by simpa using Submodule.fg_bot
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Finiteness", "Mathlib.RingTheory.RingHom.FiniteType", "Mathlib.RingTheory.Localization.Away.AdjoinRoot" ]
Mathlib/RingTheory/RingHom/FinitePresentation.lean
finitePresentation_respectsIso
Being finitely-presented respects isomorphisms.
finitePresentation_isStableUnderBaseChange : IsStableUnderBaseChange @FinitePresentation := by apply IsStableUnderBaseChange.mk · exact finitePresentation_respectsIso · introv h rw [finitePresentation_algebraMap] at h suffices Algebra.FinitePresentation S (S ⊗[R] T) by rw [RingHom.FinitePresentation]; convert this; ext; simp_rw [Algebra.smul_def]; rfl infer_instance
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Finiteness", "Mathlib.RingTheory.RingHom.FiniteType", "Mathlib.RingTheory.Localization.Away.AdjoinRoot" ]
Mathlib/RingTheory/RingHom/FinitePresentation.lean
finitePresentation_isStableUnderBaseChange
Being finitely-presented is stable under base change.
finitePresentation_localizationPreserves : LocalizationPreserves @FinitePresentation := finitePresentation_isStableUnderBaseChange.localizationPreserves
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Finiteness", "Mathlib.RingTheory.RingHom.FiniteType", "Mathlib.RingTheory.Localization.Away.AdjoinRoot" ]
Mathlib/RingTheory/RingHom/FinitePresentation.lean
finitePresentation_localizationPreserves
Being finitely-presented is preserved by localizations.
finitePresentation_holdsForLocalizationAway : HoldsForLocalizationAway @FinitePresentation := by introv R _ rw [finitePresentation_algebraMap] exact IsLocalization.Away.finitePresentation r
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Finiteness", "Mathlib.RingTheory.RingHom.FiniteType", "Mathlib.RingTheory.Localization.Away.AdjoinRoot" ]
Mathlib/RingTheory/RingHom/FinitePresentation.lean
finitePresentation_holdsForLocalizationAway
If `R` is a ring, then `Rᵣ` is `R`-finitely-presented for any `r : R`.
finitePresentation_ofLocalizationSpanTarget : OfLocalizationSpanTarget @FinitePresentation := by introv R hs H algebraize [f] replace H : ∀ r ∈ s, Algebra.FinitePresentation R (Localization.Away (r : S)) := by intro r hr; simp_rw [RingHom.FinitePresentation] at H; convert H ⟨r, hr⟩; ext simp_rw [Algebra.smul_def]; rfl exact Algebra.FinitePresentation.of_span_eq_top_target s hs H
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Finiteness", "Mathlib.RingTheory.RingHom.FiniteType", "Mathlib.RingTheory.Localization.Away.AdjoinRoot" ]
Mathlib/RingTheory/RingHom/FinitePresentation.lean
finitePresentation_ofLocalizationSpanTarget
Finite-presentation can be checked on a standard covering of the target.
finitePresentation_isLocal : PropertyIsLocal @FinitePresentation := ⟨finitePresentation_localizationPreserves.away, finitePresentation_ofLocalizationSpanTarget, finitePresentation_ofLocalizationSpanTarget.ofLocalizationSpan (finitePresentation_stableUnderComposition.stableUnderCompositionWithLocalizationAway finitePresentation_holdsForLocalizationAway).left, (finitePresentation_stableUnderComposition.stableUnderCompositionWithLocalizationAway finitePresentation_holdsForLocalizationAway).right⟩
theorem
RingTheory
[ "Mathlib.RingTheory.Localization.Finiteness", "Mathlib.RingTheory.RingHom.FiniteType", "Mathlib.RingTheory.Localization.Away.AdjoinRoot" ]
Mathlib/RingTheory/RingHom/FinitePresentation.lean
finitePresentation_isLocal
Being finitely-presented is a local property of rings.
IsLocalization.exists_smul_mem_of_mem_adjoin [Algebra R S'] [IsScalarTower R S S'] (M : Submonoid S) [IsLocalization M S'] (x : S) (s : Finset S') (A : Subalgebra R S) (hA₁ : (IsLocalization.finsetIntegerMultiple M s : Set S) ⊆ A) (hA₂ : M ≤ A.toSubmonoid) (hx : algebraMap S S' x ∈ Algebra.adjoin R (s : Set S')) : ∃ m : M, m • x ∈ A := by let g : S →ₐ[R] S' := IsScalarTower.toAlgHom R S S' let y := IsLocalization.commonDenomOfFinset M s have hx₁ : (y : S) • (s : Set S') = g '' _ := (IsLocalization.finsetIntegerMultiple_image _ s).symm obtain ⟨n, hn⟩ := Algebra.pow_smul_mem_of_smul_subset_of_mem_adjoin (y : S) (s : Set S') (A.map g) (by rw [hx₁]; exact Set.image_mono hA₁) hx (Set.mem_image_of_mem _ (hA₂ y.2)) obtain ⟨x', hx', hx''⟩ := hn n (le_of_eq rfl) rw [Algebra.smul_def, ← map_mul] at hx'' obtain ⟨a, ha₂⟩ := (IsLocalization.eq_iff_exists M S').mp hx'' use a * y ^ n convert A.mul_mem hx' (hA₂ a.prop) using 1 rw [Submonoid.smul_def, smul_eq_mul, Submonoid.coe_mul, SubmonoidClass.coe_pow, mul_assoc, ← ha₂, mul_comm] variable {S'} in open scoped Classical in
theorem
RingTheory
[ "Mathlib.RingTheory.FiniteStability", "Mathlib.RingTheory.Localization.InvSubmonoid", "Mathlib.RingTheory.RingHom.Finite" ]
Mathlib/RingTheory/RingHom/FiniteType.lean
IsLocalization.exists_smul_mem_of_mem_adjoin
Let `S` be an `R`-algebra, `M` a submonoid of `S`, `S' = M⁻¹S`. Suppose the image of some `x : S` falls in the adjoin of some finite `s ⊆ S'` over `R`, and `A` is an `R`-subalgebra of `S` containing both `M` and the numerators of `s`. Then, there exists some `m : M` such that `m • x` falls in `A`.
IsLocalization.lift_mem_adjoin_finsetIntegerMultiple [Algebra R S'] [IsScalarTower R S S'] [IsLocalization (M.map (algebraMap R S)) S'] (x : S) (s : Finset S') (hx : algebraMap S S' x ∈ Algebra.adjoin R (s : Set S')) : ∃ m : M, m • x ∈ Algebra.adjoin R (IsLocalization.finsetIntegerMultiple (M.map (algebraMap R S)) s : Set S) := by obtain ⟨⟨_, a, ha, rfl⟩, e⟩ := IsLocalization.exists_smul_mem_of_mem_adjoin (M.map (algebraMap R S)) x s (Algebra.adjoin R _) Algebra.subset_adjoin (by rintro _ ⟨a, _, rfl⟩; exact Subalgebra.algebraMap_mem _ a) hx refine ⟨⟨a, ha⟩, ?_⟩ simpa only [Submonoid.smul_def, algebraMap_smul] using e
theorem
RingTheory
[ "Mathlib.RingTheory.FiniteStability", "Mathlib.RingTheory.Localization.InvSubmonoid", "Mathlib.RingTheory.RingHom.Finite" ]
Mathlib/RingTheory/RingHom/FiniteType.lean
IsLocalization.lift_mem_adjoin_finsetIntegerMultiple
Let `S` be an `R`-algebra, `M` a submonoid of `R`, and `S' = M⁻¹S`. If the image of some `x : S` falls in the adjoin of some finite `s ⊆ S'` over `R`, then there exists some `m : M` such that `m • x` falls in the adjoin of `IsLocalization.finsetIntegerMultiple _ s` over `R`.
Algebra.FiniteType.of_span_eq_top_target (s : Set S) (hs : Ideal.span (s : Set S) = ⊤) (h : ∀ x ∈ s, Algebra.FiniteType R (Localization.Away x)) : Algebra.FiniteType R S := by obtain ⟨s, h₁, hs⟩ := (Ideal.span_eq_top_iff_finite s).mp hs replace h (i : s) : Algebra.FiniteType R (Localization.Away i.val) := h i (h₁ i.property) classical replace h := fun r => (h r).1 choose t ht using h obtain ⟨l, hl⟩ := (Finsupp.mem_span_iff_linearCombination S (s : Set S) 1).mp (show (1 : S) ∈ Ideal.span (s : Set S) by rw [hs]; trivial) let sf := fun x : s => IsLocalization.finsetIntegerMultiple (Submonoid.powers (x : S)) (t x) use s.attach.biUnion sf ∪ s ∪ l.support.image l rw [_root_.eq_top_iff] rintro x - apply Subalgebra.mem_of_span_eq_top_of_smul_pow_mem _ (s : Set S) l hl _ _ x _ · intro x hx apply Algebra.subset_adjoin rw [Finset.coe_union, Finset.coe_union] exact Or.inl (Or.inr hx) · intro i by_cases h : l i = 0; · rw [h]; exact zero_mem _ apply Algebra.subset_adjoin rw [Finset.coe_union, Finset.coe_image] exact Or.inr (Set.mem_image_of_mem _ (Finsupp.mem_support_iff.mpr h)) · intro r rw [Finset.coe_union, Finset.coe_union, Finset.coe_biUnion] rw [show ∀ A : Set S, (∃ n, (r : S) ^ n • x ∈ Algebra.adjoin R A) ↔ (∃ m : (Submonoid.powers (r : S)), (m : S) • x ∈ Algebra.adjoin R A) by { exact fun _ => by simp [Submonoid.mem_powers_iff] }] refine IsLocalization.exists_smul_mem_of_mem_adjoin (Submonoid.powers (r : S)) x (t r) (Algebra.adjoin R _) ?_ ?_ ?_ · intro x hx apply Algebra.subset_adjoin exact Or.inl (Or.inl ⟨_, ⟨r, rfl⟩, _, ⟨s.mem_attach r, rfl⟩, hx⟩) · rw [Submonoid.powers_eq_closure, Submonoid.closure_le, Set.singleton_subset_iff] apply Algebra.subset_adjoin exact Or.inl (Or.inr r.2) · rw [ht]; trivial attribute [local instance] Algebra.TensorProduct.rightAlgebra in
lemma
RingTheory
[ "Mathlib.RingTheory.FiniteStability", "Mathlib.RingTheory.Localization.InvSubmonoid", "Mathlib.RingTheory.RingHom.Finite" ]
Mathlib/RingTheory/RingHom/FiniteType.lean
Algebra.FiniteType.of_span_eq_top_target
Finite-type can be checked on a standard covering of the target.
Algebra.FiniteType.of_span_eq_top_source (s : Set R) (hs : Ideal.span (s : Set R) = ⊤) (h : ∀ i ∈ s, Algebra.FiniteType (Localization.Away i) (Localization.Away i ⊗[R] S)) : Algebra.FiniteType R S := by obtain ⟨s, h₁, hs⟩ := (Ideal.span_eq_top_iff_finite s).mp hs replace h (i : s) := h i.val (h₁ i.property) classical letI := fun r : s => (Localization.awayMap (algebraMap R S) r).toAlgebra set f := algebraMap R S constructor replace H := fun r => (h r).1 choose s₁ s₂ using H let sf := fun x : s => IsLocalization.finsetIntegerMultiple (Submonoid.powers (f x)) (s₁ x) use s.attach.biUnion sf convert (Algebra.adjoin_attach_biUnion (R := R) sf).trans _ rw [eq_top_iff] rintro x - apply (⨆ x : s, Algebra.adjoin R (sf x : Set S)).toSubmodule.mem_of_span_eq_top_of_smul_pow_mem _ hs _ _ intro r obtain ⟨⟨_, n₁, rfl⟩, hn₁⟩ := multiple_mem_adjoin_of_mem_localization_adjoin (Submonoid.powers (r : R)) (Localization.Away (r : R)) (s₁ r : Set (Localization.Away r.val ⊗[R] S)) (algebraMap S _ x) (by rw [s₂ r]; trivial) rw [Submonoid.smul_def, Algebra.smul_def, IsScalarTower.algebraMap_apply R S, ← map_mul] at hn₁ obtain ⟨⟨_, n₂, rfl⟩, hn₂⟩ := IsLocalization.lift_mem_adjoin_finsetIntegerMultiple (Submonoid.powers (r : R)) _ (s₁ r) hn₁ rw [Submonoid.smul_def, ← Algebra.smul_def, smul_smul, ← pow_add] at hn₂ simp_rw [Submonoid.map_powers] at hn₂ use n₂ + n₁ exact le_iSup (fun x : s => Algebra.adjoin R (sf x : Set S)) r hn₂
lemma
RingTheory
[ "Mathlib.RingTheory.FiniteStability", "Mathlib.RingTheory.Localization.InvSubmonoid", "Mathlib.RingTheory.RingHom.Finite" ]
Mathlib/RingTheory/RingHom/FiniteType.lean
Algebra.FiniteType.of_span_eq_top_source
null
finiteType_stableUnderComposition : StableUnderComposition @FiniteType := by introv R hf hg exact hg.comp hf
theorem
RingTheory
[ "Mathlib.RingTheory.FiniteStability", "Mathlib.RingTheory.Localization.InvSubmonoid", "Mathlib.RingTheory.RingHom.Finite" ]
Mathlib/RingTheory/RingHom/FiniteType.lean
finiteType_stableUnderComposition
null
finiteType_respectsIso : RingHom.RespectsIso @RingHom.FiniteType := by refine finiteType_stableUnderComposition.respectsIso (fun {R S} _ _ e ↦ ?_) algebraize [e.toRingHom] apply Algebra.FiniteType.equiv (inferInstanceAs <| Algebra.FiniteType R R) <| .ofRingEquiv (congrFun rfl)
theorem
RingTheory
[ "Mathlib.RingTheory.FiniteStability", "Mathlib.RingTheory.Localization.InvSubmonoid", "Mathlib.RingTheory.RingHom.Finite" ]
Mathlib/RingTheory/RingHom/FiniteType.lean
finiteType_respectsIso
null
finiteType_isStableUnderBaseChange : IsStableUnderBaseChange @FiniteType := by apply IsStableUnderBaseChange.mk · exact finiteType_respectsIso · introv h rw [finiteType_algebraMap] at h suffices Algebra.FiniteType S (S ⊗[R] T) by rw [RingHom.FiniteType]; convert this; ext; simp_rw [Algebra.smul_def]; rfl infer_instance
theorem
RingTheory
[ "Mathlib.RingTheory.FiniteStability", "Mathlib.RingTheory.Localization.InvSubmonoid", "Mathlib.RingTheory.RingHom.Finite" ]
Mathlib/RingTheory/RingHom/FiniteType.lean
finiteType_isStableUnderBaseChange
null
finiteType_localizationPreserves : RingHom.LocalizationPreserves @RingHom.FiniteType := finiteType_isStableUnderBaseChange.localizationPreserves
theorem
RingTheory
[ "Mathlib.RingTheory.FiniteStability", "Mathlib.RingTheory.Localization.InvSubmonoid", "Mathlib.RingTheory.RingHom.Finite" ]
Mathlib/RingTheory/RingHom/FiniteType.lean
finiteType_localizationPreserves
If `S` is a finite type `R`-algebra, then `S' = M⁻¹S` is a finite type `R' = M⁻¹R`-algebra.
localization_away_map_finiteType (R S R' S' : Type u) [CommRing R] [CommRing S] [CommRing R'] [CommRing S'] [Algebra R R'] (f : R →+* S) [Algebra S S'] (r : R) [IsLocalization.Away r R'] [IsLocalization.Away (f r) S'] (hf : f.FiniteType) : (IsLocalization.Away.map R' S' f r).FiniteType := finiteType_localizationPreserves.away _ r _ _ hf
theorem
RingTheory
[ "Mathlib.RingTheory.FiniteStability", "Mathlib.RingTheory.Localization.InvSubmonoid", "Mathlib.RingTheory.RingHom.Finite" ]
Mathlib/RingTheory/RingHom/FiniteType.lean
localization_away_map_finiteType
null
finiteType_ofLocalizationSpan : RingHom.OfLocalizationSpan @RingHom.FiniteType := by refine OfLocalizationSpan.mk _ finiteType_respectsIso (fun s hs h ↦ ?_) simp_rw [finiteType_algebraMap] at h ⊢ exact Algebra.FiniteType.of_span_eq_top_source s hs h
theorem
RingTheory
[ "Mathlib.RingTheory.FiniteStability", "Mathlib.RingTheory.Localization.InvSubmonoid", "Mathlib.RingTheory.RingHom.Finite" ]
Mathlib/RingTheory/RingHom/FiniteType.lean
finiteType_ofLocalizationSpan
null
finiteType_holdsForLocalizationAway : HoldsForLocalizationAway @FiniteType := by introv R _ rw [finiteType_algebraMap] exact IsLocalization.finiteType_of_monoid_fg (Submonoid.powers r) S
theorem
RingTheory
[ "Mathlib.RingTheory.FiniteStability", "Mathlib.RingTheory.Localization.InvSubmonoid", "Mathlib.RingTheory.RingHom.Finite" ]
Mathlib/RingTheory/RingHom/FiniteType.lean
finiteType_holdsForLocalizationAway
null
finiteType_ofLocalizationSpanTarget : OfLocalizationSpanTarget @FiniteType := by introv R hs H algebraize [f] replace H : ∀ r ∈ s, Algebra.FiniteType R (Localization.Away (r : S)) := by intro r hr; simp_rw [RingHom.FiniteType] at H; convert H ⟨r, hr⟩; ext simp_rw [Algebra.smul_def]; rfl exact Algebra.FiniteType.of_span_eq_top_target s hs H
theorem
RingTheory
[ "Mathlib.RingTheory.FiniteStability", "Mathlib.RingTheory.Localization.InvSubmonoid", "Mathlib.RingTheory.RingHom.Finite" ]
Mathlib/RingTheory/RingHom/FiniteType.lean
finiteType_ofLocalizationSpanTarget
null
finiteType_isLocal : PropertyIsLocal @FiniteType := ⟨finiteType_localizationPreserves.away, finiteType_ofLocalizationSpanTarget, finiteType_ofLocalizationSpanTarget.ofLocalizationSpan (finiteType_stableUnderComposition.stableUnderCompositionWithLocalizationAway finiteType_holdsForLocalizationAway).left, (finiteType_stableUnderComposition.stableUnderCompositionWithLocalizationAway finiteType_holdsForLocalizationAway).right⟩ @[deprecated (since := "2025-03-01")] alias finiteType_is_local := finiteType_isLocal
theorem
RingTheory
[ "Mathlib.RingTheory.FiniteStability", "Mathlib.RingTheory.Localization.InvSubmonoid", "Mathlib.RingTheory.RingHom.Finite" ]
Mathlib/RingTheory/RingHom/FiniteType.lean
finiteType_isLocal
null
@[algebraize Module.Flat] RingHom.Flat {R : Type u} {S : Type v} [CommRing R] [CommRing S] (f : R →+* S) : Prop := letI : Algebra R S := f.toAlgebra Module.Flat R S
def
RingTheory
[ "Mathlib.RingTheory.Flat.Localization", "Mathlib.RingTheory.LocalProperties.Basic", "Mathlib.RingTheory.Ideal.GoingDown" ]
Mathlib/RingTheory/RingHom/Flat.lean
RingHom.Flat
A ring homomorphism `f : R →+* S` is flat if `S` is flat as an `R` module.
RingHom.flat_algebraMap_iff {R S : Type*} [CommRing R] [CommRing S] [Algebra R S] : (algebraMap R S).Flat ↔ Module.Flat R S := by rw [RingHom.Flat, toAlgebra_algebraMap] @[deprecated (since := "2025-06-03")] alias flat_algebraMap_iff := RingHom.flat_algebraMap_iff
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Localization", "Mathlib.RingTheory.LocalProperties.Basic", "Mathlib.RingTheory.Ideal.GoingDown" ]
Mathlib/RingTheory/RingHom/Flat.lean
RingHom.flat_algebraMap_iff
null
id : RingHom.Flat (RingHom.id R) := Module.Flat.self
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Localization", "Mathlib.RingTheory.LocalProperties.Basic", "Mathlib.RingTheory.Ideal.GoingDown" ]
Mathlib/RingTheory/RingHom/Flat.lean
id
The identity of a ring is flat.
comp {f : R →+* S} {g : S →+* T} (hf : f.Flat) (hg : g.Flat) : Flat (g.comp f) := by algebraize [f, g, (g.comp f)] exact Module.Flat.trans R S T
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Localization", "Mathlib.RingTheory.LocalProperties.Basic", "Mathlib.RingTheory.Ideal.GoingDown" ]
Mathlib/RingTheory/RingHom/Flat.lean
comp
Composition of flat ring homomorphisms is flat.
of_bijective {f : R →+* S} (hf : Function.Bijective f) : Flat f := by algebraize [f] exact Module.Flat.of_linearEquiv (LinearEquiv.ofBijective (Algebra.linearMap R S) hf).symm
lemma
RingTheory
[ "Mathlib.RingTheory.Flat.Localization", "Mathlib.RingTheory.LocalProperties.Basic", "Mathlib.RingTheory.Ideal.GoingDown" ]
Mathlib/RingTheory/RingHom/Flat.lean
of_bijective
Bijective ring maps are flat.