lean4-htt/tests/lean/run/simpStar.lean
Joachim Breitner 0e49576fe4
feat: guard_msgs to treat trace messages separate (#8267)
This PR makes `#guard_msgs` to treat `trace` messages separate from
`info`, `warning` and `error`. It also introduce the ability to say
`#guard_msgs (pass info`, like `(drop info)` so far, and also adds
`(check info)` as the explicit form of `(info)`, for completeness.

Fixes #8266
2025-05-09 05:44:34 +00:00

27 lines
656 B
Text

set_option linter.unusedVariables false
opaque f (x y : Nat) : Nat
opaque g (x : Nat) : Nat
theorem ex1 (x : Nat) (h₁ : f x x = g x) (h₂ : g x = x) : f x (f x x) = x := by
fail_if_success simp
simp [*]
theorem ex2 (x : Nat) (h₁ : f x x = g x) (h₂ : g x = x) : f x (f x x) = x := by
simp [*]
axiom g_ax (x : Nat) : g x = 0
/--
trace: x y : Nat
h₁ : f x x = g x
h₂ : g x < 5
⊢ g x + g x = 0
-/
#guard_msgs in
theorem ex3 (x y : Nat) (h₁ : f x x = g x) (h₂ : f x x < 5) : f x x + f x x = 0 := by
simp [*, -Nat.add_eq_zero] at *
trace_state
have aux₁ : f x x = g x := h₁
have aux₂ : g x < 5 := h₂
simp [g_ax]