Elaborate the term of a forward rule in the current goal.
Equations
Instances For
Create a one-element match. subst
is the substitution that results from
matching a hypothesis against slot 0, or from a pattern substitution.
isPatSubst
is true
if the substitution resulted from a rule pattern.
forwardDeps
are the forward dependencies of slot 0. conclusionDeps
are the
conclusion dependencies of the rule to which this match belongs.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Add a hyp or pattern substitution to the match. subst
is the substitution
that results from matching a hypothesis against slot m.level + 1
, or from the
pattern. isPatSubst
is true
if the substitution resulted from a pattern
substitution. forwardDeps
are the forward dependencies of slot
m.level + 1
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Returns true
if the match contains the given hyp.
Equations
- Aesop.Match.containsHyp hyp m = m.subst.premises.any fun (x : Option Aesop.RPINF) => Option.any (fun (x : Aesop.RPINF) => x.toExpr == Lean.Expr.fvar hyp) x
Instances For
Returns true
if the match contains the given pattern substitution.
Equations
- Aesop.Match.containsPatSubst subst m = m.patInstSubsts.any fun (x : Aesop.Substitution) => x == subst
Instances For
Given a complete match m
for r
, get arguments to r
contained in the
match's slots and substitution. For non-immediate arguments, we return none
.
The returned levels are suitable assignments for the level mvars of r
.
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
- One or more equations did not get rendered due to their size.
Fold over the hypotheses contained in a match.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Fold over the hypotheses contained in a match.
Equations
- Aesop.ForwardRuleMatch.foldHyps f init m = Aesop.ForwardRuleMatch.foldHypsM f init m
Instances For
Returns true
if any hypothesis contained in m
satisfies f
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Get the hypotheses from the match whose types are propositions.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Construct the proof of the new hypothesis represented by m
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Apply a forward rule match to a goal. This adds the hypothesis corresponding
to the match to the local context. Returns the new goal, the added hypothesis
and the hypotheses that were removed (if any). Hypotheses may be removed if the
match is for a destruct
rule. If the skip
function, when applied to the
normalised type of the new hypothesis, returns true, then the hypothesis is not
added to the local context.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Convert a forward rule match to a rule tactic description.
Equations
Instances For
Convert a forward rule match m
to a rule. Fails if mkExtra? m
fails.
Equations
- m.toRule? mkExtra? = do let extra ← mkExtra? m pure { name := m.rule.name, indexingMode := Aesop.IndexingMode.unindexed, pattern? := none, extra := extra, tac := m.toRuleTacDescr }
Instances For
Convert a norm forward rule match to a norm rule. Fails if the match is not a norm rule match.
Equations
- m.toNormRule? = m.toRule? fun (x : Aesop.ForwardRuleMatch) => Option.map (fun (x : Int) => { penalty := x }) x.rule.prio.penalty?
Instances For
Convert a safe forward rule match to a safe rule. Fails if the match is not a safe rule match.
Equations
- m.toSafeRule? = m.toRule? fun (x : Aesop.ForwardRuleMatch) => Option.map (fun (x : Int) => { penalty := x, safety := Aesop.Safety.safe }) x.rule.prio.penalty?
Instances For
Convert an unsafe forward rule match to an unsafe rule. Fails if the match is not an unsafe rule match.
Equations
- m.toUnsafeRule? = m.toRule? fun (x : Aesop.ForwardRuleMatch) => Option.map (fun (x : Aesop.Percent) => { successProbability := x }) x.rule.prio.successProbability?