-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ghost goals in autoparam tactic block (#6408)
This PR fixes a regression where goals that don't exist were being displayed. The regression was triggered by #5835 and originally caused by #4926. Bug originally reported at https://leanprover.zulipchat.com/#narrow/channel/270676-lean4/topic/tactic.20doesn't.20change.20primary.20goal.20state/near/488957772. The cause of this issue was that #5835 made certain `SourceInfo`s canonical, which was directly transferred to several `TacticInfo`s by #4926. The goal state selection mechanism would then pick up these extra `TacticInfo`s. The approach taken by this PR is to ensure that the `SourceInfo` that is being transferred by #4926 is noncanonical.
- Loading branch information
Showing
5 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
-- Issue originally reported at | ||
-- https://leanprover.zulipchat.com/#narrow/channel/270676-lean4/topic/tactic.20doesn't.20change.20primary.20goal.20state/near/488957772 | ||
class Preorder (α : Type) extends LE α, LT α where | ||
le_refl : ∀ a : α, a ≤ a | ||
le_trans : ∀ a b c : α, a ≤ b → b ≤ c → a ≤ c | ||
lt := fun a b => a ≤ b ∧ ¬b ≤ a | ||
lt_iff_le_not_le : ∀ a b : α, a < b ↔ a ≤ b ∧ ¬b ≤ a := by intros; rfl | ||
|
||
class PartialOrder (α : Type) extends Preorder α where | ||
le_antisymm : ∀ a b : α, a ≤ b → b ≤ a → a = b | ||
|
||
instance : PartialOrder Nat where | ||
le := (· ≤ ·) | ||
le_refl := Nat.le_refl | ||
le_trans a b c := Nat.le_trans | ||
le_antisymm := by | ||
intro x | ||
-- One goal: x : Nat ⊢ ∀ (b : Nat), x ≤ b → b ≤ x → x = b | ||
--^ $/lean/plainGoal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{"textDocument": {"uri": "file:///ghostGoals.lean"}, | ||
"position": {"line": 17, "character": 4}} | ||
{"rendered": "```lean\nx : Nat\n⊢ ∀ (b : Nat), x ≤ b → b ≤ x → x = b\n```", | ||
"goals": ["x : Nat\n⊢ ∀ (b : Nat), x ≤ b → b ≤ x → x = b"]} |