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') :

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

Equations
    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) :
      (reindexLinearEquiv R A eā‚˜ eā‚™) M = (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') :
      (reindexLinearEquiv R A eā‚˜ eā‚™).symm = reindexLinearEquiv R A eā‚˜.symm eā‚™.symm
      @[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'') :
      reindexLinearEquiv R A e₁ eā‚‚ ≪≫ₗ reindexLinearEquiv R A e₁' eā‚‚' = 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'') :
      ⇑(reindexLinearEquiv R A e₁' eā‚‚') ∘ ⇑(reindexLinearEquiv R A e₁ eā‚‚) = ⇑(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) :
      (reindexLinearEquiv R A e₁' eā‚‚') ((reindexLinearEquiv R A e₁ eā‚‚) M) = (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') :
      (reindexLinearEquiv R A e e) 1 = 1
      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) :
      (reindexLinearEquiv R A eā‚˜ eā‚™) M * (reindexLinearEquiv R A eā‚™ eā‚’) N = (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 * (reindexLinearEquiv R A e₁ eā‚‚) 1 = (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) (A : Type u_12) [CommSemiring R] [Fintype n] [Fintype m] [DecidableEq m] [DecidableEq n] [Semiring A] [Algebra R A] (e : m ā‰ƒ n) :

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

      Equations
        Instances For
          @[simp]
          theorem Matrix.reindexAlgEquiv_apply {m : Type u_2} {n : Type u_3} (R : Type u_11) (A : Type u_12) [CommSemiring R] [Fintype n] [Fintype m] [DecidableEq m] [DecidableEq n] [Semiring A] [Algebra R A] (e : m ā‰ƒ n) (M : Matrix m m A) :
          (reindexAlgEquiv R A e) M = (reindex e e) M
          @[simp]
          theorem Matrix.reindexAlgEquiv_symm {m : Type u_2} {n : Type u_3} (R : Type u_11) (A : Type u_12) [CommSemiring R] [Fintype n] [Fintype m] [DecidableEq m] [DecidableEq n] [Semiring A] [Algebra R A] (e : m ā‰ƒ n) :
          theorem Matrix.reindexAlgEquiv_mul {m : Type u_2} {n : Type u_3} (R : Type u_11) (A : Type u_12) [CommSemiring R] [Fintype n] [Fintype m] [DecidableEq m] [DecidableEq n] [Semiring A] [Algebra R A] (e : m ā‰ƒ n) (M N : Matrix m m A) :
          (reindexAlgEquiv R A e) (M * N) = (reindexAlgEquiv R A e) M * (reindexAlgEquiv R A e) N
          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) :
          ((reindexLinearEquiv R R e e) M).det = M.det

          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) (B : Type u_13) [CommSemiring R] [CommRing B] [Algebra R B] [Fintype m] [DecidableEq m] [Fintype n] [DecidableEq n] (e : m ā‰ƒ n) (A : Matrix m m B) :
          ((reindexAlgEquiv R B e) A).det = A.det

          Reindexing both indices along the same equivalence preserves the determinant.

          For the simp version of this lemma, see det_submatrix_equiv_self.