Documentation

Mathlib.LinearAlgebra.Matrix.Reindex

Changing the index type of a matrix #

This file concerns the map Matrix.reindex, mapping a m by n matrix to an m' by n' matrix, as long as m ≃ m' and n ≃ n'.

Main definitions #

Tags #

matrix, reindex

def Matrix.reindexLinearEquiv {m : Type u_2} {n : Type u_3} {m' : Type u_6} {n' : Type u_7} (R : Type u_11) (A : Type u_12) [Semiring R] [AddCommMonoid A] [Module R A] (eₘ : m m') (eₙ : n n') :
Matrix m n A ≃ₗ[R] Matrix m' n' A

The natural map that reindexes a matrix's rows and columns with equivalent types, Matrix.reindex, is a linear equivalence.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    @[simp]
    theorem Matrix.reindexLinearEquiv_apply {m : Type u_2} {n : Type u_3} {m' : Type u_6} {n' : Type u_7} (R : Type u_11) (A : Type u_12) [Semiring R] [AddCommMonoid A] [Module R A] (eₘ : m m') (eₙ : n n') (M : Matrix m n A) :
    (Matrix.reindexLinearEquiv R A eₘ eₙ) M = (Matrix.reindex eₘ eₙ) M
    @[simp]
    theorem Matrix.reindexLinearEquiv_symm {m : Type u_2} {n : Type u_3} {m' : Type u_6} {n' : Type u_7} (R : Type u_11) (A : Type u_12) [Semiring R] [AddCommMonoid A] [Module R A] (eₘ : m m') (eₙ : n n') :
    @[simp]
    theorem Matrix.reindexLinearEquiv_refl_refl {m : Type u_2} {n : Type u_3} (R : Type u_11) (A : Type u_12) [Semiring R] [AddCommMonoid A] [Module R A] :
    theorem Matrix.reindexLinearEquiv_trans {m : Type u_2} {n : Type u_3} {m' : Type u_6} {n' : Type u_7} {m'' : Type u_9} {n'' : Type u_10} (R : Type u_11) (A : Type u_12) [Semiring R] [AddCommMonoid A] [Module R A] (e₁ : m m') (e₂ : n n') (e₁' : m' m'') (e₂' : n' n'') :
    Matrix.reindexLinearEquiv R A e₁ e₂ ≪≫ₗ Matrix.reindexLinearEquiv R A e₁' e₂' = Matrix.reindexLinearEquiv R A (e₁.trans e₁') (e₂.trans e₂')
    theorem Matrix.reindexLinearEquiv_comp {m : Type u_2} {n : Type u_3} {m' : Type u_6} {n' : Type u_7} {m'' : Type u_9} {n'' : Type u_10} (R : Type u_11) (A : Type u_12) [Semiring R] [AddCommMonoid A] [Module R A] (e₁ : m m') (e₂ : n n') (e₁' : m' m'') (e₂' : n' n'') :
    (Matrix.reindexLinearEquiv R A e₁' e₂') (Matrix.reindexLinearEquiv R A e₁ e₂) = (Matrix.reindexLinearEquiv R A (e₁.trans e₁') (e₂.trans e₂'))
    theorem Matrix.reindexLinearEquiv_comp_apply {m : Type u_2} {n : Type u_3} {m' : Type u_6} {n' : Type u_7} {m'' : Type u_9} {n'' : Type u_10} (R : Type u_11) (A : Type u_12) [Semiring R] [AddCommMonoid A] [Module R A] (e₁ : m m') (e₂ : n n') (e₁' : m' m'') (e₂' : n' n'') (M : Matrix m n A) :
    (Matrix.reindexLinearEquiv R A e₁' e₂') ((Matrix.reindexLinearEquiv R A e₁ e₂) M) = (Matrix.reindexLinearEquiv R A (e₁.trans e₁') (e₂.trans e₂')) M
    theorem Matrix.reindexLinearEquiv_one {m : Type u_2} {m' : Type u_6} (R : Type u_11) (A : Type u_12) [Semiring R] [AddCommMonoid A] [Module R A] [DecidableEq m] [DecidableEq m'] [One A] (e : m m') :
    theorem Matrix.reindexLinearEquiv_mul {m : Type u_2} {n : Type u_3} {o : Type u_4} {m' : Type u_6} {n' : Type u_7} {o' : Type u_8} (R : Type u_11) (A : Type u_12) [Semiring R] [Semiring A] [Module R A] [Fintype n] [Fintype n'] (eₘ : m m') (eₙ : n n') (eₒ : o o') (M : Matrix m n A) (N : Matrix n o A) :
    (Matrix.reindexLinearEquiv R A eₘ eₙ) M * (Matrix.reindexLinearEquiv R A eₙ eₒ) N = (Matrix.reindexLinearEquiv R A eₘ eₒ) (M * N)
    theorem Matrix.mul_reindexLinearEquiv_one {m : Type u_2} {n : Type u_3} {o : Type u_4} {n' : Type u_7} (R : Type u_11) (A : Type u_12) [Semiring R] [Semiring A] [Module R A] [Fintype n] [DecidableEq o] (e₁ : o n) (e₂ : o n') (M : Matrix m n A) :
    M * (Matrix.reindexLinearEquiv R A e₁ e₂) 1 = (Matrix.reindexLinearEquiv R A (Equiv.refl m) (e₁.symm.trans e₂)) M
    def Matrix.reindexAlgEquiv {m : Type u_2} {n : Type u_3} (R : Type u_11) [CommSemiring R] [Fintype n] [Fintype m] [DecidableEq m] [DecidableEq n] (e : m n) :
    Matrix m m R ≃ₐ[R] Matrix n n R

    For square matrices with coefficients in commutative semirings, the natural map that reindexes a matrix's rows and columns with equivalent types, Matrix.reindex, is an equivalence of algebras.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[simp]
      theorem Matrix.reindexAlgEquiv_apply {m : Type u_2} {n : Type u_3} (R : Type u_11) [CommSemiring R] [Fintype n] [Fintype m] [DecidableEq m] [DecidableEq n] (e : m n) (M : Matrix m m R) :
      @[simp]
      @[simp]
      theorem Matrix.reindexAlgEquiv_refl {m : Type u_2} (R : Type u_11) [CommSemiring R] [Fintype m] [DecidableEq m] :
      Matrix.reindexAlgEquiv R (Equiv.refl m) = AlgEquiv.refl
      theorem Matrix.reindexAlgEquiv_mul {m : Type u_2} {n : Type u_3} (R : Type u_11) [CommSemiring R] [Fintype n] [Fintype m] [DecidableEq m] [DecidableEq n] (e : m n) (M : Matrix m m R) (N : Matrix m m R) :
      theorem Matrix.det_reindexLinearEquiv_self {m : Type u_2} {n : Type u_3} (R : Type u_11) [CommRing R] [Fintype m] [DecidableEq m] [Fintype n] [DecidableEq n] (e : m n) (M : Matrix m m R) :

      Reindexing both indices along the same equivalence preserves the determinant.

      For the simp version of this lemma, see det_submatrix_equiv_self.

      theorem Matrix.det_reindexAlgEquiv {m : Type u_2} {n : Type u_3} (R : Type u_11) [CommRing R] [Fintype m] [DecidableEq m] [Fintype n] [DecidableEq n] (e : m n) (A : Matrix m m R) :

      Reindexing both indices along the same equivalence preserves the determinant.

      For the simp version of this lemma, see det_submatrix_equiv_self.