Simproc and Discharger DSLs for Sym.simp #
Simproc DSL (sym_simproc) #
A syntax category for specifying pre and post simproc chains in Sym.simp variants.
Primitives #
ground— evaluates ground (fully concrete) termstelescope— simplifies telescope binders (have-values, arrow hypotheses) but not the final bodyrewrite setName [with discharger]— rewrites using a named theorem setrewrite [thm₁, thm₂, ...] [with discharger]— rewrites using inline theoremsself— recursive simplification (calls the full simplifier)none— identity (no simplification)
Combinators #
a >> b— applya, then applybto the result (andThen)a <|> b— trya, if no progress tryb(orElse)
Discharger DSL (sym_discharger) #
A syntax category for specifying dischargers used in the with clause of rewrite.
Dischargers attempt to prove side conditions of conditional rewrite rules.
Primitives #
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Evaluate ground (fully concrete) terms.
Equations
- Lean.Parser.Sym.Simp.ground = Lean.ParserDescr.node `Lean.Parser.Sym.Simp.ground 1024 (Lean.ParserDescr.nonReservedSymbol "ground" false)
Instances For
Simplify telescope binders but not the final body.
Equations
- Lean.Parser.Sym.Simp.telescope = Lean.ParserDescr.node `Lean.Parser.Sym.Simp.telescope 1024 (Lean.ParserDescr.nonReservedSymbol "telescope" false)
Instances For
Simplify control-flow expressions (if-then-else, match, cond, dite).
Visits only conditions and discriminants. Intended as a pre simproc.
Equations
- Lean.Parser.Sym.Simp.control = Lean.ParserDescr.node `Lean.Parser.Sym.Simp.control 1024 (Lean.ParserDescr.nonReservedSymbol "control" false)
Instances For
Simplify arrow telescopes (p₁ → p₂ → ... → q) without entering binders.
Simplifies each pᵢ and q individually. Intended as a pre simproc.
Equations
- Lean.Parser.Sym.Simp.arrowTelescope = Lean.ParserDescr.node `Lean.Parser.Sym.Simp.arrowTelescope 1024 (Lean.ParserDescr.nonReservedSymbol "arrow_telescope" false)
Instances For
Rewrite using a named theorem set. Optionally specify a discharger for conditional rewrites.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Rewrite using inline theorems. Optionally specify a discharger for conditional rewrites.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Recursive simplification (calls the full simplifier).
Equations
- Lean.Parser.Sym.Simp.self = Lean.ParserDescr.node `Lean.Parser.Sym.Simp.self 1024 (Lean.ParserDescr.nonReservedSymbol "self" false)
Instances For
Identity simproc (no simplification).
Equations
- Lean.Parser.Sym.Simp.none = Lean.ParserDescr.node `Lean.Parser.Sym.Simp.none 1024 (Lean.ParserDescr.nonReservedSymbol "none" false)
Instances For
Apply a, then apply b to the result.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Try a, if no progress try b.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Parenthesized simproc expression.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Recursive simplifier discharge. Calls the full simplifier to prove side conditions.
Equations
- Lean.Parser.Sym.Simp.dischSelf = Lean.ParserDescr.node `Lean.Parser.Sym.Simp.dischSelf 1024 (Lean.ParserDescr.nonReservedSymbol "self" false)
Instances For
No discharge. Only unconditional rewrites will apply.
Equations
- Lean.Parser.Sym.Simp.dischNone = Lean.ParserDescr.node `Lean.Parser.Sym.Simp.dischNone 1024 (Lean.ParserDescr.nonReservedSymbol "none" false)
Instances For
Parenthesized discharger expression.
Equations
- One or more equations did not get rendered due to their size.
Instances For
register_sym_simp command #
Declares a named Sym.simp variant with pre/post simproc chains and optional config overrides.
register_sym_simp myVariant where
pre := telescope
post := ground >> rewrite mySet with self
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Pre-processing simproc chain.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Post-processing simproc chain.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Maximum number of simplification steps.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Maximum depth of recursive discharge attempts.
Equations
- One or more equations did not get rendered due to their size.