The following functions let us run MetaM actions in the context of a rapp or
goal. Rapps save the metavariable context in which they were run by storing a
Meta.SavedState
. When we, for example, apply a rule to a goal, we run the
rule's action in the metavariable context of the goal (which is the
metavariable context of the goal's parent rapp). The resulting metavariable
context, in which the goal mvar is assigned to an expression generated by the
rule, then becomes the metavariable context of the rule's rapp.
To save and restore metavariable contexts, we use the MonadBacktrack MetaM
instance. This means that some elements of the state are persistent, notably
caches and trace messages. These become part of the global state.
The environment is not persistent. This means that modifications of the environment made by a rule are not visible in the global state and are reset once the tactic exits. As a result, rules which modify the environment are likely to fail.
Equations
- Aesop.instMonadLiftTSTRealWorld_aesop = { monadLift := fun {α : Type} (x : ST IO.RealWorld α) => liftM (liftM x) }
Instances For
Equations
Instances For
Equations
Instances For
Equations
- Aesop.Rapp.runMetaMModifying x r = do let __discr ← Aesop.Rapp.runMetaM x r match __discr with | (result, finalState) => pure (result, Aesop.Rapp.setMetaState finalState r)
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.
Instances For
Equations
- Aesop.Goal.runMetaMInPostNormState x g = Aesop.Goal.runMetaMInPostNormState' (fun (g : Lean.MVarId) => Aesop.withSaveState✝ (x g)) g
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Aesop.Rapp.runMetaMInParentState x r = do let __do_lift ← ST.Ref.get r.parent Aesop.Goal.runMetaMInParentState x __do_lift
Instances For
Equations
- Aesop.Rapp.runMetaMInParentState' x r = do let __do_lift ← ST.Ref.get r.parent Aesop.Goal.runMetaMInParentState' x __do_lift
Instances For
Equations
- Aesop.Rapp.runMetaMModifyingParentState x r = do let __do_lift ← ST.Ref.get r.parent Aesop.Goal.runMetaMModifyingParentState x __do_lift