Skip to content

Commit 9f8d176

Browse files
authored
add manual trivial application to conseq variant (#848)
1 parent acbee62 commit 9f8d176

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/phl/ecPhlConseq.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,7 @@ let rec t_hi_conseq notmod f1 f2 f3 tc =
11291129
t_intros_i [m;h0] @! t_cutdef
11301130
(ptlocal ~args:[pamemory m; palocal h0] hi)
11311131
mpre @! EcLowGoal.t_trivial;
1132-
t_mytrivial;
1132+
t_mytrivial @! t_intros_i [m; h0] @! t_apply_hyp h0;
11331133
t_apply_hyp hh];
11341134
tac pre posta @+ [
11351135
t_apply_hyp hi;

tests/conseq_phoare_hoare.ec

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
require import Real.
2+
3+
module Foo = {proc foo() = {}}.
4+
5+
lemma foo_ll : islossless Foo.foo by islossless.
6+
7+
op [opaque] p = predT<:int>.
8+
9+
lemma foo_h: hoare [ Foo.foo : true ==> forall j, p j].
10+
proof. by proc; auto => /> j; rewrite /p. qed.
11+
12+
lemma foo_p: phoare[ Foo.foo : true ==> forall j, p j] = 1%r.
13+
by conseq foo_ll foo_h.
14+
qed.

0 commit comments

Comments
 (0)