File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1091,7 +1091,7 @@ let try_apply_elim_lemma (pg: penv) (lid: R.name) (i: nat) (ctxt: slprop_view) :
10911091 let typing = core_check_term g t T. E_Ghost ty in
10921092 let t' = wtag ( Some STT_Ghost ) ( Tm_ST { t ; args =[] }) in
10931093
1094-
1094+ check_slprop_equiv_ext ( RU. range_of_term pre ) g ( elab_slprop ctxt ) pre ;
10951095
10961096 assume ( elab_slprop ctxt == pre );
10971097 let k_t = cont_elab_with_bind_nondep_unit c t' in
@@ -1133,9 +1133,7 @@ let try_apply_eager_intro_lemma (pg: penv) (lid: R.name) (i: nat) ctxt (goal: sl
11331133 let typing = core_check_term g'' t T. E_Ghost ty in
11341134 let t' = wtag ( Some STT_Ghost ) ( Tm_ST { t ; args =[] }) in
11351135
1136-
1137-
1138-
1136+ check_slprop_equiv_ext ( RU. range_of_term ( elab_slprop goal )) g post' ( elab_slprop goal );
11391137
11401138 let k_typing = cont_elab_with_bind_nondep_unit c t' in
11411139 cont_elab_refl g ctxt ([] @ ctxt ),
@@ -1238,9 +1236,7 @@ let try_apply_intro_lemma (pg: penv) (lid: R.name) (i: nat) ctxt (goal: slprop_v
12381236 let typing = core_check_term g' t T. E_Ghost ty in
12391237 let t' = wtag ( Some STT_Ghost ) ( Tm_ST { t ; args =[] }) in
12401238
1241-
1242-
1243-
1239+ check_slprop_equiv_ext ( RU. range_of_term ( elab_slprop goal )) g ( elab_slprop post''_i ) ( elab_slprop goal );
12441240
12451241 let k_typing = cont_elab_with_bind_nondep_unit c t' in
12461242 let k_typing = cont_elab_frame k_typing ctxt' in
Original file line number Diff line number Diff line change 1+ module Bug4256
2+ # lang - pulse
3+ open Pulse
4+
5+ let foo ([ @@@mkey ] m : nat) ( n : nat) : slprop =
6+ pure ( m = n )
7+
8+ [ @@pulse_intro ]
9+ ghost fn foo_refl ( m : nat)
10+ ensures foo m m
11+ {
12+ fold foo m m
13+ }
14+
15+ [ @@expect_failure [ 19 ]]
16+ ghost fn uhoh_intro ()
17+ ensures pure False
18+ {
19+ assert foo 2 3 ;
20+ unfold foo
21+ }
22+
23+ let bar ([ @@@mkey ] m : nat) ( n : nat) : slprop =
24+ pure ( m = n )
25+
26+ [ @@pulse_eager_intro ]
27+ ghost fn bar_refl ( m : nat)
28+ ensures bar m m
29+ {
30+ fold bar m m
31+ }
32+
33+ [ @@expect_failure [ 19 ]]
34+ ghost fn uhoh_eager_intro ()
35+ ensures pure False
36+ {
37+ assert bar 2 3 ;
38+ unfold bar
39+ }
40+
41+ let baz ([ @@@mkey ] m : nat) ( n : nat) : slprop =
42+ pure ( m <> n )
43+
44+ [ @@pulse_eager_elim ]
45+ ghost fn baz_refl ( m : nat)
46+ requires baz m m
47+ ensures is_unreachable
48+ {
49+ unfold baz m m ;
50+ unreachable ()
51+ }
52+
53+ [ @@expect_failure [ 19 ]]
54+ ghost fn uhoh_eager_elim ()
55+ ensures pure False
56+ {
57+ fold baz 2 3 ;
58+ }
You can’t perform that action at this time.
0 commit comments