chore: upstream MVarId.applyConst (#3362)
Helper function for applying a constant to the goal, with fresh universe metavariables.
This commit is contained in:
parent
eaf44d74ae
commit
229f16f421
1 changed files with 4 additions and 0 deletions
|
|
@ -188,6 +188,10 @@ def _root_.Lean.MVarId.apply (mvarId : MVarId) (e : Expr) (cfg : ApplyConfig :=
|
|||
def apply (mvarId : MVarId) (e : Expr) (cfg : ApplyConfig := {}) : MetaM (List MVarId) :=
|
||||
mvarId.apply e cfg
|
||||
|
||||
/-- Short-hand for applying a constant to the goal. -/
|
||||
def _root_.Lean.MVarId.applyConst (mvar : MVarId) (c : Name) (cfg : ApplyConfig := {}) : MetaM (List MVarId) := do
|
||||
mvar.apply (← mkConstWithFreshMVarLevels c) cfg
|
||||
|
||||
partial def splitAndCore (mvarId : MVarId) : MetaM (List MVarId) :=
|
||||
mvarId.withContext do
|
||||
mvarId.checkNotAssigned `splitAnd
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue