blob: 236fb0834aa8977592e0263637db82fb0208733d [file]
import Std.Tactic.Do
set_option sym.debug true
open Std.Do
set_option linter.deprecated.syntax false
abbrev SM := StateM (Array Nat)
noncomputable def setZeroHead : StateM (Array Nat) Unit := do
modify fun _ => #[0, 1, 2, 3, 4, 5]
theorem setZeroHead_spec :
⦃⌜True⌝⦄
setZeroHead
⦃⇓ _ gns => ⌜∃ ns', gns.toList = 0 :: ns'⌝⦄ := by
mvcgen [setZeroHead]
-- We want to see and name the tuple `t` here in order for us not having to repeat its
-- definition in t.2.toList.tail below
rename_i t
exists t.2.toList.tail