Additional utilities in Lean.MVarId #
Add the hypothesis h : t, given v : t, and return the new FVarId.
Equations
- g.let h v t = do let __do_lift ← t.getDM (Lean.Meta.inferType v) let __do_lift ← g.define h __do_lift v __do_lift.intro1P
 
Instances For
Applies intro repeatedly until it fails. We use this instead of
Lean.MVarId.intros to allowing unfolding.
For example, if we want to do introductions for propositions like ¬p,
the ¬ needs to be unfolded into → False, and intros does not do such unfolding.
Equations
- mvarId.intros! = Lean.MVarId.intros!.run mvarId #[] mvarId
 
Instances For
Get the type the given metavariable after instantiating metavariables and cleaning up annotations.
Equations
- mvarId.getType'' = do let __do_lift ← mvarId.getType let __do_lift ← Lean.instantiateMVars __do_lift pure __do_lift.cleanupAnnotations
 
Instances For
Analogue of liftMetaTactic for tactics that return a single goal.
Equations
- Lean.Elab.Tactic.liftMetaTactic' tac = Lean.Elab.Tactic.liftMetaTactic fun (g : Lean.MVarId) => do let __do_lift ← tac g pure [__do_lift]