lean4-htt/tests/lean/run/9474.lean
Sebastian Graf 61ea403bfa
fix: Make mvcgen mintro let/have bindings (#9474) (#9507)
This PR makes `mvcgen` `mintro` let/have bindings.

Closes #9474.
2025-08-06 07:30:09 +00:00

22 lines
509 B
Text

import Std.Tactic.Do
open Std.Do
set_option mvcgen.warning false
abbrev gns : SVal ((List Nat)::[]) (List Nat) := fun s => SVal.pure s
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
⦃⇓ _ => ⌜∃ ns', #gns = 0 :: ns'⌝⦄ := by
mvcgen [setZeroHead] -- should mintro through let/have bindings
mleave
rename_i t
exists t.2.tail