Skip to content

Commit 96d0721

Browse files
committed
add manual trivial application to conseq variant
1 parent a78d1cf commit 96d0721

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

src/ecPrinting.ml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,10 @@ let pp_modtype1 (ppe : PPEnv.t) fmt mty =
620620

621621
(* -------------------------------------------------------------------- *)
622622
let pp_local (ppe : PPEnv.t) fmt x =
623-
Format.fprintf fmt "%s" (EcIdent.name x)
623+
if debug_mode then
624+
Format.fprintf fmt "%s<%s>" (EcIdent.name x) (EcIdent.tostring_internal x)
625+
else
626+
Format.fprintf fmt "%s" (EcIdent.name x)
624627

625628
(* -------------------------------------------------------------------- *)
626629
let pp_local ?fv (ppe : PPEnv.t) fmt x =

src/phl/ecPhlConseq.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1120,7 +1120,7 @@ let rec t_hi_conseq notmod f1 f2 f3 tc =
11201120
t_intros_i [m;h0] @! t_cutdef
11211121
(ptlocal ~args:[pamemory m; palocal h0] hi)
11221122
mpre @! EcLowGoal.t_trivial;
1123-
t_mytrivial;
1123+
t_mytrivial @! t_intros_i [m; h0] @! t_apply_hyp h0;
11241124
t_apply_hyp hh];
11251125
tac pre posta @+ [
11261126
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)