@@ -81,49 +81,50 @@ Lemma prodr_gt0 (R : numDomainType) (A : finType) (F : A -> R) :
8181 (forall a, 0 < F a) -> 0 < \prod_(a : A) F a.
8282Proof . by move=> F0; elim/big_ind : _ => // x y ? ?; exact: mulr_gt0. Qed .
8383
84+ Notation "p '.~'" := (onem p). (* TODO: remove when dropping support for MCA < 1.15.0 *)
85+
8486(* PR to mathcomp_extra.v? *)
8587Section onem.
8688Variable R : realFieldType.
8789Implicit Types r s : R.
8890
89- Lemma onem_le r s : (r <= s) = (`1-s <= `1-r ).
91+ Lemma onem_le r s : (r <= s) = (s.~ <= r.~ ).
9092Proof .
9193apply/idP/idP => [|?]; first exact: lerB.
9294by rewrite -(opprK r) lerNl -(lerD2l 1).
9395Qed .
9496
95- Lemma onem_lt r s : (r < s) = (`1-s < `1-r ).
97+ Lemma onem_lt r s : (r < s) = (s.~ < r.~ ).
9698Proof .
9799apply/idP/idP => [rs|]; first by rewrite ler_ltB.
98100by rewrite ltrBrDl addrCA -ltrBrDl subrr subr_lt0.
99101Qed .
100102
101- Lemma onemE r : `1-r = 1 - r. Proof . by []. Qed .
103+ Lemma onemE r : r.~ = 1 - r. Proof . by []. Qed .
102104
103- Lemma onem_div r s : s != 0 -> `1- (r / s) = (s - r) / s.
105+ Lemma onem_div r s : s != 0 -> (r / s).~ = (s - r) / s.
104106Proof . by rewrite !onemE => q0; rewrite mulrDl mulNr divff. Qed .
105107
106- Lemma onem_prob r : 0 <= r <= 1 -> 0 <= onem r <= 1.
108+ Lemma onem_prob r : 0 <= r <= 1 -> 0 <= r.~ <= 1.
107109Proof .
108110by move=> /andP[r0 r1]; apply/andP; split; [rewrite onem_ge0|rewrite onem_le1].
109111Qed .
110112
111- Lemma onem_eq0 r : (`1-r = 0) <-> (r = 1).
113+ Lemma onem_eq0 r : (r.~ = 0) <-> (r = 1).
112114Proof . by rewrite /onem; split => [/subr0_eq//|->]; rewrite subrr. Qed .
113115
114- Lemma onem_neq0 (r : R) : (`1-r != 0) <-> (r != 1).
116+ Lemma onem_neq0 (r : R) : (r.~ != 0) <-> (r != 1).
115117Proof . by split; apply: contra => /eqP/onem_eq0/eqP. Qed .
116118
117- Lemma onem_eq1 r : `1-r = 1 <-> r = 0. Proof . rewrite onemE; lra. Qed .
119+ Lemma onem_eq1 r : r.~ = 1 <-> r = 0. Proof . rewrite onemE; lra. Qed .
118120
119- Lemma onem_oprob r : 0 < r < 1 -> 0 < `1-r < 1.
121+ Lemma onem_oprob r : 0 < r < 1 -> 0 < r.~ < 1.
120122Proof . by move=> /andP [? ?]; apply/andP; rewrite onem_gt0 // onem_lt1. Qed .
121123
122- Lemma subr_onem r s : r - `1-s = r + s - 1.
124+ Lemma subr_onem r s : r - s.~ = r + s - 1.
123125Proof . by rewrite /onem opprB addrA. Qed .
124126
125127End onem.
126- Notation "p '.~'" := (onem p).
127128
128129Section about_the_pow_function.
129130
@@ -323,9 +324,6 @@ Global Hint Resolve prob_le1 : core.
323324#[export] Hint Extern 0 (is_true (@Order.le ring_display _ _ _)) =>
324325 exact/prob_ge0 : core.
325326
326- Arguments prob0 {R}.
327- Arguments prob1 {R}.
328-
329327Lemma prob_invn {R : realType} (m : nat) :
330328 0 <= ((1 + m)%:R^-1 : R) <= 1.
331329Proof .
@@ -866,19 +864,3 @@ Lemma s_of_gt0_oprob p q : 0 < [s_of (OProb.p p), (OProb.p q)]%:num.
866864Proof . by rewrite s_of_gt0// oprob_neq0. Qed .
867865
868866End oprob_lemmas2.
869-
870- Section i01_prob.
871- Variable R : realType.
872-
873- #[deprecated(since="infotheo 0.9.7", note="{prob R} and {i01 R} are identical")]
874- Definition i01_of_prob (p : {prob R}) : {i01 R} := p.
875- #[deprecated(since="infotheo 0.9.7", note="{prob R} and {i01 R} are identical")]
876- Definition prob_of_i01 (p : {i01 R}) : {prob R} := p.
877- #[deprecated(since="infotheo 0.9.7", note="{prob R} and {i01 R} are identical")]
878- Lemma i01_of_probK : cancel i01_of_prob prob_of_i01.
879- Proof . by []. Qed .
880- #[deprecated(since="infotheo 0.9.7", note="{prob R} and {i01 R} are identical")]
881- Lemma prob_of_i01K : cancel prob_of_i01 i01_of_prob.
882- Proof . by []. Qed .
883-
884- End i01_prob.
0 commit comments