lean4-htt/tests/lean/run/simp_arith_deprecated.lean
Marc Huisinga 9d427fdfcf
feat: "try this" messages with support for interactivity (#10524)
This PR adds support for interactivity to the combined "try this"
messages that were introduced in #9966. In doing so, it moves the link
to apply a suggestion to a separate `[apply]` button in front of the
suggestion. Hints with diffs remain unchanged, as they did not
previously support interacting with terms in the diff, either.

<img width="379" height="256" alt="Suggestion with interactive message"
src="https://github.com/user-attachments/assets/7838ebf6-0613-46e7-bc88-468a05acbf51"
/>
2025-10-13 13:39:03 +00:00

55 lines
1.8 KiB
Text

/--
info: Try these:
[apply] simp +arith
[apply] simp +arith +decide
---
error: `simp_arith` has been deprecated. It was a shorthand for `simp +arith +decide`, but most of the time, `+decide` was redundant since simprocs have been implemented.
-/
#guard_msgs in
example : x + 2 = 1 + 1 + x := by
simp_arith
/--
info: Try these:
[apply] simp +arith [h, id] at h₂
[apply] simp +arith +decide [h, id] at h₂
---
error: `simp_arith` has been deprecated. It was a shorthand for `simp +arith +decide`, but most of the time, `+decide` was redundant since simprocs have been implemented.
-/
#guard_msgs in
example (h : x = y) (h₂ : y + 2 = 1 + 1 + x) : True := by
simp_arith [h, id] at h₂
/--
info: Try these:
[apply] simp! +arith [h, id] at h₂
[apply] simp! +arith +decide [h, id] at h₂
---
error: `simp_arith!` has been deprecated. It was a shorthand for `simp! +arith +decide`, but most of the time, `+decide` was redundant since simprocs have been implemented.
-/
#guard_msgs in
example (h : x = y) (h₂ : y + 2 = 1 + 1 + x) : True := by
simp_arith! [h, id] at h₂
/--
info: Try these:
[apply] simp_all +arith
[apply] simp_all +arith +decide
---
error: `simp_all_arith` has been deprecated. It was a shorthand for `simp_all +arith +decide`, but most of the time, `+decide` was redundant since simprocs have been implemented.
-/
#guard_msgs in
example (h : x = y) (h₂ : y + 2 = 1 + 1 + x) : True := by
simp_all_arith
/--
info: Try these:
[apply] simp_all! +arith
[apply] simp_all! +arith +decide
---
error: `simp_all_arith!` has been deprecated. It was a shorthand for `simp_all! +arith +decide`, but most of the time, `+decide` was redundant since simprocs have been implemented.
-/
#guard_msgs in
example (h : x = y) (h₂ : y + 2 = 1 + 1 + x) : True := by
simp_all_arith!