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.
A.detp 1 is written |A|⁺ in the literature and A.detp (-1) is written |A|⁻.
Equations
- Matrix.detp s A = ∑ σ ∈ Equiv.Perm.ofSign s, ∏ k : n, A k (σ k)
Instances For
@[simp]
theorem
Matrix.detp_transpose
{n : Type u_1}
{R : Type u_3}
[Fintype n]
[DecidableEq n]
[CommSemiring R]
(s : ℤˣ)
(A : Matrix n n R)
:
@[simp]
theorem
Matrix.detp_one_diagonal
{n : Type u_1}
{R : Type u_3}
[Fintype n]
[DecidableEq n]
[CommSemiring R]
(d : n → R)
:
@[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_diagonal
{n : Type u_1}
{R : Type u_3}
[Fintype n]
[DecidableEq n]
[CommSemiring R]
(d : n → R)
:
@[simp]
theorem
Matrix.detp_neg_one_one
{n : Type u_1}
{R : Type u_3}
[Fintype n]
[DecidableEq n]
[CommSemiring R]
:
@[simp]
theorem
Matrix.detp_one_of_isEmpty
{n : Type u_1}
{R : Type u_3}
[Fintype n]
[DecidableEq n]
[CommSemiring R]
(A : Matrix n n R)
[IsEmpty n]
:
@[simp]
theorem
Matrix.detp_neg_one_of_isEmpty
{n : Type u_1}
{R : Type u_3}
[Fintype n]
[DecidableEq n]
[CommSemiring R]
(A : Matrix n n R)
[IsEmpty n]
:
@[simp]
theorem
Matrix.detp_submatrix_equiv_equiv
{n : Type u_1}
{m : Type u_2}
{R : Type u_3}
[Fintype m]
[Fintype n]
[DecidableEq m]
[DecidableEq n]
[CommSemiring R]
(s : ℤˣ)
(A : Matrix n n R)
(f g : m ≃ n)
:
theorem
Matrix.detp_submatrix_equiv_self
{n : Type u_1}
{m : Type u_2}
{R : Type u_3}
[Fintype m]
[Fintype n]
[DecidableEq m]
[DecidableEq n]
[CommSemiring R]
(s : ℤˣ)
(A : Matrix n n R)
(e : m ≃ n)
:
theorem
Matrix.detp_eq_of_row_eq_zero
{n : Type u_1}
{R : Type u_3}
[Fintype n]
[DecidableEq n]
[CommSemiring R]
(s : ℤˣ)
{A : Matrix n n R}
{p : n}
(hrow : A.row p = 0)
:
theorem
Matrix.detp_eq_of_col_eq_zero
{n : Type u_1}
{R : Type u_3}
[Fintype n]
[DecidableEq n]
[CommSemiring R]
(s : ℤˣ)
{A : Matrix n n R}
{p : n}
(hcol : A.col p = 0)
:
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.adjp_transpose
{n : Type u_1}
{R : Type u_3}
[Fintype n]
[DecidableEq n]
[CommSemiring R]
(s : ℤˣ)
(A : Matrix n n R)
:
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.adjp_mul_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.adjp_mul_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.detp_option_expand_row_none
{n : Type u_1}
{R : Type u_3}
[Fintype n]
[DecidableEq n]
[CommSemiring R]
(s : ℤˣ)
(A : Matrix (Option n) (Option n) R)
:
Laplace expansion of detp along the none row of an Option-indexed matrix.
theorem
Matrix.isAddUnit_mul
{n : Type u_1}
{R : Type u_3}
[Fintype n]
[DecidableEq n]
[CommSemiring R]
{A B : Matrix n n R}
{d : n → R}
(hAB : A * B = diagonal d)
(i j k : n)
(hij : i ≠ j)
:
@[instance 100]