fact
stringlengths
6
3.84k
type
stringclasses
11 values
library
stringclasses
32 values
imports
listlengths
1
14
filename
stringlengths
20
95
symbolic_name
stringlengths
1
90
docstring
stringlengths
7
20k
nhdsGE_basis [TopologicalSpace α] [LinearOrder α] [OrderTopology α] [NoMaxOrder α] (a : α) : (𝓝[≥] a).HasBasis (fun u => a < u) fun u => Ico a u := nhdsGE_basis_of_exists_gt (exists_gt a)
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
nhdsGE_basis
null
nhdsLE_basis [TopologicalSpace α] [LinearOrder α] [OrderTopology α] [NoMinOrder α] (a : α) : (𝓝[≤] a).HasBasis (fun l => l < a) fun l => Ioc l a := nhdsLE_basis_of_exists_lt (exists_lt a)
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
nhdsLE_basis
null
nhds_top_order [TopologicalSpace α] [Preorder α] [OrderTop α] [OrderTopology α] : 𝓝 (⊤ : α) = ⨅ (l) (_ : l < ⊤), 𝓟 (Ioi l) := by simp [nhds_eq_order (⊤ : α)]
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
nhds_top_order
null
nhds_bot_order [TopologicalSpace α] [Preorder α] [OrderBot α] [OrderTopology α] : 𝓝 (⊥ : α) = ⨅ (l) (_ : ⊥ < l), 𝓟 (Iio l) := by simp [nhds_eq_order (⊥ : α)]
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
nhds_bot_order
null
nhds_top_basis [TopologicalSpace α] [LinearOrder α] [OrderTop α] [OrderTopology α] [Nontrivial α] : (𝓝 ⊤).HasBasis (fun a : α => a < ⊤) fun a : α => Ioi a := by have : ∃ x : α, x < ⊤ := (exists_ne ⊤).imp fun x hx => hx.lt_top simpa only [Iic_top, nhdsWithin_univ, Ioc_top] using nhdsLE_basis_of_exists_lt this
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
nhds_top_basis
null
nhds_bot_basis [TopologicalSpace α] [LinearOrder α] [OrderBot α] [OrderTopology α] [Nontrivial α] : (𝓝 ⊥).HasBasis (fun a : α => ⊥ < a) fun a : α => Iio a := nhds_top_basis (α := αᵒᵈ)
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
nhds_bot_basis
null
nhds_top_basis_Ici [TopologicalSpace α] [LinearOrder α] [OrderTop α] [OrderTopology α] [Nontrivial α] [DenselyOrdered α] : (𝓝 ⊤).HasBasis (fun a : α => a < ⊤) Ici := nhds_top_basis.to_hasBasis (fun _a ha => let ⟨b, hab, hb⟩ := exists_between ha; ⟨b, hb, Ici_subset_Ioi.mpr hab⟩) fun a ha => ⟨a, ha, Ioi_subset_Ici_self⟩
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
nhds_top_basis_Ici
null
nhds_bot_basis_Iic [TopologicalSpace α] [LinearOrder α] [OrderBot α] [OrderTopology α] [Nontrivial α] [DenselyOrdered α] : (𝓝 ⊥).HasBasis (fun a : α => ⊥ < a) Iic := nhds_top_basis_Ici (α := αᵒᵈ)
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
nhds_bot_basis_Iic
null
tendsto_nhds_top_mono [TopologicalSpace β] [Preorder β] [OrderTop β] [OrderTopology β] {l : Filter α} {f g : α → β} (hf : Tendsto f l (𝓝 ⊤)) (hg : f ≤ᶠ[l] g) : Tendsto g l (𝓝 ⊤) := by simp only [nhds_top_order, tendsto_iInf, tendsto_principal] at hf ⊢ intro x hx filter_upwards [hf x hx, hg] with _ using lt_of_lt_of_le
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
tendsto_nhds_top_mono
null
tendsto_nhds_bot_mono [TopologicalSpace β] [Preorder β] [OrderBot β] [OrderTopology β] {l : Filter α} {f g : α → β} (hf : Tendsto f l (𝓝 ⊥)) (hg : g ≤ᶠ[l] f) : Tendsto g l (𝓝 ⊥) := tendsto_nhds_top_mono (β := βᵒᵈ) hf hg
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
tendsto_nhds_bot_mono
null
tendsto_nhds_top_mono' [TopologicalSpace β] [Preorder β] [OrderTop β] [OrderTopology β] {l : Filter α} {f g : α → β} (hf : Tendsto f l (𝓝 ⊤)) (hg : f ≤ g) : Tendsto g l (𝓝 ⊤) := tendsto_nhds_top_mono hf (Eventually.of_forall hg)
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
tendsto_nhds_top_mono'
null
tendsto_nhds_bot_mono' [TopologicalSpace β] [Preorder β] [OrderBot β] [OrderTopology β] {l : Filter α} {f g : α → β} (hf : Tendsto f l (𝓝 ⊥)) (hg : g ≤ f) : Tendsto g l (𝓝 ⊥) := tendsto_nhds_bot_mono hf (Eventually.of_forall hg)
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
tendsto_nhds_bot_mono'
null
order_separated [OrderTopology α] {a₁ a₂ : α} (h : a₁ < a₂) : ∃ u v : Set α, IsOpen u ∧ IsOpen v ∧ a₁ ∈ u ∧ a₂ ∈ v ∧ ∀ b₁ ∈ u, ∀ b₂ ∈ v, b₁ < b₂ := let ⟨x, hx, y, hy, h⟩ := h.exists_disjoint_Iio_Ioi ⟨Iio x, Ioi y, isOpen_gt' _, isOpen_lt' _, hx, hy, h⟩
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
order_separated
null
exists_Ioc_subset_of_mem_nhds [OrderTopology α] {a : α} {s : Set α} (hs : s ∈ 𝓝 a) (h : ∃ l, l < a) : ∃ l < a, Ioc l a ⊆ s := (nhdsLE_basis_of_exists_lt h).mem_iff.mp (nhdsWithin_le_nhds hs)
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
exists_Ioc_subset_of_mem_nhds
null
exists_Ioc_subset_of_mem_nhds' [OrderTopology α] {a : α} {s : Set α} (hs : s ∈ 𝓝 a) {l : α} (hl : l < a) : ∃ l' ∈ Ico l a, Ioc l' a ⊆ s := let ⟨l', hl'a, hl's⟩ := exists_Ioc_subset_of_mem_nhds hs ⟨l, hl⟩ ⟨max l l', ⟨le_max_left _ _, max_lt hl hl'a⟩, (Ioc_subset_Ioc_left <| le_max_right _ _).trans hl's⟩
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
exists_Ioc_subset_of_mem_nhds'
null
exists_Ico_subset_of_mem_nhds' [OrderTopology α] {a : α} {s : Set α} (hs : s ∈ 𝓝 a) {u : α} (hu : a < u) : ∃ u' ∈ Ioc a u, Ico a u' ⊆ s := by simpa only [OrderDual.exists, exists_prop, Ico_toDual, Ioc_toDual] using exists_Ioc_subset_of_mem_nhds' (show ofDual ⁻¹' s ∈ 𝓝 (toDual a) from hs) hu.dual
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
exists_Ico_subset_of_mem_nhds'
null
exists_Ico_subset_of_mem_nhds [OrderTopology α] {a : α} {s : Set α} (hs : s ∈ 𝓝 a) (h : ∃ u, a < u) : ∃ u, a < u ∧ Ico a u ⊆ s := let ⟨_l', hl'⟩ := h let ⟨l, hl⟩ := exists_Ico_subset_of_mem_nhds' hs hl' ⟨l, hl.1.1, hl.2⟩
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
exists_Ico_subset_of_mem_nhds
null
exists_Icc_mem_subset_of_mem_nhdsGE [OrderTopology α] {a : α} {s : Set α} (hs : s ∈ 𝓝[≥] a) : ∃ b, a ≤ b ∧ Icc a b ∈ 𝓝[≥] a ∧ Icc a b ⊆ s := by rcases (em (IsMax a)).imp_right not_isMax_iff.mp with (ha | ha) · use a simpa [ha.Ici_eq] using hs · rcases(nhdsGE_basis_of_exists_gt ha).mem_iff.mp hs with ⟨b, hab, hbs⟩ rcases eq_empty_or_nonempty (Ioo a b) with (H | ⟨c, hac, hcb⟩) · have : Ico a b = Icc a a := by rw [← Icc_union_Ioo_eq_Ico le_rfl hab, H, union_empty] exact ⟨a, le_rfl, this ▸ ⟨Ico_mem_nhdsGE hab, hbs⟩⟩ · refine ⟨c, hac.le, Icc_mem_nhdsGE hac, ?_⟩ exact (Icc_subset_Ico_right hcb).trans hbs
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
exists_Icc_mem_subset_of_mem_nhdsGE
null
exists_Icc_mem_subset_of_mem_nhdsLE [OrderTopology α] {a : α} {s : Set α} (hs : s ∈ 𝓝[≤] a) : ∃ b ≤ a, Icc b a ∈ 𝓝[≤] a ∧ Icc b a ⊆ s := by simpa only [Icc_toDual, toDual.surjective.exists] using exists_Icc_mem_subset_of_mem_nhdsGE (α := αᵒᵈ) (a := toDual a) hs
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
exists_Icc_mem_subset_of_mem_nhdsLE
null
exists_Icc_mem_subset_of_mem_nhds [OrderTopology α] {a : α} {s : Set α} (hs : s ∈ 𝓝 a) : ∃ b c, a ∈ Icc b c ∧ Icc b c ∈ 𝓝 a ∧ Icc b c ⊆ s := by rcases exists_Icc_mem_subset_of_mem_nhdsLE (nhdsWithin_le_nhds hs) with ⟨b, hba, hb_nhds, hbs⟩ rcases exists_Icc_mem_subset_of_mem_nhdsGE (nhdsWithin_le_nhds hs) with ⟨c, hac, hc_nhds, hcs⟩ refine ⟨b, c, ⟨hba, hac⟩, ?_⟩ rw [← Icc_union_Icc_eq_Icc hba hac, ← nhdsLE_sup_nhdsGE] exact ⟨union_mem_sup hb_nhds hc_nhds, union_subset hbs hcs⟩
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
exists_Icc_mem_subset_of_mem_nhds
null
IsOpen.exists_Ioo_subset [OrderTopology α] [Nontrivial α] {s : Set α} (hs : IsOpen s) (h : s.Nonempty) : ∃ a b, a < b ∧ Ioo a b ⊆ s := by obtain ⟨x, hx⟩ : ∃ x, x ∈ s := h obtain ⟨y, hy⟩ : ∃ y, y ≠ x := exists_ne x rcases lt_trichotomy x y with (H | rfl | H) · obtain ⟨u, xu, hu⟩ : ∃ u, x < u ∧ Ico x u ⊆ s := exists_Ico_subset_of_mem_nhds (hs.mem_nhds hx) ⟨y, H⟩ exact ⟨x, u, xu, Ioo_subset_Ico_self.trans hu⟩ · exact (hy rfl).elim · obtain ⟨l, lx, hl⟩ : ∃ l, l < x ∧ Ioc l x ⊆ s := exists_Ioc_subset_of_mem_nhds (hs.mem_nhds hx) ⟨y, H⟩ exact ⟨l, x, lx, Ioo_subset_Ioc_self.trans hl⟩
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
IsOpen.exists_Ioo_subset
null
dense_of_exists_between [OrderTopology α] [Nontrivial α] {s : Set α} (h : ∀ ⦃a b⦄, a < b → ∃ c ∈ s, a < c ∧ c < b) : Dense s := by refine dense_iff_inter_open.2 fun U U_open U_nonempty => ?_ obtain ⟨a, b, hab, H⟩ : ∃ a b : α, a < b ∧ Ioo a b ⊆ U := U_open.exists_Ioo_subset U_nonempty obtain ⟨x, xs, hx⟩ : ∃ x ∈ s, a < x ∧ x < b := h hab exact ⟨x, ⟨H hx, xs⟩⟩
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
dense_of_exists_between
null
IsUpperSet.isClosed [OrderTopology α] [WellFoundedLT α] {s : Set α} (h : IsUpperSet s) : IsClosed s := by obtain rfl | ⟨a, rfl⟩ := h.eq_empty_or_Ici exacts [isClosed_empty, isClosed_Ici]
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
IsUpperSet.isClosed
null
IsLowerSet.isClosed [OrderTopology α] [WellFoundedGT α] {s : Set α} (h : IsLowerSet s) : IsClosed s := h.toDual.isClosed
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
IsLowerSet.isClosed
null
IsLowerSet.isOpen [OrderTopology α] [WellFoundedLT α] {s : Set α} (h : IsLowerSet s) : IsOpen s := by simpa using h.compl.isClosed
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
IsLowerSet.isOpen
null
IsUpperSet.isOpen [OrderTopology α] [WellFoundedGT α] {s : Set α} (h : IsUpperSet s) : IsOpen s := h.toDual.isOpen
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
IsUpperSet.isOpen
null
dense_iff_exists_between [OrderTopology α] [DenselyOrdered α] [Nontrivial α] {s : Set α} : Dense s ↔ ∀ a b, a < b → ∃ c ∈ s, a < c ∧ c < b := ⟨fun h _ _ hab => h.exists_between hab, dense_of_exists_between⟩
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
dense_iff_exists_between
A set in a nontrivial densely linear ordered type is dense in the sense of topology if and only if for any `a < b` there exists `c ∈ s`, `a < c < b`. Each implication requires less typeclass assumptions.
mem_nhds_iff_exists_Ioo_subset' [OrderTopology α] {a : α} {s : Set α} (hl : ∃ l, l < a) (hu : ∃ u, a < u) : s ∈ 𝓝 a ↔ ∃ l u, a ∈ Ioo l u ∧ Ioo l u ⊆ s := by constructor · intro h rcases exists_Ico_subset_of_mem_nhds h hu with ⟨u, au, hu⟩ rcases exists_Ioc_subset_of_mem_nhds h hl with ⟨l, la, hl⟩ exact ⟨l, u, ⟨la, au⟩, Ioc_union_Ico_eq_Ioo la au ▸ union_subset hl hu⟩ · rintro ⟨l, u, ha, h⟩ apply mem_of_superset (Ioo_mem_nhds ha.1 ha.2) h
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
mem_nhds_iff_exists_Ioo_subset'
A set is a neighborhood of `a` if and only if it contains an interval `(l, u)` containing `a`, provided `a` is neither a bottom element nor a top element.
mem_nhds_iff_exists_Ioo_subset [OrderTopology α] [NoMaxOrder α] [NoMinOrder α] {a : α} {s : Set α} : s ∈ 𝓝 a ↔ ∃ l u, a ∈ Ioo l u ∧ Ioo l u ⊆ s := mem_nhds_iff_exists_Ioo_subset' (exists_lt a) (exists_gt a)
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
mem_nhds_iff_exists_Ioo_subset
A set is a neighborhood of `a` if and only if it contains an interval `(l, u)` containing `a`.
nhds_basis_Ioo' [OrderTopology α] {a : α} (hl : ∃ l, l < a) (hu : ∃ u, a < u) : (𝓝 a).HasBasis (fun b : α × α => b.1 < a ∧ a < b.2) fun b => Ioo b.1 b.2 := ⟨fun s => (mem_nhds_iff_exists_Ioo_subset' hl hu).trans <| by simp⟩
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
nhds_basis_Ioo'
null
nhds_basis_Ioo [OrderTopology α] [NoMaxOrder α] [NoMinOrder α] (a : α) : (𝓝 a).HasBasis (fun b : α × α => b.1 < a ∧ a < b.2) fun b => Ioo b.1 b.2 := nhds_basis_Ioo' (exists_lt a) (exists_gt a)
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
nhds_basis_Ioo
null
Filter.Eventually.exists_Ioo_subset [OrderTopology α] [NoMaxOrder α] [NoMinOrder α] {a : α} {p : α → Prop} (hp : ∀ᶠ x in 𝓝 a, p x) : ∃ l u, a ∈ Ioo l u ∧ Ioo l u ⊆ { x | p x } := mem_nhds_iff_exists_Ioo_subset.1 hp
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
Filter.Eventually.exists_Ioo_subset
null
Dense.topology_eq_generateFrom [OrderTopology α] [DenselyOrdered α] {s : Set α} (hs : Dense s) : ‹TopologicalSpace α› = .generateFrom (Ioi '' s ∪ Iio '' s) := by refine (OrderTopology.topology_eq_generate_intervals (α := α)).trans ?_ refine le_antisymm (generateFrom_anti ?_) (le_generateFrom ?_) · simp only [union_subset_iff, image_subset_iff] exact ⟨fun a _ ↦ ⟨a, .inl rfl⟩, fun a _ ↦ ⟨a, .inr rfl⟩⟩ · rintro _ ⟨a, rfl | rfl⟩ · rw [hs.Ioi_eq_biUnion] let _ := generateFrom (Ioi '' s ∪ Iio '' s) exact isOpen_iUnion fun x ↦ isOpen_iUnion fun h ↦ .basic _ <| .inl <| mem_image_of_mem _ h.1 · rw [hs.Iio_eq_biUnion] let _ := generateFrom (Ioi '' s ∪ Iio '' s) exact isOpen_iUnion fun x ↦ isOpen_iUnion fun h ↦ .basic _ <| .inr <| mem_image_of_mem _ h.1
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
Dense.topology_eq_generateFrom
null
PredOrder.hasBasis_nhds_Ioc_of_exists_gt [OrderTopology α] [PredOrder α] {a : α} (ha : ∃ u, a < u) : (𝓝 a).HasBasis (a < ·) (Set.Ico a ·) := PredOrder.nhdsGE_eq_nhds a ▸ nhdsGE_basis_of_exists_gt ha
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
PredOrder.hasBasis_nhds_Ioc_of_exists_gt
null
PredOrder.hasBasis_nhds_Ioc [OrderTopology α] [PredOrder α] [NoMaxOrder α] {a : α} : (𝓝 a).HasBasis (a < ·) (Set.Ico a ·) := PredOrder.hasBasis_nhds_Ioc_of_exists_gt (exists_gt a)
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
PredOrder.hasBasis_nhds_Ioc
null
SuccOrder.hasBasis_nhds_Ioc_of_exists_lt [OrderTopology α] [SuccOrder α] {a : α} (ha : ∃ l, l < a) : (𝓝 a).HasBasis (· < a) (Set.Ioc · a) := SuccOrder.nhdsLE_eq_nhds a ▸ nhdsLE_basis_of_exists_lt ha
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
SuccOrder.hasBasis_nhds_Ioc_of_exists_lt
null
SuccOrder.hasBasis_nhds_Ioc [OrderTopology α] [SuccOrder α] {a : α} [NoMinOrder α] : (𝓝 a).HasBasis (· < a) (Set.Ioc · a) := SuccOrder.hasBasis_nhds_Ioc_of_exists_lt (exists_lt a) variable (α) in
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
SuccOrder.hasBasis_nhds_Ioc
null
SecondCountableTopology.of_separableSpace_orderTopology [OrderTopology α] [DenselyOrdered α] [SeparableSpace α] : SecondCountableTopology α := by rcases exists_countable_dense α with ⟨s, hc, hd⟩ refine ⟨⟨_, ?_, hd.topology_eq_generateFrom⟩⟩ exact (hc.image _).union (hc.image _)
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
SecondCountableTopology.of_separableSpace_orderTopology
Let `α` be a densely ordered linear order with order topology. If `α` is a separable space, then it has second countable topology. Note that the "densely ordered" assumption cannot be dropped, see [double arrow space](https://topology.pi-base.org/spaces/S000093) for a counterexample.
countable_setOf_covBy_right [OrderTopology α] [SecondCountableTopology α] : Set.Countable { x : α | ∃ y, x ⋖ y } := by nontriviality α let s := { x : α | ∃ y, x ⋖ y } have : ∀ x ∈ s, ∃ y, x ⋖ y := fun x => id choose! y hy using this have Hy : ∀ x z, x ∈ s → z < y x → z ≤ x := fun x z hx => (hy x hx).le_of_lt suffices H : ∀ a : Set α, IsOpen a → Set.Countable { x | x ∈ s ∧ x ∈ a ∧ y x ∉ a } by have : s ⊆ ⋃ a ∈ countableBasis α, { x | x ∈ s ∧ x ∈ a ∧ y x ∉ a } := fun x hx => by rcases (isBasis_countableBasis α).exists_mem_of_ne (hy x hx).ne with ⟨a, ab, xa, ya⟩ exact mem_iUnion₂.2 ⟨a, ab, hx, xa, ya⟩ refine Set.Countable.mono this ?_ refine Countable.biUnion (countable_countableBasis α) fun a ha => H _ ?_ exact isOpen_of_mem_countableBasis ha intro a ha suffices H : Set.Countable { x | (x ∈ s ∧ x ∈ a ∧ y x ∉ a) ∧ ¬IsBot x } from H.of_diff (subsingleton_isBot α).countable simp only [and_assoc] let t := { x | x ∈ s ∧ x ∈ a ∧ y x ∉ a ∧ ¬IsBot x } have : ∀ x ∈ t, ∃ z < x, Ioc z x ⊆ a := by intro x hx apply exists_Ioc_subset_of_mem_nhds (ha.mem_nhds hx.2.1) simpa only [IsBot, not_forall, not_le] using hx.right.right.right choose! z hz h'z using this have : PairwiseDisjoint t fun x => Ioc (z x) x := fun x xt x' x't hxx' => by rcases hxx'.lt_or_gt with (h' | h') · refine disjoint_left.2 fun u ux ux' => xt.2.2.1 ?_ refine h'z x' x't ⟨ux'.1.trans_le (ux.2.trans (hy x xt.1).le), ?_⟩ by_contra! H exact lt_irrefl _ ((Hy _ _ xt.1 H).trans_lt h') · refine disjoint_left.2 fun u ux ux' => x't.2.2.1 ?_ refine h'z x xt ⟨ux.1.trans_le (ux'.2.trans (hy x' x't.1).le), ?_⟩ by_contra! H exact lt_irrefl _ ((Hy _ _ x't.1 H).trans_lt h') refine this.countable_of_isOpen (fun x hx => ?_) fun x hx => ⟨x, hz x hx, le_rfl⟩ suffices H : Ioc (z x) x = Ioo (z x) (y x) by rw [H] exact isOpen_Ioo exact Subset.antisymm (Ioc_subset_Ioo_right (hy x hx.1).lt) fun u hu => ⟨hu.1, Hy _ _ hx.1 hu.2⟩
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
countable_setOf_covBy_right
The set of points which are isolated on the right is countable when the space is second-countable.
countable_setOf_covBy_left [OrderTopology α] [SecondCountableTopology α] : Set.Countable { x : α | ∃ y, y ⋖ x } := by convert countable_setOf_covBy_right (α := αᵒᵈ) using 5 exact toDual_covBy_toDual_iff.symm
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
countable_setOf_covBy_left
The set of points which are isolated on the left is countable when the space is second-countable.
countable_of_isolated_left' [OrderTopology α] [SecondCountableTopology α] : Set.Countable { x : α | ∃ y, y < x ∧ Ioo y x = ∅ } := by simpa only [← covBy_iff_Ioo_eq] using countable_setOf_covBy_left
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
countable_of_isolated_left'
The set of points which are isolated on the left is countable when the space is second-countable.
Set.PairwiseDisjoint.countable_of_Ioo [OrderTopology α] [SecondCountableTopology α] {y : α → α} {s : Set α} (h : PairwiseDisjoint s fun x => Ioo x (y x)) (h' : ∀ x ∈ s, x < y x) : s.Countable := have : (s \ { x | ∃ y, x ⋖ y }).Countable := (h.subset diff_subset).countable_of_isOpen (fun _ _ => isOpen_Ioo) fun x hx => (h' _ hx.1).exists_lt_lt (mt (Exists.intro (y x)) hx.2) this.of_diff countable_setOf_covBy_right
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
Set.PairwiseDisjoint.countable_of_Ioo
Consider a disjoint family of intervals `(x, y)` with `x < y` in a second-countable space. Then the family is countable. This is not a straightforward consequence of second-countability as some of these intervals might be empty (but in fact this can happen only for countably many of them).
countable_image_lt_image_Ioi_within [OrderTopology α] [LinearOrder β] [SecondCountableTopology α] (t : Set β) (f : β → α) : Set.Countable {x ∈ t | ∃ z, f x < z ∧ ∀ y ∈ t, x < y → z ≤ f y} := by /- If the values of `f` are separated above on the right of `x`, there is an interval `(f x, z x)` which is not reached by `f`. This gives a family of disjoint open intervals in `α`. Such a family can only be countable as `α` is second-countable. -/ nontriviality β have : Nonempty α := Nonempty.map f (by infer_instance) let s := {x ∈ t | ∃ z, f x < z ∧ ∀ y ∈ t, x < y → z ≤ f y} have : ∀ x, x ∈ s → ∃ z, f x < z ∧ ∀ y ∈ t, x < y → z ≤ f y := fun x hx ↦ hx.2 choose! z hz using this have I : InjOn f s := by apply StrictMonoOn.injOn intro x hx y hy hxy calc f x < z x := (hz x hx).1 _ ≤ f y := (hz x hx).2 y hy.1 hxy have fs_count : (f '' s).Countable := by have A : (f '' s).PairwiseDisjoint fun x => Ioo x (z (invFunOn f s x)) := by rintro _ ⟨u, us, rfl⟩ _ ⟨v, vs, rfl⟩ huv wlog hle : u ≤ v generalizing u v · exact (this v vs u us huv.symm (le_of_not_ge hle)).symm have hlt : u < v := hle.lt_of_ne (ne_of_apply_ne _ huv) apply disjoint_iff_forall_ne.2 rintro a ha b hb rfl simp only [I.leftInvOn_invFunOn us, I.leftInvOn_invFunOn vs] at ha hb exact lt_irrefl _ ((ha.2.trans_le ((hz u us).2 v vs.1 hlt)).trans hb.1) apply Set.PairwiseDisjoint.countable_of_Ioo A rintro _ ⟨y, ys, rfl⟩ simpa only [I.leftInvOn_invFunOn ys] using (hz y ys).1 exact MapsTo.countable_of_injOn (mapsTo_image f s) I fs_count
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
countable_image_lt_image_Ioi_within
For a function taking values in a second countable space, the set of points `x` for which the image under `f` of `(x, ∞)` is separated above from `f x` is countable. We give here a version relative to a set `t`.
countable_image_lt_image_Ioi [OrderTopology α] [LinearOrder β] (f : β → α) [SecondCountableTopology α] : Set.Countable {x | ∃ z, f x < z ∧ ∀ y, x < y → z ≤ f y} := by simpa using countable_image_lt_image_Ioi_within univ f
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
countable_image_lt_image_Ioi
For a function taking values in a second countable space, the set of points `x` for which the image under `f` of `(x, ∞)` is separated above from `f x` is countable.
countable_image_gt_image_Ioi_within [OrderTopology α] [LinearOrder β] [SecondCountableTopology α] (t : Set β) (f : β → α) : Set.Countable {x ∈ t | ∃ z, z < f x ∧ ∀ y ∈ t, x < y → f y ≤ z} := countable_image_lt_image_Ioi_within (α := αᵒᵈ) t f
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
countable_image_gt_image_Ioi_within
For a function taking values in a second countable space, the set of points `x` for which the image under `f` of `(x, ∞)` is separated below from `f x` is countable. We give here a version relative to a set `t`.
countable_image_gt_image_Ioi [OrderTopology α] [LinearOrder β] (f : β → α) [SecondCountableTopology α] : Set.Countable {x | ∃ z, z < f x ∧ ∀ y, x < y → f y ≤ z} := countable_image_lt_image_Ioi (α := αᵒᵈ) f
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
countable_image_gt_image_Ioi
For a function taking values in a second countable space, the set of points `x` for which the image under `f` of `(x, ∞)` is separated below from `f x` is countable.
countable_image_lt_image_Iio_within [OrderTopology α] [LinearOrder β] [SecondCountableTopology α] (t : Set β) (f : β → α) : Set.Countable {x ∈ t | ∃ z, f x < z ∧ ∀ y ∈ t, y < x → z ≤ f y} := countable_image_lt_image_Ioi_within (β := βᵒᵈ) t f
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
countable_image_lt_image_Iio_within
For a function taking values in a second countable space, the set of points `x` for which the image under `f` of `(-∞, x)` is separated above from `f x` is countable. We give here a version relative to a set `t`.
countable_image_lt_image_Iio [OrderTopology α] [LinearOrder β] (f : β → α) [SecondCountableTopology α] : Set.Countable {x | ∃ z, f x < z ∧ ∀ y, y < x → z ≤ f y} := countable_image_lt_image_Ioi (β := βᵒᵈ) f
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
countable_image_lt_image_Iio
For a function taking values in a second countable space, the set of points `x` for which the image under `f` of `(-∞, x)` is separated above from `f x` is countable.
countable_image_gt_image_Iio_within [OrderTopology α] [LinearOrder β] [SecondCountableTopology α] (t : Set β) (f : β → α) : Set.Countable {x ∈ t | ∃ z, z < f x ∧ ∀ y ∈ t, y < x → f y ≤ z} := countable_image_lt_image_Ioi_within (α := αᵒᵈ) (β := βᵒᵈ) t f
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
countable_image_gt_image_Iio_within
For a function taking values in a second countable space, the set of points `x` for which the image under `f` of `(-∞, x)` is separated below from `f x` is countable. We give here a version relative to a set `t`.
countable_image_gt_image_Iio [OrderTopology α] [LinearOrder β] (f : β → α) [SecondCountableTopology α] : Set.Countable {x | ∃ z, z < f x ∧ ∀ y, y < x → f y ≤ z} := countable_image_lt_image_Ioi (α := αᵒᵈ) (β := βᵒᵈ) f
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
countable_image_gt_image_Iio
For a function taking values in a second countable space, the set of points `x` for which the image under `f` of `(-∞, x)` is separated below from `f x` is countable.
instIsCountablyGenerated_atTop [OrderTopology α] [SecondCountableTopology α] : IsCountablyGenerated (atTop : Filter α) := by by_cases h : ∃ (x : α), IsTop x · rcases h with ⟨x, hx⟩ rw [atTop_eq_pure_of_isTop hx] exact isCountablyGenerated_pure x · rcases exists_countable_basis α with ⟨b, b_count, b_ne, hb⟩ have : Countable b := by exact Iff.mpr countable_coe_iff b_count have A : ∀ (s : b), ∃ (x : α), x ∈ (s : Set α) := by intro s have : (s : Set α) ≠ ∅ := by intro H apply b_ne convert s.2 exact H.symm exact Iff.mp notMem_singleton_empty this choose a ha using A have : (atTop : Filter α) = (generate (Ici '' (range a))) := by apply atTop_eq_generate_of_not_bddAbove intro ⟨x, hx⟩ simp only [IsTop, not_exists, not_forall, not_le] at h rcases h x with ⟨y, hy⟩ obtain ⟨s, sb, -, hs⟩ : ∃ s, s ∈ b ∧ y ∈ s ∧ s ⊆ Ioi x := hb.exists_subset_of_mem_open hy isOpen_Ioi have I : a ⟨s, sb⟩ ≤ x := hx (mem_range_self _) have J : x < a ⟨s, sb⟩ := hs (ha ⟨s, sb⟩) exact lt_irrefl _ (I.trans_lt J) rw [this] exact ⟨_, (countable_range _).image _, rfl⟩
instance
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
instIsCountablyGenerated_atTop
null
instIsCountablyGenerated_atBot [OrderTopology α] [SecondCountableTopology α] : IsCountablyGenerated (atBot : Filter α) := @instIsCountablyGenerated_atTop αᵒᵈ _ _ _ _
instance
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
instIsCountablyGenerated_atBot
null
pi_Iic_mem_nhds (ha : ∀ i, x i < a i) : Iic a ∈ 𝓝 x := pi_univ_Iic a ▸ set_pi_mem_nhds (Set.toFinite _) fun _ _ => Iic_mem_nhds (ha _)
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
pi_Iic_mem_nhds
null
pi_Iic_mem_nhds' (ha : ∀ i, x' i < a' i) : Iic a' ∈ 𝓝 x' := pi_Iic_mem_nhds ha
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
pi_Iic_mem_nhds'
null
pi_Ici_mem_nhds (ha : ∀ i, a i < x i) : Ici a ∈ 𝓝 x := pi_univ_Ici a ▸ set_pi_mem_nhds (Set.toFinite _) fun _ _ => Ici_mem_nhds (ha _)
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
pi_Ici_mem_nhds
null
pi_Ici_mem_nhds' (ha : ∀ i, a' i < x' i) : Ici a' ∈ 𝓝 x' := pi_Ici_mem_nhds ha
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
pi_Ici_mem_nhds'
null
pi_Icc_mem_nhds (ha : ∀ i, a i < x i) (hb : ∀ i, x i < b i) : Icc a b ∈ 𝓝 x := pi_univ_Icc a b ▸ set_pi_mem_nhds finite_univ fun _ _ => Icc_mem_nhds (ha _) (hb _)
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
pi_Icc_mem_nhds
null
pi_Icc_mem_nhds' (ha : ∀ i, a' i < x' i) (hb : ∀ i, x' i < b' i) : Icc a' b' ∈ 𝓝 x' := pi_Icc_mem_nhds ha hb variable [Nonempty ι]
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
pi_Icc_mem_nhds'
null
pi_Iio_mem_nhds (ha : ∀ i, x i < a i) : Iio a ∈ 𝓝 x := mem_of_superset (set_pi_mem_nhds finite_univ fun i _ ↦ Iio_mem_nhds (ha i)) (pi_univ_Iio_subset a)
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
pi_Iio_mem_nhds
null
pi_Iio_mem_nhds' (ha : ∀ i, x' i < a' i) : Iio a' ∈ 𝓝 x' := pi_Iio_mem_nhds ha
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
pi_Iio_mem_nhds'
null
pi_Ioi_mem_nhds (ha : ∀ i, a i < x i) : Ioi a ∈ 𝓝 x := pi_Iio_mem_nhds (X := fun i => (X i)ᵒᵈ) ha
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
pi_Ioi_mem_nhds
null
pi_Ioi_mem_nhds' (ha : ∀ i, a' i < x' i) : Ioi a' ∈ 𝓝 x' := pi_Ioi_mem_nhds ha
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
pi_Ioi_mem_nhds'
null
pi_Ioc_mem_nhds (ha : ∀ i, a i < x i) (hb : ∀ i, x i < b i) : Ioc a b ∈ 𝓝 x := by refine mem_of_superset (set_pi_mem_nhds Set.finite_univ fun i _ => ?_) (pi_univ_Ioc_subset a b) exact Ioc_mem_nhds (ha i) (hb i)
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
pi_Ioc_mem_nhds
null
pi_Ioc_mem_nhds' (ha : ∀ i, a' i < x' i) (hb : ∀ i, x' i < b' i) : Ioc a' b' ∈ 𝓝 x' := pi_Ioc_mem_nhds ha hb
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
pi_Ioc_mem_nhds'
null
pi_Ico_mem_nhds (ha : ∀ i, a i < x i) (hb : ∀ i, x i < b i) : Ico a b ∈ 𝓝 x := by refine mem_of_superset (set_pi_mem_nhds Set.finite_univ fun i _ => ?_) (pi_univ_Ico_subset a b) exact Ico_mem_nhds (ha i) (hb i)
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
pi_Ico_mem_nhds
null
pi_Ico_mem_nhds' (ha : ∀ i, a' i < x' i) (hb : ∀ i, x' i < b' i) : Ico a' b' ∈ 𝓝 x' := pi_Ico_mem_nhds ha hb
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
pi_Ico_mem_nhds'
null
pi_Ioo_mem_nhds (ha : ∀ i, a i < x i) (hb : ∀ i, x i < b i) : Ioo a b ∈ 𝓝 x := by refine mem_of_superset (set_pi_mem_nhds Set.finite_univ fun i _ => ?_) (pi_univ_Ioo_subset a b) exact Ioo_mem_nhds (ha i) (hb i)
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
pi_Ioo_mem_nhds
null
pi_Ioo_mem_nhds' (ha : ∀ i, a' i < x' i) (hb : ∀ i, x' i < b' i) : Ioo a' b' ∈ 𝓝 x' := pi_Ioo_mem_nhds ha hb
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
pi_Ioo_mem_nhds'
null
LeftOrdContinuous.continuousWithinAt_Iic (hf : LeftOrdContinuous f) : ContinuousWithinAt f (Iic x) x := by rw [ContinuousWithinAt, OrderTopology.topology_eq_generate_intervals (α := Y)] simp_rw [TopologicalSpace.tendsto_nhds_generateFrom_iff, mem_nhdsWithin] rintro V ⟨z, rfl | rfl⟩ hxz · obtain ⟨_, ⟨a, hax, rfl⟩, hza⟩ := (lt_isLUB_iff <| hf isLUB_Iio).mp hxz exact ⟨Ioi a, isOpen_Ioi, hax, fun b hab ↦ hza.trans_le <| hf.mono hab.1.le⟩ · exact ⟨univ, isOpen_univ, trivial, fun a ha ↦ (hf.mono ha.2).trans_lt hxz⟩
lemma
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
LeftOrdContinuous.continuousWithinAt_Iic
An order-theoretically left-continuous function is topologically left-continuous, assuming the function is between conditionally complete linear orders with order topologies, and the domain is densely ordered.
RightOrdContinuous.continuousWithinAt_Ici (hf : RightOrdContinuous f) : ContinuousWithinAt f (Ici x) x := hf.orderDual.continuousWithinAt_Iic
lemma
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
RightOrdContinuous.continuousWithinAt_Ici
An order-theoretically right-continuous function is topologically right-continuous, assuming the function is between conditionally complete linear orders with order topologies, and the domain is densely ordered.
orderBornology : Bornology α := .ofBounded {s | BddBelow s ∧ BddAbove s} (by simp) (fun _ hs _ hst ↦ ⟨hs.1.mono hst, hs.2.mono hst⟩) (fun _ hs _ ht ↦ ⟨hs.1.union ht.1, hs.2.union ht.2⟩) (by simp) @[simp] lemma orderBornology_isBounded : orderBornology.IsBounded s ↔ BddBelow s ∧ BddAbove s := by simp [IsBounded, IsCobounded, -isCobounded_compl_iff]
def
Topology
[ "Mathlib.Topology.Bornology.Constructions" ]
Mathlib/Topology/Order/Bornology.lean
orderBornology
Order-bornology on a nonempty lattice. The bounded sets are the sets that are bounded both above and below.
IsOrderBornology : Prop where protected isBounded_iff_bddBelow_bddAbove (s : Set α) : IsBounded s ↔ BddBelow s ∧ BddAbove s
class
Topology
[ "Mathlib.Topology.Bornology.Constructions" ]
Mathlib/Topology/Order/Bornology.lean
IsOrderBornology
Predicate for a preorder to be equipped with its order-bornology, namely for its bounded sets to be the ones that are bounded both above and below.
isOrderBornology_iff_eq_orderBornology [Lattice α] [Nonempty α] : IsOrderBornology α ↔ ‹Bornology α› = orderBornology := by refine ⟨fun h ↦ ?_, fun h ↦ ⟨fun s ↦ by rw [h, orderBornology_isBounded]⟩⟩ ext s exact isBounded_compl_iff.symm.trans (h.1 _)
lemma
Topology
[ "Mathlib.Topology.Bornology.Constructions" ]
Mathlib/Topology/Order/Bornology.lean
isOrderBornology_iff_eq_orderBornology
null
isBounded_iff_bddBelow_bddAbove : IsBounded s ↔ BddBelow s ∧ BddAbove s := IsOrderBornology.isBounded_iff_bddBelow_bddAbove _
lemma
Topology
[ "Mathlib.Topology.Bornology.Constructions" ]
Mathlib/Topology/Order/Bornology.lean
isBounded_iff_bddBelow_bddAbove
null
protected Bornology.IsBounded.bddBelow (hs : IsBounded s) : BddBelow s := (isBounded_iff_bddBelow_bddAbove.1 hs).1
lemma
Topology
[ "Mathlib.Topology.Bornology.Constructions" ]
Mathlib/Topology/Order/Bornology.lean
Bornology.IsBounded.bddBelow
null
protected Bornology.IsBounded.bddAbove (hs : IsBounded s) : BddAbove s := (isBounded_iff_bddBelow_bddAbove.1 hs).2
lemma
Topology
[ "Mathlib.Topology.Bornology.Constructions" ]
Mathlib/Topology/Order/Bornology.lean
Bornology.IsBounded.bddAbove
null
protected BddBelow.isBounded (hs₀ : BddBelow s) (hs₁ : BddAbove s) : IsBounded s := isBounded_iff_bddBelow_bddAbove.2 ⟨hs₀, hs₁⟩
lemma
Topology
[ "Mathlib.Topology.Bornology.Constructions" ]
Mathlib/Topology/Order/Bornology.lean
BddBelow.isBounded
null
protected BddAbove.isBounded (hs₀ : BddAbove s) (hs₁ : BddBelow s) : IsBounded s := isBounded_iff_bddBelow_bddAbove.2 ⟨hs₁, hs₀⟩
lemma
Topology
[ "Mathlib.Topology.Bornology.Constructions" ]
Mathlib/Topology/Order/Bornology.lean
BddAbove.isBounded
null
BddBelow.isBounded_inter (hs : BddBelow s) (ht : BddAbove t) : IsBounded (s ∩ t) := (hs.mono inter_subset_left).isBounded <| ht.mono inter_subset_right
lemma
Topology
[ "Mathlib.Topology.Bornology.Constructions" ]
Mathlib/Topology/Order/Bornology.lean
BddBelow.isBounded_inter
null
BddAbove.isBounded_inter (hs : BddAbove s) (ht : BddBelow t) : IsBounded (s ∩ t) := (hs.mono inter_subset_left).isBounded <| ht.mono inter_subset_right
lemma
Topology
[ "Mathlib.Topology.Bornology.Constructions" ]
Mathlib/Topology/Order/Bornology.lean
BddAbove.isBounded_inter
null
OrderDual.instIsOrderBornology : IsOrderBornology αᵒᵈ where isBounded_iff_bddBelow_bddAbove s := by rw [← isBounded_preimage_toDual, ← bddBelow_preimage_toDual, ← bddAbove_preimage_toDual, isBounded_iff_bddBelow_bddAbove, and_comm]
instance
Topology
[ "Mathlib.Topology.Bornology.Constructions" ]
Mathlib/Topology/Order/Bornology.lean
OrderDual.instIsOrderBornology
null
Prod.instIsOrderBornology {β : Type*} [Preorder β] [Bornology β] [IsOrderBornology β] : IsOrderBornology (α × β) where isBounded_iff_bddBelow_bddAbove s := by rw [← isBounded_image_fst_and_snd, bddBelow_prod, bddAbove_prod, and_and_and_comm, isBounded_iff_bddBelow_bddAbove, isBounded_iff_bddBelow_bddAbove]
instance
Topology
[ "Mathlib.Topology.Bornology.Constructions" ]
Mathlib/Topology/Order/Bornology.lean
Prod.instIsOrderBornology
null
Pi.instIsOrderBornology {ι : Type*} {α : ι → Type*} [∀ i, Preorder (α i)] [∀ i, Bornology (α i)] [∀ i, IsOrderBornology (α i)] : IsOrderBornology (∀ i, α i) where isBounded_iff_bddBelow_bddAbove s := by simp_rw [← forall_isBounded_image_eval_iff, bddBelow_pi, bddAbove_pi, ← forall_and, isBounded_iff_bddBelow_bddAbove]
instance
Topology
[ "Mathlib.Topology.Bornology.Constructions" ]
Mathlib/Topology/Order/Bornology.lean
Pi.instIsOrderBornology
null
protected Bornology.IsBounded.subset_Icc_sInf_sSup (hs : IsBounded s) : s ⊆ Icc (sInf s) (sSup s) := subset_Icc_csInf_csSup hs.bddBelow hs.bddAbove
lemma
Topology
[ "Mathlib.Topology.Bornology.Constructions" ]
Mathlib/Topology/Order/Bornology.lean
Bornology.IsBounded.subset_Icc_sInf_sSup
null
CompactIccSpace (α : Type*) [TopologicalSpace α] [Preorder α] : Prop where /-- A closed interval `Set.Icc a b` is a compact set for all `a` and `b`. -/ isCompact_Icc : ∀ {a b : α}, IsCompact (Icc a b) export CompactIccSpace (isCompact_Icc) variable {α : Type*}
class
Topology
[ "Mathlib.Topology.Algebra.Support", "Mathlib.Topology.Order.IntermediateValue", "Mathlib.Topology.Order.IsLUB", "Mathlib.Topology.Order.LocalExtr" ]
Mathlib/Topology/Order/Compact.lean
CompactIccSpace
This typeclass says that all closed intervals in `α` are compact. This is true for all conditionally complete linear orders with order topology and products (finite or infinite) of such spaces.
CompactIccSpace.mk' [TopologicalSpace α] [Preorder α] (h : ∀ {a b : α}, a ≤ b → IsCompact (Icc a b)) : CompactIccSpace α where isCompact_Icc {a b} := by_cases h fun hab => by rw [Icc_eq_empty hab]; exact isCompact_empty
lemma
Topology
[ "Mathlib.Topology.Algebra.Support", "Mathlib.Topology.Order.IntermediateValue", "Mathlib.Topology.Order.IsLUB", "Mathlib.Topology.Order.LocalExtr" ]
Mathlib/Topology/Order/Compact.lean
CompactIccSpace.mk'
null
CompactIccSpace.mk'' [TopologicalSpace α] [PartialOrder α] (h : ∀ {a b : α}, a < b → IsCompact (Icc a b)) : CompactIccSpace α := .mk' fun hab => hab.eq_or_lt.elim (by rintro rfl; simp) h
lemma
Topology
[ "Mathlib.Topology.Algebra.Support", "Mathlib.Topology.Order.IntermediateValue", "Mathlib.Topology.Order.IsLUB", "Mathlib.Topology.Order.LocalExtr" ]
Mathlib/Topology/Order/Compact.lean
CompactIccSpace.mk''
null
isCompact_uIcc {α : Type*} [LinearOrder α] [TopologicalSpace α] [CompactIccSpace α] {a b : α} : IsCompact (uIcc a b) := isCompact_Icc
theorem
Topology
[ "Mathlib.Topology.Algebra.Support", "Mathlib.Topology.Order.IntermediateValue", "Mathlib.Topology.Order.IsLUB", "Mathlib.Topology.Order.LocalExtr" ]
Mathlib/Topology/Order/Compact.lean
isCompact_uIcc
A closed interval in a conditionally complete linear order is compact. -/ instance (priority := 100) ConditionallyCompleteLinearOrder.toCompactIccSpace (α : Type*) [ConditionallyCompleteLinearOrder α] [TopologicalSpace α] [OrderTopology α] : CompactIccSpace α := by refine .mk'' fun {a b} hlt => ?_ rcases le_or_gt a b with hab | hab swap · simp [hab] refine isCompact_iff_ultrafilter_le_nhds.2 fun f hf => ?_ contrapose! hf rw [le_principal_iff] have hpt : ∀ x ∈ Icc a b, {x} ∉ f := fun x hx hxf => hf x hx ((le_pure_iff.2 hxf).trans (pure_le_nhds x)) set s := { x ∈ Icc a b | Icc a x ∉ f } have hsb : b ∈ upperBounds s := fun x hx => hx.1.2 have sbd : BddAbove s := ⟨b, hsb⟩ have ha : a ∈ s := by simp [s, hpt, hab] rcases hab.eq_or_lt with (rfl | _hlt) · exact ha.2 let c := sSup s have hsc : IsLUB s c := isLUB_csSup ⟨a, ha⟩ ⟨b, hsb⟩ have hc : c ∈ Icc a b := ⟨hsc.1 ha, hsc.2 hsb⟩ specialize hf c hc have hcs : c ∈ s := by -- rcases ... with (rfl | ... ) fails here, rewrite manually. rcases hc.1.eq_or_lt with (h | hlt) · rwa [h] at ha refine ⟨hc, fun hcf => hf fun U hU => ?_⟩ rcases (mem_nhdsLE_iff_exists_Ioc_subset' hlt).1 (mem_nhdsWithin_of_mem_nhds hU) with ⟨x, hxc, hxU⟩ rcases ((hsc.frequently_mem ⟨a, ha⟩).and_eventually (Ioc_mem_nhdsLE hxc)).exists with ⟨y, ⟨_hyab, hyf⟩, hy⟩ refine mem_of_superset (f.diff_mem_iff.2 ⟨hcf, hyf⟩) (Subset.trans ?_ hxU) rw [diff_subset_iff] exact Subset.trans Icc_subset_Icc_union_Ioc <| union_subset_union Subset.rfl <| Ioc_subset_Ioc_left hy.1.le -- rcases ... with (rfl | ... ) fails here, rewrite manually. rcases hc.2.eq_or_lt with (h | hlt) · simpa [h] using hcs.2 exfalso refine hf fun U hU => ?_ rcases (mem_nhdsGE_iff_exists_mem_Ioc_Ico_subset hlt).1 (mem_nhdsWithin_of_mem_nhds hU) with ⟨y, hxy, hyU⟩ refine mem_of_superset ?_ hyU; clear! U have hy : y ∈ Icc a b := ⟨hc.1.trans hxy.1.le, hxy.2⟩ by_cases hay : Icc a y ∈ f · refine mem_of_superset (f.diff_mem_iff.2 ⟨f.diff_mem_iff.2 ⟨hay, hcs.2⟩, hpt y hy⟩) ?_ rw [diff_subset_iff, union_comm, Ico_union_right hxy.1.le, diff_subset_iff] exact Icc_subset_Icc_union_Icc · exact ((hsc.1 ⟨hy, hay⟩).not_gt hxy.1).elim instance {ι : Type*} {α : ι → Type*} [∀ i, Preorder (α i)] [∀ i, TopologicalSpace (α i)] [∀ i, CompactIccSpace (α i)] : CompactIccSpace (∀ i, α i) := ⟨fun {a b} => (pi_univ_Icc a b ▸ isCompact_univ_pi) fun _ => isCompact_Icc⟩ instance Pi.compact_Icc_space' {α β : Type*} [Preorder β] [TopologicalSpace β] [CompactIccSpace β] : CompactIccSpace (α → β) := inferInstance instance {α β : Type*} [Preorder α] [TopologicalSpace α] [CompactIccSpace α] [Preorder β] [TopologicalSpace β] [CompactIccSpace β] : CompactIccSpace (α × β) := ⟨fun {a b} => (Icc_prod_eq a b).symm ▸ isCompact_Icc.prod isCompact_Icc⟩ /-- An unordered closed interval is compact.
@[simp] isCompact_Ico_iff {a b : α} : IsCompact (Set.Ico a b) ↔ b ≤ a := ⟨fun h => isClosed_Ico_iff.mp h.isClosed, by simp_all⟩
theorem
Topology
[ "Mathlib.Topology.Algebra.Support", "Mathlib.Topology.Order.IntermediateValue", "Mathlib.Topology.Order.IsLUB", "Mathlib.Topology.Order.LocalExtr" ]
Mathlib/Topology/Order/Compact.lean
isCompact_Ico_iff
A complete linear order is a compact space. We do not register an instance for a `[CompactIccSpace α]` because this would only add instances for products (indexed or not) of complete linear orders, and we have instances with higher priority that cover these cases. -/ instance (priority := 100) compactSpace_of_completeLinearOrder {α : Type*} [CompleteLinearOrder α] [TopologicalSpace α] [OrderTopology α] : CompactSpace α := ⟨by simp only [← Icc_bot_top, isCompact_Icc]⟩ section variable {α : Type*} [Preorder α] [TopologicalSpace α] [CompactIccSpace α] instance compactSpace_Icc (a b : α) : CompactSpace (Icc a b) := isCompact_iff_compactSpace.mp isCompact_Icc end section openIntervals variable {α : Type*} [LinearOrder α] [TopologicalSpace α] [OrderTopology α] [DenselyOrdered α] /-- `Set.Ico a b` is only compact if it is empty.
@[simp] isCompact_Ioc_iff {a b : α} : IsCompact (Set.Ioc a b) ↔ b ≤ a := ⟨fun h => isClosed_Ioc_iff.mp h.isClosed, by simp_all⟩
theorem
Topology
[ "Mathlib.Topology.Algebra.Support", "Mathlib.Topology.Order.IntermediateValue", "Mathlib.Topology.Order.IsLUB", "Mathlib.Topology.Order.LocalExtr" ]
Mathlib/Topology/Order/Compact.lean
isCompact_Ioc_iff
`Set.Ioc a b` is only compact if it is empty.
@[simp] isCompact_Ioo_iff {a b : α} : IsCompact (Set.Ioo a b) ↔ b ≤ a := ⟨fun h => isClosed_Ioo_iff.mp h.isClosed, by simp_all⟩
theorem
Topology
[ "Mathlib.Topology.Algebra.Support", "Mathlib.Topology.Order.IntermediateValue", "Mathlib.Topology.Order.IsLUB", "Mathlib.Topology.Order.LocalExtr" ]
Mathlib/Topology/Order/Compact.lean
isCompact_Ioo_iff
`Set.Ioo a b` is only compact if it is empty.
IsCompact.exists_isLeast [ClosedIicTopology α] {s : Set α} (hs : IsCompact s) (ne_s : s.Nonempty) : ∃ x, IsLeast s x := by haveI : Nonempty s := ne_s.to_subtype suffices (s ∩ ⋂ x ∈ s, Iic x).Nonempty from ⟨this.choose, this.choose_spec.1, mem_iInter₂.mp this.choose_spec.2⟩ rw [biInter_eq_iInter] by_contra H rw [not_nonempty_iff_eq_empty] at H rcases hs.elim_directed_family_closed (fun x : s => Iic ↑x) (fun x => isClosed_Iic) H (Monotone.directed_ge fun _ _ h => Iic_subset_Iic.mpr h) with ⟨x, hx⟩ exact not_nonempty_iff_eq_empty.mpr hx ⟨x, x.2, le_rfl⟩
theorem
Topology
[ "Mathlib.Topology.Algebra.Support", "Mathlib.Topology.Order.IntermediateValue", "Mathlib.Topology.Order.IsLUB", "Mathlib.Topology.Order.LocalExtr" ]
Mathlib/Topology/Order/Compact.lean
IsCompact.exists_isLeast
null
IsCompact.exists_isGreatest [ClosedIciTopology α] {s : Set α} (hs : IsCompact s) (ne_s : s.Nonempty) : ∃ x, IsGreatest s x := IsCompact.exists_isLeast (α := αᵒᵈ) hs ne_s
theorem
Topology
[ "Mathlib.Topology.Algebra.Support", "Mathlib.Topology.Order.IntermediateValue", "Mathlib.Topology.Order.IsLUB", "Mathlib.Topology.Order.LocalExtr" ]
Mathlib/Topology/Order/Compact.lean
IsCompact.exists_isGreatest
null
IsCompact.exists_isGLB [ClosedIicTopology α] {s : Set α} (hs : IsCompact s) (ne_s : s.Nonempty) : ∃ x ∈ s, IsGLB s x := (hs.exists_isLeast ne_s).imp (fun x (hx : IsLeast s x) => ⟨hx.1, hx.isGLB⟩)
theorem
Topology
[ "Mathlib.Topology.Algebra.Support", "Mathlib.Topology.Order.IntermediateValue", "Mathlib.Topology.Order.IsLUB", "Mathlib.Topology.Order.LocalExtr" ]
Mathlib/Topology/Order/Compact.lean
IsCompact.exists_isGLB
null
IsCompact.exists_isLUB [ClosedIciTopology α] {s : Set α} (hs : IsCompact s) (ne_s : s.Nonempty) : ∃ x ∈ s, IsLUB s x := IsCompact.exists_isGLB (α := αᵒᵈ) hs ne_s
theorem
Topology
[ "Mathlib.Topology.Algebra.Support", "Mathlib.Topology.Order.IntermediateValue", "Mathlib.Topology.Order.IsLUB", "Mathlib.Topology.Order.LocalExtr" ]
Mathlib/Topology/Order/Compact.lean
IsCompact.exists_isLUB
null
cocompact_le_atBot_atTop [CompactIccSpace α] : cocompact α ≤ atBot ⊔ atTop := by refine fun s hs ↦ mem_cocompact.mpr <| (isEmpty_or_nonempty α).casesOn ?_ ?_ <;> intro · exact ⟨∅, isCompact_empty, fun x _ ↦ (IsEmpty.false x).elim⟩ · obtain ⟨t, ht⟩ := mem_atBot_sets.mp hs.1 obtain ⟨u, hu⟩ := mem_atTop_sets.mp hs.2 refine ⟨Icc t u, isCompact_Icc, fun x hx ↦ ?_⟩ exact (not_and_or.mp hx).casesOn (fun h ↦ ht x (le_of_not_ge h)) fun h ↦ hu x (le_of_not_ge h)
theorem
Topology
[ "Mathlib.Topology.Algebra.Support", "Mathlib.Topology.Order.IntermediateValue", "Mathlib.Topology.Order.IsLUB", "Mathlib.Topology.Order.LocalExtr" ]
Mathlib/Topology/Order/Compact.lean
cocompact_le_atBot_atTop
null
cocompact_le_atBot [OrderTop α] [CompactIccSpace α] : cocompact α ≤ atBot := by refine fun _ hs ↦ mem_cocompact.mpr <| (isEmpty_or_nonempty α).casesOn ?_ ?_ <;> intro · exact ⟨∅, isCompact_empty, fun x _ ↦ (IsEmpty.false x).elim⟩ · obtain ⟨t, ht⟩ := mem_atBot_sets.mp hs refine ⟨Icc t ⊤, isCompact_Icc, fun _ hx ↦ ?_⟩ exact (not_and_or.mp hx).casesOn (fun h ↦ ht _ (le_of_not_ge h)) (fun h ↦ (h le_top).elim)
theorem
Topology
[ "Mathlib.Topology.Algebra.Support", "Mathlib.Topology.Order.IntermediateValue", "Mathlib.Topology.Order.IsLUB", "Mathlib.Topology.Order.LocalExtr" ]
Mathlib/Topology/Order/Compact.lean
cocompact_le_atBot
null
cocompact_le_atTop [OrderBot α] [CompactIccSpace α] : cocompact α ≤ atTop := cocompact_le_atBot (α := αᵒᵈ)
theorem
Topology
[ "Mathlib.Topology.Algebra.Support", "Mathlib.Topology.Order.IntermediateValue", "Mathlib.Topology.Order.IsLUB", "Mathlib.Topology.Order.LocalExtr" ]
Mathlib/Topology/Order/Compact.lean
cocompact_le_atTop
null
atBot_le_cocompact [NoMinOrder α] [ClosedIicTopology α] : atBot ≤ cocompact α := by refine fun s hs ↦ ?_ obtain ⟨t, ht, hts⟩ := mem_cocompact.mp hs refine (Set.eq_empty_or_nonempty t).casesOn (fun h_empty ↦ ?_) (fun h_nonempty ↦ ?_) · rewrite [compl_univ_iff.mpr h_empty, univ_subset_iff] at hts convert univ_mem · haveI := h_nonempty.nonempty obtain ⟨a, ha⟩ := ht.exists_isLeast h_nonempty obtain ⟨b, hb⟩ := exists_lt a exact Filter.mem_atBot_sets.mpr ⟨b, fun b' hb' ↦ hts <| Classical.byContradiction fun hc ↦ LT.lt.false <| hb'.trans_lt <| hb.trans_le <| ha.2 (not_notMem.mp hc)⟩
theorem
Topology
[ "Mathlib.Topology.Algebra.Support", "Mathlib.Topology.Order.IntermediateValue", "Mathlib.Topology.Order.IsLUB", "Mathlib.Topology.Order.LocalExtr" ]
Mathlib/Topology/Order/Compact.lean
atBot_le_cocompact
null
atTop_le_cocompact [NoMaxOrder α] [ClosedIciTopology α] : atTop ≤ cocompact α := atBot_le_cocompact (α := αᵒᵈ)
theorem
Topology
[ "Mathlib.Topology.Algebra.Support", "Mathlib.Topology.Order.IntermediateValue", "Mathlib.Topology.Order.IsLUB", "Mathlib.Topology.Order.LocalExtr" ]
Mathlib/Topology/Order/Compact.lean
atTop_le_cocompact
null