Additional utilities in Lean.MVarId
#
def
Lean.MVarId.let
(g : Lean.MVarId)
(h : Lean.Name)
(v : Lean.Expr)
(t : Option Lean.Expr := none)
:
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
Has the effect of refine ⟨e₁,e₂,⋯, ?_⟩
.
Equations
- One or more equations did not get rendered due to their size.
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
partial def
Lean.MVarId.intros!.run
(mvarId : Lean.MVarId)
(acc : Array Lean.FVarId)
(g : Lean.MVarId)
:
Implementation of intros!
.
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]
Instances For
Copy of Lean.Elab.Tactic.run
that can return a value.
Equations
- One or more equations did not get rendered due to their size.