Qq integration for simprocs #
This file adds wrappers for operations relating to simprocs in the Lean.Meta.Simp namespace.
It can be used as
simproc_decl some_proc (some_pattern) := Meta.Simp.Simproc.ofQ fun u α e => do
sorry
instead of the usual
simproc_decl some_proc (some_pattern) := fun e => do
sorry
A copy of Meta.Simp.Result with explicit types.
Equations
Instances For
A copy of Meta.Simp.Result.mk with explicit types.
Equations
- Lean.Meta.Simp.ResultQ.mk expr proof? cache = { expr := expr, proof? := proof?, cache := cache }
Instances For
A copy of Meta.Simp.Step with explicit types.
Equations
Instances For
For pre procedures, it returns the result without visiting any subexpressions.
For post procedures, it returns the result.
Equations
Instances For
For pre procedures, the resulting expression is passed to pre again.
For post procedures, the resulting expression is passed to pre again IF
Simp.Config.singlePass := false and resulting expression is not equal to initial expression.
Equations
Instances For
For pre procedures, continue transformation by visiting subexpressions, and then
executing post procedures.
For post procedures, this is equivalent to returning visit.
Equations
Instances For
A copy of Lean.Meta.Simproc with explicit types.
See Simproc.ofQ to construct terms of this type.
Equations
- Lean.Meta.Simp.SimprocQ = ((u : Lean.Level) → (α : Q(Sort u)) → (e : Q(«$α»)) → Lean.Meta.SimpM (Lean.Meta.Simp.StepQ e))
Instances For
Build a simproc with Qq-enabled typechecking of inputs and outputs.
This calls inferTypeQ on the expression and passes the arguments to proc.
Equations
- Lean.Meta.Simp.Simproc.ofQ proc e = do let __discr ← liftM (Qq.inferTypeQ e) match __discr with | ⟨u, ⟨α, e⟩⟩ => proc u α e