Module mathcomp.analysis.topology_theory.subspace_topology
From HB Require Import structures.From mathcomp Require Import boot order algebra all_classical.
#[warning="-warn-library-file-internal-analysis"]
From mathcomp Require Import unstable.
From mathcomp Require Import topology_structure uniform_structure compact.
From mathcomp Require Import pseudometric_structure connected initial_topology.
From mathcomp Require Import product_topology.
Reserved Notation "{ 'within' A , 'continuous' f }"
(format "{ 'within' A , 'continuous' f }").
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Local Open Scope classical_set_scope.
Local Open Scope ring_scope.
Definition subspace
Used by
- mathcomp.analysis.real_measure.measurable_realfun
- mathcomp.analysis.realfun
- mathcomp.analysis.borel_hierarchy
- mathcomp.analysis.topology_theory.subtype_topology
- mathcomp.analysis.topology_theory.function_spaces
- mathcomp.analysis.topology_theory.separation_axioms
- mathcomp.analysis.homotopy_theory.wedge_sigT
- mathcomp.analysis.normedtype_theory.normed_module
Source code {TSource code : Type} (ASource code : set T) := T.
Arguments subspace {T} _ : simpl never.
Definition incl_subspace
Source code {TSource code ASource code} (xSource code : subspace A) : T := x.
Section Subspace.
Context {TSource code : topologicalType} (ASource code : set T).
Definition nbhs_subspace
Used by
- mathcomp.analysis.normedtype_theory.normed_module
Source code (xSource code : subspace A) : set_system (subspace A) :=
if x \in A then within A (nbhs x) else globally [set x].
Variant nbhs_subspace_specSource code xSource code : Prop -> Prop -> bool -> set_system T -> Type :=
| WithinSubspaceSource code :
A x -> nbhs_subspace_spec x True False true (within A (nbhs x))
| WithoutSubspaceSource code :
~ A x -> nbhs_subspace_spec x False True false (globally [set x]).
Lemma nbhs_subspaceP_subproofSource code xSource code :
nbhs_subspace_spec x (A x) (~ A x) (x \in A) (nbhs_subspace x).
Proof.
Lemma nbhs_subspace_inUsed by
- mathcomp.analysis.topology_theory.subtype_topology
- mathcomp.analysis.normedtype_theory.num_normedtype
Source code (xSource code : T) : A x -> within A (nbhs x) = nbhs_subspace x.
Proof.
Lemma nbhs_subspace_outSource code (xSource code : T) : ~ A x -> globally [set x] = nbhs_subspace x.
Proof.
Lemma nbhs_subspace_filterSource code (xSource code : subspace A) : ProperFilter (nbhs_subspace x).
Proof.
by apply: within_nbhs_proper; apply: subset_closure.
Qed.
HBSource code.instanceSource code DefinitionSource code _Source code :=Source code ChoiceSource code.copy (subspace A) _.
HBSource code.instanceSource code DefinitionSource code _Source code :=Source code hasNbhsSource code.Build (subspace A) nbhs_subspace.
Lemma nbhs_subspacePSource code (xSource code : subspace A) :
nbhs_subspace_spec x (A x) (~ A x) (x \in A) (nbhs x).
Proof.
Lemma nbhs_subspace_singletonSource code (pSource code : subspace A) BSource code : nbhs p B -> B p.
Proof.
Lemma nbhs_subspace_nbhsSource code (pSource code : subspace A) BSource code : nbhs p B -> nbhs p (nbhs^~ B).
Proof.
by move=> /nbhs_interior; apply: filterS => y A0y Ay; case: nbhs_subspaceP.
by move=> E x ->; case: nbhs_subspaceP.
Qed.
HBSource code.instanceSource code DefinitionSource code _Source code :=Source code Nbhs_isNbhsTopologicalSource code.Build (subspace A)
nbhs_subspace_filter nbhs_subspace_singleton nbhs_subspace_nbhs.
Lemma subspace_cvgPSource code (FSource code : set_system T) (xSource code : T) : Filter F -> A x ->
(F --> (x : subspace A)) <-> (F --> within A (nbhs x)).
Proof.
Lemma subspace_continuousPUsed by
- mathcomp.analysis.realfun
- mathcomp.analysis.ftc
- mathcomp.analysis.normedtype_theory.matrix_normedtype
- mathcomp.analysis.normedtype_theory.num_normedtype
Source code {SSource code : topologicalType} (fSource code : T -> S) :
continuous (f : subspace A -> S) <->
(forall xSource code, A x -> f @ within A (nbhs x) --> f x) .
Proof.
by rewrite nbhs_simpl //= nbhs_subspace_in //=; apply: ctsf.
rewrite /continuous_at; case: _ / (nbhs_subspaceP x) => Ax.
exact: (cvg_trans _ (wA _ Ax)).
by move=> ? /nbhs_singleton //= ?; rewrite nbhs_simpl => ? ->.
Qed.
Lemma subspace_eq_continuousUsed by
- mathcomp.analysis.topology_theory.function_spaces
- mathcomp.analysis.lebesgue_integral_theory.measurable_fun_approximation
Source code {SSource code : topologicalType} (fSource code gSource code : subspace A -> S) :
{in A, f =1 g} -> continuous f -> continuous g.
Proof.
by apply: cvg_trans _ (L x Ax); apply: fmap_within_eq=> ? ?; rewrite feq.
Qed.
Lemma continuous_subspace_inUsed by
- mathcomp.analysis.realfun
- mathcomp.analysis.topology_theory.subtype_topology
- mathcomp.analysis.derive
Source code {USource code : topologicalType} (fSource code : subspace A -> U) :
continuous f = {in A, continuous f}.
Proof.
by move=> Q x Ax; case: (nbhs_subspaceP x) => //=; exact: Q.
by move=> + x Ax => /(_ x Ax); case: (nbhs_subspaceP x) => //=; exact: Q.
Qed.
Lemma nbhs_subspace_interiorSource code (xSource code : T) :
A° x -> nbhs x = (nbhs (x : subspace A)).
Proof.
Lemma nbhs_subspace_exUsed by
- mathcomp.analysis.homotopy_theory.wedge_sigT
Source code (USource code : set T) (xSource code : T) : A x ->
nbhs (x : subspace A) U <->
exists2 VSource code, nbhs (x : T) V & U `&` A = V `&` A.
Proof.
Lemma incl_subspace_continuousSource code : continuous incl_subspace.
Proof.
Section SubspaceOpen.
Lemma open_subspace1outSource code (xSource code : subspace A) : ~ A x -> open [set x].
Proof.
Lemma open_subspace_outSource code (USource code : set (subspace A)) : U `<=` ~` A -> open U.
Proof.
by apply: bigcup_open => ? ?; apply: open_subspace1out; exact: Usub.
Qed.
Lemma open_subspaceTUsed by
- mathcomp.analysis.topology_theory.function_spaces
Source code : open (A : set (subspace A)).
Proof.
Lemma open_subspaceITSource code (USource code : set (subspace A)) : open (U `&` A) = open U.
Proof.
Lemma open_subspaceTISource code (USource code : set (subspace A)) :
open (A `&` U : set (subspace A)) = open U.
Proof.
Lemma closed_subspaceTSource code : closed (A : set (subspace A)).
Proof.
Lemma open_subspacePUsed by
- mathcomp.analysis.real_measure.measurable_realfun
- mathcomp.analysis.topology_theory.function_spaces
Source code (USource code : set T) :
open (U : set (subspace A)) <->
exists2 VSource code, open (V : set T) & V `&` A = U `&` A.
Proof.
case=> V oV UV; rewrite -open_subspaceIT -UV.
move=> x //= []; case: nbhs_subspaceP; rewrite //= withinE.
move=> Ax Vx _; exists V; last by rewrite -setIA setIid.
by move: oV; rewrite openE /interior; exact.
rewrite -open_subspaceIT => oUA.
have oxF (xSource code : T) : (U `&` A) x ->
exists2 VSource code, open_nbhs (x : T) V & V `&` A `<=` U `&` A.
move=> /[dup] UAx /= [Ux Ax].
have := oUA _ UAx; case: nbhs_subspaceP => // _.
rewrite withinE /= => -[V nbhsV]; rewrite -setIA setIid => UV.
exists V°; first rewrite open_nbhsE; first split => //.
- exact: open_interior.
- exact: nbhs_interior.
- by rewrite UV => t [/interior_subset].
pose f (xSource code : T) :=
if pselect ((U `&` A) x) is left e then projT1 (cid2 (oxF x e)) else set0.
set V := \bigcup_(xSource code in U `&` A) f x; exists V.
apply: bigcup_open => i UAi; rewrite /f; case: pselect => // ?; case: cid2.
by move=> //= W; rewrite open_nbhsE => -[].
rewrite eqEsubset /V /f; split.
move=> t [[u]] UAu /=; case: pselect => //= ?.
by case: cid2 => //= W _ + ? ? ; apply; exact.
move=> t UAt; split => //; last by case: UAt.
exists t => //; case: pselect => //= [[? ?]].
by case: cid2 => //= W [].
Qed.
Lemma closed_subspacePSource code (USource code : set T) :
closed (U : set (subspace A)) <->
exists2 VSource code, closed (V : set T) & V `&` A = U `&` A.
Proof.
Lemma open_subspaceWUsed by
- mathcomp.analysis.topology_theory.function_spaces
- mathcomp.analysis.topology_theory.separation_axioms
Source code (USource code : set T) :
open (U : set T) -> open (U : set (subspace A)).
Proof.
Lemma closed_subspaceWSource code (USource code : set T) :
closed (U : set T) -> closed (U : set (subspace A)).
Proof.
Lemma open_setISSource code (USource code : set (subspace A)) : open A ->
open (U `&` A : set T) = open U.
Proof.
Lemma open_setSIUsed by
- mathcomp.analysis.borel_hierarchy
Source code (USource code : set (subspace A)) : open A -> open (A `&` U) = open U.
Proof.
Lemma closed_setISSource code (USource code : set (subspace A)) : closed A ->
closed (U `&` A : set T) = closed U.
Proof.
Lemma closed_setSIUsed by
- mathcomp.analysis.numfun
Source code (USource code : set (subspace A)) :
closed A -> closed (A `&` U) = closed U.
Proof.
Lemma closure_subspaceWSource code (USource code : set T) :
U `<=` A -> closure (U : set (subspace A)) = closure (U : set T) `&` A.
Proof.
move=> [V clV VAclUA] /[dup] /(@closureS (subspace _)).
have /closure_id <- := closed_subspaceT => /setIidr <-; rewrite setIC.
move=> UsubA; rewrite eqEsubset; split.
apply: setSI; rewrite closureE.
apply: smallest_sub (@subset_closure _ U).
by apply: closed_subspaceW; exact: closed_closure.
rewrite -VAclUA; apply: setSI; rewrite closureE //=.
apply: smallest_sub => //; apply: subset_trans (@subIsetl _ V A).
rewrite VAclUA subsetI; split => //.
exact: (@subset_closure _ (U : set (subspace A))).
Qed.
End SubspaceOpen.
Lemma compact_subspaceIPSource code (USource code : set T) :
compact (U `&` A : set (subspace A)) <-> compact (U `&` A : set T).
Proof.
split=> + F UF FUA => /(_ F UF FUA) [x] [[Ux Ax] Fp].
exists x; split=> //; move/subspace_cvgP: Fp => /(_ Ax) Fx.
by apply: cvg_trans; [exact: Fx | exact: cvg_within].
exists x; split=> //; apply/subspace_cvgP => //.
rewrite withinE => W/= -[V nbhsV WV]; apply: filterS (V `&` (U `&` A)) _ _ _.
by rewrite setIC -setIA [A `&` _]setIC -WV=>?[]?[].
by apply: filterI; rewrite nbhs_simpl //; exact: Fp.
Qed.
Lemma clopen_connectedPSource code : connected A <->
(forall USource code, @clopen (subspace A) U ->
U `<=` A -> U !=set0 -> U = A).
Proof.
move=> + U [/open_subspaceP oU /closed_subspaceP cU] UA U0; apply => //.
- case: oU => V oV VAUA; exists V; rewrite // setIC VAUA.
exact/esym/setIidPl.
- case: cU => V cV VAUA; exists V; rewrite // setIC VAUA.
exact/esym/setIidPl.
move=> clpnA U Un0 [V oV UVA] [W cW UWA]; apply: clpnA => //; first split.
- by apply/open_subspaceP; exists V; rewrite // setIC UVA setIAC setIid.
- by apply/closed_subspaceP; exists W; rewrite // setIC UWA setIAC setIid.
- by rewrite UWA; exact: subIsetl.
Qed.
End Subspace.
HBSource code.instanceSource code DefinitionSource code _Source code {TSource code :Source code ptopologicalType}Source code (A : set T) :=
isPointed.Build (subspace A) point.
Global Instance subspace_filterSource code {TSource code : topologicalType}
(ASource code : set T) (xSource code : subspace A) :
Filter (nbhs_subspace x) := nbhs_subspace_filter x.
Global Instance subspace_proper_filterSource code {TSource code : topologicalType}
(ASource code : set T) (xSource code : subspace A) :
ProperFilter (nbhs_subspace x) := nbhs_subspace_filter x.
Definition from_subspace
subspace : forall {T : Type}, set T -> Type subspace is not universe polymorphic Arguments subspace {T}%_type_scope A%_classical_set_scope : simpl never The reduction tactics never unfold subspace subspace is transparent Expands to: Constant mathcomp.analysis.topology_theory.subspace_topology.subspace Declared in library mathcomp.analysis.topology_theory.subspace_topology, line 49, characters 11-19
Used by
- mathcomp.analysis.lebesgue_integral_theory.measurable_fun_approximation
Source code {TSource code USource code : Type} (ASource code : set T) (fSource code : T -> U)
: subspace A -> U := f.
Arguments from_subspace {T U} A f.
Notation "{ 'within' A , 'continuous' f }"Source code :=
(continuous (from_subspace A f)) : classical_set_scope.
Arguments nbhs_subspaceP {T} A x.
Section SubspaceRelative.
Context {TSource code : topologicalType}.
Implicit Types (U : topologicalType) (A B : set T).
Lemma nbhs_subspace_subsetSource code ASource code BSource code (xSource code : T) :
A `<=` B -> nbhs (x : subspace B) `<=` nbhs (x : subspace A).
Proof.
- by move=> ? ?; apply: within_subset => //=; exact: (nbhs_filter x).
- by move=> ? /AB.
- by move=> Bx ? W /nbhs_singleton /(_ Bx) ? ? ->.
- by move=> ? ?.
Qed.
Lemma continuous_subspaceWUsed by
- mathcomp.analysis.probability_theory.exponential_distribution
- mathcomp.analysis.realfun
- mathcomp.analysis.ftc
- mathcomp.analysis.topology_theory.function_spaces
- mathcomp.analysis.derive
- mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_under
- mathcomp.analysis.lebesgue_integral_theory.measurable_fun_approximation
- mathcomp.analysis.normedtype_theory.num_normedtype
Source code {USource code} ASource code BSource code (fSource code : T -> U) :
A `<=` B ->
{within B, continuous f} -> {within A, continuous f}.
Proof.
Lemma nbhs_subspaceTSource code (xSource code : T) : nbhs (x : subspace setT) = nbhs x.
Proof.
Lemma continuous_subspaceT_forSource code {USource code} ASource code (fSource code : T -> U) (xSource code : T) :
A x -> {for x, continuous f} -> {for x, continuous (f : subspace A -> U)}.
Proof.
have [_|//] := nbhs_subspaceP A x.
by apply: (cvg_trans _ ctsf); apply: cvg_fmap2; exact: cvg_within.
Qed.
Lemma continuous_in_subspaceTUsed by
- mathcomp.analysis.probability_theory.beta_distribution
- mathcomp.analysis.realfun
- mathcomp.analysis.ftc
- mathcomp.analysis.gauss_integral
- mathcomp.analysis.elementary_functions.trigonometry_functions
- mathcomp.analysis.elementary_functions.trigonometry_integral
- mathcomp.analysis.derive
- mathcomp.analysis.normedtype_theory.normed_module
Source code {USource code} ASource code (fSource code : T -> U) :
{in A, continuous f} -> {within A, continuous f}.
Proof.
by apply: continuous_subspaceT_for => //=; exact: ctsf.
Qed.
Lemma continuous_subspaceTUsed by
- mathcomp.analysis.probability_theory.beta_distribution
- mathcomp.analysis.probability_theory.normal_distribution
- mathcomp.analysis.realfun
- mathcomp.analysis.cantor
- mathcomp.analysis.ftc
- mathcomp.analysis.pi_irrational
- mathcomp.analysis.gauss_integral
- mathcomp.analysis.elementary_functions.trigonometry_functions
- mathcomp.analysis.topology_theory.subtype_topology
- mathcomp.analysis.topology_theory.function_spaces
- mathcomp.analysis.topology_theory.sigT_topology
- mathcomp.analysis.homotopy_theory.wedge_sigT
- mathcomp.analysis.derive
- mathcomp.analysis.numfun
- mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_differentiation
- mathcomp.analysis.normedtype_theory.normed_module
- mathcomp.analysis.exp
Source code {USource code} ASource code (fSource code : T -> U) :
continuous f -> {within A, continuous f}.
Proof.
Lemma cst_within_continuousUsed by
- mathcomp.analysis.pi_irrational
- mathcomp.analysis.gauss_integral
- mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_differentiation
Source code {USource code} ASource code uSource code : {within A, continuous (@cst T U u)}.
Proof.
Lemma continuous_open_subspaceUsed by
- mathcomp.analysis.probability_theory.normal_distribution
- mathcomp.analysis.real_measure.measurable_realfun
- mathcomp.analysis.realfun
- mathcomp.analysis.ftc
- mathcomp.analysis.derive
- mathcomp.analysis.normedtype_theory.num_normedtype
Source code {USource code} ASource code (fSource code : T -> U) :
open A -> {within A, continuous f} = {in A, continuous f}.
Proof.
by split => + x /[dup] Ax /oA Aox => /(_ _ Ax);
rewrite /continuous_at -(nbhs_subspace_interior Aox).
Qed.
Lemma continuous_inPSource code {USource code} ASource code (fSource code : T -> U) : open A ->
{in A, continuous f} <-> open `<=` image_set_system A f open.
Proof.
by under eq_forall do rewrite -open_setSI//.
Qed.
Lemma withinU_continuousUsed by
- mathcomp.analysis.probability_theory.normal_distribution
- mathcomp.analysis.lebesgue_integral_theory.measurable_fun_approximation
Source code {USource code} ASource code BSource code (fSource code : T -> U) : closed A -> closed B ->
{within A, continuous f} -> {within B, continuous f} ->
{within A `|` B, continuous f}.
Proof.
case/continuous_closedP/(_ _ oW)/closed_subspaceP: ctsA => V1 cV1 V1W.
case/continuous_closedP/(_ _ oW)/closed_subspaceP: ctsB => V2 cV2 V2W.
apply/closed_subspaceP; exists ((V1 `&` A) `|` (V2 `&` B)).
by apply: closedU; exact: closedI.
rewrite [RHS]setIUr -V2W -V1W eqEsubset; split=> t.
by case=> [[][]] ? ? [] ?; [left | left | right | right].
by case=> [][] ? ?; split=> []; [left | left | right | right].
Qed.
Lemma subspaceT_continuousUsed by
- mathcomp.analysis.realfun
- mathcomp.analysis.topology_theory.subtype_topology
Source code {USource code} ASource code (BSource code : set U) (fSource code : {fun A >-> B}) :
{within A, continuous f} -> continuous (f : subspace A -> subspace B).
Proof.
rewrite -open_subspaceIT; apply/open_subspaceP.
case/open_subspaceP: (ctsf _ oV) => W oW fVA; exists W => //.
rewrite fVA -setIA setIid eqEsubset; split => x [fVx Ax]; split => //.
- by have /[!VBOB]-[] : (V `&` B) (f x) by split => //; exact: funS.
- by have /[!esym VBOB]-[] : (O `&` B) (f x) by split => //; exact: funS.
Qed.
Lemma continuous_subspace0Used by
- mathcomp.analysis.lebesgue_integral_theory.measurable_fun_approximation
- mathcomp.analysis.normedtype_theory.normed_module
Source code {USource code} (fSource code : T -> U) : {within set0, continuous f}.
Proof.
Lemma continuous_subspace1Used by
- mathcomp.analysis.realfun
- mathcomp.analysis.ftc
- mathcomp.analysis.normedtype_theory.normed_module
Source code {USource code} (aSource code : T) (fSource code : T -> U) :
{within [set a], continuous f}.
Proof.
case: (nbhs_subspaceP [set a] x); last by move=> _ /nbhs_singleton /= ? ? ->.
by move=> -> /nbhs_singleton ?; apply: nearW => ? ->.
Qed.
End SubspaceRelative.
Section SubspaceUniform.
Local Open Scope relation_scope.
Context {XSource code : uniformType} (ASource code : set X).
Definition subspace_ent
incl_subspace : forall {T : Type} {A : set T}, subspace A -> T incl_subspace is not universe polymorphic Arguments incl_subspace {T}%_type_scope {A}%_classical_set_scope x incl_subspace is transparent Expands to: Constant mathcomp.analysis.topology_theory.subspace_topology.incl_subspace Declared in library mathcomp.analysis.topology_theory.subspace_topology, line 52, characters 11-24
Source code :=
filter_from (@entourage X)
(fun ESource code => [set xySource code | (xy.1 = xy.2) \/ (A xy.1 /\ A xy.2 /\ E xy)]).
Let Filter_subspace_entSource code : Filter subspace_ent.
Proof.
move=> P Q entP entQ; exists (P `&` Q); first exact: filterI.
move=> [x y] /=; case; first (by move=> ->; split=> /=; left).
by move=> [Ax [Ay [Pxy Qxy]]]; split=> /=; right.
Qed.
Let subspace_uniform_entourage_diagonalSource code (BSource code : set (subspace A * subspace A)) :
subspace_ent B -> diagonal `<=` B.
Proof.
Let subspace_uniform_entourage_invSource code (BSource code : set (subspace A * subspace A)) :
subspace_ent B -> subspace_ent B^-1.
Proof.
move=> [x y] /= G; apply: Vsub; case: G; first by (move=> <-; left).
by move=> [? [? Vxy]]; right; repeat split.
Qed.
Let subspace_uniform_entourage_split_exSource code (CSource code : set (subspace A * subspace A)) :
subspace_ent C -> exists2 BSource code, subspace_ent B & B \; B `<=` C.
Proof.
exists [set xySource code | xy.1 = xy.2 \/ A xy.1 /\ A xy.2 /\ split_ent E xy].
by exists (split_ent E).
move=> [x y] [z /= Ez zE] /=; case: Ez; case: zE.
- by move=> -> ->; apply: Esub; left.
- move=> [ ? []] ? G xy; subst; apply: Esub; right; repeat split => //=.
by apply: entourage_split => //=; first exact: G; exact: entourage_refl.
- move=> -> [ ? []] ? G; apply: Esub; right; repeat split => //=.
by apply: entourage_split => //=; first exact: G; exact: entourage_refl.
- move=> []? []? ?[]?[]??; apply: Esub; right; repeat split => //=.
by apply: subset_split_ent => //; exists z.
Qed.
Let subspace_uniform_nbhsESource code : @nbhs _ (subspace A) = nbhs_ subspace_ent.
Proof.
have entEA : subspace_ent EA.
exists setT; first exact: filterT.
by move=> [??] /= [ ->|[?] [?]];[left|right].
rewrite funeq2E=> x U.
case: (@nbhs_subspaceP X A x); rewrite propeqE; split => //=.
- rewrite withinE; case=> V /[dup] nbhsV => [/nbhsP [E entE Esub] UV].
exists [set xySource code | xy.1 = xy.2 \/ A xy.1 /\ A xy.2 /\ E xy].
by exists E => //= [[? ?]] /= [->| [? []]//]; exact: entourage_refl.
move=> y /= /xsectionP/= -[<-{y}|].
suff : (U `&` A) x by case.
by rewrite UV; split => //; exact: (@nbhs_singleton X).
case=> _ [Ay Ey]; suff : (U `&` A) y by case.
by rewrite UV; split => //; exact/Esub/xsectionP.
- move=> [] W [E eentE subW] subU //=.
near=> w; apply/subU/xsectionP/subW; right; repeat split => //=.
exact: (near (withinT _ (@nbhs_filter X _))).
by near: w; apply/nbhsP; exists E => // y /xsectionP.
- move=> //= Ux; exists EA => //.
by move=> y /xsectionP => -[|[]] //= <-; exact: Ux.
- rewrite //= => [[W [W' entW' subW] subU]] ? ->.
by apply/subU/xsectionP/subW; left.
Unshelve. all: by end_near. Qed.
HBSource code.instanceSource code DefinitionSource code _Source code :=Source code Nbhs_isUniform_mixinSource code.Build (subspace A)
Filter_subspace_ent subspace_uniform_entourage_diagonal
subspace_uniform_entourage_inv subspace_uniform_entourage_split_ex
subspace_uniform_nbhsE.
End SubspaceUniform.
Section SubspacePseudoMetric.
Context {RSource code : numDomainType} {XSource code : pseudoMetricType R} (ASource code : set X).
Implicit Type e : R.
Definition subspace_ball
nbhs_subspace : forall {T : topologicalType} [A : set T], subspace A -> set_system (subspace A) nbhs_subspace is not universe polymorphic Arguments nbhs_subspace {T} [A]%_classical_set_scope x _ nbhs_subspace is transparent Expands to: Constant mathcomp.analysis.topology_theory.subspace_topology.nbhs_subspace Declared in library mathcomp.analysis.topology_theory.subspace_topology, line 56, characters 11-24
Source code (xSource code : subspace A) (rSource code : R) :=
if x \in A then A `&` ball (x : X) r else [set x].
Let subspace_pm_ball_centerSource code xSource code eSource code : 0 < e -> subspace_ball x e x.
Proof.
Let subspace_pm_ball_symSource code xSource code ySource code eSource code : subspace_ball x e y -> subspace_ball y e x.
Proof.
Let subspace_pm_ball_triangleSource code xSource code ySource code zSource code e1Source code e2Source code :
subspace_ball x e1 y -> subspace_ball y e2 z -> subspace_ball x (e1 + e2) z.
Proof.
- by move=>?? [??] [??]; split => //=; apply: ball_triangle; eauto.
- by move=> ?? [??] ->.
- by move=> + /[swap] => /[swap] => ->.
- by move=> _ _ -> ->.
Qed.
Let subspace_pm_entourageESource code : @entourage (subspace A) = entourage_ subspace_ball.
Proof.
move=> U [W + subU]; rewrite -entourage_ballE => [[eps] nneg subW].
exists eps => //; apply: (subset_trans _ subU).
move=> [x y] /=; case: ifP => /asboolP ?.
by move=> [Ay xBy]; right; repeat split => //; exact: subW.
by move=> ->; left.
move=> E [eps nneg subE]; exists [set xySource code | ball (xy.1 : X) eps xy.2].
by rewrite -entourage_ballE; exists eps.
move=> [x y] /= [->|[]Ax []Ay xBy]; apply: subE => //=.
by case: ifP => /asboolP; split => //; exact: ballxx.
by case: ifP => /asboolP.
Qed.
HBSource code.instanceSource code DefinitionSource code _Source code :=Source code
@Uniform_isPseudoMetricSource code.Build R (subspace A) subspace_ball
subspace_pm_ball_center subspace_pm_ball_sym subspace_pm_ball_triangle
subspace_pm_entourageE.
Lemma ball_subspace_ballSource code (xSource code : subspace A) rSource code (ySource code : subspace A) :
ball x r y = subspace_ball x r y.
Proof.
End SubspacePseudoMetric.
Section SubspaceInitial.
Context {TSource code : topologicalType} {USource code : choiceType} (fSource code : U -> T).
Lemma initial_subspace_openSource code (ASource code : set (initial_topology f)) :
open A -> open (f @` A : set (subspace (range f))).
Proof.
split => z [] /[swap]; first by case=> w _ <- ?; split; exists w.
by case=> w _ <- [v] ? <-.
Qed.
End SubspaceInitial.
Lemma continuous_compactUsed by
- mathcomp.analysis.cantor
- mathcomp.analysis.topology_theory.function_spaces
- mathcomp.analysis.topology_theory.sigT_topology
- mathcomp.analysis.homotopy_theory.wedge_sigT
- mathcomp.analysis.derive
- mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_differentiation
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
- mathcomp.analysis.normedtype_theory.normed_module
Source code {TSource code USource code : topologicalType} (fSource code : T -> U) ASource code :
{within A, continuous f} -> compact A -> compact (f @` A).
Proof.
have GF : ProperFilter G.
apply: (filter_from_proper (filter_from_filter _ _)).
- by exists (f @` A).
- by move=> C1 C2 F1 F2; exists (C1 `&` C2); [exact: filterI|move=> ? [? []]].
- by move=> C /(filterI FfA) /filter_ex [_ [[p ? <-]]]; exists p.
move: Aco; rewrite -[A]setIid => /compact_subspaceIP; rewrite setIid.
case /(_ G); first by exists (f @` A) => // ? [].
move=> /= p [Ap clsGp]; exists (f p); split; first exact/imageP.
move=> B C FB /fcont p_Cf.
have : image_set_system A f G B by exists B.
by move=> /clsGp /(_ p_Cf) [q [[]]]; exists (f q).
Qed.
Lemma connected_continuous_connectedUsed by
- mathcomp.analysis.topology_theory.function_spaces
- mathcomp.analysis.homotopy_theory.wedge_sigT
- mathcomp.analysis.normedtype_theory.normed_module
Source code {TSource code USource code : topologicalType}
(ASource code : set T) (fSource code : T -> U) :
connected A -> {within A, continuous f} -> connected (f @` A).
Proof.
set AfE := fun bSource code => (A `&` f @^-1` E b) : set (subspace A).
suff sAfE : separated (AfE false) (AfE true).
move: cA; apply/connectedPn; exists AfE; split; last (rewrite /AfE; split).
- move=> b; case: (E0 b) => /= u Ebu.
have [t Et ftu] : (f @` A) u by rewrite fAE; case: b Ebu; [right|left].
by exists t; split => //=; rewrite /preimage ftu.
- by rewrite -setIUr -preimage_setU -fAE; exact/esym/setIidPl/preimage_image.
+ rewrite -{2}(setIid A) ?setIA -(@closure_subspaceW _ A); first by move=> ?[].
by rewrite -/(AfE false) -setIA -/(AfE true); case: sAfE.
+ rewrite -{1}(setIid A) setIC ?setIA -(@closure_subspaceW _ A) => [? []//|].
by rewrite -/(AfE true) -setIA -/(AfE false) setIC; case: sAfE.
suff cI0 b : closure (AfE b) `&` AfE (~~ b) = set0.
by rewrite /separated cI0 setIC cI0.
have [fAfE cEIE] :
f @` AfE (~~ b) = E (~~ b) /\ closure (E b) `&` E (~~ b) = set0.
split; last by case: sE => ? ?; case: b => //; rewrite setIC.
rewrite eqEsubset; split => [|u Ebu].
apply: (subset_trans sub_image_setI).
by apply: subIset; right; exact: image_preimage_subset.
have [t [At ftu]] : exists tSource code, A t /\ f t = u.
suff [t At ftu] : (f @` A) u by exists t.
by rewrite fAE; case: b Ebu; [left|right].
by exists t => //; split => //=; rewrite /preimage ftu.
have ? : f @` closure (AfE b) `<=` closure (E b).
have /(@image_subset _ _ f) : closure (AfE b) `<=` f @^-1` closure (E b).
have /closure_id -> : closed (f @^-1` closure (E b) : set (subspace A)).
by apply: preimage_closed => //; exact: closed_closure.
apply: closureS.
have /(@preimage_subset _ _ f) A0cA0 := @subset_closure _ (E b).
by apply: subset_trans A0cA0; apply: subIset; right.
by move/subset_trans; apply; exact: image_preimage_subset.
apply/nonemptyPn => -[t [AfEb AfENb]].
have : f @` closure (AfE b) `&` f @` AfE (~~ b) = set0.
by rewrite fAfE; exact: subsetI_eq0 cEIE.
by rewrite predeqE => /(_ (f t)) [fcAfEb] _; apply: fcAfEb; split; exists t.
Qed.
Lemma continuous_localPUsed by
- mathcomp.analysis.topology_theory.function_spaces
Source code {XSource code YSource code : topologicalType} (fSource code : X -> Y) :
continuous f <->
forall xSource code : X, \forall USource code \near powerset_filter_from (nbhs x),
{within U, continuous f}.
Proof.
move=> + x => /(_ x)/near_powerset_filter_fromP.
case; first by move=> ? ?; exact: continuous_subspaceW.
move=> U nbhsU wctsf; wlog oU : U wctsf nbhsU / open U.
move: nbhsU; rewrite nbhsE => -[] W [oW Wx WU] /(_ W).
by move/(_ (continuous_subspaceW WU wctsf)); apply => //; exists W.
move/nbhs_singleton: nbhsU; move: x; apply/in_setP.
by rewrite -continuous_open_subspace.
Unshelve. end_near. Qed.
Lemma continuous_subspace_setTUsed by
- mathcomp.analysis.topology_theory.subtype_topology
Source code {TSource code USource code : topologicalType} (fSource code : T -> U) :
continuous f <-> {within setT, continuous f}.
Proof.
Section subspace_product.
Context {XSource code YSource code ZSource code : topologicalType} (ASource code : set X) (BSource code : set Y) .
Lemma nbhs_prodX_subspace_inESource code xSource code : (A `*` B) x ->
nbhs (x : subspace (A `*` B)) = @nbhs _ (subspace A * subspace B)%type x.
Proof.
rewrite funeqE => U /=; rewrite propeqE; split; rewrite /nbhs /=.
move=> [[P Q]] /= [nxP nyQ] PQABU; exists (P `&` A, Q `&` B).
by split; apply/nbhs_subspace_ex => //=; [exists P | exists Q];
rewrite // -setIA setIid.
by case=> p q [[/= Pp Ap [Qq Bq]]]; exact: PQABU.
move=> [[P Q]] /= [/(nbhs_subspace_ex _ Aa) [P' P'a PPA]].
move/(nbhs_subspace_ex _ Bb) => [Q' Q'a QQB PQU].
exists (P', Q') => //= -[p q] [P'p Q'q] [Ap Bq]; apply: PQU; split => /=.
by have [] : (P `&` A) p by rewrite PPA.
by have [] : (Q `&` B) q by rewrite QQB.
Qed.
Lemma continuous_subspace_prodPSource code (fSource code : X * Y -> Z) :
{in A `*` B, continuous (f : subspace A * subspace B -> Z)} <->
{within A `*` B, continuous f}.
Proof.
rewrite nbhs_prodX_subspace_inE//; move/set_mem: ABx.
Qed.
End subspace_product.
#[shortSource code(typeSource code =Source code "continuousSubspaceType"Source code)]Source code
HBSource code.structureSource code DefinitionSource code ContinuousSubspaceSource code {XSource code YSource code :Source code topologicalType}Source code
(A : set X) (B : set Y) :=
{fSource code of @isFun (subspace A) Y A B f & @Continuous (subspace A) Y f }.
#[deprecated(since="mathcomp-analysis 1.16.0", note="renamed to `continuousSubspaceType`")]
Notation continuousFunTypeSource code := continuousSubspaceType.
#[deprecated(since="mathcomp-analysis 1.16.0", note="renamed to `ContinuousSubspace`")]
Notation ContinuousFunSource code A B := (ContinuousSubspace A B).
Section continuous_fun_comp.
Context {XSource code YSource code ZSource code : topologicalType} (ASource code : set X) (BSource code : set Y) (CSource code : set Z)
{fSource code : continuousSubspaceType A B} {gSource code : continuousSubspaceType B C}.
#[local] Lemma continuous_comp_subproofSource code : continuous (g \o f : subspace A -> Z).
Proof.
exact/subspaceT_continuous/continuous_fun.
Qed.
End continuous_fun_comp.
Section continuous_patch.
Context {USource code VSource code : topologicalType} (ASource code BSource code : set U) (fSource code gSource code : U -> V).
Hypotheses (contfSource code : {within A, continuous f})
(contgSource code : {within B, continuous g})
(closedASource code : closed A)
(closedBSource code : closed B)
(AB_fgSource code : forall xSource code, x \in A `&` B -> f x = g x).
Lemma withinU_continuous_patchSource code : {within A `|` B, continuous (patch g A f)}.
Proof.
apply: withinU_continuous => //.
- suff : {in A, f =1 gAf} by move/subspace_eq_continuous; exact.
by rewrite /gAf /patch => r ->.
- suff : {in B, g =1 gAf} by move/subspace_eq_continuous; exact.
move=> r rB; rewrite /gAf /patch; case: ifPn => // rA.
by apply/esym/AB_fg; rewrite in_setI rA.
Qed.
End continuous_patch.
Definition subdiagonal
from_subspace : forall {T U : Type} (A : set T), (T -> U) -> subspace A -> U from_subspace is not universe polymorphic Arguments from_subspace {T U}%_type_scope A%_classical_set_scope f%_function_scope _ from_subspace is transparent Expands to: Constant mathcomp.analysis.topology_theory.subspace_topology.from_subspace Declared in library mathcomp.analysis.topology_theory.subspace_topology, line 321, characters 11-24
Source code {XSource code : uniformType} (ASource code : set X) :
set (subspace A * subspace A) :=
[set zSource code | (A z.1 /\ A z.2) \/ z.1 = z.2].
Arguments subdiagonal {X} _.
Lemma ent_subdiagonalSource code {XSource code : uniformType} (ASource code : set X) :
@entourage (subspace A) (subdiagonal A).
Proof.
rewrite /subspace_ent /filter_from /=.
exists setT; first exact: entourageT.
move=> z /= [z12|[A1 [A2 _]]].
- by rewrite /subdiagonal/= z12; right.
- by rewrite /subdiagonal/=; left.
Qed.
Section HeineCantorUniform.
Context {XSource code YSource code : uniformType}.
Let unif_cont_atSource code (ASource code : set X) (fSource code : X -> Y) (ESource code : set (Y * Y))
(iSource code : subspace A * subspace A) (xSource code : subspace A) : Prop :=
i.1 = x -> (map_pair f @^-1` E) i.
Let unif_cont_atPSource code (ASource code : set X) (fSource code : X -> Y) (ESource code : set (Y * Y)) :
{within A, continuous f} -> entourage E ->
forall aSource code : subspace A,
\forall iSource code \near a & zSource code \near entourage, unif_cont_at f E z i.
Proof.
pose E' := split_ent E.
pose W : set (Y * Y) := E' `&` E'^-1%relation.
have entW : @entourage Y W by apply: entourage_invI; exact: entourage_split_ent.
move=> a.
have /nbhsP [/= C entC Csub] :=
cf a (xsection W (f a)) (nbhs_entourage (f a) entW).
pose D := split_ent C.
have entD : entourage D by exact: entourage_split_ent.
have near_Da : \forall xSource code \near a, D (a, x).
move: entD => /(nbhs_entourage a).
rewrite -filter_from_entourageE => -[/= F entF FDa].
near do apply/set_mem/FDa/xsectionP.
by apply: cvg_entourage; [exact: cvg_id|exact: entF].
near=> x z => /=.
have Dax : D (a, x) by near: x; exact: near_Da.
have Dz : D z by near: z; exact: entD.
move=> /= z1x.
have {Dax}Daz1 : D (a, z.1) by rewrite z1x.
have {Dz}Caz2 : C (a, z.2).
apply: (entourage_split x entC); rewrite -/D.
by rewrite -z1x; exact: Daz1.
by rewrite -z1x -surjective_pairing; exact: Dz.
have Caz1 : C (a, z.1) by exact: (split_ent_subset entC).
have Waz1 : W (f a, f z.1).
suff : (f @^-1` xsection W (f a)) z.1 by rewrite /= => /xsectionP.
by apply: Csub => //; exact/xsectionP.
have Waz2 : W (f a, f z.2).
suff : (f @^-1` xsection W (f a)) z.2 by rewrite /= => /xsectionP.
by apply: Csub => //; exact/xsectionP.
move: Waz1 Waz2 => [_ E'az1] [E'az2 _].
exact: (entourage_split (f a) entE).
Unshelve. all: end_near. Qed.
Lemma heine_cantor_subspaceSource code (ASource code : set X) (fSource code : X -> Y) :
compact A -> {within A, continuous f} ->
@unif_continuous (subspace A) Y f.
Proof.
rewrite -[nbhs _ E]/(subspace_ent A
[set xySource code : subspace A * subspace A | E (f xy.1, f xy.2)]).
have compactA_subspace : @compact (subspace A) A.
rewrite -[A](@setTI (subspace A)).
have [_] := @compact_subspaceIP X A setT.
by rewrite setTI; exact.
have A_unif_cont_at : \forall VSource code \near entourage, A `<=` @unif_cont_at A f E V.
have := (@compact_near_coveringP (subspace A) A).1 compactA_subspace.
move/(_ _ entourage (@unif_cont_at A f E)).
by apply=> a Aa; exact/unif_cont_atP.
pose W : set (subspace A * subspace A) := [set zSource code | A `<=` unif_cont_at f E z].
have entW : entourage W by [].
apply: (@filterS _ _ _ (W `&` subdiagonal A)); last first.
by apply: filterI => //; exact: ent_subdiagonal.
move=> [x y] /= [Wxy] [[/= Ax Ay]|/= xy].
- exact: Wxy _ Ax _.
- rewrite xy.
exact: entourage_refl.
Qed.
End HeineCantorUniform.