@@ -2088,6 +2088,85 @@ apply: filterS => e xeA y exy; apply: xeA.
20882088by rewrite -ball_normE/= in exy; exact: ltW.
20892089Qed .
20902090
2091+ Lemma open_subball_rat {R : realType} (S : set R) x : open S -> x \in S ->
2092+ exists c r, let B : set R := ball (@ratr R c) (ratr r) in x \in B /\ B `<=` S.
2093+ Proof .
2094+ move=> oS /set_mem/(open_subball oS)[r/= r0 rS].
2095+ have [y yxr] : exists y, ball x (r / 4) (ratr y).
2096+ suff : ball x (r / 4) `&` range ratr !=set0.
2097+ by move=> [/= _ []] /[swap] -[y _ <-]; exists y.
2098+ apply: dense_rat; last by apply: ball_open; rewrite divr_gt0.
2099+ by exists x; apply: ballxx; rewrite divr_gt0.
2100+ have [q /andP[rq qr]] : exists q, r / 4 < ratr q < r / 2.
2101+ have : ball (r / 3) (r / 12) `&` range ratr !=set0.
2102+ apply: dense_rat; last by apply: ball_open; rewrite divr_gt0.
2103+ by exists (r / 3); apply: ballxx; rewrite divr_gt0.
2104+ move=> [/= _ []] /[swap] -[z _ <-].
2105+ rewrite ball_itv/= in_itv/= => /andP[rz zr]; exists z; apply/andP; split.
2106+ - rewrite (le_lt_trans _ rz)// -mulrBr ler_pM2l// -(@ler_pM2l _ 12)//.
2107+ rewrite mulrBr divff// (@natrM _ 3 4) -mulrA divff// mulr1.
2108+ by rewrite mulrAC divff// mul1r -lerBlDr opprK natr1.
2109+ - rewrite (lt_le_trans zr)// -mulrDr ler_pM2l// -(@ler_pM2l _ 12)//.
2110+ rewrite mulrDr divff// (@natrM _ 3 4) mulrAC divff// mul1r.
2111+ by rewrite natr1 (@natrM _ 2 2) -!mulrA divff// mulr1 -natrM ler_nat.
2112+ have [yqxr xrS] : ball (@ratr R y) (ratr q) `<=` ball x r /\ ball x r `<=` S.
2113+ split => [z yqz|z /rat_in_itvoo[p]].
2114+ - rewrite /ball/= -(subrK (ratr y) x) -(addrA _ (ratr y)).
2115+ rewrite (le_lt_trans (ler_normD _ _))// (splitr r) ltrD//.
2116+ by apply: le_ball yxr; rewrite ler_pM2l// lef_pV2 ?posrE// ler_nat.
2117+ by rewrite (lt_trans yqz).
2118+ - rewrite in_itv/= => /andP[xzp pr]; apply: (rS (ratr p)) => //=.
2119+ + by rewrite sub0r normrN gtr0_norm// (le_lt_trans _ xzp).
2120+ + exact: le_lt_trans xzp.
2121+ exists y, q; split; last exact: subset_trans xrS.
2122+ exact/mem_set/ball_sym/(le_ball _ yxr)/ltW.
2123+ Qed .
2124+
2125+ Section countable_isolated.
2126+ Context {R : realType}.
2127+ Variable S : set R.
2128+
2129+ Fact isolated_rat_ball (x : R) : isolated S x -> exists cr,
2130+ let B : set R := ball (@ratr R cr.1) (ratr cr.2) in
2131+ x \in B /\ (forall y : R, isolated S y -> y \in B -> x = y).
2132+ Proof .
2133+ move=> Sx.
2134+ have [e Sxe] : exists e : {posnum R},
2135+ forall y : R, isolated S y -> y \in (ball x e%:num : set R) -> x = y.
2136+ case: Sx => [xS/= [V xV /seteqP[VSx _]]].
2137+ have [e /= e0 exV] : \forall e \near 0^'+, ball x e `<=` V°.
2138+ apply: open_subball; first exact: open_interior.
2139+ by move/nbhs_interior : xV; exact: nbhs_singleton.
2140+ have e20 : 0 < e / 2 by rewrite divr_gt0.
2141+ exists (PosNum e20) => y [Sy [/= U yU USy /set_mem xey]].
2142+ apply/eqP/negPn/negP => xy.
2143+ suff : (V `&` S) y by move/VSx/esym; exact/eqP.
2144+ split => //; last exact/set_mem.
2145+ apply: interior_subset; apply: exV xey => //.
2146+ by rewrite /ball_/= sub0r normrN gtr0_norm// gtr_pMr// invf_lt1// ltr1n.
2147+ have [c [r [xcr crxe]]] : exists c r,
2148+ let B : set R := ball (@ratr R c) (ratr r) in x \in B /\ B `<=` ball x e%:num.
2149+ by apply: open_subball_rat; [exact: ball_open|exact/mem_set/ballxx].
2150+ by exists (c, r); split=> //= y /Sxe /[!inE] /[swap] /crxe /[swap] /[apply].
2151+ Qed .
2152+
2153+ Lemma countable_isolated : countable (isolated S).
2154+ Proof .
2155+ apply/pcard_injP => /=.
2156+ pose g r := if pselect (isolated S r) is left H then
2157+ sval (cid (isolated_rat_ball H)) else 0.
2158+ have /card_bijP[h /bij_inj injh] := card_rat2.
2159+ exists (set_val \o h \o to_setT \o g) => x y /set_mem xS /set_mem yS /=.
2160+ rewrite /= /g; case: pselect => // xS'; case: pselect => // yS'.
2161+ case: cid => //= [ar [xar Nxar]]{xS'}; case: cid => //= [bd [ybd Nybd]]{yS'} ab.
2162+ have /injh/(congr1 (fun x => \val x)) : h (to_setT ar) = h (to_setT bd).
2163+ move: (h (to_setT ar)) (h (to_setT bd)) ab => [n nT] [m mT].
2164+ by rewrite !set_valE/= => ->; congr exist.
2165+ by rewrite -inv_to_setT !funK ?inE// => {}ab; apply: Nxar => //; rewrite ab.
2166+ Qed .
2167+
2168+ End countable_isolated.
2169+
20912170Lemma closed_disjoint_closed_ball {R : realFieldType} {M : normedModType R}
20922171 (K : set M) z : closed K -> ~ K z ->
20932172 \forall d \near 0^'+, closed_ball z d `&` K = set0.
0 commit comments