Documentation

HexBareiss.Polynomial

structure Hex.Matrix.DetOps (R : Type) :

Operations on the serialized entries of a determinant certificate. The companion supplies canonical polynomial lists and their denotation laws.

  • zero : R
  • one : R
  • add : R → R → R
  • mul : R → R → R
  • neg : R → R
  • beq : R → R → Bool
  • valid : R → Bool
Instances For
    def Hex.Matrix.DetOps.entry {R : Type} (ops : DetOps R) :
    List R → Nat → R

    A row entry, with zero beyond the end.

    Equations
    Instances For
      def Hex.Matrix.DetOps.dot {R : Type} (ops : DetOps R) :
      List R → List R → R

      Dot product, stopping at the shorter list.

      Equations
      Instances For
        def Hex.Matrix.DetOps.column {R : Type} (ops : DetOps R) (j : Nat) :
        List (List R) → List R

        Column extraction uses only structural list recursion.

        Equations
        Instances For
          def Hex.Matrix.DetOps.columns {R : Type} (ops : DetOps R) (A : List (List R)) (start : Nat) :
          Nat → List (List R)

          Consecutive columns, starting at the supplied index.

          Equations
          Instances For
            def Hex.Matrix.DetOps.validRow {R : Type} (ops : DetOps R) :
            List R → Bool

            Canonicality of every entry in a row.

            Equations
            Instances For
              def Hex.Matrix.DetOps.validRows {R : Type} (ops : DetOps R) :
              List (List R) → Bool

              Canonicality of every entry in every row.

              Equations
              Instances For
                def Hex.Matrix.DetOps.zeroDots {R : Type} (ops : DetOps R) (v : List R) :
                List (List R) → Bool

                Orthogonality against each supplied column.

                Equations
                Instances For
                  def Hex.Matrix.DetOps.anyNonzero {R : Type} (ops : DetOps R) :
                  List R → Bool

                  At least one entry is nonzero.

                  Equations
                  Instances For
                    def Hex.Matrix.DetOps.signed {R : Type} (ops : DetOps R) :
                    List (Nat × Nat) → R → R

                    Apply the sign of the row permutation without a coefficient cast.

                    Equations
                    Instances For
                      def Hex.Matrix.DetOps.triangular {R : Type} (ops : DetOps R) (d : R) (swaps : List (Nat × Nat)) :
                      List (List R) → Nat → List (List R) → List (List R) → R → Bool

                      Check the transform and adjacent diagonals. The last computed diagonal is retained instead of multiplying all pivot polynomials.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      • ops.triangular d swaps x✝² x✝¹ [] [] x✝ = ops.beq d (ops.signed swaps x✝)
                      • ops.triangular d swaps x✝⁴ x✝³ x✝² x✝¹ x✝ = false
                      Instances For
                        def Hex.Matrix.DetWitness.map {R S : Type} (f : R → S) :

                        Map all entries of a witness, for conversion from executable entries to their serialized representation.

                        Equations
                        Instances For
                          def Hex.Matrix.DetWitness.row {R : Type u_1} :
                          List (List R) → Nat → List R

                          A row of a serialized matrix, with the empty row beyond its end.

                          Equations
                          Instances For
                            def Hex.Matrix.DetWitness.replace {R : Type u_1} :
                            List (List R) → Nat → List R → List (List R)

                            Replace a row, leaving out-of-range indices unchanged.

                            Equations
                            Instances For
                              def Hex.Matrix.DetWitness.swap {R : Type u_1} (a b : Nat) (A : List (List R)) :

                              Exchange two rows. Bounds and distinctness are checked separately.

                              Equations
                              Instances For
                                def Hex.Matrix.DetWitness.permute {R : Type u_1} :
                                List (Nat × Nat) → List (List R) → List (List R)

                                Apply row swaps in their recorded order.

                                Equations
                                Instances For
                                  def Hex.Matrix.DetWitness.rowLengths {R : Type u_1} (n : Nat) :
                                  List (List R) → Bool

                                  Verify the number of entries in every row.

                                  Equations
                                  Instances For
                                    def Hex.Matrix.checkDetPolyList {R : Type} (ops : DetOps R) (n : Nat) (A : List (List R)) :

                                    A determinant checker parameterized by serialized entry arithmetic. Canonicality, shapes and swap bounds are checked before the arithmetic. For nonempty triangular witnesses, the diagonal walk requires the first transform diagonal to be one and each later one to equal the preceding product diagonal. The empty case requires the value one.

                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For