lean4-htt/tests/lean/run/9365.lean
Sebastian Graf 9a0c1ab2d0
feat: Simpler first-order implementation for pure SPreds (#9841)
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.
2025-08-11 08:32:16 +00:00

20 lines
520 B
Text

import Std.Tactic.Do
open Std.Do
set_option mvcgen.warning 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