File: Mathlib/RingTheory/Finiteness.lean

full_name: Submodule.FG
code: /-- A submodule of `M` is finitely generated if it is the span of a finite subset of `M`. -/
def FG (N : Submodule R M) : Prop 
goal: Prop

full_name: Submodule.fg_def
code: theorem fg_def {N : Submodule R M} : N.FG ↔ ∃ S : Set M, S.Finite ∧ span R S = N 
goal: N.FG ↔ ∃ S, S.Finite ∧ Submodule.span R S = N

full_name: Submodule.fg_iff_addSubmonoid_fg
code: theorem fg_iff_addSubmonoid_fg (P : Submodule ℕ M) : P.FG ↔ P.toAddSubmonoid.FG 
goal: P.FG ↔ P.FG

full_name: Submodule.fg_iff_add_subgroup_fg
code: theorem fg_iff_add_subgroup_fg {G : Type*} [AddCommGroup G] (P : Submodule ℤ G) :
    P.FG ↔ P.toAddSubgroup.FG 
goal: P.FG ↔ P.toAddSubgroup.FG

full_name: Submodule.fg_iff_exists_fin_generating_family
code: theorem fg_iff_exists_fin_generating_family {N : Submodule R M} :
    N.FG ↔ ∃ (n : ℕ) (s : Fin n → M), span R (range s) = N 
goal: N.FG ↔ ∃ n s, Submodule.span R (Set.range s) = N

full_name: Submodule.exists_sub_one_mem_and_smul_eq_zero_of_fg_of_le_smul
code: /-- **Nakayama's Lemma**. Atiyah-Macdonald 2.5, Eisenbud 4.7, Matsumura 2.2,
[Stacks 00DV](https://stacks.math.columbia.edu/tag/00DV) -/
theorem exists_sub_one_mem_and_smul_eq_zero_of_fg_of_le_smul {R : Type*} [CommRing R] {M : Type*}
    [AddCommGroup M] [Module R M] (I : Ideal R) (N : Submodule R M) (hn : N.FG) (hin : N ≤ I • N) :
    ∃ r : R, r - 1 ∈ I ∧ ∀ n ∈ N, r • n = (0 : M) 
goal: ∃ r, r - 1 ∈ I ∧ ∀ n ∈ N, r • n = 0

full_name: Submodule.exists_mem_and_smul_eq_self_of_fg_of_le_smul
code: theorem exists_mem_and_smul_eq_self_of_fg_of_le_smul {R : Type*} [CommRing R] {M : Type*}
    [AddCommGroup M] [Module R M] (I : Ideal R) (N : Submodule R M) (hn : N.FG) (hin : N ≤ I • N) :
    ∃ r ∈ I, ∀ n ∈ N, r • n = n 
goal: ∃ r ∈ I, ∀ n ∈ N, r • n = n

full_name: Submodule.fg_bot
code: theorem fg_bot : (⊥ : Submodule R M).FG 
goal: ⊥.FG

full_name: Subalgebra.fg_bot_toSubmodule
code: theorem _root_.Subalgebra.fg_bot_toSubmodule {R A : Type*} [CommSemiring R] [Semiring A]
    [Algebra R A] : (⊥ : Subalgebra R A).toSubmodule.FG 
goal: (Subalgebra.toSubmodule ⊥).FG

full_name: Submodule.fg_unit
code: theorem fg_unit {R A : Type*} [CommSemiring R] [Semiring A] [Algebra R A] (I : (Submodule R A)ˣ) :
    (I : Submodule R A).FG 
goal: (↑I).FG

full_name: Submodule.fg_of_isUnit
code: theorem fg_of_isUnit {R A : Type*} [CommSemiring R] [Semiring A] [Algebra R A] {I : Submodule R A}
    (hI : IsUnit I) : I.FG 
goal: I.FG

full_name: Submodule.fg_span
code: theorem fg_span {s : Set M} (hs : s.Finite) : FG (span R s) 
goal: (Submodule.span R s).FG

full_name: Submodule.fg_span_singleton
code: theorem fg_span_singleton (x : M) : FG (R ∙ x) 
goal: (Submodule.span R {x}).FG

full_name: Submodule.FG.sup
code: theorem FG.sup {N₁ N₂ : Submodule R M} (hN₁ : N₁.FG) (hN₂ : N₂.FG) : (N₁ ⊔ N₂).FG 
goal: (N₁ ⊔ N₂).FG

full_name: Submodule.fg_finset_sup
code: theorem fg_finset_sup {ι : Type*} (s : Finset ι) (N : ι → Submodule R M) (h : ∀ i ∈ s, (N i).FG) :
    (s.sup N).FG 
goal: (s.sup N).FG

full_name: Submodule.fg_biSup
code: theorem fg_biSup {ι : Type*} (s : Finset ι) (N : ι → Submodule R M) (h : ∀ i ∈ s, (N i).FG) :
    (⨆ i ∈ s, N i).FG 
goal: (⨆ i ∈ s, N i).FG

full_name: Submodule.fg_iSup
code: theorem fg_iSup {ι : Sort*} [Finite ι] (N : ι → Submodule R M) (h : ∀ i, (N i).FG) :
    (iSup N).FG 
goal: (iSup N).FG

full_name: Submodule.FG.map
code: theorem FG.map {N : Submodule R M} (hs : N.FG) : (N.map f).FG 
goal: (Submodule.map f N).FG

full_name: Submodule.fg_of_fg_map_injective
code: theorem fg_of_fg_map_injective (f : M →ₗ[R] P) (hf : Function.Injective f) {N : Submodule R M}
    (hfn : (N.map f).FG) : N.FG 
goal: N.FG

full_name: Submodule.fg_of_fg_map
code: theorem fg_of_fg_map {R M P : Type*} [Ring R] [AddCommGroup M] [Module R M] [AddCommGroup P]
    [Module R P] (f : M →ₗ[R] P)
    (hf : LinearMap.ker f = ⊥) {N : Submodule R M}
    (hfn : (N.map f).FG) : N.FG 
goal: N.FG

full_name: Submodule.fg_top
code: theorem fg_top (N : Submodule R M) : (⊤ : Submodule R N).FG ↔ N.FG 
goal: ⊤.FG ↔ N.FG

full_name: Submodule.fg_of_linearEquiv
code: theorem fg_of_linearEquiv (e : M ≃ₗ[R] P) (h : (⊤ : Submodule R P).FG) : (⊤ : Submodule R M).FG 
goal: ⊤.FG

full_name: Submodule.FG.prod
code: theorem FG.prod {sb : Submodule R M} {sc : Submodule R P} (hsb : sb.FG) (hsc : sc.FG) :
    (sb.prod sc).FG 
goal: (sb.prod sc).FG

full_name: Submodule.fg_pi
code: theorem fg_pi {ι : Type*} {M : ι → Type*} [Finite ι] [∀ i, AddCommMonoid (M i)]
    [∀ i, Module R (M i)] {p : ∀ i, Submodule R (M i)} (hsb : ∀ i, (p i).FG) :
    (Submodule.pi Set.univ p).FG 
goal: (Submodule.pi Set.univ p).FG

full_name: Submodule.fg_of_fg_map_of_fg_inf_ker
code: /-- If 0 → M' → M → M'' → 0 is exact and M' and M'' are
finitely generated then so is M. -/
theorem fg_of_fg_map_of_fg_inf_ker {R M P : Type*} [Ring R] [AddCommGroup M] [Module R M]
    [AddCommGroup P] [Module R P] (f : M →ₗ[R] P) {s : Submodule R M}
    (hs1 : (s.map f).FG)
    (hs2 : (s ⊓ LinearMap.ker f).FG) : s.FG 
goal: s.FG

full_name: Submodule.fg_induction
code: theorem fg_induction (R M : Type*) [Semiring R] [AddCommMonoid M] [Module R M]
    (P : Submodule R M → Prop) (h₁ : ∀ x, P (Submodule.span R {x}))
    (h₂ : ∀ M₁ M₂, P M₁ → P M₂ → P (M₁ ⊔ M₂)) (N : Submodule R M) (hN : N.FG) : P N 
goal: P N

full_name: Submodule.fg_ker_comp
code: /-- The kernel of the composition of two linear maps is finitely generated if both kernels are and
the first morphism is surjective. -/
theorem fg_ker_comp {R M N P : Type*} [Ring R] [AddCommGroup M] [Module R M] [AddCommGroup N]
    [Module R N] [AddCommGroup P] [Module R P] (f : M →ₗ[R] N) (g : N →ₗ[R] P)
    (hf1 : (LinearMap.ker f).FG) (hf2 : (LinearMap.ker g).FG)
    (hsur : Function.Surjective f) : (g.comp f).ker.FG 
goal: (LinearMap.ker (g ∘ₗ f)).FG

full_name: Submodule.fg_restrictScalars
code: theorem fg_restrictScalars {R S M : Type*} [CommSemiring R] [Semiring S] [Algebra R S]
    [AddCommGroup M] [Module S M] [Module R M] [IsScalarTower R S M] (N : Submodule S M)
    (hfin : N.FG) (h : Function.Surjective (algebraMap R S)) :
    (Submodule.restrictScalars R N).FG 
goal: (Submodule.restrictScalars R N).FG

full_name: Submodule.FG.stabilizes_of_iSup_eq
code: theorem FG.stabilizes_of_iSup_eq {M' : Submodule R M} (hM' : M'.FG) (N : ℕ →o Submodule R M)
    (H : iSup N = M') : ∃ n, M' = N n 
goal: ∃ n, M' = N n

full_name: Submodule.fg_iff_compact
code: /-- Finitely generated submodules are precisely compact elements in the submodule lattice. -/
theorem fg_iff_compact (s : Submodule R M) : s.FG ↔ CompleteLattice.IsCompactElement s 
goal: s.FG ↔ CompleteLattice.IsCompactElement s

full_name: Submodule.exists_fg_le_eq_rTensor_inclusion
code: /-- Every `x : I ⊗ M` is the image of some `y : J ⊗ M`, where `J ≤ I` is finitely generated,
under the tensor product of `J.inclusion ‹J ≤ I› : J → I` and the identity `M → M`. -/
theorem exists_fg_le_eq_rTensor_inclusion {R M N : Type*} [CommRing R] [AddCommGroup M]
    [AddCommGroup N] [Module R M] [Module R N] {I : Submodule R N} (x : I ⊗ M) :
      ∃ (J : Submodule R N) (_ : J.FG) (hle : J ≤ I) (y : J ⊗ M),
        x = rTensor M (J.inclusion hle) y 
goal: ∃ J, ∃ (_ : J.FG) (hle : J ≤ I), ∃ y, x = (LinearMap.rTensor M (Submodule.inclusion hle)) y

full_name: Submodule.FG.map₂
code: theorem FG.map₂ (f : M →ₗ[R] N →ₗ[R] P) {p : Submodule R M} {q : Submodule R N} (hp : p.FG)
    (hq : q.FG) : (map₂ f p q).FG 
goal: (Submodule.map₂ f p q).FG

full_name: Submodule.FG.mul
code: theorem FG.mul (hm : M.FG) (hn : N.FG) : (M * N).FG 
goal: (M * N).FG

full_name: Submodule.FG.pow
code: theorem FG.pow (h : M.FG) (n : ℕ) : (M ^ n).FG 
goal: (M ^ n).FG

full_name: Ideal.FG
code: /-- An ideal of `R` is finitely generated if it is the span of a finite subset of `R`.

This is defeq to `Submodule.FG`, but unfolds more nicely. -/
def FG (I : Ideal R) : Prop 
goal: Prop

full_name: Ideal.FG.map
code: /-- The image of a finitely generated ideal is finitely generated.

This is the `Ideal` version of `Submodule.FG.map`. -/
theorem FG.map {R S : Type*} [Semiring R] [Semiring S] {I : Ideal R} (h : I.FG) (f : R →+* S) :
    (I.map f).FG 
goal: (Ideal.map f I).FG

full_name: Ideal.fg_ker_comp
code: theorem fg_ker_comp {R S A : Type*} [CommRing R] [CommRing S] [CommRing A] (f : R →+* S)
    (g : S →+* A) (hf : f.ker.FG) (hg : g.ker.FG) (hsur : Function.Surjective f) :
    (g.comp f).ker.FG 
goal: (RingHom.ker (g.comp f)).FG

full_name: Ideal.exists_radical_pow_le_of_fg
code: theorem exists_radical_pow_le_of_fg {R : Type*} [CommSemiring R] (I : Ideal R) (h : I.radical.FG) :
    ∃ n : ℕ, I.radical ^ n ≤ I 
goal: ∃ n, I.radical ^ n ≤ I

full_name: Module.Finite.out
code: /-- A module over a semiring is `Finite` if it is finitely generated as a module. -/
class Module.Finite [Semiring R] [AddCommMonoid M] [Module R M] : Prop where
  out : (⊤ : Submodule R M).FG
goal: ⊤.FG

full_name: Module.Finite
code: /-- A module over a semiring is `Finite` if it is finitely generated as a module. -/
class Module.Finite [Semiring R] [AddCommMonoid M] [Module R M] : Prop where
  out : (⊤ : Submodule R M).FG
goal: Prop

full_name: Module.finite_def
code: theorem finite_def {R M} [Semiring R] [AddCommMonoid M] [Module R M] :
    Finite R M ↔ (⊤ : Submodule R M).FG 
goal: Module.Finite R M ↔ ⊤.FG

full_name: Module.Finite.iff_addMonoid_fg
code: theorem iff_addMonoid_fg {M : Type*} [AddCommMonoid M] : Module.Finite ℕ M ↔ AddMonoid.FG M 
goal: Module.Finite ℕ M ↔ AddMonoid.FG M

full_name: Module.Finite.iff_addGroup_fg
code: theorem iff_addGroup_fg {G : Type*} [AddCommGroup G] : Module.Finite ℤ G ↔ AddGroup.FG G 
goal: Module.Finite ℤ G ↔ AddGroup.FG G

full_name: Module.Finite.exists_fin
code: /-- See also `Module.Finite.exists_fin'`. -/
theorem exists_fin [Finite R M] : ∃ (n : ℕ) (s : Fin n → M), Submodule.span R (range s) = ⊤ 
goal: ∃ n s, Submodule.span R (Set.range s) = ⊤

full_name: Module.Finite.exists_fin'
code: lemma exists_fin' [Finite R M] : ∃ (n : ℕ) (f : (Fin n → R) →ₗ[R] M), Surjective f 
goal: ∃ n f, Function.Surjective ⇑f

full_name: Module.Finite.of_surjective
code: theorem of_surjective [hM : Finite R M] (f : M →ₗ[R] N) (hf : Surjective f) : Finite R N 
goal: Module.Finite R N

full_name: Module.Finite.quotient
code: instance quotient (R) {A M} [Semiring R] [AddCommGroup M] [Ring A] [Module A M] [Module R M]
    [SMul R A] [IsScalarTower R A M] [Finite R M]
    (N : Submodule A M) : Finite R (M ⧸ N) 
goal: Module.Finite R (M ⧸ N)

full_name: Module.Finite.range
code: /-- The range of a linear map from a finite module is finite. -/
instance range {F : Type*} [FunLike F M N] [SemilinearMapClass F (RingHom.id R) M N] [Finite R M]
    (f : F) : Finite R (LinearMap.range f) 
goal: Module.Finite R ↥(LinearMap.range f)

full_name: Module.Finite.map
code: /-- Pushforwards of finite submodules are finite. -/
instance map (p : Submodule R M) [Finite R p] (f : M →ₗ[R] N) : Finite R (p.map f) 
goal: Module.Finite R ↥(Submodule.map f p)

full_name: Module.Finite.self
code: instance self : Finite R R 
goal: Module.Finite R R

full_name: Module.Finite.of_restrictScalars_finite
code: theorem of_restrictScalars_finite (R A M : Type*) [CommSemiring R] [Semiring A] [AddCommMonoid M]
    [Module R M] [Module A M] [Algebra R A] [IsScalarTower R A M] [hM : Finite R M] :
    Finite A M 
goal: Module.Finite A M

full_name: Module.Finite.prod
code: instance prod [hM : Finite R M] [hN : Finite R N] : Finite R (M × N) 
goal: Module.Finite R (M × N)

full_name: Module.Finite.pi
code: instance pi {ι : Type*} {M : ι → Type*} [_root_.Finite ι] [∀ i, AddCommMonoid (M i)]
    [∀ i, Module R (M i)] [h : ∀ i, Finite R (M i)] : Finite R (∀ i, M i) 
goal: Module.Finite R ((i : ι) → M i)

full_name: Module.Finite.equiv
code: theorem equiv [Finite R M] (e : M ≃ₗ[R] N) : Finite R N 
goal: Module.Finite R N

full_name: Module.Finite.equiv_iff
code: theorem equiv_iff (e : M ≃ₗ[R] N) : Finite R M ↔ Finite R N 
goal: Module.Finite R M ↔ Module.Finite R N

full_name: Module.Finite.ulift
code: instance ulift [Finite R M] : Finite R (ULift M) 
goal: Module.Finite R (ULift.{u_6, u_4} M)

full_name: Module.Finite.iff_fg
code: theorem iff_fg {N : Submodule R M} : Module.Finite R N ↔ N.FG 
goal: Module.Finite R ↥N ↔ N.FG

full_name: Module.Finite.bot
code: instance bot : Module.Finite R (⊥ : Submodule R M) 
goal: Module.Finite R ↥⊥

full_name: Module.Finite.top
code: instance top [Finite R M] : Module.Finite R (⊤ : Submodule R M) 
goal: Module.Finite R ↥⊤

full_name: Module.Finite.span_of_finite
code: /-- The submodule generated by a finite set is `R`-finite. -/
theorem span_of_finite {A : Set M} (hA : Set.Finite A) :
    Module.Finite R (Submodule.span R A) 
goal: Module.Finite R ↥(Submodule.span R A)

full_name: Module.Finite.span_singleton
code: /-- The submodule generated by a single element is `R`-finite. -/
instance span_singleton (x : M) : Module.Finite R (R ∙ x) 
goal: Module.Finite R ↥(Submodule.span R {x})

full_name: Module.Finite.span_finset
code: /-- The submodule generated by a finset is `R`-finite. -/
instance span_finset (s : Finset M) : Module.Finite R (span R (s : Set M)) 
goal: Module.Finite R ↥(Submodule.span R ↑s)

full_name: Module.Finite.Module.End.isNilpotent_iff_of_finite
code: theorem Module.End.isNilpotent_iff_of_finite {R M : Type*} [CommSemiring R] [AddCommMonoid M]
    [Module R M] [Module.Finite R M] {f : End R M} :
    IsNilpotent f ↔ ∀ m : M, ∃ n : ℕ, (f ^ n) m = 0 
goal: IsNilpotent f ↔ ∀ (m : M), ∃ n, (f ^ n) m = 0

full_name: Module.Finite.trans
code: theorem trans {R : Type*} (A M : Type*) [Semiring R] [Semiring A] [Module R A]
    [AddCommMonoid M] [Module R M] [Module A M] [IsScalarTower R A M] :
    ∀ [Finite R A] [Finite A M], Finite R M
  
goal: Module.Finite R M

full_name: Module.Finite.of_equiv_equiv
code: lemma of_equiv_equiv {A₁ B₁ A₂ B₂ : Type*} [CommRing A₁] [CommRing B₁]
    [CommRing A₂] [CommRing B₂] [Algebra A₁ B₁] [Algebra A₂ B₂] (e₁ : A₁ ≃+* A₂) (e₂ : B₁ ≃+* B₂)
    (he : RingHom.comp (algebraMap A₂ B₂) ↑e₁ = RingHom.comp ↑e₂ (algebraMap A₁ B₁))
    [Module.Finite A₁ B₁] : Module.Finite A₂ B₂ 
goal: Module.Finite A₂ B₂

full_name: instModuleTensorProduct
code: /-- Porting note: reminding Lean about this instance for Module.Finite.base_change -/
noncomputable local instance
    [CommSemiring R] [Semiring A] [Algebra R A] [AddCommMonoid M] [Module R M] :
    Module A (TensorProduct R A M) 
goal: Module A (TensorProduct R A M)

full_name: Module.Finite.base_change
code: instance Module.Finite.base_change [CommSemiring R] [Semiring A] [Algebra R A] [AddCommMonoid M]
    [Module R M] [h : Module.Finite R M] : Module.Finite A (TensorProduct R A M) 
goal: Module.Finite A (TensorProduct R A M)

full_name: Module.Finite.tensorProduct
code: instance Module.Finite.tensorProduct [CommSemiring R] [AddCommMonoid M] [Module R M]
    [AddCommMonoid N] [Module R N] [hM : Module.Finite R M] [hN : Module.Finite R N] :
    Module.Finite R (TensorProduct R M N) 
goal: Module.Finite R (TensorProduct R M N)

full_name: Module.Finite.finite_basis
code: /-- If a free module is finite, then any arbitrary basis is finite. -/
lemma Module.Finite.finite_basis {R M} [Ring R] [Nontrivial R] [AddCommGroup M] [Module R M]
    {ι} [Module.Finite R M] (b : Basis ι R M) :
    _root_.Finite ι 
goal: Finite ι

full_name: Submodule.finite_sup
code: /-- The sup of two fg submodules is finite. Also see `Submodule.FG.sup`. -/
instance finite_sup (S₁ S₂ : Submodule R V) [h₁ : Module.Finite R S₁]
    [h₂ : Module.Finite R S₂] : Module.Finite R (S₁ ⊔ S₂ : Submodule R V) 
goal: Module.Finite R ↥(S₁ ⊔ S₂)

full_name: Submodule.finite_finset_sup
code: /-- The submodule generated by a finite supremum of finite dimensional submodules is
finite-dimensional.

Note that strictly this only needs `∀ i ∈ s, FiniteDimensional K (S i)`, but that doesn't
work well with typeclass search. -/
instance finite_finset_sup {ι : Type*} (s : Finset ι) (S : ι → Submodule R V)
    [∀ i, Module.Finite R (S i)] : Module.Finite R (s.sup S : Submodule R V) 
goal: Module.Finite R ↥(s.sup S)

full_name: Submodule.finite_iSup
code: /-- The submodule generated by a supremum of finite dimensional submodules, indexed by a finite
sort is finite-dimensional. -/
instance finite_iSup {ι : Sort*} [Finite ι] (S : ι → Submodule R V)
    [∀ i, Module.Finite R (S i)] : Module.Finite R ↑(⨆ i, S i) 
goal: Module.Finite R ↥(⨆ i, S i)

full_name: Module.Finite.finsupp
code: instance Module.Finite.finsupp {ι : Type*} [_root_.Finite ι] [Module.Finite R V] :
    Module.Finite R (ι →₀ V) 
goal: Module.Finite R (ι →₀ V)

full_name: RingHom.Finite
code: /-- A ring morphism `A →+* B` is `Finite` if `B` is finitely generated as `A`-module. -/
def Finite (f : A →+* B) : Prop 
goal: Prop

full_name: RingHom.Finite.id
code: theorem id : Finite (RingHom.id A) 
goal: (RingHom.id A).Finite

full_name: RingHom.Finite.of_surjective
code: theorem of_surjective (f : A →+* B) (hf : Surjective f) : f.Finite 
goal: f.Finite

full_name: RingHom.Finite.comp
code: theorem comp {g : B →+* C} {f : A →+* B} (hg : g.Finite) (hf : f.Finite) : (g.comp f).Finite 
goal: (g.comp f).Finite

full_name: RingHom.Finite.of_comp_finite
code: theorem of_comp_finite {f : A →+* B} {g : B →+* C} (h : (g.comp f).Finite) : g.Finite 
goal: g.Finite

full_name: AlgHom.Finite
code: /-- An algebra morphism `A →ₐ[R] B` is finite if it is finite as ring morphism.
In other words, if `B` is finitely generated as `A`-module. -/
def Finite (f : A →ₐ[R] B) : Prop 
goal: Prop

full_name: AlgHom.Finite.id
code: theorem id : Finite (AlgHom.id R A) 
goal: (AlgHom.id R A).Finite

full_name: AlgHom.Finite.comp
code: theorem comp {g : B →ₐ[R] C} {f : A →ₐ[R] B} (hg : g.Finite) (hf : f.Finite) : (g.comp f).Finite 
goal: (g.comp f).Finite

full_name: AlgHom.Finite.of_surjective
code: theorem of_surjective (f : A →ₐ[R] B) (hf : Surjective f) : f.Finite 
goal: f.Finite

full_name: AlgHom.Finite.of_comp_finite
code: theorem of_comp_finite {f : A →ₐ[R] B} {g : B →ₐ[R] C} (h : (g.comp f).Finite) : g.Finite 
goal: g.Finite

full_name: Subalgebra.finite_bot
code: instance Subalgebra.finite_bot {F E : Type*} [CommSemiring F] [Semiring E] [Algebra F E] :
    Module.Finite F (⊥ : Subalgebra F E) 
goal: Module.Finite F ↥⊥