Documentation

Mathlib.Tactic.Matrix.Cert

Certificates for list-based matrix literals #

This file contains common utilities for tactics that certify a computation on matrix literals from proofs about the lists of their rows.

Main definitions #

structure Mathlib.Tactic.Matrix.ListMatrixLit {u : Lean.Level} (α : Q(Type u)) (m n : ℕ) :

Three forms of one list-based matrix literal. This makes the argument list more succinct when a cert construction function needs to use multiple representations.

  • matrix : Q(Matrix (Fin «$m») (Fin «$n») «$α»)

    The matrix, the ofLists term on lit.

  • lit : Q(List (List «$α»))

    The list literal of rows.

  • rows : List (List Q(«$α»))

    The rows of the matrix.

Instances For
    def Mathlib.Tactic.Matrix.ListMatrixLit.ofArray {u : Lean.Level} {α : Q(Type u)} (zα : Q(Zero «$α»)) (m n : ℕ) (rows : Array (Array Q(«$α»))) :

    The ListMatrixLit of the matrix with rows rows.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      def Mathlib.Tactic.Matrix.certifyRowsEq {u : Lean.Level} {α : Q(Type u)} (proveEq : (a b : Q(«$α»)) → Lean.MetaM Q(«$a» = «$b»)) (rows₁ rows₂ : List (List Q(«$α»))) :
      Lean.MetaM ((l₁ : Q(List (List «$α»))) × (l₂ : Q(List (List «$α»))) × Q(«$l₁» = «$l₂»))

      Prove the row literals of rows₁ and rows₂ equal from the entrywise equations a = b, each proved by proveEq.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        def Mathlib.Tactic.Matrix.certifyProductEq {u : Lean.Level} {m n : ℕ} {α : Q(Type u)} (proveEq? : Option ((a b : Q(«$α»)) → Lean.MetaM Q(«$a» = «$b»))) (cα : Q(AddCommMonoid «$α»)) {zα : Q(Zero «$α»)} {aα : Q(Add «$α»)} {mα : Q(Mul «$α»)} (mulEq : MulEq zα aα mα m m n) (U : ListMatrixLit α m n) :
        Lean.MetaM (have a := U.matrix; have a_1 := mulEq.B; have a_2 := mulEq.A; Q(ofLists «$m» «$m» «$a_2» * ofLists «$m» «$n» «$a_1» = «$a»))

        Prove the product ofLists mulEq.A * ofLists mulEq.B = U from the list-based expansion of mulEq.

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