linear_algebra.matrix.zpow
⟷
Mathlib.LinearAlgebra.Matrix.ZPow
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -129,20 +129,22 @@ theorem zpow_neg_one (A : M) : A ^ (-1 : ℤ) = A⁻¹ :=
#align matrix.zpow_neg_one Matrix.zpow_neg_one
-/
-#print Matrix.zpow_coe_nat /-
-theorem zpow_coe_nat (A : M) (n : ℕ) : A ^ (n : ℤ) = A ^ n :=
+/- warning: matrix.zpow_coe_nat clashes with zpow_coe_nat -> zpow_natCast
+Case conversion may be inaccurate. Consider using '#align matrix.zpow_coe_nat zpow_natCastₓ'. -/
+#print zpow_natCast /-
+theorem zpow_natCast (A : M) (n : ℕ) : A ^ (n : ℤ) = A ^ n :=
zpow_natCast _ _
-#align matrix.zpow_coe_nat Matrix.zpow_coe_nat
+#align matrix.zpow_coe_nat zpow_natCast
-/
-#print Matrix.zpow_neg_coe_nat /-
+#print Matrix.zpow_neg_natCast /-
@[simp]
-theorem zpow_neg_coe_nat (A : M) (n : ℕ) : A ^ (-n : ℤ) = (A ^ n)⁻¹ :=
+theorem zpow_neg_natCast (A : M) (n : ℕ) : A ^ (-n : ℤ) = (A ^ n)⁻¹ :=
by
cases n
· simp
· exact DivInvMonoid.zpow_neg' _ _
-#align matrix.zpow_neg_coe_nat Matrix.zpow_neg_coe_nat
+#align matrix.zpow_neg_coe_nat Matrix.zpow_neg_natCast
-/
#print IsUnit.det_zpow /-
@@ -170,7 +172,7 @@ theorem isUnit_det_zpow_iff {A : M} {z : ℤ} : IsUnit (A ^ z).det ↔ IsUnit A.
#print Matrix.zpow_neg /-
theorem zpow_neg {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (-n) = (A ^ n)⁻¹
- | (n : ℕ) => zpow_neg_coe_nat _ _
+ | (n : ℕ) => zpow_neg_natCast _ _
| -[n+1] =>
by
rw [zpow_negSucc, neg_neg_of_nat_succ, of_nat_eq_coe, zpow_natCast, nonsing_inv_nonsing_inv]
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -47,7 +47,7 @@ theorem inv_pow' (A : M) (n : ℕ) : A⁻¹ ^ n = (A ^ n)⁻¹ :=
by
induction' n with n ih
· simp
- · rw [pow_succ A, mul_eq_mul, mul_inv_rev, ← ih, ← mul_eq_mul, ← pow_succ']
+ · rw [pow_succ' A, mul_eq_mul, mul_inv_rev, ← ih, ← mul_eq_mul, ← pow_succ]
#align matrix.inv_pow' Matrix.inv_pow'
-/
@@ -72,11 +72,11 @@ theorem pow_inv_comm' (A : M) (m n : ℕ) : A⁻¹ ^ m ⬝ A ^ n = A ^ n ⬝ A
·
calc
A⁻¹ ^ (m + 1) ⬝ A ^ (n + 1) = A⁻¹ ^ m ⬝ (A⁻¹ ⬝ A) ⬝ A ^ n := by
- simp only [pow_succ' A⁻¹, pow_succ A, mul_eq_mul, Matrix.mul_assoc]
+ simp only [pow_succ A⁻¹, pow_succ' A, mul_eq_mul, Matrix.mul_assoc]
_ = A ^ n ⬝ A⁻¹ ^ m := by simp only [h, Matrix.mul_one, Matrix.one_mul, IH m]
_ = A ^ n ⬝ (A ⬝ A⁻¹) ⬝ A⁻¹ ^ m := by simp only [h', Matrix.mul_one, Matrix.one_mul]
_ = A ^ (n + 1) ⬝ A⁻¹ ^ (m + 1) := by
- simp only [pow_succ' A, pow_succ A⁻¹, mul_eq_mul, Matrix.mul_assoc]
+ simp only [pow_succ A, pow_succ' A⁻¹, mul_eq_mul, Matrix.mul_assoc]
· simp [h]
#align matrix.pow_inv_comm' Matrix.pow_inv_comm'
-/
@@ -90,7 +90,7 @@ open Int
#print Matrix.one_zpow /-
@[simp]
theorem one_zpow : ∀ n : ℤ, (1 : M) ^ n = 1
- | (n : ℕ) => by rw [zpow_coe_nat, one_pow]
+ | (n : ℕ) => by rw [zpow_natCast, one_pow]
| -[n+1] => by rw [zpow_negSucc, one_pow, inv_one]
#align matrix.one_zpow Matrix.one_zpow
-/
@@ -98,7 +98,7 @@ theorem one_zpow : ∀ n : ℤ, (1 : M) ^ n = 1
#print Matrix.zero_zpow /-
theorem zero_zpow : ∀ z : ℤ, z ≠ 0 → (0 : M) ^ z = 0
| (n : ℕ), h => by
- rw [zpow_coe_nat, zero_pow]; refine' lt_of_le_of_ne n.zero_le (Ne.symm _)
+ rw [zpow_natCast, zero_pow]; refine' lt_of_le_of_ne n.zero_le (Ne.symm _)
simpa using h
| -[n+1], h => by simp [zero_pow n.zero_lt_succ]
#align matrix.zero_zpow Matrix.zero_zpow
@@ -115,7 +115,7 @@ theorem zero_zpow_eq (n : ℤ) : (0 : M) ^ n = if n = 0 then 1 else 0 :=
#print Matrix.inv_zpow /-
theorem inv_zpow (A : M) : ∀ n : ℤ, A⁻¹ ^ n = (A ^ n)⁻¹
- | (n : ℕ) => by rw [zpow_coe_nat, zpow_coe_nat, inv_pow']
+ | (n : ℕ) => by rw [zpow_natCast, zpow_natCast, inv_pow']
| -[n+1] => by rw [zpow_negSucc, zpow_negSucc, inv_pow']
#align matrix.inv_zpow Matrix.inv_zpow
-/
@@ -131,7 +131,7 @@ theorem zpow_neg_one (A : M) : A ^ (-1 : ℤ) = A⁻¹ :=
#print Matrix.zpow_coe_nat /-
theorem zpow_coe_nat (A : M) (n : ℕ) : A ^ (n : ℤ) = A ^ n :=
- zpow_coe_nat _ _
+ zpow_natCast _ _
#align matrix.zpow_coe_nat Matrix.zpow_coe_nat
-/
@@ -159,7 +159,7 @@ theorem isUnit_det_zpow_iff {A : M} {z : ℤ} : IsUnit (A ^ z).det ↔ IsUnit A.
by
induction' z using Int.induction_on with z IH z IH
· simp
- · rw [← Int.ofNat_succ, zpow_coe_nat, det_pow, isUnit_pow_succ_iff, ← Int.ofNat_zero,
+ · rw [← Int.ofNat_succ, zpow_natCast, det_pow, isUnit_pow_succ_iff, ← Int.ofNat_zero,
Int.ofNat_inj]
simp
· rw [← neg_add', ← Int.ofNat_succ, zpow_neg_coe_nat, is_unit_nonsing_inv_det_iff, det_pow,
@@ -173,7 +173,7 @@ theorem zpow_neg {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (-n) = (A ^ n)⁻
| (n : ℕ) => zpow_neg_coe_nat _ _
| -[n+1] =>
by
- rw [zpow_negSucc, neg_neg_of_nat_succ, of_nat_eq_coe, zpow_coe_nat, nonsing_inv_nonsing_inv]
+ rw [zpow_negSucc, neg_neg_of_nat_succ, of_nat_eq_coe, zpow_natCast, nonsing_inv_nonsing_inv]
rw [det_pow]
exact h.pow _
#align matrix.zpow_neg Matrix.zpow_neg
@@ -187,15 +187,15 @@ theorem inv_zpow' {A : M} (h : IsUnit A.det) (n : ℤ) : A⁻¹ ^ n = A ^ (-n) :
#print Matrix.zpow_add_one /-
theorem zpow_add_one {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (n + 1) = A ^ n * A
- | (n : ℕ) => by simp only [← Nat.cast_succ, pow_succ', zpow_coe_nat]
+ | (n : ℕ) => by simp only [← Nat.cast_succ, pow_succ, zpow_natCast]
| -((n : ℕ) + 1) =>
calc
A ^ (-(n + 1) + 1 : ℤ) = (A ^ n)⁻¹ := by
- rw [neg_add, neg_add_cancel_right, zpow_neg h, zpow_coe_nat]
+ rw [neg_add, neg_add_cancel_right, zpow_neg h, zpow_natCast]
_ = (A ⬝ A ^ n)⁻¹ ⬝ A := by
rw [mul_inv_rev, Matrix.mul_assoc, nonsing_inv_mul _ h, Matrix.mul_one]
_ = A ^ (-(n + 1 : ℤ)) * A := by
- rw [zpow_neg h, ← Int.ofNat_succ, zpow_coe_nat, pow_succ, mul_eq_mul, mul_eq_mul]
+ rw [zpow_neg h, ← Int.ofNat_succ, zpow_natCast, pow_succ', mul_eq_mul, mul_eq_mul]
#align matrix.zpow_add_one Matrix.zpow_add_one
-/
@@ -236,7 +236,7 @@ theorem zpow_add_of_nonneg {A : M} {m n : ℤ} (hm : 0 ≤ m) (hn : 0 ≤ n) :
by
obtain ⟨k, rfl⟩ := eq_coe_of_zero_le hm
obtain ⟨l, rfl⟩ := eq_coe_of_zero_le hn
- rw [← Int.ofNat_add, zpow_coe_nat, zpow_coe_nat, zpow_coe_nat, pow_add]
+ rw [← Int.ofNat_add, zpow_natCast, zpow_natCast, zpow_natCast, pow_add]
#align matrix.zpow_add_of_nonneg Matrix.zpow_add_of_nonneg
-/
@@ -319,7 +319,7 @@ theorem zpow_bit0 (A : M) (n : ℤ) : A ^ bit0 n = A ^ n * A ^ n :=
#print Matrix.zpow_add_one_of_ne_neg_one /-
theorem zpow_add_one_of_ne_neg_one {A : M} : ∀ n : ℤ, n ≠ -1 → A ^ (n + 1) = A ^ n * A
- | (n : ℕ), _ => by simp only [pow_succ', ← Nat.cast_succ, zpow_coe_nat]
+ | (n : ℕ), _ => by simp only [pow_succ, ← Nat.cast_succ, zpow_natCast]
| -1, h => absurd rfl h
| -((n : ℕ) + 2), _ =>
by
@@ -341,16 +341,16 @@ theorem zpow_bit1 (A : M) (n : ℤ) : A ^ bit1 n = A ^ n * A ^ n * A :=
#print Matrix.zpow_mul /-
theorem zpow_mul (A : M) (h : IsUnit A.det) : ∀ m n : ℤ, A ^ (m * n) = (A ^ m) ^ n
- | (m : ℕ), (n : ℕ) => by rw [zpow_coe_nat, zpow_coe_nat, ← pow_mul, ← zpow_coe_nat, Int.ofNat_mul]
+ | (m : ℕ), (n : ℕ) => by rw [zpow_natCast, zpow_natCast, ← pow_mul, ← zpow_natCast, Int.ofNat_mul]
| (m : ℕ), -[n+1] => by
- rw [zpow_coe_nat, zpow_negSucc, ← pow_mul, coe_nat_mul_neg_succ, ← Int.ofNat_mul,
+ rw [zpow_natCast, zpow_negSucc, ← pow_mul, coe_nat_mul_neg_succ, ← Int.ofNat_mul,
zpow_neg_coe_nat]
| -[m+1], (n : ℕ) => by
- rw [zpow_coe_nat, zpow_negSucc, ← inv_pow', ← pow_mul, neg_succ_mul_coe_nat, ← Int.ofNat_mul,
+ rw [zpow_natCast, zpow_negSucc, ← inv_pow', ← pow_mul, neg_succ_mul_coe_nat, ← Int.ofNat_mul,
zpow_neg_coe_nat, inv_pow']
| -[m+1], -[n+1] =>
by
- rw [zpow_negSucc, zpow_negSucc, neg_succ_mul_neg_succ, ← Int.ofNat_mul, zpow_coe_nat, inv_pow',
+ rw [zpow_negSucc, zpow_negSucc, neg_succ_mul_neg_succ, ← Int.ofNat_mul, zpow_natCast, inv_pow',
← pow_mul, nonsing_inv_nonsing_inv]
rw [det_pow]
exact h.pow _
@@ -366,7 +366,7 @@ theorem zpow_mul' (A : M) (h : IsUnit A.det) (m n : ℤ) : A ^ (m * n) = (A ^ n)
#print Matrix.coe_units_zpow /-
@[simp, norm_cast]
theorem coe_units_zpow (u : Mˣ) : ∀ n : ℤ, ((u ^ n : Mˣ) : M) = u ^ n
- | (n : ℕ) => by rw [_root_.zpow_coe_nat, zpow_coe_nat, Units.val_pow_eq_pow_val]
+ | (n : ℕ) => by rw [_root_.zpow_coe_nat, zpow_natCast, Units.val_pow_eq_pow_val]
| -[k+1] => by
rw [zpow_negSucc, zpow_negSucc, ← inv_pow, u⁻¹.val_pow_eq_pow_val, ← inv_pow', coe_units_inv]
#align matrix.coe_units_zpow Matrix.coe_units_zpow
@@ -428,7 +428,7 @@ theorem one_div_zpow {A : M} (n : ℤ) : (1 / A) ^ n = 1 / A ^ n := by simp only
#print Matrix.transpose_zpow /-
@[simp]
theorem transpose_zpow (A : M) : ∀ n : ℤ, (A ^ n)ᵀ = Aᵀ ^ n
- | (n : ℕ) => by rw [zpow_coe_nat, zpow_coe_nat, transpose_pow]
+ | (n : ℕ) => by rw [zpow_natCast, zpow_natCast, transpose_pow]
| -[n+1] => by rw [zpow_negSucc, zpow_negSucc, transpose_nonsing_inv, transpose_pow]
#align matrix.transpose_zpow Matrix.transpose_zpow
-/
@@ -436,7 +436,7 @@ theorem transpose_zpow (A : M) : ∀ n : ℤ, (A ^ n)ᵀ = Aᵀ ^ n
#print Matrix.conjTranspose_zpow /-
@[simp]
theorem conjTranspose_zpow [StarRing R] (A : M) : ∀ n : ℤ, (A ^ n)ᴴ = Aᴴ ^ n
- | (n : ℕ) => by rw [zpow_coe_nat, zpow_coe_nat, conj_transpose_pow]
+ | (n : ℕ) => by rw [zpow_natCast, zpow_natCast, conj_transpose_pow]
| -[n+1] => by rw [zpow_negSucc, zpow_negSucc, conj_transpose_nonsing_inv, conj_transpose_pow]
#align matrix.conj_transpose_zpow Matrix.conjTranspose_zpow
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -90,7 +90,7 @@ open Int
#print Matrix.one_zpow /-
@[simp]
theorem one_zpow : ∀ n : ℤ, (1 : M) ^ n = 1
- | (n : ℕ) => by rw [zpow_ofNat, one_pow]
+ | (n : ℕ) => by rw [zpow_coe_nat, one_pow]
| -[n+1] => by rw [zpow_negSucc, one_pow, inv_one]
#align matrix.one_zpow Matrix.one_zpow
-/
@@ -98,7 +98,7 @@ theorem one_zpow : ∀ n : ℤ, (1 : M) ^ n = 1
#print Matrix.zero_zpow /-
theorem zero_zpow : ∀ z : ℤ, z ≠ 0 → (0 : M) ^ z = 0
| (n : ℕ), h => by
- rw [zpow_ofNat, zero_pow]; refine' lt_of_le_of_ne n.zero_le (Ne.symm _)
+ rw [zpow_coe_nat, zero_pow]; refine' lt_of_le_of_ne n.zero_le (Ne.symm _)
simpa using h
| -[n+1], h => by simp [zero_pow n.zero_lt_succ]
#align matrix.zero_zpow Matrix.zero_zpow
@@ -115,7 +115,7 @@ theorem zero_zpow_eq (n : ℤ) : (0 : M) ^ n = if n = 0 then 1 else 0 :=
#print Matrix.inv_zpow /-
theorem inv_zpow (A : M) : ∀ n : ℤ, A⁻¹ ^ n = (A ^ n)⁻¹
- | (n : ℕ) => by rw [zpow_ofNat, zpow_ofNat, inv_pow']
+ | (n : ℕ) => by rw [zpow_coe_nat, zpow_coe_nat, inv_pow']
| -[n+1] => by rw [zpow_negSucc, zpow_negSucc, inv_pow']
#align matrix.inv_zpow Matrix.inv_zpow
-/
@@ -131,7 +131,7 @@ theorem zpow_neg_one (A : M) : A ^ (-1 : ℤ) = A⁻¹ :=
#print Matrix.zpow_coe_nat /-
theorem zpow_coe_nat (A : M) (n : ℕ) : A ^ (n : ℤ) = A ^ n :=
- zpow_ofNat _ _
+ zpow_coe_nat _ _
#align matrix.zpow_coe_nat Matrix.zpow_coe_nat
-/
@@ -159,7 +159,8 @@ theorem isUnit_det_zpow_iff {A : M} {z : ℤ} : IsUnit (A ^ z).det ↔ IsUnit A.
by
induction' z using Int.induction_on with z IH z IH
· simp
- · rw [← Int.ofNat_succ, zpow_ofNat, det_pow, isUnit_pow_succ_iff, ← Int.ofNat_zero, Int.ofNat_inj]
+ · rw [← Int.ofNat_succ, zpow_coe_nat, det_pow, isUnit_pow_succ_iff, ← Int.ofNat_zero,
+ Int.ofNat_inj]
simp
· rw [← neg_add', ← Int.ofNat_succ, zpow_neg_coe_nat, is_unit_nonsing_inv_det_iff, det_pow,
isUnit_pow_succ_iff, neg_eq_zero, ← Int.ofNat_zero, Int.ofNat_inj]
@@ -172,7 +173,7 @@ theorem zpow_neg {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (-n) = (A ^ n)⁻
| (n : ℕ) => zpow_neg_coe_nat _ _
| -[n+1] =>
by
- rw [zpow_negSucc, neg_neg_of_nat_succ, of_nat_eq_coe, zpow_ofNat, nonsing_inv_nonsing_inv]
+ rw [zpow_negSucc, neg_neg_of_nat_succ, of_nat_eq_coe, zpow_coe_nat, nonsing_inv_nonsing_inv]
rw [det_pow]
exact h.pow _
#align matrix.zpow_neg Matrix.zpow_neg
@@ -186,15 +187,15 @@ theorem inv_zpow' {A : M} (h : IsUnit A.det) (n : ℤ) : A⁻¹ ^ n = A ^ (-n) :
#print Matrix.zpow_add_one /-
theorem zpow_add_one {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (n + 1) = A ^ n * A
- | (n : ℕ) => by simp only [← Nat.cast_succ, pow_succ', zpow_ofNat]
+ | (n : ℕ) => by simp only [← Nat.cast_succ, pow_succ', zpow_coe_nat]
| -((n : ℕ) + 1) =>
calc
A ^ (-(n + 1) + 1 : ℤ) = (A ^ n)⁻¹ := by
- rw [neg_add, neg_add_cancel_right, zpow_neg h, zpow_ofNat]
+ rw [neg_add, neg_add_cancel_right, zpow_neg h, zpow_coe_nat]
_ = (A ⬝ A ^ n)⁻¹ ⬝ A := by
rw [mul_inv_rev, Matrix.mul_assoc, nonsing_inv_mul _ h, Matrix.mul_one]
_ = A ^ (-(n + 1 : ℤ)) * A := by
- rw [zpow_neg h, ← Int.ofNat_succ, zpow_ofNat, pow_succ, mul_eq_mul, mul_eq_mul]
+ rw [zpow_neg h, ← Int.ofNat_succ, zpow_coe_nat, pow_succ, mul_eq_mul, mul_eq_mul]
#align matrix.zpow_add_one Matrix.zpow_add_one
-/
@@ -235,7 +236,7 @@ theorem zpow_add_of_nonneg {A : M} {m n : ℤ} (hm : 0 ≤ m) (hn : 0 ≤ n) :
by
obtain ⟨k, rfl⟩ := eq_coe_of_zero_le hm
obtain ⟨l, rfl⟩ := eq_coe_of_zero_le hn
- rw [← Int.ofNat_add, zpow_ofNat, zpow_ofNat, zpow_ofNat, pow_add]
+ rw [← Int.ofNat_add, zpow_coe_nat, zpow_coe_nat, zpow_coe_nat, pow_add]
#align matrix.zpow_add_of_nonneg Matrix.zpow_add_of_nonneg
-/
@@ -318,7 +319,7 @@ theorem zpow_bit0 (A : M) (n : ℤ) : A ^ bit0 n = A ^ n * A ^ n :=
#print Matrix.zpow_add_one_of_ne_neg_one /-
theorem zpow_add_one_of_ne_neg_one {A : M} : ∀ n : ℤ, n ≠ -1 → A ^ (n + 1) = A ^ n * A
- | (n : ℕ), _ => by simp only [pow_succ', ← Nat.cast_succ, zpow_ofNat]
+ | (n : ℕ), _ => by simp only [pow_succ', ← Nat.cast_succ, zpow_coe_nat]
| -1, h => absurd rfl h
| -((n : ℕ) + 2), _ =>
by
@@ -340,17 +341,17 @@ theorem zpow_bit1 (A : M) (n : ℤ) : A ^ bit1 n = A ^ n * A ^ n * A :=
#print Matrix.zpow_mul /-
theorem zpow_mul (A : M) (h : IsUnit A.det) : ∀ m n : ℤ, A ^ (m * n) = (A ^ m) ^ n
- | (m : ℕ), (n : ℕ) => by rw [zpow_ofNat, zpow_ofNat, ← pow_mul, ← zpow_ofNat, Int.ofNat_mul]
+ | (m : ℕ), (n : ℕ) => by rw [zpow_coe_nat, zpow_coe_nat, ← pow_mul, ← zpow_coe_nat, Int.ofNat_mul]
| (m : ℕ), -[n+1] => by
- rw [zpow_ofNat, zpow_negSucc, ← pow_mul, coe_nat_mul_neg_succ, ← Int.ofNat_mul,
+ rw [zpow_coe_nat, zpow_negSucc, ← pow_mul, coe_nat_mul_neg_succ, ← Int.ofNat_mul,
zpow_neg_coe_nat]
| -[m+1], (n : ℕ) => by
- rw [zpow_ofNat, zpow_negSucc, ← inv_pow', ← pow_mul, neg_succ_mul_coe_nat, ← Int.ofNat_mul,
+ rw [zpow_coe_nat, zpow_negSucc, ← inv_pow', ← pow_mul, neg_succ_mul_coe_nat, ← Int.ofNat_mul,
zpow_neg_coe_nat, inv_pow']
| -[m+1], -[n+1] =>
by
- rw [zpow_negSucc, zpow_negSucc, neg_succ_mul_neg_succ, ← Int.ofNat_mul, zpow_ofNat, inv_pow', ←
- pow_mul, nonsing_inv_nonsing_inv]
+ rw [zpow_negSucc, zpow_negSucc, neg_succ_mul_neg_succ, ← Int.ofNat_mul, zpow_coe_nat, inv_pow',
+ ← pow_mul, nonsing_inv_nonsing_inv]
rw [det_pow]
exact h.pow _
#align matrix.zpow_mul Matrix.zpow_mul
@@ -365,7 +366,7 @@ theorem zpow_mul' (A : M) (h : IsUnit A.det) (m n : ℤ) : A ^ (m * n) = (A ^ n)
#print Matrix.coe_units_zpow /-
@[simp, norm_cast]
theorem coe_units_zpow (u : Mˣ) : ∀ n : ℤ, ((u ^ n : Mˣ) : M) = u ^ n
- | (n : ℕ) => by rw [_root_.zpow_coe_nat, zpow_ofNat, Units.val_pow_eq_pow_val]
+ | (n : ℕ) => by rw [_root_.zpow_coe_nat, zpow_coe_nat, Units.val_pow_eq_pow_val]
| -[k+1] => by
rw [zpow_negSucc, zpow_negSucc, ← inv_pow, u⁻¹.val_pow_eq_pow_val, ← inv_pow', coe_units_inv]
#align matrix.coe_units_zpow Matrix.coe_units_zpow
@@ -427,7 +428,7 @@ theorem one_div_zpow {A : M} (n : ℤ) : (1 / A) ^ n = 1 / A ^ n := by simp only
#print Matrix.transpose_zpow /-
@[simp]
theorem transpose_zpow (A : M) : ∀ n : ℤ, (A ^ n)ᵀ = Aᵀ ^ n
- | (n : ℕ) => by rw [zpow_ofNat, zpow_ofNat, transpose_pow]
+ | (n : ℕ) => by rw [zpow_coe_nat, zpow_coe_nat, transpose_pow]
| -[n+1] => by rw [zpow_negSucc, zpow_negSucc, transpose_nonsing_inv, transpose_pow]
#align matrix.transpose_zpow Matrix.transpose_zpow
-/
@@ -435,7 +436,7 @@ theorem transpose_zpow (A : M) : ∀ n : ℤ, (A ^ n)ᵀ = Aᵀ ^ n
#print Matrix.conjTranspose_zpow /-
@[simp]
theorem conjTranspose_zpow [StarRing R] (A : M) : ∀ n : ℤ, (A ^ n)ᴴ = Aᴴ ^ n
- | (n : ℕ) => by rw [zpow_ofNat, zpow_ofNat, conj_transpose_pow]
+ | (n : ℕ) => by rw [zpow_coe_nat, zpow_coe_nat, conj_transpose_pow]
| -[n+1] => by rw [zpow_negSucc, zpow_negSucc, conj_transpose_nonsing_inv, conj_transpose_pow]
#align matrix.conj_transpose_zpow Matrix.conjTranspose_zpow
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,7 +3,7 @@ Copyright (c) 2021 Yakov Pechersky. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yakov Pechersky
-/
-import Mathbin.LinearAlgebra.Matrix.NonsingularInverse
+import LinearAlgebra.Matrix.NonsingularInverse
#align_import linear_algebra.matrix.zpow from "leanprover-community/mathlib"@"f2b757fc5c341d88741b9c4630b1e8ba973c5726"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,14 +2,11 @@
Copyright (c) 2021 Yakov Pechersky. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yakov Pechersky
-
-! This file was ported from Lean 3 source module linear_algebra.matrix.zpow
-! leanprover-community/mathlib commit f2b757fc5c341d88741b9c4630b1e8ba973c5726
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.LinearAlgebra.Matrix.NonsingularInverse
+#align_import linear_algebra.matrix.zpow from "leanprover-community/mathlib"@"f2b757fc5c341d88741b9c4630b1e8ba973c5726"
+
/-!
# Integer powers of square matrices
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -37,7 +37,6 @@ namespace Matrix
variable {n' : Type _} [DecidableEq n'] [Fintype n'] {R : Type _} [CommRing R]
--- mathport name: exprM
local notation "M" => Matrix n' n' R
noncomputable instance : DivInvMonoid M :=
@@ -45,6 +44,7 @@ noncomputable instance : DivInvMonoid M :=
section NatPow
+#print Matrix.inv_pow' /-
@[simp]
theorem inv_pow' (A : M) (n : ℕ) : A⁻¹ ^ n = (A ^ n)⁻¹ :=
by
@@ -52,7 +52,9 @@ theorem inv_pow' (A : M) (n : ℕ) : A⁻¹ ^ n = (A ^ n)⁻¹ :=
· simp
· rw [pow_succ A, mul_eq_mul, mul_inv_rev, ← ih, ← mul_eq_mul, ← pow_succ']
#align matrix.inv_pow' Matrix.inv_pow'
+-/
+#print Matrix.pow_sub' /-
theorem pow_sub' (A : M) {m n : ℕ} (ha : IsUnit A.det) (h : n ≤ m) :
A ^ (m - n) = A ^ m ⬝ (A ^ n)⁻¹ :=
by
@@ -60,7 +62,9 @@ theorem pow_sub' (A : M) {m n : ℕ} (ha : IsUnit A.det) (h : n ≤ m) :
tsub_add_cancel_of_le h, Matrix.mul_one]
simpa using ha.pow n
#align matrix.pow_sub' Matrix.pow_sub'
+-/
+#print Matrix.pow_inv_comm' /-
theorem pow_inv_comm' (A : M) (m n : ℕ) : A⁻¹ ^ m ⬝ A ^ n = A ^ n ⬝ A⁻¹ ^ m :=
by
induction' n with n IH generalizing m
@@ -78,6 +82,7 @@ theorem pow_inv_comm' (A : M) (m n : ℕ) : A⁻¹ ^ m ⬝ A ^ n = A ^ n ⬝ A
simp only [pow_succ' A, pow_succ A⁻¹, mul_eq_mul, Matrix.mul_assoc]
· simp [h]
#align matrix.pow_inv_comm' Matrix.pow_inv_comm'
+-/
end NatPow
@@ -85,42 +90,55 @@ section Zpow
open Int
+#print Matrix.one_zpow /-
@[simp]
theorem one_zpow : ∀ n : ℤ, (1 : M) ^ n = 1
| (n : ℕ) => by rw [zpow_ofNat, one_pow]
| -[n+1] => by rw [zpow_negSucc, one_pow, inv_one]
#align matrix.one_zpow Matrix.one_zpow
+-/
+#print Matrix.zero_zpow /-
theorem zero_zpow : ∀ z : ℤ, z ≠ 0 → (0 : M) ^ z = 0
| (n : ℕ), h => by
rw [zpow_ofNat, zero_pow]; refine' lt_of_le_of_ne n.zero_le (Ne.symm _)
simpa using h
| -[n+1], h => by simp [zero_pow n.zero_lt_succ]
#align matrix.zero_zpow Matrix.zero_zpow
+-/
+#print Matrix.zero_zpow_eq /-
theorem zero_zpow_eq (n : ℤ) : (0 : M) ^ n = if n = 0 then 1 else 0 :=
by
split_ifs with h
· rw [h, zpow_zero]
· rw [zero_zpow _ h]
#align matrix.zero_zpow_eq Matrix.zero_zpow_eq
+-/
+#print Matrix.inv_zpow /-
theorem inv_zpow (A : M) : ∀ n : ℤ, A⁻¹ ^ n = (A ^ n)⁻¹
| (n : ℕ) => by rw [zpow_ofNat, zpow_ofNat, inv_pow']
| -[n+1] => by rw [zpow_negSucc, zpow_negSucc, inv_pow']
#align matrix.inv_zpow Matrix.inv_zpow
+-/
+#print Matrix.zpow_neg_one /-
@[simp]
theorem zpow_neg_one (A : M) : A ^ (-1 : ℤ) = A⁻¹ :=
by
convert DivInvMonoid.zpow_neg' 0 A
simp only [zpow_one, Int.ofNat_zero, Int.ofNat_succ, zpow_eq_pow, zero_add]
#align matrix.zpow_neg_one Matrix.zpow_neg_one
+-/
+#print Matrix.zpow_coe_nat /-
theorem zpow_coe_nat (A : M) (n : ℕ) : A ^ (n : ℤ) = A ^ n :=
zpow_ofNat _ _
#align matrix.zpow_coe_nat Matrix.zpow_coe_nat
+-/
+#print Matrix.zpow_neg_coe_nat /-
@[simp]
theorem zpow_neg_coe_nat (A : M) (n : ℕ) : A ^ (-n : ℤ) = (A ^ n)⁻¹ :=
by
@@ -128,14 +146,18 @@ theorem zpow_neg_coe_nat (A : M) (n : ℕ) : A ^ (-n : ℤ) = (A ^ n)⁻¹ :=
· simp
· exact DivInvMonoid.zpow_neg' _ _
#align matrix.zpow_neg_coe_nat Matrix.zpow_neg_coe_nat
+-/
+#print IsUnit.det_zpow /-
theorem IsUnit.det_zpow {A : M} (h : IsUnit A.det) (n : ℤ) : IsUnit (A ^ n).det :=
by
cases n
· simpa using h.pow n
· simpa using h.pow n.succ
#align is_unit.det_zpow IsUnit.det_zpow
+-/
+#print Matrix.isUnit_det_zpow_iff /-
theorem isUnit_det_zpow_iff {A : M} {z : ℤ} : IsUnit (A ^ z).det ↔ IsUnit A.det ∨ z = 0 :=
by
induction' z using Int.induction_on with z IH z IH
@@ -146,7 +168,9 @@ theorem isUnit_det_zpow_iff {A : M} {z : ℤ} : IsUnit (A ^ z).det ↔ IsUnit A.
isUnit_pow_succ_iff, neg_eq_zero, ← Int.ofNat_zero, Int.ofNat_inj]
simp
#align matrix.is_unit_det_zpow_iff Matrix.isUnit_det_zpow_iff
+-/
+#print Matrix.zpow_neg /-
theorem zpow_neg {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (-n) = (A ^ n)⁻¹
| (n : ℕ) => zpow_neg_coe_nat _ _
| -[n+1] =>
@@ -155,11 +179,15 @@ theorem zpow_neg {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (-n) = (A ^ n)⁻
rw [det_pow]
exact h.pow _
#align matrix.zpow_neg Matrix.zpow_neg
+-/
+#print Matrix.inv_zpow' /-
theorem inv_zpow' {A : M} (h : IsUnit A.det) (n : ℤ) : A⁻¹ ^ n = A ^ (-n) := by
rw [zpow_neg h, inv_zpow]
#align matrix.inv_zpow' Matrix.inv_zpow'
+-/
+#print Matrix.zpow_add_one /-
theorem zpow_add_one {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (n + 1) = A ^ n * A
| (n : ℕ) => by simp only [← Nat.cast_succ, pow_succ', zpow_ofNat]
| -((n : ℕ) + 1) =>
@@ -171,14 +199,18 @@ theorem zpow_add_one {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (n + 1) = A ^
_ = A ^ (-(n + 1 : ℤ)) * A := by
rw [zpow_neg h, ← Int.ofNat_succ, zpow_ofNat, pow_succ, mul_eq_mul, mul_eq_mul]
#align matrix.zpow_add_one Matrix.zpow_add_one
+-/
+#print Matrix.zpow_sub_one /-
theorem zpow_sub_one {A : M} (h : IsUnit A.det) (n : ℤ) : A ^ (n - 1) = A ^ n * A⁻¹ :=
calc
A ^ (n - 1) = A ^ (n - 1) * A * A⁻¹ := by
rw [mul_assoc, mul_eq_mul A, mul_nonsing_inv _ h, mul_one]
_ = A ^ n * A⁻¹ := by rw [← zpow_add_one h, sub_add_cancel]
#align matrix.zpow_sub_one Matrix.zpow_sub_one
+-/
+#print Matrix.zpow_add /-
theorem zpow_add {A : M} (ha : IsUnit A.det) (m n : ℤ) : A ^ (m + n) = A ^ m * A ^ n :=
by
induction' n using Int.induction_on with n ihn n ihn
@@ -186,7 +218,9 @@ theorem zpow_add {A : M} (ha : IsUnit A.det) (m n : ℤ) : A ^ (m + n) = A ^ m *
· simp only [← add_assoc, zpow_add_one ha, ihn, mul_assoc]
· rw [zpow_sub_one ha, ← mul_assoc, ← ihn, ← zpow_sub_one ha, add_sub_assoc]
#align matrix.zpow_add Matrix.zpow_add
+-/
+#print Matrix.zpow_add_of_nonpos /-
theorem zpow_add_of_nonpos {A : M} {m n : ℤ} (hm : m ≤ 0) (hn : n ≤ 0) :
A ^ (m + n) = A ^ m * A ^ n :=
by
@@ -196,7 +230,9 @@ theorem zpow_add_of_nonpos {A : M} {m n : ℤ} (hm : m ≤ 0) (hn : n ≤ 0) :
obtain ⟨l, rfl⟩ := exists_eq_neg_of_nat hn
simp_rw [← neg_add, ← Int.ofNat_add, zpow_neg_coe_nat, ← inv_pow', h, pow_add]
#align matrix.zpow_add_of_nonpos Matrix.zpow_add_of_nonpos
+-/
+#print Matrix.zpow_add_of_nonneg /-
theorem zpow_add_of_nonneg {A : M} {m n : ℤ} (hm : 0 ≤ m) (hn : 0 ≤ n) :
A ^ (m + n) = A ^ m * A ^ n :=
by
@@ -204,11 +240,15 @@ theorem zpow_add_of_nonneg {A : M} {m n : ℤ} (hm : 0 ≤ m) (hn : 0 ≤ n) :
obtain ⟨l, rfl⟩ := eq_coe_of_zero_le hn
rw [← Int.ofNat_add, zpow_ofNat, zpow_ofNat, zpow_ofNat, pow_add]
#align matrix.zpow_add_of_nonneg Matrix.zpow_add_of_nonneg
+-/
+#print Matrix.zpow_one_add /-
theorem zpow_one_add {A : M} (h : IsUnit A.det) (i : ℤ) : A ^ (1 + i) = A * A ^ i := by
rw [zpow_add h, zpow_one]
#align matrix.zpow_one_add Matrix.zpow_one_add
+-/
+#print Matrix.SemiconjBy.zpow_right /-
theorem SemiconjBy.zpow_right {A X Y : M} (hx : IsUnit X.det) (hy : IsUnit Y.det)
(h : SemiconjBy A X Y) : ∀ m : ℤ, SemiconjBy A (X ^ m) (Y ^ m)
| (n : ℕ) => by simp [h.pow_right n]
@@ -227,7 +267,9 @@ theorem SemiconjBy.zpow_right {A X Y : M} (hx : IsUnit X.det) (hy : IsUnit Y.det
mul_smul (Y ^ _) (↑hy'.unit⁻¹ : R), mul_adjugate, smul_smul, smul_smul, hx'.coe_inv_mul,
hy'.coe_inv_mul, one_smul, Matrix.mul_one, Matrix.one_mul]
#align matrix.semiconj_by.zpow_right Matrix.SemiconjBy.zpow_right
+-/
+#print Matrix.Commute.zpow_right /-
theorem Commute.zpow_right {A B : M} (h : Commute A B) (m : ℤ) : Commute A (B ^ m) :=
by
rcases nonsing_inv_cancel_or_zero B with (⟨hB, hB'⟩ | hB)
@@ -236,34 +278,48 @@ theorem Commute.zpow_right {A B : M} (h : Commute A B) (m : ℤ) : Commute A (B
· simpa using h.pow_right _
· simp [← inv_pow', hB]
#align matrix.commute.zpow_right Matrix.Commute.zpow_right
+-/
+#print Matrix.Commute.zpow_left /-
theorem Commute.zpow_left {A B : M} (h : Commute A B) (m : ℤ) : Commute (A ^ m) B :=
(Commute.zpow_right h.symm m).symm
#align matrix.commute.zpow_left Matrix.Commute.zpow_left
+-/
+#print Matrix.Commute.zpow_zpow /-
theorem Commute.zpow_zpow {A B : M} (h : Commute A B) (m n : ℤ) : Commute (A ^ m) (B ^ n) :=
Commute.zpow_right (Commute.zpow_left h _) _
#align matrix.commute.zpow_zpow Matrix.Commute.zpow_zpow
+-/
+#print Matrix.Commute.zpow_self /-
theorem Commute.zpow_self (A : M) (n : ℤ) : Commute (A ^ n) A :=
Commute.zpow_left (Commute.refl A) _
#align matrix.commute.zpow_self Matrix.Commute.zpow_self
+-/
+#print Matrix.Commute.self_zpow /-
theorem Commute.self_zpow (A : M) (n : ℤ) : Commute A (A ^ n) :=
Commute.zpow_right (Commute.refl A) _
#align matrix.commute.self_zpow Matrix.Commute.self_zpow
+-/
+#print Matrix.Commute.zpow_zpow_self /-
theorem Commute.zpow_zpow_self (A : M) (m n : ℤ) : Commute (A ^ m) (A ^ n) :=
Commute.zpow_zpow (Commute.refl A) _ _
#align matrix.commute.zpow_zpow_self Matrix.Commute.zpow_zpow_self
+-/
+#print Matrix.zpow_bit0 /-
theorem zpow_bit0 (A : M) (n : ℤ) : A ^ bit0 n = A ^ n * A ^ n :=
by
cases' le_total 0 n with nonneg nonpos
· exact zpow_add_of_nonneg nonneg nonneg
· exact zpow_add_of_nonpos nonpos nonpos
#align matrix.zpow_bit0 Matrix.zpow_bit0
+-/
+#print Matrix.zpow_add_one_of_ne_neg_one /-
theorem zpow_add_one_of_ne_neg_one {A : M} : ∀ n : ℤ, n ≠ -1 → A ^ (n + 1) = A ^ n * A
| (n : ℕ), _ => by simp only [pow_succ', ← Nat.cast_succ, zpow_ofNat]
| -1, h => absurd rfl h
@@ -274,14 +330,18 @@ theorem zpow_add_one_of_ne_neg_one {A : M} : ∀ n : ℤ, n ≠ -1 → A ^ (n +
· show A ^ (-((n + 1 : ℕ) : ℤ)) = A ^ (-((n + 2 : ℕ) : ℤ)) * A
simp_rw [zpow_neg_coe_nat, ← inv_pow', h, zero_pow Nat.succ_pos', MulZeroClass.zero_mul]
#align matrix.zpow_add_one_of_ne_neg_one Matrix.zpow_add_one_of_ne_neg_one
+-/
+#print Matrix.zpow_bit1 /-
theorem zpow_bit1 (A : M) (n : ℤ) : A ^ bit1 n = A ^ n * A ^ n * A :=
by
rw [bit1, zpow_add_one_of_ne_neg_one, zpow_bit0]
intro h
simpa using congr_arg bodd h
#align matrix.zpow_bit1 Matrix.zpow_bit1
+-/
+#print Matrix.zpow_mul /-
theorem zpow_mul (A : M) (h : IsUnit A.det) : ∀ m n : ℤ, A ^ (m * n) = (A ^ m) ^ n
| (m : ℕ), (n : ℕ) => by rw [zpow_ofNat, zpow_ofNat, ← pow_mul, ← zpow_ofNat, Int.ofNat_mul]
| (m : ℕ), -[n+1] => by
@@ -297,18 +357,24 @@ theorem zpow_mul (A : M) (h : IsUnit A.det) : ∀ m n : ℤ, A ^ (m * n) = (A ^
rw [det_pow]
exact h.pow _
#align matrix.zpow_mul Matrix.zpow_mul
+-/
+#print Matrix.zpow_mul' /-
theorem zpow_mul' (A : M) (h : IsUnit A.det) (m n : ℤ) : A ^ (m * n) = (A ^ n) ^ m := by
rw [mul_comm, zpow_mul _ h]
#align matrix.zpow_mul' Matrix.zpow_mul'
+-/
+#print Matrix.coe_units_zpow /-
@[simp, norm_cast]
theorem coe_units_zpow (u : Mˣ) : ∀ n : ℤ, ((u ^ n : Mˣ) : M) = u ^ n
| (n : ℕ) => by rw [_root_.zpow_coe_nat, zpow_ofNat, Units.val_pow_eq_pow_val]
| -[k+1] => by
rw [zpow_negSucc, zpow_negSucc, ← inv_pow, u⁻¹.val_pow_eq_pow_val, ← inv_pow', coe_units_inv]
#align matrix.coe_units_zpow Matrix.coe_units_zpow
+-/
+#print Matrix.zpow_ne_zero_of_isUnit_det /-
theorem zpow_ne_zero_of_isUnit_det [Nonempty n'] [Nontrivial R] {A : M} (ha : IsUnit A.det)
(z : ℤ) : A ^ z ≠ 0 := by
have := ha.det_zpow z
@@ -316,47 +382,66 @@ theorem zpow_ne_zero_of_isUnit_det [Nonempty n'] [Nontrivial R] {A : M} (ha : Is
rw [this, det_zero ‹_›]
exact not_isUnit_zero
#align matrix.zpow_ne_zero_of_is_unit_det Matrix.zpow_ne_zero_of_isUnit_det
+-/
+#print Matrix.zpow_sub /-
theorem zpow_sub {A : M} (ha : IsUnit A.det) (z1 z2 : ℤ) : A ^ (z1 - z2) = A ^ z1 / A ^ z2 := by
rw [sub_eq_add_neg, zpow_add ha, zpow_neg ha, div_eq_mul_inv]
#align matrix.zpow_sub Matrix.zpow_sub
+-/
+#print Matrix.Commute.mul_zpow /-
theorem Commute.mul_zpow {A B : M} (h : Commute A B) : ∀ i : ℤ, (A * B) ^ i = A ^ i * B ^ i
| (n : ℕ) => by simp [h.mul_pow n, -mul_eq_mul]
| -[n+1] => by
rw [zpow_negSucc, zpow_negSucc, zpow_negSucc, mul_eq_mul _⁻¹, ← mul_inv_rev, ← mul_eq_mul,
h.mul_pow n.succ, (h.pow_pow _ _).Eq]
#align matrix.commute.mul_zpow Matrix.Commute.mul_zpow
+-/
+#print Matrix.zpow_bit0' /-
theorem zpow_bit0' (A : M) (n : ℤ) : A ^ bit0 n = (A * A) ^ n :=
(zpow_bit0 A n).trans (Commute.mul_zpow (Commute.refl A) n).symm
#align matrix.zpow_bit0' Matrix.zpow_bit0'
+-/
+#print Matrix.zpow_bit1' /-
theorem zpow_bit1' (A : M) (n : ℤ) : A ^ bit1 n = (A * A) ^ n * A := by
rw [zpow_bit1, Commute.mul_zpow (Commute.refl A)]
#align matrix.zpow_bit1' Matrix.zpow_bit1'
+-/
+#print Matrix.zpow_neg_mul_zpow_self /-
theorem zpow_neg_mul_zpow_self (n : ℤ) {A : M} (h : IsUnit A.det) : A ^ (-n) * A ^ n = 1 := by
rw [zpow_neg h, mul_eq_mul, nonsing_inv_mul _ (h.det_zpow _)]
#align matrix.zpow_neg_mul_zpow_self Matrix.zpow_neg_mul_zpow_self
+-/
+#print Matrix.one_div_pow /-
theorem one_div_pow {A : M} (n : ℕ) : (1 / A) ^ n = 1 / A ^ n := by simp only [one_div, inv_pow']
#align matrix.one_div_pow Matrix.one_div_pow
+-/
+#print Matrix.one_div_zpow /-
theorem one_div_zpow {A : M} (n : ℤ) : (1 / A) ^ n = 1 / A ^ n := by simp only [one_div, inv_zpow]
#align matrix.one_div_zpow Matrix.one_div_zpow
+-/
+#print Matrix.transpose_zpow /-
@[simp]
theorem transpose_zpow (A : M) : ∀ n : ℤ, (A ^ n)ᵀ = Aᵀ ^ n
| (n : ℕ) => by rw [zpow_ofNat, zpow_ofNat, transpose_pow]
| -[n+1] => by rw [zpow_negSucc, zpow_negSucc, transpose_nonsing_inv, transpose_pow]
#align matrix.transpose_zpow Matrix.transpose_zpow
+-/
+#print Matrix.conjTranspose_zpow /-
@[simp]
theorem conjTranspose_zpow [StarRing R] (A : M) : ∀ n : ℤ, (A ^ n)ᴴ = Aᴴ ^ n
| (n : ℕ) => by rw [zpow_ofNat, zpow_ofNat, conj_transpose_pow]
| -[n+1] => by rw [zpow_negSucc, zpow_negSucc, conj_transpose_nonsing_inv, conj_transpose_pow]
#align matrix.conj_transpose_zpow Matrix.conjTranspose_zpow
+-/
end Zpow
mathlib commit https://github.com/leanprover-community/mathlib/commit/7e5137f579de09a059a5ce98f364a04e221aabf0
@@ -76,7 +76,6 @@ theorem pow_inv_comm' (A : M) (m n : ℕ) : A⁻¹ ^ m ⬝ A ^ n = A ^ n ⬝ A
_ = A ^ n ⬝ (A ⬝ A⁻¹) ⬝ A⁻¹ ^ m := by simp only [h', Matrix.mul_one, Matrix.one_mul]
_ = A ^ (n + 1) ⬝ A⁻¹ ^ (m + 1) := by
simp only [pow_succ' A, pow_succ A⁻¹, mul_eq_mul, Matrix.mul_assoc]
-
· simp [h]
#align matrix.pow_inv_comm' Matrix.pow_inv_comm'
@@ -171,7 +170,6 @@ theorem zpow_add_one {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (n + 1) = A ^
rw [mul_inv_rev, Matrix.mul_assoc, nonsing_inv_mul _ h, Matrix.mul_one]
_ = A ^ (-(n + 1 : ℤ)) * A := by
rw [zpow_neg h, ← Int.ofNat_succ, zpow_ofNat, pow_succ, mul_eq_mul, mul_eq_mul]
-
#align matrix.zpow_add_one Matrix.zpow_add_one
theorem zpow_sub_one {A : M} (h : IsUnit A.det) (n : ℤ) : A ^ (n - 1) = A ^ n * A⁻¹ :=
@@ -179,7 +177,6 @@ theorem zpow_sub_one {A : M} (h : IsUnit A.det) (n : ℤ) : A ^ (n - 1) = A ^ n
A ^ (n - 1) = A ^ (n - 1) * A * A⁻¹ := by
rw [mul_assoc, mul_eq_mul A, mul_nonsing_inv _ h, mul_one]
_ = A ^ n * A⁻¹ := by rw [← zpow_add_one h, sub_add_cancel]
-
#align matrix.zpow_sub_one Matrix.zpow_sub_one
theorem zpow_add {A : M} (ha : IsUnit A.det) (m n : ℤ) : A ^ (m + n) = A ^ m * A ^ n :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -31,7 +31,7 @@ matrix inverse, matrix powers
-/
-open Matrix
+open scoped Matrix
namespace Matrix
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -45,12 +45,6 @@ noncomputable instance : DivInvMonoid M :=
section NatPow
-/- warning: matrix.inv_pow' -> Matrix.inv_pow' is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (n : Nat), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) n) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) A n))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Nat), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) n) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A n))
-Case conversion may be inaccurate. Consider using '#align matrix.inv_pow' Matrix.inv_pow'ₓ'. -/
@[simp]
theorem inv_pow' (A : M) (n : ℕ) : A⁻¹ ^ n = (A ^ n)⁻¹ :=
by
@@ -59,12 +53,6 @@ theorem inv_pow' (A : M) (n : ℕ) : A⁻¹ ^ n = (A ^ n)⁻¹ :=
· rw [pow_succ A, mul_eq_mul, mul_inv_rev, ← ih, ← mul_eq_mul, ← pow_succ']
#align matrix.inv_pow' Matrix.inv_pow'
-/- warning: matrix.pow_sub' -> Matrix.pow_sub' is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) {m : Nat} {n : Nat}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (LE.le.{0} Nat Nat.hasLe n m) -> (Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) A (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) m n)) (Matrix.mul.{u2, u1, u1, u1} n' n' n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) A m) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) A n))))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) {m : Nat} {n : Nat}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (LE.le.{0} Nat instLENat n m) -> (Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) m n)) (Matrix.mul.{u1, u2, u2, u2} n' n' n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A m) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A n))))
-Case conversion may be inaccurate. Consider using '#align matrix.pow_sub' Matrix.pow_sub'ₓ'. -/
theorem pow_sub' (A : M) {m n : ℕ} (ha : IsUnit A.det) (h : n ≤ m) :
A ^ (m - n) = A ^ m ⬝ (A ^ n)⁻¹ :=
by
@@ -73,12 +61,6 @@ theorem pow_sub' (A : M) {m n : ℕ} (ha : IsUnit A.det) (h : n ≤ m) :
simpa using ha.pow n
#align matrix.pow_sub' Matrix.pow_sub'
-/- warning: matrix.pow_inv_comm' -> Matrix.pow_inv_comm' is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (m : Nat) (n : Nat), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (Matrix.mul.{u2, u1, u1, u1} n' n' n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) m) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) A n)) (Matrix.mul.{u2, u1, u1, u1} n' n' n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) A n) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) m))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (m : Nat) (n : Nat), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (Matrix.mul.{u1, u2, u2, u2} n' n' n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) m) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A n)) (Matrix.mul.{u1, u2, u2, u2} n' n' n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A n) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) m))
-Case conversion may be inaccurate. Consider using '#align matrix.pow_inv_comm' Matrix.pow_inv_comm'ₓ'. -/
theorem pow_inv_comm' (A : M) (m n : ℕ) : A⁻¹ ^ m ⬝ A ^ n = A ^ n ⬝ A⁻¹ ^ m :=
by
induction' n with n IH generalizing m
@@ -104,24 +86,12 @@ section Zpow
open Int
-/- warning: matrix.one_zpow -> Matrix.one_zpow is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (One.one.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasOne.{u2, u1} n' R (fun (a : n') (b : n') => _inst_1 a b) (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (AddMonoidWithOne.toOne.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (AddCommGroupWithOne.toAddGroupWithOne.{u2} R (Ring.toAddCommGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3))))))))) n) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (One.one.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasOne.{u2, u1} n' R (fun (a : n') (b : n') => _inst_1 a b) (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (AddMonoidWithOne.toOne.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (AddCommGroupWithOne.toAddGroupWithOne.{u2} R (Ring.toAddCommGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3)))))))))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (Semiring.toOne.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))) n) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (Semiring.toOne.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))))))
-Case conversion may be inaccurate. Consider using '#align matrix.one_zpow Matrix.one_zpowₓ'. -/
@[simp]
theorem one_zpow : ∀ n : ℤ, (1 : M) ^ n = 1
| (n : ℕ) => by rw [zpow_ofNat, one_pow]
| -[n+1] => by rw [zpow_negSucc, one_pow, inv_one]
#align matrix.one_zpow Matrix.one_zpow
-/- warning: matrix.zero_zpow -> Matrix.zero_zpow is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (z : Int), (Ne.{1} Int z (OfNat.ofNat.{0} Int 0 (OfNat.mk.{0} Int 0 (Zero.zero.{0} Int Int.hasZero)))) -> (Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 0 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 0 (Zero.zero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasZero.{u2, u1, u1} n' n' R (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))))))) z) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 0 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 0 (Zero.zero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasZero.{u2, u1, u1} n' n' R (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))))))))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (z : Int), (Ne.{1} Int z (OfNat.ofNat.{0} Int 0 (instOfNatInt 0))) -> (Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 0 (Zero.toOfNat0.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.zero.{u1, u2, u2} n' n' R (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))) z) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 0 (Zero.toOfNat0.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.zero.{u1, u2, u2} n' n' R (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))))
-Case conversion may be inaccurate. Consider using '#align matrix.zero_zpow Matrix.zero_zpowₓ'. -/
theorem zero_zpow : ∀ z : ℤ, z ≠ 0 → (0 : M) ^ z = 0
| (n : ℕ), h => by
rw [zpow_ofNat, zero_pow]; refine' lt_of_le_of_ne n.zero_le (Ne.symm _)
@@ -129,12 +99,6 @@ theorem zero_zpow : ∀ z : ℤ, z ≠ 0 → (0 : M) ^ z = 0
| -[n+1], h => by simp [zero_pow n.zero_lt_succ]
#align matrix.zero_zpow Matrix.zero_zpow
-/- warning: matrix.zero_zpow_eq -> Matrix.zero_zpow_eq is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 0 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 0 (Zero.zero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasZero.{u2, u1, u1} n' n' R (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))))))) n) (ite.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (Eq.{1} Int n (OfNat.ofNat.{0} Int 0 (OfNat.mk.{0} Int 0 (Zero.zero.{0} Int Int.hasZero)))) (Int.decidableEq n (OfNat.ofNat.{0} Int 0 (OfNat.mk.{0} Int 0 (Zero.zero.{0} Int Int.hasZero)))) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (One.one.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasOne.{u2, u1} n' R (fun (a : n') (b : n') => _inst_1 a b) (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (AddMonoidWithOne.toOne.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (AddCommGroupWithOne.toAddGroupWithOne.{u2} R (Ring.toAddCommGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3))))))))) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 0 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 0 (Zero.zero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasZero.{u2, u1, u1} n' n' R (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))))))))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 0 (Zero.toOfNat0.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.zero.{u1, u2, u2} n' n' R (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))) n) (ite.{succ (max u2 u1)} (Matrix.{u2, u2, u1} n' n' R) (Eq.{1} Int n (OfNat.ofNat.{0} Int 0 (instOfNatInt 0))) (Int.instDecidableEqInt n (OfNat.ofNat.{0} Int 0 (instOfNatInt 0))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (Semiring.toOne.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 0 (Zero.toOfNat0.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.zero.{u1, u2, u2} n' n' R (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))))
-Case conversion may be inaccurate. Consider using '#align matrix.zero_zpow_eq Matrix.zero_zpow_eqₓ'. -/
theorem zero_zpow_eq (n : ℤ) : (0 : M) ^ n = if n = 0 then 1 else 0 :=
by
split_ifs with h
@@ -142,23 +106,11 @@ theorem zero_zpow_eq (n : ℤ) : (0 : M) ^ n = if n = 0 then 1 else 0 :=
· rw [zero_zpow _ h]
#align matrix.zero_zpow_eq Matrix.zero_zpow_eq
-/- warning: matrix.inv_zpow -> Matrix.inv_zpow is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) n) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) n) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n))
-Case conversion may be inaccurate. Consider using '#align matrix.inv_zpow Matrix.inv_zpowₓ'. -/
theorem inv_zpow (A : M) : ∀ n : ℤ, A⁻¹ ^ n = (A ^ n)⁻¹
| (n : ℕ) => by rw [zpow_ofNat, zpow_ofNat, inv_pow']
| -[n+1] => by rw [zpow_negSucc, zpow_negSucc, inv_pow']
#align matrix.inv_zpow Matrix.inv_zpow
-/- warning: matrix.zpow_neg_one -> Matrix.zpow_neg_one is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.hasNeg (OfNat.ofNat.{0} Int 1 (OfNat.mk.{0} Int 1 (One.one.{0} Int Int.hasOne))))) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A)
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.instNegInt (OfNat.ofNat.{0} Int 1 (instOfNatInt 1)))) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A)
-Case conversion may be inaccurate. Consider using '#align matrix.zpow_neg_one Matrix.zpow_neg_oneₓ'. -/
@[simp]
theorem zpow_neg_one (A : M) : A ^ (-1 : ℤ) = A⁻¹ :=
by
@@ -166,22 +118,10 @@ theorem zpow_neg_one (A : M) : A ^ (-1 : ℤ) = A⁻¹ :=
simp only [zpow_one, Int.ofNat_zero, Int.ofNat_succ, zpow_eq_pow, zero_add]
#align matrix.zpow_neg_one Matrix.zpow_neg_one
-/- warning: matrix.zpow_coe_nat -> Matrix.zpow_coe_nat is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (n : Nat), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) A n)
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Nat), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Nat.cast.{0} Int instNatCastInt n)) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A n)
-Case conversion may be inaccurate. Consider using '#align matrix.zpow_coe_nat Matrix.zpow_coe_natₓ'. -/
theorem zpow_coe_nat (A : M) (n : ℕ) : A ^ (n : ℤ) = A ^ n :=
zpow_ofNat _ _
#align matrix.zpow_coe_nat Matrix.zpow_coe_nat
-/- warning: matrix.zpow_neg_coe_nat -> Matrix.zpow_neg_coe_nat is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (n : Nat), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.hasNeg ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) n))) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) A n))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Nat), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.instNegInt (Nat.cast.{0} Int instNatCastInt n))) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A n))
-Case conversion may be inaccurate. Consider using '#align matrix.zpow_neg_coe_nat Matrix.zpow_neg_coe_natₓ'. -/
@[simp]
theorem zpow_neg_coe_nat (A : M) (n : ℕ) : A ^ (-n : ℤ) = (A ^ n)⁻¹ :=
by
@@ -190,12 +130,6 @@ theorem zpow_neg_coe_nat (A : M) (n : ℕ) : A ^ (-n : ℤ) = (A ^ n)⁻¹ :=
· exact DivInvMonoid.zpow_neg' _ _
#align matrix.zpow_neg_coe_nat Matrix.zpow_neg_coe_nat
-/- warning: is_unit.det_zpow -> IsUnit.det_zpow is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)))
-Case conversion may be inaccurate. Consider using '#align is_unit.det_zpow IsUnit.det_zpowₓ'. -/
theorem IsUnit.det_zpow {A : M} (h : IsUnit A.det) (n : ℤ) : IsUnit (A ^ n).det :=
by
cases n
@@ -203,12 +137,6 @@ theorem IsUnit.det_zpow {A : M} (h : IsUnit A.det) (n : ℤ) : IsUnit (A ^ n).de
· simpa using h.pow n.succ
#align is_unit.det_zpow IsUnit.det_zpow
-/- warning: matrix.is_unit_det_zpow_iff -> Matrix.isUnit_det_zpow_iff is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R} {z : Int}, Iff (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A z))) (Or (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) (Eq.{1} Int z (OfNat.ofNat.{0} Int 0 (OfNat.mk.{0} Int 0 (Zero.zero.{0} Int Int.hasZero)))))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} {z : Int}, Iff (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A z))) (Or (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) (Eq.{1} Int z (OfNat.ofNat.{0} Int 0 (instOfNatInt 0))))
-Case conversion may be inaccurate. Consider using '#align matrix.is_unit_det_zpow_iff Matrix.isUnit_det_zpow_iffₓ'. -/
theorem isUnit_det_zpow_iff {A : M} {z : ℤ} : IsUnit (A ^ z).det ↔ IsUnit A.det ∨ z = 0 :=
by
induction' z using Int.induction_on with z IH z IH
@@ -220,12 +148,6 @@ theorem isUnit_det_zpow_iff {A : M} {z : ℤ} : IsUnit (A ^ z).det ↔ IsUnit A.
simp
#align matrix.is_unit_det_zpow_iff Matrix.isUnit_det_zpow_iff
-/- warning: matrix.zpow_neg -> Matrix.zpow_neg is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.hasNeg n)) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.instNegInt n)) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)))
-Case conversion may be inaccurate. Consider using '#align matrix.zpow_neg Matrix.zpow_negₓ'. -/
theorem zpow_neg {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (-n) = (A ^ n)⁻¹
| (n : ℕ) => zpow_neg_coe_nat _ _
| -[n+1] =>
@@ -235,22 +157,10 @@ theorem zpow_neg {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (-n) = (A ^ n)⁻
exact h.pow _
#align matrix.zpow_neg Matrix.zpow_neg
-/- warning: matrix.inv_zpow' -> Matrix.inv_zpow' is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) n) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.hasNeg n)))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) n) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.instNegInt n)))
-Case conversion may be inaccurate. Consider using '#align matrix.inv_zpow' Matrix.inv_zpow'ₓ'. -/
theorem inv_zpow' {A : M} (h : IsUnit A.det) (n : ℤ) : A⁻¹ ^ n = A ^ (-n) := by
rw [zpow_neg h, inv_zpow]
#align matrix.inv_zpow' Matrix.inv_zpow'
-/- warning: matrix.zpow_add_one -> Matrix.zpow_add_one is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.hasAdd) n (OfNat.ofNat.{0} Int 1 (OfNat.mk.{0} Int 1 (One.one.{0} Int Int.hasOne))))) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) A))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.instAddInt) n (OfNat.ofNat.{0} Int 1 (instOfNatInt 1)))) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) A))
-Case conversion may be inaccurate. Consider using '#align matrix.zpow_add_one Matrix.zpow_add_oneₓ'. -/
theorem zpow_add_one {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (n + 1) = A ^ n * A
| (n : ℕ) => by simp only [← Nat.cast_succ, pow_succ', zpow_ofNat]
| -((n : ℕ) + 1) =>
@@ -264,12 +174,6 @@ theorem zpow_add_one {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (n + 1) = A ^
#align matrix.zpow_add_one Matrix.zpow_add_one
-/- warning: matrix.zpow_sub_one -> Matrix.zpow_sub_one is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HSub.hSub.{0, 0, 0} Int Int Int (instHSub.{0} Int Int.hasSub) n (OfNat.ofNat.{0} Int 1 (OfNat.mk.{0} Int 1 (One.one.{0} Int Int.hasOne))))) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A)))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HSub.hSub.{0, 0, 0} Int Int Int (instHSub.{0} Int Int.instSubInt) n (OfNat.ofNat.{0} Int 1 (instOfNatInt 1)))) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A)))
-Case conversion may be inaccurate. Consider using '#align matrix.zpow_sub_one Matrix.zpow_sub_oneₓ'. -/
theorem zpow_sub_one {A : M} (h : IsUnit A.det) (n : ℤ) : A ^ (n - 1) = A ^ n * A⁻¹ :=
calc
A ^ (n - 1) = A ^ (n - 1) * A * A⁻¹ := by
@@ -278,12 +182,6 @@ theorem zpow_sub_one {A : M} (h : IsUnit A.det) (n : ℤ) : A ^ (n - 1) = A ^ n
#align matrix.zpow_sub_one Matrix.zpow_sub_one
-/- warning: matrix.zpow_add -> Matrix.zpow_add is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (m : Int) (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.hasAdd) m n)) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (m : Int) (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.instAddInt) m n)) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)))
-Case conversion may be inaccurate. Consider using '#align matrix.zpow_add Matrix.zpow_addₓ'. -/
theorem zpow_add {A : M} (ha : IsUnit A.det) (m n : ℤ) : A ^ (m + n) = A ^ m * A ^ n :=
by
induction' n using Int.induction_on with n ihn n ihn
@@ -292,12 +190,6 @@ theorem zpow_add {A : M} (ha : IsUnit A.det) (m n : ℤ) : A ^ (m + n) = A ^ m *
· rw [zpow_sub_one ha, ← mul_assoc, ← ihn, ← zpow_sub_one ha, add_sub_assoc]
#align matrix.zpow_add Matrix.zpow_add
-/- warning: matrix.zpow_add_of_nonpos -> Matrix.zpow_add_of_nonpos is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R} {m : Int} {n : Int}, (LE.le.{0} Int Int.hasLe m (OfNat.ofNat.{0} Int 0 (OfNat.mk.{0} Int 0 (Zero.zero.{0} Int Int.hasZero)))) -> (LE.le.{0} Int Int.hasLe n (OfNat.ofNat.{0} Int 0 (OfNat.mk.{0} Int 0 (Zero.zero.{0} Int Int.hasZero)))) -> (Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.hasAdd) m n)) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} {m : Int} {n : Int}, (LE.le.{0} Int Int.instLEInt m (OfNat.ofNat.{0} Int 0 (instOfNatInt 0))) -> (LE.le.{0} Int Int.instLEInt n (OfNat.ofNat.{0} Int 0 (instOfNatInt 0))) -> (Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.instAddInt) m n)) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)))
-Case conversion may be inaccurate. Consider using '#align matrix.zpow_add_of_nonpos Matrix.zpow_add_of_nonposₓ'. -/
theorem zpow_add_of_nonpos {A : M} {m n : ℤ} (hm : m ≤ 0) (hn : n ≤ 0) :
A ^ (m + n) = A ^ m * A ^ n :=
by
@@ -308,12 +200,6 @@ theorem zpow_add_of_nonpos {A : M} {m n : ℤ} (hm : m ≤ 0) (hn : n ≤ 0) :
simp_rw [← neg_add, ← Int.ofNat_add, zpow_neg_coe_nat, ← inv_pow', h, pow_add]
#align matrix.zpow_add_of_nonpos Matrix.zpow_add_of_nonpos
-/- warning: matrix.zpow_add_of_nonneg -> Matrix.zpow_add_of_nonneg is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R} {m : Int} {n : Int}, (LE.le.{0} Int Int.hasLe (OfNat.ofNat.{0} Int 0 (OfNat.mk.{0} Int 0 (Zero.zero.{0} Int Int.hasZero))) m) -> (LE.le.{0} Int Int.hasLe (OfNat.ofNat.{0} Int 0 (OfNat.mk.{0} Int 0 (Zero.zero.{0} Int Int.hasZero))) n) -> (Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.hasAdd) m n)) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} {m : Int} {n : Int}, (LE.le.{0} Int Int.instLEInt (OfNat.ofNat.{0} Int 0 (instOfNatInt 0)) m) -> (LE.le.{0} Int Int.instLEInt (OfNat.ofNat.{0} Int 0 (instOfNatInt 0)) n) -> (Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.instAddInt) m n)) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)))
-Case conversion may be inaccurate. Consider using '#align matrix.zpow_add_of_nonneg Matrix.zpow_add_of_nonnegₓ'. -/
theorem zpow_add_of_nonneg {A : M} {m n : ℤ} (hm : 0 ≤ m) (hn : 0 ≤ n) :
A ^ (m + n) = A ^ m * A ^ n :=
by
@@ -322,22 +208,10 @@ theorem zpow_add_of_nonneg {A : M} {m n : ℤ} (hm : 0 ≤ m) (hn : 0 ≤ n) :
rw [← Int.ofNat_add, zpow_ofNat, zpow_ofNat, zpow_ofNat, pow_add]
#align matrix.zpow_add_of_nonneg Matrix.zpow_add_of_nonneg
-/- warning: matrix.zpow_one_add -> Matrix.zpow_one_add is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (i : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.hasAdd) (OfNat.ofNat.{0} Int 1 (OfNat.mk.{0} Int 1 (One.one.{0} Int Int.hasOne))) i)) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) A (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A i)))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (i : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.instAddInt) (OfNat.ofNat.{0} Int 1 (instOfNatInt 1)) i)) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) A (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A i)))
-Case conversion may be inaccurate. Consider using '#align matrix.zpow_one_add Matrix.zpow_one_addₓ'. -/
theorem zpow_one_add {A : M} (h : IsUnit A.det) (i : ℤ) : A ^ (1 + i) = A * A ^ i := by
rw [zpow_add h, zpow_one]
#align matrix.zpow_one_add Matrix.zpow_one_add
-/- warning: matrix.semiconj_by.zpow_right -> Matrix.SemiconjBy.zpow_right is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R} {X : Matrix.{u1, u1, u2} n' n' R} {Y : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 X)) -> (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 Y)) -> (SemiconjBy.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) A X Y) -> (forall (m : Int), SemiconjBy.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) A (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) X m) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) Y m))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} {X : Matrix.{u2, u2, u1} n' n' R} {Y : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 X)) -> (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 Y)) -> (SemiconjBy.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) A X Y) -> (forall (m : Int), SemiconjBy.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) A (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) X m) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) Y m))
-Case conversion may be inaccurate. Consider using '#align matrix.semiconj_by.zpow_right Matrix.SemiconjBy.zpow_rightₓ'. -/
theorem SemiconjBy.zpow_right {A X Y : M} (hx : IsUnit X.det) (hy : IsUnit Y.det)
(h : SemiconjBy A X Y) : ∀ m : ℤ, SemiconjBy A (X ^ m) (Y ^ m)
| (n : ℕ) => by simp [h.pow_right n]
@@ -357,12 +231,6 @@ theorem SemiconjBy.zpow_right {A X Y : M} (hx : IsUnit X.det) (hy : IsUnit Y.det
hy'.coe_inv_mul, one_smul, Matrix.mul_one, Matrix.one_mul]
#align matrix.semiconj_by.zpow_right Matrix.SemiconjBy.zpow_right
-/- warning: matrix.commute.zpow_right -> Matrix.Commute.zpow_right is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R} {B : Matrix.{u1, u1, u2} n' n' R}, (Commute.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) A B) -> (forall (m : Int), Commute.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) A (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) B m))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} {B : Matrix.{u2, u2, u1} n' n' R}, (Commute.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) A B) -> (forall (m : Int), Commute.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) A (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) B m))
-Case conversion may be inaccurate. Consider using '#align matrix.commute.zpow_right Matrix.Commute.zpow_rightₓ'. -/
theorem Commute.zpow_right {A B : M} (h : Commute A B) (m : ℤ) : Commute A (B ^ m) :=
by
rcases nonsing_inv_cancel_or_zero B with (⟨hB, hB'⟩ | hB)
@@ -372,62 +240,26 @@ theorem Commute.zpow_right {A B : M} (h : Commute A B) (m : ℤ) : Commute A (B
· simp [← inv_pow', hB]
#align matrix.commute.zpow_right Matrix.Commute.zpow_right
-/- warning: matrix.commute.zpow_left -> Matrix.Commute.zpow_left is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R} {B : Matrix.{u1, u1, u2} n' n' R}, (Commute.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) A B) -> (forall (m : Int), Commute.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) B)
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} {B : Matrix.{u2, u2, u1} n' n' R}, (Commute.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) A B) -> (forall (m : Int), Commute.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) B)
-Case conversion may be inaccurate. Consider using '#align matrix.commute.zpow_left Matrix.Commute.zpow_leftₓ'. -/
theorem Commute.zpow_left {A B : M} (h : Commute A B) (m : ℤ) : Commute (A ^ m) B :=
(Commute.zpow_right h.symm m).symm
#align matrix.commute.zpow_left Matrix.Commute.zpow_left
-/- warning: matrix.commute.zpow_zpow -> Matrix.Commute.zpow_zpow is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R} {B : Matrix.{u1, u1, u2} n' n' R}, (Commute.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) A B) -> (forall (m : Int) (n : Int), Commute.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) B n))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} {B : Matrix.{u2, u2, u1} n' n' R}, (Commute.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) A B) -> (forall (m : Int) (n : Int), Commute.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) B n))
-Case conversion may be inaccurate. Consider using '#align matrix.commute.zpow_zpow Matrix.Commute.zpow_zpowₓ'. -/
theorem Commute.zpow_zpow {A B : M} (h : Commute A B) (m n : ℤ) : Commute (A ^ m) (B ^ n) :=
Commute.zpow_right (Commute.zpow_left h _) _
#align matrix.commute.zpow_zpow Matrix.Commute.zpow_zpow
-/- warning: matrix.commute.zpow_self -> Matrix.Commute.zpow_self is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (n : Int), Commute.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) A
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Int), Commute.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) A
-Case conversion may be inaccurate. Consider using '#align matrix.commute.zpow_self Matrix.Commute.zpow_selfₓ'. -/
theorem Commute.zpow_self (A : M) (n : ℤ) : Commute (A ^ n) A :=
Commute.zpow_left (Commute.refl A) _
#align matrix.commute.zpow_self Matrix.Commute.zpow_self
-/- warning: matrix.commute.self_zpow -> Matrix.Commute.self_zpow is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (n : Int), Commute.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) A (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Int), Commute.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) A (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)
-Case conversion may be inaccurate. Consider using '#align matrix.commute.self_zpow Matrix.Commute.self_zpowₓ'. -/
theorem Commute.self_zpow (A : M) (n : ℤ) : Commute A (A ^ n) :=
Commute.zpow_right (Commute.refl A) _
#align matrix.commute.self_zpow Matrix.Commute.self_zpow
-/- warning: matrix.commute.zpow_zpow_self -> Matrix.Commute.zpow_zpow_self is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (m : Int) (n : Int), Commute.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (m : Int) (n : Int), Commute.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)
-Case conversion may be inaccurate. Consider using '#align matrix.commute.zpow_zpow_self Matrix.Commute.zpow_zpow_selfₓ'. -/
theorem Commute.zpow_zpow_self (A : M) (m n : ℤ) : Commute (A ^ m) (A ^ n) :=
Commute.zpow_zpow (Commute.refl A) _ _
#align matrix.commute.zpow_zpow_self Matrix.Commute.zpow_zpow_self
-/- warning: matrix.zpow_bit0 -> Matrix.zpow_bit0 is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (bit0.{0} Int Int.hasAdd n)) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (bit0.{0} Int Int.instAddInt n)) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n))
-Case conversion may be inaccurate. Consider using '#align matrix.zpow_bit0 Matrix.zpow_bit0ₓ'. -/
theorem zpow_bit0 (A : M) (n : ℤ) : A ^ bit0 n = A ^ n * A ^ n :=
by
cases' le_total 0 n with nonneg nonpos
@@ -435,12 +267,6 @@ theorem zpow_bit0 (A : M) (n : ℤ) : A ^ bit0 n = A ^ n * A ^ n :=
· exact zpow_add_of_nonpos nonpos nonpos
#align matrix.zpow_bit0 Matrix.zpow_bit0
-/- warning: matrix.zpow_add_one_of_ne_neg_one -> Matrix.zpow_add_one_of_ne_neg_one is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R} (n : Int), (Ne.{1} Int n (Neg.neg.{0} Int Int.hasNeg (OfNat.ofNat.{0} Int 1 (OfNat.mk.{0} Int 1 (One.one.{0} Int Int.hasOne))))) -> (Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.hasAdd) n (OfNat.ofNat.{0} Int 1 (OfNat.mk.{0} Int 1 (One.one.{0} Int Int.hasOne))))) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) A))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} (n : Int), (Ne.{1} Int n (Neg.neg.{0} Int Int.instNegInt (OfNat.ofNat.{0} Int 1 (instOfNatInt 1)))) -> (Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.instAddInt) n (OfNat.ofNat.{0} Int 1 (instOfNatInt 1)))) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) A))
-Case conversion may be inaccurate. Consider using '#align matrix.zpow_add_one_of_ne_neg_one Matrix.zpow_add_one_of_ne_neg_oneₓ'. -/
theorem zpow_add_one_of_ne_neg_one {A : M} : ∀ n : ℤ, n ≠ -1 → A ^ (n + 1) = A ^ n * A
| (n : ℕ), _ => by simp only [pow_succ', ← Nat.cast_succ, zpow_ofNat]
| -1, h => absurd rfl h
@@ -452,12 +278,6 @@ theorem zpow_add_one_of_ne_neg_one {A : M} : ∀ n : ℤ, n ≠ -1 → A ^ (n +
simp_rw [zpow_neg_coe_nat, ← inv_pow', h, zero_pow Nat.succ_pos', MulZeroClass.zero_mul]
#align matrix.zpow_add_one_of_ne_neg_one Matrix.zpow_add_one_of_ne_neg_one
-/- warning: matrix.zpow_bit1 -> Matrix.zpow_bit1 is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (bit1.{0} Int Int.hasOne Int.hasAdd n)) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)) A)
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (bit1.{0} Int (Semiring.toOne.{0} Int Int.instSemiringInt) Int.instAddInt n)) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)) A)
-Case conversion may be inaccurate. Consider using '#align matrix.zpow_bit1 Matrix.zpow_bit1ₓ'. -/
theorem zpow_bit1 (A : M) (n : ℤ) : A ^ bit1 n = A ^ n * A ^ n * A :=
by
rw [bit1, zpow_add_one_of_ne_neg_one, zpow_bit0]
@@ -465,12 +285,6 @@ theorem zpow_bit1 (A : M) (n : ℤ) : A ^ bit1 n = A ^ n * A ^ n * A :=
simpa using congr_arg bodd h
#align matrix.zpow_bit1 Matrix.zpow_bit1
-/- warning: matrix.zpow_mul -> Matrix.zpow_mul is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R), (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (m : Int) (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HMul.hMul.{0, 0, 0} Int Int Int (instHMul.{0} Int Int.hasMul) m n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) n))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R), (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (m : Int) (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HMul.hMul.{0, 0, 0} Int Int Int (instHMul.{0} Int Int.instMulInt) m n)) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) n))
-Case conversion may be inaccurate. Consider using '#align matrix.zpow_mul Matrix.zpow_mulₓ'. -/
theorem zpow_mul (A : M) (h : IsUnit A.det) : ∀ m n : ℤ, A ^ (m * n) = (A ^ m) ^ n
| (m : ℕ), (n : ℕ) => by rw [zpow_ofNat, zpow_ofNat, ← pow_mul, ← zpow_ofNat, Int.ofNat_mul]
| (m : ℕ), -[n+1] => by
@@ -487,22 +301,10 @@ theorem zpow_mul (A : M) (h : IsUnit A.det) : ∀ m n : ℤ, A ^ (m * n) = (A ^
exact h.pow _
#align matrix.zpow_mul Matrix.zpow_mul
-/- warning: matrix.zpow_mul' -> Matrix.zpow_mul' is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R), (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (m : Int) (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HMul.hMul.{0, 0, 0} Int Int Int (instHMul.{0} Int Int.hasMul) m n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) m))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R), (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (m : Int) (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HMul.hMul.{0, 0, 0} Int Int Int (instHMul.{0} Int Int.instMulInt) m n)) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) m))
-Case conversion may be inaccurate. Consider using '#align matrix.zpow_mul' Matrix.zpow_mul'ₓ'. -/
theorem zpow_mul' (A : M) (h : IsUnit A.det) (m n : ℤ) : A ^ (m * n) = (A ^ n) ^ m := by
rw [mul_comm, zpow_mul _ h]
#align matrix.zpow_mul' Matrix.zpow_mul'
-/- warning: matrix.coe_units_zpow -> Matrix.coe_units_zpow is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (u : Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) ((fun (a : Type.{max u1 u2}) (b : Type.{max u1 u2}) [self : HasLiftT.{succ (max u1 u2), succ (max u1 u2)} a b] => self.0) (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Matrix.{u1, u1, u2} n' n' R) (HasLiftT.mk.{succ (max u1 u2), succ (max u1 u2)} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Matrix.{u1, u1, u2} n' n' R) (CoeTCₓ.coe.{succ (max u1 u2), succ (max u1 u2)} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Matrix.{u1, u1, u2} n' n' R) (coeBase.{succ (max u1 u2), succ (max u1 u2)} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Matrix.{u1, u1, u2} n' n' R) (Units.hasCoe.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) Int (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (instHPow.{max u1 u2, 0} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) Int (DivInvMonoid.Pow.{max u1 u2} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Group.toDivInvMonoid.{max u1 u2} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Units.group.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))))) u n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) ((fun (a : Type.{max u1 u2}) (b : Type.{max u1 u2}) [self : HasLiftT.{succ (max u1 u2), succ (max u1 u2)} a b] => self.0) (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Matrix.{u1, u1, u2} n' n' R) (HasLiftT.mk.{succ (max u1 u2), succ (max u1 u2)} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Matrix.{u1, u1, u2} n' n' R) (CoeTCₓ.coe.{succ (max u1 u2), succ (max u1 u2)} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Matrix.{u1, u1, u2} n' n' R) (coeBase.{succ (max u1 u2), succ (max u1 u2)} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Matrix.{u1, u1, u2} n' n' R) (Units.hasCoe.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))))) u) n)
-but is expected to have type
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (u : Units.{max u2 u1} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b))))) (n : Int), Eq.{max (succ u1) (succ u2)} (Matrix.{u1, u1, u2} n' n' R) (Units.val.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Units.{max u2 u1} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b))))) Int (Units.{max u2 u1} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b))))) (instHPow.{max u1 u2, 0} (Units.{max u2 u1} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b))))) Int (DivInvMonoid.Pow.{max u1 u2} (Units.{max u2 u1} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b))))) (Group.toDivInvMonoid.{max u1 u2} (Units.{max u2 u1} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b))))) (Units.instGroupUnits.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))))) u n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.instDivInvMonoidMatrix.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (Units.val.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))) u) n)
-Case conversion may be inaccurate. Consider using '#align matrix.coe_units_zpow Matrix.coe_units_zpowₓ'. -/
@[simp, norm_cast]
theorem coe_units_zpow (u : Mˣ) : ∀ n : ℤ, ((u ^ n : Mˣ) : M) = u ^ n
| (n : ℕ) => by rw [_root_.zpow_coe_nat, zpow_ofNat, Units.val_pow_eq_pow_val]
@@ -510,12 +312,6 @@ theorem coe_units_zpow (u : Mˣ) : ∀ n : ℤ, ((u ^ n : Mˣ) : M) = u ^ n
rw [zpow_negSucc, zpow_negSucc, ← inv_pow, u⁻¹.val_pow_eq_pow_val, ← inv_pow', coe_units_inv]
#align matrix.coe_units_zpow Matrix.coe_units_zpow
-/- warning: matrix.zpow_ne_zero_of_is_unit_det -> Matrix.zpow_ne_zero_of_isUnit_det is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] [_inst_4 : Nonempty.{succ u1} n'] [_inst_5 : Nontrivial.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (z : Int), Ne.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A z) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 0 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 0 (Zero.zero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasZero.{u2, u1, u1} n' n' R (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))))))))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] [_inst_4 : Nonempty.{succ u2} n'] [_inst_5 : Nontrivial.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (z : Int), Ne.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A z) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 0 (Zero.toOfNat0.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.zero.{u1, u2, u2} n' n' R (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))))
-Case conversion may be inaccurate. Consider using '#align matrix.zpow_ne_zero_of_is_unit_det Matrix.zpow_ne_zero_of_isUnit_detₓ'. -/
theorem zpow_ne_zero_of_isUnit_det [Nonempty n'] [Nontrivial R] {A : M} (ha : IsUnit A.det)
(z : ℤ) : A ^ z ≠ 0 := by
have := ha.det_zpow z
@@ -524,22 +320,10 @@ theorem zpow_ne_zero_of_isUnit_det [Nonempty n'] [Nontrivial R] {A : M} (ha : Is
exact not_isUnit_zero
#align matrix.zpow_ne_zero_of_is_unit_det Matrix.zpow_ne_zero_of_isUnit_det
-/- warning: matrix.zpow_sub -> Matrix.zpow_sub is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (z1 : Int) (z2 : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HSub.hSub.{0, 0, 0} Int Int Int (instHSub.{0} Int Int.hasSub) z1 z2)) (HDiv.hDiv.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (DivInvMonoid.toHasDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A z1) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A z2)))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (z1 : Int) (z2 : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HSub.hSub.{0, 0, 0} Int Int Int (instHSub.{0} Int Int.instSubInt) z1 z2)) (HDiv.hDiv.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (DivInvMonoid.toDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A z1) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A z2)))
-Case conversion may be inaccurate. Consider using '#align matrix.zpow_sub Matrix.zpow_subₓ'. -/
theorem zpow_sub {A : M} (ha : IsUnit A.det) (z1 z2 : ℤ) : A ^ (z1 - z2) = A ^ z1 / A ^ z2 := by
rw [sub_eq_add_neg, zpow_add ha, zpow_neg ha, div_eq_mul_inv]
#align matrix.zpow_sub Matrix.zpow_sub
-/- warning: matrix.commute.mul_zpow -> Matrix.Commute.mul_zpow is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R} {B : Matrix.{u1, u1, u2} n' n' R}, (Commute.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) A B) -> (forall (i : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) A B) i) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A i) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) B i)))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} {B : Matrix.{u2, u2, u1} n' n' R}, (Commute.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) A B) -> (forall (i : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) A B) i) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A i) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) B i)))
-Case conversion may be inaccurate. Consider using '#align matrix.commute.mul_zpow Matrix.Commute.mul_zpowₓ'. -/
theorem Commute.mul_zpow {A B : M} (h : Commute A B) : ∀ i : ℤ, (A * B) ^ i = A ^ i * B ^ i
| (n : ℕ) => by simp [h.mul_pow n, -mul_eq_mul]
| -[n+1] => by
@@ -547,72 +331,30 @@ theorem Commute.mul_zpow {A B : M} (h : Commute A B) : ∀ i : ℤ, (A * B) ^ i
h.mul_pow n.succ, (h.pow_pow _ _).Eq]
#align matrix.commute.mul_zpow Matrix.Commute.mul_zpow
-/- warning: matrix.zpow_bit0' -> Matrix.zpow_bit0' is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (bit0.{0} Int Int.hasAdd n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) A A) n)
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (bit0.{0} Int Int.instAddInt n)) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) A A) n)
-Case conversion may be inaccurate. Consider using '#align matrix.zpow_bit0' Matrix.zpow_bit0'ₓ'. -/
theorem zpow_bit0' (A : M) (n : ℤ) : A ^ bit0 n = (A * A) ^ n :=
(zpow_bit0 A n).trans (Commute.mul_zpow (Commute.refl A) n).symm
#align matrix.zpow_bit0' Matrix.zpow_bit0'
-/- warning: matrix.zpow_bit1' -> Matrix.zpow_bit1' is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (bit1.{0} Int Int.hasOne Int.hasAdd n)) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) A A) n) A)
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (bit1.{0} Int (Semiring.toOne.{0} Int Int.instSemiringInt) Int.instAddInt n)) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) A A) n) A)
-Case conversion may be inaccurate. Consider using '#align matrix.zpow_bit1' Matrix.zpow_bit1'ₓ'. -/
theorem zpow_bit1' (A : M) (n : ℤ) : A ^ bit1 n = (A * A) ^ n * A := by
rw [zpow_bit1, Commute.mul_zpow (Commute.refl A)]
#align matrix.zpow_bit1' Matrix.zpow_bit1'
-/- warning: matrix.zpow_neg_mul_zpow_self -> Matrix.zpow_neg_mul_zpow_self is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (n : Int) {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.hasNeg n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (One.one.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasOne.{u2, u1} n' R (fun (a : n') (b : n') => _inst_1 a b) (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (AddMonoidWithOne.toOne.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (AddCommGroupWithOne.toAddGroupWithOne.{u2} R (Ring.toAddCommGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3))))))))))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (n : Int) {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.instNegInt n)) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (Semiring.toOne.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))))
-Case conversion may be inaccurate. Consider using '#align matrix.zpow_neg_mul_zpow_self Matrix.zpow_neg_mul_zpow_selfₓ'. -/
theorem zpow_neg_mul_zpow_self (n : ℤ) {A : M} (h : IsUnit A.det) : A ^ (-n) * A ^ n = 1 := by
rw [zpow_neg h, mul_eq_mul, nonsing_inv_mul _ (h.det_zpow _)]
#align matrix.zpow_neg_mul_zpow_self Matrix.zpow_neg_mul_zpow_self
-/- warning: matrix.one_div_pow -> Matrix.one_div_pow is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R} (n : Nat), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) (HDiv.hDiv.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (DivInvMonoid.toHasDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (One.one.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasOne.{u2, u1} n' R (fun (a : n') (b : n') => _inst_1 a b) (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (AddMonoidWithOne.toOne.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (AddCommGroupWithOne.toAddGroupWithOne.{u2} R (Ring.toAddCommGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3))))))))) A) n) (HDiv.hDiv.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (DivInvMonoid.toHasDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (One.one.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasOne.{u2, u1} n' R (fun (a : n') (b : n') => _inst_1 a b) (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (AddMonoidWithOne.toOne.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (AddCommGroupWithOne.toAddGroupWithOne.{u2} R (Ring.toAddCommGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3))))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) A n))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} (n : Nat), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) (HDiv.hDiv.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (DivInvMonoid.toDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (Semiring.toOne.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))) A) n) (HDiv.hDiv.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (DivInvMonoid.toDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (Semiring.toOne.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A n))
-Case conversion may be inaccurate. Consider using '#align matrix.one_div_pow Matrix.one_div_powₓ'. -/
theorem one_div_pow {A : M} (n : ℕ) : (1 / A) ^ n = 1 / A ^ n := by simp only [one_div, inv_pow']
#align matrix.one_div_pow Matrix.one_div_pow
-/- warning: matrix.one_div_zpow -> Matrix.one_div_zpow is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R} (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HDiv.hDiv.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (DivInvMonoid.toHasDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (One.one.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasOne.{u2, u1} n' R (fun (a : n') (b : n') => _inst_1 a b) (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (AddMonoidWithOne.toOne.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (AddCommGroupWithOne.toAddGroupWithOne.{u2} R (Ring.toAddCommGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3))))))))) A) n) (HDiv.hDiv.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (DivInvMonoid.toHasDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (One.one.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasOne.{u2, u1} n' R (fun (a : n') (b : n') => _inst_1 a b) (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (AddMonoidWithOne.toOne.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (AddCommGroupWithOne.toAddGroupWithOne.{u2} R (Ring.toAddCommGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3))))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n))
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HDiv.hDiv.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (DivInvMonoid.toDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (Semiring.toOne.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))) A) n) (HDiv.hDiv.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (DivInvMonoid.toDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (Semiring.toOne.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n))
-Case conversion may be inaccurate. Consider using '#align matrix.one_div_zpow Matrix.one_div_zpowₓ'. -/
theorem one_div_zpow {A : M} (n : ℤ) : (1 / A) ^ n = 1 / A ^ n := by simp only [one_div, inv_zpow]
#align matrix.one_div_zpow Matrix.one_div_zpow
-/- warning: matrix.transpose_zpow -> Matrix.transpose_zpow is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (Matrix.transpose.{u2, u1, u1} n' n' R (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (Matrix.transpose.{u2, u1, u1} n' n' R A) n)
-but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (Matrix.transpose.{u1, u2, u2} n' n' R (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (Matrix.transpose.{u1, u2, u2} n' n' R A) n)
-Case conversion may be inaccurate. Consider using '#align matrix.transpose_zpow Matrix.transpose_zpowₓ'. -/
@[simp]
theorem transpose_zpow (A : M) : ∀ n : ℤ, (A ^ n)ᵀ = Aᵀ ^ n
| (n : ℕ) => by rw [zpow_ofNat, zpow_ofNat, transpose_pow]
| -[n+1] => by rw [zpow_negSucc, zpow_negSucc, transpose_nonsing_inv, transpose_pow]
#align matrix.transpose_zpow Matrix.transpose_zpow
-/- warning: matrix.conj_transpose_zpow -> Matrix.conjTranspose_zpow is a dubious translation:
-lean 3 declaration is
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] [_inst_4 : StarRing.{u2} R (NonUnitalRing.toNonUnitalSemiring.{u2} R (NonUnitalCommRing.toNonUnitalRing.{u2} R (CommRing.toNonUnitalCommRing.{u2} R _inst_3)))] (A : Matrix.{u1, u1, u2} n' n' R) (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (Matrix.conjTranspose.{u2, u1, u1} n' n' R (InvolutiveStar.toHasStar.{u2} R (StarAddMonoid.toHasInvolutiveStar.{u2} R (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u2} R (NonUnitalRing.toNonUnitalSemiring.{u2} R (NonUnitalCommRing.toNonUnitalRing.{u2} R (CommRing.toNonUnitalCommRing.{u2} R _inst_3)))))) (StarRing.toStarAddMonoid.{u2} R (NonUnitalRing.toNonUnitalSemiring.{u2} R (NonUnitalCommRing.toNonUnitalRing.{u2} R (CommRing.toNonUnitalCommRing.{u2} R _inst_3))) _inst_4))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (Matrix.conjTranspose.{u2, u1, u1} n' n' R (InvolutiveStar.toHasStar.{u2} R (StarAddMonoid.toHasInvolutiveStar.{u2} R (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u2} R (NonUnitalRing.toNonUnitalSemiring.{u2} R (NonUnitalCommRing.toNonUnitalRing.{u2} R (CommRing.toNonUnitalCommRing.{u2} R _inst_3)))))) (StarRing.toStarAddMonoid.{u2} R (NonUnitalRing.toNonUnitalSemiring.{u2} R (NonUnitalCommRing.toNonUnitalRing.{u2} R (CommRing.toNonUnitalCommRing.{u2} R _inst_3))) _inst_4))) A) n)
-but is expected to have type
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] [_inst_4 : StarRing.{u2} R (NonUnitalCommSemiring.toNonUnitalSemiring.{u2} R (NonUnitalCommRing.toNonUnitalCommSemiring.{u2} R (CommRing.toNonUnitalCommRing.{u2} R _inst_3)))] (A : Matrix.{u1, u1, u2} n' n' R) (n : Int), Eq.{max (succ u1) (succ u2)} (Matrix.{u1, u1, u2} n' n' R) (Matrix.conjTranspose.{u2, u1, u1} n' n' R (InvolutiveStar.toStar.{u2} R (StarAddMonoid.toInvolutiveStar.{u2} R (AddMonoidWithOne.toAddMonoid.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (Ring.toAddGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3)))) (StarRing.toStarAddMonoid.{u2} R (NonUnitalCommSemiring.toNonUnitalSemiring.{u2} R (NonUnitalCommRing.toNonUnitalCommSemiring.{u2} R (CommRing.toNonUnitalCommRing.{u2} R _inst_3))) _inst_4))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.instDivInvMonoidMatrix.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.instDivInvMonoidMatrix.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (Matrix.conjTranspose.{u2, u1, u1} n' n' R (InvolutiveStar.toStar.{u2} R (StarAddMonoid.toInvolutiveStar.{u2} R (AddMonoidWithOne.toAddMonoid.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (Ring.toAddGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3)))) (StarRing.toStarAddMonoid.{u2} R (NonUnitalCommSemiring.toNonUnitalSemiring.{u2} R (NonUnitalCommRing.toNonUnitalCommSemiring.{u2} R (CommRing.toNonUnitalCommRing.{u2} R _inst_3))) _inst_4))) A) n)
-Case conversion may be inaccurate. Consider using '#align matrix.conj_transpose_zpow Matrix.conjTranspose_zpowₓ'. -/
@[simp]
theorem conjTranspose_zpow [StarRing R] (A : M) : ∀ n : ℤ, (A ^ n)ᴴ = Aᴴ ^ n
| (n : ℕ) => by rw [zpow_ofNat, zpow_ofNat, conj_transpose_pow]
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -124,8 +124,7 @@ but is expected to have type
Case conversion may be inaccurate. Consider using '#align matrix.zero_zpow Matrix.zero_zpowₓ'. -/
theorem zero_zpow : ∀ z : ℤ, z ≠ 0 → (0 : M) ^ z = 0
| (n : ℕ), h => by
- rw [zpow_ofNat, zero_pow]
- refine' lt_of_le_of_ne n.zero_le (Ne.symm _)
+ rw [zpow_ofNat, zero_pow]; refine' lt_of_le_of_ne n.zero_le (Ne.symm _)
simpa using h
| -[n+1], h => by simp [zero_pow n.zero_lt_succ]
#align matrix.zero_zpow Matrix.zero_zpow
mathlib commit https://github.com/leanprover-community/mathlib/commit/08e1d8d4d989df3a6df86f385e9053ec8a372cc1
@@ -49,7 +49,7 @@ section NatPow
lean 3 declaration is
forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (n : Nat), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) n) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) A n))
but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Nat), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) n) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A n))
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Nat), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) n) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A n))
Case conversion may be inaccurate. Consider using '#align matrix.inv_pow' Matrix.inv_pow'ₓ'. -/
@[simp]
theorem inv_pow' (A : M) (n : ℕ) : A⁻¹ ^ n = (A ^ n)⁻¹ :=
@@ -63,7 +63,7 @@ theorem inv_pow' (A : M) (n : ℕ) : A⁻¹ ^ n = (A ^ n)⁻¹ :=
lean 3 declaration is
forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) {m : Nat} {n : Nat}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (LE.le.{0} Nat Nat.hasLe n m) -> (Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) A (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) m n)) (Matrix.mul.{u2, u1, u1, u1} n' n' n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) A m) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) A n))))
but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) {m : Nat} {n : Nat}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (LE.le.{0} Nat instLENat n m) -> (Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) m n)) (Matrix.mul.{u1, u2, u2, u2} n' n' n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A m) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A n))))
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) {m : Nat} {n : Nat}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (LE.le.{0} Nat instLENat n m) -> (Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) m n)) (Matrix.mul.{u1, u2, u2, u2} n' n' n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A m) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A n))))
Case conversion may be inaccurate. Consider using '#align matrix.pow_sub' Matrix.pow_sub'ₓ'. -/
theorem pow_sub' (A : M) {m n : ℕ} (ha : IsUnit A.det) (h : n ≤ m) :
A ^ (m - n) = A ^ m ⬝ (A ^ n)⁻¹ :=
@@ -77,7 +77,7 @@ theorem pow_sub' (A : M) {m n : ℕ} (ha : IsUnit A.det) (h : n ≤ m) :
lean 3 declaration is
forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (m : Nat) (n : Nat), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (Matrix.mul.{u2, u1, u1, u1} n' n' n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) m) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) A n)) (Matrix.mul.{u2, u1, u1, u1} n' n' n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) A n) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) m))
but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (m : Nat) (n : Nat), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (Matrix.mul.{u1, u2, u2, u2} n' n' n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) m) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A n)) (Matrix.mul.{u1, u2, u2, u2} n' n' n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A n) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) m))
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (m : Nat) (n : Nat), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (Matrix.mul.{u1, u2, u2, u2} n' n' n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) m) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A n)) (Matrix.mul.{u1, u2, u2, u2} n' n' n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A n) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) m))
Case conversion may be inaccurate. Consider using '#align matrix.pow_inv_comm' Matrix.pow_inv_comm'ₓ'. -/
theorem pow_inv_comm' (A : M) (m n : ℕ) : A⁻¹ ^ m ⬝ A ^ n = A ^ n ⬝ A⁻¹ ^ m :=
by
@@ -108,7 +108,7 @@ open Int
lean 3 declaration is
forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (One.one.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasOne.{u2, u1} n' R (fun (a : n') (b : n') => _inst_1 a b) (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (AddMonoidWithOne.toOne.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (AddCommGroupWithOne.toAddGroupWithOne.{u2} R (Ring.toAddCommGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3))))))))) n) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (One.one.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasOne.{u2, u1} n' R (fun (a : n') (b : n') => _inst_1 a b) (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (AddMonoidWithOne.toOne.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (AddCommGroupWithOne.toAddGroupWithOne.{u2} R (Ring.toAddCommGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3)))))))))
but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (NonAssocRing.toOne.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) n) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (NonAssocRing.toOne.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (Semiring.toOne.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))) n) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (Semiring.toOne.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))))))
Case conversion may be inaccurate. Consider using '#align matrix.one_zpow Matrix.one_zpowₓ'. -/
@[simp]
theorem one_zpow : ∀ n : ℤ, (1 : M) ^ n = 1
@@ -134,7 +134,7 @@ theorem zero_zpow : ∀ z : ℤ, z ≠ 0 → (0 : M) ^ z = 0
lean 3 declaration is
forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 0 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 0 (Zero.zero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasZero.{u2, u1, u1} n' n' R (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))))))) n) (ite.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (Eq.{1} Int n (OfNat.ofNat.{0} Int 0 (OfNat.mk.{0} Int 0 (Zero.zero.{0} Int Int.hasZero)))) (Int.decidableEq n (OfNat.ofNat.{0} Int 0 (OfNat.mk.{0} Int 0 (Zero.zero.{0} Int Int.hasZero)))) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (One.one.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasOne.{u2, u1} n' R (fun (a : n') (b : n') => _inst_1 a b) (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (AddMonoidWithOne.toOne.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (AddCommGroupWithOne.toAddGroupWithOne.{u2} R (Ring.toAddCommGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3))))))))) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 0 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 0 (Zero.zero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasZero.{u2, u1, u1} n' n' R (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))))))))
but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 0 (Zero.toOfNat0.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.zero.{u1, u2, u2} n' n' R (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))) n) (ite.{succ (max u2 u1)} (Matrix.{u2, u2, u1} n' n' R) (Eq.{1} Int n (OfNat.ofNat.{0} Int 0 (instOfNatInt 0))) (Int.instDecidableEqInt n (OfNat.ofNat.{0} Int 0 (instOfNatInt 0))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (NonAssocRing.toOne.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 0 (Zero.toOfNat0.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.zero.{u1, u2, u2} n' n' R (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))))
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 0 (Zero.toOfNat0.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.zero.{u1, u2, u2} n' n' R (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))) n) (ite.{succ (max u2 u1)} (Matrix.{u2, u2, u1} n' n' R) (Eq.{1} Int n (OfNat.ofNat.{0} Int 0 (instOfNatInt 0))) (Int.instDecidableEqInt n (OfNat.ofNat.{0} Int 0 (instOfNatInt 0))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (Semiring.toOne.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 0 (Zero.toOfNat0.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.zero.{u1, u2, u2} n' n' R (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))))
Case conversion may be inaccurate. Consider using '#align matrix.zero_zpow_eq Matrix.zero_zpow_eqₓ'. -/
theorem zero_zpow_eq (n : ℤ) : (0 : M) ^ n = if n = 0 then 1 else 0 :=
by
@@ -171,7 +171,7 @@ theorem zpow_neg_one (A : M) : A ^ (-1 : ℤ) = A⁻¹ :=
lean 3 declaration is
forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (n : Nat), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) A n)
but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Nat), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Nat.cast.{0} Int instNatCastInt n)) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A n)
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Nat), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Nat.cast.{0} Int instNatCastInt n)) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A n)
Case conversion may be inaccurate. Consider using '#align matrix.zpow_coe_nat Matrix.zpow_coe_natₓ'. -/
theorem zpow_coe_nat (A : M) (n : ℕ) : A ^ (n : ℤ) = A ^ n :=
zpow_ofNat _ _
@@ -181,7 +181,7 @@ theorem zpow_coe_nat (A : M) (n : ℕ) : A ^ (n : ℤ) = A ^ n :=
lean 3 declaration is
forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (n : Nat), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.hasNeg ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) n))) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) A n))
but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Nat), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.instNegInt (Nat.cast.{0} Int instNatCastInt n))) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A n))
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Nat), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.instNegInt (Nat.cast.{0} Int instNatCastInt n))) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A n))
Case conversion may be inaccurate. Consider using '#align matrix.zpow_neg_coe_nat Matrix.zpow_neg_coe_natₓ'. -/
@[simp]
theorem zpow_neg_coe_nat (A : M) (n : ℕ) : A ^ (-n : ℤ) = (A ^ n)⁻¹ :=
@@ -195,7 +195,7 @@ theorem zpow_neg_coe_nat (A : M) (n : ℕ) : A ^ (-n : ℤ) = (A ^ n)⁻¹ :=
lean 3 declaration is
forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)))
but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)))
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)))
Case conversion may be inaccurate. Consider using '#align is_unit.det_zpow IsUnit.det_zpowₓ'. -/
theorem IsUnit.det_zpow {A : M} (h : IsUnit A.det) (n : ℤ) : IsUnit (A ^ n).det :=
by
@@ -208,7 +208,7 @@ theorem IsUnit.det_zpow {A : M} (h : IsUnit A.det) (n : ℤ) : IsUnit (A ^ n).de
lean 3 declaration is
forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R} {z : Int}, Iff (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A z))) (Or (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) (Eq.{1} Int z (OfNat.ofNat.{0} Int 0 (OfNat.mk.{0} Int 0 (Zero.zero.{0} Int Int.hasZero)))))
but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} {z : Int}, Iff (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A z))) (Or (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) (Eq.{1} Int z (OfNat.ofNat.{0} Int 0 (instOfNatInt 0))))
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} {z : Int}, Iff (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A z))) (Or (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) (Eq.{1} Int z (OfNat.ofNat.{0} Int 0 (instOfNatInt 0))))
Case conversion may be inaccurate. Consider using '#align matrix.is_unit_det_zpow_iff Matrix.isUnit_det_zpow_iffₓ'. -/
theorem isUnit_det_zpow_iff {A : M} {z : ℤ} : IsUnit (A ^ z).det ↔ IsUnit A.det ∨ z = 0 :=
by
@@ -225,7 +225,7 @@ theorem isUnit_det_zpow_iff {A : M} {z : ℤ} : IsUnit (A ^ z).det ↔ IsUnit A.
lean 3 declaration is
forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.hasNeg n)) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)))
but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.instNegInt n)) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)))
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.instNegInt n)) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)))
Case conversion may be inaccurate. Consider using '#align matrix.zpow_neg Matrix.zpow_negₓ'. -/
theorem zpow_neg {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (-n) = (A ^ n)⁻¹
| (n : ℕ) => zpow_neg_coe_nat _ _
@@ -240,7 +240,7 @@ theorem zpow_neg {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (-n) = (A ^ n)⁻
lean 3 declaration is
forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) n) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.hasNeg n)))
but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) n) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.instNegInt n)))
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) n) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.instNegInt n)))
Case conversion may be inaccurate. Consider using '#align matrix.inv_zpow' Matrix.inv_zpow'ₓ'. -/
theorem inv_zpow' {A : M} (h : IsUnit A.det) (n : ℤ) : A⁻¹ ^ n = A ^ (-n) := by
rw [zpow_neg h, inv_zpow]
@@ -250,7 +250,7 @@ theorem inv_zpow' {A : M} (h : IsUnit A.det) (n : ℤ) : A⁻¹ ^ n = A ^ (-n) :
lean 3 declaration is
forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.hasAdd) n (OfNat.ofNat.{0} Int 1 (OfNat.mk.{0} Int 1 (One.one.{0} Int Int.hasOne))))) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) A))
but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.instAddInt) n (OfNat.ofNat.{0} Int 1 (instOfNatInt 1)))) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) A))
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.instAddInt) n (OfNat.ofNat.{0} Int 1 (instOfNatInt 1)))) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) A))
Case conversion may be inaccurate. Consider using '#align matrix.zpow_add_one Matrix.zpow_add_oneₓ'. -/
theorem zpow_add_one {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (n + 1) = A ^ n * A
| (n : ℕ) => by simp only [← Nat.cast_succ, pow_succ', zpow_ofNat]
@@ -269,7 +269,7 @@ theorem zpow_add_one {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (n + 1) = A ^
lean 3 declaration is
forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HSub.hSub.{0, 0, 0} Int Int Int (instHSub.{0} Int Int.hasSub) n (OfNat.ofNat.{0} Int 1 (OfNat.mk.{0} Int 1 (One.one.{0} Int Int.hasOne))))) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A)))
but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HSub.hSub.{0, 0, 0} Int Int Int (instHSub.{0} Int Int.instSubInt) n (OfNat.ofNat.{0} Int 1 (instOfNatInt 1)))) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A)))
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HSub.hSub.{0, 0, 0} Int Int Int (instHSub.{0} Int Int.instSubInt) n (OfNat.ofNat.{0} Int 1 (instOfNatInt 1)))) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A)))
Case conversion may be inaccurate. Consider using '#align matrix.zpow_sub_one Matrix.zpow_sub_oneₓ'. -/
theorem zpow_sub_one {A : M} (h : IsUnit A.det) (n : ℤ) : A ^ (n - 1) = A ^ n * A⁻¹ :=
calc
@@ -283,7 +283,7 @@ theorem zpow_sub_one {A : M} (h : IsUnit A.det) (n : ℤ) : A ^ (n - 1) = A ^ n
lean 3 declaration is
forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (m : Int) (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.hasAdd) m n)) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)))
but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (m : Int) (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.instAddInt) m n)) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)))
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (m : Int) (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.instAddInt) m n)) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)))
Case conversion may be inaccurate. Consider using '#align matrix.zpow_add Matrix.zpow_addₓ'. -/
theorem zpow_add {A : M} (ha : IsUnit A.det) (m n : ℤ) : A ^ (m + n) = A ^ m * A ^ n :=
by
@@ -327,7 +327,7 @@ theorem zpow_add_of_nonneg {A : M} {m n : ℤ} (hm : 0 ≤ m) (hn : 0 ≤ n) :
lean 3 declaration is
forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (i : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.hasAdd) (OfNat.ofNat.{0} Int 1 (OfNat.mk.{0} Int 1 (One.one.{0} Int Int.hasOne))) i)) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) A (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A i)))
but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (i : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.instAddInt) (OfNat.ofNat.{0} Int 1 (instOfNatInt 1)) i)) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) A (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A i)))
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (i : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.instAddInt) (OfNat.ofNat.{0} Int 1 (instOfNatInt 1)) i)) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) A (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A i)))
Case conversion may be inaccurate. Consider using '#align matrix.zpow_one_add Matrix.zpow_one_addₓ'. -/
theorem zpow_one_add {A : M} (h : IsUnit A.det) (i : ℤ) : A ^ (1 + i) = A * A ^ i := by
rw [zpow_add h, zpow_one]
@@ -337,7 +337,7 @@ theorem zpow_one_add {A : M} (h : IsUnit A.det) (i : ℤ) : A ^ (1 + i) = A * A
lean 3 declaration is
forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R} {X : Matrix.{u1, u1, u2} n' n' R} {Y : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 X)) -> (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 Y)) -> (SemiconjBy.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) A X Y) -> (forall (m : Int), SemiconjBy.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) A (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) X m) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) Y m))
but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} {X : Matrix.{u2, u2, u1} n' n' R} {Y : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 X)) -> (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 Y)) -> (SemiconjBy.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) A X Y) -> (forall (m : Int), SemiconjBy.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) A (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) X m) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) Y m))
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} {X : Matrix.{u2, u2, u1} n' n' R} {Y : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 X)) -> (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 Y)) -> (SemiconjBy.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) A X Y) -> (forall (m : Int), SemiconjBy.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) A (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) X m) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) Y m))
Case conversion may be inaccurate. Consider using '#align matrix.semiconj_by.zpow_right Matrix.SemiconjBy.zpow_rightₓ'. -/
theorem SemiconjBy.zpow_right {A X Y : M} (hx : IsUnit X.det) (hy : IsUnit Y.det)
(h : SemiconjBy A X Y) : ∀ m : ℤ, SemiconjBy A (X ^ m) (Y ^ m)
@@ -457,7 +457,7 @@ theorem zpow_add_one_of_ne_neg_one {A : M} : ∀ n : ℤ, n ≠ -1 → A ^ (n +
lean 3 declaration is
forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (bit1.{0} Int Int.hasOne Int.hasAdd n)) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)) A)
but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (bit1.{0} Int (NonAssocRing.toOne.{0} Int (Ring.toNonAssocRing.{0} Int Int.instRingInt)) Int.instAddInt n)) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)) A)
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (bit1.{0} Int (Semiring.toOne.{0} Int Int.instSemiringInt) Int.instAddInt n)) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)) A)
Case conversion may be inaccurate. Consider using '#align matrix.zpow_bit1 Matrix.zpow_bit1ₓ'. -/
theorem zpow_bit1 (A : M) (n : ℤ) : A ^ bit1 n = A ^ n * A ^ n * A :=
by
@@ -470,7 +470,7 @@ theorem zpow_bit1 (A : M) (n : ℤ) : A ^ bit1 n = A ^ n * A ^ n * A :=
lean 3 declaration is
forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R), (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (m : Int) (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HMul.hMul.{0, 0, 0} Int Int Int (instHMul.{0} Int Int.hasMul) m n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) n))
but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R), (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (m : Int) (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HMul.hMul.{0, 0, 0} Int Int Int (instHMul.{0} Int Int.instMulInt) m n)) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) n))
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R), (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (m : Int) (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HMul.hMul.{0, 0, 0} Int Int Int (instHMul.{0} Int Int.instMulInt) m n)) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) n))
Case conversion may be inaccurate. Consider using '#align matrix.zpow_mul Matrix.zpow_mulₓ'. -/
theorem zpow_mul (A : M) (h : IsUnit A.det) : ∀ m n : ℤ, A ^ (m * n) = (A ^ m) ^ n
| (m : ℕ), (n : ℕ) => by rw [zpow_ofNat, zpow_ofNat, ← pow_mul, ← zpow_ofNat, Int.ofNat_mul]
@@ -492,7 +492,7 @@ theorem zpow_mul (A : M) (h : IsUnit A.det) : ∀ m n : ℤ, A ^ (m * n) = (A ^
lean 3 declaration is
forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R), (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (m : Int) (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HMul.hMul.{0, 0, 0} Int Int Int (instHMul.{0} Int Int.hasMul) m n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) m))
but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R), (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (m : Int) (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HMul.hMul.{0, 0, 0} Int Int Int (instHMul.{0} Int Int.instMulInt) m n)) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) m))
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R), (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (m : Int) (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HMul.hMul.{0, 0, 0} Int Int Int (instHMul.{0} Int Int.instMulInt) m n)) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) m))
Case conversion may be inaccurate. Consider using '#align matrix.zpow_mul' Matrix.zpow_mul'ₓ'. -/
theorem zpow_mul' (A : M) (h : IsUnit A.det) (m n : ℤ) : A ^ (m * n) = (A ^ n) ^ m := by
rw [mul_comm, zpow_mul _ h]
@@ -502,7 +502,7 @@ theorem zpow_mul' (A : M) (h : IsUnit A.det) (m n : ℤ) : A ^ (m * n) = (A ^ n)
lean 3 declaration is
forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (u : Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) ((fun (a : Type.{max u1 u2}) (b : Type.{max u1 u2}) [self : HasLiftT.{succ (max u1 u2), succ (max u1 u2)} a b] => self.0) (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Matrix.{u1, u1, u2} n' n' R) (HasLiftT.mk.{succ (max u1 u2), succ (max u1 u2)} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Matrix.{u1, u1, u2} n' n' R) (CoeTCₓ.coe.{succ (max u1 u2), succ (max u1 u2)} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Matrix.{u1, u1, u2} n' n' R) (coeBase.{succ (max u1 u2), succ (max u1 u2)} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Matrix.{u1, u1, u2} n' n' R) (Units.hasCoe.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) Int (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (instHPow.{max u1 u2, 0} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) Int (DivInvMonoid.Pow.{max u1 u2} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Group.toDivInvMonoid.{max u1 u2} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Units.group.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))))) u n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) ((fun (a : Type.{max u1 u2}) (b : Type.{max u1 u2}) [self : HasLiftT.{succ (max u1 u2), succ (max u1 u2)} a b] => self.0) (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Matrix.{u1, u1, u2} n' n' R) (HasLiftT.mk.{succ (max u1 u2), succ (max u1 u2)} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Matrix.{u1, u1, u2} n' n' R) (CoeTCₓ.coe.{succ (max u1 u2), succ (max u1 u2)} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Matrix.{u1, u1, u2} n' n' R) (coeBase.{succ (max u1 u2), succ (max u1 u2)} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Matrix.{u1, u1, u2} n' n' R) (Units.hasCoe.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))))) u) n)
but is expected to have type
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (u : Units.{max u2 u1} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b))))) (n : Int), Eq.{max (succ u1) (succ u2)} (Matrix.{u1, u1, u2} n' n' R) (Units.val.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Units.{max u2 u1} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b))))) Int (Units.{max u2 u1} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b))))) (instHPow.{max u1 u2, 0} (Units.{max u2 u1} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b))))) Int (DivInvMonoid.Pow.{max u1 u2} (Units.{max u2 u1} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b))))) (Group.toDivInvMonoid.{max u1 u2} (Units.{max u2 u1} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b))))) (Units.instGroupUnits.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))))) u n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.instDivInvMonoidMatrix.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (Units.val.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))) u) n)
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (u : Units.{max u2 u1} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b))))) (n : Int), Eq.{max (succ u1) (succ u2)} (Matrix.{u1, u1, u2} n' n' R) (Units.val.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Units.{max u2 u1} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b))))) Int (Units.{max u2 u1} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b))))) (instHPow.{max u1 u2, 0} (Units.{max u2 u1} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b))))) Int (DivInvMonoid.Pow.{max u1 u2} (Units.{max u2 u1} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b))))) (Group.toDivInvMonoid.{max u1 u2} (Units.{max u2 u1} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b))))) (Units.instGroupUnits.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))))) u n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.instDivInvMonoidMatrix.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (Units.val.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))) u) n)
Case conversion may be inaccurate. Consider using '#align matrix.coe_units_zpow Matrix.coe_units_zpowₓ'. -/
@[simp, norm_cast]
theorem coe_units_zpow (u : Mˣ) : ∀ n : ℤ, ((u ^ n : Mˣ) : M) = u ^ n
@@ -515,7 +515,7 @@ theorem coe_units_zpow (u : Mˣ) : ∀ n : ℤ, ((u ^ n : Mˣ) : M) = u ^ n
lean 3 declaration is
forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] [_inst_4 : Nonempty.{succ u1} n'] [_inst_5 : Nontrivial.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (z : Int), Ne.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A z) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 0 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 0 (Zero.zero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasZero.{u2, u1, u1} n' n' R (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))))))))
but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] [_inst_4 : Nonempty.{succ u2} n'] [_inst_5 : Nontrivial.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (z : Int), Ne.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A z) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 0 (Zero.toOfNat0.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.zero.{u1, u2, u2} n' n' R (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))))
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] [_inst_4 : Nonempty.{succ u2} n'] [_inst_5 : Nontrivial.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (z : Int), Ne.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A z) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 0 (Zero.toOfNat0.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.zero.{u1, u2, u2} n' n' R (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))))
Case conversion may be inaccurate. Consider using '#align matrix.zpow_ne_zero_of_is_unit_det Matrix.zpow_ne_zero_of_isUnit_detₓ'. -/
theorem zpow_ne_zero_of_isUnit_det [Nonempty n'] [Nontrivial R] {A : M} (ha : IsUnit A.det)
(z : ℤ) : A ^ z ≠ 0 := by
@@ -529,7 +529,7 @@ theorem zpow_ne_zero_of_isUnit_det [Nonempty n'] [Nontrivial R] {A : M} (ha : Is
lean 3 declaration is
forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (z1 : Int) (z2 : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HSub.hSub.{0, 0, 0} Int Int Int (instHSub.{0} Int Int.hasSub) z1 z2)) (HDiv.hDiv.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (DivInvMonoid.toHasDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A z1) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A z2)))
but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (z1 : Int) (z2 : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HSub.hSub.{0, 0, 0} Int Int Int (instHSub.{0} Int Int.instSubInt) z1 z2)) (HDiv.hDiv.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (DivInvMonoid.toDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A z1) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A z2)))
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (z1 : Int) (z2 : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HSub.hSub.{0, 0, 0} Int Int Int (instHSub.{0} Int Int.instSubInt) z1 z2)) (HDiv.hDiv.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (DivInvMonoid.toDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A z1) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A z2)))
Case conversion may be inaccurate. Consider using '#align matrix.zpow_sub Matrix.zpow_subₓ'. -/
theorem zpow_sub {A : M} (ha : IsUnit A.det) (z1 z2 : ℤ) : A ^ (z1 - z2) = A ^ z1 / A ^ z2 := by
rw [sub_eq_add_neg, zpow_add ha, zpow_neg ha, div_eq_mul_inv]
@@ -562,7 +562,7 @@ theorem zpow_bit0' (A : M) (n : ℤ) : A ^ bit0 n = (A * A) ^ n :=
lean 3 declaration is
forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (bit1.{0} Int Int.hasOne Int.hasAdd n)) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) A A) n) A)
but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (bit1.{0} Int (NonAssocRing.toOne.{0} Int (Ring.toNonAssocRing.{0} Int Int.instRingInt)) Int.instAddInt n)) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) A A) n) A)
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (bit1.{0} Int (Semiring.toOne.{0} Int Int.instSemiringInt) Int.instAddInt n)) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) A A) n) A)
Case conversion may be inaccurate. Consider using '#align matrix.zpow_bit1' Matrix.zpow_bit1'ₓ'. -/
theorem zpow_bit1' (A : M) (n : ℤ) : A ^ bit1 n = (A * A) ^ n * A := by
rw [zpow_bit1, Commute.mul_zpow (Commute.refl A)]
@@ -572,7 +572,7 @@ theorem zpow_bit1' (A : M) (n : ℤ) : A ^ bit1 n = (A * A) ^ n * A := by
lean 3 declaration is
forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (n : Int) {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.hasNeg n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (One.one.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasOne.{u2, u1} n' R (fun (a : n') (b : n') => _inst_1 a b) (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (AddMonoidWithOne.toOne.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (AddCommGroupWithOne.toAddGroupWithOne.{u2} R (Ring.toAddCommGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3))))))))))
but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (n : Int) {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.instNegInt n)) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (NonAssocRing.toOne.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))))
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (n : Int) {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.instNegInt n)) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (Semiring.toOne.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))))
Case conversion may be inaccurate. Consider using '#align matrix.zpow_neg_mul_zpow_self Matrix.zpow_neg_mul_zpow_selfₓ'. -/
theorem zpow_neg_mul_zpow_self (n : ℤ) {A : M} (h : IsUnit A.det) : A ^ (-n) * A ^ n = 1 := by
rw [zpow_neg h, mul_eq_mul, nonsing_inv_mul _ (h.det_zpow _)]
@@ -582,7 +582,7 @@ theorem zpow_neg_mul_zpow_self (n : ℤ) {A : M} (h : IsUnit A.det) : A ^ (-n) *
lean 3 declaration is
forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R} (n : Nat), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) (HDiv.hDiv.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (DivInvMonoid.toHasDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (One.one.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasOne.{u2, u1} n' R (fun (a : n') (b : n') => _inst_1 a b) (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (AddMonoidWithOne.toOne.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (AddCommGroupWithOne.toAddGroupWithOne.{u2} R (Ring.toAddCommGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3))))))))) A) n) (HDiv.hDiv.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (DivInvMonoid.toHasDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (One.one.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasOne.{u2, u1} n' R (fun (a : n') (b : n') => _inst_1 a b) (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (AddMonoidWithOne.toOne.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (AddCommGroupWithOne.toAddGroupWithOne.{u2} R (Ring.toAddCommGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3))))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) A n))
but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} (n : Nat), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) (HDiv.hDiv.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (DivInvMonoid.toDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (NonAssocRing.toOne.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) A) n) (HDiv.hDiv.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (DivInvMonoid.toDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (NonAssocRing.toOne.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A n))
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} (n : Nat), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) (HDiv.hDiv.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (DivInvMonoid.toDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (Semiring.toOne.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))) A) n) (HDiv.hDiv.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (DivInvMonoid.toDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (Semiring.toOne.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A n))
Case conversion may be inaccurate. Consider using '#align matrix.one_div_pow Matrix.one_div_powₓ'. -/
theorem one_div_pow {A : M} (n : ℕ) : (1 / A) ^ n = 1 / A ^ n := by simp only [one_div, inv_pow']
#align matrix.one_div_pow Matrix.one_div_pow
@@ -591,7 +591,7 @@ theorem one_div_pow {A : M} (n : ℕ) : (1 / A) ^ n = 1 / A ^ n := by simp only
lean 3 declaration is
forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R} (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HDiv.hDiv.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (DivInvMonoid.toHasDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (One.one.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasOne.{u2, u1} n' R (fun (a : n') (b : n') => _inst_1 a b) (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (AddMonoidWithOne.toOne.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (AddCommGroupWithOne.toAddGroupWithOne.{u2} R (Ring.toAddCommGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3))))))))) A) n) (HDiv.hDiv.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (DivInvMonoid.toHasDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (One.one.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasOne.{u2, u1} n' R (fun (a : n') (b : n') => _inst_1 a b) (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (AddMonoidWithOne.toOne.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (AddCommGroupWithOne.toAddGroupWithOne.{u2} R (Ring.toAddCommGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3))))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n))
but is expected to have type
- forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HDiv.hDiv.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (DivInvMonoid.toDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (NonAssocRing.toOne.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) A) n) (HDiv.hDiv.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (DivInvMonoid.toDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (NonAssocRing.toOne.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n))
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HDiv.hDiv.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (DivInvMonoid.toDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (Semiring.toOne.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))) A) n) (HDiv.hDiv.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (DivInvMonoid.toDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (Semiring.toOne.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n))
Case conversion may be inaccurate. Consider using '#align matrix.one_div_zpow Matrix.one_div_zpowₓ'. -/
theorem one_div_zpow {A : M} (n : ℤ) : (1 / A) ^ n = 1 / A ^ n := by simp only [one_div, inv_zpow]
#align matrix.one_div_zpow Matrix.one_div_zpow
@@ -612,7 +612,7 @@ theorem transpose_zpow (A : M) : ∀ n : ℤ, (A ^ n)ᵀ = Aᵀ ^ n
lean 3 declaration is
forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] [_inst_4 : StarRing.{u2} R (NonUnitalRing.toNonUnitalSemiring.{u2} R (NonUnitalCommRing.toNonUnitalRing.{u2} R (CommRing.toNonUnitalCommRing.{u2} R _inst_3)))] (A : Matrix.{u1, u1, u2} n' n' R) (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (Matrix.conjTranspose.{u2, u1, u1} n' n' R (InvolutiveStar.toHasStar.{u2} R (StarAddMonoid.toHasInvolutiveStar.{u2} R (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u2} R (NonUnitalRing.toNonUnitalSemiring.{u2} R (NonUnitalCommRing.toNonUnitalRing.{u2} R (CommRing.toNonUnitalCommRing.{u2} R _inst_3)))))) (StarRing.toStarAddMonoid.{u2} R (NonUnitalRing.toNonUnitalSemiring.{u2} R (NonUnitalCommRing.toNonUnitalRing.{u2} R (CommRing.toNonUnitalCommRing.{u2} R _inst_3))) _inst_4))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (Matrix.conjTranspose.{u2, u1, u1} n' n' R (InvolutiveStar.toHasStar.{u2} R (StarAddMonoid.toHasInvolutiveStar.{u2} R (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u2} R (NonUnitalRing.toNonUnitalSemiring.{u2} R (NonUnitalCommRing.toNonUnitalRing.{u2} R (CommRing.toNonUnitalCommRing.{u2} R _inst_3)))))) (StarRing.toStarAddMonoid.{u2} R (NonUnitalRing.toNonUnitalSemiring.{u2} R (NonUnitalCommRing.toNonUnitalRing.{u2} R (CommRing.toNonUnitalCommRing.{u2} R _inst_3))) _inst_4))) A) n)
but is expected to have type
- forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] [_inst_4 : StarRing.{u2} R (NonUnitalRing.toNonUnitalSemiring.{u2} R (NonUnitalCommRing.toNonUnitalRing.{u2} R (CommRing.toNonUnitalCommRing.{u2} R _inst_3)))] (A : Matrix.{u1, u1, u2} n' n' R) (n : Int), Eq.{max (succ u1) (succ u2)} (Matrix.{u1, u1, u2} n' n' R) (Matrix.conjTranspose.{u2, u1, u1} n' n' R (InvolutiveStar.toStar.{u2} R (StarAddMonoid.toInvolutiveStar.{u2} R (AddMonoidWithOne.toAddMonoid.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (Ring.toAddGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3)))) (StarRing.toStarAddMonoid.{u2} R (NonUnitalRing.toNonUnitalSemiring.{u2} R (NonUnitalCommRing.toNonUnitalRing.{u2} R (CommRing.toNonUnitalCommRing.{u2} R _inst_3))) _inst_4))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.instDivInvMonoidMatrix.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.instDivInvMonoidMatrix.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (Matrix.conjTranspose.{u2, u1, u1} n' n' R (InvolutiveStar.toStar.{u2} R (StarAddMonoid.toInvolutiveStar.{u2} R (AddMonoidWithOne.toAddMonoid.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (Ring.toAddGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3)))) (StarRing.toStarAddMonoid.{u2} R (NonUnitalRing.toNonUnitalSemiring.{u2} R (NonUnitalCommRing.toNonUnitalRing.{u2} R (CommRing.toNonUnitalCommRing.{u2} R _inst_3))) _inst_4))) A) n)
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] [_inst_4 : StarRing.{u2} R (NonUnitalCommSemiring.toNonUnitalSemiring.{u2} R (NonUnitalCommRing.toNonUnitalCommSemiring.{u2} R (CommRing.toNonUnitalCommRing.{u2} R _inst_3)))] (A : Matrix.{u1, u1, u2} n' n' R) (n : Int), Eq.{max (succ u1) (succ u2)} (Matrix.{u1, u1, u2} n' n' R) (Matrix.conjTranspose.{u2, u1, u1} n' n' R (InvolutiveStar.toStar.{u2} R (StarAddMonoid.toInvolutiveStar.{u2} R (AddMonoidWithOne.toAddMonoid.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (Ring.toAddGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3)))) (StarRing.toStarAddMonoid.{u2} R (NonUnitalCommSemiring.toNonUnitalSemiring.{u2} R (NonUnitalCommRing.toNonUnitalCommSemiring.{u2} R (CommRing.toNonUnitalCommRing.{u2} R _inst_3))) _inst_4))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.instDivInvMonoidMatrix.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.instDivInvMonoidMatrix.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (Matrix.conjTranspose.{u2, u1, u1} n' n' R (InvolutiveStar.toStar.{u2} R (StarAddMonoid.toInvolutiveStar.{u2} R (AddMonoidWithOne.toAddMonoid.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (Ring.toAddGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3)))) (StarRing.toStarAddMonoid.{u2} R (NonUnitalCommSemiring.toNonUnitalSemiring.{u2} R (NonUnitalCommRing.toNonUnitalCommSemiring.{u2} R (CommRing.toNonUnitalCommRing.{u2} R _inst_3))) _inst_4))) A) n)
Case conversion may be inaccurate. Consider using '#align matrix.conj_transpose_zpow Matrix.conjTranspose_zpowₓ'. -/
@[simp]
theorem conjTranspose_zpow [StarRing R] (A : M) : ∀ n : ℤ, (A ^ n)ᴴ = Aᴴ ^ n
mathlib commit https://github.com/leanprover-community/mathlib/commit/86d04064ca33ee3d3405fbfc497d494fd2dd4796
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yakov Pechersky
! This file was ported from Lean 3 source module linear_algebra.matrix.zpow
-! leanprover-community/mathlib commit 03fda9112aa6708947da13944a19310684bfdfcb
+! leanprover-community/mathlib commit f2b757fc5c341d88741b9c4630b1e8ba973c5726
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -13,6 +13,9 @@ import Mathbin.LinearAlgebra.Matrix.NonsingularInverse
/-!
# Integer powers of square matrices
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
In this file, we define integer power of matrices, relying on
the nonsingular inverse definition for negative powers.
mathlib commit https://github.com/leanprover-community/mathlib/commit/fa78268d4d77cb2b2fbc89f0527e2e7807763780
@@ -42,6 +42,12 @@ noncomputable instance : DivInvMonoid M :=
section NatPow
+/- warning: matrix.inv_pow' -> Matrix.inv_pow' is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (n : Nat), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) n) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) A n))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Nat), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) n) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A n))
+Case conversion may be inaccurate. Consider using '#align matrix.inv_pow' Matrix.inv_pow'ₓ'. -/
@[simp]
theorem inv_pow' (A : M) (n : ℕ) : A⁻¹ ^ n = (A ^ n)⁻¹ :=
by
@@ -50,6 +56,12 @@ theorem inv_pow' (A : M) (n : ℕ) : A⁻¹ ^ n = (A ^ n)⁻¹ :=
· rw [pow_succ A, mul_eq_mul, mul_inv_rev, ← ih, ← mul_eq_mul, ← pow_succ']
#align matrix.inv_pow' Matrix.inv_pow'
+/- warning: matrix.pow_sub' -> Matrix.pow_sub' is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) {m : Nat} {n : Nat}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (LE.le.{0} Nat Nat.hasLe n m) -> (Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) A (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) m n)) (Matrix.mul.{u2, u1, u1, u1} n' n' n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) A m) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) A n))))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) {m : Nat} {n : Nat}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (LE.le.{0} Nat instLENat n m) -> (Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) m n)) (Matrix.mul.{u1, u2, u2, u2} n' n' n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A m) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A n))))
+Case conversion may be inaccurate. Consider using '#align matrix.pow_sub' Matrix.pow_sub'ₓ'. -/
theorem pow_sub' (A : M) {m n : ℕ} (ha : IsUnit A.det) (h : n ≤ m) :
A ^ (m - n) = A ^ m ⬝ (A ^ n)⁻¹ :=
by
@@ -58,6 +70,12 @@ theorem pow_sub' (A : M) {m n : ℕ} (ha : IsUnit A.det) (h : n ≤ m) :
simpa using ha.pow n
#align matrix.pow_sub' Matrix.pow_sub'
+/- warning: matrix.pow_inv_comm' -> Matrix.pow_inv_comm' is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (m : Nat) (n : Nat), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (Matrix.mul.{u2, u1, u1, u1} n' n' n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) m) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) A n)) (Matrix.mul.{u2, u1, u1, u1} n' n' n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) A n) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) m))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (m : Nat) (n : Nat), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (Matrix.mul.{u1, u2, u2, u2} n' n' n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) m) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A n)) (Matrix.mul.{u1, u2, u2, u2} n' n' n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A n) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) m))
+Case conversion may be inaccurate. Consider using '#align matrix.pow_inv_comm' Matrix.pow_inv_comm'ₓ'. -/
theorem pow_inv_comm' (A : M) (m n : ℕ) : A⁻¹ ^ m ⬝ A ^ n = A ^ n ⬝ A⁻¹ ^ m :=
by
induction' n with n IH generalizing m
@@ -83,12 +101,24 @@ section Zpow
open Int
+/- warning: matrix.one_zpow -> Matrix.one_zpow is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (One.one.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasOne.{u2, u1} n' R (fun (a : n') (b : n') => _inst_1 a b) (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (AddMonoidWithOne.toOne.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (AddCommGroupWithOne.toAddGroupWithOne.{u2} R (Ring.toAddCommGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3))))))))) n) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (One.one.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasOne.{u2, u1} n' R (fun (a : n') (b : n') => _inst_1 a b) (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (AddMonoidWithOne.toOne.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (AddCommGroupWithOne.toAddGroupWithOne.{u2} R (Ring.toAddCommGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3)))))))))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (NonAssocRing.toOne.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) n) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (NonAssocRing.toOne.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))
+Case conversion may be inaccurate. Consider using '#align matrix.one_zpow Matrix.one_zpowₓ'. -/
@[simp]
theorem one_zpow : ∀ n : ℤ, (1 : M) ^ n = 1
| (n : ℕ) => by rw [zpow_ofNat, one_pow]
| -[n+1] => by rw [zpow_negSucc, one_pow, inv_one]
#align matrix.one_zpow Matrix.one_zpow
+/- warning: matrix.zero_zpow -> Matrix.zero_zpow is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (z : Int), (Ne.{1} Int z (OfNat.ofNat.{0} Int 0 (OfNat.mk.{0} Int 0 (Zero.zero.{0} Int Int.hasZero)))) -> (Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 0 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 0 (Zero.zero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasZero.{u2, u1, u1} n' n' R (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))))))) z) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 0 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 0 (Zero.zero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasZero.{u2, u1, u1} n' n' R (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))))))))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (z : Int), (Ne.{1} Int z (OfNat.ofNat.{0} Int 0 (instOfNatInt 0))) -> (Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 0 (Zero.toOfNat0.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.zero.{u1, u2, u2} n' n' R (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))) z) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 0 (Zero.toOfNat0.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.zero.{u1, u2, u2} n' n' R (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))))
+Case conversion may be inaccurate. Consider using '#align matrix.zero_zpow Matrix.zero_zpowₓ'. -/
theorem zero_zpow : ∀ z : ℤ, z ≠ 0 → (0 : M) ^ z = 0
| (n : ℕ), h => by
rw [zpow_ofNat, zero_pow]
@@ -97,6 +127,12 @@ theorem zero_zpow : ∀ z : ℤ, z ≠ 0 → (0 : M) ^ z = 0
| -[n+1], h => by simp [zero_pow n.zero_lt_succ]
#align matrix.zero_zpow Matrix.zero_zpow
+/- warning: matrix.zero_zpow_eq -> Matrix.zero_zpow_eq is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 0 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 0 (Zero.zero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasZero.{u2, u1, u1} n' n' R (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))))))) n) (ite.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (Eq.{1} Int n (OfNat.ofNat.{0} Int 0 (OfNat.mk.{0} Int 0 (Zero.zero.{0} Int Int.hasZero)))) (Int.decidableEq n (OfNat.ofNat.{0} Int 0 (OfNat.mk.{0} Int 0 (Zero.zero.{0} Int Int.hasZero)))) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (One.one.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasOne.{u2, u1} n' R (fun (a : n') (b : n') => _inst_1 a b) (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (AddMonoidWithOne.toOne.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (AddCommGroupWithOne.toAddGroupWithOne.{u2} R (Ring.toAddCommGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3))))))))) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 0 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 0 (Zero.zero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasZero.{u2, u1, u1} n' n' R (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))))))))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 0 (Zero.toOfNat0.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.zero.{u1, u2, u2} n' n' R (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))) n) (ite.{succ (max u2 u1)} (Matrix.{u2, u2, u1} n' n' R) (Eq.{1} Int n (OfNat.ofNat.{0} Int 0 (instOfNatInt 0))) (Int.instDecidableEqInt n (OfNat.ofNat.{0} Int 0 (instOfNatInt 0))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (NonAssocRing.toOne.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 0 (Zero.toOfNat0.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.zero.{u1, u2, u2} n' n' R (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))))
+Case conversion may be inaccurate. Consider using '#align matrix.zero_zpow_eq Matrix.zero_zpow_eqₓ'. -/
theorem zero_zpow_eq (n : ℤ) : (0 : M) ^ n = if n = 0 then 1 else 0 :=
by
split_ifs with h
@@ -104,11 +140,23 @@ theorem zero_zpow_eq (n : ℤ) : (0 : M) ^ n = if n = 0 then 1 else 0 :=
· rw [zero_zpow _ h]
#align matrix.zero_zpow_eq Matrix.zero_zpow_eq
+/- warning: matrix.inv_zpow -> Matrix.inv_zpow is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) n) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) n) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n))
+Case conversion may be inaccurate. Consider using '#align matrix.inv_zpow Matrix.inv_zpowₓ'. -/
theorem inv_zpow (A : M) : ∀ n : ℤ, A⁻¹ ^ n = (A ^ n)⁻¹
| (n : ℕ) => by rw [zpow_ofNat, zpow_ofNat, inv_pow']
| -[n+1] => by rw [zpow_negSucc, zpow_negSucc, inv_pow']
#align matrix.inv_zpow Matrix.inv_zpow
+/- warning: matrix.zpow_neg_one -> Matrix.zpow_neg_one is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.hasNeg (OfNat.ofNat.{0} Int 1 (OfNat.mk.{0} Int 1 (One.one.{0} Int Int.hasOne))))) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A)
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.instNegInt (OfNat.ofNat.{0} Int 1 (instOfNatInt 1)))) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A)
+Case conversion may be inaccurate. Consider using '#align matrix.zpow_neg_one Matrix.zpow_neg_oneₓ'. -/
@[simp]
theorem zpow_neg_one (A : M) : A ^ (-1 : ℤ) = A⁻¹ :=
by
@@ -116,10 +164,22 @@ theorem zpow_neg_one (A : M) : A ^ (-1 : ℤ) = A⁻¹ :=
simp only [zpow_one, Int.ofNat_zero, Int.ofNat_succ, zpow_eq_pow, zero_add]
#align matrix.zpow_neg_one Matrix.zpow_neg_one
+/- warning: matrix.zpow_coe_nat -> Matrix.zpow_coe_nat is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (n : Nat), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) A n)
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Nat), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Nat.cast.{0} Int instNatCastInt n)) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A n)
+Case conversion may be inaccurate. Consider using '#align matrix.zpow_coe_nat Matrix.zpow_coe_natₓ'. -/
theorem zpow_coe_nat (A : M) (n : ℕ) : A ^ (n : ℤ) = A ^ n :=
zpow_ofNat _ _
#align matrix.zpow_coe_nat Matrix.zpow_coe_nat
+/- warning: matrix.zpow_neg_coe_nat -> Matrix.zpow_neg_coe_nat is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (n : Nat), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.hasNeg ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) n))) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) A n))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Nat), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.instNegInt (Nat.cast.{0} Int instNatCastInt n))) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A n))
+Case conversion may be inaccurate. Consider using '#align matrix.zpow_neg_coe_nat Matrix.zpow_neg_coe_natₓ'. -/
@[simp]
theorem zpow_neg_coe_nat (A : M) (n : ℕ) : A ^ (-n : ℤ) = (A ^ n)⁻¹ :=
by
@@ -128,6 +188,12 @@ theorem zpow_neg_coe_nat (A : M) (n : ℕ) : A ^ (-n : ℤ) = (A ^ n)⁻¹ :=
· exact DivInvMonoid.zpow_neg' _ _
#align matrix.zpow_neg_coe_nat Matrix.zpow_neg_coe_nat
+/- warning: is_unit.det_zpow -> IsUnit.det_zpow is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)))
+Case conversion may be inaccurate. Consider using '#align is_unit.det_zpow IsUnit.det_zpowₓ'. -/
theorem IsUnit.det_zpow {A : M} (h : IsUnit A.det) (n : ℤ) : IsUnit (A ^ n).det :=
by
cases n
@@ -135,6 +201,12 @@ theorem IsUnit.det_zpow {A : M} (h : IsUnit A.det) (n : ℤ) : IsUnit (A ^ n).de
· simpa using h.pow n.succ
#align is_unit.det_zpow IsUnit.det_zpow
+/- warning: matrix.is_unit_det_zpow_iff -> Matrix.isUnit_det_zpow_iff is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R} {z : Int}, Iff (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A z))) (Or (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) (Eq.{1} Int z (OfNat.ofNat.{0} Int 0 (OfNat.mk.{0} Int 0 (Zero.zero.{0} Int Int.hasZero)))))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} {z : Int}, Iff (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A z))) (Or (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) (Eq.{1} Int z (OfNat.ofNat.{0} Int 0 (instOfNatInt 0))))
+Case conversion may be inaccurate. Consider using '#align matrix.is_unit_det_zpow_iff Matrix.isUnit_det_zpow_iffₓ'. -/
theorem isUnit_det_zpow_iff {A : M} {z : ℤ} : IsUnit (A ^ z).det ↔ IsUnit A.det ∨ z = 0 :=
by
induction' z using Int.induction_on with z IH z IH
@@ -146,6 +218,12 @@ theorem isUnit_det_zpow_iff {A : M} {z : ℤ} : IsUnit (A ^ z).det ↔ IsUnit A.
simp
#align matrix.is_unit_det_zpow_iff Matrix.isUnit_det_zpow_iff
+/- warning: matrix.zpow_neg -> Matrix.zpow_neg is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.hasNeg n)) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.instNegInt n)) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)))
+Case conversion may be inaccurate. Consider using '#align matrix.zpow_neg Matrix.zpow_negₓ'. -/
theorem zpow_neg {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (-n) = (A ^ n)⁻¹
| (n : ℕ) => zpow_neg_coe_nat _ _
| -[n+1] =>
@@ -155,10 +233,22 @@ theorem zpow_neg {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (-n) = (A ^ n)⁻
exact h.pow _
#align matrix.zpow_neg Matrix.zpow_neg
+/- warning: matrix.inv_zpow' -> Matrix.inv_zpow' is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) n) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.hasNeg n)))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A) n) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.instNegInt n)))
+Case conversion may be inaccurate. Consider using '#align matrix.inv_zpow' Matrix.inv_zpow'ₓ'. -/
theorem inv_zpow' {A : M} (h : IsUnit A.det) (n : ℤ) : A⁻¹ ^ n = A ^ (-n) := by
rw [zpow_neg h, inv_zpow]
#align matrix.inv_zpow' Matrix.inv_zpow'
+/- warning: matrix.zpow_add_one -> Matrix.zpow_add_one is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.hasAdd) n (OfNat.ofNat.{0} Int 1 (OfNat.mk.{0} Int 1 (One.one.{0} Int Int.hasOne))))) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) A))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.instAddInt) n (OfNat.ofNat.{0} Int 1 (instOfNatInt 1)))) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) A))
+Case conversion may be inaccurate. Consider using '#align matrix.zpow_add_one Matrix.zpow_add_oneₓ'. -/
theorem zpow_add_one {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (n + 1) = A ^ n * A
| (n : ℕ) => by simp only [← Nat.cast_succ, pow_succ', zpow_ofNat]
| -((n : ℕ) + 1) =>
@@ -172,6 +262,12 @@ theorem zpow_add_one {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (n + 1) = A ^
#align matrix.zpow_add_one Matrix.zpow_add_one
+/- warning: matrix.zpow_sub_one -> Matrix.zpow_sub_one is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HSub.hSub.{0, 0, 0} Int Int Int (instHSub.{0} Int Int.hasSub) n (OfNat.ofNat.{0} Int 1 (OfNat.mk.{0} Int 1 (One.one.{0} Int Int.hasOne))))) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) (Inv.inv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasInv.{u1, u2} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A)))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HSub.hSub.{0, 0, 0} Int Int Int (instHSub.{0} Int Int.instSubInt) n (OfNat.ofNat.{0} Int 1 (instOfNatInt 1)))) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) (Inv.inv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.inv.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) _inst_3) A)))
+Case conversion may be inaccurate. Consider using '#align matrix.zpow_sub_one Matrix.zpow_sub_oneₓ'. -/
theorem zpow_sub_one {A : M} (h : IsUnit A.det) (n : ℤ) : A ^ (n - 1) = A ^ n * A⁻¹ :=
calc
A ^ (n - 1) = A ^ (n - 1) * A * A⁻¹ := by
@@ -180,6 +276,12 @@ theorem zpow_sub_one {A : M} (h : IsUnit A.det) (n : ℤ) : A ^ (n - 1) = A ^ n
#align matrix.zpow_sub_one Matrix.zpow_sub_one
+/- warning: matrix.zpow_add -> Matrix.zpow_add is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (m : Int) (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.hasAdd) m n)) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (m : Int) (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.instAddInt) m n)) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)))
+Case conversion may be inaccurate. Consider using '#align matrix.zpow_add Matrix.zpow_addₓ'. -/
theorem zpow_add {A : M} (ha : IsUnit A.det) (m n : ℤ) : A ^ (m + n) = A ^ m * A ^ n :=
by
induction' n using Int.induction_on with n ihn n ihn
@@ -188,6 +290,12 @@ theorem zpow_add {A : M} (ha : IsUnit A.det) (m n : ℤ) : A ^ (m + n) = A ^ m *
· rw [zpow_sub_one ha, ← mul_assoc, ← ihn, ← zpow_sub_one ha, add_sub_assoc]
#align matrix.zpow_add Matrix.zpow_add
+/- warning: matrix.zpow_add_of_nonpos -> Matrix.zpow_add_of_nonpos is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R} {m : Int} {n : Int}, (LE.le.{0} Int Int.hasLe m (OfNat.ofNat.{0} Int 0 (OfNat.mk.{0} Int 0 (Zero.zero.{0} Int Int.hasZero)))) -> (LE.le.{0} Int Int.hasLe n (OfNat.ofNat.{0} Int 0 (OfNat.mk.{0} Int 0 (Zero.zero.{0} Int Int.hasZero)))) -> (Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.hasAdd) m n)) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} {m : Int} {n : Int}, (LE.le.{0} Int Int.instLEInt m (OfNat.ofNat.{0} Int 0 (instOfNatInt 0))) -> (LE.le.{0} Int Int.instLEInt n (OfNat.ofNat.{0} Int 0 (instOfNatInt 0))) -> (Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.instAddInt) m n)) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)))
+Case conversion may be inaccurate. Consider using '#align matrix.zpow_add_of_nonpos Matrix.zpow_add_of_nonposₓ'. -/
theorem zpow_add_of_nonpos {A : M} {m n : ℤ} (hm : m ≤ 0) (hn : n ≤ 0) :
A ^ (m + n) = A ^ m * A ^ n :=
by
@@ -198,6 +306,12 @@ theorem zpow_add_of_nonpos {A : M} {m n : ℤ} (hm : m ≤ 0) (hn : n ≤ 0) :
simp_rw [← neg_add, ← Int.ofNat_add, zpow_neg_coe_nat, ← inv_pow', h, pow_add]
#align matrix.zpow_add_of_nonpos Matrix.zpow_add_of_nonpos
+/- warning: matrix.zpow_add_of_nonneg -> Matrix.zpow_add_of_nonneg is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R} {m : Int} {n : Int}, (LE.le.{0} Int Int.hasLe (OfNat.ofNat.{0} Int 0 (OfNat.mk.{0} Int 0 (Zero.zero.{0} Int Int.hasZero))) m) -> (LE.le.{0} Int Int.hasLe (OfNat.ofNat.{0} Int 0 (OfNat.mk.{0} Int 0 (Zero.zero.{0} Int Int.hasZero))) n) -> (Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.hasAdd) m n)) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} {m : Int} {n : Int}, (LE.le.{0} Int Int.instLEInt (OfNat.ofNat.{0} Int 0 (instOfNatInt 0)) m) -> (LE.le.{0} Int Int.instLEInt (OfNat.ofNat.{0} Int 0 (instOfNatInt 0)) n) -> (Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.instAddInt) m n)) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)))
+Case conversion may be inaccurate. Consider using '#align matrix.zpow_add_of_nonneg Matrix.zpow_add_of_nonnegₓ'. -/
theorem zpow_add_of_nonneg {A : M} {m n : ℤ} (hm : 0 ≤ m) (hn : 0 ≤ n) :
A ^ (m + n) = A ^ m * A ^ n :=
by
@@ -206,10 +320,22 @@ theorem zpow_add_of_nonneg {A : M} {m n : ℤ} (hm : 0 ≤ m) (hn : 0 ≤ n) :
rw [← Int.ofNat_add, zpow_ofNat, zpow_ofNat, zpow_ofNat, pow_add]
#align matrix.zpow_add_of_nonneg Matrix.zpow_add_of_nonneg
+/- warning: matrix.zpow_one_add -> Matrix.zpow_one_add is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (i : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.hasAdd) (OfNat.ofNat.{0} Int 1 (OfNat.mk.{0} Int 1 (One.one.{0} Int Int.hasOne))) i)) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) A (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A i)))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (i : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.instAddInt) (OfNat.ofNat.{0} Int 1 (instOfNatInt 1)) i)) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) A (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A i)))
+Case conversion may be inaccurate. Consider using '#align matrix.zpow_one_add Matrix.zpow_one_addₓ'. -/
theorem zpow_one_add {A : M} (h : IsUnit A.det) (i : ℤ) : A ^ (1 + i) = A * A ^ i := by
rw [zpow_add h, zpow_one]
#align matrix.zpow_one_add Matrix.zpow_one_add
+/- warning: matrix.semiconj_by.zpow_right -> Matrix.SemiconjBy.zpow_right is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R} {X : Matrix.{u1, u1, u2} n' n' R} {Y : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 X)) -> (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 Y)) -> (SemiconjBy.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) A X Y) -> (forall (m : Int), SemiconjBy.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) A (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) X m) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) Y m))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} {X : Matrix.{u2, u2, u1} n' n' R} {Y : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 X)) -> (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 Y)) -> (SemiconjBy.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) A X Y) -> (forall (m : Int), SemiconjBy.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) A (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) X m) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) Y m))
+Case conversion may be inaccurate. Consider using '#align matrix.semiconj_by.zpow_right Matrix.SemiconjBy.zpow_rightₓ'. -/
theorem SemiconjBy.zpow_right {A X Y : M} (hx : IsUnit X.det) (hy : IsUnit Y.det)
(h : SemiconjBy A X Y) : ∀ m : ℤ, SemiconjBy A (X ^ m) (Y ^ m)
| (n : ℕ) => by simp [h.pow_right n]
@@ -229,6 +355,12 @@ theorem SemiconjBy.zpow_right {A X Y : M} (hx : IsUnit X.det) (hy : IsUnit Y.det
hy'.coe_inv_mul, one_smul, Matrix.mul_one, Matrix.one_mul]
#align matrix.semiconj_by.zpow_right Matrix.SemiconjBy.zpow_right
+/- warning: matrix.commute.zpow_right -> Matrix.Commute.zpow_right is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R} {B : Matrix.{u1, u1, u2} n' n' R}, (Commute.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) A B) -> (forall (m : Int), Commute.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) A (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) B m))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} {B : Matrix.{u2, u2, u1} n' n' R}, (Commute.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) A B) -> (forall (m : Int), Commute.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) A (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) B m))
+Case conversion may be inaccurate. Consider using '#align matrix.commute.zpow_right Matrix.Commute.zpow_rightₓ'. -/
theorem Commute.zpow_right {A B : M} (h : Commute A B) (m : ℤ) : Commute A (B ^ m) :=
by
rcases nonsing_inv_cancel_or_zero B with (⟨hB, hB'⟩ | hB)
@@ -238,26 +370,62 @@ theorem Commute.zpow_right {A B : M} (h : Commute A B) (m : ℤ) : Commute A (B
· simp [← inv_pow', hB]
#align matrix.commute.zpow_right Matrix.Commute.zpow_right
+/- warning: matrix.commute.zpow_left -> Matrix.Commute.zpow_left is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R} {B : Matrix.{u1, u1, u2} n' n' R}, (Commute.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) A B) -> (forall (m : Int), Commute.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) B)
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} {B : Matrix.{u2, u2, u1} n' n' R}, (Commute.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) A B) -> (forall (m : Int), Commute.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) B)
+Case conversion may be inaccurate. Consider using '#align matrix.commute.zpow_left Matrix.Commute.zpow_leftₓ'. -/
theorem Commute.zpow_left {A B : M} (h : Commute A B) (m : ℤ) : Commute (A ^ m) B :=
(Commute.zpow_right h.symm m).symm
#align matrix.commute.zpow_left Matrix.Commute.zpow_left
+/- warning: matrix.commute.zpow_zpow -> Matrix.Commute.zpow_zpow is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R} {B : Matrix.{u1, u1, u2} n' n' R}, (Commute.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) A B) -> (forall (m : Int) (n : Int), Commute.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) B n))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} {B : Matrix.{u2, u2, u1} n' n' R}, (Commute.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) A B) -> (forall (m : Int) (n : Int), Commute.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) B n))
+Case conversion may be inaccurate. Consider using '#align matrix.commute.zpow_zpow Matrix.Commute.zpow_zpowₓ'. -/
theorem Commute.zpow_zpow {A B : M} (h : Commute A B) (m n : ℤ) : Commute (A ^ m) (B ^ n) :=
Commute.zpow_right (Commute.zpow_left h _) _
#align matrix.commute.zpow_zpow Matrix.Commute.zpow_zpow
+/- warning: matrix.commute.zpow_self -> Matrix.Commute.zpow_self is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (n : Int), Commute.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) A
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Int), Commute.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) A
+Case conversion may be inaccurate. Consider using '#align matrix.commute.zpow_self Matrix.Commute.zpow_selfₓ'. -/
theorem Commute.zpow_self (A : M) (n : ℤ) : Commute (A ^ n) A :=
Commute.zpow_left (Commute.refl A) _
#align matrix.commute.zpow_self Matrix.Commute.zpow_self
+/- warning: matrix.commute.self_zpow -> Matrix.Commute.self_zpow is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (n : Int), Commute.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) A (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Int), Commute.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) A (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)
+Case conversion may be inaccurate. Consider using '#align matrix.commute.self_zpow Matrix.Commute.self_zpowₓ'. -/
theorem Commute.self_zpow (A : M) (n : ℤ) : Commute A (A ^ n) :=
Commute.zpow_right (Commute.refl A) _
#align matrix.commute.self_zpow Matrix.Commute.self_zpow
+/- warning: matrix.commute.zpow_zpow_self -> Matrix.Commute.zpow_zpow_self is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (m : Int) (n : Int), Commute.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (m : Int) (n : Int), Commute.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)
+Case conversion may be inaccurate. Consider using '#align matrix.commute.zpow_zpow_self Matrix.Commute.zpow_zpow_selfₓ'. -/
theorem Commute.zpow_zpow_self (A : M) (m n : ℤ) : Commute (A ^ m) (A ^ n) :=
Commute.zpow_zpow (Commute.refl A) _ _
#align matrix.commute.zpow_zpow_self Matrix.Commute.zpow_zpow_self
+/- warning: matrix.zpow_bit0 -> Matrix.zpow_bit0 is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (bit0.{0} Int Int.hasAdd n)) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (bit0.{0} Int Int.instAddInt n)) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n))
+Case conversion may be inaccurate. Consider using '#align matrix.zpow_bit0 Matrix.zpow_bit0ₓ'. -/
theorem zpow_bit0 (A : M) (n : ℤ) : A ^ bit0 n = A ^ n * A ^ n :=
by
cases' le_total 0 n with nonneg nonpos
@@ -265,6 +433,12 @@ theorem zpow_bit0 (A : M) (n : ℤ) : A ^ bit0 n = A ^ n * A ^ n :=
· exact zpow_add_of_nonpos nonpos nonpos
#align matrix.zpow_bit0 Matrix.zpow_bit0
+/- warning: matrix.zpow_add_one_of_ne_neg_one -> Matrix.zpow_add_one_of_ne_neg_one is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R} (n : Int), (Ne.{1} Int n (Neg.neg.{0} Int Int.hasNeg (OfNat.ofNat.{0} Int 1 (OfNat.mk.{0} Int 1 (One.one.{0} Int Int.hasOne))))) -> (Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.hasAdd) n (OfNat.ofNat.{0} Int 1 (OfNat.mk.{0} Int 1 (One.one.{0} Int Int.hasOne))))) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) A))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} (n : Int), (Ne.{1} Int n (Neg.neg.{0} Int Int.instNegInt (OfNat.ofNat.{0} Int 1 (instOfNatInt 1)))) -> (Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HAdd.hAdd.{0, 0, 0} Int Int Int (instHAdd.{0} Int Int.instAddInt) n (OfNat.ofNat.{0} Int 1 (instOfNatInt 1)))) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) A))
+Case conversion may be inaccurate. Consider using '#align matrix.zpow_add_one_of_ne_neg_one Matrix.zpow_add_one_of_ne_neg_oneₓ'. -/
theorem zpow_add_one_of_ne_neg_one {A : M} : ∀ n : ℤ, n ≠ -1 → A ^ (n + 1) = A ^ n * A
| (n : ℕ), _ => by simp only [pow_succ', ← Nat.cast_succ, zpow_ofNat]
| -1, h => absurd rfl h
@@ -276,6 +450,12 @@ theorem zpow_add_one_of_ne_neg_one {A : M} : ∀ n : ℤ, n ≠ -1 → A ^ (n +
simp_rw [zpow_neg_coe_nat, ← inv_pow', h, zero_pow Nat.succ_pos', MulZeroClass.zero_mul]
#align matrix.zpow_add_one_of_ne_neg_one Matrix.zpow_add_one_of_ne_neg_one
+/- warning: matrix.zpow_bit1 -> Matrix.zpow_bit1 is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (bit1.{0} Int Int.hasOne Int.hasAdd n)) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)) A)
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (bit1.{0} Int (NonAssocRing.toOne.{0} Int (Ring.toNonAssocRing.{0} Int Int.instRingInt)) Int.instAddInt n)) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)) A)
+Case conversion may be inaccurate. Consider using '#align matrix.zpow_bit1 Matrix.zpow_bit1ₓ'. -/
theorem zpow_bit1 (A : M) (n : ℤ) : A ^ bit1 n = A ^ n * A ^ n * A :=
by
rw [bit1, zpow_add_one_of_ne_neg_one, zpow_bit0]
@@ -283,6 +463,12 @@ theorem zpow_bit1 (A : M) (n : ℤ) : A ^ bit1 n = A ^ n * A ^ n * A :=
simpa using congr_arg bodd h
#align matrix.zpow_bit1 Matrix.zpow_bit1
+/- warning: matrix.zpow_mul -> Matrix.zpow_mul is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R), (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (m : Int) (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HMul.hMul.{0, 0, 0} Int Int Int (instHMul.{0} Int Int.hasMul) m n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) n))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R), (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (m : Int) (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HMul.hMul.{0, 0, 0} Int Int Int (instHMul.{0} Int Int.instMulInt) m n)) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A m) n))
+Case conversion may be inaccurate. Consider using '#align matrix.zpow_mul Matrix.zpow_mulₓ'. -/
theorem zpow_mul (A : M) (h : IsUnit A.det) : ∀ m n : ℤ, A ^ (m * n) = (A ^ m) ^ n
| (m : ℕ), (n : ℕ) => by rw [zpow_ofNat, zpow_ofNat, ← pow_mul, ← zpow_ofNat, Int.ofNat_mul]
| (m : ℕ), -[n+1] => by
@@ -299,10 +485,22 @@ theorem zpow_mul (A : M) (h : IsUnit A.det) : ∀ m n : ℤ, A ^ (m * n) = (A ^
exact h.pow _
#align matrix.zpow_mul Matrix.zpow_mul
+/- warning: matrix.zpow_mul' -> Matrix.zpow_mul' is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R), (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (m : Int) (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HMul.hMul.{0, 0, 0} Int Int Int (instHMul.{0} Int Int.hasMul) m n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) m))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R), (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (m : Int) (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HMul.hMul.{0, 0, 0} Int Int Int (instHMul.{0} Int Int.instMulInt) m n)) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n) m))
+Case conversion may be inaccurate. Consider using '#align matrix.zpow_mul' Matrix.zpow_mul'ₓ'. -/
theorem zpow_mul' (A : M) (h : IsUnit A.det) (m n : ℤ) : A ^ (m * n) = (A ^ n) ^ m := by
rw [mul_comm, zpow_mul _ h]
#align matrix.zpow_mul' Matrix.zpow_mul'
+/- warning: matrix.coe_units_zpow -> Matrix.coe_units_zpow is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (u : Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) ((fun (a : Type.{max u1 u2}) (b : Type.{max u1 u2}) [self : HasLiftT.{succ (max u1 u2), succ (max u1 u2)} a b] => self.0) (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Matrix.{u1, u1, u2} n' n' R) (HasLiftT.mk.{succ (max u1 u2), succ (max u1 u2)} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Matrix.{u1, u1, u2} n' n' R) (CoeTCₓ.coe.{succ (max u1 u2), succ (max u1 u2)} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Matrix.{u1, u1, u2} n' n' R) (coeBase.{succ (max u1 u2), succ (max u1 u2)} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Matrix.{u1, u1, u2} n' n' R) (Units.hasCoe.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) Int (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (instHPow.{max u1 u2, 0} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) Int (DivInvMonoid.Pow.{max u1 u2} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Group.toDivInvMonoid.{max u1 u2} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Units.group.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))))) u n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) ((fun (a : Type.{max u1 u2}) (b : Type.{max u1 u2}) [self : HasLiftT.{succ (max u1 u2), succ (max u1 u2)} a b] => self.0) (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Matrix.{u1, u1, u2} n' n' R) (HasLiftT.mk.{succ (max u1 u2), succ (max u1 u2)} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Matrix.{u1, u1, u2} n' n' R) (CoeTCₓ.coe.{succ (max u1 u2), succ (max u1 u2)} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Matrix.{u1, u1, u2} n' n' R) (coeBase.{succ (max u1 u2), succ (max u1 u2)} (Units.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3)))) (Matrix.{u1, u1, u2} n' n' R) (Units.hasCoe.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))))) u) n)
+but is expected to have type
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (u : Units.{max u2 u1} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b))))) (n : Int), Eq.{max (succ u1) (succ u2)} (Matrix.{u1, u1, u2} n' n' R) (Units.val.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Units.{max u2 u1} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b))))) Int (Units.{max u2 u1} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b))))) (instHPow.{max u1 u2, 0} (Units.{max u2 u1} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b))))) Int (DivInvMonoid.Pow.{max u1 u2} (Units.{max u2 u1} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b))))) (Group.toDivInvMonoid.{max u1 u2} (Units.{max u2 u1} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b))))) (Units.instGroupUnits.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))))) u n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.instDivInvMonoidMatrix.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (Units.val.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (MonoidWithZero.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Semiring.toMonoidWithZero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.semiring.{u2, u1} n' R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))) u) n)
+Case conversion may be inaccurate. Consider using '#align matrix.coe_units_zpow Matrix.coe_units_zpowₓ'. -/
@[simp, norm_cast]
theorem coe_units_zpow (u : Mˣ) : ∀ n : ℤ, ((u ^ n : Mˣ) : M) = u ^ n
| (n : ℕ) => by rw [_root_.zpow_coe_nat, zpow_ofNat, Units.val_pow_eq_pow_val]
@@ -310,6 +508,12 @@ theorem coe_units_zpow (u : Mˣ) : ∀ n : ℤ, ((u ^ n : Mˣ) : M) = u ^ n
rw [zpow_negSucc, zpow_negSucc, ← inv_pow, u⁻¹.val_pow_eq_pow_val, ← inv_pow', coe_units_inv]
#align matrix.coe_units_zpow Matrix.coe_units_zpow
+/- warning: matrix.zpow_ne_zero_of_is_unit_det -> Matrix.zpow_ne_zero_of_isUnit_det is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] [_inst_4 : Nonempty.{succ u1} n'] [_inst_5 : Nontrivial.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (z : Int), Ne.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A z) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 0 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 0 (Zero.zero.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasZero.{u2, u1, u1} n' n' R (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))))))))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] [_inst_4 : Nonempty.{succ u2} n'] [_inst_5 : Nontrivial.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (z : Int), Ne.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A z) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 0 (Zero.toOfNat0.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.zero.{u1, u2, u2} n' n' R (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)))))))
+Case conversion may be inaccurate. Consider using '#align matrix.zpow_ne_zero_of_is_unit_det Matrix.zpow_ne_zero_of_isUnit_detₓ'. -/
theorem zpow_ne_zero_of_isUnit_det [Nonempty n'] [Nontrivial R] {A : M} (ha : IsUnit A.det)
(z : ℤ) : A ^ z ≠ 0 := by
have := ha.det_zpow z
@@ -318,10 +522,22 @@ theorem zpow_ne_zero_of_isUnit_det [Nonempty n'] [Nontrivial R] {A : M} (ha : Is
exact not_isUnit_zero
#align matrix.zpow_ne_zero_of_is_unit_det Matrix.zpow_ne_zero_of_isUnit_det
+/- warning: matrix.zpow_sub -> Matrix.zpow_sub is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (z1 : Int) (z2 : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HSub.hSub.{0, 0, 0} Int Int Int (instHSub.{0} Int Int.hasSub) z1 z2)) (HDiv.hDiv.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (DivInvMonoid.toHasDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A z1) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A z2)))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (forall (z1 : Int) (z2 : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (HSub.hSub.{0, 0, 0} Int Int Int (instHSub.{0} Int Int.instSubInt) z1 z2)) (HDiv.hDiv.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (DivInvMonoid.toDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A z1) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A z2)))
+Case conversion may be inaccurate. Consider using '#align matrix.zpow_sub Matrix.zpow_subₓ'. -/
theorem zpow_sub {A : M} (ha : IsUnit A.det) (z1 z2 : ℤ) : A ^ (z1 - z2) = A ^ z1 / A ^ z2 := by
rw [sub_eq_add_neg, zpow_add ha, zpow_neg ha, div_eq_mul_inv]
#align matrix.zpow_sub Matrix.zpow_sub
+/- warning: matrix.commute.mul_zpow -> Matrix.Commute.mul_zpow is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R} {B : Matrix.{u1, u1, u2} n' n' R}, (Commute.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) A B) -> (forall (i : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) A B) i) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A i) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) B i)))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} {B : Matrix.{u2, u2, u1} n' n' R}, (Commute.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) A B) -> (forall (i : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) A B) i) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A i) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) B i)))
+Case conversion may be inaccurate. Consider using '#align matrix.commute.mul_zpow Matrix.Commute.mul_zpowₓ'. -/
theorem Commute.mul_zpow {A B : M} (h : Commute A B) : ∀ i : ℤ, (A * B) ^ i = A ^ i * B ^ i
| (n : ℕ) => by simp [h.mul_pow n, -mul_eq_mul]
| -[n+1] => by
@@ -329,30 +545,72 @@ theorem Commute.mul_zpow {A B : M} (h : Commute A B) : ∀ i : ℤ, (A * B) ^ i
h.mul_pow n.succ, (h.pow_pow _ _).Eq]
#align matrix.commute.mul_zpow Matrix.Commute.mul_zpow
+/- warning: matrix.zpow_bit0' -> Matrix.zpow_bit0' is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (bit0.{0} Int Int.hasAdd n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) A A) n)
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (bit0.{0} Int Int.instAddInt n)) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) A A) n)
+Case conversion may be inaccurate. Consider using '#align matrix.zpow_bit0' Matrix.zpow_bit0'ₓ'. -/
theorem zpow_bit0' (A : M) (n : ℤ) : A ^ bit0 n = (A * A) ^ n :=
(zpow_bit0 A n).trans (Commute.mul_zpow (Commute.refl A) n).symm
#align matrix.zpow_bit0' Matrix.zpow_bit0'
+/- warning: matrix.zpow_bit1' -> Matrix.zpow_bit1' is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (bit1.{0} Int Int.hasOne Int.hasAdd n)) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) A A) n) A)
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (bit1.{0} Int (NonAssocRing.toOne.{0} Int (Ring.toNonAssocRing.{0} Int Int.instRingInt)) Int.instAddInt n)) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) A A) n) A)
+Case conversion may be inaccurate. Consider using '#align matrix.zpow_bit1' Matrix.zpow_bit1'ₓ'. -/
theorem zpow_bit1' (A : M) (n : ℤ) : A ^ bit1 n = (A * A) ^ n * A := by
rw [zpow_bit1, Commute.mul_zpow (Commute.refl A)]
#align matrix.zpow_bit1' Matrix.zpow_bit1'
+/- warning: matrix.zpow_neg_mul_zpow_self -> Matrix.zpow_neg_mul_zpow_self is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (n : Int) {A : Matrix.{u1, u1, u2} n' n' R}, (IsUnit.{u2} R (Ring.toMonoid.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Matrix.det.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHMul.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasMul.{u2, u1} n' R _inst_2 (Distrib.toHasMul.{u2} R (Ring.toDistrib.{u2} R (CommRing.toRing.{u2} R _inst_3))) (AddCommGroup.toAddCommMonoid.{u2} R (NonUnitalNonAssocRing.toAddCommGroup.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.hasNeg n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (One.one.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasOne.{u2, u1} n' R (fun (a : n') (b : n') => _inst_1 a b) (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (AddMonoidWithOne.toOne.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (AddCommGroupWithOne.toAddGroupWithOne.{u2} R (Ring.toAddCommGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3))))))))))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (n : Int) {A : Matrix.{u2, u2, u1} n' n' R}, (IsUnit.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (Matrix.det.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3 A)) -> (Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHMul.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instMulMatrix.{u1, u2} n' R _inst_2 (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3))))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A (Neg.neg.{0} Int Int.instNegInt n)) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (NonAssocRing.toOne.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))))
+Case conversion may be inaccurate. Consider using '#align matrix.zpow_neg_mul_zpow_self Matrix.zpow_neg_mul_zpow_selfₓ'. -/
theorem zpow_neg_mul_zpow_self (n : ℤ) {A : M} (h : IsUnit A.det) : A ^ (-n) * A ^ n = 1 := by
rw [zpow_neg h, mul_eq_mul, nonsing_inv_mul _ (h.det_zpow _)]
#align matrix.zpow_neg_mul_zpow_self Matrix.zpow_neg_mul_zpow_self
+/- warning: matrix.one_div_pow -> Matrix.one_div_pow is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R} (n : Nat), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) (HDiv.hDiv.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (DivInvMonoid.toHasDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (One.one.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasOne.{u2, u1} n' R (fun (a : n') (b : n') => _inst_1 a b) (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (AddMonoidWithOne.toOne.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (AddCommGroupWithOne.toAddGroupWithOne.{u2} R (Ring.toAddCommGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3))))))))) A) n) (HDiv.hDiv.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (DivInvMonoid.toHasDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (One.one.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasOne.{u2, u1} n' R (fun (a : n') (b : n') => _inst_1 a b) (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (AddMonoidWithOne.toOne.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (AddCommGroupWithOne.toAddGroupWithOne.{u2} R (Ring.toAddCommGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3))))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Nat (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Nat (Monoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Ring.toMonoid.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.ring.{u2, u1} n' R _inst_2 (fun (a : n') (b : n') => _inst_1 a b) (CommRing.toRing.{u2} R _inst_3))))) A n))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} (n : Nat), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) (HDiv.hDiv.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (DivInvMonoid.toDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (NonAssocRing.toOne.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) A) n) (HDiv.hDiv.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (DivInvMonoid.toDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (NonAssocRing.toOne.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Nat (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Nat (Monoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (MonoidWithZero.toMonoid.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Semiring.toMonoidWithZero.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.semiring.{u1, u2} n' R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) _inst_2 (fun (a : n') (b : n') => _inst_1 a b)))))) A n))
+Case conversion may be inaccurate. Consider using '#align matrix.one_div_pow Matrix.one_div_powₓ'. -/
theorem one_div_pow {A : M} (n : ℕ) : (1 / A) ^ n = 1 / A ^ n := by simp only [one_div, inv_pow']
#align matrix.one_div_pow Matrix.one_div_pow
+/- warning: matrix.one_div_zpow -> Matrix.one_div_zpow is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] {A : Matrix.{u1, u1, u2} n' n' R} (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HDiv.hDiv.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (DivInvMonoid.toHasDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (One.one.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasOne.{u2, u1} n' R (fun (a : n') (b : n') => _inst_1 a b) (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (AddMonoidWithOne.toOne.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (AddCommGroupWithOne.toAddGroupWithOne.{u2} R (Ring.toAddCommGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3))))))))) A) n) (HDiv.hDiv.{max u1 u2, max u1 u2, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (Matrix.{u1, u1, u2} n' n' R) (instHDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (DivInvMonoid.toHasDiv.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (OfNat.mk.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) 1 (One.one.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.hasOne.{u2, u1} n' R (fun (a : n') (b : n') => _inst_1 a b) (MulZeroClass.toHasZero.{u2} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_3)))))) (AddMonoidWithOne.toOne.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (AddCommGroupWithOne.toAddGroupWithOne.{u2} R (Ring.toAddCommGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3))))))))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n))
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] {A : Matrix.{u2, u2, u1} n' n' R} (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (HDiv.hDiv.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (DivInvMonoid.toDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (NonAssocRing.toOne.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) A) n) (HDiv.hDiv.{max u2 u1, max u2 u1, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (Matrix.{u2, u2, u1} n' n' R) (instHDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (DivInvMonoid.toDiv.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (OfNat.ofNat.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) 1 (One.toOfNat1.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.one.{u1, u2} n' R (fun (a : n') (b : n') => _inst_1 a b) (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (NonAssocRing.toOne.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n))
+Case conversion may be inaccurate. Consider using '#align matrix.one_div_zpow Matrix.one_div_zpowₓ'. -/
theorem one_div_zpow {A : M} (n : ℤ) : (1 / A) ^ n = 1 / A ^ n := by simp only [one_div, inv_zpow]
#align matrix.one_div_zpow Matrix.one_div_zpow
+/- warning: matrix.transpose_zpow -> Matrix.transpose_zpow is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] (A : Matrix.{u1, u1, u2} n' n' R) (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (Matrix.transpose.{u2, u1, u1} n' n' R (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (Matrix.transpose.{u2, u1, u1} n' n' R A) n)
+but is expected to have type
+ forall {n' : Type.{u2}} [_inst_1 : DecidableEq.{succ u2} n'] [_inst_2 : Fintype.{u2} n'] {R : Type.{u1}} [_inst_3 : CommRing.{u1} R] (A : Matrix.{u2, u2, u1} n' n' R) (n : Int), Eq.{max (succ u2) (succ u1)} (Matrix.{u2, u2, u1} n' n' R) (Matrix.transpose.{u1, u2, u2} n' n' R (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)) (HPow.hPow.{max u2 u1, 0, max u2 u1} (Matrix.{u2, u2, u1} n' n' R) Int (Matrix.{u2, u2, u1} n' n' R) (instHPow.{max u2 u1, 0} (Matrix.{u2, u2, u1} n' n' R) Int (DivInvMonoid.Pow.{max u2 u1} (Matrix.{u2, u2, u1} n' n' R) (Matrix.instDivInvMonoidMatrix.{u2, u1} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (Matrix.transpose.{u1, u2, u2} n' n' R A) n)
+Case conversion may be inaccurate. Consider using '#align matrix.transpose_zpow Matrix.transpose_zpowₓ'. -/
@[simp]
theorem transpose_zpow (A : M) : ∀ n : ℤ, (A ^ n)ᵀ = Aᵀ ^ n
| (n : ℕ) => by rw [zpow_ofNat, zpow_ofNat, transpose_pow]
| -[n+1] => by rw [zpow_negSucc, zpow_negSucc, transpose_nonsing_inv, transpose_pow]
#align matrix.transpose_zpow Matrix.transpose_zpow
+/- warning: matrix.conj_transpose_zpow -> Matrix.conjTranspose_zpow is a dubious translation:
+lean 3 declaration is
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] [_inst_4 : StarRing.{u2} R (NonUnitalRing.toNonUnitalSemiring.{u2} R (NonUnitalCommRing.toNonUnitalRing.{u2} R (CommRing.toNonUnitalCommRing.{u2} R _inst_3)))] (A : Matrix.{u1, u1, u2} n' n' R) (n : Int), Eq.{succ (max u1 u2)} (Matrix.{u1, u1, u2} n' n' R) (Matrix.conjTranspose.{u2, u1, u1} n' n' R (InvolutiveStar.toHasStar.{u2} R (StarAddMonoid.toHasInvolutiveStar.{u2} R (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u2} R (NonUnitalRing.toNonUnitalSemiring.{u2} R (NonUnitalCommRing.toNonUnitalRing.{u2} R (CommRing.toNonUnitalCommRing.{u2} R _inst_3)))))) (StarRing.toStarAddMonoid.{u2} R (NonUnitalRing.toNonUnitalSemiring.{u2} R (NonUnitalCommRing.toNonUnitalRing.{u2} R (CommRing.toNonUnitalCommRing.{u2} R _inst_3))) _inst_4))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.divInvMonoid.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (Matrix.conjTranspose.{u2, u1, u1} n' n' R (InvolutiveStar.toHasStar.{u2} R (StarAddMonoid.toHasInvolutiveStar.{u2} R (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u2} R (NonUnitalRing.toNonUnitalSemiring.{u2} R (NonUnitalCommRing.toNonUnitalRing.{u2} R (CommRing.toNonUnitalCommRing.{u2} R _inst_3)))))) (StarRing.toStarAddMonoid.{u2} R (NonUnitalRing.toNonUnitalSemiring.{u2} R (NonUnitalCommRing.toNonUnitalRing.{u2} R (CommRing.toNonUnitalCommRing.{u2} R _inst_3))) _inst_4))) A) n)
+but is expected to have type
+ forall {n' : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} n'] [_inst_2 : Fintype.{u1} n'] {R : Type.{u2}} [_inst_3 : CommRing.{u2} R] [_inst_4 : StarRing.{u2} R (NonUnitalRing.toNonUnitalSemiring.{u2} R (NonUnitalCommRing.toNonUnitalRing.{u2} R (CommRing.toNonUnitalCommRing.{u2} R _inst_3)))] (A : Matrix.{u1, u1, u2} n' n' R) (n : Int), Eq.{max (succ u1) (succ u2)} (Matrix.{u1, u1, u2} n' n' R) (Matrix.conjTranspose.{u2, u1, u1} n' n' R (InvolutiveStar.toStar.{u2} R (StarAddMonoid.toInvolutiveStar.{u2} R (AddMonoidWithOne.toAddMonoid.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (Ring.toAddGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3)))) (StarRing.toStarAddMonoid.{u2} R (NonUnitalRing.toNonUnitalSemiring.{u2} R (NonUnitalCommRing.toNonUnitalRing.{u2} R (CommRing.toNonUnitalCommRing.{u2} R _inst_3))) _inst_4))) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.instDivInvMonoidMatrix.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) A n)) (HPow.hPow.{max u1 u2, 0, max u1 u2} (Matrix.{u1, u1, u2} n' n' R) Int (Matrix.{u1, u1, u2} n' n' R) (instHPow.{max u1 u2, 0} (Matrix.{u1, u1, u2} n' n' R) Int (DivInvMonoid.Pow.{max u1 u2} (Matrix.{u1, u1, u2} n' n' R) (Matrix.instDivInvMonoidMatrix.{u1, u2} n' (fun (a : n') (b : n') => _inst_1 a b) _inst_2 R _inst_3))) (Matrix.conjTranspose.{u2, u1, u1} n' n' R (InvolutiveStar.toStar.{u2} R (StarAddMonoid.toInvolutiveStar.{u2} R (AddMonoidWithOne.toAddMonoid.{u2} R (AddGroupWithOne.toAddMonoidWithOne.{u2} R (Ring.toAddGroupWithOne.{u2} R (CommRing.toRing.{u2} R _inst_3)))) (StarRing.toStarAddMonoid.{u2} R (NonUnitalRing.toNonUnitalSemiring.{u2} R (NonUnitalCommRing.toNonUnitalRing.{u2} R (CommRing.toNonUnitalCommRing.{u2} R _inst_3))) _inst_4))) A) n)
+Case conversion may be inaccurate. Consider using '#align matrix.conj_transpose_zpow Matrix.conjTranspose_zpowₓ'. -/
@[simp]
theorem conjTranspose_zpow [StarRing R] (A : M) : ∀ n : ℤ, (A ^ n)ᴴ = Aᴴ ^ n
| (n : ℕ) => by rw [zpow_ofNat, zpow_ofNat, conj_transpose_pow]
mathlib commit https://github.com/leanprover-community/mathlib/commit/3180fab693e2cee3bff62675571264cb8778b212
@@ -273,7 +273,7 @@ theorem zpow_add_one_of_ne_neg_one {A : M} : ∀ n : ℤ, n ≠ -1 → A ^ (n +
rcases nonsing_inv_cancel_or_zero A with (⟨h, h'⟩ | h)
· apply zpow_add_one (is_unit_det_of_left_inverse h)
· show A ^ (-((n + 1 : ℕ) : ℤ)) = A ^ (-((n + 2 : ℕ) : ℤ)) * A
- simp_rw [zpow_neg_coe_nat, ← inv_pow', h, zero_pow Nat.succ_pos', zero_mul]
+ simp_rw [zpow_neg_coe_nat, ← inv_pow', h, zero_pow Nat.succ_pos', MulZeroClass.zero_mul]
#align matrix.zpow_add_one_of_ne_neg_one Matrix.zpow_add_one_of_ne_neg_one
theorem zpow_bit1 (A : M) (n : ℤ) : A ^ bit1 n = A ^ n * A ^ n * A :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
@@ -107,16 +107,17 @@ theorem zpow_neg_one (A : M) : A ^ (-1 : ℤ) = A⁻¹ := by
simp only [zpow_one, Int.ofNat_zero, Int.ofNat_succ, zpow_eq_pow, zero_add]
#align matrix.zpow_neg_one Matrix.zpow_neg_one
-nonrec theorem zpow_coe_nat (A : M) (n : ℕ) : A ^ (n : ℤ) = A ^ n :=
- zpow_natCast _ _
-#align matrix.zpow_coe_nat Matrix.zpow_coe_nat
+#align matrix.zpow_coe_nat zpow_natCast
@[simp]
-theorem zpow_neg_coe_nat (A : M) (n : ℕ) : A ^ (-n : ℤ) = (A ^ n)⁻¹ := by
+theorem zpow_neg_natCast (A : M) (n : ℕ) : A ^ (-n : ℤ) = (A ^ n)⁻¹ := by
cases n
· simp
· exact DivInvMonoid.zpow_neg' _ _
-#align matrix.zpow_neg_coe_nat Matrix.zpow_neg_coe_nat
+#align matrix.zpow_neg_coe_nat Matrix.zpow_neg_natCast
+
+-- 2024-04-05
+@[deprecated] alias zpow_neg_coe_nat := zpow_neg_natCast
theorem _root_.IsUnit.det_zpow {A : M} (h : IsUnit A.det) (n : ℤ) : IsUnit (A ^ n).det := by
cases' n with n n
@@ -127,18 +128,18 @@ theorem _root_.IsUnit.det_zpow {A : M} (h : IsUnit A.det) (n : ℤ) : IsUnit (A
theorem isUnit_det_zpow_iff {A : M} {z : ℤ} : IsUnit (A ^ z).det ↔ IsUnit A.det ∨ z = 0 := by
induction' z using Int.induction_on with z _ z _
· simp
- · rw [← Int.ofNat_succ, zpow_coe_nat, det_pow, isUnit_pow_succ_iff, ← Int.ofNat_zero,
+ · rw [← Int.ofNat_succ, zpow_natCast, det_pow, isUnit_pow_succ_iff, ← Int.ofNat_zero,
Int.ofNat_inj]
simp
- · rw [← neg_add', ← Int.ofNat_succ, zpow_neg_coe_nat, isUnit_nonsing_inv_det_iff, det_pow,
+ · rw [← neg_add', ← Int.ofNat_succ, zpow_neg_natCast, isUnit_nonsing_inv_det_iff, det_pow,
isUnit_pow_succ_iff, neg_eq_zero, ← Int.ofNat_zero, Int.ofNat_inj]
simp
#align matrix.is_unit_det_zpow_iff Matrix.isUnit_det_zpow_iff
theorem zpow_neg {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (-n) = (A ^ n)⁻¹
- | (n : ℕ) => zpow_neg_coe_nat _ _
+ | (n : ℕ) => zpow_neg_natCast _ _
| -[n+1] => by
- rw [zpow_negSucc, neg_negSucc, zpow_coe_nat, nonsing_inv_nonsing_inv]
+ rw [zpow_negSucc, neg_negSucc, zpow_natCast, nonsing_inv_nonsing_inv]
rw [det_pow]
exact h.pow _
#align matrix.zpow_neg Matrix.zpow_neg
@@ -148,15 +149,15 @@ theorem inv_zpow' {A : M} (h : IsUnit A.det) (n : ℤ) : A⁻¹ ^ n = A ^ (-n) :
#align matrix.inv_zpow' Matrix.inv_zpow'
theorem zpow_add_one {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (n + 1) = A ^ n * A
- | (n : ℕ) => by simp only [← Nat.cast_succ, pow_succ, zpow_coe_nat]
+ | (n : ℕ) => by simp only [← Nat.cast_succ, pow_succ, zpow_natCast]
| -[n+1] =>
calc
A ^ (-(n + 1) + 1 : ℤ) = (A ^ n)⁻¹ := by
- rw [neg_add, neg_add_cancel_right, zpow_neg h, zpow_coe_nat]
+ rw [neg_add, neg_add_cancel_right, zpow_neg h, zpow_natCast]
_ = (A * A ^ n)⁻¹ * A := by
rw [mul_inv_rev, Matrix.mul_assoc, nonsing_inv_mul _ h, Matrix.mul_one]
_ = A ^ (-(n + 1 : ℤ)) * A := by
- rw [zpow_neg h, ← Int.ofNat_succ, zpow_coe_nat, pow_succ']
+ rw [zpow_neg h, ← Int.ofNat_succ, zpow_natCast, pow_succ']
#align matrix.zpow_add_one Matrix.zpow_add_one
theorem zpow_sub_one {A : M} (h : IsUnit A.det) (n : ℤ) : A ^ (n - 1) = A ^ n * A⁻¹ :=
@@ -179,14 +180,14 @@ theorem zpow_add_of_nonpos {A : M} {m n : ℤ} (hm : m ≤ 0) (hn : n ≤ 0) :
· exact zpow_add (isUnit_det_of_left_inverse h) m n
· obtain ⟨k, rfl⟩ := exists_eq_neg_ofNat hm
obtain ⟨l, rfl⟩ := exists_eq_neg_ofNat hn
- simp_rw [← neg_add, ← Int.ofNat_add, zpow_neg_coe_nat, ← inv_pow', h, pow_add]
+ simp_rw [← neg_add, ← Int.ofNat_add, zpow_neg_natCast, ← inv_pow', h, pow_add]
#align matrix.zpow_add_of_nonpos Matrix.zpow_add_of_nonpos
theorem zpow_add_of_nonneg {A : M} {m n : ℤ} (hm : 0 ≤ m) (hn : 0 ≤ n) :
A ^ (m + n) = A ^ m * A ^ n := by
obtain ⟨k, rfl⟩ := eq_ofNat_of_zero_le hm
obtain ⟨l, rfl⟩ := eq_ofNat_of_zero_le hn
- rw [← Int.ofNat_add, zpow_coe_nat, zpow_coe_nat, zpow_coe_nat, pow_add]
+ rw [← Int.ofNat_add, zpow_natCast, zpow_natCast, zpow_natCast, pow_add]
#align matrix.zpow_add_of_nonneg Matrix.zpow_add_of_nonneg
theorem zpow_one_add {A : M} (h : IsUnit A.det) (i : ℤ) : A ^ (1 + i) = A * A ^ i := by
@@ -248,13 +249,13 @@ theorem zpow_bit0 (A : M) (n : ℤ) : A ^ bit0 n = A ^ n * A ^ n := by
#align matrix.zpow_bit0 Matrix.zpow_bit0
theorem zpow_add_one_of_ne_neg_one {A : M} : ∀ n : ℤ, n ≠ -1 → A ^ (n + 1) = A ^ n * A
- | (n : ℕ), _ => by simp only [pow_succ, ← Nat.cast_succ, zpow_coe_nat]
+ | (n : ℕ), _ => by simp only [pow_succ, ← Nat.cast_succ, zpow_natCast]
| -1, h => absurd rfl h
| -((n : ℕ) + 2), _ => by
rcases nonsing_inv_cancel_or_zero A with (⟨h, _⟩ | h)
· apply zpow_add_one (isUnit_det_of_left_inverse h)
· show A ^ (-((n + 1 : ℕ) : ℤ)) = A ^ (-((n + 2 : ℕ) : ℤ)) * A
- simp_rw [zpow_neg_coe_nat, ← inv_pow', h, zero_pow $ Nat.succ_ne_zero _, zero_mul]
+ simp_rw [zpow_neg_natCast, ← inv_pow', h, zero_pow $ Nat.succ_ne_zero _, zero_mul]
#align matrix.zpow_add_one_of_ne_neg_one Matrix.zpow_add_one_of_ne_neg_one
set_option linter.deprecated false in
@@ -265,14 +266,14 @@ theorem zpow_bit1 (A : M) (n : ℤ) : A ^ bit1 n = A ^ n * A ^ n * A := by
#align matrix.zpow_bit1 Matrix.zpow_bit1
theorem zpow_mul (A : M) (h : IsUnit A.det) : ∀ m n : ℤ, A ^ (m * n) = (A ^ m) ^ n
- | (m : ℕ), (n : ℕ) => by rw [zpow_coe_nat, zpow_coe_nat, ← pow_mul, ← zpow_coe_nat, Int.ofNat_mul]
+ | (m : ℕ), (n : ℕ) => by rw [zpow_natCast, zpow_natCast, ← pow_mul, ← zpow_natCast, Int.ofNat_mul]
| (m : ℕ), -[n+1] => by
- rw [zpow_coe_nat, zpow_negSucc, ← pow_mul, ofNat_mul_negSucc, zpow_neg_coe_nat]
+ rw [zpow_natCast, zpow_negSucc, ← pow_mul, ofNat_mul_negSucc, zpow_neg_natCast]
| -[m+1], (n : ℕ) => by
- rw [zpow_coe_nat, zpow_negSucc, ← inv_pow', ← pow_mul, negSucc_mul_ofNat, zpow_neg_coe_nat,
+ rw [zpow_natCast, zpow_negSucc, ← inv_pow', ← pow_mul, negSucc_mul_ofNat, zpow_neg_natCast,
inv_pow']
| -[m+1], -[n+1] => by
- rw [zpow_negSucc, zpow_negSucc, negSucc_mul_negSucc, ← Int.ofNat_mul, zpow_coe_nat, inv_pow', ←
+ rw [zpow_negSucc, zpow_negSucc, negSucc_mul_negSucc, ← Int.ofNat_mul, zpow_natCast, inv_pow', ←
pow_mul, nonsing_inv_nonsing_inv]
rw [det_pow]
exact h.pow _
@@ -285,7 +286,7 @@ theorem zpow_mul' (A : M) (h : IsUnit A.det) (m n : ℤ) : A ^ (m * n) = (A ^ n)
@[simp, norm_cast]
theorem coe_units_zpow (u : Mˣ) : ∀ n : ℤ, ((u ^ n : Mˣ) : M) = (u : M) ^ n
- | (n : ℕ) => by rw [zpow_natCast, zpow_coe_nat, Units.val_pow_eq_pow_val]
+ | (n : ℕ) => by rw [zpow_natCast, zpow_natCast, Units.val_pow_eq_pow_val]
| -[k+1] => by
rw [zpow_negSucc, zpow_negSucc, ← inv_pow, u⁻¹.val_pow_eq_pow_val, ← inv_pow', coe_units_inv]
#align matrix.coe_units_zpow Matrix.coe_units_zpow
@@ -331,13 +332,13 @@ theorem one_div_zpow {A : M} (n : ℤ) : (1 / A) ^ n = 1 / A ^ n := by simp only
@[simp]
theorem transpose_zpow (A : M) : ∀ n : ℤ, (A ^ n)ᵀ = Aᵀ ^ n
- | (n : ℕ) => by rw [zpow_coe_nat, zpow_coe_nat, transpose_pow]
+ | (n : ℕ) => by rw [zpow_natCast, zpow_natCast, transpose_pow]
| -[n+1] => by rw [zpow_negSucc, zpow_negSucc, transpose_nonsing_inv, transpose_pow]
#align matrix.transpose_zpow Matrix.transpose_zpow
@[simp]
theorem conjTranspose_zpow [StarRing R] (A : M) : ∀ n : ℤ, (A ^ n)ᴴ = Aᴴ ^ n
- | (n : ℕ) => by rw [zpow_coe_nat, zpow_coe_nat, conjTranspose_pow]
+ | (n : ℕ) => by rw [zpow_natCast, zpow_natCast, conjTranspose_pow]
| -[n+1] => by rw [zpow_negSucc, zpow_negSucc, conjTranspose_nonsing_inv, conjTranspose_pow]
#align matrix.conj_transpose_zpow Matrix.conjTranspose_zpow
We change the following field in the definition of an additive commutative monoid:
nsmul_succ : ∀ (n : ℕ) (x : G),
- AddMonoid.nsmul (n + 1) x = x + AddMonoid.nsmul n x
+ AddMonoid.nsmul (n + 1) x = AddMonoid.nsmul n x + x
where the latter is more natural
We adjust the definitions of ^
in monoids, groups, etc.
Originally there was a warning comment about why this natural order was preferred
use
x * npowRec n x
and notnpowRec n x * x
in the definition to make sure that definitional unfolding ofnpowRec
is blocked, to avoid deep recursion issues.
but it seems to no longer apply.
Remarks on the PR :
pow_succ
and pow_succ'
have switched their meanings.Ideal.IsPrime.mul_mem_pow
which is defined in [Mathlib/RingTheory/DedekindDomain/Ideal.lean]. Changing the order of operation forced me to add the symmetric lemma Ideal.IsPrime.mem_pow_mul
.@@ -63,11 +63,11 @@ theorem pow_inv_comm' (A : M) (m n : ℕ) : A⁻¹ ^ m * A ^ n = A ^ n * A⁻¹
· simp only [Nat.succ_eq_add_one]
calc
A⁻¹ ^ (m + 1) * A ^ (n + 1) = A⁻¹ ^ m * (A⁻¹ * A) * A ^ n := by
- simp only [pow_succ' A⁻¹, pow_succ A, Matrix.mul_assoc]
+ simp only [pow_succ A⁻¹, pow_succ' A, Matrix.mul_assoc]
_ = A ^ n * A⁻¹ ^ m := by simp only [h, Matrix.mul_one, Matrix.one_mul, IH m]
_ = A ^ n * (A * A⁻¹) * A⁻¹ ^ m := by simp only [h', Matrix.mul_one, Matrix.one_mul]
_ = A ^ (n + 1) * A⁻¹ ^ (m + 1) := by
- simp only [pow_succ' A, pow_succ A⁻¹, Matrix.mul_assoc]
+ simp only [pow_succ A, pow_succ' A⁻¹, Matrix.mul_assoc]
· simp [h]
#align matrix.pow_inv_comm' Matrix.pow_inv_comm'
@@ -148,7 +148,7 @@ theorem inv_zpow' {A : M} (h : IsUnit A.det) (n : ℤ) : A⁻¹ ^ n = A ^ (-n) :
#align matrix.inv_zpow' Matrix.inv_zpow'
theorem zpow_add_one {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (n + 1) = A ^ n * A
- | (n : ℕ) => by simp only [← Nat.cast_succ, pow_succ', zpow_coe_nat]
+ | (n : ℕ) => by simp only [← Nat.cast_succ, pow_succ, zpow_coe_nat]
| -[n+1] =>
calc
A ^ (-(n + 1) + 1 : ℤ) = (A ^ n)⁻¹ := by
@@ -156,7 +156,7 @@ theorem zpow_add_one {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (n + 1) = A ^
_ = (A * A ^ n)⁻¹ * A := by
rw [mul_inv_rev, Matrix.mul_assoc, nonsing_inv_mul _ h, Matrix.mul_one]
_ = A ^ (-(n + 1 : ℤ)) * A := by
- rw [zpow_neg h, ← Int.ofNat_succ, zpow_coe_nat, pow_succ]
+ rw [zpow_neg h, ← Int.ofNat_succ, zpow_coe_nat, pow_succ']
#align matrix.zpow_add_one Matrix.zpow_add_one
theorem zpow_sub_one {A : M} (h : IsUnit A.det) (n : ℤ) : A ^ (n - 1) = A ^ n * A⁻¹ :=
@@ -248,7 +248,7 @@ theorem zpow_bit0 (A : M) (n : ℤ) : A ^ bit0 n = A ^ n * A ^ n := by
#align matrix.zpow_bit0 Matrix.zpow_bit0
theorem zpow_add_one_of_ne_neg_one {A : M} : ∀ n : ℤ, n ≠ -1 → A ^ (n + 1) = A ^ n * A
- | (n : ℕ), _ => by simp only [pow_succ', ← Nat.cast_succ, zpow_coe_nat]
+ | (n : ℕ), _ => by simp only [pow_succ, ← Nat.cast_succ, zpow_coe_nat]
| -1, h => absurd rfl h
| -((n : ℕ) + 2), _ => by
rcases nonsing_inv_cancel_or_zero A with (⟨h, _⟩ | h)
zpow_coe_nat
to zpow_natCast
(#11528)
... and add a deprecated alias for the old name. This is mostly just me discovering the power of F2
@@ -79,13 +79,13 @@ open Int
@[simp]
theorem one_zpow : ∀ n : ℤ, (1 : M) ^ n = 1
- | (n : ℕ) => by rw [zpow_coe_nat, one_pow]
+ | (n : ℕ) => by rw [zpow_natCast, one_pow]
| -[n+1] => by rw [zpow_negSucc, one_pow, inv_one]
#align matrix.one_zpow Matrix.one_zpow
theorem zero_zpow : ∀ z : ℤ, z ≠ 0 → (0 : M) ^ z = 0
| (n : ℕ), h => by
- rw [zpow_coe_nat, zero_pow]
+ rw [zpow_natCast, zero_pow]
exact mod_cast h
| -[n+1], _ => by simp [zero_pow n.succ_ne_zero]
#align matrix.zero_zpow Matrix.zero_zpow
@@ -97,7 +97,7 @@ theorem zero_zpow_eq (n : ℤ) : (0 : M) ^ n = if n = 0 then 1 else 0 := by
#align matrix.zero_zpow_eq Matrix.zero_zpow_eq
theorem inv_zpow (A : M) : ∀ n : ℤ, A⁻¹ ^ n = (A ^ n)⁻¹
- | (n : ℕ) => by rw [zpow_coe_nat, zpow_coe_nat, inv_pow']
+ | (n : ℕ) => by rw [zpow_natCast, zpow_natCast, inv_pow']
| -[n+1] => by rw [zpow_negSucc, zpow_negSucc, inv_pow']
#align matrix.inv_zpow Matrix.inv_zpow
@@ -108,7 +108,7 @@ theorem zpow_neg_one (A : M) : A ^ (-1 : ℤ) = A⁻¹ := by
#align matrix.zpow_neg_one Matrix.zpow_neg_one
nonrec theorem zpow_coe_nat (A : M) (n : ℕ) : A ^ (n : ℤ) = A ^ n :=
- zpow_coe_nat _ _
+ zpow_natCast _ _
#align matrix.zpow_coe_nat Matrix.zpow_coe_nat
@[simp]
@@ -285,7 +285,7 @@ theorem zpow_mul' (A : M) (h : IsUnit A.det) (m n : ℤ) : A ^ (m * n) = (A ^ n)
@[simp, norm_cast]
theorem coe_units_zpow (u : Mˣ) : ∀ n : ℤ, ((u ^ n : Mˣ) : M) = (u : M) ^ n
- | (n : ℕ) => by rw [_root_.zpow_coe_nat, zpow_coe_nat, Units.val_pow_eq_pow_val]
+ | (n : ℕ) => by rw [zpow_natCast, zpow_coe_nat, Units.val_pow_eq_pow_val]
| -[k+1] => by
rw [zpow_negSucc, zpow_negSucc, ← inv_pow, u⁻¹.val_pow_eq_pow_val, ← inv_pow', coe_units_inv]
#align matrix.coe_units_zpow Matrix.coe_units_zpow
zpow_ofNat
and ofNat_zsmul
(#10969)
Previously these were syntactically identical to the corresponding zpow_coe_nat
and coe_nat_zsmul
lemmas, now they are about OfNat.ofNat
.
Unfortunately, almost every call site uses the ofNat
name to refer to Nat.cast
, so the downstream proofs had to be adjusted too.
@@ -79,13 +79,13 @@ open Int
@[simp]
theorem one_zpow : ∀ n : ℤ, (1 : M) ^ n = 1
- | (n : ℕ) => by rw [zpow_ofNat, one_pow]
+ | (n : ℕ) => by rw [zpow_coe_nat, one_pow]
| -[n+1] => by rw [zpow_negSucc, one_pow, inv_one]
#align matrix.one_zpow Matrix.one_zpow
theorem zero_zpow : ∀ z : ℤ, z ≠ 0 → (0 : M) ^ z = 0
| (n : ℕ), h => by
- rw [zpow_ofNat, zero_pow]
+ rw [zpow_coe_nat, zero_pow]
exact mod_cast h
| -[n+1], _ => by simp [zero_pow n.succ_ne_zero]
#align matrix.zero_zpow Matrix.zero_zpow
@@ -97,7 +97,7 @@ theorem zero_zpow_eq (n : ℤ) : (0 : M) ^ n = if n = 0 then 1 else 0 := by
#align matrix.zero_zpow_eq Matrix.zero_zpow_eq
theorem inv_zpow (A : M) : ∀ n : ℤ, A⁻¹ ^ n = (A ^ n)⁻¹
- | (n : ℕ) => by rw [zpow_ofNat, zpow_ofNat, inv_pow']
+ | (n : ℕ) => by rw [zpow_coe_nat, zpow_coe_nat, inv_pow']
| -[n+1] => by rw [zpow_negSucc, zpow_negSucc, inv_pow']
#align matrix.inv_zpow Matrix.inv_zpow
@@ -107,8 +107,8 @@ theorem zpow_neg_one (A : M) : A ^ (-1 : ℤ) = A⁻¹ := by
simp only [zpow_one, Int.ofNat_zero, Int.ofNat_succ, zpow_eq_pow, zero_add]
#align matrix.zpow_neg_one Matrix.zpow_neg_one
-theorem zpow_coe_nat (A : M) (n : ℕ) : A ^ (n : ℤ) = A ^ n :=
- zpow_ofNat _ _
+nonrec theorem zpow_coe_nat (A : M) (n : ℕ) : A ^ (n : ℤ) = A ^ n :=
+ zpow_coe_nat _ _
#align matrix.zpow_coe_nat Matrix.zpow_coe_nat
@[simp]
@@ -127,7 +127,8 @@ theorem _root_.IsUnit.det_zpow {A : M} (h : IsUnit A.det) (n : ℤ) : IsUnit (A
theorem isUnit_det_zpow_iff {A : M} {z : ℤ} : IsUnit (A ^ z).det ↔ IsUnit A.det ∨ z = 0 := by
induction' z using Int.induction_on with z _ z _
· simp
- · rw [← Int.ofNat_succ, zpow_ofNat, det_pow, isUnit_pow_succ_iff, ← Int.ofNat_zero, Int.ofNat_inj]
+ · rw [← Int.ofNat_succ, zpow_coe_nat, det_pow, isUnit_pow_succ_iff, ← Int.ofNat_zero,
+ Int.ofNat_inj]
simp
· rw [← neg_add', ← Int.ofNat_succ, zpow_neg_coe_nat, isUnit_nonsing_inv_det_iff, det_pow,
isUnit_pow_succ_iff, neg_eq_zero, ← Int.ofNat_zero, Int.ofNat_inj]
@@ -137,7 +138,7 @@ theorem isUnit_det_zpow_iff {A : M} {z : ℤ} : IsUnit (A ^ z).det ↔ IsUnit A.
theorem zpow_neg {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (-n) = (A ^ n)⁻¹
| (n : ℕ) => zpow_neg_coe_nat _ _
| -[n+1] => by
- rw [zpow_negSucc, neg_negSucc, zpow_ofNat, nonsing_inv_nonsing_inv]
+ rw [zpow_negSucc, neg_negSucc, zpow_coe_nat, nonsing_inv_nonsing_inv]
rw [det_pow]
exact h.pow _
#align matrix.zpow_neg Matrix.zpow_neg
@@ -147,15 +148,15 @@ theorem inv_zpow' {A : M} (h : IsUnit A.det) (n : ℤ) : A⁻¹ ^ n = A ^ (-n) :
#align matrix.inv_zpow' Matrix.inv_zpow'
theorem zpow_add_one {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (n + 1) = A ^ n * A
- | (n : ℕ) => by simp only [← Nat.cast_succ, pow_succ', zpow_ofNat]
+ | (n : ℕ) => by simp only [← Nat.cast_succ, pow_succ', zpow_coe_nat]
| -[n+1] =>
calc
A ^ (-(n + 1) + 1 : ℤ) = (A ^ n)⁻¹ := by
- rw [neg_add, neg_add_cancel_right, zpow_neg h, zpow_ofNat]
+ rw [neg_add, neg_add_cancel_right, zpow_neg h, zpow_coe_nat]
_ = (A * A ^ n)⁻¹ * A := by
rw [mul_inv_rev, Matrix.mul_assoc, nonsing_inv_mul _ h, Matrix.mul_one]
_ = A ^ (-(n + 1 : ℤ)) * A := by
- rw [zpow_neg h, ← Int.ofNat_succ, zpow_ofNat, pow_succ]
+ rw [zpow_neg h, ← Int.ofNat_succ, zpow_coe_nat, pow_succ]
#align matrix.zpow_add_one Matrix.zpow_add_one
theorem zpow_sub_one {A : M} (h : IsUnit A.det) (n : ℤ) : A ^ (n - 1) = A ^ n * A⁻¹ :=
@@ -185,7 +186,7 @@ theorem zpow_add_of_nonneg {A : M} {m n : ℤ} (hm : 0 ≤ m) (hn : 0 ≤ n) :
A ^ (m + n) = A ^ m * A ^ n := by
obtain ⟨k, rfl⟩ := eq_ofNat_of_zero_le hm
obtain ⟨l, rfl⟩ := eq_ofNat_of_zero_le hn
- rw [← Int.ofNat_add, zpow_ofNat, zpow_ofNat, zpow_ofNat, pow_add]
+ rw [← Int.ofNat_add, zpow_coe_nat, zpow_coe_nat, zpow_coe_nat, pow_add]
#align matrix.zpow_add_of_nonneg Matrix.zpow_add_of_nonneg
theorem zpow_one_add {A : M} (h : IsUnit A.det) (i : ℤ) : A ^ (1 + i) = A * A ^ i := by
@@ -247,7 +248,7 @@ theorem zpow_bit0 (A : M) (n : ℤ) : A ^ bit0 n = A ^ n * A ^ n := by
#align matrix.zpow_bit0 Matrix.zpow_bit0
theorem zpow_add_one_of_ne_neg_one {A : M} : ∀ n : ℤ, n ≠ -1 → A ^ (n + 1) = A ^ n * A
- | (n : ℕ), _ => by simp only [pow_succ', ← Nat.cast_succ, zpow_ofNat]
+ | (n : ℕ), _ => by simp only [pow_succ', ← Nat.cast_succ, zpow_coe_nat]
| -1, h => absurd rfl h
| -((n : ℕ) + 2), _ => by
rcases nonsing_inv_cancel_or_zero A with (⟨h, _⟩ | h)
@@ -264,14 +265,14 @@ theorem zpow_bit1 (A : M) (n : ℤ) : A ^ bit1 n = A ^ n * A ^ n * A := by
#align matrix.zpow_bit1 Matrix.zpow_bit1
theorem zpow_mul (A : M) (h : IsUnit A.det) : ∀ m n : ℤ, A ^ (m * n) = (A ^ m) ^ n
- | (m : ℕ), (n : ℕ) => by rw [zpow_ofNat, zpow_ofNat, ← pow_mul, ← zpow_ofNat, Int.ofNat_mul]
+ | (m : ℕ), (n : ℕ) => by rw [zpow_coe_nat, zpow_coe_nat, ← pow_mul, ← zpow_coe_nat, Int.ofNat_mul]
| (m : ℕ), -[n+1] => by
- rw [zpow_ofNat, zpow_negSucc, ← pow_mul, ofNat_mul_negSucc, zpow_neg_coe_nat]
+ rw [zpow_coe_nat, zpow_negSucc, ← pow_mul, ofNat_mul_negSucc, zpow_neg_coe_nat]
| -[m+1], (n : ℕ) => by
- rw [zpow_ofNat, zpow_negSucc, ← inv_pow', ← pow_mul, negSucc_mul_ofNat, zpow_neg_coe_nat,
+ rw [zpow_coe_nat, zpow_negSucc, ← inv_pow', ← pow_mul, negSucc_mul_ofNat, zpow_neg_coe_nat,
inv_pow']
| -[m+1], -[n+1] => by
- rw [zpow_negSucc, zpow_negSucc, negSucc_mul_negSucc, ← Int.ofNat_mul, zpow_ofNat, inv_pow', ←
+ rw [zpow_negSucc, zpow_negSucc, negSucc_mul_negSucc, ← Int.ofNat_mul, zpow_coe_nat, inv_pow', ←
pow_mul, nonsing_inv_nonsing_inv]
rw [det_pow]
exact h.pow _
@@ -284,7 +285,7 @@ theorem zpow_mul' (A : M) (h : IsUnit A.det) (m n : ℤ) : A ^ (m * n) = (A ^ n)
@[simp, norm_cast]
theorem coe_units_zpow (u : Mˣ) : ∀ n : ℤ, ((u ^ n : Mˣ) : M) = (u : M) ^ n
- | (n : ℕ) => by rw [_root_.zpow_coe_nat, zpow_ofNat, Units.val_pow_eq_pow_val]
+ | (n : ℕ) => by rw [_root_.zpow_coe_nat, zpow_coe_nat, Units.val_pow_eq_pow_val]
| -[k+1] => by
rw [zpow_negSucc, zpow_negSucc, ← inv_pow, u⁻¹.val_pow_eq_pow_val, ← inv_pow', coe_units_inv]
#align matrix.coe_units_zpow Matrix.coe_units_zpow
@@ -330,13 +331,13 @@ theorem one_div_zpow {A : M} (n : ℤ) : (1 / A) ^ n = 1 / A ^ n := by simp only
@[simp]
theorem transpose_zpow (A : M) : ∀ n : ℤ, (A ^ n)ᵀ = Aᵀ ^ n
- | (n : ℕ) => by rw [zpow_ofNat, zpow_ofNat, transpose_pow]
+ | (n : ℕ) => by rw [zpow_coe_nat, zpow_coe_nat, transpose_pow]
| -[n+1] => by rw [zpow_negSucc, zpow_negSucc, transpose_nonsing_inv, transpose_pow]
#align matrix.transpose_zpow Matrix.transpose_zpow
@[simp]
theorem conjTranspose_zpow [StarRing R] (A : M) : ∀ n : ℤ, (A ^ n)ᴴ = Aᴴ ^ n
- | (n : ℕ) => by rw [zpow_ofNat, zpow_ofNat, conjTranspose_pow]
+ | (n : ℕ) => by rw [zpow_coe_nat, zpow_coe_nat, conjTranspose_pow]
| -[n+1] => by rw [zpow_negSucc, zpow_negSucc, conjTranspose_nonsing_inv, conjTranspose_pow]
#align matrix.conj_transpose_zpow Matrix.conjTranspose_zpow
f ^ n
(#9617)
This involves moving lemmas from Algebra.GroupPower.Ring
to Algebra.GroupWithZero.Basic
and changing some 0 < n
assumptions to n ≠ 0
.
From LeanAPAP
@@ -86,9 +86,8 @@ theorem one_zpow : ∀ n : ℤ, (1 : M) ^ n = 1
theorem zero_zpow : ∀ z : ℤ, z ≠ 0 → (0 : M) ^ z = 0
| (n : ℕ), h => by
rw [zpow_ofNat, zero_pow]
- refine' lt_of_le_of_ne n.zero_le (Ne.symm _)
- simpa using h
- | -[n+1], _ => by simp [zero_pow n.zero_lt_succ]
+ exact mod_cast h
+ | -[n+1], _ => by simp [zero_pow n.succ_ne_zero]
#align matrix.zero_zpow Matrix.zero_zpow
theorem zero_zpow_eq (n : ℤ) : (0 : M) ^ n = if n = 0 then 1 else 0 := by
@@ -254,7 +253,7 @@ theorem zpow_add_one_of_ne_neg_one {A : M} : ∀ n : ℤ, n ≠ -1 → A ^ (n +
rcases nonsing_inv_cancel_or_zero A with (⟨h, _⟩ | h)
· apply zpow_add_one (isUnit_det_of_left_inverse h)
· show A ^ (-((n + 1 : ℕ) : ℤ)) = A ^ (-((n + 2 : ℕ) : ℤ)) * A
- simp_rw [zpow_neg_coe_nat, ← inv_pow', h, zero_pow Nat.succ_pos', zero_mul]
+ simp_rw [zpow_neg_coe_nat, ← inv_pow', h, zero_pow $ Nat.succ_ne_zero _, zero_mul]
#align matrix.zpow_add_one_of_ne_neg_one Matrix.zpow_add_one_of_ne_neg_one
set_option linter.deprecated false in
cases'
(#9171)
I literally went through and regex'd some uses of cases'
, replacing them with rcases
; this is meant to be a low effort PR as I hope that tools can do this in the future.
rcases
is an easier replacement than cases
, though with better tools we could in future do a second pass converting simple rcases
added here (and existing ones) to cases
.
@@ -242,7 +242,7 @@ theorem Commute.zpow_zpow_self (A : M) (m n : ℤ) : Commute (A ^ m) (A ^ n) :=
set_option linter.deprecated false in
theorem zpow_bit0 (A : M) (n : ℤ) : A ^ bit0 n = A ^ n * A ^ n := by
- cases' le_total 0 n with nonneg nonpos
+ rcases le_total 0 n with nonneg | nonpos
· exact zpow_add_of_nonneg nonneg nonneg
· exact zpow_add_of_nonpos nonpos nonpos
#align matrix.zpow_bit0 Matrix.zpow_bit0
@@ -3,8 +3,9 @@ Copyright (c) 2021 Yakov Pechersky. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yakov Pechersky
-/
-import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
import Mathlib.Data.Int.Bitwise
+import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
+import Mathlib.LinearAlgebra.Matrix.Symmetric
#align_import linear_algebra.matrix.zpow from "leanprover-community/mathlib"@"03fda9112aa6708947da13944a19310684bfdfcb"
@@ -340,6 +341,10 @@ theorem conjTranspose_zpow [StarRing R] (A : M) : ∀ n : ℤ, (A ^ n)ᴴ = Aᴴ
| -[n+1] => by rw [zpow_negSucc, zpow_negSucc, conjTranspose_nonsing_inv, conjTranspose_pow]
#align matrix.conj_transpose_zpow Matrix.conjTranspose_zpow
+theorem IsSymm.zpow {A : M} (h : A.IsSymm) (k : ℤ) :
+ (A ^ k).IsSymm := by
+ rw [IsSymm, transpose_zpow, h]
+
end ZPow
end Matrix
@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yakov Pechersky
-/
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
+import Mathlib.Data.Int.Bitwise
#align_import linear_algebra.matrix.zpow from "leanprover-community/mathlib"@"03fda9112aa6708947da13944a19310684bfdfcb"
@@ -17,7 +18,7 @@ the nonsingular inverse definition for negative powers.
The main definition is a direct recursive call on the integer inductive type,
as provided by the `DivInvMonoid.Pow` default implementation.
-The lemma names are taken from `Algebra.group_with_zero.power`.
+The lemma names are taken from `Algebra.GroupWithZero.Power`.
## Tags
MulZeroClass.
in mul_zero
/zero_mul
(#6682)
Search&replace MulZeroClass.mul_zero
-> mul_zero
, MulZeroClass.zero_mul
-> zero_mul
.
These were introduced by Mathport, as the full name of mul_zero
is actually MulZeroClass.mul_zero
(it's exported with the short name).
@@ -252,7 +252,7 @@ theorem zpow_add_one_of_ne_neg_one {A : M} : ∀ n : ℤ, n ≠ -1 → A ^ (n +
rcases nonsing_inv_cancel_or_zero A with (⟨h, _⟩ | h)
· apply zpow_add_one (isUnit_det_of_left_inverse h)
· show A ^ (-((n + 1 : ℕ) : ℤ)) = A ^ (-((n + 2 : ℕ) : ℤ)) * A
- simp_rw [zpow_neg_coe_nat, ← inv_pow', h, zero_pow Nat.succ_pos', MulZeroClass.zero_mul]
+ simp_rw [zpow_neg_coe_nat, ← inv_pow', h, zero_pow Nat.succ_pos', zero_mul]
#align matrix.zpow_add_one_of_ne_neg_one Matrix.zpow_add_one_of_ne_neg_one
set_option linter.deprecated false in
⬝
notation in favor of HMul
(#6487)
The main difficulty here is that *
has a slightly difference precedence to ⬝
. notably around smul
and neg
.
The other annoyance is that ↑U ⬝ A ⬝ ↑U⁻¹ : Matrix m m 𝔸
now has to be written U.val * A * (U⁻¹).val
in order to typecheck.
A downside of this change to consider: if you have a goal of A * (B * C) = (A * B) * C
, mul_assoc
now gives the illusion of matching, when in fact Matrix.mul_assoc
is needed. Previously the distinct symbol made it easy to avoid this mistake.
On the flipside, there is now no need to rewrite by Matrix.mul_eq_mul
all the time (indeed, the lemma is now removed).
@@ -42,17 +42,17 @@ section NatPow
theorem inv_pow' (A : M) (n : ℕ) : A⁻¹ ^ n = (A ^ n)⁻¹ := by
induction' n with n ih
· simp
- · rw [pow_succ A, mul_eq_mul, mul_inv_rev, ← ih, ← mul_eq_mul, ← pow_succ']
+ · rw [pow_succ A, mul_inv_rev, ← ih, ← pow_succ']
#align matrix.inv_pow' Matrix.inv_pow'
theorem pow_sub' (A : M) {m n : ℕ} (ha : IsUnit A.det) (h : n ≤ m) :
- A ^ (m - n) = A ^ m ⬝ (A ^ n)⁻¹ := by
- rw [← tsub_add_cancel_of_le h, pow_add, mul_eq_mul, Matrix.mul_assoc, mul_nonsing_inv,
+ A ^ (m - n) = A ^ m * (A ^ n)⁻¹ := by
+ rw [← tsub_add_cancel_of_le h, pow_add, Matrix.mul_assoc, mul_nonsing_inv,
tsub_add_cancel_of_le h, Matrix.mul_one]
simpa using ha.pow n
#align matrix.pow_sub' Matrix.pow_sub'
-theorem pow_inv_comm' (A : M) (m n : ℕ) : A⁻¹ ^ m ⬝ A ^ n = A ^ n ⬝ A⁻¹ ^ m := by
+theorem pow_inv_comm' (A : M) (m n : ℕ) : A⁻¹ ^ m * A ^ n = A ^ n * A⁻¹ ^ m := by
induction' n with n IH generalizing m
· simp
cases' m with m m
@@ -60,12 +60,12 @@ theorem pow_inv_comm' (A : M) (m n : ℕ) : A⁻¹ ^ m ⬝ A ^ n = A ^ n ⬝ A
rcases nonsing_inv_cancel_or_zero A with (⟨h, h'⟩ | h)
· simp only [Nat.succ_eq_add_one]
calc
- A⁻¹ ^ (m + 1) ⬝ A ^ (n + 1) = A⁻¹ ^ m ⬝ (A⁻¹ ⬝ A) ⬝ A ^ n := by
- simp only [pow_succ' A⁻¹, pow_succ A, mul_eq_mul, Matrix.mul_assoc]
- _ = A ^ n ⬝ A⁻¹ ^ m := by simp only [h, Matrix.mul_one, Matrix.one_mul, IH m]
- _ = A ^ n ⬝ (A ⬝ A⁻¹) ⬝ A⁻¹ ^ m := by simp only [h', Matrix.mul_one, Matrix.one_mul]
- _ = A ^ (n + 1) ⬝ A⁻¹ ^ (m + 1) := by
- simp only [pow_succ' A, pow_succ A⁻¹, mul_eq_mul, Matrix.mul_assoc]
+ A⁻¹ ^ (m + 1) * A ^ (n + 1) = A⁻¹ ^ m * (A⁻¹ * A) * A ^ n := by
+ simp only [pow_succ' A⁻¹, pow_succ A, Matrix.mul_assoc]
+ _ = A ^ n * A⁻¹ ^ m := by simp only [h, Matrix.mul_one, Matrix.one_mul, IH m]
+ _ = A ^ n * (A * A⁻¹) * A⁻¹ ^ m := by simp only [h', Matrix.mul_one, Matrix.one_mul]
+ _ = A ^ (n + 1) * A⁻¹ ^ (m + 1) := by
+ simp only [pow_succ' A, pow_succ A⁻¹, Matrix.mul_assoc]
· simp [h]
#align matrix.pow_inv_comm' Matrix.pow_inv_comm'
@@ -151,16 +151,16 @@ theorem zpow_add_one {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (n + 1) = A ^
calc
A ^ (-(n + 1) + 1 : ℤ) = (A ^ n)⁻¹ := by
rw [neg_add, neg_add_cancel_right, zpow_neg h, zpow_ofNat]
- _ = (A ⬝ A ^ n)⁻¹ ⬝ A := by
+ _ = (A * A ^ n)⁻¹ * A := by
rw [mul_inv_rev, Matrix.mul_assoc, nonsing_inv_mul _ h, Matrix.mul_one]
_ = A ^ (-(n + 1 : ℤ)) * A := by
- rw [zpow_neg h, ← Int.ofNat_succ, zpow_ofNat, pow_succ, mul_eq_mul, mul_eq_mul]
+ rw [zpow_neg h, ← Int.ofNat_succ, zpow_ofNat, pow_succ]
#align matrix.zpow_add_one Matrix.zpow_add_one
theorem zpow_sub_one {A : M} (h : IsUnit A.det) (n : ℤ) : A ^ (n - 1) = A ^ n * A⁻¹ :=
calc
A ^ (n - 1) = A ^ (n - 1) * A * A⁻¹ := by
- rw [mul_assoc, mul_eq_mul A, mul_nonsing_inv _ h, mul_one]
+ rw [mul_assoc, mul_nonsing_inv _ h, mul_one]
_ = A ^ n * A⁻¹ := by rw [← zpow_add_one h, sub_add_cancel]
#align matrix.zpow_sub_one Matrix.zpow_sub_one
@@ -204,8 +204,8 @@ theorem SemiconjBy.zpow_right {A X Y : M} (hx : IsUnit X.det) (hy : IsUnit Y.det
rw [zpow_negSucc, zpow_negSucc, nonsing_inv_apply _ hx', nonsing_inv_apply _ hy', SemiconjBy]
refine' (isRegular_of_isLeftRegular_det hy'.isRegular.left).left _
dsimp only
- rw [← mul_assoc, ← (h.pow_right n.succ).eq, mul_assoc, mul_eq_mul (X ^ _), mul_smul,
- mul_adjugate, mul_eq_mul, mul_eq_mul, mul_eq_mul, ← Matrix.mul_assoc,
+ rw [← mul_assoc, ← (h.pow_right n.succ).eq, mul_assoc, mul_smul,
+ mul_adjugate, ← Matrix.mul_assoc,
mul_smul (Y ^ _) (↑hy'.unit⁻¹ : R), mul_adjugate, smul_smul, smul_smul, hx'.val_inv_mul,
hy'.val_inv_mul, one_smul, Matrix.mul_one, Matrix.one_mul]
#align matrix.semiconj_by.zpow_right Matrix.SemiconjBy.zpow_right
@@ -301,9 +301,9 @@ theorem zpow_sub {A : M} (ha : IsUnit A.det) (z1 z2 : ℤ) : A ^ (z1 - z2) = A ^
#align matrix.zpow_sub Matrix.zpow_sub
theorem Commute.mul_zpow {A B : M} (h : Commute A B) : ∀ i : ℤ, (A * B) ^ i = A ^ i * B ^ i
- | (n : ℕ) => by simp [h.mul_pow n, -mul_eq_mul]
+ | (n : ℕ) => by simp [h.mul_pow n]
| -[n+1] => by
- rw [zpow_negSucc, zpow_negSucc, zpow_negSucc, mul_eq_mul _⁻¹, ← mul_inv_rev, ← mul_eq_mul,
+ rw [zpow_negSucc, zpow_negSucc, zpow_negSucc, ← mul_inv_rev,
h.mul_pow n.succ, (h.pow_pow _ _).eq]
#align matrix.commute.mul_zpow Matrix.Commute.mul_zpow
@@ -318,7 +318,7 @@ theorem zpow_bit1' (A : M) (n : ℤ) : A ^ bit1 n = (A * A) ^ n * A := by
#align matrix.zpow_bit1' Matrix.zpow_bit1'
theorem zpow_neg_mul_zpow_self (n : ℤ) {A : M} (h : IsUnit A.det) : A ^ (-n) * A ^ n = 1 := by
- rw [zpow_neg h, mul_eq_mul, nonsing_inv_mul _ (h.det_zpow _)]
+ rw [zpow_neg h, nonsing_inv_mul _ (h.det_zpow _)]
#align matrix.zpow_neg_mul_zpow_self Matrix.zpow_neg_mul_zpow_self
theorem one_div_pow {A : M} (n : ℕ) : (1 / A) ^ n = 1 / A ^ n := by simp only [one_div, inv_pow']
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -29,7 +29,7 @@ open Matrix
namespace Matrix
-variable {n' : Type _} [DecidableEq n'] [Fintype n'] {R : Type _} [CommRing R]
+variable {n' : Type*} [DecidableEq n'] [Fintype n'] {R : Type*} [CommRing R]
local notation "M" => Matrix n' n' R
@@ -2,14 +2,11 @@
Copyright (c) 2021 Yakov Pechersky. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yakov Pechersky
-
-! This file was ported from Lean 3 source module linear_algebra.matrix.zpow
-! leanprover-community/mathlib commit 03fda9112aa6708947da13944a19310684bfdfcb
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
+#align_import linear_algebra.matrix.zpow from "leanprover-community/mathlib"@"03fda9112aa6708947da13944a19310684bfdfcb"
+
/-!
# Integer powers of square matrices
@@ -61,8 +61,8 @@ theorem pow_inv_comm' (A : M) (m n : ℕ) : A⁻¹ ^ m ⬝ A ^ n = A ^ n ⬝ A
cases' m with m m
· simp
rcases nonsing_inv_cancel_or_zero A with (⟨h, h'⟩ | h)
- · simp only [Nat.succ_eq_add_one]
- calc
+ · simp only [Nat.succ_eq_add_one]
+ calc
A⁻¹ ^ (m + 1) ⬝ A ^ (n + 1) = A⁻¹ ^ m ⬝ (A⁻¹ ⬝ A) ⬝ A ^ n := by
simp only [pow_succ' A⁻¹, pow_succ A, mul_eq_mul, Matrix.mul_assoc]
_ = A ^ n ⬝ A⁻¹ ^ m := by simp only [h, Matrix.mul_one, Matrix.one_mul, IH m]
cleanupAnnotations
to push_neg (#5082)
Expr
s now have an mdata
field. It seems that this gets in the way of push_neg
, as reported on Zulip.
The above seems to fix the reported errors.
Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
@@ -294,11 +294,7 @@ theorem coe_units_zpow (u : Mˣ) : ∀ n : ℤ, ((u ^ n : Mˣ) : M) = (u : M) ^
theorem zpow_ne_zero_of_isUnit_det [Nonempty n'] [Nontrivial R] {A : M} (ha : IsUnit A.det)
(z : ℤ) : A ^ z ≠ 0 := by
have := ha.det_zpow z
- -- Porting note: was `contrapose! this`
- revert this
- contrapose!
- rw [ne_eq, not_not]
- intro this
+ contrapose! this
rw [this, det_zero ‹_›]
exact not_isUnit_zero
#align matrix.zpow_ne_zero_of_is_unit_det Matrix.zpow_ne_zero_of_isUnit_det
Now that leanprover/lean4#2210 has been merged, this PR:
set_option synthInstance.etaExperiment true
commands (and some etaExperiment%
term elaborators)set_option maxHeartbeats
commandsCo-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Matthew Ballard <matt@mrb.email>
@@ -194,8 +194,6 @@ theorem zpow_one_add {A : M} (h : IsUnit A.det) (i : ℤ) : A ^ (1 + i) = A * A
rw [zpow_add h, zpow_one]
#align matrix.zpow_one_add Matrix.zpow_one_add
--- porting note: without etaExperiment it failes to synthesize DistribMulAction Rˣ R
-set_option synthInstance.etaExperiment true in
theorem SemiconjBy.zpow_right {A X Y : M} (hx : IsUnit X.det) (hy : IsUnit Y.det)
(h : SemiconjBy A X Y) : ∀ m : ℤ, SemiconjBy A (X ^ m) (Y ^ m)
| (n : ℕ) => by simp [h.pow_right n]
@@ -342,8 +340,6 @@ theorem transpose_zpow (A : M) : ∀ n : ℤ, (A ^ n)ᵀ = Aᵀ ^ n
| -[n+1] => by rw [zpow_negSucc, zpow_negSucc, transpose_nonsing_inv, transpose_pow]
#align matrix.transpose_zpow Matrix.transpose_zpow
--- porting note: without etaExperiment, conjTranspose_pow can't find the StarRing R instance.
-set_option synthInstance.etaExperiment true in
@[simp]
theorem conjTranspose_zpow [StarRing R] (A : M) : ∀ n : ℤ, (A ^ n)ᴴ = Aᴴ ^ n
| (n : ℕ) => by rw [zpow_ofNat, zpow_ofNat, conjTranspose_pow]
@@ -34,7 +34,6 @@ namespace Matrix
variable {n' : Type _} [DecidableEq n'] [Fintype n'] {R : Type _} [CommRing R]
--- mathport name: exprM
local notation "M" => Matrix n' n' R
noncomputable instance : DivInvMonoid M :=
@@ -70,7 +69,6 @@ theorem pow_inv_comm' (A : M) (m n : ℕ) : A⁻¹ ^ m ⬝ A ^ n = A ^ n ⬝ A
_ = A ^ n ⬝ (A ⬝ A⁻¹) ⬝ A⁻¹ ^ m := by simp only [h', Matrix.mul_one, Matrix.one_mul]
_ = A ^ (n + 1) ⬝ A⁻¹ ^ (m + 1) := by
simp only [pow_succ' A, pow_succ A⁻¹, mul_eq_mul, Matrix.mul_assoc]
-
· simp [h]
#align matrix.pow_inv_comm' Matrix.pow_inv_comm'
@@ -152,7 +150,7 @@ theorem inv_zpow' {A : M} (h : IsUnit A.det) (n : ℤ) : A⁻¹ ^ n = A ^ (-n) :
theorem zpow_add_one {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (n + 1) = A ^ n * A
| (n : ℕ) => by simp only [← Nat.cast_succ, pow_succ', zpow_ofNat]
- | -((n : ℕ) + 1) =>
+ | -[n+1] =>
calc
A ^ (-(n + 1) + 1 : ℤ) = (A ^ n)⁻¹ := by
rw [neg_add, neg_add_cancel_right, zpow_neg h, zpow_ofNat]
@@ -160,7 +158,6 @@ theorem zpow_add_one {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (n + 1) = A ^
rw [mul_inv_rev, Matrix.mul_assoc, nonsing_inv_mul _ h, Matrix.mul_one]
_ = A ^ (-(n + 1 : ℤ)) * A := by
rw [zpow_neg h, ← Int.ofNat_succ, zpow_ofNat, pow_succ, mul_eq_mul, mul_eq_mul]
-
#align matrix.zpow_add_one Matrix.zpow_add_one
theorem zpow_sub_one {A : M} (h : IsUnit A.det) (n : ℤ) : A ^ (n - 1) = A ^ n * A⁻¹ :=
@@ -168,14 +165,13 @@ theorem zpow_sub_one {A : M} (h : IsUnit A.det) (n : ℤ) : A ^ (n - 1) = A ^ n
A ^ (n - 1) = A ^ (n - 1) * A * A⁻¹ := by
rw [mul_assoc, mul_eq_mul A, mul_nonsing_inv _ h, mul_one]
_ = A ^ n * A⁻¹ := by rw [← zpow_add_one h, sub_add_cancel]
-
#align matrix.zpow_sub_one Matrix.zpow_sub_one
theorem zpow_add {A : M} (ha : IsUnit A.det) (m n : ℤ) : A ^ (m + n) = A ^ m * A ^ n := by
- induction' n using Int.induction_on with n ihn n ihn
- case hz => simp
- · simp only [← add_assoc, zpow_add_one ha, ihn, mul_assoc]
- · rw [zpow_sub_one ha, ← mul_assoc, ← ihn, ← zpow_sub_one ha, add_sub_assoc]
+ induction n using Int.induction_on with
+ | hz => simp
+ | hp n ihn => simp only [← add_assoc, zpow_add_one ha, ihn, mul_assoc]
+ | hn n ihn => rw [zpow_sub_one ha, ← mul_assoc, ← ihn, ← zpow_sub_one ha, add_sub_assoc]
#align matrix.zpow_add Matrix.zpow_add
theorem zpow_add_of_nonpos {A : M} {m n : ℤ} (hm : m ≤ 0) (hn : n ≤ 0) :
@@ -300,7 +296,7 @@ theorem coe_units_zpow (u : Mˣ) : ∀ n : ℤ, ((u ^ n : Mˣ) : M) = (u : M) ^
theorem zpow_ne_zero_of_isUnit_det [Nonempty n'] [Nontrivial R] {A : M} (ha : IsUnit A.det)
(z : ℤ) : A ^ z ≠ 0 := by
have := ha.det_zpow z
- -- oorting note: was `contrapose! this`
+ -- Porting note: was `contrapose! this`
revert this
contrapose!
rw [ne_eq, not_not]
The unported dependencies are