A rule for backward chaining (goal transformation).
Given a goal ... ⊢ T, applying a BackwardRule derived from a theorem ∀ xs, P
will unify T with P, assign the goal to the theorem application,
and return new goals for the unassigned arguments in xs.
- expr : Expr
The theorem used to create the rule. It is often of the form
Expr.const declName. - pattern : Pattern
Precomputed pattern for efficient unification.
Indices of arguments that become new subgoals, ordered with non-dependent goals first.
Instances For
Creates a BackwardRule from a declaration name.
The num? parameter optionally limits how many arguments are included in the pattern
(useful for partially applying theorems).
Equations
- One or more equations did not get rendered due to their size.
Instances For
- failed : ApplyResult
- goals (mvarIds : List MVarId) : ApplyResult
Instances For
Applies a backward rule to a goal, returning new subgoals.
- Unifies the goal type with the rule's pattern
- Assigns the goal metavariable to the theorem application
- Returns new goals for unassigned arguments (per
resultPos)
Returns .notApplicable if unification fails.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Similar to `BackwardRule.apply', but throws an error if unification fails.
Equations
- One or more equations did not get rendered due to their size.