Nonsingular inverses over semirings #
This file proves A * B = 1 ↔ B * A = 1 for square matrices over a commutative semiring.
def
Matrix.detp
{n : Type u_1}
{R : Type u_3}
[Fintype n]
[DecidableEq n]
[CommSemiring R]
(s : ℤˣ)
(A : Matrix n n R)
:
R
The determinant, but only the terms of a given sign.
Equations
- Matrix.detp s A = ∑ σ ∈ Equiv.Perm.ofSign s, ∏ k : n, A k (σ k)
Instances For
@[simp]
theorem
Matrix.detp_one_one
{n : Type u_1}
{R : Type u_3}
[Fintype n]
[DecidableEq n]
[CommSemiring R]
:
@[simp]
theorem
Matrix.detp_neg_one_one
{n : Type u_1}
{R : Type u_3}
[Fintype n]
[DecidableEq n]
[CommSemiring R]
:
def
Matrix.adjp
{n : Type u_1}
{R : Type u_3}
[Fintype n]
[DecidableEq n]
[CommSemiring R]
(s : ℤˣ)
(A : Matrix n n R)
:
Matrix n n R
The adjugate matrix, but only the terms of a given sign.
Equations
- Matrix.adjp s A = Matrix.of fun (i j : n) => ∑ σ ∈ Equiv.Perm.ofSign s with σ j = i, ∏ k ∈ {j}ᶜ, A k (σ k)
Instances For
theorem
Matrix.adjp_apply
{n : Type u_1}
{R : Type u_3}
[Fintype n]
[DecidableEq n]
[CommSemiring R]
(s : ℤˣ)
(A : Matrix n n R)
(i j : n)
:
theorem
Matrix.mul_adjp_apply_eq
{n : Type u_1}
{R : Type u_3}
[Fintype n]
[DecidableEq n]
[CommSemiring R]
(s : ℤˣ)
(A : Matrix n n R)
(i : n)
:
theorem
Matrix.mul_adjp_apply_ne
{n : Type u_1}
{R : Type u_3}
[Fintype n]
[DecidableEq n]
[CommSemiring R]
(A : Matrix n n R)
(i j : n)
(h : i ≠ j)
:
theorem
Matrix.isAddUnit_mul
{n : Type u_1}
{R : Type u_3}
[Fintype n]
[DecidableEq n]
[CommSemiring R]
{A B : Matrix n n R}
(hAB : A * B = 1)
(i j k : n)
(hij : i ≠ j)
:
@[instance 100]
@[deprecated mul_eq_one_comm (since := "2025-11-29")]
Alias of mul_eq_one_comm.
@[deprecated invertibleOfLeftInverse (since := "2025-12-06")]
def
Matrix.invertibleOfLeftInverse
{n : Type u_1}
{R : Type u_3}
[Fintype n]
[DecidableEq n]
[CommSemiring R]
(A B : Matrix n n R)
(h : B * A = 1)
:
We can construct an instance of invertible A if A has a left inverse.
Equations
- A.invertibleOfLeftInverse B h = invertibleOfLeftInverse A B h
Instances For
@[deprecated invertibleOfRightInverse (since := "2025-12-06")]
def
Matrix.invertibleOfRightInverse
{n : Type u_1}
{R : Type u_3}
[Fintype n]
[DecidableEq n]
[CommSemiring R]
(A B : Matrix n n R)
(h : A * B = 1)
:
We can construct an instance of invertible A if A has a right inverse.
Equations
- A.invertibleOfRightInverse B h = invertibleOfRightInverse A B h
Instances For
@[deprecated IsUnit.of_mul_eq_one_right (since := "2025-12-06")]
theorem
Matrix.isUnit_of_left_inverse
{n : Type u_1}
{R : Type u_3}
[Fintype n]
[DecidableEq n]
[CommSemiring R]
{A B : Matrix n n R}
(h : B * A = 1)
:
IsUnit A
@[deprecated isUnit_iff_exists_inv' (since := "2025-12-06")]
theorem
Matrix.exists_left_inverse_iff_isUnit
{n : Type u_1}
{R : Type u_3}
[Fintype n]
[DecidableEq n]
[CommSemiring R]
{A : Matrix n n R}
:
@[deprecated IsUnit.of_mul_eq_one (since := "2025-12-06")]
theorem
Matrix.isUnit_of_right_inverse
{n : Type u_1}
{R : Type u_3}
[Fintype n]
[DecidableEq n]
[CommSemiring R]
{A B : Matrix n n R}
(h : A * B = 1)
:
IsUnit A
@[deprecated isUnit_iff_exists_inv (since := "2025-12-06")]
theorem
Matrix.exists_right_inverse_iff_isUnit
{n : Type u_1}
{R : Type u_3}
[Fintype n]
[DecidableEq n]
[CommSemiring R]
{A : Matrix n n R}
: