@@ -2435,6 +2435,44 @@ begin
2435
2435
exact ⟨x, ⟨H hx, xs⟩⟩ }
2436
2436
end
2437
2437
2438
+ instance (x : α) [nontrivial α] : ne_bot (𝓝[{x}ᶜ] x) :=
2439
+ begin
2440
+ apply forall_mem_nonempty_iff_ne_bot.1 (λ s hs, _),
2441
+ obtain ⟨u, u_open, xu, us⟩ : ∃ (u : set α), is_open u ∧ x ∈ u ∧ u ∩ {x}ᶜ ⊆ s :=
2442
+ mem_nhds_within.1 hs,
2443
+ obtain ⟨a, b, a_lt_b, hab⟩ : ∃ (a b : α), a < b ∧ Ioo a b ⊆ u := u_open.exists_Ioo_subset ⟨x, xu⟩,
2444
+ obtain ⟨y, hy⟩ : ∃ y, a < y ∧ y < b := exists_between a_lt_b,
2445
+ rcases ne_or_eq x y with xy|rfl,
2446
+ { exact ⟨y, us ⟨hab hy, xy.symm⟩⟩ },
2447
+ obtain ⟨z, hz⟩ : ∃ z, a < z ∧ z < x := exists_between hy.1 ,
2448
+ exact ⟨z, us ⟨hab ⟨hz.1 , hz.2 .trans hy.2 ⟩, hz.2 .ne⟩⟩,
2449
+ end
2450
+
2451
+ /-- Let `s` be a dense set in a nontrivial dense linear order `α`. If `s` is a
2452
+ separable space (e.g., if `α` has a second countable topology), then there exists a countable
2453
+ dense subset `t ⊆ s` such that `t` does not contain bottom/top elements of `α`. -/
2454
+ lemma dense.exists_countable_dense_subset_no_bot_top [nontrivial α]
2455
+ {s : set α} [separable_space s] (hs : dense s) :
2456
+ ∃ t ⊆ s, countable t ∧ dense t ∧ (∀ x, is_bot x → x ∉ t) ∧ (∀ x, is_top x → x ∉ t) :=
2457
+ begin
2458
+ rcases hs.exists_countable_dense_subset with ⟨t, hts, htc, htd⟩,
2459
+ refine ⟨t \ ({x | is_bot x} ∪ {x | is_top x}), _, _, _, _, _⟩,
2460
+ { exact (diff_subset _ _).trans hts },
2461
+ { exact htc.mono (diff_subset _ _) },
2462
+ { exact htd.diff_finite ((subsingleton_is_bot α).finite.union (subsingleton_is_top α).finite) },
2463
+ { assume x hx, simp [hx] },
2464
+ { assume x hx, simp [hx] }
2465
+ end
2466
+
2467
+ variable (α)
2468
+ /-- If `α` is a nontrivial separable dense linear order, then there exists a
2469
+ countable dense set `s : set α` that contains neither top nor bottom elements of `α`.
2470
+ For a dense set containing both bot and top elements, see
2471
+ `exists_countable_dense_bot_top`. -/
2472
+ lemma exists_countable_dense_no_bot_top [separable_space α] [nontrivial α] :
2473
+ ∃ s : set α, countable s ∧ dense s ∧ (∀ x, is_bot x → x ∉ s) ∧ (∀ x, is_top x → x ∉ s) :=
2474
+ by simpa using dense_univ.exists_countable_dense_subset_no_bot_top
2475
+
2438
2476
end densely_ordered
2439
2477
2440
2478
section complete_linear_order
0 commit comments