File: Mathlib/RingTheory/Regular/RegularSequence.lean

full_name: Ideal.ofList
code: /-- The ideal generated by a list of elements. -/
abbrev ofList (rs : List R) 
goal: Ideal R

full_name: Ideal.ofList_nil
code: @[simp] lemma ofList_nil : (ofList [] : Ideal R) = ⊥ 
goal: Ideal.ofList [] = ⊥

full_name: Ideal.ofList_append
code: @[simp] lemma ofList_append (rs₁ rs₂ : List R) :
    ofList (rs₁ ++ rs₂) = ofList rs₁ ⊔ ofList rs₂ 
goal: Ideal.ofList (rs₁ ++ rs₂) = Ideal.ofList rs₁ ⊔ Ideal.ofList rs₂

full_name: Ideal.ofList_singleton
code: @[simp] lemma ofList_singleton (r : R) : ofList [r] = span {r} 
goal: Ideal.ofList [r] = Ideal.span {r}

full_name: Ideal.ofList_cons
code: @[simp] lemma ofList_cons (r : R) (rs : List R) :
    ofList (r::rs) = span {r} ⊔ ofList rs 
goal: Ideal.ofList (r :: rs) = Ideal.span {r} ⊔ Ideal.ofList rs

full_name: Ideal.map_ofList
code: @[simp] lemma map_ofList (f : R →+* S) (rs : List R) :
    map f (ofList rs) = ofList (rs.map f) 
goal: Ideal.map f (Ideal.ofList rs) = Ideal.ofList (List.map (⇑f) rs)

full_name: Ideal.ofList_cons_smul
code: lemma ofList_cons_smul {R} [CommSemiring R] (r : R) (rs : List R) {M}
    [AddCommMonoid M] [Module R M] (N : Submodule R M) :
    ofList (r :: rs) • N = r • N ⊔ ofList rs • N 
goal: Ideal.ofList (r :: rs) • N = r • N ⊔ Ideal.ofList rs • N

full_name: Submodule.smul_top_le_comap_smul_top
code: lemma smul_top_le_comap_smul_top [CommSemiring R] [AddCommMonoid M]
    [AddCommMonoid M₂] [Module R M] [Module R M₂] (I : Ideal R)
    (f : M →ₗ[R] M₂) : I • ⊤ ≤ comap f (I • ⊤) 
goal: I • ⊤ ≤ Submodule.comap f (I • ⊤)

full_name: Submodule.quotOfListConsSMulTopEquivQuotSMulTopInner
code: /-- The equivalence between M ⧸ (r₀, r₁, …, rₙ)M and (M ⧸ r₀M) ⧸ (r₁, …, rₙ) (M ⧸ r₀M). -/
def quotOfListConsSMulTopEquivQuotSMulTopInner :
    (M ⧸ (Ideal.ofList (r :: rs) • ⊤ : Submodule R M)) ≃ₗ[R]
      QuotSMulTop r M ⧸ (Ideal.ofList rs • ⊤ : Submodule R (QuotSMulTop r M)) 
goal: (M ⧸ Ideal.ofList (r :: rs) • ⊤) ≃ₗ[R] QuotSMulTop r M ⧸ Ideal.ofList rs • ⊤

full_name: Submodule.quotOfListConsSMulTopEquivQuotSMulTopOuter
code: /-- The equivalence between M ⧸ (r₀, r₁, …, rₙ)M and (M ⧸ (r₁, …, rₙ)) ⧸ r₀ (M ⧸ (r₁, …, rₙ)). -/
def quotOfListConsSMulTopEquivQuotSMulTopOuter :
    (M ⧸ (Ideal.ofList (r :: rs) • ⊤ : Submodule R M)) ≃ₗ[R]
      QuotSMulTop r (M ⧸ (Ideal.ofList rs • ⊤ : Submodule R M)) 
goal: (M ⧸ Ideal.ofList (r :: rs) • ⊤) ≃ₗ[R] QuotSMulTop r (M ⧸ Ideal.ofList rs • ⊤)

full_name: Submodule.quotOfListConsSMulTopEquivQuotSMulTopInner_naturality
code: lemma quotOfListConsSMulTopEquivQuotSMulTopInner_naturality (f : M →ₗ[R] M₂) :
    (quotOfListConsSMulTopEquivQuotSMulTopInner M₂ r rs).toLinearMap ∘ₗ
        mapQ _ _ _ (smul_top_le_comap_smul_top (Ideal.ofList (r :: rs)) f) =
      mapQ _ _ _ (smul_top_le_comap_smul_top _ (QuotSMulTop.map r f)) ∘ₗ
        (quotOfListConsSMulTopEquivQuotSMulTopInner M r rs).toLinearMap 
goal: ↑(Submodule.quotOfListConsSMulTopEquivQuotSMulTopInner M₂ r rs) ∘ₗ
    (Ideal.ofList (r :: rs) • ⊤).mapQ (Ideal.ofList (r :: rs) • ⊤) f ⋯ =
  (Ideal.ofList rs • ⊤).mapQ (Ideal.ofList rs • ⊤) ((QuotSMulTop.map r) f) ⋯ ∘ₗ
    ↑(Submodule.quotOfListConsSMulTopEquivQuotSMulTopInner M r rs)

full_name: Submodule.top_eq_ofList_cons_smul_iff
code: lemma top_eq_ofList_cons_smul_iff :
    (⊤ : Submodule R M) = Ideal.ofList (r :: rs) • ⊤ ↔
      (⊤ : Submodule R (QuotSMulTop r M)) = Ideal.ofList rs • ⊤ 
goal: ⊤ = Ideal.ofList (r :: rs) • ⊤ ↔ ⊤ = Ideal.ofList rs • ⊤

full_name: RingTheory.Sequence.IsWeaklyRegular.regular_mod_prev
code: /-- A sequence `[r₁, …, rₙ]` is weakly regular on `M` iff `rᵢ` is regular on
`M⧸(r₁, …, rᵢ₋₁)M` for all `1 ≤ i ≤ n`. -/
@[mk_iff]
structure IsWeaklyRegular (rs : List R) : Prop where
  regular_mod_prev : ∀ i (h : i < rs.length),
    IsSMulRegular (M ⧸ (ofList (rs.take i) • ⊤ : Submodule R M)) rs[i]
goal: IsSMulRegular (M ⧸ Ideal.ofList (List.take i rs) • ⊤) rs[i]

full_name: RingTheory.Sequence.isWeaklyRegular_iff
code: /-- A sequence `[r₁, …, rₙ]` is weakly regular on `M` iff `rᵢ` is regular on
`M⧸(r₁, …, rᵢ₋₁)M` for all `1 ≤ i ≤ n`. -/
@[mk_iff]
structure IsWeaklyRegular (rs : List R) : Prop where
  regular_mod_prev : ∀ i (h : i < rs.length),
    IsSMulRegular (M ⧸ (ofList (rs.take i) • ⊤ : Submodule R M)) rs[i]
goal: RingTheory.Sequence.IsWeaklyRegular M rs ↔
  ∀ (i : ℕ) (h : i < rs.length), IsSMulRegular (M ⧸ Ideal.ofList (List.take i rs) • ⊤) rs[i]

full_name: RingTheory.Sequence.IsWeaklyRegular
code: /-- A sequence `[r₁, …, rₙ]` is weakly regular on `M` iff `rᵢ` is regular on
`M⧸(r₁, …, rᵢ₋₁)M` for all `1 ≤ i ≤ n`. -/
@[mk_iff]
structure IsWeaklyRegular (rs : List R) : Prop where
  regular_mod_prev : ∀ i (h : i < rs.length),
    IsSMulRegular (M ⧸ (ofList (rs.take i) • ⊤ : Submodule R M)) rs[i]
goal: Prop

full_name: RingTheory.Sequence.isWeaklyRegular_iff_Fin
code: lemma isWeaklyRegular_iff_Fin (rs : List R) :
    IsWeaklyRegular M rs ↔ ∀ (i : Fin rs.length),
      IsSMulRegular (M ⧸ (ofList (rs.take i) • ⊤ : Submodule R M)) (rs.get i) 
goal: RingTheory.Sequence.IsWeaklyRegular M rs ↔
  ∀ (i : Fin rs.length), IsSMulRegular (M ⧸ Ideal.ofList (List.take (↑i) rs) • ⊤) (rs.get i)

full_name: RingTheory.Sequence.IsRegular.top_ne_smul
code: /-- A weakly regular sequence `rs` on `M` is regular if also `M/rsM ≠ 0`. -/
@[mk_iff]
structure IsRegular (rs : List R) extends IsWeaklyRegular M rs : Prop where
  top_ne_smul : (⊤ : Submodule R M) ≠ Ideal.ofList rs • ⊤
goal: ⊤ ≠ Ideal.ofList rs • ⊤

full_name: RingTheory.Sequence.isRegular_iff
code: /-- A weakly regular sequence `rs` on `M` is regular if also `M/rsM ≠ 0`. -/
@[mk_iff]
structure IsRegular (rs : List R) extends IsWeaklyRegular M rs : Prop where
  top_ne_smul : (⊤ : Submodule R M) ≠ Ideal.ofList rs • ⊤
goal: RingTheory.Sequence.IsRegular M rs ↔ RingTheory.Sequence.IsWeaklyRegular M rs ∧ ⊤ ≠ Ideal.ofList rs • ⊤

full_name: RingTheory.Sequence.IsRegular
code: /-- A weakly regular sequence `rs` on `M` is regular if also `M/rsM ≠ 0`. -/
@[mk_iff]
structure IsRegular (rs : List R) extends IsWeaklyRegular M rs : Prop where
  top_ne_smul : (⊤ : Submodule R M) ≠ Ideal.ofList rs • ⊤
goal: Prop

full_name: _private.Mathlib.RingTheory.Regular.RegularSequence.0.AddHom.map_smul_top_toAddSubgroup_of_surjective
code: private lemma _root_.AddHom.map_smul_top_toAddSubgroup_of_surjective
    {f : M →+ M₂} {as : List R} {bs : List S} (hf : Function.Surjective f)
    (h : List.Forall₂ (fun r s => ∀ x, f (r • x) = s • f x) as bs) :
    (Ideal.ofList as • ⊤ : Submodule R M).toAddSubgroup.map f =
      (Ideal.ofList bs • ⊤ : Submodule S M₂).toAddSubgroup 
goal: AddSubgroup.map f (Ideal.ofList as • ⊤).toAddSubgroup = (Ideal.ofList bs • ⊤).toAddSubgroup

full_name: AddEquiv.isWeaklyRegular_congr
code: lemma _root_.AddEquiv.isWeaklyRegular_congr {e : M ≃+ M₂} {as bs}
    (h : List.Forall₂ (fun (r : R) (s : S) => ∀ x, e (r • x) = s • e x) as bs) :
    IsWeaklyRegular M as ↔ IsWeaklyRegular M₂ bs 
goal: RingTheory.Sequence.IsWeaklyRegular M as ↔ RingTheory.Sequence.IsWeaklyRegular M₂ bs

full_name: LinearEquiv.isWeaklyRegular_congr'
code: lemma _root_.LinearEquiv.isWeaklyRegular_congr' (e : M ≃ₛₗ[σ] M₂) (rs : List R) :
    IsWeaklyRegular M rs ↔ IsWeaklyRegular M₂ (rs.map σ) 
goal: RingTheory.Sequence.IsWeaklyRegular M rs ↔ RingTheory.Sequence.IsWeaklyRegular M₂ (List.map (⇑σ) rs)

full_name: LinearEquiv.isWeaklyRegular_congr
code: lemma _root_.LinearEquiv.isWeaklyRegular_congr (e : M ≃ₗ[R] M₂) (rs : List R) :
    IsWeaklyRegular M rs ↔ IsWeaklyRegular M₂ rs 
goal: RingTheory.Sequence.IsWeaklyRegular M rs ↔ RingTheory.Sequence.IsWeaklyRegular M₂ rs

full_name: AddEquiv.isRegular_congr
code: lemma _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 
goal: RingTheory.Sequence.IsRegular M as ↔ RingTheory.Sequence.IsRegular M₂ bs

full_name: LinearEquiv.isRegular_congr'
code: lemma _root_.LinearEquiv.isRegular_congr' (e : M ≃ₛₗ[σ] M₂) (rs : List R) :
    IsRegular M rs ↔ IsRegular M₂ (rs.map σ) 
goal: RingTheory.Sequence.IsRegular M rs ↔ RingTheory.Sequence.IsRegular M₂ (List.map (⇑σ) rs)

full_name: LinearEquiv.isRegular_congr
code: lemma _root_.LinearEquiv.isRegular_congr (e : M ≃ₗ[R] M₂) (rs : List R) :
    IsRegular M rs ↔ IsRegular M₂ rs 
goal: RingTheory.Sequence.IsRegular M rs ↔ RingTheory.Sequence.IsRegular M₂ rs

full_name: RingTheory.Sequence.isWeaklyRegular_map_algebraMap_iff
code: lemma 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 
goal: RingTheory.Sequence.IsWeaklyRegular M (List.map (⇑(algebraMap R S)) rs) ↔ RingTheory.Sequence.IsWeaklyRegular M rs

full_name: RingTheory.Sequence.isWeaklyRegular_cons_iff
code: @[simp]
lemma isWeaklyRegular_cons_iff (r : R) (rs : List R) :
    IsWeaklyRegular M (r :: rs) ↔
      IsSMulRegular M r ∧ IsWeaklyRegular (QuotSMulTop r M) rs 
goal: RingTheory.Sequence.IsWeaklyRegular M (r :: rs) ↔
  IsSMulRegular M r ∧ RingTheory.Sequence.IsWeaklyRegular (QuotSMulTop r M) rs

full_name: RingTheory.Sequence.isWeaklyRegular_cons_iff'
code: lemma 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}))) 
goal: RingTheory.Sequence.IsWeaklyRegular M (r :: rs) ↔
  IsSMulRegular M r ∧
    RingTheory.Sequence.IsWeaklyRegular (QuotSMulTop r M) (List.map (⇑(Ideal.Quotient.mk (Ideal.span {r}))) rs)

full_name: RingTheory.Sequence.isRegular_cons_iff
code: @[simp]
lemma isRegular_cons_iff (r : R) (rs : List R) :
    IsRegular M (r :: rs) ↔
      IsSMulRegular M r ∧ IsRegular (QuotSMulTop r M) rs 
goal: RingTheory.Sequence.IsRegular M (r :: rs) ↔ IsSMulRegular M r ∧ RingTheory.Sequence.IsRegular (QuotSMulTop r M) rs

full_name: RingTheory.Sequence.isRegular_cons_iff'
code: lemma 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}))) 
goal: RingTheory.Sequence.IsRegular M (r :: rs) ↔
  IsSMulRegular M r ∧
    RingTheory.Sequence.IsRegular (QuotSMulTop r M) (List.map (⇑(Ideal.Quotient.mk (Ideal.span {r}))) rs)

full_name: RingTheory.Sequence.IsWeaklyRegular.nil
code: @[simp] lemma nil : IsWeaklyRegular M ([] : List R) 
goal: RingTheory.Sequence.IsWeaklyRegular M []

full_name: RingTheory.Sequence.IsWeaklyRegular.cons
code: lemma cons {r : R} {rs : List R} (h1 : IsSMulRegular M r)
    (h2 : IsWeaklyRegular (QuotSMulTop r M) rs) : IsWeaklyRegular M (r :: rs) 
goal: RingTheory.Sequence.IsWeaklyRegular M (r :: rs)

full_name: RingTheory.Sequence.IsWeaklyRegular.cons'
code: lemma 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) 
goal: RingTheory.Sequence.IsWeaklyRegular M (r :: rs)

full_name: RingTheory.Sequence.IsWeaklyRegular.recIterModByRegular
code: /-- 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. -/
@[induction_eliminator]
def 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
  
goal: motive M rs h

full_name: RingTheory.Sequence.IsWeaklyRegular.ndrecIterModByRegular
code: /-- A simplified version of `IsWeaklyRegular.recIterModByRegular` where the
motive is not allowed to depend on the proof of `IsWeaklyRegular`. -/
def 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 
goal: RingTheory.Sequence.IsWeaklyRegular M rs → motive M rs

full_name: RingTheory.Sequence.IsWeaklyRegular.recIterModByRegularWithRing
code: /-- 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 propogating certain properties of the initial `M`, e.g.
faithfulness or freeness, throughout the induction. -/
def 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
  
goal: motive R M rs h

full_name: RingTheory.Sequence.IsWeaklyRegular.ndrecWithRing
code: /-- A simplified version of `IsWeaklyRegular.recIterModByRegularWithRing` where
the motive is not allowed to depend on the proof of `IsWeaklyRegular`. -/
def 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 
goal: RingTheory.Sequence.IsWeaklyRegular M rs → motive R M rs

full_name: RingTheory.Sequence.isWeaklyRegular_singleton_iff
code: lemma isWeaklyRegular_singleton_iff (r : R) :
    IsWeaklyRegular M [r] ↔ IsSMulRegular M r 
goal: RingTheory.Sequence.IsWeaklyRegular M [r] ↔ IsSMulRegular M r

full_name: RingTheory.Sequence.isWeaklyRegular_append_iff
code: lemma isWeaklyRegular_append_iff (rs₁ rs₂ : List R) :
    IsWeaklyRegular M (rs₁ ++ rs₂) ↔
      IsWeaklyRegular M rs₁ ∧
        IsWeaklyRegular (M ⧸ (Ideal.ofList rs₁ • ⊤ : Submodule R M)) rs₂ 
goal: RingTheory.Sequence.IsWeaklyRegular M (rs₁ ++ rs₂) ↔
  RingTheory.Sequence.IsWeaklyRegular M rs₁ ∧ RingTheory.Sequence.IsWeaklyRegular (M ⧸ Ideal.ofList rs₁ • ⊤) rs₂

full_name: RingTheory.Sequence.isWeaklyRegular_append_iff'
code: lemma 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₁))) 
goal: RingTheory.Sequence.IsWeaklyRegular M (rs₁ ++ rs₂) ↔
  RingTheory.Sequence.IsWeaklyRegular M rs₁ ∧
    RingTheory.Sequence.IsWeaklyRegular (M ⧸ Ideal.ofList rs₁ • ⊤)
      (List.map (⇑(Ideal.Quotient.mk (Ideal.ofList rs₁))) rs₂)

full_name: RingTheory.Sequence.IsRegular.nil
code: lemma nil [Nontrivial M] : IsRegular M ([] : List R) 
goal: RingTheory.Sequence.IsRegular M []

full_name: RingTheory.Sequence.IsRegular.cons
code: lemma cons {r : R} {rs : List R} (h1 : IsSMulRegular M r)
    (h2 : IsRegular (QuotSMulTop r M) rs) : IsRegular M (r :: rs) 
goal: RingTheory.Sequence.IsRegular M (r :: rs)

full_name: RingTheory.Sequence.IsRegular.cons'
code: lemma 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) 
goal: RingTheory.Sequence.IsRegular M (r :: rs)

full_name: RingTheory.Sequence.IsRegular.recIterModByRegular
code: /-- 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. -/
@[induction_eliminator]
def 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 
goal: motive M rs h

full_name: RingTheory.Sequence.IsRegular.ndrecIterModByRegular
code: /-- A simplified version of `IsRegular.recIterModByRegular` where the motive is
not allowed to depend on the proof of `IsRegular`. -/
def 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 
goal: RingTheory.Sequence.IsRegular M rs → motive M rs

full_name: RingTheory.Sequence.IsRegular.recIterModByRegularWithRing
code: /-- 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 propogating certain properties of the initial `M`, e.g. faithfulness
or freeness, throughout the induction. -/
def 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 
goal: motive R M rs h

full_name: RingTheory.Sequence.IsRegular.ndrecIterModByRegularWithRing
code: /-- A simplified version of `IsRegular.recIterModByRegularWithRing` where the
motive is not allowed to depend on the proof of `IsRegular`. -/
def 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 
goal: RingTheory.Sequence.IsRegular M rs → motive R M rs

full_name: RingTheory.Sequence.IsRegular.quot_ofList_smul_nontrivial
code: lemma quot_ofList_smul_nontrivial {rs : List R} (h : IsRegular M rs)
    (N : Submodule R M) : Nontrivial (M ⧸ Ideal.ofList rs • N) 
goal: Nontrivial (M ⧸ Ideal.ofList rs • N)

full_name: RingTheory.Sequence.IsRegular.nontrivial
code: lemma nontrivial {rs : List R} (h : IsRegular M rs) : Nontrivial M 
goal: Nontrivial M

full_name: RingTheory.Sequence.isRegular_iff_isWeaklyRegular_of_subset_jacobson_annihilator
code: lemma 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 
goal: RingTheory.Sequence.IsRegular M rs ↔ RingTheory.Sequence.IsWeaklyRegular M rs

full_name: LocalRing.isRegular_iff_isWeaklyRegular_of_subset_maximalIdeal
code: lemma _root_.LocalRing.isRegular_iff_isWeaklyRegular_of_subset_maximalIdeal
    [LocalRing R] [Nontrivial M] [Module.Finite R M] {rs : List R}
    (h : ∀ r ∈ rs, r ∈ LocalRing.maximalIdeal R) :
    IsRegular M rs ↔ IsWeaklyRegular M rs 
goal: RingTheory.Sequence.IsRegular M rs ↔ RingTheory.Sequence.IsWeaklyRegular M rs

full_name: RingTheory.Sequence.eq_nil_of_isRegular_on_artinian
code: lemma eq_nil_of_isRegular_on_artinian [IsArtinian R M] :
    {rs : List R} → IsRegular M rs → rs = []
  
goal: RingTheory.Sequence.IsRegular M rs → rs = []

full_name: RingTheory.Sequence.IsWeaklyRegular.isWeaklyRegular_lTensor
code: lemma IsWeaklyRegular.isWeaklyRegular_lTensor [Module.Flat R M₂]
    {rs : List R} (h : IsWeaklyRegular M rs) :
    IsWeaklyRegular (M₂ ⊗[R] M) rs 
goal: RingTheory.Sequence.IsWeaklyRegular (TensorProduct R M₂ M) rs

full_name: RingTheory.Sequence.IsWeaklyRegular.isWeaklyRegular_rTensor
code: lemma IsWeaklyRegular.isWeaklyRegular_rTensor [Module.Flat R M₂]
    {rs : List R} (h : IsWeaklyRegular M rs) :
    IsWeaklyRegular (M ⊗[R] M₂) rs 
goal: RingTheory.Sequence.IsWeaklyRegular (TensorProduct R M M₂) rs

full_name: RingTheory.Sequence.map_first_exact_on_four_term_right_exact_of_isSMulRegular_last
code: lemma 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₂)) 
goal: Function.Exact ⇑((Ideal.ofList rs • ⊤).mapQ (Ideal.ofList rs • ⊤) f₁ ⋯)
  ⇑((Ideal.ofList rs • ⊤).mapQ (Ideal.ofList rs • ⊤) f₂ ⋯)

full_name: _private.Mathlib.RingTheory.Regular.RegularSequence.0.RingTheory.Sequence.IsWeaklyRegular.swap
code: private lemma 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] 
goal: RingTheory.Sequence.IsWeaklyRegular M [b, a]

full_name: RingTheory.Sequence.IsWeaklyRegular.prototype_perm.aux
code: lemma 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' 
goal: RingTheory.Sequence.IsWeaklyRegular (M ⧸ Ideal.ofList rs₀ • ⊤) rs₂

full_name: RingTheory.Sequence.IsWeaklyRegular.prototype_perm
code: lemma 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' 
goal: RingTheory.Sequence.IsWeaklyRegular M rs'

full_name: RingTheory.Sequence.IsWeaklyRegular.of_perm_of_subset_jacobson_annihilator
code: lemma 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' 
goal: RingTheory.Sequence.IsWeaklyRegular M rs'

full_name: RingTheory.Sequence.IsRegular.of_perm_of_subset_jacobson_annihilator
code: lemma 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' 
goal: RingTheory.Sequence.IsRegular M rs'

full_name: LocalRing.isWeaklyRegular_of_perm_of_subset_maximalIdeal
code: lemma _root_.LocalRing.isWeaklyRegular_of_perm_of_subset_maximalIdeal
    [LocalRing R] [IsNoetherian R M] {rs rs' : List R}
    (h1 : IsWeaklyRegular M rs) (h2 : List.Perm rs rs')
    (h3 : ∀ r ∈ rs, r ∈ LocalRing.maximalIdeal R) : IsWeaklyRegular M rs' 
goal: RingTheory.Sequence.IsWeaklyRegular M rs'

full_name: LocalRing.isRegular_of_perm
code: lemma _root_.LocalRing.isRegular_of_perm [LocalRing R] [IsNoetherian R M]
    {rs rs' : List R} (h1 : IsRegular M rs) (h2 : List.Perm rs rs') :
    IsRegular M rs' 
goal: RingTheory.Sequence.IsRegular M rs'