Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: revert creates natural metavariable goal #6145

Merged
merged 3 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Lean/Meta/Tactic/Revert.lean
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def _root_.Lean.MVarId.revert (mvarId : MVarId) (fvarIds : Array FVarId) (preser
finally
mvarId.setKind .syntheticOpaque
let mvar := e.getAppFn
mvar.mvarId!.setKind .syntheticOpaque
mvar.mvarId!.setTag tag
return (toRevert.map Expr.fvarId!, mvar.mvarId!)

Expand Down
10 changes: 10 additions & 0 deletions tests/lean/run/revertMetavarKind.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import Lean.Meta

open Lean Elab Tactic

example (n : Nat) : n = n := by
revert n
run_tac do
guard (← getMainDecl).kind.isSyntheticOpaque
intro n
rfl
Loading