File: Mathlib/LinearAlgebra/Matrix/NonsingularInverse.lean

full_name: Matrix.invertibleOfDetInvertible
code: /-- If `A.det` has a constructive inverse, produce one for `A`. -/
def invertibleOfDetInvertible [Invertible A.det] : Invertible A 
goal: Invertible A

full_name: Matrix.invOf_eq
code: theorem invOf_eq [Invertible A.det] [Invertible A] : ⅟ A = ⅟ A.det • A.adjugate 
goal: ⅟A = ⅟A.det • A.adjugate

full_name: Matrix.detInvertibleOfLeftInverse
code: /-- `A.det` is invertible if `A` has a left inverse. -/
def detInvertibleOfLeftInverse (h : B * A = 1) : Invertible A.det 
goal: Invertible A.det

full_name: Matrix.detInvertibleOfRightInverse
code: /-- `A.det` is invertible if `A` has a right inverse. -/
def detInvertibleOfRightInverse (h : A * B = 1) : Invertible A.det 
goal: Invertible A.det

full_name: Matrix.detInvertibleOfInvertible
code: /-- If `A` has a constructive inverse, produce one for `A.det`. -/
def detInvertibleOfInvertible [Invertible A] : Invertible A.det 
goal: Invertible A.det

full_name: Matrix.det_invOf
code: theorem det_invOf [Invertible A] [Invertible A.det] : (⅟ A).det = ⅟ A.det 
goal: (⅟A).det = ⅟A.det

full_name: Matrix.invertibleEquivDetInvertible_symm_apply
code: /-- Together `Matrix.detInvertibleOfInvertible` and `Matrix.invertibleOfDetInvertible` form an
equivalence, although both sides of the equiv are subsingleton anyway. -/
@[simps]
def invertibleEquivDetInvertible : Invertible A ≃ Invertible A.det 
goal: A.invertibleEquivDetInvertible.symm inst✝ = A.invertibleOfDetInvertible

full_name: Matrix.invertibleEquivDetInvertible
code: /-- Together `Matrix.detInvertibleOfInvertible` and `Matrix.invertibleOfDetInvertible` form an
equivalence, although both sides of the equiv are subsingleton anyway. -/
@[simps]
def invertibleEquivDetInvertible : Invertible A ≃ Invertible A.det 
goal: Invertible A ≃ Invertible A.det

full_name: Matrix.invertibleEquivDetInvertible_apply
code: /-- Together `Matrix.detInvertibleOfInvertible` and `Matrix.invertibleOfDetInvertible` form an
equivalence, although both sides of the equiv are subsingleton anyway. -/
@[simps]
def invertibleEquivDetInvertible : Invertible A ≃ Invertible A.det 
goal: A.invertibleEquivDetInvertible inst✝ = A.detInvertibleOfInvertible

full_name: Matrix.mul_eq_one_comm
code: theorem mul_eq_one_comm : A * B = 1 ↔ B * A = 1 
goal: A * B = 1 ↔ B * A = 1

full_name: Matrix.invertibleOfLeftInverse
code: /-- We can construct an instance of invertible A if A has a left inverse. -/
def invertibleOfLeftInverse (h : B * A = 1) : Invertible A 
goal: Invertible A

full_name: Matrix.invertibleOfRightInverse
code: /-- We can construct an instance of invertible A if A has a right inverse. -/
def invertibleOfRightInverse (h : A * B = 1) : Invertible A 
goal: Invertible A

full_name: Matrix.unitOfDetInvertible
code: /-- Given a proof that `A.det` has a constructive inverse, lift `A` to `(Matrix n n α)ˣ`-/
def unitOfDetInvertible [Invertible A.det] : (Matrix n n α)ˣ 
goal: (Matrix n n α)ˣ

full_name: Matrix.isUnit_iff_isUnit_det
code: /-- When lowered to a prop, `Matrix.invertibleEquivDetInvertible` forms an `iff`. -/
theorem isUnit_iff_isUnit_det : IsUnit A ↔ IsUnit A.det 
goal: IsUnit A ↔ IsUnit A.det

full_name: Matrix.isUnits_det_units
code: @[simp]
theorem isUnits_det_units (A : (Matrix n n α)ˣ) : IsUnit (A : Matrix n n α).det 
goal: IsUnit (↑A).det

full_name: Matrix.isUnit_det_of_invertible
code: theorem isUnit_det_of_invertible [Invertible A] : IsUnit A.det 
goal: IsUnit A.det

full_name: Matrix.isUnit_of_left_inverse
code: theorem isUnit_of_left_inverse (h : B * A = 1) : IsUnit A 
goal: IsUnit A

full_name: Matrix.exists_left_inverse_iff_isUnit
code: theorem exists_left_inverse_iff_isUnit : (∃ B, B * A = 1) ↔ IsUnit A 
goal: (∃ B, B * A = 1) ↔ IsUnit A

full_name: Matrix.isUnit_of_right_inverse
code: theorem isUnit_of_right_inverse (h : A * B = 1) : IsUnit A 
goal: IsUnit A

full_name: Matrix.exists_right_inverse_iff_isUnit
code: theorem exists_right_inverse_iff_isUnit : (∃ B, A * B = 1) ↔ IsUnit A 
goal: (∃ B, A * B = 1) ↔ IsUnit A

full_name: Matrix.isUnit_det_of_left_inverse
code: theorem isUnit_det_of_left_inverse (h : B * A = 1) : IsUnit A.det 
goal: IsUnit A.det

full_name: Matrix.isUnit_det_of_right_inverse
code: theorem isUnit_det_of_right_inverse (h : A * B = 1) : IsUnit A.det 
goal: IsUnit A.det

full_name: Matrix.det_ne_zero_of_left_inverse
code: theorem det_ne_zero_of_left_inverse [Nontrivial α] (h : B * A = 1) : A.det ≠ 0 
goal: A.det ≠ 0

full_name: Matrix.det_ne_zero_of_right_inverse
code: theorem det_ne_zero_of_right_inverse [Nontrivial α] (h : A * B = 1) : A.det ≠ 0 
goal: A.det ≠ 0

full_name: Matrix.isUnit_det_transpose
code: theorem isUnit_det_transpose (h : IsUnit A.det) : IsUnit Aᵀ.det 
goal: IsUnit A.transpose.det

full_name: Matrix.inv
code: /-- The inverse of a square matrix, when it is invertible (and zero otherwise). -/
noncomputable instance inv : Inv (Matrix n n α) 
goal: Inv (Matrix n n α)

full_name: Matrix.inv_def
code: theorem inv_def (A : Matrix n n α) : A⁻¹ = Ring.inverse A.det • A.adjugate 
goal: A⁻¹ = Ring.inverse A.det • A.adjugate

full_name: Matrix.nonsing_inv_apply_not_isUnit
code: theorem nonsing_inv_apply_not_isUnit (h : ¬IsUnit A.det) : A⁻¹ = 0 
goal: A⁻¹ = 0

full_name: Matrix.nonsing_inv_apply
code: theorem nonsing_inv_apply (h : IsUnit A.det) : A⁻¹ = (↑h.unit⁻¹ : α) • A.adjugate 
goal: A⁻¹ = ↑h.unit⁻¹ • A.adjugate

full_name: Matrix.invOf_eq_nonsing_inv
code: /-- The nonsingular inverse is the same as `invOf` when `A` is invertible. -/
@[simp]
theorem invOf_eq_nonsing_inv [Invertible A] : ⅟ A = A⁻¹ 
goal: ⅟A = A⁻¹

full_name: Matrix.coe_units_inv
code: /-- Coercing the result of `Units.instInv` is the same as coercing first and applying the
nonsingular inverse. -/
@[simp, norm_cast]
theorem coe_units_inv (A : (Matrix n n α)ˣ) : ↑A⁻¹ = (A⁻¹ : Matrix n n α) 
goal: ↑A⁻¹ = (↑A)⁻¹

full_name: Matrix.nonsing_inv_eq_ring_inverse
code: /-- The nonsingular inverse is the same as the general `Ring.inverse`. -/
theorem nonsing_inv_eq_ring_inverse : A⁻¹ = Ring.inverse A 
goal: A⁻¹ = Ring.inverse A

full_name: Matrix.transpose_nonsing_inv
code: theorem transpose_nonsing_inv : A⁻¹ᵀ = Aᵀ⁻¹ 
goal: A⁻¹.transpose = A.transpose⁻¹

full_name: Matrix.conjTranspose_nonsing_inv
code: theorem conjTranspose_nonsing_inv [StarRing α] : A⁻¹ᴴ = Aᴴ⁻¹ 
goal: A⁻¹.conjTranspose = A.conjTranspose⁻¹

full_name: Matrix.mul_nonsing_inv
code: /-- The `nonsing_inv` of `A` is a right inverse. -/
@[simp]
theorem mul_nonsing_inv (h : IsUnit A.det) : A * A⁻¹ = 1 
goal: A * A⁻¹ = 1

full_name: Matrix.nonsing_inv_mul
code: /-- The `nonsing_inv` of `A` is a left inverse. -/
@[simp]
theorem nonsing_inv_mul (h : IsUnit A.det) : A⁻¹ * A = 1 
goal: A⁻¹ * A = 1

full_name: Matrix.instInvertibleInv
code: instance [Invertible A] : Invertible A⁻¹ 
goal: Invertible A⁻¹

full_name: Matrix.inv_inv_of_invertible
code: @[simp]
theorem inv_inv_of_invertible [Invertible A] : A⁻¹⁻¹ = A 
goal: A⁻¹⁻¹ = A

full_name: Matrix.mul_nonsing_inv_cancel_right
code: @[simp]
theorem mul_nonsing_inv_cancel_right (B : Matrix m n α) (h : IsUnit A.det) : B * A * A⁻¹ = B 
goal: B * A * A⁻¹ = B

full_name: Matrix.mul_nonsing_inv_cancel_left
code: @[simp]
theorem mul_nonsing_inv_cancel_left (B : Matrix n m α) (h : IsUnit A.det) : A * (A⁻¹ * B) = B 
goal: A * (A⁻¹ * B) = B

full_name: Matrix.nonsing_inv_mul_cancel_right
code: @[simp]
theorem nonsing_inv_mul_cancel_right (B : Matrix m n α) (h : IsUnit A.det) : B * A⁻¹ * A = B 
goal: B * A⁻¹ * A = B

full_name: Matrix.nonsing_inv_mul_cancel_left
code: @[simp]
theorem nonsing_inv_mul_cancel_left (B : Matrix n m α) (h : IsUnit A.det) : A⁻¹ * (A * B) = B 
goal: A⁻¹ * (A * B) = B

full_name: Matrix.mul_inv_of_invertible
code: @[simp]
theorem mul_inv_of_invertible [Invertible A] : A * A⁻¹ = 1 
goal: A * A⁻¹ = 1

full_name: Matrix.inv_mul_of_invertible
code: @[simp]
theorem inv_mul_of_invertible [Invertible A] : A⁻¹ * A = 1 
goal: A⁻¹ * A = 1

full_name: Matrix.mul_inv_cancel_right_of_invertible
code: @[simp]
theorem mul_inv_cancel_right_of_invertible (B : Matrix m n α) [Invertible A] : B * A * A⁻¹ = B 
goal: B * A * A⁻¹ = B

full_name: Matrix.mul_inv_cancel_left_of_invertible
code: @[simp]
theorem mul_inv_cancel_left_of_invertible (B : Matrix n m α) [Invertible A] : A * (A⁻¹ * B) = B 
goal: A * (A⁻¹ * B) = B

full_name: Matrix.inv_mul_cancel_right_of_invertible
code: @[simp]
theorem inv_mul_cancel_right_of_invertible (B : Matrix m n α) [Invertible A] : B * A⁻¹ * A = B 
goal: B * A⁻¹ * A = B

full_name: Matrix.inv_mul_cancel_left_of_invertible
code: @[simp]
theorem inv_mul_cancel_left_of_invertible (B : Matrix n m α) [Invertible A] : A⁻¹ * (A * B) = B 
goal: A⁻¹ * (A * B) = B

full_name: Matrix.inv_mul_eq_iff_eq_mul_of_invertible
code: theorem inv_mul_eq_iff_eq_mul_of_invertible (A B C : Matrix n n α) [Invertible A] :
    A⁻¹ * B = C ↔ B = A * C 
goal: A⁻¹ * B = C ↔ B = A * C

full_name: Matrix.mul_inv_eq_iff_eq_mul_of_invertible
code: theorem mul_inv_eq_iff_eq_mul_of_invertible (A B C : Matrix n n α) [Invertible A] :
    B * A⁻¹ = C ↔ B = C * A 
goal: B * A⁻¹ = C ↔ B = C * A

full_name: Matrix.inv_mulVec_eq_vec
code: lemma inv_mulVec_eq_vec {A : Matrix n n α} [Invertible A]
    {u v : n → α} (hM : u = A.mulVec v) : A⁻¹.mulVec u = v 
goal: A⁻¹.mulVec u = v

full_name: Matrix.mul_right_injective_of_invertible
code: lemma mul_right_injective_of_invertible [Invertible A] :
    Function.Injective (fun (x : Matrix n m α) => A * x) 
goal: Function.Injective fun x => A * x

full_name: Matrix.mul_left_injective_of_invertible
code: lemma mul_left_injective_of_invertible [Invertible A] :
    Function.Injective (fun (x : Matrix m n α) => x * A) 
goal: Function.Injective fun x => x * A

full_name: Matrix.mul_right_inj_of_invertible
code: lemma mul_right_inj_of_invertible [Invertible A] {x y : Matrix n m α} : A * x = A * y ↔ x = y 
goal: A * x = A * y ↔ x = y

full_name: Matrix.mul_left_inj_of_invertible
code: lemma mul_left_inj_of_invertible [Invertible A] {x y : Matrix m n α} : x * A = y * A ↔ x = y 
goal: x * A = y * A ↔ x = y

full_name: Matrix.mul_left_injective_of_inv
code: lemma mul_left_injective_of_inv (A : Matrix m n α) (B : Matrix n m α) (h : A * B = 1) :
    Function.Injective (fun x : Matrix l m α => x * A) 
goal: Function.Injective fun x => x * A

full_name: Matrix.mul_right_injective_of_inv
code: lemma mul_right_injective_of_inv (A : Matrix m n α) (B : Matrix n m α) (h : A * B = 1) :
    Function.Injective (fun x : Matrix m l α => B * x) 
goal: Function.Injective fun x => B * x

full_name: Matrix.vecMul_surjective_iff_exists_left_inverse
code: theorem vecMul_surjective_iff_exists_left_inverse [Fintype m] [Finite n] {A : Matrix m n R} :
    Function.Surjective A.vecMul ↔ ∃ B : Matrix n m R, B * A = 1 
goal: (Function.Surjective fun v => Matrix.vecMul v A) ↔ ∃ B, B * A = 1

full_name: Matrix.mulVec_surjective_iff_exists_right_inverse
code: theorem mulVec_surjective_iff_exists_right_inverse [Finite m] [Fintype n] {A : Matrix m n R} :
    Function.Surjective A.mulVec ↔ ∃ B : Matrix n m R, A * B = 1 
goal: Function.Surjective A.mulVec ↔ ∃ B, A * B = 1

full_name: Matrix.vecMul_surjective_iff_isUnit
code: theorem vecMul_surjective_iff_isUnit {A : Matrix m m R} :
    Function.Surjective A.vecMul ↔ IsUnit A 
goal: (Function.Surjective fun v => Matrix.vecMul v A) ↔ IsUnit A

full_name: Matrix.mulVec_surjective_iff_isUnit
code: theorem mulVec_surjective_iff_isUnit {A : Matrix m m R} :
    Function.Surjective A.mulVec ↔ IsUnit A 
goal: Function.Surjective A.mulVec ↔ IsUnit A

full_name: Matrix.vecMul_injective_iff_isUnit
code: theorem vecMul_injective_iff_isUnit {A : Matrix m m K} :
    Function.Injective A.vecMul ↔ IsUnit A 
goal: (Function.Injective fun v => Matrix.vecMul v A) ↔ IsUnit A

full_name: Matrix.mulVec_injective_iff_isUnit
code: theorem mulVec_injective_iff_isUnit {A : Matrix m m K} :
    Function.Injective A.mulVec ↔ IsUnit A 
goal: Function.Injective A.mulVec ↔ IsUnit A

full_name: Matrix.linearIndependent_rows_iff_isUnit
code: theorem linearIndependent_rows_iff_isUnit {A : Matrix m m K} :
    LinearIndependent K (fun i ↦ A i) ↔ IsUnit A 
goal: (LinearIndependent K fun i => A i) ↔ IsUnit A

full_name: Matrix.linearIndependent_cols_iff_isUnit
code: theorem linearIndependent_cols_iff_isUnit {A : Matrix m m K} :
    LinearIndependent K (fun i ↦ Aᵀ i) ↔ IsUnit A 
goal: (LinearIndependent K fun i => A.transpose i) ↔ IsUnit A

full_name: Matrix.vecMul_surjective_of_invertible
code: theorem vecMul_surjective_of_invertible (A : Matrix m m R) [Invertible A] :
    Function.Surjective A.vecMul 
goal: Function.Surjective fun v => Matrix.vecMul v A

full_name: Matrix.mulVec_surjective_of_invertible
code: theorem mulVec_surjective_of_invertible (A : Matrix m m R) [Invertible A] :
    Function.Surjective A.mulVec 
goal: Function.Surjective A.mulVec

full_name: Matrix.vecMul_injective_of_invertible
code: theorem vecMul_injective_of_invertible (A : Matrix m m K) [Invertible A] :
    Function.Injective A.vecMul 
goal: Function.Injective fun v => Matrix.vecMul v A

full_name: Matrix.mulVec_injective_of_invertible
code: theorem mulVec_injective_of_invertible (A : Matrix m m K) [Invertible A] :
    Function.Injective A.mulVec 
goal: Function.Injective A.mulVec

full_name: Matrix.linearIndependent_rows_of_invertible
code: theorem linearIndependent_rows_of_invertible (A : Matrix m m K) [Invertible A] :
    LinearIndependent K (fun i ↦ A i) 
goal: LinearIndependent K fun i => A i

full_name: Matrix.linearIndependent_cols_of_invertible
code: theorem linearIndependent_cols_of_invertible (A : Matrix m m K) [Invertible A] :
    LinearIndependent K (fun i ↦ Aᵀ i) 
goal: LinearIndependent K fun i => A.transpose i

full_name: Matrix.nonsing_inv_cancel_or_zero
code: theorem nonsing_inv_cancel_or_zero : A⁻¹ * A = 1 ∧ A * A⁻¹ = 1 ∨ A⁻¹ = 0 
goal: A⁻¹ * A = 1 ∧ A * A⁻¹ = 1 ∨ A⁻¹ = 0

full_name: Matrix.det_nonsing_inv_mul_det
code: theorem det_nonsing_inv_mul_det (h : IsUnit A.det) : A⁻¹.det * A.det = 1 
goal: A⁻¹.det * A.det = 1

full_name: Matrix.det_nonsing_inv
code: @[simp]
theorem det_nonsing_inv : A⁻¹.det = Ring.inverse A.det 
goal: A⁻¹.det = Ring.inverse A.det

full_name: Matrix.isUnit_nonsing_inv_det
code: theorem isUnit_nonsing_inv_det (h : IsUnit A.det) : IsUnit A⁻¹.det 
goal: IsUnit A⁻¹.det

full_name: Matrix.nonsing_inv_nonsing_inv
code: @[simp]
theorem nonsing_inv_nonsing_inv (h : IsUnit A.det) : A⁻¹⁻¹ = A 
goal: A⁻¹⁻¹ = A

full_name: Matrix.isUnit_nonsing_inv_det_iff
code: theorem isUnit_nonsing_inv_det_iff {A : Matrix n n α} : IsUnit A⁻¹.det ↔ IsUnit A.det 
goal: IsUnit A⁻¹.det ↔ IsUnit A.det

full_name: Matrix.invertibleOfIsUnitDet
code: /-- A version of `Matrix.invertibleOfDetInvertible` with the inverse defeq to `A⁻¹` that is
therefore noncomputable. -/
noncomputable def invertibleOfIsUnitDet (h : IsUnit A.det) : Invertible A 
goal: Invertible A

full_name: Matrix.nonsingInvUnit
code: /-- A version of `Matrix.unitOfDetInvertible` with the inverse defeq to `A⁻¹` that is therefore
noncomputable. -/
noncomputable def nonsingInvUnit (h : IsUnit A.det) : (Matrix n n α)ˣ 
goal: (Matrix n n α)ˣ

full_name: Matrix.unitOfDetInvertible_eq_nonsingInvUnit
code: theorem unitOfDetInvertible_eq_nonsingInvUnit [Invertible A.det] :
    unitOfDetInvertible A = nonsingInvUnit A (isUnit_of_invertible _) 
goal: A.unitOfDetInvertible = A.nonsingInvUnit ⋯

full_name: Matrix.inv_eq_left_inv
code: /-- If matrix A is left invertible, then its inverse equals its left inverse. -/
theorem inv_eq_left_inv (h : B * A = 1) : A⁻¹ = B 
goal: A⁻¹ = B

full_name: Matrix.inv_eq_right_inv
code: /-- If matrix A is right invertible, then its inverse equals its right inverse. -/
theorem inv_eq_right_inv (h : A * B = 1) : A⁻¹ = B 
goal: A⁻¹ = B

full_name: Matrix.left_inv_eq_left_inv
code: /-- The left inverse of matrix A is unique when existing. -/
theorem left_inv_eq_left_inv (h : B * A = 1) (g : C * A = 1) : B = C 
goal: B = C

full_name: Matrix.right_inv_eq_right_inv
code: /-- The right inverse of matrix A is unique when existing. -/
theorem right_inv_eq_right_inv (h : A * B = 1) (g : A * C = 1) : B = C 
goal: B = C

full_name: Matrix.right_inv_eq_left_inv
code: /-- The right inverse of matrix A equals the left inverse of A when they exist. -/
theorem right_inv_eq_left_inv (h : A * B = 1) (g : C * A = 1) : B = C 
goal: B = C

full_name: Matrix.inv_inj
code: theorem inv_inj (h : A⁻¹ = B⁻¹) (h' : IsUnit A.det) : A = B 
goal: A = B

full_name: Matrix.inv_zero
code: @[simp]
theorem inv_zero : (0 : Matrix n n α)⁻¹ = 0 
goal: 0⁻¹ = 0

full_name: Matrix.instInvOneClass
code: noncomputable instance : InvOneClass (Matrix n n α) 
goal: InvOneClass (Matrix n n α)

full_name: Matrix.inv_smul
code: theorem inv_smul (k : α) [Invertible k] (h : IsUnit A.det) : (k • A)⁻¹ = ⅟ k • A⁻¹ 
goal: (k • A)⁻¹ = ⅟k • A⁻¹

full_name: Matrix.inv_smul'
code: theorem inv_smul' (k : αˣ) (h : IsUnit A.det) : (k • A)⁻¹ = k⁻¹ • A⁻¹ 
goal: (k • A)⁻¹ = k⁻¹ • A⁻¹

full_name: Matrix.inv_adjugate
code: theorem inv_adjugate (A : Matrix n n α) (h : IsUnit A.det) : (adjugate A)⁻¹ = h.unit⁻¹ • A 
goal: A.adjugate⁻¹ = h.unit⁻¹ • A

full_name: Matrix.diagonalInvertible
code: /-- `diagonal v` is invertible if `v` is -/
def diagonalInvertible {α} [NonAssocSemiring α] (v : n → α) [Invertible v] :
    Invertible (diagonal v) 
goal: Invertible (Matrix.diagonal v)

full_name: Matrix.invOf_diagonal_eq
code: theorem invOf_diagonal_eq {α} [Semiring α] (v : n → α) [Invertible v] [Invertible (diagonal v)] :
    ⅟ (diagonal v) = diagonal (⅟ v) 
goal: ⅟(Matrix.diagonal v) = Matrix.diagonal ⅟v

full_name: Matrix.invertibleOfDiagonalInvertible
code: /-- `v` is invertible if `diagonal v` is -/
def invertibleOfDiagonalInvertible (v : n → α) [Invertible (diagonal v)] : Invertible v 
goal: Invertible v

full_name: Matrix.diagonalInvertibleEquivInvertible_apply
code: /-- Together `Matrix.diagonalInvertible` and `Matrix.invertibleOfDiagonalInvertible` form an
equivalence, although both sides of the equiv are subsingleton anyway. -/
@[simps]
def diagonalInvertibleEquivInvertible (v : n → α) : Invertible (diagonal v) ≃ Invertible v 
goal: (Matrix.diagonalInvertibleEquivInvertible v) inst✝ = Matrix.invertibleOfDiagonalInvertible v

full_name: Matrix.diagonalInvertibleEquivInvertible
code: /-- Together `Matrix.diagonalInvertible` and `Matrix.invertibleOfDiagonalInvertible` form an
equivalence, although both sides of the equiv are subsingleton anyway. -/
@[simps]
def diagonalInvertibleEquivInvertible (v : n → α) : Invertible (diagonal v) ≃ Invertible v 
goal: Invertible (Matrix.diagonal v) ≃ Invertible v

full_name: Matrix.diagonalInvertibleEquivInvertible_symm_apply
code: /-- Together `Matrix.diagonalInvertible` and `Matrix.invertibleOfDiagonalInvertible` form an
equivalence, although both sides of the equiv are subsingleton anyway. -/
@[simps]
def diagonalInvertibleEquivInvertible (v : n → α) : Invertible (diagonal v) ≃ Invertible v 
goal: (Matrix.diagonalInvertibleEquivInvertible v).symm inst✝ = Matrix.diagonalInvertible v

full_name: Matrix.isUnit_diagonal
code: /-- When lowered to a prop, `Matrix.diagonalInvertibleEquivInvertible` forms an `iff`. -/
@[simp]
theorem isUnit_diagonal {v : n → α} : IsUnit (diagonal v) ↔ IsUnit v 
goal: IsUnit (Matrix.diagonal v) ↔ IsUnit v

full_name: Matrix.inv_diagonal
code: theorem inv_diagonal (v : n → α) : (diagonal v)⁻¹ = diagonal (Ring.inverse v) 
goal: (Matrix.diagonal v)⁻¹ = Matrix.diagonal (Ring.inverse v)

full_name: Matrix.inv_inv_inv
code: @[simp]
theorem inv_inv_inv (A : Matrix n n α) : A⁻¹⁻¹⁻¹ = A⁻¹ 
goal: A⁻¹⁻¹⁻¹ = A⁻¹

full_name: Matrix.inv_add_inv
code: /-- The `Matrix` version of `inv_add_inv'` -/
theorem inv_add_inv {A B : Matrix n n α} (h : IsUnit A ↔ IsUnit B) :
    A⁻¹ + B⁻¹ = A⁻¹ * (A + B) * B⁻¹ 
goal: A⁻¹ + B⁻¹ = A⁻¹ * (A + B) * B⁻¹

full_name: Matrix.inv_sub_inv
code: /-- The `Matrix` version of `inv_sub_inv'` -/
theorem inv_sub_inv {A B : Matrix n n α} (h : IsUnit A ↔ IsUnit B) :
    A⁻¹ - B⁻¹ = A⁻¹ * (B - A) * B⁻¹ 
goal: A⁻¹ - B⁻¹ = A⁻¹ * (B - A) * B⁻¹

full_name: Matrix.mul_inv_rev
code: theorem mul_inv_rev (A B : Matrix n n α) : (A * B)⁻¹ = B⁻¹ * A⁻¹ 
goal: (A * B)⁻¹ = B⁻¹ * A⁻¹

full_name: Matrix.list_prod_inv_reverse
code: /-- A version of `List.prod_inv_reverse` for `Matrix.inv`. -/
theorem list_prod_inv_reverse : ∀ l : List (Matrix n n α), l.prod⁻¹ = (l.reverse.map Inv.inv).prod
  
goal: l.prod⁻¹ = (List.map Inv.inv l.reverse).prod

full_name: Matrix.det_smul_inv_mulVec_eq_cramer
code: /-- One form of **Cramer's rule**. See `Matrix.mulVec_cramer` for a stronger form. -/
@[simp]
theorem det_smul_inv_mulVec_eq_cramer (A : Matrix n n α) (b : n → α) (h : IsUnit A.det) :
    A.det • A⁻¹ *ᵥ b = cramer A b 
goal: A.det • A⁻¹.mulVec b = A.cramer b

full_name: Matrix.det_smul_inv_vecMul_eq_cramer_transpose
code: /-- One form of **Cramer's rule**. See `Matrix.mulVec_cramer` for a stronger form. -/
@[simp]
theorem det_smul_inv_vecMul_eq_cramer_transpose (A : Matrix n n α) (b : n → α) (h : IsUnit A.det) :
    A.det • b ᵥ* A⁻¹ = cramer Aᵀ b 
goal: A.det • Matrix.vecMul b A⁻¹ = A.transpose.cramer b

full_name: Matrix.submatrixEquivInvertible
code: /-- `A.submatrix e₁ e₂` is invertible if `A` is -/
def submatrixEquivInvertible (A : Matrix m m α) (e₁ e₂ : n ≃ m) [Invertible A] :
    Invertible (A.submatrix e₁ e₂) 
goal: Invertible (A.submatrix ⇑e₁ ⇑e₂)

full_name: Matrix.invertibleOfSubmatrixEquivInvertible
code: /-- `A` is invertible if `A.submatrix e₁ e₂` is -/
def invertibleOfSubmatrixEquivInvertible (A : Matrix m m α) (e₁ e₂ : n ≃ m)
    [Invertible (A.submatrix e₁ e₂)] : Invertible A 
goal: Invertible A

full_name: Matrix.invOf_submatrix_equiv_eq
code: theorem invOf_submatrix_equiv_eq (A : Matrix m m α) (e₁ e₂ : n ≃ m) [Invertible A]
    [Invertible (A.submatrix e₁ e₂)] : ⅟ (A.submatrix e₁ e₂) = (⅟ A).submatrix e₂ e₁ 
goal: ⅟(A.submatrix ⇑e₁ ⇑e₂) = (⅟A).submatrix ⇑e₂ ⇑e₁

full_name: Matrix.submatrixEquivInvertibleEquivInvertible
code: /-- Together `Matrix.submatrixEquivInvertible` and
`Matrix.invertibleOfSubmatrixEquivInvertible` form an equivalence, although both sides of the
equiv are subsingleton anyway. -/
@[simps]
def submatrixEquivInvertibleEquivInvertible (A : Matrix m m α) (e₁ e₂ : n ≃ m) :
    Invertible (A.submatrix e₁ e₂) ≃ Invertible A 
goal: Invertible (A.submatrix ⇑e₁ ⇑e₂) ≃ Invertible A

full_name: Matrix.submatrixEquivInvertibleEquivInvertible_apply
code: /-- Together `Matrix.submatrixEquivInvertible` and
`Matrix.invertibleOfSubmatrixEquivInvertible` form an equivalence, although both sides of the
equiv are subsingleton anyway. -/
@[simps]
def submatrixEquivInvertibleEquivInvertible (A : Matrix m m α) (e₁ e₂ : n ≃ m) :
    Invertible (A.submatrix e₁ e₂) ≃ Invertible A 
goal: ∀ (x : Invertible (A.submatrix ⇑e₁ ⇑e₂)),
  (A.submatrixEquivInvertibleEquivInvertible e₁ e₂) x = A.invertibleOfSubmatrixEquivInvertible e₁ e₂

full_name: Matrix.submatrixEquivInvertibleEquivInvertible_symm_apply
code: /-- Together `Matrix.submatrixEquivInvertible` and
`Matrix.invertibleOfSubmatrixEquivInvertible` form an equivalence, although both sides of the
equiv are subsingleton anyway. -/
@[simps]
def submatrixEquivInvertibleEquivInvertible (A : Matrix m m α) (e₁ e₂ : n ≃ m) :
    Invertible (A.submatrix e₁ e₂) ≃ Invertible A 
goal: ∀ (x : Invertible A), (A.submatrixEquivInvertibleEquivInvertible e₁ e₂).symm x = A.submatrixEquivInvertible e₁ e₂

full_name: Matrix.isUnit_submatrix_equiv
code: /-- When lowered to a prop, `Matrix.invertibleOfSubmatrixEquivInvertible` forms an `iff`. -/
@[simp]
theorem isUnit_submatrix_equiv {A : Matrix m m α} (e₁ e₂ : n ≃ m) :
    IsUnit (A.submatrix e₁ e₂) ↔ IsUnit A 
goal: IsUnit (A.submatrix ⇑e₁ ⇑e₂) ↔ IsUnit A

full_name: Matrix.inv_submatrix_equiv
code: @[simp]
theorem inv_submatrix_equiv (A : Matrix m m α) (e₁ e₂ : n ≃ m) :
    (A.submatrix e₁ e₂)⁻¹ = A⁻¹.submatrix e₂ e₁ 
goal: (A.submatrix ⇑e₁ ⇑e₂)⁻¹ = A⁻¹.submatrix ⇑e₂ ⇑e₁

full_name: Matrix.inv_reindex
code: theorem inv_reindex (e₁ e₂ : n ≃ m) (A : Matrix n n α) : (reindex e₁ e₂ A)⁻¹ = reindex e₂ e₁ A⁻¹ 
goal: ((Matrix.reindex e₁ e₂) A)⁻¹ = (Matrix.reindex e₂ e₁) A⁻¹

full_name: Matrix.det_conj
code: /-- A variant of `Matrix.det_units_conj`. -/
theorem det_conj {M : Matrix m m α} (h : IsUnit M) (N : Matrix m m α) :
    det (M * N * M⁻¹) = det N 
goal: (M * N * M⁻¹).det = N.det

full_name: Matrix.det_conj'
code: /-- A variant of `Matrix.det_units_conj'`. -/
theorem det_conj' {M : Matrix m m α} (h : IsUnit M) (N : Matrix m m α) :
    det (M⁻¹ * N * M) = det N 
goal: (M⁻¹ * N * M).det = N.det