Documentation

HexDeterminant.Leibniz

def Hex.Matrix.detSign {R : Type u} [Lean.Grind.Ring R] {n : Nat} (perm : Vector (Fin n) n) :
R

The sign of a permutation vector, computed from inversion parity.

Equations
Instances For
    def Hex.Matrix.detProduct {R : Type u} [Lean.Grind.Ring R] {n : Nat} (M : Matrix R n n) (perm : Vector (Fin n) n) :
    R

    The unsigned product associated to a permutation vector.

    Equations
    Instances For
      def Hex.Matrix.detTerm {R : Type u} [Lean.Grind.Ring R] {n : Nat} (M : Matrix R n n) (perm : Vector (Fin n) n) :
      R

      The Leibniz summand associated to a permutation vector.

      Equations
      Instances For
        def Hex.Matrix.det {R : Type u} [Lean.Grind.Ring R] {n : Nat} (M : Matrix R n n) :
        R

        The determinant of a dense square matrix, defined by the Leibniz formula.

        Equations
        Instances For
          @[simp]

          The determinant of the empty leading prefix is the Bareiss previous-pivot convention 1.

          @[simp]
          theorem Hex.Matrix.det_one_by_one {R : Type u} [Lean.Grind.Ring R] (M : Matrix R 1 1) :
          M.det = M[0][0]

          The determinant of a 1 × 1 matrix is its only entry. This is the smallest non-empty determinant base case.

          @[simp]
          theorem Hex.Matrix.det_two_by_two {R : Type u} [Lean.Grind.CommRing R] (M : Matrix R 2 2) :
          M.det = M[0][0] * M[1][1] - M[1][0] * M[0][1]

          The determinant of a 2 × 2 matrix has the usual diagonal-minus-off-diagonal closed form used by small cofactor expansions.