Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: port LinearAlgebra.Matrix.InvariantBasisNumber (#3697)
- Loading branch information
1 parent
85f0cc5
commit 0c1b7aa
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/- | ||
Copyright (c) 2022 Scott Morrison. All rights reserved. | ||
Released under Apache 2.0 license as described in the file LICENSE. | ||
Authors: Scott Morrison | ||
! This file was ported from Lean 3 source module linear_algebra.matrix.invariant_basis_number | ||
! leanprover-community/mathlib commit 843240b048bbb19942c581fd64caecbbe96337be | ||
! Please do not edit these lines, except to modify the commit id | ||
! if you have ported upstream changes. | ||
-/ | ||
import Mathlib.LinearAlgebra.Matrix.ToLin | ||
import Mathlib.LinearAlgebra.InvariantBasisNumber | ||
|
||
/-! | ||
# Invertible matrices over a ring with invariant basis number are square. | ||
-/ | ||
|
||
|
||
variable {n m : Type _} [Fintype n] [DecidableEq n] [Fintype m] [DecidableEq m] | ||
|
||
variable {R : Type _} [Semiring R] [InvariantBasisNumber R] | ||
|
||
open Matrix | ||
|
||
theorem Matrix.square_of_invertible (M : Matrix n m R) (N : Matrix m n R) (h : M ⬝ N = 1) | ||
(h' : N ⬝ M = 1) : Fintype.card n = Fintype.card m := | ||
card_eq_of_linearEquiv R (Matrix.toLinearEquivRight'OfInv h' h) | ||
#align matrix.square_of_invertible Matrix.square_of_invertible | ||
|