lean4-htt/tests/lean/run/6706.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

28 lines
541 B
Text

/-!
# `simp?`-suggested names conflicting with auxiliary declarations
https://github.com/leanprover/lean4/issues/6706
This test ensures that "unresolved" names provided by `simp?` do not conflict with local auxiliary
declarations.
-/
def P := True
theorem N.A.B : P := trivial
/--
info: Try this:
[apply] simp only [N.A.B]
-/
#guard_msgs in
theorem N.X.A.B : P := by
simp? [N.A.B]
/--
info: Try this:
[apply] simp only [_root_.N.A.B]
-/
#guard_msgs in
theorem A : P :=
let rec N.A.B := ()
by simp? [_root_.N.A.B]
where B := ()