Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding the sum topology #1368

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG_UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@
`locally_compact_completely_regular`, and
`completely_regular_regular`.

- in file `mathcomp_extra.v`,
+ new definition `sum_fun`.
- in file `sum_topology.v`,
+ new definition `sum_nbhs`.
+ new lemmas `sum_nbhsE`, `existT_continuous`, `existT_open_map`,
`existT_nbhs`, `sum_openP`, `sum_continuous`, `sum_setUE`, and
`sum_compact`.
- in file `separation_axioms.v`,
+ new lemma `sum_hausdorff`.


### Changed

- in file `normedtype.v`,
Expand Down
1 change: 1 addition & 0 deletions _CoqProject
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ theories/topology_theory/weak_topology.v
theories/topology_theory/num_topology.v
theories/topology_theory/quotient_topology.v
theories/topology_theory/one_point_compactification.v
theories/topology_theory/sum_topology.v

theories/separation_axioms.v
theories/function_spaces.v
Expand Down
8 changes: 7 additions & 1 deletion classical/mathcomp_extra.v
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ From mathcomp Require Import finset interval.
(* dfwith f x == fun j => x if j = i, and f j otherwise *)
(* given x : T i *)
(* swap x := (x.2, x.1) *)
(* map_pair f x := (f x.1, f x.2) *)
(* map_pair f x := (f x.1, f x.2) *)
(* monotonous A f := {in A &, {mono f : x y / x <= y}} \/ *)
(* {in A &, {mono f : x y /~ x <= y}} *)
(* sum_fun f := lifts a family of functions f into a function on *)
(* the dependent sum *)
(* ``` *)
(* *)
(******************************************************************************)
Expand Down Expand Up @@ -509,3 +511,7 @@ Proof.
move=> fge x xab; have leab : (a <= b)%O by rewrite (itvP xab).
by rewrite in_itv/= !fge ?(itvP xab).
Qed.

Definition sum_fun {I : Type} {X : I -> Type} {T : Type}
(f : forall i, X i -> T) (x : {i & X i}) : T :=
(f (projT1 x) (projT2 x)).
1 change: 1 addition & 0 deletions theories/Make
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ topology_theory/weak_topology.v
topology_theory/num_topology.v
topology_theory/quotient_topology.v
topology_theory/one_point_compactification.v
topology_theory/sum_topology.v

ereal.v
separation_axioms.v
Expand Down
20 changes: 20 additions & 0 deletions theories/separation_axioms.v
Original file line number Diff line number Diff line change
Expand Up @@ -1125,3 +1125,23 @@ by move=> y [] ? [->] -> /eqP.
Qed.

End perfect_sets.

Section sum_separations.
Context {I : choiceType} {X : I -> topologicalType}.

Lemma sum_hausdorff :
(forall i, hausdorff_space (X i)) -> hausdorff_space {i & X i}.
Proof.
move=> hX [i x] [j y]; rewrite/cluster /= /nbhs /= 2!sum_nbhsE /= => cl.
have [] := cl (existT X i @` [set: X i]) (existT X j @` [set: X j]);
[by apply: existT_nbhs; exact: filterT..|].
move=> p [/= [_ _ <-] [_ _ [ji]]] _.
rewrite {}ji {j} in x y cl *.
congr existT; apply: hX => U V Ux Vy.
have [] := cl (existT X i @` U) (existT X i @` V); [exact: existT_nbhs..|].
move=> z [] [l Ul <-] [r Vr lr]; exists l; split => //.
rewrite (Eqdep_dec.inj_pair2_eq_dec _ _ _ _ _ _ lr)// in Vr.
by move=> a b; exact: pselect.
Qed.

End sum_separations.
87 changes: 87 additions & 0 deletions theories/topology_theory/sum_topology.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
(* mathcomp analysis (c) 2017 Inria and AIST. License: CeCILL-C. *)
From HB Require Import structures.
From mathcomp Require Import all_ssreflect all_algebra all_classical.
From mathcomp Require Import topology_structure compact subspace_topology.

(**md**************************************************************************)
(* # Sum topology *)
(* This file equips the dependent sum {i & X i} with its standard topology *)
(* *)
(* ``` *)
(* sum_nbhs x == the neighborhoods of the standard topology on the *)
(* dependent sum type {i & X i} *)
(* ``` *)
(******************************************************************************)

Local Open Scope classical_set_scope.
Local Open Scope ring_scope.

Section sum_topology.
Context {I : choiceType} {X : I -> topologicalType}.

Definition sum_nbhs (x : {i & X i}) : set_system {i & X i} :=
existT _ _ @ nbhs (projT2 x).

Lemma sum_nbhsE (i : I) (x : X i) :
sum_nbhs (existT _ i x) = (existT _ _) @ (nbhs x).
Proof. by done. Qed.

HB.instance Definition _ := hasNbhs.Build {i & X i} sum_nbhs.

Local Lemma sum_nbhs_proper x : ProperFilter (sum_nbhs x).
Proof. by case: x => i xi; exact: fmap_proper_filter. Qed.

Local Lemma sum_nbhs_singleton x A : sum_nbhs x A -> A x.
Proof. by case: x => ? ? /=; exact: nbhs_singleton. Qed.

Local Lemma sum_nbhs_nbhs x A: sum_nbhs x A -> sum_nbhs x (sum_nbhs^~ A).
Proof.
case: x => i Xi /=.
rewrite sum_nbhsE /= nbhsE /= => -[W [oW Wz WlA]].
by exists W => // x /= Wx; exact/(filterS WlA)/open_nbhs_nbhs.
Qed.

HB.instance Definition _ := Nbhs_isNbhsTopological.Build {i & X i}
sum_nbhs_proper sum_nbhs_singleton sum_nbhs_nbhs.

Lemma existT_continuous (i : I) : continuous (existT X i).
Proof. by move=> ? ?. Qed.

Lemma existT_open_map (i : I) (A : set (X i)) : open A -> open (existT X i @` A).
Proof.
move=> oA; rewrite openE /interior /= => iXi [x Ax <-].
rewrite /nbhs /= sum_nbhsE /= nbhs_simpl /=.
move: oA; rewrite openE => /(_ _ Ax); apply: filterS.
by move=> z Az; exists z.
Qed.

Lemma existT_nbhs (i : I) (x : X i) (U : set (X i)) :
nbhs x U -> nbhs (existT _ i x) (existT _ i @` U).
Proof. exact/filterS/preimage_image. Qed.

Lemma sum_openP (U : set {i & X i}) :
open U <-> forall i, open (existT _ i @^-1` U).
Proof.
split=> [oU i|?]; first by apply: open_comp=> // y _; exact: existT_continuous.
rewrite openE => -[i x Uxi].
by rewrite /interior /nbhs/= sum_nbhsE; exact: open_nbhs_nbhs.
Qed.

Lemma sum_continuous {Z : topologicalType} (f : forall i, X i -> Z) :
(forall i, continuous (f i)) -> continuous (sum_fun f).
Proof. by move=> ctsf [] i x U nU; apply: existT_continuous; exact: ctsf. Qed.

Lemma sum_setUE : [set: {i & X i}] = \bigcup_i (existT _ i @` [set: X i]).
Proof. by rewrite eqEsubset; split => [[i x] _|[]//]; exists i. Qed.

Lemma sum_compact : finite_set [set: I] -> (forall i, compact [set: X i]) ->
compact [set: {i & X i}].
Proof.
move=> fsetI cptX; rewrite sum_setUE -fsbig_setU//.
apply: big_rec; first exact: compact0.
move=> i ? _ cptx; apply: compactU => //.
apply: continuous_compact; last exact: cptX.
exact/continuous_subspaceT/existT_continuous.
Qed.

End sum_topology.
1 change: 1 addition & 0 deletions theories/topology_theory/topology.v
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ From mathcomp Require Export topology_structure.
From mathcomp Require Export uniform_structure.
From mathcomp Require Export weak_topology.
From mathcomp Require Export one_point_compactification.
From mathcomp Require Export sum_topology.