This module implements a simple E-matching procedure as a backtracking search.
We represent an E-matching problem as a list of constraints.
- match
(gen? : Option GenPatternInfo)
(pat e : Expr)
 : CnstrMatches pattern patwith terme
- offset
(gen? : Option GenPatternInfo)
(pat : Expr)
(k : Nat)
(e : Expr)
 : CnstrMatches offset pattern pat+kwith terme
- continue
(pat : Expr)
 : CnstrThis constraint is used to encode multi-patterns. 
Instances For
Choice point for the backtracking search. The state of the procedure contains a stack of choices.
- Constraints to be processed. 
- gen : NatMaximum term generation found so far. 
- Partial assignment so far. Recall that pattern variables are encoded as de-Bruijn variables. 
Instances For
Equations
Instances For
Context for the E-matching monad.
- useMT : BooluseMTistrueif we are using the mod-time optimization. It is always set to false for newEMatchTheorems.
- thm : EMatchTheoremEMatchTheorembeing processed.
- initApp : ExprInitial application used to start E-matching 
Instances For
Equations
Instances For
Returns some uniqueId if proof was marked using markTheoremInstanceProof
Equations
- One or more equations did not get rendered due to their size.
- Lean.Meta.Grind.EMatch.isTheoremInstanceProof? proof = none
Instances For
State for the E-matching monad
- Choices that still have to be processed. 
- instanceMap : InstanceMapWhen tracing is enabled track instances here. See comment at InstanceMap
Instances For
Equations
Instances For
Equations
Instances For
Equations
- genInfo.assign? c x = do let c ← Lean.Meta.Grind.EMatch.assign?✝ c genInfo.xIdx x let c ← Lean.Meta.Grind.EMatch.assignDelayedEqProof?✝ c genInfo.hIdx pure c
Instances For
Similar to reportIssue!, but only reports issue if grind.debug is set to true
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
Equations
Instances For
Performs one round of E-matching, and returns true if new instances were generated.
Recall that the mapping is nonempty only if tracing is enabled.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Performs one round of E-matching, and returns true if new instances were generated.
Equations
- Lean.Meta.Grind.ematch extraThms = do let __do_lift ← Lean.Meta.Grind.ematch' extraThms pure __do_lift.fst
Instances For
Performs one round of E-matching using the giving theorems, and returns true if new instances were generated.
Equations
- One or more equations did not get rendered due to their size.