Skip to content

Commit 69e4959

Browse files
lemma about !=set0
Co-authored-by: IshiguroYoshihiro <[email protected]>
1 parent 096ff50 commit 69e4959

File tree

8 files changed

+16
-11
lines changed

8 files changed

+16
-11
lines changed

CHANGELOG_UNRELEASED.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
### Added
66

7+
- in `classical_sets.v`:
8+
+ lemma `not_nonemptyP`
9+
710
- in `cardinality.v`:
811
+ lemma `infinite_setD`
912

classical/classical_sets.v

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -834,6 +834,9 @@ apply: contrapT => /asboolPn/forallp_asboolPn A0; apply/A_neq0/eqP.
834834
by rewrite eqEsubset; split.
835835
Qed.
836836

837+
Lemma not_nonemptyP A : ~ (A !=set0) <-> A = set0.
838+
Proof. by split; [|move=> ->]; move/set0P/negP; [move/negbNE/eqP|]. Qed.
839+
837840
Lemma setF_eq0 : (T -> False) -> all_equal_to (set0 : set T).
838841
Proof. by move=> TF A; rewrite -subset0 => x; have := TF x. Qed.
839842

@@ -1206,7 +1209,7 @@ Notation bigcupM1l := bigcupX1l (only parsing).
12061209
Notation bigcupM1r := bigcupX1r (only parsing).
12071210

12081211
Lemma set_cst {T I} (x : T) (A : set I) :
1209-
[set x | _ in A] = if A == set0 then set0 else [set x].
1212+
[set x | _ in A] = if A == set0 then set0 else [set x].
12101213
Proof.
12111214
apply/seteqP; split=> [_ [i +] <-|t]; first by case: ifPn => // /eqP ->.
12121215
by case: ifPn => // /set0P[i Ai ->{t}]; exists i.
@@ -2980,10 +2983,10 @@ Lemma has_ub_set1 x : has_ubound [set x].
29802983
Proof. by exists x; rewrite ub_set1. Qed.
29812984

29822985
Lemma has_inf0 : ~ has_inf (@set0 T).
2983-
Proof. by rewrite /has_inf not_andP; left; apply/set0P/negP/negPn. Qed.
2986+
Proof. by rewrite /has_inf not_andP; left; exact/not_nonemptyP. Qed.
29842987

29852988
Lemma has_sup0 : ~ has_sup (@set0 T).
2986-
Proof. by rewrite /has_sup not_andP; left; apply/set0P/negP/negPn. Qed.
2989+
Proof. by rewrite /has_sup not_andP; left; apply/not_nonemptyP. Qed.
29872990

29882991
Lemma has_sup1 x : has_sup [set x].
29892992
Proof. by split; [exists x | exists x => y ->]. Qed.

theories/normedtype_theory/pseudometric_normed_Zmodule.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ Proof.
418418
rewrite ball_hausdorff => a b ab.
419419
have ab2 : 0 < `|a - b| / 2 by apply divr_gt0 => //; rewrite normr_gt0 subr_eq0.
420420
set r := PosNum ab2; exists (r, r) => /=.
421-
apply/negPn/negP => /set0P[c] []; rewrite -ball_normE /ball_ => acr bcr.
421+
apply/eqP/not_nonemptyP => -[c] []; rewrite -ball_normE /ball_ => acr bcr.
422422
have r22 : r%:num * 2 = r%:num + r%:num.
423423
by rewrite (_ : 2 = 1 + 1) // mulrDr mulr1.
424424
move: (ltrD acr bcr); rewrite -r22 (distrC b c).

theories/normedtype_theory/urysohn.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ split.
842842
- by apply: bigcup_open => ? ?; exact: open_interior.
843843
- by move=> x ?; exists x => //; exact: nbhsx_ballx.
844844
- by move=> y ?; exists y => //; exact: nbhsx_ballx.
845-
- apply/eqP/negPn/negP/set0P => -[z [[x Ax /interior_subset Axe]]].
845+
- apply/not_nonemptyP => -[z [[x Ax /interior_subset Axe]]].
846846
case=> y By /interior_subset Bye; have nAy : ~ A y.
847847
by move: AB0; rewrite setIC => /disjoints_subset; exact.
848848
have nBx : ~ B x by move/disjoints_subset: AB0; exact.

theories/normedtype_theory/vitali_lemma.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ have [[j Dj BiBj]|] :=
474474
move/forall2NP => H.
475475
have {}H j : (\bigcup_(i < n.+1) D i) j ->
476476
closure (B i) `&` closure (B j) = set0.
477-
by have [//|/set0P/negP/negPn/eqP] := H j.
477+
by have [//|/not_nonemptyP] := H j.
478478
have H_i : (H_ n (\bigcup_(i < n) D i)) i.
479479
split => // s Hs si; apply: H => //.
480480
by move: Hs => [m /= nm Dms]; exists m => //=; rewrite (ltn_trans nm).

theories/topology_theory/connected.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ move=> AB CAB; have -> : C = (C `&` A) `|` (C `&` B).
9191
rewrite predeqE => x; split=> [Cx|[] [] //].
9292
by have [Ax|Bx] := CAB _ Cx; [left|right].
9393
move/connectedP/(_ (fun b => if b then C `&` B else C `&` A)) => /not_and3P[]//.
94-
by move/existsNP => [b /set0P/negP/negPn]; case: b => /eqP ->;
94+
by move/existsNP => [b /not_nonemptyP]; case: b => ->;
9595
rewrite !(setU0,set0U); [left|right]; apply: subIset; right.
9696
case/not_andP => /eqP/set0P[x []].
9797
- move=> /closureI[cCx cAx] [Cx Bx]; exfalso.

theories/topology_theory/separation_axioms.v

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ have /compact_near_coveringP : compact (V `\` U).
128128
move=> /(_ _ (powerset_filter_from F) (fun W x => ~ W x))[].
129129
move=> z [Vz ?]; have zE : x <> z by move/nbhs_singleton: nbhsU => /[swap] ->.
130130
have : ~ cluster F z by move: zE; apply: contra_not; rewrite clFx1 => ->.
131-
case/existsNP=> C /existsPNP [D] FC /existsNP [Dz] /set0P/negP/negPn/eqP.
131+
case/existsNP=> C /existsPNP [D] FC /existsNP [Dz] /not_nonemptyP.
132132
rewrite setIC => /disjoints_subset CD0; exists (D, [set W | F W /\ W `<=` C]).
133133
by split; rewrite //= nbhs_simpl; exact: powerset_filter_fromP.
134134
by case => t W [Dt] [FW] /subsetCP; apply; apply: CD0.
@@ -140,8 +140,7 @@ Qed.
140140
Lemma compact_precompact (A : set T) :
141141
hausdorff_space -> compact A -> precompact A.
142142
Proof.
143-
move=> h c; rewrite precompactE ( _ : closure A = A)//.
144-
by apply/esym/closure_id; exact: compact_closed.
143+
by move=> h c; rewrite precompactE -(closure_id _).1//; exact: compact_closed.
145144
Qed.
146145

147146
Lemma open_hausdorff : hausdorff_space =

theories/topology_theory/subspace_topology.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ have ? : f @` closure (AfE b) `<=` closure (E b).
620620
have /(@preimage_subset _ _ f) A0cA0 := @subset_closure _ (E b).
621621
by apply: subset_trans A0cA0; apply: subIset; right.
622622
by move/subset_trans; apply; exact: image_preimage_subset.
623-
apply/eqP/negPn/negP/set0P => -[t [? ?]].
623+
apply/not_nonemptyP => -[t [AfEb AfENb]].
624624
have : f @` closure (AfE b) `&` f @` AfE (~~ b) = set0.
625625
by rewrite fAfE; exact: subsetI_eq0 cEIE.
626626
by rewrite predeqE => /(_ (f t)) [fcAfEb] _; apply: fcAfEb; split; exists t.

0 commit comments

Comments
 (0)