File: Mathlib/LinearAlgebra/Dimension/Finite.lean

full_name: rank_le
code: theorem rank_le {n : ℕ}
    (H : ∀ s : Finset M, (LinearIndependent R fun i : s => (i : M)) → s.card ≤ n) :
    Module.rank R M ≤ n 
goal: Module.rank R M ≤ ↑n

full_name: rank_eq_zero_iff
code: /-- See `rank_zero_iff` for a stronger version with `NoZeroSMulDivisor R M`. -/
lemma rank_eq_zero_iff :
    Module.rank R M = 0 ↔ ∀ x : M, ∃ a : R, a ≠ 0 ∧ a • x = 0 
goal: Module.rank R M = 0 ↔ ∀ (x : M), ∃ a, a ≠ 0 ∧ a • x = 0

full_name: rank_zero_iff_forall_zero
code: theorem rank_zero_iff_forall_zero :
    Module.rank R M = 0 ↔ ∀ x : M, x = 0 
goal: Module.rank R M = 0 ↔ ∀ (x : M), x = 0

full_name: rank_zero_iff
code: /-- See `rank_subsingleton` for the reason that `Nontrivial R` is needed.
Also see `rank_eq_zero_iff` for the version without `NoZeroSMulDivisor R M`. -/
theorem rank_zero_iff : Module.rank R M = 0 ↔ Subsingleton M 
goal: Module.rank R M = 0 ↔ Subsingleton M

full_name: rank_pos_iff_exists_ne_zero
code: theorem rank_pos_iff_exists_ne_zero : 0 < Module.rank R M ↔ ∃ x : M, x ≠ 0 
goal: 0 < Module.rank R M ↔ ∃ x, x ≠ 0

full_name: rank_pos_iff_nontrivial
code: theorem rank_pos_iff_nontrivial : 0 < Module.rank R M ↔ Nontrivial M 
goal: 0 < Module.rank R M ↔ Nontrivial M

full_name: rank_eq_zero_iff_isTorsion
code: lemma rank_eq_zero_iff_isTorsion {R M} [CommRing R] [IsDomain R] [AddCommGroup M] [Module R M] :
    Module.rank R M = 0 ↔ Module.IsTorsion R M 
goal: Module.rank R M = 0 ↔ Module.IsTorsion R M

full_name: rank_pos
code: theorem rank_pos [Nontrivial M] : 0 < Module.rank R M 
goal: 0 < Module.rank R M

full_name: rank_subsingleton'
code: /-- See `rank_subsingleton` that assumes `Subsingleton R` instead. -/
theorem rank_subsingleton' [Subsingleton M] : Module.rank R M = 0 
goal: Module.rank R M = 0

full_name: rank_punit
code: @[simp]
theorem rank_punit : Module.rank R PUnit = 0 
goal: Module.rank R PUnit.{u_1 + 1} = 0

full_name: rank_bot
code: @[simp]
theorem rank_bot : Module.rank R (⊥ : Submodule R M) = 0 
goal: Module.rank R ↥⊥ = 0

full_name: exists_mem_ne_zero_of_rank_pos
code: theorem exists_mem_ne_zero_of_rank_pos {s : Submodule R M} (h : 0 < Module.rank R s) :
    ∃ b : M, b ∈ s ∧ b ≠ 0 
goal: ∃ b ∈ s, b ≠ 0

full_name: Module.finite_of_rank_eq_nat
code: theorem Module.finite_of_rank_eq_nat [Module.Free R M] {n : ℕ} (h : Module.rank R M = n) :
    Module.Finite R M 
goal: Module.Finite R M

full_name: Module.finite_of_rank_eq_zero
code: theorem Module.finite_of_rank_eq_zero [NoZeroSMulDivisors R M]
    (h : Module.rank R M = 0) :
    Module.Finite R M 
goal: Module.Finite R M

full_name: Module.finite_of_rank_eq_one
code: theorem Module.finite_of_rank_eq_one [Module.Free R M] (h : Module.rank R M = 1) :
    Module.Finite R M 
goal: Module.Finite R M

full_name: Basis.nonempty_fintype_index_of_rank_lt_aleph0
code: /-- If a module has a finite dimension, all bases are indexed by a finite type. -/
theorem Basis.nonempty_fintype_index_of_rank_lt_aleph0 {ι : Type*} (b : Basis ι R M)
    (h : Module.rank R M < ℵ₀) : Nonempty (Fintype ι) 
goal: Nonempty (Fintype ι)

full_name: Basis.fintypeIndexOfRankLtAleph0
code: /-- If a module has a finite dimension, all bases are indexed by a finite type. -/
noncomputable def Basis.fintypeIndexOfRankLtAleph0 {ι : Type*} (b : Basis ι R M)
    (h : Module.rank R M < ℵ₀) : Fintype ι 
goal: Fintype ι

full_name: Basis.finite_index_of_rank_lt_aleph0
code: /-- If a module has a finite dimension, all bases are indexed by a finite set. -/
theorem Basis.finite_index_of_rank_lt_aleph0 {ι : Type*} {s : Set ι} (b : Basis s R M)
    (h : Module.rank R M < ℵ₀) : s.Finite 
goal: s.Finite

full_name: LinearIndependent.cardinal_mk_le_finrank
code: theorem cardinal_mk_le_finrank [Module.Finite R M]
    {ι : Type w} {b : ι → M} (h : LinearIndependent R b) : #ι ≤ finrank R M 
goal: #ι ≤ ↑(FiniteDimensional.finrank R M)

full_name: LinearIndependent.fintype_card_le_finrank
code: theorem fintype_card_le_finrank [Module.Finite R M]
    {ι : Type*} [Fintype ι] {b : ι → M} (h : LinearIndependent R b) :
    Fintype.card ι ≤ finrank R M 
goal: Fintype.card ι ≤ FiniteDimensional.finrank R M

full_name: LinearIndependent.finset_card_le_finrank
code: theorem finset_card_le_finrank [Module.Finite R M]
    {b : Finset M} (h : LinearIndependent R (fun x => x : b → M)) :
    b.card ≤ finrank R M 
goal: b.card ≤ FiniteDimensional.finrank R M

full_name: LinearIndependent.lt_aleph0_of_finite
code: theorem lt_aleph0_of_finite {ι : Type w}
    [Module.Finite R M] {v : ι → M} (h : LinearIndependent R v) : #ι < ℵ₀ 
goal: #ι < ℵ₀

full_name: LinearIndependent.finite
code: theorem finite [Module.Finite R M] {ι : Type*} {f : ι → M}
    (h : LinearIndependent R f) : Finite ι 
goal: Finite ι

full_name: LinearIndependent.setFinite
code: theorem setFinite [Module.Finite R M] {b : Set M}
    (h : LinearIndependent R fun x : b => (x : M)) : b.Finite 
goal: b.Finite

full_name: exists_set_linearIndependent_of_lt_rank
code: lemma exists_set_linearIndependent_of_lt_rank {n : Cardinal} (hn : n < Module.rank R M) :
    ∃ s : Set M, #s = n ∧ LinearIndependent R ((↑) : s → M) 
goal: ∃ s, #↑s = n ∧ LinearIndependent (ι := { x // x ∈ s }) R Subtype.val

full_name: exists_finset_linearIndependent_of_le_rank
code: lemma exists_finset_linearIndependent_of_le_rank {n : ℕ} (hn : n ≤ Module.rank R M) :
    ∃ s : Finset M, s.card = n ∧ LinearIndependent R ((↑) : s → M) 
goal: ∃ s, s.card = n ∧ LinearIndependent R Subtype.val

full_name: exists_linearIndependent_of_le_rank
code: lemma exists_linearIndependent_of_le_rank {n : ℕ} (hn : n ≤ Module.rank R M) :
    ∃ f : Fin n → M, LinearIndependent R f 
goal: ∃ f, LinearIndependent R f

full_name: natCast_le_rank_iff
code: lemma natCast_le_rank_iff {n : ℕ} :
    n ≤ Module.rank R M ↔ ∃ f : Fin n → M, LinearIndependent R f 
goal: ↑n ≤ Module.rank R M ↔ ∃ f, LinearIndependent R f

full_name: natCast_le_rank_iff_finset
code: lemma natCast_le_rank_iff_finset {n : ℕ} :
    n ≤ Module.rank R M ↔ ∃ s : Finset M, s.card = n ∧ LinearIndependent R ((↑) : s → M) 
goal: ↑n ≤ Module.rank R M ↔ ∃ s, s.card = n ∧ LinearIndependent R Subtype.val

full_name: exists_finset_linearIndependent_of_le_finrank
code: lemma exists_finset_linearIndependent_of_le_finrank {n : ℕ} (hn : n ≤ finrank R M) :
    ∃ s : Finset M, s.card = n ∧ LinearIndependent R ((↑) : s → M) 
goal: ∃ s, s.card = n ∧ LinearIndependent R Subtype.val

full_name: exists_linearIndependent_of_le_finrank
code: lemma exists_linearIndependent_of_le_finrank {n : ℕ} (hn : n ≤ finrank R M) :
    ∃ f : Fin n → M, LinearIndependent R f 
goal: ∃ f, LinearIndependent R f

full_name: Module.Finite.not_linearIndependent_of_infinite
code: theorem Module.Finite.not_linearIndependent_of_infinite {ι : Type*} [Infinite ι]
    (v : ι → M) : ¬LinearIndependent R v 
goal: ¬LinearIndependent R v

full_name: CompleteLattice.Independent.subtype_ne_bot_le_rank
code: theorem CompleteLattice.Independent.subtype_ne_bot_le_rank [Nontrivial R]
    {V : ι → Submodule R M} (hV : CompleteLattice.Independent V) :
    Cardinal.lift.{v} #{ i : ι // V i ≠ ⊥ } ≤ Cardinal.lift.{w} (Module.rank R M) 
goal: Cardinal.lift.{v, w} #{ i // V i ≠ ⊥ } ≤ Cardinal.lift.{w, v} (Module.rank R M)

full_name: CompleteLattice.Independent.subtype_ne_bot_le_finrank_aux
code: theorem CompleteLattice.Independent.subtype_ne_bot_le_finrank_aux
    {p : ι → Submodule R M} (hp : CompleteLattice.Independent p) :
    #{ i // p i ≠ ⊥ } ≤ (finrank R M : Cardinal.{w}) 
goal: #{ i // p i ≠ ⊥ } ≤ ↑(FiniteDimensional.finrank R M)

full_name: CompleteLattice.Independent.fintypeNeBotOfFiniteDimensional
code: /-- If `p` is an independent family of submodules of a `R`-finite module `M`, then the
number of nontrivial subspaces in the family `p` is finite. -/
noncomputable def CompleteLattice.Independent.fintypeNeBotOfFiniteDimensional
    {p : ι → Submodule R M} (hp : CompleteLattice.Independent p) :
    Fintype { i : ι // p i ≠ ⊥ } 
goal: Fintype { i // p i ≠ ⊥ }

full_name: CompleteLattice.Independent.subtype_ne_bot_le_finrank
code: /-- If `p` is an independent family of submodules of a `R`-finite module `M`, then the
number of nontrivial subspaces in the family `p` is bounded above by the dimension of `M`.

Note that the `Fintype` hypothesis required here can be provided by
`CompleteLattice.Independent.fintypeNeBotOfFiniteDimensional`. -/
theorem CompleteLattice.Independent.subtype_ne_bot_le_finrank
    {p : ι → Submodule R M} (hp : CompleteLattice.Independent p) [Fintype { i // p i ≠ ⊥ }] :
    Fintype.card { i // p i ≠ ⊥ } ≤ finrank R M 
goal: Fintype.card { i // p i ≠ ⊥ } ≤ FiniteDimensional.finrank R M

full_name: Module.exists_nontrivial_relation_of_finrank_lt_card
code: /-- If a finset has cardinality larger than the rank of a module,
then there is a nontrivial linear relation amongst its elements. -/
theorem Module.exists_nontrivial_relation_of_finrank_lt_card {t : Finset M}
    (h : finrank R M < t.card) : ∃ f : M → R, ∑ e ∈ t, f e • e = 0 ∧ ∃ x ∈ t, f x ≠ 0 
goal: ∃ f, ∑ e ∈ t, f e • e = 0 ∧ ∃ x ∈ t, f x ≠ 0

full_name: Module.exists_nontrivial_relation_sum_zero_of_finrank_succ_lt_card
code: /-- If a finset has cardinality larger than `finrank + 1`,
then there is a nontrivial linear relation amongst its elements,
such that the coefficients of the relation sum to zero. -/
theorem Module.exists_nontrivial_relation_sum_zero_of_finrank_succ_lt_card
    {t : Finset M} (h : finrank R M + 1 < t.card) :
    ∃ f : M → R, ∑ e ∈ t, f e • e = 0 ∧ ∑ e ∈ t, f e = 0 ∧ ∃ x ∈ t, f x ≠ 0 
goal: ∃ f, ∑ e ∈ t, f e • e = 0 ∧ ∑ e ∈ t, f e = 0 ∧ ∃ x ∈ t, f x ≠ 0

full_name: FiniteDimensional.nontrivial_of_finrank_pos
code: /-- A finite dimensional space is nontrivial if it has positive `finrank`. -/
theorem FiniteDimensional.nontrivial_of_finrank_pos (h : 0 < finrank R M) : Nontrivial M 
goal: Nontrivial M

full_name: FiniteDimensional.nontrivial_of_finrank_eq_succ
code: /-- A finite dimensional space is nontrivial if it has `finrank` equal to the successor of a
natural number. -/
theorem FiniteDimensional.nontrivial_of_finrank_eq_succ {n : ℕ}
    (hn : finrank R M = n.succ) : Nontrivial M 
goal: Nontrivial M

full_name: FiniteDimensional.finrank_zero_of_subsingleton
code: /-- A (finite dimensional) space that is a subsingleton has zero `finrank`. -/
@[nontriviality]
theorem FiniteDimensional.finrank_zero_of_subsingleton [Subsingleton M] : finrank R M = 0 
goal: FiniteDimensional.finrank R M = 0

full_name: LinearIndependent.finrank_eq_zero_of_infinite
code: lemma LinearIndependent.finrank_eq_zero_of_infinite {ι} [Nontrivial R] [Infinite ι] {v : ι → M}
    (hv : LinearIndependent R v) : finrank R M = 0 
goal: FiniteDimensional.finrank R M = 0

full_name: finrank_bot
code: @[simp]
theorem finrank_bot : finrank R (⊥ : Submodule R M) = 0 
goal: FiniteDimensional.finrank R ↥⊥ = 0

full_name: FiniteDimensional.finrank_pos_iff_exists_ne_zero
code: /-- A finite rank torsion-free module has positive `finrank` iff it has a nonzero element. -/
theorem FiniteDimensional.finrank_pos_iff_exists_ne_zero [NoZeroSMulDivisors R M] :
    0 < finrank R M ↔ ∃ x : M, x ≠ 0 
goal: 0 < FiniteDimensional.finrank R M ↔ ∃ x, x ≠ 0

full_name: FiniteDimensional.finrank_pos_iff
code: /-- An `R`-finite torsion-free module has positive `finrank` iff it is nontrivial. -/
theorem FiniteDimensional.finrank_pos_iff [NoZeroSMulDivisors R M] :
    0 < finrank R M ↔ Nontrivial M 
goal: 0 < FiniteDimensional.finrank R M ↔ Nontrivial M

full_name: FiniteDimensional.finrank_pos
code: /-- A nontrivial finite dimensional space has positive `finrank`. -/
theorem FiniteDimensional.finrank_pos [NoZeroSMulDivisors R M] [h : Nontrivial M] :
    0 < finrank R M 
goal: 0 < FiniteDimensional.finrank R M

full_name: FiniteDimensional.finrank_eq_zero_iff
code: /-- See `FiniteDimensional.finrank_zero_iff`
  for the stronger version with `NoZeroSMulDivisors R M`. -/
theorem FiniteDimensional.finrank_eq_zero_iff :
    finrank R M = 0 ↔ ∀ x : M, ∃ a : R, a ≠ 0 ∧ a • x = 0 
goal: FiniteDimensional.finrank R M = 0 ↔ ∀ (x : M), ∃ a, a ≠ 0 ∧ a • x = 0

full_name: FiniteDimensional.finrank_eq_zero_iff_isTorsion
code: /-- The `StrongRankCondition` is automatic. See `commRing_strongRankCondition`. -/
theorem FiniteDimensional.finrank_eq_zero_iff_isTorsion {R} [CommRing R] [StrongRankCondition R]
    [IsDomain R] [Module R M] [Module.Finite R M] :
    finrank R M = 0 ↔ Module.IsTorsion R M 
goal: FiniteDimensional.finrank R M = 0 ↔ Module.IsTorsion R M

full_name: FiniteDimensional.finrank_zero_iff
code: /-- A finite dimensional space has zero `finrank` iff it is a subsingleton.
This is the `finrank` version of `rank_zero_iff`. -/
theorem FiniteDimensional.finrank_zero_iff [NoZeroSMulDivisors R M] :
    finrank R M = 0 ↔ Subsingleton M 
goal: FiniteDimensional.finrank R M = 0 ↔ Subsingleton M

full_name: FiniteDimensional.finrank_eq_zero_of_rank_eq_zero
code: theorem FiniteDimensional.finrank_eq_zero_of_rank_eq_zero (h : Module.rank R M = 0) :
    finrank R M = 0 
goal: FiniteDimensional.finrank R M = 0

full_name: Submodule.bot_eq_top_of_rank_eq_zero
code: theorem Submodule.bot_eq_top_of_rank_eq_zero [NoZeroSMulDivisors R M] (h : Module.rank R M = 0) :
    (⊥ : Submodule R M) = ⊤ 
goal: ⊥ = ⊤

full_name: Submodule.rank_eq_zero
code: /-- See `rank_subsingleton` for the reason that `Nontrivial R` is needed. -/
@[simp]
theorem Submodule.rank_eq_zero [Nontrivial R] [NoZeroSMulDivisors R M] {S : Submodule R M} :
    Module.rank R S = 0 ↔ S = ⊥ 
goal: Module.rank R ↥S = 0 ↔ S = ⊥

full_name: Submodule.finrank_eq_zero
code: @[simp]
theorem Submodule.finrank_eq_zero [StrongRankCondition R] [NoZeroSMulDivisors R M]
    {S : Submodule R M} [Module.Finite R S] :
    finrank R S = 0 ↔ S = ⊥ 
goal: FiniteDimensional.finrank R ↥S = 0 ↔ S = ⊥

full_name: Submodule.one_le_finrank_iff
code: @[simp]
lemma Submodule.one_le_finrank_iff [StrongRankCondition R] [NoZeroSMulDivisors R M]
    {S : Submodule R M} [Module.Finite R S] :
    1 ≤ finrank R S ↔ S ≠ ⊥ 
goal: 1 ≤ FiniteDimensional.finrank R ↥S ↔ S ≠ ⊥

full_name: finrank_eq_zero_of_basis_imp_not_finite
code: theorem finrank_eq_zero_of_basis_imp_not_finite
    (h : ∀ s : Set M, Basis.{v} (s : Set M) R M → ¬s.Finite) : finrank R M = 0 
goal: FiniteDimensional.finrank R M = 0

full_name: finrank_eq_zero_of_basis_imp_false
code: theorem finrank_eq_zero_of_basis_imp_false (h : ∀ s : Finset M, Basis.{v} (s : Set M) R M → False) :
    finrank R M = 0 
goal: FiniteDimensional.finrank R M = 0

full_name: finrank_eq_zero_of_not_exists_basis
code: theorem finrank_eq_zero_of_not_exists_basis
    (h : ¬∃ s : Finset M, Nonempty (Basis (s : Set M) R M)) : finrank R M = 0 
goal: FiniteDimensional.finrank R M = 0

full_name: finrank_eq_zero_of_not_exists_basis_finite
code: theorem finrank_eq_zero_of_not_exists_basis_finite
    (h : ¬∃ (s : Set M) (_ : Basis.{v} (s : Set M) R M), s.Finite) : finrank R M = 0 
goal: FiniteDimensional.finrank R M = 0

full_name: finrank_eq_zero_of_not_exists_basis_finset
code: theorem finrank_eq_zero_of_not_exists_basis_finset (h : ¬∃ s : Finset M, Nonempty (Basis s R M)) :
    finrank R M = 0 
goal: FiniteDimensional.finrank R M = 0

full_name: rank_eq_one
code: /-- If there is a nonzero vector and every other vector is a multiple of it,
then the module has dimension one. -/
theorem rank_eq_one (v : M) (n : v ≠ 0) (h : ∀ w : M, ∃ c : R, c • v = w) :
    Module.rank R M = 1 
goal: Module.rank R M = 1

full_name: finrank_eq_one
code: /-- If there is a nonzero vector and every other vector is a multiple of it,
then the module has dimension one. -/
theorem finrank_eq_one (v : M) (n : v ≠ 0) (h : ∀ w : M, ∃ c : R, c • v = w) : finrank R M = 1 
goal: FiniteDimensional.finrank R M = 1

full_name: finrank_le_one
code: /-- If every vector is a multiple of some `v : M`, then `M` has dimension at most one.
-/
theorem finrank_le_one (v : M) (h : ∀ w : M, ∃ c : R, c • v = w) : finrank R M ≤ 1 
goal: FiniteDimensional.finrank R M ≤ 1