lean4-htt/tests/lean/run/9581.lean
Sebastian Graf d5331d4150
feat: Make mleave apply at * and improve its simp set (#9581) (#9754)
This PR make `mleave` apply `at *` and improve its simp set in order to
discharge some more trivialities (#9581).

It also improves some documentation.
2025-08-06 08:34:45 +00:00

29 lines
646 B
Text

import Std.Tactic.Do
open Std.Do
set_option mvcgen.warning false
structure MyException where
def F : EStateM MyException Unit Unit := do
for _ in [0:5] do
pure ()
theorem F_spec :
⦃⌜True⌝⦄
F
⦃⇓ _ => ⌜1 < 2⌝⦄ := by
mvcgen [F]
case inv => exact ⇓ _ => ⌜1 < 2⌝
-- it would be nice if we had a tactic wrapper around `case inv => exact ...` that does `mleave`
-- on all subgoals afterwards.
· mleave
omega
· mleave
omega
-- Goal that could be discharged completely automatically:
-- case post.except
-- ⊢ (⇓x => ⌜1 < 2⌝).snd ⊢ₑ (⇓x => ⌜1 < 2⌝).snd
· mleave