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.
The rank of (ι →₀ R) is (# ι).lift.
If R and ι lie in the same universe, the rank of (ι →₀ R) is # ι.
The rank of M × N is (module.rank R M).lift + (module.rank R N).lift.
If M and N lie in the same universe, the rank of M × N is
(module.rank R M) + (module.rank R N).
The rank of the direct sum is the sum of the ranks.
The rank of a finite product is the sum of the ranks.
If m and n are fintype, the rank of m × n matrices is (# m).lift * (# n).lift.
If m and n are fintype that lie in the same universe, the rank of m × n matrices is
(# n * # m).lift.
If m and n are fintype that lie in the same universe as R, the rank of m × n matrices
is # m * # n.
The rank of M ⊗[R] N is (module.rank R M).lift * (module.rank R N).lift.
If M and N lie in the same universe, the rank of M ⊗[R] N is
(module.rank R M) * (module.rank R N).