Skip to content

Commit 521b3b2

Browse files
affeldt-aistt6s
andauthored
Cleaning 20231122 (#107)
* rm sumR_ge0, big_ord1_eq, bigcap_const * generalize big_tuple_ffun * rm Rbigop.v, bigcap_ext * etc. --------- Co-authored-by: Takafumi Saikawa <tscompor@gmail.com>
1 parent a79d941 commit 521b3b2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1131
-1376
lines changed

_CoqProject

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ lib/ssr_ext.v
1414
lib/f2.v
1515
lib/ssralg_ext.v
1616
lib/bigop_ext.v
17-
lib/Rbigop.v
1817
lib/natbin.v
1918
lib/binary_entropy_function.v
2019
lib/num_occ.v

ecc_classic/decoding.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ From mathcomp Require Import zmodp matrix vector order.
55
From mathcomp Require Import lra mathcomp_extra Rstruct reals.
66
From mathcomp Require ssrnum.
77
Require Import Reals.
8-
Require Import ssrR realType_ext Reals_ext ssr_ext ssralg_ext Rbigop f2 fdist.
8+
Require Import ssrR realType_ext Reals_ext ssr_ext ssralg_ext f2 fdist.
99
Require Import proba.
1010
Require Import channel_code channel binary_symmetric_channel hamming pproba.
1111

ecc_classic/hamming_code.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ From mathcomp Require Import all_ssreflect ssralg fingroup finalg perm zmodp.
44
From mathcomp Require Import matrix mxalgebra vector.
55
From mathcomp Require Import Rstruct.
66
Require Import realType_ext ssr_ext ssralg_ext f2 linearcode natbin ssrR hamming.
7-
Require Import bigop_ext Rbigop fdist proba channel channel_code decoding.
7+
Require Import bigop_ext fdist proba channel channel_code decoding.
88
Require Import binary_symmetric_channel.
99

1010
(******************************************************************************)

ecc_modern/checksum.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ From mathcomp Require Import all_ssreflect ssralg fingroup finalg perm zmodp.
44
From mathcomp Require Import matrix vector.
55
Require Import Reals.
66
Require Import ssralg_ext ssrR Reals_ext f2 fdist channel tanner linearcode.
7-
Require Import Rbigop pproba.
7+
Require Import pproba.
88

99
(******************************************************************************)
1010
(* Checksum Operator *)

ecc_modern/ldpc.v

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ From mathcomp Require Import all_ssreflect ssralg fingroup finalg perm zmodp.
44
From mathcomp Require Import matrix vector ssrnum.
55
Require Import Reals Lra.
66
From mathcomp Require Import Rstruct.
7-
Require Import ssrR Reals_ext realType_ext ssr_ext ssralg_ext num_occ bigop_ext Rbigop.
7+
Require Import ssrR Reals_ext realType_ext ssr_ext ssralg_ext num_occ bigop_ext.
88
Require Import fdist channel pproba f2 linearcode subgraph_partition tanner.
99
Require Import tanner_partition hamming binary_symmetric_channel decoding.
1010
Require Import channel_code summary checksum summary_tanner.
@@ -456,7 +456,7 @@ transitivity (
456456
\sum_(x = d [~ setT :\ n0]) \prod_(m0 in 'F n0)
457457
(W ``(y \# 'V(m0, n0) :\ n0 | x \# 'V(m0, n0) :\ n0) *
458458
\prod_(m1 in 'F(m0, n0)) (\delta ('V m1) x)%:R)).
459-
apply eq_bigr => /= t Ht.
459+
apply: eq_bigr => /= t Ht.
460460
rewrite [in X in _ = X]big_split /=; congr (_ * _).
461461
by apply DMC_sub_vec_Fnext.
462462
rewrite (@rmul_rsum_commute0 _ _ _ (Tanner.connected tanner) (Tanner.acyclic tanner) d n0 _ y (fun m x y => W ``(x | y))) //.

ecc_modern/ldpc_algo.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Require Import Init.Wf Recdef Reals.
44
From mathcomp Require Import all_ssreflect perm zmodp matrix ssralg.
55
From mathcomp Require Import Rstruct.
6-
Require Import ssrR Reals_ext Rbigop f2 subgraph_partition tanner.
6+
Require Import ssrR Reals_ext f2 subgraph_partition tanner.
77
Require Import fdist channel pproba linearcode ssralg_ext.
88
Require Import tanner_partition summary ldpc checksum.
99

ecc_modern/ldpc_algo_proof.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Require Import Wf_nat Init.Wf Recdef Reals.
44
From mathcomp Require Import all_ssreflect perm zmodp matrix ssralg.
55
From mathcomp Require Import Rstruct.
6-
Require Import ssrR Reals_ext ssr_ext ssralg_ext bigop_ext Rbigop f2.
6+
Require Import ssrR Reals_ext ssr_ext ssralg_ext bigop_ext f2.
77
Require Import fdist channel pproba linearcode subgraph_partition tanner.
88
Require Import tanner_partition summary ldpc checksum ldpc_algo.
99

ecc_modern/summary.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
From mathcomp Require Import all_ssreflect ssralg fingroup finalg zmodp matrix.
44
Require Import Reals.
55
From mathcomp Require Import Rstruct.
6-
Require Import ssr_ext ssralg_ext ssrR Rbigop f2.
6+
Require Import ssr_ext ssralg_ext ssrR f2.
77

88
(******************************************************************************)
99
(* The Summary Operator *)

ecc_modern/summary_tanner.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
From mathcomp Require Import all_ssreflect ssralg fingroup finalg zmodp matrix.
44
Require Import Reals.
55
From mathcomp Require Import Rstruct.
6-
Require Import ssr_ext ssralg_ext ssrR Reals_ext Rbigop f2 summary.
6+
Require Import ssr_ext ssralg_ext ssrR Reals_ext f2 summary.
77
Require Import subgraph_partition tanner tanner_partition fdist channel.
88
Require Import checksum.
99

ecc_modern/tanner_partition.v

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
From mathcomp Require Import all_ssreflect ssralg fingroup finalg perm zmodp.
44
From mathcomp Require Import matrix.
55
From mathcomp Require Import Rstruct.
6-
Require Import ssr_ext subgraph_partition tanner f2 Rbigop.
6+
Require Import ssr_ext subgraph_partition tanner f2.
77

88
(******************************************************************************)
99
(* Cover/partition properties of Tanner graphs *)
@@ -530,7 +530,7 @@ Qed.
530530
Local Open Scope R_scope.
531531

532532
Lemma rprod_Fgraph_part_fnode g n0:
533-
\prod_(m0 < m) g m0 = \prod_(m0 in 'F n0) \prod_(m1 in 'F(m0, n0)) g m1.
533+
\prod_(m0 < m) g m0 = \prod_(m0 in 'F n0) \prod_(m1 in 'F(m0, n0)) g m1 :> Rdefinitions.R.
534534
Proof.
535535
transitivity (\prod_(m0 in [set: 'I_m]) g m0).
536536
apply eq_bigl => /= ?; by rewrite in_set.

information_theory/aep.v

+8-10
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
(* infotheo: information theory and error-correcting codes in Coq *)
2-
(* Copyright (C) 2020 infotheo authors, license: LGPL-2.1-or-later *)
1+
(* infotheo: information theory and error-correcting codes in Coq *)
2+
(* Copyright (C) 2020 infotheo authors, license: LGPL-2.1-or-later *)
33
From mathcomp Require Import all_ssreflect ssralg ssrnum matrix.
44
From mathcomp Require boolp.
55
Require Import Reals.
66
From mathcomp Require Import Rstruct.
7-
Require Import ssrR Reals_ext realType_ext ssr_ext ssralg_ext logb Rbigop fdist proba.
8-
Require Import entropy.
7+
Require Import ssrR Reals_ext realType_ext ssr_ext bigop_ext ssralg_ext logb.
8+
Require Import fdist proba entropy.
99

1010
(******************************************************************************)
1111
(* Asymptotic Equipartition Property (AEP) *)
@@ -140,12 +140,10 @@ apply/Pr_incl/subsetP => ta; rewrite 2!inE => /andP[H1].
140140
rewrite /sum_mlog_prod [`-- (`log _)]lock /= -lock /= /scalel_RV /log_RV /neg_RV.
141141
rewrite fdist_rVE.
142142
rewrite log_prodR_sumR_mlog //.
143-
have : forall x, 0 <= P x.
144-
move=> x.
145-
apply/RleP.
146-
exact: FDist.ge0.
147-
move/prodR_gt0_inv; apply.
148-
by move: H1; rewrite fdist_rVE => /RltP.
143+
move=> i; apply/RltP.
144+
move: i; apply/prod_gt0_inv.
145+
by move=> x; exact: FDist.ge0.
146+
by move: H1; rewrite fdist_rVE.
149147
Qed.
150148

151149
End AEP.

information_theory/binary_symmetric_channel.v

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
(* infotheo: information theory and error-correcting codes in Coq *)
22
(* Copyright (C) 2020 infotheo authors, license: LGPL-2.1-or-later *)
33
From mathcomp Require Import all_ssreflect ssralg ssrnum zmodp matrix lra.
4-
From mathcomp Require Import mathcomp_extra Rstruct classical_sets.
4+
From mathcomp Require Import mathcomp_extra classical_sets Rstruct reals.
55
Require Import Reals Lra.
6-
Require Import ssrR Reals_ext realType_ext logb ssr_ext ssralg_ext bigop_ext Rbigop fdist.
7-
Require Import entropy binary_entropy_function channel hamming channel_code.
6+
Require Import ssrR Reals_ext realType_ext logb ssr_ext ssralg_ext bigop_ext.
7+
Require Import fdist entropy binary_entropy_function channel hamming channel_code.
88
Require Import pproba.
99

1010
(******************************************************************************)
@@ -331,7 +331,7 @@ Lemma bsc_prob_prop (p : {prob R}) n : Prob.p p < 1 / 2 ->
331331
((1 - Prob.p p) ^ (n - n2) * (Prob.p p) ^ n2 <= (1 - Prob.p p) ^ (n - n1) * (Prob.p p) ^ n1)%R.
332332
Proof.
333333
move=> p05 d1 d2 d1d2.
334-
case/boolP: (p == R0%:pr).
334+
case/boolP: (p == 0%:pr).
335335
move/eqP->; rewrite !coqRE; apply/RleP.
336336
rewrite probpK subr0 !expr1n !mul1r !expr0n.
337337
move: d1d2; case: d2; first by rewrite leqn0 => /andP [] ->.

information_theory/channel.v

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
From mathcomp Require Import all_ssreflect all_algebra.
44
Require Import Reals.
55
From mathcomp Require Import Rstruct.
6-
Require Import ssrR Reals_ext logb ssr_ext ssralg_ext bigop_ext Rbigop fdist.
6+
Require Import ssrR Reals_ext logb ssr_ext ssralg_ext bigop_ext fdist.
77
Require Import proba entropy jfdist_cond.
88

99
(******************************************************************************)
@@ -34,6 +34,8 @@ Set Implicit Arguments.
3434
Unset Strict Implicit.
3535
Import Prenex Implicits.
3636

37+
Import Num.Theory.
38+
3739
Declare Scope channel_scope.
3840
Delimit Scope fdist_scope with channel.
3941
Local Open Scope channel_scope.
@@ -167,7 +169,7 @@ Local Open Scope ring_scope.
167169
Definition f := [ffun b : B => \sum_(a in A) W a b * P a].
168170

169171
Let f0 (b : B) : (0 <= f b).
170-
Proof. by rewrite ffunE; apply/RleP; apply: sumR_ge0 => a _; exact: mulR_ge0. Qed.
172+
Proof. by rewrite ffunE; apply/RleP; apply/RleP/sumr_ge0 => a _; rewrite mulr_ge0. Qed.
171173

172174
Let f1 : \sum_(b in B) f b = 1.
173175
Proof.

information_theory/channel_code.v

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
(* infotheo: information theory and error-correcting codes in Coq *)
22
(* Copyright (C) 2020 infotheo authors, license: LGPL-2.1-or-later *)
3-
From mathcomp Require Import all_ssreflect ssralg matrix.
3+
From mathcomp Require Import all_ssreflect ssralg ssrnum matrix.
44
Require Import Reals.
55
From mathcomp Require Import Rstruct.
6-
Require Import Reals_ext ssrR logb Rbigop fdist proba channel.
6+
Require Import Reals_ext ssrR logb fdist proba channel.
77

88
(******************************************************************************)
99
(* Definition of a channel code *)
@@ -35,6 +35,8 @@ Local Open Scope proba_scope.
3535
Local Open Scope channel_scope.
3636
Local Open Scope R_scope.
3737

38+
Import Num.Theory.
39+
3840
Section code_definition.
3941
Variables (A B M : finType) (n : nat).
4042

@@ -61,15 +63,15 @@ Local Notation "echa( W , c )" := (CodeErrRate W c) (at level 50).
6163

6264
Lemma echa_ge0 (HM : (0 < #| M |)%nat) W (c : code) : 0 <= echa(W , c).
6365
Proof.
64-
apply mulR_ge0.
66+
apply/RleP/mulR_ge0.
6567
- apply divR_ge0; [exact/Rle_0_1| exact/ltR0n].
66-
- by apply: sumR_ge0 => ? _; exact: sumR_ge0.
68+
- by apply/RleP/sumr_ge0 => ? _; exact: sumr_ge0.
6769
Qed.
6870

6971
Lemma echa_le1 (HM : (0 < #| M |)%nat) W (c : code) : echa(W , c) <= 1.
7072
Proof.
7173
rewrite /CodeErrRate div1R.
72-
apply (@leR_pmul2l (INR #|M|)); first exact/ltR0n.
74+
apply/RleP/ (@leR_pmul2l (INR #|M|)); first exact/ltR0n.
7375
rewrite mulRA mulRV ?INR_eq0' -?lt0n // mul1R -iter_addR -big_const.
7476
by apply: leR_sumR => m _; exact: Pr_1.
7577
Qed.
@@ -81,7 +83,7 @@ Local Notation "scha( W , C )" := (scha W C).
8183
Hypothesis Mnot0 : (0 < #|M|)%nat.
8284

8385
Lemma scha_pos (W : `Ch(A, B)) (c : code) : 0 <= scha(W, c).
84-
Proof. rewrite /scha; rewrite subR_ge0; exact/echa_le1. Qed.
86+
Proof. by rewrite /scha; rewrite subr_ge0; exact/echa_le1. Qed.
8587

8688
Lemma schaE (W : `Ch(A, B)) (c : code) :
8789
scha(W, c) = (1 / #|M|%:R *

information_theory/channel_coding_converse.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
From mathcomp Require Import all_ssreflect ssralg matrix.
44
Require Import Reals.
55
From mathcomp Require Import Rstruct.
6-
Require Import ssrR Reals_ext ssr_ext ssralg_ext logb ln_facts Rbigop num_occ.
6+
Require Import ssrR Reals_ext ssr_ext ssralg_ext logb ln_facts num_occ.
77
Require Import fdist entropy types jtypes divergence conditional_divergence.
88
Require Import error_exponent channel_code channel success_decode_bound.
99

information_theory/channel_coding_direct.v

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
From mathcomp Require Import all_ssreflect ssralg ssrnum matrix perm.
44
Require Import Reals Lra Classical.
55
From mathcomp Require Import Rstruct classical_sets.
6-
Require Import ssrZ ssrR Reals_ext realType_ext logb ssr_ext ssralg_ext bigop_ext Rbigop.
6+
Require Import ssrZ ssrR Reals_ext realType_ext logb ssr_ext ssralg_ext bigop_ext.
77
Require Import fdist proba entropy aep typ_seq joint_typ_seq channel.
88
Require Import channel_code.
99

@@ -96,7 +96,7 @@ set x := \sum_(f <- _) _ in H.
9696
have : \sum_(f : encT A M n) Wght.d P f * epsilon <= x.
9797
rewrite /x; apply leR_sumRl => //= f _.
9898
- by apply leR_wpmul2l => //; exact/Rnot_lt_le/abs.
99-
- by apply mulR_ge0 => //; exact/echa_ge0.
99+
- by apply mulR_ge0 => //; exact/RleP/echa_ge0.
100100
apply/Rlt_not_le/(@ltR_leR_trans epsilon) => //.
101101
rewrite -big_distrl /= (FDist.f1 (Wght.d P)) mul1R.
102102
by apply/RleP; rewrite Order.POrderTheory.lexx.
@@ -367,7 +367,7 @@ transitivity (\sum_(v : 'rV[A]_n)
367367
move=> ? _; by rewrite -[in RHS]Hf !ffunE mxE.
368368
rewrite (_ : ord0 = nth ord0 (enum M) 0); last by rewrite enum_ordSl.
369369
rewrite -(big_tuple_ffun _ (fun f => \prod_(m : M) P `^ n (f m))
370-
(fun r => fun yn => r *
370+
(fun r yn => r *
371371
(\sum_(y in ~: [set y0 | prod_rV (yn, y0) \in `JTS P W n epsilon0])
372372
W ``(y | yn))) (\row_(i < n) a) ord0)%R.
373373
transitivity (\sum_(j : _)

information_theory/conditional_divergence.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
From mathcomp Require Import all_ssreflect ssralg finset matrix.
44
Require Import Reals.
55
From mathcomp Require Import Rstruct.
6-
Require Import ssrR realType_ext Reals_ext ssr_ext ssralg_ext logb Rbigop ln_facts.
6+
Require Import ssrR realType_ext Reals_ext ssr_ext ssralg_ext logb ln_facts.
77
Require Import num_occ fdist entropy channel divergence types jtypes.
88
Require Import proba jfdist_cond.
99

information_theory/entropy.v

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
From mathcomp Require Import all_ssreflect all_algebra fingroup perm matrix.
44
Require Import Reals.
55
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.
77
Require Import logb ln_facts fdist jfdist_cond proba binary_entropy_function.
88
Require Import divergence.
99

@@ -69,7 +69,7 @@ Local Notation "'`H'" := (entropy).
6969

7070
Lemma entropy_ge0 : 0 <= `H.
7171
Proof.
72-
rewrite /entropy big_morph_oppR; apply sumR_ge0 => i _.
72+
rewrite /entropy big_morph_oppR; apply/RleP/sumr_ge0 => i _; apply/RleP.
7373
have [->|Hi] := eqVneq (P i) 0; first by rewrite mul0R oppR0.
7474
(* NB: this step in a standard textbook would be handled as a consequence of lim x->0 x log x = 0 *)
7575
rewrite mulRC -mulNR; apply mulR_ge0 => //; apply: oppR_ge0.
@@ -261,17 +261,17 @@ Qed.
261261

262262
Lemma cond_entropy1_ge0 a : 0 <= cond_entropy1 a.
263263
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.
265265
have [->|H0] := eqVneq (\Pr_QP[[set b]|[set a]]) 0.
266266
by rewrite mul0R.
267-
apply mulR_ge0; [exact: jcPr_ge0|].
267+
apply/RleP/mulR_ge0; [exact: jcPr_ge0|].
268268
rewrite -oppR0 -(Log_1 2) /log leR_oppr oppRK.
269269
by apply Log_increasing_le => //; [rewrite jcPr_gt0 | exact: jcPr_le1].
270270
Qed.
271271

272272
Lemma cond_entropy_ge0 : 0 <= cond_entropy.
273273
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.
275275
Qed.
276276

277277
End conditional_entropy.
@@ -690,7 +690,7 @@ Qed.
690690
Lemma cdiv1_ge0 z : 0 <= cdiv1 z.
691691
Proof.
692692
have [z0|z0] := eqVneq (PQR`2 z) 0.
693-
apply sumR_ge0 => -[a b] _.
693+
apply/RleP/sumr_ge0 => -[a b] _; apply/RleP.
694694
by rewrite {1}/jcPr setX1 Pr_set1 (dom_by_fdist_snd _ z0) div0R mul0R.
695695
have Hc : (fdistX PQR)`1 z != 0 by rewrite fdistX1.
696696
have Hc1 : (fdistX (fdist_proj13 PQR))`1 z != 0.
@@ -797,7 +797,7 @@ Qed.
797797
(* 2.92 *)
798798
Lemma cond_mutual_info_ge0 : 0 <= cond_mutual_info PQR.
799799
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 => //.
801801
exact: cdiv1_ge0.
802802
Qed.
803803

information_theory/entropy_convex.v

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
From HB Require Import structures.
44
From mathcomp Require Import all_ssreflect ssralg ssrnum matrix.
55
From mathcomp Require boolp.
6-
From mathcomp Require Import mathcomp_extra Rstruct.
6+
From mathcomp Require Import mathcomp_extra Rstruct reals.
77
Require Import Reals Ranalysis_ext Lra.
88
Require Import ssrR Reals_ext realType_ext logb ssr_ext ssralg_ext bigop_ext.
9-
Require Import Rbigop fdist jfdist_cond entropy convex binary_entropy_function.
9+
Require Import fdist jfdist_cond entropy convex binary_entropy_function.
1010
Require Import log_sum divergence.
1111

1212
(******************************************************************************)
@@ -109,7 +109,7 @@ Definition uncurry_dom_pair U (f : {fdist A} -> {fdist A} -> U) (x : dom_pair) :
109109

110110
Let avg := avg_dom_pair.
111111

112-
Let avg1 x y : avg 1%coqR%:pr x y = x.
112+
Let avg1 x y : avg 1%:pr x y = x.
113113
Proof. by rewrite /avg; case x => x0 H /=; exact/boolp.eq_exist/conv1. Qed.
114114

115115
Let avgI p x : avg p x x = x.
@@ -143,7 +143,7 @@ have [y2a0|y2a0] := eqVneq (y.2 a) 0.
143143
rewrite (_ : x.1 a = 0).
144144
by rewrite -!RmultE -!RplusE ?(mul0R,mulR0,addR0).
145145
exact/((dominatesP _ _).1 Hx).
146-
have [p0|p0] := eqVneq p 0%coqR%:pr.
146+
have [p0|p0] := eqVneq p 0%:pr.
147147
by rewrite p0 -!RmultE -!RplusE ?(mul0R,mulR0,addR0).
148148
apply/Req_le; rewrite -!RmultE -!RplusE mulRA ?(mulR0,addR0); congr (_ * _ * log _).
149149
simpl.
@@ -179,7 +179,7 @@ rewrite /= -!sumR_ord_setT !big_ord_recl !big_ord0 !addR0.
179179
rewrite /h /= !ffunE => /leR_trans; apply.
180180
rewrite !eqxx eq_sym (negbTE (neq_lift ord0 ord0)) -!mulRA; apply/Req_le.
181181
congr (_ + _ ).
182-
have [->|t0] := eqVneq p 0%coqR%:pr; first by rewrite !mul0R.
182+
have [->|t0] := eqVneq p 0%:pr; first by rewrite !mul0R.
183183
by congr (_ * (_ * log _)); field; split; exact/eqP.
184184
have [->|t1] := eqVneq (Prob.p p).~ 0; first by rewrite !mul0R.
185185
by congr (_ * (_ * log _)); field; split; exact/eqP.

information_theory/erasure_channel.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
From mathcomp Require Import all_ssreflect all_algebra matrix.
44
Require Import Reals.
55
From mathcomp Require Import mathcomp_extra Rstruct.
6-
Require Import ssrR Reals_ext realType_ext ssr_ext ssralg_ext logb Rbigop fdist.
6+
Require Import ssrR Reals_ext realType_ext ssr_ext ssralg_ext logb fdist.
77
Require Import entropy binary_entropy_function channel hamming channel_code.
88

99
(******************************************************************************)

0 commit comments

Comments
 (0)