This module implements a simple E-matching procedure as a backtracking search.
Equations
Choice point for the backtracking search. The state of the procedure contains a stack of choices.
Contraints to be processed.
- gen : Nat
Maximum term generation found so far.
 Partial assignment so far. Recall that pattern variables are encoded as de-Bruijn variables.
Instances For
Equations
- Lean.Meta.Grind.EMatch.instInhabitedChoice = { default := { cnstrs := default, gen := default, assignment := default } }
 
Context for the E-matching monad.
- useMT : Bool
useMTistrueif we are using the mod-time optimization. It is always set to false for newEMatchTheorems. - thm : EMatchTheorem
EMatchTheorembeing processed. 
Instances For
Equations
- Lean.Meta.Grind.EMatch.instInhabitedContext = { default := { useMT := default, thm := default } }
 
State for the E-matching monad
Choices that still have to be processed.
Instances For
Equations
- Lean.Meta.Grind.EMatch.instInhabitedState = { default := { choiceStack := default } }
 
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
When using the mod-time optimization with multi-patterns,
we must start ematching at each different pattern. That is,
if we have [p₁, p₂, p₃], we must execute
main p₁ [.continue p₂, .continue p₃]main p₂ [.continue p₁, .continue p₃]main p₃ [.continue p₁, .continue p₂]
Equations
- One or more equations did not get rendered due to their size.
 - Lean.Meta.Grind.EMatch.ematchTheorem.tryAll [] cs = pure ()
 
Instances For
Equations
Instances For
Performs one round of E-matching, and returns new instances.
Equations
- One or more equations did not get rendered due to their size.