Skip to content

Commit 8ec35d8

Browse files
committed
add test from a comment of issue
1 parent 854e335 commit 8ec35d8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/lean/run/6655.lean

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,18 @@ example {α : Type} (c : α → α) (x : α) : c x = x := by
5252
simp?
5353
sorry
5454

55+
/-!
56+
Example from comments of #6655. This used to suggest `simp only [Int.add_sub_cancel, p]`.
57+
(N.B. the goal at that point does not have `p` in it!)
58+
-/
59+
/-- info: Try this: simp only [Int.add_sub_cancel] -/
60+
#guard_msgs in
61+
example (a b : Int) : a + b - b = a := by
62+
let p := 1
63+
have h : p = 1 := by
64+
simp only [p]
65+
simp?
66+
5567
/-!
5668
Example from https://github.com/leanprover/lean4/pull/7539 by JovanGerb.
5769
This used to suggest `simp only [a, b] ` and `simp only [a, b]`

0 commit comments

Comments
 (0)