Skip to content

Commit d095c21

Browse files
authored
fixes #1968 (#2056)
1 parent 0dda958 commit d095c21

8 files changed

Lines changed: 94 additions & 60 deletions

File tree

CHANGELOG_UNRELEASED.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,18 @@
481481
- in `functions.v`
482482
+ lemma `scalrfctE` -> `scalerfctE` (deprecating `scalrfctE`)
483483

484+
- in `filter.v`:
485+
+ definition `finI_from` -> `open_finI_from`
486+
+ lemma `finI_from_cover` -> `open_finI_from_cover`
487+
+ lemma `finI_from1` -> `open_finI_from1`
488+
+ lemma `finI_from_countable` -> `open_finI_from_countable`
489+
+ lemma `finI_fromI` -> `open_finI_fromI`
490+
491+
- in `topology_structure.v`:
492+
+ definition `open_from` -> `openU_from`
493+
+ lemma `closed_bigsetU` -> `bigsetU_closed`
494+
+ lemma `closed_bigcup` -> `bigcup_closed`
495+
484496
### Generalized
485497

486498
- in `measurable_structure.v`:

classical/filter.v

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ From mathcomp Require Import cardinality mathcomp_extra fsbigop set_interval.
3838
(* The HB class is SubNbhs. *)
3939
(* filterI_iter F n == nth stage of recursively building the *)
4040
(* filter of finite intersections of F *)
41-
(* finI_from D f == set of \bigcap_(i in E) f i where E is a *)
41+
(* open_finI_from D f == set of \bigcap_(i in E) f i where E is a *)
4242
(* a finite subset of D *)
4343
(* ``` *)
4444
(* *)
@@ -185,7 +185,7 @@ Unset Strict Implicit.
185185
Unset Printing Implicit Defensive.
186186

187187
(* Making sure that [Program] does not automatically introduce *)
188-
Obligation Tactic := idtac.
188+
#[global,export] Obligation Tactic := idtac.
189189

190190
Import Order.TTheory GRing.Theory Num.Theory.
191191

@@ -1560,41 +1560,42 @@ move=> [P sFP] [Q sFQ] PQB /filterS; apply; rewrite -PQB.
15601560
by apply: (filterI _ _); [exact: (IH _ _ sFP)|exact: (IH _ _ sFQ)].
15611561
Qed.
15621562

1563-
Definition finI_from (I : choiceType) T (D : set I) (f : I -> set T) :=
1563+
Definition open_finI_from (I : choiceType) T (D : set I) (f : I -> set T) :=
15641564
[set \bigcap_(i in [set` D']) f i |
15651565
D' in [set A : {fset I} | {subset A <= D}]].
15661566

1567-
Lemma finI_from_cover (I : choiceType) T (D : set I) (f : I -> set T) :
1568-
\bigcup_(A in finI_from D f) A = setT.
1567+
Lemma open_finI_from_cover (I : choiceType) T (D : set I) (f : I -> set T) :
1568+
\bigcup_(A in open_finI_from D f) A = setT.
15691569
Proof.
15701570
rewrite predeqE => t; split=> // _; exists setT => //.
15711571
by exists fset0 => //; rewrite set_fset0 bigcap_set0.
15721572
Qed.
15731573

1574-
Lemma finI_from1 (I : choiceType) T (D : set I) (f : I -> set T) i :
1575-
D i -> finI_from D f (f i).
1574+
Lemma open_finI_from1 (I : choiceType) T (D : set I) (f : I -> set T) i :
1575+
D i -> open_finI_from D f (f i).
15761576
Proof.
15771577
move=> Di; exists [fset i]%fset; first by move=> ?; rewrite !inE => /eqP ->.
15781578
by rewrite bigcap_fset big_seq_fset1.
15791579
Qed.
15801580

1581-
Lemma finI_from_countable (I : pointedType) T (D : set I) (f : I -> set T) :
1582-
countable D -> countable (finI_from D f).
1581+
Lemma open_finI_from_countable (I : pointedType) T (D : set I)
1582+
(f : I -> set T) :
1583+
countable D -> countable (open_finI_from D f).
15831584
Proof.
15841585
move=> ?; apply: (card_le_trans (card_image_le _ _)).
15851586
exact: fset_subset_countable.
15861587
Qed.
15871588

1588-
Lemma finI_fromI {I : choiceType} T D (f : I -> set T) A B :
1589-
finI_from D f A -> finI_from D f B -> finI_from D f (A `&` B) .
1589+
Lemma open_finI_fromI {I : choiceType} {T} D (f : I -> set T) :
1590+
setI_closed (open_finI_from D f).
15901591
Proof.
1591-
case=> N ND <- [M MD <-]; exists (N `|` M)%fset.
1592+
move=> A B; case=> N ND <- [M MD <-]; exists (N `|` M)%fset.
15921593
by move=> ?; rewrite inE => /orP[/ND | /MD].
15931594
by rewrite -bigcap_setU set_fsetU.
15941595
Qed.
15951596

15961597
Lemma filterI_iter_finI {I : choiceType} T D (f : I -> set T) :
1597-
finI_from D f = \bigcup_n (filterI_iter (f @` D) n).
1598+
open_finI_from D f = \bigcup_n (filterI_iter (f @` D) n).
15981599
Proof.
15991600
rewrite eqEsubset; split.
16001601
move=> A [N /= + <-]; have /finite_setP[n] := finite_fset N; elim: n N.
@@ -1613,21 +1614,31 @@ move=> A [n _]; elim: n A.
16131614
- by rewrite set_fset0 bigcap_set0.
16141615
- by move=> ?; rewrite !inE => /eqP ->.
16151616
- by rewrite set_fset1 bigcap_set1.
1616-
by move=> n IH A /= [B snB [C snC <-]]; apply: finI_fromI; apply: IH.
1617+
by move=> n IH A /= [B snB [C snC <-]]; apply: open_finI_fromI; exact: IH.
16171618
Qed.
16181619

16191620
Lemma smallest_filter_finI {I T : choiceType} (D : set I) (f : I -> set T) :
1620-
filter_from (finI_from D f) id = smallest (@Filter T) (f @` D).
1621+
filter_from (open_finI_from D f) id = smallest (@Filter T) (f @` D).
16211622
Proof. by rewrite filterI_iter_finI filterI_iterE. Qed.
16221623

16231624
End filter_supremums.
1625+
#[deprecated(since="mathcomp-analysis 1.17.0", use=open_finI_from)]
1626+
Notation finI_from := open_finI_from (only parsing).
1627+
#[deprecated(since="mathcomp-analysis 1.17.0", use=open_finI_from_cover)]
1628+
Notation finI_from_cover := open_finI_from_cover (only parsing).
1629+
#[deprecated(since="mathcomp-analysis 1.17.0", use=open_finI_from1)]
1630+
Notation finI_from1 := open_finI_from1 (only parsing).
1631+
#[deprecated(since="mathcomp-analysis 1.17.0", use=open_finI_from_countable)]
1632+
Notation finI_from_countable := open_finI_from_countable (only parsing).
1633+
#[deprecated(since="mathcomp-analysis 1.17.0", use=open_finI_fromI)]
1634+
Notation finI_fromI := open_finI_fromI (only parsing).
16241635

16251636
Definition finI (I : choiceType) T (D : set I) (f : I -> set T) :=
16261637
forall D' : {fset I}, {subset D' <= D} ->
16271638
\bigcap_(i in [set i | i \in D']) f i !=set0.
16281639

16291640
Lemma finI_filter (I : choiceType) T (D : set I) (f : I -> set T) :
1630-
finI D f -> ProperFilter (filter_from (finI_from D f) id).
1641+
finI D f -> ProperFilter (filter_from (open_finI_from D f) id).
16311642
Proof.
16321643
move=> finIf; apply: (filter_from_proper (filter_from_filter _ _)).
16331644
- by exists setT; exists fset0 => //; rewrite predeqE.

experimental_reals/distr.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ rewrite interchange_psum /=; last first.
965965
by apply/eq_psum=> x /=; rewrite mulrCA.
966966
+ have := summable_pr E (dlet f mu); apply/eq_summable.
967967
by move=> x; rewrite /= dletE psumZ ?ler0n.
968-
+ by move=> y; apply/summable_condl/summable_mlet.
968+
+ by move=> t; exact/summable_condl/summable_mlet.
969969
Qed.
970970

971971
Lemma pr_dmargin E f (mu : {distr U / R}) :

theories/lebesgue_measure.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1284,7 +1284,7 @@ have [N F5e] : exists N, \sum_(N <= n <oo) \esum_(i in F n) mu (closure (B i)) <
12841284
- by rewrite nneseries_esum// set_mem_set.
12851285
pose K := \bigcup_(i in `I_N) \bigcup_(j in F i) closure (B j).
12861286
have closedK : closed K.
1287-
apply: closed_bigcup => //= i iN; apply: closed_bigcup => //.
1287+
apply: bigcup_closed => //= i iN; apply: bigcup_closed => //.
12881288
by move=> j Fij; exact: closed_closure.
12891289
have ZNF5 : Z r%:num `<=`
12901290
\bigcup_(i in ~` `I_N) \bigcup_(j in F i) closure (5%:R *` B j).

theories/topology_theory/compact.v

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ Definition closed_fam_of (A : set T) I (D : set I) (f : I -> set T) :=
324324
End Covers.
325325

326326
Section PCovers.
327-
Variable T : ptopologicalType.
327+
Context {T : ptopologicalType}.
328328

329329
Lemma compact_In0 :
330330
compact = [set A | forall (I : choiceType) (D : set I) (f : I -> set T),
@@ -334,14 +334,15 @@ rewrite predeqE => A; split=> [Aco I D f [g gcl feAg] finIf|Aco F FF FA].
334334
case: (pselect (exists i, D i)) => [[i Di] | /asboolP]; last first.
335335
by rewrite asbool_neg => /forallp_asboolPn D0; exists point => ? /D0.
336336
have [|p [Ap clfinIfp]] := Aco _ (finI_filter finIf).
337-
by exists (f i); [apply: finI_from1|rewrite feAg // => ? []].
337+
by exists (f i); [exact: open_finI_from1|rewrite feAg // => ? []].
338338
exists p => j Dj; rewrite feAg //; split=> //; apply: gcl => // B.
339-
by apply: clfinIfp; exists (f j); [apply: finI_from1|rewrite feAg // => ? []].
339+
apply: clfinIfp.
340+
by exists (f j); [exact: open_finI_from1|rewrite feAg // => ? []].
340341
have finIAclF : finI F (fun B => A `&` closure B).
341342
apply: (@filter_finI _ F) => B FB.
342343
by apply: filterI => //; apply: filterS FB; apply: subset_closure.
343344
have [|p AclFIp] := Aco _ _ _ _ finIAclF.
344-
by exists closure=> //; move=> ??; apply: closed_closure.
345+
by exists closure=> //; move=> ? ?; exact: closed_closure.
345346
exists p; split=> [|B C FB p_C]; first by have /AclFIp [] := FA.
346347
by have /AclFIp [_] := FB; move=> /(_ _ p_C).
347348
Qed.

theories/topology_theory/separation_axioms.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ Lemma accessible_finite_set_closed :
190190
Proof.
191191
split => [TT1 A fA|h x y xy].
192192
rewrite -(fsbig_setU_set1 fA) fsbig_finite//=.
193-
by apply: closed_bigsetU => x xA; exact: accessible_closed_set1.
193+
by apply: bigsetU_closed => x xA; exact: accessible_closed_set1.
194194
by exists (~` [set y]); rewrite !inE/=; split;
195195
[rewrite openC; exact: h|exact/eqP|].
196196
Qed.

theories/topology_theory/supremum_topology.v

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(* mathcomp analysis (c) 2017 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 boot order algebra finmap all_classical.
44
From mathcomp Require Import topology_structure uniform_structure.
@@ -62,7 +62,7 @@ HB.instance Definition _ (I : Type) (T : pointedType) (f : I -> Topological T) :
6262

6363
Section sup_uniform.
6464
Local Open Scope relation_scope.
65-
Variable (T : choiceType) (Ii : Type) (Tc : Ii -> Uniform T).
65+
Context {T : choiceType} {Ii : Type} (Tc : Ii -> Uniform T).
6666

6767
Let I : choiceType := {classic Ii}.
6868
Let TS := fun i => Uniform.Pack (Tc i).
@@ -75,7 +75,7 @@ Local Lemma IEnt_pointT (i : I) : ent_of (i, setT).
7575
Proof. by apply/asboolP; exact: entourageT. Qed.
7676

7777
Definition sup_ent : set_system (T * T) :=
78-
filter_from (finI_from [set: IEnt] (fun p => (projT1 p).2)) id.
78+
filter_from (open_finI_from [set: IEnt] (fun p => (projT1 p).2)) id.
7979

8080
Ltac IEntP := move=> [[ /= + + /[dup] /asboolP]].
8181

@@ -185,8 +185,9 @@ have [I0 | /set0P [i0 _]] := eqVneq [set: I] set0.
185185
move=> P [w [A _]] <- subP; exists setT => //.
186186
apply: subset_trans subP; apply: sub_bigcap => i _ ? _.
187187
by suff : [set: I] (projT1 i).1 by rewrite I0.
188-
exists (finI_from (\bigcup_n g n) id); split.
189-
- by apply/finI_from_countable/bigcup_countable => //i _; case: (projT2 (f i)).
188+
exists (open_finI_from (\bigcup_n g n) id); split.
189+
- apply/open_finI_from_countable/bigcup_countable => // i _.
190+
by case: (projT2 (f i)).
190191
- move=> E [A AsubGn AE]; exists E => //.
191192
have h (w : set (T * T)) : { p : IEnt | w \in A -> w = (projT1 p).2 }.
192193
apply: cid; have [|] := boolP (w \in A); last first.

theories/topology_theory/topology_structure.v

Lines changed: 41 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -500,46 +500,48 @@ HB.end.
500500
(** Topology defined by a base of open sets *)
501501

502502
HB.factory Record isBaseTopological T & Choice T := {
503-
I : pointedType;
504-
D : set I;
505-
b : I -> (set T);
506-
b_cover : \bigcup_(i in D) b i = setT;
503+
I : pointedType ;
504+
D : set I ;
505+
b : I -> set T ;
506+
b_cover : \bigcup_(i in D) b i = setT ;
507507
b_join : forall i j t, D i -> D j -> b i t -> b j t ->
508-
exists k, [/\ D k, b k t & b k `<=` b i `&` b j];
508+
exists k, [/\ D k, b k t & b k `<=` b i `&` b j]
509509
}.
510510

511+
Definition openU_from T I (D : set I) (b : I -> set T) :=
512+
[set \bigcup_(i in D') b i | D' in subset^~ D].
513+
511514
HB.builders Context T & isBaseTopological T.
512515

513-
Definition open_from := [set \bigcup_(i in D') b i | D' in subset^~ D].
516+
Local Notation openU_from := (openU_from D b).
514517

515-
Let open_fromT : open_from setT.
518+
Let openU_fromT : openU_from setT.
516519
Proof. exists D => //; exact: b_cover. Qed.
517520

518-
Let open_fromI (A B : set T) : open_from A -> open_from B ->
519-
open_from (A `&` B).
521+
Let openU_fromI : setI_closed openU_from.
520522
Proof.
521-
move=> [DA sDAD AeUbA] [DB sDBD BeUbB].
522-
have ABU : forall t, (A `&` B) t ->
523-
exists it, D it /\ b it t /\ b it `<=` A `&` B.
524-
move=> t [At Bt].
525-
have [iA [DiA [biAt sbiA]]] : exists i, D i /\ b i t /\ b i `<=` A.
523+
move=> A B [DA sDAD AeUbA] [DB sDBD BeUbB].
524+
have ABU t : (A `&` B) t ->
525+
exists it, [/\ D it, b it t & b it `<=` A `&` B].
526+
move=> [At Bt].
527+
have [iA [DiA biAt sbiA]] : exists i, [/\ D i, b i t & b i `<=` A].
526528
move: At; rewrite -AeUbA => - [i DAi bit]; exists i.
527-
by split; [apply: sDAD|split=> // ?; exists i].
528-
have [iB [DiB [biBt sbiB]]] : exists i, D i /\ b i t /\ b i `<=` B.
529+
by split => //; [exact: sDAD|exact: bigcup_sup].
530+
have [iB [DiB biBt sbiB]] : exists i, [/\ D i, b i t & b i `<=` B].
529531
move: Bt; rewrite -BeUbB => - [i DBi bit]; exists i.
530-
by split; [apply: sDBD|split=> // ?; exists i].
532+
by split=> //; [exact: sDBD|exact: bigcup_sup].
531533
have [i [Di bit sbiAB]] := b_join DiA DiB biAt biBt.
532-
by exists i; split=> //; split=> // s /sbiAB [/sbiA ? /sbiB].
533-
set Dt := fun t => [set it | D it /\ b it t /\ b it `<=` A `&` B].
534+
by exists i; split=> // s /sbiAB [/sbiA ? /sbiB].
535+
set Dt := fun t => [set it | [/\ D it, b it t & b it `<=` A `&` B]].
534536
exists [set get (Dt t) | t in A `&` B].
535537
by move=> _ [t ABt <-]; have /ABU/getPex [] := ABt.
536538
rewrite predeqE => t; split=> [[_ [s ABs <-] bDtst]|ABt].
537-
by have /ABU/getPex [_ [_]] := ABs; apply.
538-
by exists (get (Dt t)); [exists t| have /ABU/getPex [? []]:= ABt].
539+
by have /ABU/getPex [_ _] := ABs; exact.
540+
by exists (get (Dt t)); [exists t| have /ABU/getPex [?]:= ABt].
539541
Qed.
540542

541-
Let open_from_bigU (I0 : Type) (f : I0 -> set T) :
542-
(forall i, open_from (f i)) -> open_from (\bigcup_i f i).
543+
Let openU_from_bigU (I0 : Type) (f : I0 -> set T) :
544+
(forall i, openU_from (f i)) -> openU_from (\bigcup_i f i).
543545
Proof.
544546
set fop := fun j => [set Dj | Dj `<=` D /\ f j = \bigcup_(i in Dj) b i].
545547
exists (\bigcup_j get (fop j)).
@@ -554,19 +556,22 @@ by move=> [i]; exists i => //; exists j.
554556
Qed.
555557

556558
HB.instance Definition _ := isOpenTopological.Build T
557-
open_fromT open_fromI open_from_bigU.
559+
openU_fromT openU_fromI openU_from_bigU.
558560

559561
HB.end.
560562

563+
#[deprecated(since="mathcomp-analysis 1.17.0", use=openU_from)]
564+
Notation open_from := openU_from (only parsing).
565+
561566
HB.factory Record isSubBaseTopological T & Choice T := {
562-
I : pointedType;
563-
D : set I;
564-
b : I -> (set T);
567+
I : pointedType ;
568+
D : set I ;
569+
b : I -> set T
565570
}.
566571

567572
HB.builders Context T & isSubBaseTopological T.
568573

569-
Local Notation finI_from := (finI_from D b).
574+
Local Notation finI_from := (open_finI_from D b).
570575

571576
Let finI_from_cover : \bigcup_(A in finI_from) A = setT.
572577
Proof.
@@ -829,25 +834,29 @@ Qed.
829834
Lemma closedU (T : topologicalType) : setU_closed (@closed T).
830835
Proof. by move=> E D; rewrite -?openC setCU; exact: openI. Qed.
831836

832-
Lemma closed_bigsetU (T : topologicalType) (I : eqType) (s : seq I)
837+
Lemma bigsetU_closed {T : topologicalType} {I : eqType} (s : seq I)
833838
(F : I -> set T) : (forall x, x \in s -> closed (F x)) ->
834839
closed (\big[setU/set0]_(x <- s) F x).
835840
Proof.
836841
move=> scF; rewrite big_seq.
837842
by elim/big_ind : _ => //; [exact: closed0|exact: closedU].
838843
Qed.
844+
#[deprecated(since="mathcomp-analysis 1.17.0", use=bigsetU_closed)]
845+
Notation closed_bigsetU := bigsetU_closed (only parsing).
839846

840-
Lemma closed_bigcup (T : topologicalType) (I : choiceType) (A : set I)
847+
Lemma bigcup_closed {T : topologicalType} {I : choiceType} (A : set I)
841848
(F : I -> set T) :
842849
finite_set A -> (forall i, A i -> closed (F i)) ->
843850
closed (\bigcup_(i in A) F i).
844851
Proof.
845-
move=> finA cF; rewrite -bigsetU_fset_set//; apply: closed_bigsetU => i.
852+
move=> finA cF; rewrite -bigsetU_fset_set//; apply: bigsetU_closed => i.
846853
by rewrite in_fset_set// inE; exact: cF.
847854
Qed.
855+
#[deprecated(since="mathcomp-analysis 1.17.0", use=bigcup_closed)]
856+
Notation closed_bigcup := bigcup_closed (only parsing).
848857

849858
Section closure_lemmas.
850-
Variable T : topologicalType.
859+
Context {T : topologicalType}.
851860
Implicit Types E A B U : set T.
852861

853862
Lemma closureS A B : A `<=` B -> closure A `<=` closure B.

0 commit comments

Comments
 (0)