Extract the lemma, with arguments, that was used to produce a RewriteResult
.
Weight to multiply the "specificity" of a rewrite lemma by when rewriting forwards.
Equations
Weight to multiply the "specificity" of a rewrite lemma by when rewriting backwards.
Equations
We drop .star
and Eq * * *
from the discriminator trees because
they match too much.
Equations
- One or more equations did not get rendered due to their size.
Create function for finding relevant declarations.
Equations
- One or more equations did not get rendered due to their size.
Data structure recording a potential rewrite to report from the rw?
tactic.
- expr : Expr
The lemma we rewrote by. This is
Expr
, not just aName
, as it may be a local hypothesis. - symm : Bool
True
if we rewrote backwards (i.e. withrw [← h]
). - weight : Nat
The "weight" of the rewrite. This is calculated based on how specific the rewrite rule was.
- result : Meta.RewriteResult
The result from the
rw
tactic. - mctx : MetavarContext
The metavariable context after the rewrite. This needs to be stored as part of the result so we can backtrack the state.
- rfl? : Bool
Check to see if this expression (which must be a type) can be closed by with_reducible rfl
.
Equations
- One or more equations did not get rendered due to their size.
Should we try discharging side conditions? If so, using assumption
, or solve_by_elim
?
- none : SideConditions
- assumption : SideConditions
- solveByElim : SideConditions
Shortcut for calling solveByElim
.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Find keys which match the expression, or some subexpression.
Note that repeated subexpressions will be visited each time they appear, making this operation potentially very expensive. It would be good to solve this problem!
Implementation: we reverse the results from getMatch
,
so that we return lemmas matching larger subexpressions first,
and amongst those we return more specific lemmas first.
Find lemmas which can rewrite the goal.
See also rewrites
for a more convenient interface.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
- stopAtRfl : Bool
- max : Nat
- minHeartbeats : Nat
- goal : MVarId
- target : Expr
- side : SideConditions
- mctx : MetavarContext
Equations
- One or more equations did not get rendered due to their size.
Find lemmas which can rewrite the goal.
Equations
- One or more equations did not get rendered due to their size.