Skip to content
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
3 changes: 3 additions & 0 deletions CHANGELOG_UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

### Added

- in `classical_sets.v`:
+ lemma `not_nonemptyP`

- in `cardinality.v`:
+ lemma `infinite_setD`

Expand Down
9 changes: 6 additions & 3 deletions classical/classical_sets.v
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,9 @@ apply: contrapT => /asboolPn/forallp_asboolPn A0; apply/A_neq0/eqP.
by rewrite eqEsubset; split.
Qed.

Lemma not_nonemptyP A : ~ (A !=set0) <-> A = set0.
Proof. by split; [|move=> ->]; move/set0P/negP; [move/negbNE/eqP|]. Qed.

Lemma setF_eq0 : (T -> False) -> all_equal_to (set0 : set T).
Proof. by move=> TF A; rewrite -subset0 => x; have := TF x. Qed.

Expand Down Expand Up @@ -1206,7 +1209,7 @@ Notation bigcupM1l := bigcupX1l (only parsing).
Notation bigcupM1r := bigcupX1r (only parsing).

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

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

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

Lemma has_sup1 x : has_sup [set x].
Proof. by split; [exists x | exists x => y ->]. Qed.
Expand Down
2 changes: 1 addition & 1 deletion theories/normedtype_theory/pseudometric_normed_Zmodule.v
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ Proof.
rewrite ball_hausdorff => a b ab.
have ab2 : 0 < `|a - b| / 2 by apply divr_gt0 => //; rewrite normr_gt0 subr_eq0.
set r := PosNum ab2; exists (r, r) => /=.
apply/negPn/negP => /set0P[c] []; rewrite -ball_normE /ball_ => acr bcr.
apply/eqP/not_nonemptyP => -[c] []; rewrite -ball_normE /ball_ => acr bcr.
have r22 : r%:num * 2 = r%:num + r%:num.
by rewrite (_ : 2 = 1 + 1) // mulrDr mulr1.
move: (ltrD acr bcr); rewrite -r22 (distrC b c).
Expand Down
2 changes: 1 addition & 1 deletion theories/normedtype_theory/urysohn.v
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ split.
- by apply: bigcup_open => ? ?; exact: open_interior.
- by move=> x ?; exists x => //; exact: nbhsx_ballx.
- by move=> y ?; exists y => //; exact: nbhsx_ballx.
- apply/eqP/negPn/negP/set0P => -[z [[x Ax /interior_subset Axe]]].
- apply/not_nonemptyP => -[z [[x Ax /interior_subset Axe]]].
case=> y By /interior_subset Bye; have nAy : ~ A y.
by move: AB0; rewrite setIC => /disjoints_subset; exact.
have nBx : ~ B x by move/disjoints_subset: AB0; exact.
Expand Down
2 changes: 1 addition & 1 deletion theories/normedtype_theory/vitali_lemma.v
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ have [[j Dj BiBj]|] :=
move/forall2NP => H.
have {}H j : (\bigcup_(i < n.+1) D i) j ->
closure (B i) `&` closure (B j) = set0.
by have [//|/set0P/negP/negPn/eqP] := H j.
by have [//|/not_nonemptyP] := H j.
have H_i : (H_ n (\bigcup_(i < n) D i)) i.
split => // s Hs si; apply: H => //.
by move: Hs => [m /= nm Dms]; exists m => //=; rewrite (ltn_trans nm).
Expand Down
2 changes: 1 addition & 1 deletion theories/topology_theory/connected.v
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ move=> AB CAB; have -> : C = (C `&` A) `|` (C `&` B).
rewrite predeqE => x; split=> [Cx|[] [] //].
by have [Ax|Bx] := CAB _ Cx; [left|right].
move/connectedP/(_ (fun b => if b then C `&` B else C `&` A)) => /not_and3P[]//.
by move/existsNP => [b /set0P/negP/negPn]; case: b => /eqP ->;
by move/existsNP => [b /not_nonemptyP]; case: b => ->;
rewrite !(setU0,set0U); [left|right]; apply: subIset; right.
case/not_andP => /eqP/set0P[x []].
- move=> /closureI[cCx cAx] [Cx Bx]; exfalso.
Expand Down
5 changes: 2 additions & 3 deletions theories/topology_theory/separation_axioms.v
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ have /compact_near_coveringP : compact (V `\` U).
move=> /(_ _ (powerset_filter_from F) (fun W x => ~ W x))[].
move=> z [Vz ?]; have zE : x <> z by move/nbhs_singleton: nbhsU => /[swap] ->.
have : ~ cluster F z by move: zE; apply: contra_not; rewrite clFx1 => ->.
case/existsNP=> C /existsPNP [D] FC /existsNP [Dz] /set0P/negP/negPn/eqP.
case/existsNP=> C /existsPNP [D] FC /existsNP [Dz] /not_nonemptyP.
rewrite setIC => /disjoints_subset CD0; exists (D, [set W | F W /\ W `<=` C]).
by split; rewrite //= nbhs_simpl; exact: powerset_filter_fromP.
by case => t W [Dt] [FW] /subsetCP; apply; apply: CD0.
Expand All @@ -140,8 +140,7 @@ Qed.
Lemma compact_precompact (A : set T) :
hausdorff_space -> compact A -> precompact A.
Proof.
move=> h c; rewrite precompactE ( _ : closure A = A)//.
by apply/esym/closure_id; exact: compact_closed.
by move=> h c; rewrite precompactE -(closure_id _).1//; exact: compact_closed.
Qed.

Lemma open_hausdorff : hausdorff_space =
Expand Down
2 changes: 1 addition & 1 deletion theories/topology_theory/subspace_topology.v
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ have ? : f @` closure (AfE b) `<=` closure (E b).
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/eqP/negPn/negP/set0P => -[t [? ?]].
apply/not_nonemptyP => -[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.
Expand Down