lean4-htt/tests/lean/run/by_cases.lean
Kim Morrison dcea47db02
chore: shorten suggestion about diagnostics (#4882)
This message is often incorporated into source files via `#guard_msgs`.
This change ensures it won't go over the 100 character ruler, and I
think is equally grammatical. :-)
2024-07-31 17:56:43 +00:00

20 lines
527 B
Text

example : True := by
if 1 + 1 = 2 then _ else ?_
case pos => trivial
fail_if_success case neg => contradiction
· contradiction
example (p : Prop) : True := by
if p then ?foo else trivial
case foo => trivial
/-! Should not accidentally leak `open Classical` into branches. -/
/--
error: failed to synthesize
Decidable p
Additional diagnostic information may be available using the `set_option diagnostics true` command.
-/
#guard_msgs in
example (p : Prop) : True := by
if p then exact decide p else trivial