File: Mathlib/LinearAlgebra/Dimension/Constructions.lean

full_name: LinearIndependent.sum_elim_of_quotient
code: theorem LinearIndependent.sum_elim_of_quotient
    {M' : Submodule R M} {ι₁ ι₂} {f : ι₁ → M'} (hf : LinearIndependent R f) (g : ι₂ → M)
    (hg : LinearIndependent R (Submodule.Quotient.mk (p := M') ∘ g)) :
      LinearIndependent R (Sum.elim (f · : ι₁ → M) g) 
goal: LinearIndependent R (Sum.elim (fun x => ↑(f x)) g)

full_name: LinearIndependent.union_of_quotient
code: theorem LinearIndependent.union_of_quotient
    {M' : Submodule R M} {s : Set M} (hs : s ⊆ M') (hs' : LinearIndependent (ι := s) R Subtype.val)
  {t : Set M} (ht : LinearIndependent (ι := t) R (Submodule.Quotient.mk (p := M') ∘ Subtype.val)) :
    LinearIndependent (ι := (s ∪ t : _)) R Subtype.val 
goal: LinearIndependent (ι := ↑(s ∪ t)) R Subtype.val

full_name: rank_quotient_add_rank_le
code: theorem rank_quotient_add_rank_le [Nontrivial R] (M' : Submodule R M) :
    Module.rank R (M ⧸ M') + Module.rank R M' ≤ Module.rank R M 
goal: Module.rank R (M ⧸ M') + Module.rank R ↥M' ≤ Module.rank R M

full_name: rank_quotient_le
code: theorem rank_quotient_le (p : Submodule R M) : Module.rank R (M ⧸ p) ≤ Module.rank R M 
goal: Module.rank R (M ⧸ p) ≤ Module.rank R M

full_name: rank_quotient_eq_of_le_torsion
code: theorem rank_quotient_eq_of_le_torsion {R M} [CommRing R] [AddCommGroup M] [Module R M]
    {M' : Submodule R M} (hN : M' ≤ torsion R M) : Module.rank R (M ⧸ M') = Module.rank R M 
goal: Module.rank R (M ⧸ M') = Module.rank R M

full_name: rank_ulift
code: @[simp]
theorem rank_ulift : Module.rank R (ULift.{w} M) = Cardinal.lift.{w} (Module.rank R M) 
goal: Module.rank R (ULift.{w, v} M) = Cardinal.lift.{w, v} (Module.rank R M)

full_name: finrank_ulift
code: @[simp]
theorem finrank_ulift : finrank R (ULift M) = finrank R M 
goal: FiniteDimensional.finrank R (ULift.{u_2, v} M) = FiniteDimensional.finrank R M

full_name: lift_rank_add_lift_rank_le_rank_prod
code: theorem lift_rank_add_lift_rank_le_rank_prod [Nontrivial R] :
    lift.{v'} (Module.rank R M) + lift.{v} (Module.rank R M') ≤ Module.rank R (M × M') 
goal: Cardinal.lift.{v', v} (Module.rank R M) + Cardinal.lift.{v, v'} (Module.rank R M') ≤ Module.rank R (M × M')

full_name: rank_add_rank_le_rank_prod
code: theorem rank_add_rank_le_rank_prod [Nontrivial R] :
    Module.rank R M + Module.rank R M₁ ≤ Module.rank R (M × M₁) 
goal: Module.rank R M + Module.rank R M₁ ≤ Module.rank R (M × M₁)

full_name: rank_prod
code: /-- If `M` and `M'` are free, then the rank of `M × M'` is
`(Module.rank R M).lift + (Module.rank R M').lift`. -/
@[simp]
theorem rank_prod : Module.rank R (M × M') =
    Cardinal.lift.{v'} (Module.rank R M) + Cardinal.lift.{v, v'} (Module.rank R M') 
goal: Module.rank R (M × M') = Cardinal.lift.{v', v} (Module.rank R M) + Cardinal.lift.{v, v'} (Module.rank R M')

full_name: rank_prod'
code: /-- If `M` and `M'` are free (and lie in the same universe), the rank of `M × M'` is
  `(Module.rank R M) + (Module.rank R M')`. -/
theorem rank_prod' : Module.rank R (M × M₁) = Module.rank R M + Module.rank R M₁ 
goal: Module.rank R (M × M₁) = Module.rank R M + Module.rank R M₁

full_name: FiniteDimensional.finrank_prod
code: /-- The finrank of `M × M'` is `(finrank R M) + (finrank R M')`. -/
@[simp]
theorem FiniteDimensional.finrank_prod [Module.Finite R M] [Module.Finite R M'] :
    finrank R (M × M') = finrank R M + finrank R M' 
goal: FiniteDimensional.finrank R (M × M') = FiniteDimensional.finrank R M + FiniteDimensional.finrank R M'

full_name: rank_finsupp
code: @[simp]
theorem rank_finsupp (ι : Type w) :
    Module.rank R (ι →₀ M) = Cardinal.lift.{v} #ι * Cardinal.lift.{w} (Module.rank R M) 
goal: Module.rank R (ι →₀ M) = Cardinal.lift.{v, w} #ι * Cardinal.lift.{w, v} (Module.rank R M)

full_name: rank_finsupp'
code: theorem rank_finsupp' (ι : Type v) : Module.rank R (ι →₀ M) = #ι * Module.rank R M 
goal: Module.rank R (ι →₀ M) = #ι * Module.rank R M

full_name: rank_finsupp_self
code: /-- The rank of `(ι →₀ R)` is `(#ι).lift`. -/
-- Porting note, this should not be `@[simp]`, as simp can prove it.
-- @[simp]
theorem rank_finsupp_self (ι : Type w) : Module.rank R (ι →₀ R) = Cardinal.lift.{u} #ι 
goal: Module.rank R (ι →₀ R) = Cardinal.lift.{u, w} #ι

full_name: rank_finsupp_self'
code: /-- If `R` and `ι` lie in the same universe, the rank of `(ι →₀ R)` is `# ι`. -/
theorem rank_finsupp_self' {ι : Type u} : Module.rank R (ι →₀ R) = #ι 
goal: Module.rank R (ι →₀ R) = #ι

full_name: rank_directSum
code: /-- The rank of the direct sum is the sum of the ranks. -/
@[simp]
theorem rank_directSum {ι : Type v} (M : ι → Type w) [∀ i : ι, AddCommGroup (M i)]
    [∀ i : ι, Module R (M i)] [∀ i : ι, Module.Free R (M i)] :
    Module.rank R (⨁ i, M i) = Cardinal.sum fun i => Module.rank R (M i) 
goal: Module.rank R (⨁ (i : ι), M i) = Cardinal.sum fun i => Module.rank R (M i)

full_name: rank_matrix
code: /-- If `m` and `n` are `Fintype`, the rank of `m × n` matrices is `(#m).lift * (#n).lift`. -/
@[simp]
theorem rank_matrix (m : Type v) (n : Type w) [Finite m] [Finite n] :
    Module.rank R (Matrix m n R) =
      Cardinal.lift.{max v w u, v} #m * Cardinal.lift.{max v w u, w} #n 
goal: Module.rank R (Matrix m n R) = Cardinal.lift.{max v w u, v} #m * Cardinal.lift.{max v w u, w} #n

full_name: rank_matrix'
code: /-- If `m` and `n` are `Fintype` that lie in the same universe, the rank of `m × n` matrices is
  `(#n * #m).lift`. -/
@[simp high]
theorem rank_matrix' (m n : Type v) [Finite m] [Finite n] :
    Module.rank R (Matrix m n R) = Cardinal.lift.{u} (#m * #n) 
goal: Module.rank R (Matrix m n R) = Cardinal.lift.{u, v} (#m * #n)

full_name: rank_matrix''
code: /-- If `m` and `n` are `Fintype` that lie in the same universe as `R`, the rank of `m × n` matrices
  is `# m * # n`. -/
-- @[simp] -- Porting note (#10618): simp can prove this
theorem rank_matrix'' (m n : Type u) [Finite m] [Finite n] :
    Module.rank R (Matrix m n R) = #m * #n 
goal: Module.rank R (Matrix m n R) = #m * #n

full_name: FiniteDimensional.finrank_finsupp
code: @[simp]
theorem finrank_finsupp {ι : Type v} [Fintype ι] : finrank R (ι →₀ M) = card ι * finrank R M 
goal: FiniteDimensional.finrank R (ι →₀ M) = Fintype.card ι * FiniteDimensional.finrank R M

full_name: FiniteDimensional.finrank_finsupp_self
code: /-- The finrank of `(ι →₀ R)` is `Fintype.card ι`. -/
@[simp]
theorem finrank_finsupp_self {ι : Type v} [Fintype ι] : finrank R (ι →₀ R) = card ι 
goal: FiniteDimensional.finrank R (ι →₀ R) = Fintype.card ι

full_name: FiniteDimensional.finrank_directSum
code: /-- The finrank of the direct sum is the sum of the finranks. -/
@[simp]
theorem finrank_directSum {ι : Type v} [Fintype ι] (M : ι → Type w) [∀ i : ι, AddCommGroup (M i)]
    [∀ i : ι, Module R (M i)] [∀ i : ι, Module.Free R (M i)] [∀ i : ι, Module.Finite R (M i)] :
    finrank R (⨁ i, M i) = ∑ i, finrank R (M i) 
goal: FiniteDimensional.finrank R (⨁ (i : ι), M i) = ∑ i : ι, FiniteDimensional.finrank R (M i)

full_name: FiniteDimensional.finrank_matrix
code: /-- If `m` and `n` are `Fintype`, the finrank of `m × n` matrices is
  `(Fintype.card m) * (Fintype.card n)`. -/
theorem finrank_matrix (m n : Type*) [Fintype m] [Fintype n] :
    finrank R (Matrix m n R) = card m * card n 
goal: FiniteDimensional.finrank R (Matrix m n R) = Fintype.card m * Fintype.card n

full_name: rank_pi
code: /-- The rank of a finite product of free modules is the sum of the ranks. -/
-- this result is not true without the freeness assumption
@[simp]
theorem rank_pi [Finite η] : Module.rank R (∀ i, φ i) =
    Cardinal.sum fun i => Module.rank R (φ i) 
goal: Module.rank R ((i : η) → φ i) = Cardinal.sum fun i => Module.rank R (φ i)

full_name: FiniteDimensional.finrank_pi
code: /-- The finrank of `(ι → R)` is `Fintype.card ι`. -/
theorem FiniteDimensional.finrank_pi {ι : Type v} [Fintype ι] :
    finrank R (ι → R) = Fintype.card ι 
goal: FiniteDimensional.finrank R (ι → R) = Fintype.card ι

full_name: FiniteDimensional.finrank_pi_fintype
code: /-- The finrank of a finite product is the sum of the finranks. -/
theorem FiniteDimensional.finrank_pi_fintype
    {ι : Type v} [Fintype ι] {M : ι → Type w} [∀ i : ι, AddCommGroup (M i)]
    [∀ i : ι, Module R (M i)] [∀ i : ι, Module.Free R (M i)] [∀ i : ι, Module.Finite R (M i)] :
    finrank R (∀ i, M i) = ∑ i, finrank R (M i) 
goal: FiniteDimensional.finrank R ((i : ι) → M i) = ∑ i : ι, FiniteDimensional.finrank R (M i)

full_name: rank_fun
code: theorem rank_fun {M η : Type u} [Fintype η] [AddCommGroup M] [Module R M] [Module.Free R M] :
    Module.rank R (η → M) = Fintype.card η * Module.rank R M 
goal: Module.rank R (η → M) = ↑(Fintype.card η) * Module.rank R M

full_name: rank_fun_eq_lift_mul
code: theorem rank_fun_eq_lift_mul : Module.rank R (η → M) =
    (Fintype.card η : Cardinal.{max u₁' v}) * Cardinal.lift.{u₁'} (Module.rank R M) 
goal: Module.rank R (η → M) = ↑(Fintype.card η) * Cardinal.lift.{u₁', v} (Module.rank R M)

full_name: rank_fun'
code: theorem rank_fun' : Module.rank R (η → R) = Fintype.card η 
goal: Module.rank R (η → R) = ↑(Fintype.card η)

full_name: rank_fin_fun
code: theorem rank_fin_fun (n : ℕ) : Module.rank R (Fin n → R) = n 
goal: Module.rank R (Fin n → R) = ↑n

full_name: FiniteDimensional.finrank_fintype_fun_eq_card
code: /-- The vector space of functions on a `Fintype ι` has finrank equal to the cardinality of `ι`. -/
@[simp]
theorem FiniteDimensional.finrank_fintype_fun_eq_card : finrank R (η → R) = Fintype.card η 
goal: FiniteDimensional.finrank R (η → R) = Fintype.card η

full_name: FiniteDimensional.finrank_fin_fun
code: /-- The vector space of functions on `Fin n` has finrank equal to `n`. -/
-- @[simp] -- Porting note (#10618): simp already proves this
theorem FiniteDimensional.finrank_fin_fun {n : ℕ} : finrank R (Fin n → R) = n 
goal: FiniteDimensional.finrank R (Fin n → R) = n

full_name: finDimVectorspaceEquiv
code: /-- An `n`-dimensional `R`-vector space is equivalent to `Fin n → R`. -/
def finDimVectorspaceEquiv (n : ℕ) (hn : Module.rank R M = n) : M ≃ₗ[R] Fin n → R 
goal: M ≃ₗ[R] Fin n → R

full_name: rank_tensorProduct
code: /-- The `S`-rank of `M ⊗[R] M'` is `(Module.rank S M).lift * (Module.rank R M').lift`. -/
@[simp]
theorem rank_tensorProduct :
    Module.rank R (M ⊗[S] M') =
      Cardinal.lift.{v'} (Module.rank R M) * Cardinal.lift.{v} (Module.rank S M') 
goal: Module.rank R (TensorProduct S M M') =
  Cardinal.lift.{v', v} (Module.rank R M) * Cardinal.lift.{v, v'} (Module.rank S M')

full_name: rank_tensorProduct'
code: /-- If `M` and `M'` lie in the same universe, the `S`-rank of `M ⊗[R] M'` is
  `(Module.rank S M) * (Module.rank R M')`. -/
theorem rank_tensorProduct' :
    Module.rank R (M ⊗[S] M₁) = Module.rank R M * Module.rank S M₁ 
goal: Module.rank R (TensorProduct S M M₁) = Module.rank R M * Module.rank S M₁

full_name: FiniteDimensional.finrank_tensorProduct
code: /-- The `S`-finrank of `M ⊗[R] M'` is `(finrank S M) * (finrank R M')`. -/
@[simp]
theorem FiniteDimensional.finrank_tensorProduct :
    finrank R (M ⊗[S] M') = finrank R M * finrank S M' 
goal: FiniteDimensional.finrank R (TensorProduct S M M') = FiniteDimensional.finrank R M * FiniteDimensional.finrank S M'

full_name: Submodule.lt_of_le_of_finrank_lt_finrank
code: theorem lt_of_le_of_finrank_lt_finrank {s t : Submodule R M} (le : s ≤ t)
    (lt : finrank R s < finrank R t) : s < t 
goal: s < t

full_name: Submodule.lt_top_of_finrank_lt_finrank
code: theorem lt_top_of_finrank_lt_finrank {s : Submodule R M} (lt : finrank R s < finrank R M) :
    s < ⊤ 
goal: s < ⊤

full_name: Submodule.finrank_le
code: /-- The dimension of a submodule is bounded by the dimension of the ambient space. -/
theorem Submodule.finrank_le [Module.Finite R M] (s : Submodule R M) :
    finrank R s ≤ finrank R M 
goal: FiniteDimensional.finrank R ↥s ≤ FiniteDimensional.finrank R M

full_name: Submodule.finrank_quotient_le
code: /-- The dimension of a quotient is bounded by the dimension of the ambient space. -/
theorem Submodule.finrank_quotient_le [Module.Finite R M] (s : Submodule R M) :
    finrank R (M ⧸ s) ≤ finrank R M 
goal: FiniteDimensional.finrank R (M ⧸ s) ≤ FiniteDimensional.finrank R M

full_name: Submodule.finrank_map_le
code: /-- Pushforwards of finite submodules have a smaller finrank. -/
theorem Submodule.finrank_map_le (f : M →ₗ[R] M') (p : Submodule R M) [Module.Finite R p] :
    finrank R (p.map f) ≤ finrank R p 
goal: FiniteDimensional.finrank R ↥(Submodule.map f p) ≤ FiniteDimensional.finrank R ↥p

full_name: Submodule.finrank_le_finrank_of_le
code: theorem Submodule.finrank_le_finrank_of_le {s t : Submodule R M} [Module.Finite R t] (hst : s ≤ t) :
    finrank R s ≤ finrank R t 
goal: FiniteDimensional.finrank R ↥s ≤ FiniteDimensional.finrank R ↥t

full_name: rank_span_le
code: theorem rank_span_le (s : Set M) : Module.rank R (span R s) ≤ #s 
goal: Module.rank R ↥(Submodule.span R s) ≤ #↑s

full_name: rank_span_finset_le
code: theorem rank_span_finset_le (s : Finset M) : Module.rank R (span R (s : Set M)) ≤ s.card 
goal: Module.rank R ↥(Submodule.span R ↑s) ≤ ↑s.card

full_name: rank_span_of_finset
code: theorem rank_span_of_finset (s : Finset M) : Module.rank R (span R (s : Set M)) < ℵ₀ 
goal: Module.rank R ↥(Submodule.span R ↑s) < ℵ₀

full_name: Set.finrank
code: /-- The rank of a set of vectors as a natural number. -/
protected noncomputable def Set.finrank (s : Set M) : ℕ 
goal: ℕ

full_name: finrank_span_le_card
code: theorem finrank_span_le_card (s : Set M) [Fintype s] : finrank R (span R s) ≤ s.toFinset.card 
goal: FiniteDimensional.finrank R ↥(Submodule.span R s) ≤ s.toFinset.card

full_name: finrank_span_finset_le_card
code: theorem finrank_span_finset_le_card (s : Finset M) : (s : Set M).finrank R ≤ s.card 
goal: Set.finrank R ↑s ≤ s.card

full_name: finrank_range_le_card
code: theorem finrank_range_le_card {ι : Type*} [Fintype ι] (b : ι → M) :
    (Set.range b).finrank R ≤ Fintype.card ι 
goal: Set.finrank R (Set.range b) ≤ Fintype.card ι

full_name: finrank_span_eq_card
code: theorem finrank_span_eq_card [Nontrivial R] {ι : Type*} [Fintype ι] {b : ι → M}
    (hb : LinearIndependent R b) :
    finrank R (span R (Set.range b)) = Fintype.card ι 
goal: FiniteDimensional.finrank R ↥(Submodule.span R (Set.range b)) = Fintype.card ι

full_name: finrank_span_set_eq_card
code: theorem finrank_span_set_eq_card {s : Set M} [Fintype s] (hs : LinearIndependent R ((↑) : s → M)) :
    finrank R (span R s) = s.toFinset.card 
goal: FiniteDimensional.finrank R ↥(Submodule.span R s) = s.toFinset.card

full_name: finrank_span_finset_eq_card
code: theorem finrank_span_finset_eq_card {s : Finset M} (hs : LinearIndependent R ((↑) : s → M)) :
    finrank R (span R (s : Set M)) = s.card 
goal: FiniteDimensional.finrank R ↥(Submodule.span R ↑s) = s.card

full_name: span_lt_of_subset_of_card_lt_finrank
code: theorem span_lt_of_subset_of_card_lt_finrank {s : Set M} [Fintype s] {t : Submodule R M}
    (subset : s ⊆ t) (card_lt : s.toFinset.card < finrank R t) : span R s < t 
goal: Submodule.span R s < t

full_name: span_lt_top_of_card_lt_finrank
code: theorem span_lt_top_of_card_lt_finrank {s : Set M} [Fintype s]
    (card_lt : s.toFinset.card < finrank R M) : span R s < ⊤ 
goal: Submodule.span R s < ⊤

full_name: Subalgebra.rank_toSubmodule
code: @[simp]
theorem Subalgebra.rank_toSubmodule (S : Subalgebra F E) :
    Module.rank F (Subalgebra.toSubmodule S) = Module.rank F S 
goal: Module.rank F ↥(Subalgebra.toSubmodule S) = Module.rank F ↥S

full_name: Subalgebra.finrank_toSubmodule
code: @[simp]
theorem Subalgebra.finrank_toSubmodule (S : Subalgebra F E) :
    finrank F (Subalgebra.toSubmodule S) = finrank F S 
goal: FiniteDimensional.finrank F ↥(Subalgebra.toSubmodule S) = FiniteDimensional.finrank F ↥S

full_name: subalgebra_top_rank_eq_submodule_top_rank
code: theorem subalgebra_top_rank_eq_submodule_top_rank :
    Module.rank F (⊤ : Subalgebra F E) = Module.rank F (⊤ : Submodule F E) 
goal: Module.rank F ↥⊤ = Module.rank F ↥⊤

full_name: subalgebra_top_finrank_eq_submodule_top_finrank
code: theorem subalgebra_top_finrank_eq_submodule_top_finrank :
    finrank F (⊤ : Subalgebra F E) = finrank F (⊤ : Submodule F E) 
goal: FiniteDimensional.finrank F ↥⊤ = FiniteDimensional.finrank F ↥⊤

full_name: Subalgebra.rank_top
code: theorem Subalgebra.rank_top : Module.rank F (⊤ : Subalgebra F E) = Module.rank F E 
goal: Module.rank F ↥⊤ = Module.rank F E

full_name: Subalgebra.rank_bot
code: @[simp]
theorem Subalgebra.rank_bot : Module.rank F (⊥ : Subalgebra F E) = 1 
goal: Module.rank F ↥⊥ = 1

full_name: Subalgebra.finrank_bot
code: @[simp]
theorem Subalgebra.finrank_bot : finrank F (⊥ : Subalgebra F E) = 1 
goal: FiniteDimensional.finrank F ↥⊥ = 1