Lemmas on integer matrices #
Here we collect some results about matrices over ℚ and ℤ.
Main definitions and results #
Matrix.num,Matrix.den: express a rational matrixAas the quotient of an integer matrix by a (non-zero) natural.
TODO #
Consider generalizing these constructions to matrices over localizations of rings (or semirings).
Casts #
These results are useful shortcuts because the canonical casting maps out of ℕ, ℤ, and ℚ to
suitable types are bare functions, not ring homs, so we cannot apply Matrix.map_mul directly to
them.
theorem
Matrix.map_mul_natCast
{n : Type u_2}
[Fintype n]
{α : Type u_3}
[NonAssocSemiring α]
(A B : Matrix n n ℕ)
:
theorem
Matrix.map_mul_intCast
{n : Type u_2}
[Fintype n]
{α : Type u_3}
[NonAssocRing α]
(A B : Matrix n n ℤ)
:
theorem
Matrix.map_mul_ratCast
{n : Type u_2}
[Fintype n]
{α : Type u_3}
[DivisionRing α]
[CharZero α]
(A B : Matrix n n ℚ)
:
Denominator of a rational matrix #
The denominator of a matrix of rationals (as a Nat, defined as the LCM of the denominators of
the entries).
Instances For
Compatibility with map #
@[simp]
@[simp]
@[simp]
Casts from scalar types #
@[simp]
@[simp]
@[simp]
theorem
Matrix.den_ofNat
{m : Type u_1}
[Fintype m]
[DecidableEq m]
(a : ℕ)
[a.AtLeastTwo]
:
(OfNat.ofNat a).den = 1
@[simp]
theorem
Matrix.num_ofNat
{m : Type u_1}
[Fintype m]
[DecidableEq m]
(a : ℕ)
[a.AtLeastTwo]
:
(OfNat.ofNat a).num = ↑a
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]