SNF tactic #
The snf tactic computes and certifies Smith normal form data for a concrete
matrix.
User syntax #
snf AAdds a local hypothesis named
cert:cert : CertificateSNF Asnf A as hAAdds the same certificate under the chosen name:
hA : CertificateSNF A
The tactic is goal-agnostic: it enriches the local context and leaves the current goal unchanged.
Requirements #
The matrix must have type:
Matrix (Fin m) (Fin n) R
where its entries can be serialized through SageSerializable R. The matrix
data must be evaluable at elaboration time; fully symbolic matrix variables are
not supported.
Dimensions may be non-literal expressions such as cellCount X k. The tactic
serializes entries by compiled evaluation, asks Sage for SNF data, reconstructs
the matrices in Lean, and builds a CertificateSNF A term checked by Lean.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- evalBoolExpr e = Lean.Meta.evalExpr Bool (Lean.mkConst `Bool) e
Instances For
Equations
- evalStringExpr e = Lean.Meta.evalExpr String (Lean.mkConst `String) e
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Build a CertificateSNF AExpr expression from already available Sage SNF
JSON, then elaborate and type-check it.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Declare an SNF certificate as a family of named definitions.
This is intended for command elaborators that need a persistent certificate for larger matrices. Naming the witness matrices first keeps Lean from checking one large inlined certificate term.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Build a CertificateSNF AExpr expression from Sage data, then elaborate and
type-check it. This is the reusable construction backend for the snf tactic.
Equations
- mkSNFCertExpr AExpr = do let payload ← callSnfSageJson✝ AExpr mkSNFCertExprFromPayload AExpr payload
Instances For
Compute a Smith normal form certificate for A.
Examples:
example : True := by
snf A
-- cert : CertificateSNF A
trivial
example : True := by
snf A as hA
-- hA : CertificateSNF A
trivial
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.