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
- HexMatrixMathlib.vecOfList 0 x✝ = ![]
- HexMatrixMathlib.vecOfList k.succ (a :: l) = Matrix.vecCons a (HexMatrixMathlib.vecOfList k l)
- HexMatrixMathlib.vecOfList n.succ [] = fun (x : Fin (n + 1)) => 0
Instances For
The entrywise comparison of a matrix with its row list, as a Boolean the kernel evaluates by enumerating every index pair.
Equations
- HexMatrixMathlib.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 = HexMatrixMathlib.ofLists n m L i j)
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.
- HexMatrixMathlib.Literal.matchFn? n m A = pure none
Instances For
Match a Matrix.ofArray xs h literal whose array is a #[…] literal of
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; an open term is not a literal.
Recognize a closed matrix literal from its type and its expression.
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
- HexMatrixMathlib.Literal.evalEntries lit = Array.mapM (fun (x : Array Lean.Expr) => Array.mapM HexMatrixMathlib.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
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 of a term form. The !![…] notations are
given an integer entry expectation so their numerals do not default to
Nat.
Equations
- One or more equations did not get rendered due to their size.