Skip to content

Commit 8a1c2a3

Browse files
committed
two extra lemmas
1 parent a7f3f96 commit 8a1c2a3

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

theories/distributions/Distr.ec

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,12 +1440,22 @@ qed.
14401440
(* -------------------------------------------------------------------- *)
14411441
lemma iscpl_dmap1 ['a 'b] (d1 : 'a distr) (d2 : 'b distr) (f : 'a -> 'b) :
14421442
dmap d1 f = d2 => iscoupling<:'a, 'b> d1 d2 (dmap d1 (fun x => (x, f x))).
1443-
admitted.
1443+
proof.
1444+
rewrite /iscoupling => ?.
1445+
split.
1446+
+ by rewrite dmap_comp /(\o) /= dmap_id //.
1447+
+ by rewrite dmap_comp /(\o) /=.
1448+
qed.
14441449

14451450
(* -------------------------------------------------------------------- *)
14461451
lemma iscpl_dmap2 ['a 'b] (d1 : 'a distr) (d2 : 'b distr) (f : 'b -> 'a) :
14471452
dmap d2 f = d1 => iscoupling<:'a, 'b> d1 d2 (dmap d2 (fun x => (f x, x))).
1448-
admitted.
1453+
proof.
1454+
rewrite /iscoupling => ?.
1455+
split.
1456+
+ by rewrite dmap_comp /(\o) /=.
1457+
+ by rewrite dmap_comp /(\o) /= dmap_id //.
1458+
qed.
14491459

14501460
(* -------------------------------------------------------------------- *)
14511461
abbrev [-printing] dapply (F: 'a -> 'b) : 'a distr -> 'b distr =

0 commit comments

Comments
 (0)