Skip to content

Commit 4c44f4e

Browse files
authored
chore: add fixed test case for #9363 (#10547)
1 parent d6cd738 commit 4c44f4e

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

tests/lean/run/9363.lean

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import Std.Tactic.Do
2+
3+
open Std.Do
4+
5+
set_option mvcgen.warning false
6+
7+
axiom P : Nat → Prop
8+
axiom P' : Nat → Prop
9+
axiom Q : Nat → Prop
10+
axiom R : Assertion ps
11+
12+
axiom hPQ : ∀ n, P n → P' n → Q n
13+
14+
axiom G : StateM Nat Unit
15+
axiom H : StateM Nat Unit
16+
17+
noncomputable def F : StateM Nat Unit := do
18+
G
19+
H
20+
21+
@[spec]
22+
axiom G_spec : ⦃⌜True⌝⦄ G ⦃⇓ _ n => ⌜P n ∧ P' n⌝⦄
23+
24+
@[spec]
25+
axiom H_spec : ⦃fun n => ⌜Q n⌝⦄ H ⦃⇓ _ => R⦄
26+
27+
theorem F_spec :
28+
⦃⌜True⌝⦄
29+
F
30+
⦃⇓ _ => R⦄ := by
31+
mvcgen [F]
32+
33+
-- Goal:
34+
-- s✝¹ : Nat
35+
-- r✝ : Unit
36+
-- s✝ : Nat
37+
-- h : P s✝ ∧ P' s✝
38+
-- ⊢ Q s✝
39+
40+
rename_i h
41+
cases h
42+
apply hPQ
43+
assumption
44+
assumption

0 commit comments

Comments
 (0)