feat: add MVarId.eqOfHEq tactic
This commit is contained in:
parent
f75d59047f
commit
279c34ff46
1 changed files with 8 additions and 0 deletions
|
|
@ -52,6 +52,14 @@ def _root_.Lean.MVarId.heqOfEq (mvarId : MVarId) : MetaM MVarId :=
|
|||
let some [mvarId] ← observing? do mvarId.apply (mkConst ``heq_of_eq [← mkFreshLevelMVar]) | return mvarId
|
||||
return mvarId
|
||||
|
||||
/--
|
||||
Try to apply `eq_of_heq`. If successful, then return new goal, otherwise return `mvarId`.
|
||||
-/
|
||||
def _root_.Lean.MVarId.eqOfHEq (mvarId : MVarId) : MetaM MVarId :=
|
||||
mvarId.withContext do
|
||||
let some [mvarId] ← observing? do mvarId.apply (mkConst ``eq_of_heq [← mkFreshLevelMVar]) | return mvarId
|
||||
return mvarId
|
||||
|
||||
/--
|
||||
Close given goal using `HEq.refl`.
|
||||
-/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue