Rewriting at specified locations #
Many metaprograms have the following general structure: the input is an expression e
and the
output is a new expression e'
, together with a proof that e = e'
.
This file provides convenience functions to turn such a metaprogram into a variety of tactics:
using the metaprogram to modify the goal, a specified hypothesis, or (via Tactic.Location
) a
combination of these.
Runs the given atLocal
and atTarget
methods on each of the locations selected by the given
loc
.
- If
loc
is a list of locations, runs at each specified hypothesis (and finally the goal if⊢
is included), and fails if any of the tactic applications fail. - If
loc
is*
, runs at the nondependentProp
hypotheses (those produced byLean.MVarId.getNondepPropHyps
) and then at the target.
This is a variant of Lean.Elab.Tactic.withLocation
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Use the procedure m
to rewrite the provided goal.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Use the procedure m
to rewrite hypothesis fvarId
.
The simpTheorems
of the simp-context carried with m
will be modified to remove fvarId
;
this ensures that if the procedure m
involves rewriting by this SimpTheoremsArray
, then, e.g.,
h : x = y
is not transformed (by rewriting h
) to True
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Use the procedure m
to transform at specified locations (hypotheses and/or goal).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Use the procedure m
to transform at specified locations (hypotheses and/or goal).
In the wildcard case (*
), filter out all dependent and/or non-Prop hypotheses.
Equations
- One or more equations did not get rendered due to their size.