mathlib documentation

linear_algebra.free_module.rank

Rank of free modules #

This is a basic API for the rank of free modules.

The rank of a free module M over R is the cardinality of choose_basis_index R M.

@[simp]
theorem module.free.rank_finsupp (R : Type u) [ring R] [strong_rank_condition R] {ι : Type v} :
module.rank R →₀ R) = (# ι).lift

The rank of (ι →₀ R) is (# ι).lift.

theorem module.free.rank_finsupp' (R : Type u) [ring R] [strong_rank_condition R] {ι : Type u} :
module.rank R →₀ R) = # ι

If R and ι lie in the same universe, the rank of (ι →₀ R) is # ι.

@[simp]
theorem module.free.rank_prod (R : Type u) (M : Type v) (N : Type w) [ring R] [strong_rank_condition R] [add_comm_group M] [module R M] [module.free R M] [add_comm_group N] [module R N] [module.free R N] :

The rank of M × N is (module.rank R M).lift + (module.rank R N).lift.

theorem module.free.rank_prod' (R : Type u) (M : Type v) [ring R] [strong_rank_condition R] [add_comm_group M] [module R M] [module.free R M] (N : Type v) [add_comm_group N] [module R N] [module.free R N] :

If M and N lie in the same universe, the rank of M × N is (module.rank R M) + (module.rank R N).

@[simp]
theorem module.free.rank_direct_sum (R : Type u) [ring R] [strong_rank_condition R] {ι : Type v} (M : ι → Type w) [Π (i : ι), add_comm_group (M i)] [Π (i : ι), module R (M i)] [∀ (i : ι), module.free R (M i)] :
module.rank R (⨁ (i : ι), M i) = cardinal.sum (λ (i : ι), module.rank R (M i))

The rank of the direct sum is the sum of the ranks.

@[simp]
theorem module.free.rank_pi_fintype (R : Type u) [ring R] [strong_rank_condition R] {ι : Type v} [fintype ι] {M : ι → Type w} [Π (i : ι), add_comm_group (M i)] [Π (i : ι), module R (M i)] [∀ (i : ι), module.free R (M i)] :
module.rank R (Π (i : ι), M i) = cardinal.sum (λ (i : ι), module.rank R (M i))

The rank of a finite product is the sum of the ranks.

@[simp]
theorem module.free.rank_matrix (R : Type u) [ring R] [strong_rank_condition R] (n : Type v) [fintype n] (m : Type w) [fintype m] :
module.rank R (matrix n m R) = ((# n).lift) * (# m).lift

If n and m are fintype, the rank of n × m matrices is (# n).lift * (# m).lift.

@[simp]
theorem module.free.rank_matrix' (R : Type u) [ring R] [strong_rank_condition R] (n : Type v) [fintype n] (m : Type v) [fintype m] :
module.rank R (matrix n m R) = ((# n) * # m).lift

If n and m are fintype that lie in the same universe, the rank of n × m matrices is (# n * # m).lift.

@[simp]
theorem module.free.rank_matrix'' (R : Type u) [ring R] [strong_rank_condition R] (n : Type u) [fintype n] (m : Type u) [fintype m] :
module.rank R (matrix n m R) = (# n) * # m

If n and m are fintype that lie in the same universe as R, the rank of n × m matrices is # n * # m.

@[simp]
theorem module.free.rank_tensor_product (R : Type u) (M : Type v) (N : Type w) [comm_ring R] [strong_rank_condition R] [add_comm_group M] [module R M] [module.free R M] [add_comm_group N] [module R N] [module.free R N] :

The rank of M ⊗[R] N is (module.rank R M).lift * (module.rank R N).lift.

theorem module.free.rank_tensor_product' (R : Type u) (M : Type v) [comm_ring R] [strong_rank_condition R] [add_comm_group M] [module R M] [module.free R M] (N : Type v) [add_comm_group N] [module R N] [module.free R N] :

If M and N lie in the same universe, the rank of M ⊗[R] N is (module.rank R M) * (module.rank R N).