Skip to content

Commit 6e5b249

Browse files
committed
rm deprecated, reduce warnings
1 parent d1dd221 commit 6e5b249

52 files changed

Lines changed: 261 additions & 402 deletions

Some content is hidden

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

classical/cardinality.v

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -742,8 +742,6 @@ move=> /finite_fsetP[{}A ->] /finite_fsetP[{}B ->].
742742
apply/finite_fsetP; exists (A `*` B)%fset; apply/predeqP => x.
743743
by split; rewrite /= inE => /andP.
744744
Qed.
745-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to finite_setX.")]
746-
Notation finite_setM := finite_setX (only parsing).
747745

748746
Lemma finite_image2 [aT bT rT : Type] [A : set aT] [B : set bT]
749747
(f : aT -> bT -> rT) :
@@ -843,8 +841,6 @@ apply/fsetP => i; apply/idP/idP; rewrite !(inE, in_fset_set)//=.
843841
by move=> [/mem_set-> /mem_set->].
844842
by move=> /andP[]; rewrite !inE.
845843
Qed.
846-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to fset_setX.")]
847-
Notation fset_setM := fset_setX (only parsing).
848844

849845
Definition fst_fset (T1 T2 : choiceType) (A : {fset (T1 * T2)}) : {fset T1} :=
850846
[fset x.1 | x in A]%fset.
@@ -912,17 +908,13 @@ Proof.
912908
move=> Afin Bfin; rewrite -bigcupX1l.
913909
by apply: bigcup_finite => // i Ai; exact/finite_setX/Bfin.
914910
Qed.
915-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to finite_setXR.")]
916-
Notation finite_setMR := finite_setXR (only parsing).
917911

918912
Lemma finite_setXL (T T' : choiceType) (A : T' -> set T) (B : set T') :
919913
(forall x, B x -> finite_set (A x)) -> finite_set B -> finite_set (A ``*` B).
920914
Proof.
921915
move=> Afin Bfin; rewrite -bigcupX1r.
922916
by apply: bigcup_finite => // i Ai; apply/finite_setX => //; exact: Afin.
923917
Qed.
924-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to finite_setXL.")]
925-
Notation finite_setML := finite_setXL (only parsing).
926918

927919
Lemma fset_set_II n : fset_set `I_n = [fset val i | i in 'I_n]%fset.
928920
Proof.
@@ -1232,23 +1224,17 @@ have /ppcard_leP[f] := Bc i Ai; apply/pcard_geP/surjPex.
12321224
exists (fun k => (i, f^-1%FUN k)) => -[_ j]/= [-> dj].
12331225
by exists (f j) => //=; rewrite funK ?inE.
12341226
Qed.
1235-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to countableXR.")]
1236-
Notation countableMR := countableXR (only parsing).
12371227

12381228
Lemma countableX T1 T2 (D1 : set T1) (D2 : set T2) :
12391229
countable D1 -> countable D2 -> countable (D1 `*` D2).
12401230
Proof. by move=> D1c D2c; exact: countableXR (fun _ _ => D2c). Qed.
1241-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to countableX.")]
1242-
Notation countableM := countableX (only parsing).
12431231

12441232
Lemma countableXL T T' (A : T' -> set T) (B : set T') :
12451233
countable B -> (forall i, B i -> countable (A i)) -> countable (A ``*` B).
12461234
Proof.
12471235
move=> Bc Ac; rewrite -bigcupX1r; apply: bigcup_countable => // i Bi.
12481236
by apply: countableX => //; exact: Ac.
12491237
Qed.
1250-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to countableXL.")]
1251-
Notation countableML := countableXL (only parsing).
12521238

12531239
Lemma infiniteXRl T T' (A : set T) (B : T -> set T') :
12541240
infinite_set A -> (forall i, B i !=set0) -> infinite_set (A `*`` B).
@@ -1257,8 +1243,6 @@ move=> /infiniteP/pcard_geP[f] /(_ _)/cid-/all_sig[b Bb].
12571243
apply/infiniteP/pcard_geP/surjPex; exists (fun x => f x.1).
12581244
by move=> i iT; have [a Aa fa] := 'oinvP_f iT; exists (a, b a).
12591245
Qed.
1260-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to infiniteXRl.")]
1261-
Notation infiniteMRl := infiniteXRl (only parsing).
12621246

12631247
Lemma cardXR_eq_nat T T' (A : set T) (B : T -> set T') :
12641248
(A #= [set: nat] -> (forall i, countable (B i) /\ B i !=set0) ->
@@ -1267,8 +1251,6 @@ Proof.
12671251
rewrite !card_eq_le => /andP[Acnt /infiniteP Ainfty] /all_and2[Bcnt Bn0].
12681252
by rewrite [(_ #<= _)%card]countableXR//=; exact/infiniteP/infiniteXRl.
12691253
Qed.
1270-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to cardXR_eq_nat.")]
1271-
Notation cardMR_eq_nat := cardXR_eq_nat (only parsing).
12721254

12731255
Lemma eq_cardSP {T : Type} (A : set T) n :
12741256
reflect (exists2 x, A x & A `\ x #= `I_n) (A #= `I_n.+1).

classical/classical_sets.v

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -337,14 +337,8 @@ Arguments setU _ _ _ _ /.
337337
Arguments setC _ _ _ /.
338338
Arguments setD _ _ _ _ /.
339339
Arguments setX _ _ _ _ _ /.
340-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to setX.")]
341-
Notation setM := setX (only parsing).
342340
Arguments setXR _ _ _ _ _ /.
343-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to setXR.")]
344-
Notation setMR := setXR (only parsing).
345341
Arguments setXL _ _ _ _ _ /.
346-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to setXL.")]
347-
Notation setML := setXL (only parsing).
348342
Arguments fst_set _ _ _ _ /.
349343
Arguments snd_set _ _ _ _ /.
350344
Arguments subsetP {T A B}.
@@ -1189,33 +1183,7 @@ Arguments subsetT {T} A.
11891183

11901184
#[global]
11911185
Hint Resolve subsetUl subsetUr subIsetl subIsetr subDsetl subDsetr : core.
1192-
#[deprecated(since="mathcomp-analysis 1.2.0", note="Use notin_setE instead.")]
1193-
Notation notin_set := notin_setE (only parsing).
11941186
Arguments setU_id2r {T} C {A B}.
1195-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to in_setX.")]
1196-
Notation in_setM := in_setX (only parsing).
1197-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to setX0.")]
1198-
Notation setM0 := setX0 (only parsing).
1199-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to set0X.")]
1200-
Notation set0M := set0X (only parsing).
1201-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to setXTT.")]
1202-
Notation setMTT := setXTT (only parsing).
1203-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to setXT.")]
1204-
Notation setMT := setXT (only parsing).
1205-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to setTX.")]
1206-
Notation setTM := setTX (only parsing).
1207-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to setXI.")]
1208-
Notation setMI := setXI (only parsing).
1209-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to setX_bigcupr.")]
1210-
Notation setM_bigcupr := setX_bigcupr (only parsing).
1211-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to setX_bigcupl.")]
1212-
Notation setM_bigcupl := setX_bigcupl (only parsing).
1213-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to setSX.")]
1214-
Notation setSM := setSX (only parsing).
1215-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to bigcupX1l.")]
1216-
Notation bigcupM1l := bigcupX1l (only parsing).
1217-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to bigcupX1r.")]
1218-
Notation bigcupM1r := bigcupX1r (only parsing).
12191187

12201188
Lemma set_cst {T I} (x : T) (A : set I) :
12211189
[set x | _ in A] = if A == set0 then set0 else [set x].
@@ -2090,11 +2058,6 @@ End bigop_lemmas.
20902058
Arguments bigcup_setD1 {T I} x.
20912059
Arguments bigcap_setD1 {T I} x.
20922060

2093-
#[deprecated(since="mathcomp-analysis 1.3.0",note="renamed to bigcup_setX_dep")]
2094-
Notation bigcup_setM_dep := bigcup_setX_dep (only parsing).
2095-
#[deprecated(since="mathcomp-analysis 1.3.0",note="renamed to bigcup_setX")]
2096-
Notation bigcup_setM := bigcup_setX (only parsing).
2097-
20982061
Lemma setD_bigcup {T} (I : eqType) (F : I -> set T) (P : set I) (j : I) : P j ->
20992062
F j `\` \bigcup_(i in [set k | P k /\ k != j]) (F j `\` F i) =
21002063
\bigcap_(i in P) F i.
@@ -3250,12 +3213,6 @@ Lemma fst_setXR (X : set T1) (Y : T1 -> set T2) : (X `*`` Y).`1 `<=` X.
32503213
Proof. by move=> x [y [//]]. Qed.
32513214

32523215
End product.
3253-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to fst_setX.")]
3254-
Notation fst_setM := fst_setX (only parsing).
3255-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to snd_setX.")]
3256-
Notation snd_setM := snd_setX (only parsing).
3257-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to fst_setXR instead.")]
3258-
Notation fst_setMR := fst_setXR (only parsing).
32593216

32603217
Section section.
32613218
Variables (T1 T2 : Type).
@@ -3376,14 +3333,6 @@ Lemma ysection_preimage_fst (A : set T1) y : ysection (fst @^-1` A) y = A.
33763333
Proof. by apply/seteqP; split; move=> x/=; rewrite /ysection/= inE. Qed.
33773334

33783335
End section.
3379-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to in_xsectionX.")]
3380-
Notation in_xsectionM := in_xsectionX (only parsing).
3381-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to in_ysectionX.")]
3382-
Notation in_ysectionM := in_ysectionX (only parsing).
3383-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to notin_xsectionX.")]
3384-
Notation notin_xsectionM := notin_xsectionX (only parsing).
3385-
#[deprecated(since="mathcomp-analysis 1.3.0", note="renamed to notin_ysectionX.")]
3386-
Notation notin_ysectionM := notin_ysectionX (only parsing).
33873336

33883337
Declare Scope relation_scope.
33893338
Delimit Scope relation_scope with relation.

classical/fsbigop.v

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
(* mathcomp analysis (c) 2017 Inria and AIST. License: CeCILL-C. *)
22
From mathcomp Require Import all_ssreflect ssralg ssrnum ssrint interval finmap.
3-
From mathcomp Require Import mathcomp_extra unstable boolp classical_sets.
3+
#[warning="-warn-library-file-internal-analysis"]
4+
From mathcomp Require Import unstable.
5+
From mathcomp Require Import mathcomp_extra boolp classical_sets.
46
From mathcomp Require Import functions cardinality.
57

68
(**md**************************************************************************)

classical/functions.v

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
(* mathcomp analysis (c) 2025 Inria and AIST. License: CeCILL-C. *)
22
From mathcomp Require Import all_ssreflect finmap ssralg ssrnum ssrint rat.
33
From HB Require Import structures.
4-
From mathcomp Require Import mathcomp_extra unstable boolp classical_sets.
4+
#[warning="-warn-library-file-internal-analysis"]
5+
From mathcomp Require Import unstable.
6+
From mathcomp Require Import mathcomp_extra boolp classical_sets.
57
Add Search Blacklist "__canonical__".
68
Add Search Blacklist "__functions_".
79
Add Search Blacklist "_factory_".

classical/mathcomp_extra.v

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
(* mathcomp analysis (c) 2022 Inria and AIST. License: CeCILL-C. *)
2-
From mathcomp Require Import all_ssreflect finmap ssralg ssrnum.
1+
(* mathcomp analysis (c) 2026 Inria and AIST. License: CeCILL-C. *)
2+
From mathcomp Require Import all_ssreflect finmap ssralg ssrnum ssrint.
33

44
(**md**************************************************************************)
55
(* # MathComp extra *)
@@ -83,3 +83,15 @@ Proof. by move=> F0; elim/big_rec : _ => // i x Pi; apply/ler_wnDl/F0. Qed.
8383
Lemma card_fset_sum1 (T : choiceType) (A : {fset T}) :
8484
#|` A| = (\sum_(i <- A) 1)%N.
8585
Proof. by rewrite big_seq_fsetE/= sum1_card cardfE. Qed.
86+
87+
(**************************)
88+
(* MathComp 2.6 additions *)
89+
(**************************)
90+
91+
(* PR in progress: https://github.com/math-comp/math-comp/pull/1515 *)
92+
Lemma intrD1 {R : pzRingType} (i : int) : (i + 1)%:~R = i%:~R + 1 :> R.
93+
Proof. by rewrite intrD. Qed.
94+
95+
(* PR in progress: https://github.com/math-comp/math-comp/pull/1515 *)
96+
Lemma intr1D {R : pzRingType} (i : int) : (1 + i)%:~R = 1 + i%:~R :> R.
97+
Proof. by rewrite intrD. Qed.

classical/set_interval.v

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
(* mathcomp analysis (c) 2025 Inria and AIST. License: CeCILL-C. *)
1+
(* mathcomp analysis (c) 2026 Inria and AIST. License: CeCILL-C. *)
22
From HB Require Import structures.
33
From mathcomp Require Import all_ssreflect ssralg ssrnum interval.
4-
From mathcomp Require Import mathcomp_extra unstable boolp classical_sets.
4+
#[warning="-warn-library-file-internal-analysis"]
5+
From mathcomp Require Import unstable.
6+
From mathcomp Require Import mathcomp_extra boolp classical_sets.
57
From mathcomp Require Import functions.
68

79
(**md**************************************************************************)
@@ -208,8 +210,6 @@ Qed.
208210

209211
End set_itv_porderType.
210212
Arguments neitv {disp T} _.
211-
#[deprecated(since="mathcomp-analysis 1.4.0", note="renamed to `subset_itvScc`")]
212-
Notation subset_itvS := subset_itvScc (only parsing).
213213
#[deprecated(since="mathcomp-analysis 1.10.0", note="renamed to `set_itvNyy`")]
214214
Notation set_itv_infty_infty := set_itvNyy (only parsing).
215215
#[deprecated(since="mathcomp-analysis 1.10.0", note="renamed to `set_itvoy`")]
@@ -707,7 +707,7 @@ Lemma range_factor ba bb a b : a < b ->
707707
[set` Interval (BSide ba 0) (BSide bb 1)].
708708
Proof. by move=> /(factor_itv_bij ba bb)/Pbij[f ->]; rewrite image_eq. Qed.
709709

710-
Lemma onem_factor a b x : a != b -> `1-(factor a b x) = factor b a x.
710+
Lemma onem_factor a b x : a != b -> (factor a b x).~ = factor b a x.
711711
Proof.
712712
rewrite eq_sym -subr_eq0 => ab; rewrite /onem /factor -(divff ab) -mulrBl.
713713
by rewrite opprB addrA subrK -mulrNN opprB -invrN opprB.

classical/unstable.v

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(* mathcomp analysis (c) 2026 Inria and AIST. License: CeCILL-C. *)
22
From mathcomp Require Import all_ssreflect finmap ssralg ssrnum ssrint.
3-
From mathcomp Require Import archimedean interval mathcomp_extra.
3+
From mathcomp Require Import archimedean interval.
44

55
(**md**************************************************************************)
66
(* # MathComp extra *)
@@ -275,27 +275,31 @@ by rewrite (leq_trans (leq_card_setU _ _))// leq_add.
275275
Qed.
276276

277277
Definition onem {R : pzRingType} (r : R) : R := 1 - r.
278+
#[deprecated(since="mathcomp-analysis 1.15.0")]
278279
Notation "`1- r" := (onem r) : ring_scope.
279280

281+
Reserved Notation "p '.~'" (format "p .~", at level 1).
282+
Notation "p '.~'" := (onem p) : ring_scope.
283+
280284
Section onem_ring.
281285
Context {R : pzRingType}.
282286
Implicit Type r : R.
283287

284-
Lemma onem0 : `1-0 = 1 :> R. Proof. by rewrite /onem subr0. Qed.
288+
Lemma onem0 : 0.~ = 1 :> R. Proof. by rewrite /onem subr0. Qed.
285289

286-
Lemma onem1 : `1-1 = 0 :> R. Proof. by rewrite /onem subrr. Qed.
290+
Lemma onem1 : 1.~ = 0 :> R. Proof. by rewrite /onem subrr. Qed.
287291

288-
Lemma onemK r : `1-(`1-r) = r. Proof. exact: subKr. Qed.
292+
Lemma onemK r : (r.~).~ = r. Proof. exact: subKr. Qed.
289293

290-
Lemma add_onemK r : r + `1- r = 1. Proof. by rewrite /onem addrC subrK. Qed.
294+
Lemma add_onemK r : r + r.~ = 1. Proof. by rewrite /onem addrC subrK. Qed.
291295

292-
Lemma onemD r s : `1-(r + s) = `1-r - s.
296+
Lemma onemD r s : (r + s).~ = r.~ - s.
293297
Proof. by rewrite /onem opprD addrA. Qed.
294298

295-
Lemma onemMr r s : s * `1-r = s - s * r.
299+
Lemma onemMr r s : s * r.~ = s - s * r.
296300
Proof. by rewrite /onem mulrBr mulr1. Qed.
297301

298-
Lemma onemM r s : `1-(r * s) = `1-r + `1-s - `1-r * `1-s.
302+
Lemma onemM r s : (r * s).~ = r.~ + s.~ - r.~ * s.~.
299303
Proof. by rewrite /onem mulrBl 2!mulrBr !mul1r mulr1 addrKA opprK subrKA. Qed.
300304

301305
End onem_ring.
@@ -304,34 +308,34 @@ Section onem_order.
304308
Variable R : numDomainType.
305309
Implicit Types r : R.
306310

307-
Lemma onem_gt0 r : r < 1 -> 0 < `1-r. Proof. by rewrite subr_gt0. Qed.
311+
Lemma onem_gt0 r : r < 1 -> 0 < r.~. Proof. by rewrite subr_gt0. Qed.
308312

309-
Lemma onem_ge0 r : r <= 1 -> 0 <= `1-r.
313+
Lemma onem_ge0 r : r <= 1 -> 0 <= r.~.
310314
Proof. by rewrite le_eqVlt => /predU1P[->|/onem_gt0/ltW]; rewrite ?onem1. Qed.
311315

312-
Lemma onem_le1 r : 0 <= r -> `1-r <= 1.
316+
Lemma onem_le1 r : 0 <= r -> r.~ <= 1.
313317
Proof. by rewrite lerBlDr lerDl. Qed.
314318

315-
Lemma onem_lt1 r : 0 < r -> `1-r < 1.
319+
Lemma onem_lt1 r : 0 < r -> r.~ < 1.
316320
Proof. by rewrite ltrBlDr ltrDl. Qed.
317321

318-
Lemma onemX_ge0 r n : 0 <= r -> r <= 1 -> 0 <= `1-(r ^+ n).
322+
Lemma onemX_ge0 r n : 0 <= r -> r <= 1 -> 0 <= (r ^+ n).~.
319323
Proof. by move=> ? ?; rewrite subr_ge0 exprn_ile1. Qed.
320324

321-
Lemma onemX_lt1 r n : 0 < r -> `1-(r ^+ n) < 1.
325+
Lemma onemX_lt1 r n : 0 < r -> (r ^+ n).~ < 1.
322326
Proof. by move=> ?; rewrite onem_lt1// exprn_gt0. Qed.
323327

324328
End onem_order.
325329

326330
Lemma normr_onem {R : realDomainType} (x : R) :
327-
(0 <= x <= 1 -> `| `1-x | <= 1)%R.
331+
(0 <= x <= 1 -> `| x.~ | <= 1)%R.
328332
Proof.
329333
move=> /andP[x0 x1]; rewrite ler_norml; apply/andP; split.
330334
by rewrite lerBrDl lerBlDr (le_trans x1)// lerDl.
331335
by rewrite lerBlDr lerDl.
332336
Qed.
333337

334-
Lemma onemV (F : numFieldType) (x : F) : x != 0 -> `1-(x^-1) = (x - 1) / x.
338+
Lemma onemV (F : numFieldType) (x : F) : x != 0 -> x^-1.~ = (x - 1) / x.
335339
Proof. by move=> ?; rewrite mulrDl divff// mulN1r. Qed.
336340

337341
Lemma lez_abs2 (a b : int) : 0 <= a -> a <= b -> (`|a| <= `|b|)%N.
@@ -401,14 +405,6 @@ Qed.
401405

402406
End order_min.
403407

404-
(* PR in progress: https://github.com/math-comp/math-comp/pull/1515 *)
405-
Lemma intrD1 {R : pzRingType} (i : int) : i%:~R + 1 = (i + 1)%:~R :> R.
406-
Proof. by rewrite intrD. Qed.
407-
408-
(* PR in progress: https://github.com/math-comp/math-comp/pull/1515 *)
409-
Lemma intr1D {R : pzRingType} (i : int) : 1 + i%:~R = (1 + i)%:~R :> R.
410-
Proof. by rewrite intrD. Qed.
411-
412408
Section bijection_forall.
413409

414410
Lemma bij_forall A B (f : A -> B) (P : B -> Prop) :

0 commit comments

Comments
 (0)