|
3 | 3 | From mathcomp Require Import all_ssreflect all_algebra fingroup perm matrix.
|
4 | 4 | Require Import Reals.
|
5 | 5 | From mathcomp Require Import Rstruct.
|
6 |
| -Require Import ssrR Reals_ext realType_ext ssr_ext ssralg_ext Rbigop bigop_ext. |
| 6 | +Require Import ssrR Reals_ext realType_ext ssr_ext ssralg_ext bigop_ext. |
7 | 7 | Require Import logb ln_facts fdist jfdist_cond proba binary_entropy_function.
|
8 | 8 | Require Import divergence.
|
9 | 9 |
|
@@ -69,7 +69,7 @@ Local Notation "'`H'" := (entropy).
|
69 | 69 |
|
70 | 70 | Lemma entropy_ge0 : 0 <= `H.
|
71 | 71 | Proof.
|
72 |
| -rewrite /entropy big_morph_oppR; apply sumR_ge0 => i _. |
| 72 | +rewrite /entropy big_morph_oppR; apply/RleP/sumr_ge0 => i _; apply/RleP. |
73 | 73 | have [->|Hi] := eqVneq (P i) 0; first by rewrite mul0R oppR0.
|
74 | 74 | (* NB: this step in a standard textbook would be handled as a consequence of lim x->0 x log x = 0 *)
|
75 | 75 | rewrite mulRC -mulNR; apply mulR_ge0 => //; apply: oppR_ge0.
|
@@ -261,17 +261,17 @@ Qed.
|
261 | 261 |
|
262 | 262 | Lemma cond_entropy1_ge0 a : 0 <= cond_entropy1 a.
|
263 | 263 | Proof.
|
264 |
| -rewrite /cond_entropy1 big_morph_oppR; apply sumR_ge0 => b _; rewrite -mulRN. |
| 264 | +rewrite /cond_entropy1 big_morph_oppR; apply/RleP/sumr_ge0 => b _; rewrite -mulRN. |
265 | 265 | have [->|H0] := eqVneq (\Pr_QP[[set b]|[set a]]) 0.
|
266 | 266 | by rewrite mul0R.
|
267 |
| -apply mulR_ge0; [exact: jcPr_ge0|]. |
| 267 | +apply/RleP/mulR_ge0; [exact: jcPr_ge0|]. |
268 | 268 | rewrite -oppR0 -(Log_1 2) /log leR_oppr oppRK.
|
269 | 269 | by apply Log_increasing_le => //; [rewrite jcPr_gt0 | exact: jcPr_le1].
|
270 | 270 | Qed.
|
271 | 271 |
|
272 | 272 | Lemma cond_entropy_ge0 : 0 <= cond_entropy.
|
273 | 273 | Proof.
|
274 |
| -by apply sumR_ge0 => a _; apply mulR_ge0 => //; exact: cond_entropy1_ge0. |
| 274 | +by apply/RleP/sumr_ge0 => a _; apply/RleP/mulR_ge0 => //; exact: cond_entropy1_ge0. |
275 | 275 | Qed.
|
276 | 276 |
|
277 | 277 | End conditional_entropy.
|
|
690 | 690 | Lemma cdiv1_ge0 z : 0 <= cdiv1 z.
|
691 | 691 | Proof.
|
692 | 692 | have [z0|z0] := eqVneq (PQR`2 z) 0.
|
693 |
| - apply sumR_ge0 => -[a b] _. |
| 693 | + apply/RleP/sumr_ge0 => -[a b] _; apply/RleP. |
694 | 694 | by rewrite {1}/jcPr setX1 Pr_set1 (dom_by_fdist_snd _ z0) div0R mul0R.
|
695 | 695 | have Hc : (fdistX PQR)`1 z != 0 by rewrite fdistX1.
|
696 | 696 | have Hc1 : (fdistX (fdist_proj13 PQR))`1 z != 0.
|
|
797 | 797 | (* 2.92 *)
|
798 | 798 | Lemma cond_mutual_info_ge0 : 0 <= cond_mutual_info PQR.
|
799 | 799 | Proof.
|
800 |
| -rewrite cond_mutual_infoE2; apply sumR_ge0 => c _; apply mulR_ge0 => //. |
| 800 | +rewrite cond_mutual_infoE2; apply/RleP/sumr_ge0 => c _; apply/RleP/mulR_ge0 => //. |
801 | 801 | exact: cdiv1_ge0.
|
802 | 802 | Qed.
|
803 | 803 |
|
|
0 commit comments