This PR migrates the ⌜p⌝ notation for embedding pure p : Prop into SPred σs to expand into a simple, first-order expression SPred.pure p that can be supported by e-matching in grind. Doing so deprives ⌜p⌝ notation of its idiom-bracket-like support for #selector and ‹Nat›ₛ syntax which is thus removed.
20 lines
441 B
Text
20 lines
441 B
Text
import Std.Tactic.Do
|
|
|
|
open Std.Do
|
|
|
|
set_option mvcgen.warning false
|
|
|
|
noncomputable def setZeroHead : StateM (List Nat) Unit := do
|
|
modify fun _ => [1, 0, 1, 2, 3, 4, 5]
|
|
pure ()
|
|
modify fun s => s.tail
|
|
pure ()
|
|
|
|
theorem setZeroHead_spec :
|
|
⦃⌜True⌝⦄
|
|
setZeroHead
|
|
⦃⇓ _ gns => ⌜∃ ns', gns = 0 :: ns'⌝⦄ := by
|
|
mvcgen [setZeroHead] -- should mintro through let/have bindings
|
|
mleave
|
|
rename_i t
|
|
exists t.2.tail
|