Skip to content

Commit f8d5997

Browse files
committed
fix the bug
1 parent 2a845cd commit f8d5997

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

src/phl/ecPhlRnd.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ module Core = struct
467467
(* Goal: dmap d1 g = d2 /\ forall a b, b = g(a) => psi[x -> a, y -> b] *)
468468
let dmap_op = EcPath.extend EcCoreLib.p_top ["Distr"; "dmap"] in
469469
let dmap_ty = tfun (tdistr tyL) (tfun (tfun tyL tyR) (tdistr tyR)) in
470-
let dmap_pred = f_eq (f_app (f_op dmap_op [tyL; tyR] dmap_ty) [muL; g] tyR) muR in
470+
let dmap_pred = f_eq (f_app (f_op dmap_op [tyL; tyR] dmap_ty) [muL; g] (tdistr tyR)) muR in
471471

472472
let a_id = EcIdent.create "a" in
473473
let b_id = EcIdent.create "b" in

tests/coupling-rnd.ec

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,15 @@ proc.
8787
coupling{1} f.
8888
wp; skip => @/predT /=.
8989
+ split.
90-
+ admit.
91-
(* + apply eq_distr. *)
92-
(* rewrite dbiased1E. *)
93-
(* rewrite clamp_id. *)
94-
(* + exact mu_bounded. *)
95-
(* rewrite dmap1E /pred1 /(\o) /=. *)
96-
(* case b => _. *)
97-
(* + by apply mu_eq => x /#. *)
98-
(* rewrite (mu_eq _ _ (predC test)). *)
99-
(* + by smt(). *)
100-
(* by rewrite mu_not D_ll. *)
101-
+ by rewrite /f //.
90+
+ apply eq_distr => b.
91+
rewrite dbiased1E.
92+
rewrite clamp_id.
93+
+ exact mu_bounded.
94+
rewrite dmap1E /pred1 /(\o) /=.
95+
case b => _.
96+
+ by apply mu_eq => x /#.
97+
rewrite (mu_eq _ _ (predC test)).
98+
+ by smt().
99+
by rewrite mu_not D_ll.
100+
+ by move => @/f //.
102101
qed.

0 commit comments

Comments
 (0)