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

40 lines
934 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.

def mid {α} (T : α) := T
structure HH (A B : Nat) where
toFun : Nat
prop : True
set_option pp.explicit true
/--
trace: S T f : Nat
⊢ @Eq (HH S T) (@HH.mk S T f trivial) (@id (HH S T) (@HH.mk S T f trivial))
-/
#guard_msgs in
example {S T : Nat} (f : Nat) :
HH.mk (B := T) f trivial = id (α := HH S T) (HH.mk (B := mid T) f trivial) := by
simp only [mid]
trace_state
rfl
/--
trace: S T f : Nat
⊢ @Eq (HH S T) (@HH.mk S T f trivial) (@id (HH S T) (@HH.mk S T f trivial))
-/
#guard_msgs in
example {S T : Nat} (f : Nat) :
HH.mk (B := T) f trivial = id (α := HH S T) (HH.mk (B := mid T) f trivial) := by
dsimp only [mid]
trace_state
rfl
/--
trace: S T f : Nat
⊢ @Eq (HH S T) (@HH.mk S T f trivial) (@id (HH S T) (@HH.mk S T f trivial))
-/
#guard_msgs in
example {S T : Nat} (f : Nat) :
HH.mk (B := T) f trivial = id (α := HH S T) (HH.mk (B := mid T) f trivial) := by
unfold mid
trace_state
rfl