A list as a vector, padded with zeros; vecOfList (k + 1) (a :: l) unfolds
to vecCons a (vecOfList k l), so a ![…] literal is definitionally
vecOfList of its entries.
Equations
- HexMatrixTheory.vecOfList 0 x✝ = ![]
- HexMatrixTheory.vecOfList k.succ (a :: l) = Matrix.vecCons a (HexMatrixTheory.vecOfList k l)
- HexMatrixTheory.vecOfList n.succ [] = fun (x : Fin (n + 1)) => 0
Instances For
The Mathlib matrix of a row list, padded with zeros.
Equations
- HexMatrixTheory.ofLists n m L = Matrix.of (HexMatrixTheory.vecOfList n (List.map (HexMatrixTheory.vecOfList m) L))
Instances For
The entrywise comparison of a matrix with its row list, as a Boolean the kernel evaluates by enumerating every index pair.
Equations
- HexMatrixTheory.entriesEq n m A L = (List.finRange n).all fun (i : Fin n) => (List.finRange m).all fun (j : Fin m) => decide (A i j = HexMatrixTheory.ofLists n m L i j)
Instances For
Compare a closed vector with the list used by a certificate.
Equations
- HexMatrixTheory.vectorEntriesEq n v xs = (List.finRange n).all fun (i : Fin n) => decide (v i = HexMatrixTheory.vecOfList n xs i)
Instances For
The entrywise identification route for closed vector functions.
Configuration shared by the matrix tactics rank and det, in the
style of decide +kernel: rank -packing, det -packing.
- packing : Bool
Evaluate the certificate's dot products on Kronecker-packed rows (one multiplication, shift and mask per dot product in the kernel) instead of term by term. The certificate is the same; the packed checker is proven equal to the plain one under a bound the kernel verifies.
Instances For
Elaborate the optConfig of a matrix tactic into a KernelConfig.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Optional certificate measurements for the external proof-probe runner. No clock is read here; kernel time comes from Lean's external profiler.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
How many definitions are unfolded when looking for a literal.
Equations
Instances For
The shape of the type Matrix (Fin n) (Fin m) R with closed dimensions:
(n, m, R), or of the function type Fin n → Fin m → R a bare lambda has.
The dimensions may be any closed expressions that evaluate to numerals, as
Matrix.of ![…] elaborates them as Nat.succ chains.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Match a Matrix.of ![…] chain (the !![…] notation included) of the given
shape. Like Mathlib's matchMatrixLit?, but every vecCons chain must end in
vecEmpty, so that the literal is definitionally the ofLists of its
entries.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Match a fun i j => … literal: the body instantiated at every index pair.
Equations
- One or more equations did not get rendered due to their size.
- HexMatrixTheory.Literal.matchFn? n m A = pure none
Instances For
Match a Matrix.ofArray xs h literal whose array reduces to n * m entries.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Find the literal behind A : Matrix (Fin n) (Fin m) R, unfolding definitions
within unfoldBudget. Symbolic consumers may enable open entries.
Recognize a matrix literal, requiring closed entries unless explicitly enabled.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Evaluate an entry to a rational with norm_num; an entry norm_num alone
does not evaluate (the fun i j => … form instantiates its body at Fin
literals, leaving Fin.val, casts and if i = j tests) is first simplified
with the default simp set. An entry that is not a closed numeric expression
is an error naming it.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Evaluate every entry to a rational.
Equations
- HexMatrixTheory.Literal.evalEntries lit = Array.mapM (fun (x : Array Lean.Expr) => Array.mapM HexMatrixTheory.Literal.evalEntry x) lit.entries
Instances For
of_decide_eq_true on a closed decidable proposition, for the kernel to
evaluate; no elaborator-side evaluation happens.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Add the closed proof proof : target as an auxiliary lemma, checked by
the kernel synchronously and exactly once, and return the constant. This
is the declaration-checking path decide +kernel uses (mkAuxLemma),
without reuse of an earlier lemma for the same statement, so every
supplied proof is checked. mkAuxTheorem is not used: with its default
zetaDelta := false its closure step type-checks the proof in the
elaborator (Meta.check) before the kernel does, which evaluates the
certificate a second time. The target and the proof must be closed, with
no free variables and no expression or universe metavariables; the
universe parameters are the level parameters they mention.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The proof of A = ofLists n m L along the literal's route: rfl for a
vector chain, one kernel decide on entriesEq otherwise.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Elaborate a matrix argument with the frontend's carrier expectation. Integer frontends use the default; field frontends supply their field so unannotated numerals and fractions elaborate in that carrier.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Recognize vector notation or a closed lambda behind bounded unfolding.
Recognize a closed vector from its function type.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Identify a vector with its quoted list along the recognized route.
Equations
- One or more equations did not get rendered due to their size.