lean4-htt/tests/lean/run/1815.lean
Joachim Breitner e33c32fb00
feat: ppOrigin to use MessageData.ofConst (#4362)
so that the pretty-printed origin is clickable, and avoid the
unnecessary `@`.

Particularly nice is this fix:
```diff
 /--
-info: [Meta.Tactic.simp.discharge] @bar discharge 
+info: [Meta.Tactic.simp.discharge] bar discharge 
       autoParam T _auto✝
-  [Meta.Tactic.simp.rewrite] { }:1000, T ==> True
-[Meta.Tactic.simp.rewrite] @bar:1000, U ==> True
+  [Meta.Tactic.simp.rewrite] T.mk:1000, T ==> True
+[Meta.Tactic.simp.rewrite] bar:1000, U ==> True
 -/
```
2024-06-05 11:00:34 +00:00

17 lines
627 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

variable {α : Type _} [Mul α] [Inhabited α]
abbrev Left (a : α) : α := a * default
abbrev Right (a : α): α := default * a
theorem mul_comm (a b : α) : a * b = b * a := sorry
set_option trace.Meta.Tactic.simp true
/--
info: [Meta.Tactic.simp.rewrite] mul_comm:1000:perm, perm rejected Left a ==> default * a
[Meta.Tactic.simp.rewrite] mul_comm:1000:perm, Right a ==> a * default
[Meta.Tactic.simp.rewrite] mul_comm:1000:perm, perm rejected a * default ==> default * a
[Meta.Tactic.simp.rewrite] eq_self:1000, Left a = a * default ==> True
-/
#guard_msgs in
example (a : α) : Left a = Right a := by
simp [mul_comm]