Skip to content

Commit 787df87

Browse files
committed
fix #1858
1 parent 7c8cd3f commit 787df87

File tree

5 files changed

+52
-48
lines changed

5 files changed

+52
-48
lines changed

CHANGELOG_UNRELEASED.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@
187187
- in classical_sets.v
188188
+ lemma `in_set1` (statement changed)
189189

190+
- in `subspace_topology.v`:
191+
+ lemmas `open_subspaceP` and `closed_subspaceP` (use `exists2` instead of `exists`)
192+
190193
### Renamed
191194

192195
- in `topology_structure.v`
@@ -253,6 +256,9 @@
253256
- in `lebesgue_integral_nonneg.v`:
254257
+ lemma `integral_setU` (was deprecated since version 1.0.1)
255258

259+
- in `boolp.v`:
260+
+ notation `eq_exists2` (was deprecated since version 1.10.0)
261+
256262
### Infrastructure
257263

258264
### Misc

classical/boolp.v

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,6 @@ Qed.
297297
Lemma eq2_exists T S (U V : forall x : T, S x -> Prop) :
298298
(forall x y, U x y = V x y) -> (exists x y, U x y) = (exists x y, V x y).
299299
Proof. by move=> UV; apply/eq_exists => x; exact/eq_exists. Qed.
300-
#[deprecated(since="mathcomp-analysis 1.10.0", note="renamed to `eq2_exists`.")]
301-
Notation eq_exists2 := eq2_exists (only parsing).
302300

303301
Lemma eq3_exists T S R (U V : forall (x : T) (y : S x), R x y -> Prop) :
304302
(forall x y z, U x y z = V x y z) ->

theories/function_spaces.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ Lemma join_product_initial : set_inj [set: T] join_product ->
417417
Proof.
418418
move=> inj; rewrite predeqE => U; split; first last.
419419
by move=> [V ? <-]; apply: open_comp => // + _; exact: join_product_continuous.
420-
move=> /join_product_open/open_subspaceP [V [oU VU]].
420+
move=> /join_product_open/open_subspaceP [V oU VU].
421421
exists V => //; have := @f_equal _ _ (preimage join_product) _ _ VU.
422422
rewrite !preimage_setI // !preimage_range !setIT => ->.
423423
rewrite eqEsubset; split; last exact: preimage_image.

theories/measurable_realfun.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(* mathcomp analysis (c) 2026 Inria and AIST. License: CeCILL-C. *)
22
From HB Require Import structures.
3-
From mathcomp Require Import all_ssreflect_compat finmap ssralg ssrnum ssrint interval.
4-
From mathcomp Require Import archimedean rat.
3+
From mathcomp Require Import all_ssreflect_compat finmap ssralg ssrnum ssrint.
4+
From mathcomp Require Import interval archimedean rat.
55
#[warning="-warn-library-file-internal-analysis"]
66
From mathcomp Require Import unstable.
77
From mathcomp Require Import boolp classical_sets.
@@ -725,7 +725,7 @@ Qed.
725725
Lemma open_measurable_subspace (D : set R) (U : set (subspace D)) :
726726
measurable D -> open U -> measurable (D `&` U).
727727
Proof.
728-
move=> mD /open_subspaceP [V [oV] VD]; rewrite setIC -VD.
728+
move=> mD /open_subspaceP [V oV VD]; rewrite setIC -VD.
729729
by apply: measurableI => //; exact: open_measurable.
730730
Qed.
731731

theories/topology_theory/subspace_topology.v

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -182,43 +182,43 @@ Qed.
182182

183183
Lemma open_subspaceP (U : set T) :
184184
open (U : set (subspace A)) <->
185-
exists V, open (V : set T) /\ V `&` A = U `&` A.
185+
exists2 V, open (V : set T) & V `&` A = U `&` A.
186186
Proof.
187187
split; first last.
188-
case=> V [oV UV]; rewrite -open_subspaceIT -UV.
188+
case=> V oV UV; rewrite -open_subspaceIT -UV.
189189
move=> x //= []; case: nbhs_subspaceP; rewrite //= withinE.
190-
move=> ? ? _; exists V; last by rewrite -setIA setIid.
191-
by move: oV; rewrite openE /interior; apply.
190+
move=> Ax Vx _; exists V; last by rewrite -setIA setIid.
191+
by move: oV; rewrite openE /interior; exact.
192192
rewrite -open_subspaceIT => oUA.
193-
have oxF : forall x : T, (U `&` A) x ->
194-
exists V, (open_nbhs (x : T) V) /\ (V `&` A `<=` U `&` A).
195-
move=> x /[dup] UAx /= [??]; move: (oUA _ UAx);
196-
case: nbhs_subspaceP => // ?.
197-
rewrite withinE /= => [[V nbhsV UV]]; rewrite -setIA setIid in UV.
198-
exists V°; split; first rewrite open_nbhsE; first split => //.
193+
have oxF (x : T) : (U `&` A) x ->
194+
exists2 V, open_nbhs (x : T) V & V `&` A `<=` U `&` A.
195+
move=> /[dup] UAx /= [Ux Ax].
196+
have := oUA _ UAx; case: nbhs_subspaceP => // _.
197+
rewrite withinE /= => -[V nbhsV]; rewrite -setIA setIid => UV.
198+
exists V°; first rewrite open_nbhsE; first split => //.
199199
- exact: open_interior.
200200
- exact: nbhs_interior.
201-
- by rewrite UV=> t [/interior_subset] ??; split.
201+
- by rewrite UV => t [/interior_subset].
202202
pose f (x : T) :=
203-
if pselect ((U `&` A) x) is left e then projT1 (cid (oxF x e)) else set0.
204-
set V := \bigcup_(x in (U `&` A)) (f x); exists V; split.
205-
apply: bigcup_open => i UAi; rewrite /f; case: pselect => // ?; case: (cid _).
206-
by move=> //= W; rewrite open_nbhsE=> -[[]].
203+
if pselect ((U `&` A) x) is left e then projT1 (cid2 (oxF x e)) else set0.
204+
set V := \bigcup_(x in U `&` A) f x; exists V.
205+
apply: bigcup_open => i UAi; rewrite /f; case: pselect => // ?; case: cid2.
206+
by move=> //= W; rewrite open_nbhsE => -[].
207207
rewrite eqEsubset /V /f; split.
208208
move=> t [[u]] UAu /=; case: pselect => //= ?.
209-
by case: (cid _) => //= W [] _ + ? ?; apply; split.
209+
by case: cid2 => //= W _ + ? ? ; apply; exact.
210210
move=> t UAt; split => //; last by case: UAt.
211211
exists t => //; case: pselect => //= [[? ?]].
212-
by case: (cid _) => //= W [] [] _.
212+
by case: cid2 => //= W [].
213213
Qed.
214214

215215
Lemma closed_subspaceP (U : set T) :
216216
closed (U : set (subspace A)) <->
217-
exists V, closed (V : set T) /\ V `&` A = U `&` A.
217+
exists2 V, closed (V : set T) & V `&` A = U `&` A.
218218
Proof.
219-
rewrite -openC open_subspaceP.
220-
under [X in _ <-> X] eq_exists => V do rewrite -openC.
221-
by split => -[V [? VU]]; exists (~` V); split; rewrite ?setCK //;
219+
rewrite -openC open_subspaceP !exists2E.
220+
under [X in _ <-> X]eq_exists => x do rewrite -openC.
221+
by split => -[V [? VU]]; exists (~` V); rewrite ?setCK //;
222222
move/(congr1 setC): VU; rewrite ?eqEsubset ?setCI ?setCK; firstorder.
223223
Qed.
224224

@@ -234,8 +234,8 @@ Lemma open_setIS (U : set (subspace A)) : open A ->
234234
open (U `&` A : set T) = open U.
235235
Proof.
236236
move=> oA; apply/propext; rewrite open_subspaceP.
237-
split=> [|[V [oV <-]]]; last exact: openI.
238-
by move=> oUA; exists (U `&` A); rewrite -setIA setIid.
237+
split=> [|[V oV <-]]; last exact: openI.
238+
by move=> oUA; exists (U `&` A); rewrite // -setIA setIid.
239239
Qed.
240240

241241
Lemma open_setSI (U : set (subspace A)) : open A -> open (A `&` U) = open U.
@@ -245,8 +245,8 @@ Lemma closed_setIS (U : set (subspace A)) : closed A ->
245245
closed (U `&` A : set T) = closed U.
246246
Proof.
247247
move=> oA; apply/propext; rewrite closed_subspaceP.
248-
split=> [|[V [oV <-]]]; last exact: closedI.
249-
by move=> oUA; exists (U `&` A); rewrite -setIA setIid.
248+
split=> [|[V oV <-]]; last exact: closedI.
249+
by move=> oUA; exists (U `&` A); rewrite // -setIA setIid.
250250
Qed.
251251

252252
Lemma closed_setSI (U : set (subspace A)) :
@@ -256,8 +256,8 @@ Proof. by move=> oA; rewrite -setIC closed_setIS. Qed.
256256
Lemma closure_subspaceW (U : set T) :
257257
U `<=` A -> closure (U : set (subspace A)) = closure (U : set T) `&` A.
258258
Proof.
259-
have /closed_subspaceP := (@closed_closure _ (U : set (subspace A))).
260-
move=> [V] [clV VAclUA] /[dup] /(@closureS (subspace _)).
259+
have /closed_subspaceP := @closed_closure _ (U : set (subspace A)).
260+
move=> [V clV VAclUA] /[dup] /(@closureS (subspace _)).
261261
have /closure_id <- := closed_subspaceT => /setIidr <-; rewrite setIC.
262262
move=> UsubA; rewrite eqEsubset; split.
263263
apply: setSI; rewrite closureE; apply: smallest_sub (@subset_closure _ U).
@@ -288,13 +288,13 @@ Lemma clopen_connectedP : connected A <->
288288
Proof.
289289
split.
290290
move=> + U [/open_subspaceP oU /closed_subspaceP cU] UA U0; apply => //.
291-
- case: oU => V [oV VAUA]; exists V; rewrite // setIC VAUA.
291+
- case: oU => V oV VAUA; exists V; rewrite // setIC VAUA.
292292
exact/esym/setIidPl.
293-
- case: cU => V [cV VAUA]; exists V => //; rewrite setIC VAUA.
293+
- case: cU => V cV VAUA; exists V; rewrite // setIC VAUA.
294294
exact/esym/setIidPl.
295295
move=> clpnA U Un0 [V oV UVA] [W cW UWA]; apply: clpnA => //; first split.
296-
- by apply/open_subspaceP; exists V; rewrite setIC UVA setIAC setIid.
297-
- by apply/closed_subspaceP; exists W; rewrite setIC UWA setIAC setIid.
296+
- by apply/open_subspaceP; exists V; rewrite // setIC UVA setIAC setIid.
297+
- by apply/closed_subspaceP; exists W; rewrite // setIC UWA setIAC setIid.
298298
- by rewrite UWA; exact: subIsetl.
299299
Qed.
300300

@@ -311,8 +311,8 @@ Global Instance subspace_proper_filter {T : topologicalType}
311311
(A : set T) (x : subspace A) :
312312
ProperFilter (nbhs_subspace x) := nbhs_subspace_filter x.
313313

314-
Definition from_subspace {T U : Type} (A : set T) (f : T -> U) : subspace A -> U :=
315-
f.
314+
Definition from_subspace {T U : Type} (A : set T) (f : T -> U)
315+
: subspace A -> U := f.
316316
Arguments from_subspace {T U} A f.
317317

318318
Notation "{ 'within' A , 'continuous' f }" :=
@@ -391,21 +391,21 @@ Lemma withinU_continuous {U} A B (f : T -> U) : closed A -> closed B ->
391391
{within A `|` B, continuous f}.
392392
Proof.
393393
move=> ? ? ctsA ctsB; apply/continuous_closedP => W oW.
394-
case/continuous_closedP/(_ _ oW)/closed_subspaceP: ctsA => V1 [? V1W].
395-
case/continuous_closedP/(_ _ oW)/closed_subspaceP: ctsB => V2 [? V2W].
396-
apply/closed_subspaceP; exists ((V1 `&` A) `|` (V2 `&` B)); split.
394+
case/continuous_closedP/(_ _ oW)/closed_subspaceP: ctsA => V1 cV1 V1W.
395+
case/continuous_closedP/(_ _ oW)/closed_subspaceP: ctsB => V2 cV2 V2W.
396+
apply/closed_subspaceP; exists ((V1 `&` A) `|` (V2 `&` B)).
397397
by apply: closedU; exact: closedI.
398-
rewrite [RHS]setIUr -V2W -V1W eqEsubset; split=> ?.
399-
by case=> [[][]] ? ? [] ?; [left | left | right | right]; split.
400-
by case=> [][] ? ?; split=> []; [left; split | left | right; split | right].
398+
rewrite [RHS]setIUr -V2W -V1W eqEsubset; split=> t.
399+
by case=> [[][]] ? ? [] ?; [left | left | right | right].
400+
by case=> [][] ? ?; split=> []; [left | left | right | right].
401401
Qed.
402402

403403
Lemma subspaceT_continuous {U} A (B : set U) (f : {fun A >-> B}) :
404404
{within A, continuous f} -> continuous (f : subspace A -> subspace B).
405405
Proof.
406-
move=> /continuousP ctsf; apply/continuousP => O /open_subspaceP [V [oV VBOB]].
406+
move=> /continuousP ctsf; apply/continuousP => O /open_subspaceP [V oV VBOB].
407407
rewrite -open_subspaceIT; apply/open_subspaceP.
408-
case/open_subspaceP: (ctsf _ oV) => W [oW fVA]; exists W; split => //.
408+
case/open_subspaceP: (ctsf _ oV) => W oW fVA; exists W => //.
409409
rewrite fVA -setIA setIid eqEsubset; split => x [fVx Ax]; split => //.
410410
- by have /[!VBOB]-[] : (V `&` B) (f x) by split => //; exact: funS.
411411
- by have /[!esym VBOB]-[] : (O `&` B) (f x) by split => //; exact: funS.
@@ -571,7 +571,7 @@ Variables (f : U -> T).
571571
Lemma initial_subspace_open (A : set (initial_topology f)) :
572572
open A -> open (f @` A : set (subspace (range f))).
573573
Proof.
574-
case=> B oB <-; apply/open_subspaceP; exists B; split => //; rewrite eqEsubset.
574+
case=> B oB <-; apply/open_subspaceP; exists B => //; rewrite eqEsubset.
575575
split => z [] /[swap]; first by case=> w _ <- ?; split; exists w.
576576
by case=> w _ <- [v] ? <-.
577577
Qed.

0 commit comments

Comments
 (0)