state
stringlengths
0
159k
srcUpToTactic
stringlengths
387
167k
nextTactic
stringlengths
3
9k
declUpToTactic
stringlengths
22
11.5k
declId
stringlengths
38
95
decl
stringlengths
16
1.89k
file_tag
stringlengths
17
73
α : Type u β : Type v γ : Type w ⊢ atBot ≤ cocompact ℝ
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by
simp
theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by
Mathlib.Topology.Instances.Real.82_0.cAejORboOY2cNtK
theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ
Mathlib_Topology_Instances_Real
α : Type u β : Type v γ : Type w ⊢ atTop ≤ cocompact ℝ
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by
simp
theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by
Mathlib.Topology.Instances.Real.83_0.cAejORboOY2cNtK
theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ
Mathlib_Topology_Instances_Real
α : Type u β : Type v γ : Type w s : Set ℝ x : ℝ ⊢ x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by
simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq]
theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by
Mathlib.Topology.Instances.Real.91_0.cAejORboOY2cNtK
theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε
Mathlib_Topology_Instances_Real
α : Type u β : Type v γ : Type w ⊢ CompleteSpace ℝ
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by
apply complete_of_cauchySeq_tendsto
instance : CompleteSpace ℝ := by
Mathlib.Topology.Instances.Real.142_0.cAejORboOY2cNtK
instance : CompleteSpace ℝ
Mathlib_Topology_Instances_Real
case a α : Type u β : Type v γ : Type w ⊢ ∀ (u : ℕ → ℝ), CauchySeq u → ∃ a, Tendsto u atTop (𝓝 a)
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto
intro u hu
instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto
Mathlib.Topology.Instances.Real.142_0.cAejORboOY2cNtK
instance : CompleteSpace ℝ
Mathlib_Topology_Instances_Real
case a α : Type u β : Type v γ : Type w u : ℕ → ℝ hu : CauchySeq u ⊢ ∃ a, Tendsto u atTop (𝓝 a)
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu
let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩
instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu
Mathlib.Topology.Instances.Real.142_0.cAejORboOY2cNtK
instance : CompleteSpace ℝ
Mathlib_Topology_Instances_Real
case a α : Type u β : Type v γ : Type w u : ℕ → ℝ hu : CauchySeq u c : CauSeq ℝ abs := { val := u, property := (_ : ∀ ε > 0, ∃ N, ∀ n ≥ N, dist (u n) (u N) < ε) } ⊢ ∃ a, Tendsto u atTop (𝓝 a)
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩
refine' ⟨c.lim, fun s h => _⟩
instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩
Mathlib.Topology.Instances.Real.142_0.cAejORboOY2cNtK
instance : CompleteSpace ℝ
Mathlib_Topology_Instances_Real
case a α : Type u β : Type v γ : Type w u : ℕ → ℝ hu : CauchySeq u c : CauSeq ℝ abs := { val := u, property := (_ : ∀ ε > 0, ∃ N, ∀ n ≥ N, dist (u n) (u N) < ε) } s : Set ℝ h : s ∈ 𝓝 (CauSeq.lim c) ⊢ s ∈ map u atTop
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩
rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩
instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩
Mathlib.Topology.Instances.Real.142_0.cAejORboOY2cNtK
instance : CompleteSpace ℝ
Mathlib_Topology_Instances_Real
case a.intro.intro α : Type u β : Type v γ : Type w u : ℕ → ℝ hu : CauchySeq u c : CauSeq ℝ abs := { val := u, property := (_ : ∀ ε > 0, ∃ N, ∀ n ≥ N, dist (u n) (u N) < ε) } s : Set ℝ h : s ∈ 𝓝 (CauSeq.lim c) ε : ℝ ε0 : ε > 0 hε : ball (CauSeq.lim c) ε ⊆ s ⊢ s ∈ map u atTop
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩ rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩
have := c.equiv_lim ε ε0
instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩ rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩
Mathlib.Topology.Instances.Real.142_0.cAejORboOY2cNtK
instance : CompleteSpace ℝ
Mathlib_Topology_Instances_Real
case a.intro.intro α : Type u β : Type v γ : Type w u : ℕ → ℝ hu : CauchySeq u c : CauSeq ℝ abs := { val := u, property := (_ : ∀ ε > 0, ∃ N, ∀ n ≥ N, dist (u n) (u N) < ε) } s : Set ℝ h : s ∈ 𝓝 (CauSeq.lim c) ε : ℝ ε0 : ε > 0 hε : ball (CauSeq.lim c) ε ⊆ s this : ∃ i, ∀ j ≥ i, |↑(c - CauSeq.const abs (CauSeq.lim c)) j| < ε ⊢ s ∈ map u atTop
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩ rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩ have := c.equiv_lim ε ε0
simp only [mem_map, mem_atTop_sets, mem_setOf_eq]
instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩ rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩ have := c.equiv_lim ε ε0
Mathlib.Topology.Instances.Real.142_0.cAejORboOY2cNtK
instance : CompleteSpace ℝ
Mathlib_Topology_Instances_Real
case a.intro.intro α : Type u β : Type v γ : Type w u : ℕ → ℝ hu : CauchySeq u c : CauSeq ℝ abs := { val := u, property := (_ : ∀ ε > 0, ∃ N, ∀ n ≥ N, dist (u n) (u N) < ε) } s : Set ℝ h : s ∈ 𝓝 (CauSeq.lim c) ε : ℝ ε0 : ε > 0 hε : ball (CauSeq.lim c) ε ⊆ s this : ∃ i, ∀ j ≥ i, |↑(c - CauSeq.const abs (CauSeq.lim c)) j| < ε ⊢ ∃ a, ∀ b ≥ a, b ∈ u ⁻¹' s
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩ rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩ have := c.equiv_lim ε ε0 simp only [mem_map, mem_atTop_sets, mem_setOf_eq]
refine' this.imp fun N hN n hn => hε (hN n hn)
instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩ rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩ have := c.equiv_lim ε ε0 simp only [mem_map, mem_atTop_sets, mem_setOf_eq]
Mathlib.Topology.Instances.Real.142_0.cAejORboOY2cNtK
instance : CompleteSpace ℝ
Mathlib_Topology_Instances_Real
α : Type u β : Type v γ : Type w x ε : ℝ ⊢ TotallyBounded (ball x ε)
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩ rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩ have := c.equiv_lim ε ε0 simp only [mem_map, mem_atTop_sets, mem_setOf_eq] refine' this.imp fun N hN n hn => hε (hN n hn) theorem Real.totallyBounded_ball (x ε : ℝ) : TotallyBounded (ball x ε) := by
rw [Real.ball_eq_Ioo]
theorem Real.totallyBounded_ball (x ε : ℝ) : TotallyBounded (ball x ε) := by
Mathlib.Topology.Instances.Real.152_0.cAejORboOY2cNtK
theorem Real.totallyBounded_ball (x ε : ℝ) : TotallyBounded (ball x ε)
Mathlib_Topology_Instances_Real
α : Type u β : Type v γ : Type w x ε : ℝ ⊢ TotallyBounded (Ioo (x - ε) (x + ε))
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩ rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩ have := c.equiv_lim ε ε0 simp only [mem_map, mem_atTop_sets, mem_setOf_eq] refine' this.imp fun N hN n hn => hε (hN n hn) theorem Real.totallyBounded_ball (x ε : ℝ) : TotallyBounded (ball x ε) := by rw [Real.ball_eq_Ioo];
apply totallyBounded_Ioo
theorem Real.totallyBounded_ball (x ε : ℝ) : TotallyBounded (ball x ε) := by rw [Real.ball_eq_Ioo];
Mathlib.Topology.Instances.Real.152_0.cAejORboOY2cNtK
theorem Real.totallyBounded_ball (x ε : ℝ) : TotallyBounded (ball x ε)
Mathlib_Topology_Instances_Real
α : Type u β : Type v γ : Type w q : ℚ x : ℝ hx : x ∈ {r | ↑q ≤ r} t : Set ℝ ht : t ∈ 𝓝 x ε : ℝ ε0 : ε > 0 hε : ball x ε ⊆ t p : ℚ h₁ : x < ↑p h₂ : ↑p < x + ε ⊢ ↑p ∈ ball x ε
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩ rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩ have := c.equiv_lim ε ε0 simp only [mem_map, mem_atTop_sets, mem_setOf_eq] refine' this.imp fun N hN n hn => hε (hN n hn) theorem Real.totallyBounded_ball (x ε : ℝ) : TotallyBounded (ball x ε) := by rw [Real.ball_eq_Ioo]; apply totallyBounded_Ioo #align real.totally_bounded_ball Real.totallyBounded_ball section theorem closure_of_rat_image_lt {q : ℚ} : closure (((↑) : ℚ → ℝ) '' { x | q < x }) = { r | ↑q ≤ r } := Subset.antisymm ((isClosed_ge' _).closure_subset_iff.2 (image_subset_iff.2 fun p h => le_of_lt <| (@Rat.cast_lt ℝ _ _ _).2 h)) fun x hx => mem_closure_iff_nhds.2 fun t ht => let ⟨ε, ε0, hε⟩ := Metric.mem_nhds_iff.1 ht let ⟨p, h₁, h₂⟩ := exists_rat_btwn ((lt_add_iff_pos_right x).2 ε0) ⟨p, hε <| by
rwa [mem_ball, Real.dist_eq, abs_of_pos (sub_pos.2 h₁), sub_lt_iff_lt_add']
theorem closure_of_rat_image_lt {q : ℚ} : closure (((↑) : ℚ → ℝ) '' { x | q < x }) = { r | ↑q ≤ r } := Subset.antisymm ((isClosed_ge' _).closure_subset_iff.2 (image_subset_iff.2 fun p h => le_of_lt <| (@Rat.cast_lt ℝ _ _ _).2 h)) fun x hx => mem_closure_iff_nhds.2 fun t ht => let ⟨ε, ε0, hε⟩ := Metric.mem_nhds_iff.1 ht let ⟨p, h₁, h₂⟩ := exists_rat_btwn ((lt_add_iff_pos_right x).2 ε0) ⟨p, hε <| by
Mathlib.Topology.Instances.Real.158_0.cAejORboOY2cNtK
theorem closure_of_rat_image_lt {q : ℚ} : closure (((↑) : ℚ → ℝ) '' { x | q < x }) = { r | ↑q ≤ r }
Mathlib_Topology_Instances_Real
α : Type u β : Type v γ : Type w s : Set ℝ bdd : IsBounded s ⊢ BddBelow s ∧ BddAbove s
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩ rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩ have := c.equiv_lim ε ε0 simp only [mem_map, mem_atTop_sets, mem_setOf_eq] refine' this.imp fun N hN n hn => hε (hN n hn) theorem Real.totallyBounded_ball (x ε : ℝ) : TotallyBounded (ball x ε) := by rw [Real.ball_eq_Ioo]; apply totallyBounded_Ioo #align real.totally_bounded_ball Real.totallyBounded_ball section theorem closure_of_rat_image_lt {q : ℚ} : closure (((↑) : ℚ → ℝ) '' { x | q < x }) = { r | ↑q ≤ r } := Subset.antisymm ((isClosed_ge' _).closure_subset_iff.2 (image_subset_iff.2 fun p h => le_of_lt <| (@Rat.cast_lt ℝ _ _ _).2 h)) fun x hx => mem_closure_iff_nhds.2 fun t ht => let ⟨ε, ε0, hε⟩ := Metric.mem_nhds_iff.1 ht let ⟨p, h₁, h₂⟩ := exists_rat_btwn ((lt_add_iff_pos_right x).2 ε0) ⟨p, hε <| by rwa [mem_ball, Real.dist_eq, abs_of_pos (sub_pos.2 h₁), sub_lt_iff_lt_add'], mem_image_of_mem _ <| Rat.cast_lt.1 <| lt_of_le_of_lt hx.out h₁⟩ #align closure_of_rat_image_lt closure_of_rat_image_lt /- TODO(Mario): Put these back only if needed later lemma closure_of_rat_image_le_eq {q : ℚ} : closure ((coe : ℚ → ℝ) '' {x | q ≤ x}) = {r | ↑q ≤ r} := _ lemma closure_of_rat_image_le_le_eq {a b : ℚ} (hab : a ≤ b) : closure (of_rat '' {q:ℚ | a ≤ q ∧ q ≤ b}) = {r:ℝ | of_rat a ≤ r ∧ r ≤ of_rat b} := _ -/ theorem Real.isBounded_iff_bddBelow_bddAbove {s : Set ℝ} : IsBounded s ↔ BddBelow s ∧ BddAbove s := ⟨fun bdd ↦ by
obtain ⟨r, hr⟩ : ∃ r : ℝ, s ⊆ Icc (-r) r := by simpa [Real.closedBall_eq_Icc] using bdd.subset_closedBall 0
theorem Real.isBounded_iff_bddBelow_bddAbove {s : Set ℝ} : IsBounded s ↔ BddBelow s ∧ BddAbove s := ⟨fun bdd ↦ by
Mathlib.Topology.Instances.Real.178_0.cAejORboOY2cNtK
theorem Real.isBounded_iff_bddBelow_bddAbove {s : Set ℝ} : IsBounded s ↔ BddBelow s ∧ BddAbove s
Mathlib_Topology_Instances_Real
α : Type u β : Type v γ : Type w s : Set ℝ bdd : IsBounded s ⊢ ∃ r, s ⊆ Icc (-r) r
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩ rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩ have := c.equiv_lim ε ε0 simp only [mem_map, mem_atTop_sets, mem_setOf_eq] refine' this.imp fun N hN n hn => hε (hN n hn) theorem Real.totallyBounded_ball (x ε : ℝ) : TotallyBounded (ball x ε) := by rw [Real.ball_eq_Ioo]; apply totallyBounded_Ioo #align real.totally_bounded_ball Real.totallyBounded_ball section theorem closure_of_rat_image_lt {q : ℚ} : closure (((↑) : ℚ → ℝ) '' { x | q < x }) = { r | ↑q ≤ r } := Subset.antisymm ((isClosed_ge' _).closure_subset_iff.2 (image_subset_iff.2 fun p h => le_of_lt <| (@Rat.cast_lt ℝ _ _ _).2 h)) fun x hx => mem_closure_iff_nhds.2 fun t ht => let ⟨ε, ε0, hε⟩ := Metric.mem_nhds_iff.1 ht let ⟨p, h₁, h₂⟩ := exists_rat_btwn ((lt_add_iff_pos_right x).2 ε0) ⟨p, hε <| by rwa [mem_ball, Real.dist_eq, abs_of_pos (sub_pos.2 h₁), sub_lt_iff_lt_add'], mem_image_of_mem _ <| Rat.cast_lt.1 <| lt_of_le_of_lt hx.out h₁⟩ #align closure_of_rat_image_lt closure_of_rat_image_lt /- TODO(Mario): Put these back only if needed later lemma closure_of_rat_image_le_eq {q : ℚ} : closure ((coe : ℚ → ℝ) '' {x | q ≤ x}) = {r | ↑q ≤ r} := _ lemma closure_of_rat_image_le_le_eq {a b : ℚ} (hab : a ≤ b) : closure (of_rat '' {q:ℚ | a ≤ q ∧ q ≤ b}) = {r:ℝ | of_rat a ≤ r ∧ r ≤ of_rat b} := _ -/ theorem Real.isBounded_iff_bddBelow_bddAbove {s : Set ℝ} : IsBounded s ↔ BddBelow s ∧ BddAbove s := ⟨fun bdd ↦ by obtain ⟨r, hr⟩ : ∃ r : ℝ, s ⊆ Icc (-r) r := by
simpa [Real.closedBall_eq_Icc] using bdd.subset_closedBall 0
theorem Real.isBounded_iff_bddBelow_bddAbove {s : Set ℝ} : IsBounded s ↔ BddBelow s ∧ BddAbove s := ⟨fun bdd ↦ by obtain ⟨r, hr⟩ : ∃ r : ℝ, s ⊆ Icc (-r) r := by
Mathlib.Topology.Instances.Real.178_0.cAejORboOY2cNtK
theorem Real.isBounded_iff_bddBelow_bddAbove {s : Set ℝ} : IsBounded s ↔ BddBelow s ∧ BddAbove s
Mathlib_Topology_Instances_Real
case intro α : Type u β : Type v γ : Type w s : Set ℝ bdd : IsBounded s r : ℝ hr : s ⊆ Icc (-r) r ⊢ BddBelow s ∧ BddAbove s
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩ rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩ have := c.equiv_lim ε ε0 simp only [mem_map, mem_atTop_sets, mem_setOf_eq] refine' this.imp fun N hN n hn => hε (hN n hn) theorem Real.totallyBounded_ball (x ε : ℝ) : TotallyBounded (ball x ε) := by rw [Real.ball_eq_Ioo]; apply totallyBounded_Ioo #align real.totally_bounded_ball Real.totallyBounded_ball section theorem closure_of_rat_image_lt {q : ℚ} : closure (((↑) : ℚ → ℝ) '' { x | q < x }) = { r | ↑q ≤ r } := Subset.antisymm ((isClosed_ge' _).closure_subset_iff.2 (image_subset_iff.2 fun p h => le_of_lt <| (@Rat.cast_lt ℝ _ _ _).2 h)) fun x hx => mem_closure_iff_nhds.2 fun t ht => let ⟨ε, ε0, hε⟩ := Metric.mem_nhds_iff.1 ht let ⟨p, h₁, h₂⟩ := exists_rat_btwn ((lt_add_iff_pos_right x).2 ε0) ⟨p, hε <| by rwa [mem_ball, Real.dist_eq, abs_of_pos (sub_pos.2 h₁), sub_lt_iff_lt_add'], mem_image_of_mem _ <| Rat.cast_lt.1 <| lt_of_le_of_lt hx.out h₁⟩ #align closure_of_rat_image_lt closure_of_rat_image_lt /- TODO(Mario): Put these back only if needed later lemma closure_of_rat_image_le_eq {q : ℚ} : closure ((coe : ℚ → ℝ) '' {x | q ≤ x}) = {r | ↑q ≤ r} := _ lemma closure_of_rat_image_le_le_eq {a b : ℚ} (hab : a ≤ b) : closure (of_rat '' {q:ℚ | a ≤ q ∧ q ≤ b}) = {r:ℝ | of_rat a ≤ r ∧ r ≤ of_rat b} := _ -/ theorem Real.isBounded_iff_bddBelow_bddAbove {s : Set ℝ} : IsBounded s ↔ BddBelow s ∧ BddAbove s := ⟨fun bdd ↦ by obtain ⟨r, hr⟩ : ∃ r : ℝ, s ⊆ Icc (-r) r := by simpa [Real.closedBall_eq_Icc] using bdd.subset_closedBall 0
exact ⟨bddBelow_Icc.mono hr, bddAbove_Icc.mono hr⟩
theorem Real.isBounded_iff_bddBelow_bddAbove {s : Set ℝ} : IsBounded s ↔ BddBelow s ∧ BddAbove s := ⟨fun bdd ↦ by obtain ⟨r, hr⟩ : ∃ r : ℝ, s ⊆ Icc (-r) r := by simpa [Real.closedBall_eq_Icc] using bdd.subset_closedBall 0
Mathlib.Topology.Instances.Real.178_0.cAejORboOY2cNtK
theorem Real.isBounded_iff_bddBelow_bddAbove {s : Set ℝ} : IsBounded s ↔ BddBelow s ∧ BddAbove s
Mathlib_Topology_Instances_Real
α : Type u β : Type v γ : Type w inst✝ : TopologicalSpace α f : ℝ → α c : ℝ hp : Periodic f c hc : c ≠ 0 hf : Continuous f ⊢ IsCompact (range f)
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩ rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩ have := c.equiv_lim ε ε0 simp only [mem_map, mem_atTop_sets, mem_setOf_eq] refine' this.imp fun N hN n hn => hε (hN n hn) theorem Real.totallyBounded_ball (x ε : ℝ) : TotallyBounded (ball x ε) := by rw [Real.ball_eq_Ioo]; apply totallyBounded_Ioo #align real.totally_bounded_ball Real.totallyBounded_ball section theorem closure_of_rat_image_lt {q : ℚ} : closure (((↑) : ℚ → ℝ) '' { x | q < x }) = { r | ↑q ≤ r } := Subset.antisymm ((isClosed_ge' _).closure_subset_iff.2 (image_subset_iff.2 fun p h => le_of_lt <| (@Rat.cast_lt ℝ _ _ _).2 h)) fun x hx => mem_closure_iff_nhds.2 fun t ht => let ⟨ε, ε0, hε⟩ := Metric.mem_nhds_iff.1 ht let ⟨p, h₁, h₂⟩ := exists_rat_btwn ((lt_add_iff_pos_right x).2 ε0) ⟨p, hε <| by rwa [mem_ball, Real.dist_eq, abs_of_pos (sub_pos.2 h₁), sub_lt_iff_lt_add'], mem_image_of_mem _ <| Rat.cast_lt.1 <| lt_of_le_of_lt hx.out h₁⟩ #align closure_of_rat_image_lt closure_of_rat_image_lt /- TODO(Mario): Put these back only if needed later lemma closure_of_rat_image_le_eq {q : ℚ} : closure ((coe : ℚ → ℝ) '' {x | q ≤ x}) = {r | ↑q ≤ r} := _ lemma closure_of_rat_image_le_le_eq {a b : ℚ} (hab : a ≤ b) : closure (of_rat '' {q:ℚ | a ≤ q ∧ q ≤ b}) = {r:ℝ | of_rat a ≤ r ∧ r ≤ of_rat b} := _ -/ theorem Real.isBounded_iff_bddBelow_bddAbove {s : Set ℝ} : IsBounded s ↔ BddBelow s ∧ BddAbove s := ⟨fun bdd ↦ by obtain ⟨r, hr⟩ : ∃ r : ℝ, s ⊆ Icc (-r) r := by simpa [Real.closedBall_eq_Icc] using bdd.subset_closedBall 0 exact ⟨bddBelow_Icc.mono hr, bddAbove_Icc.mono hr⟩, fun h => isBounded_of_bddAbove_of_bddBelow h.2 h.1⟩ #align real.bounded_iff_bdd_below_bdd_above Real.isBounded_iff_bddBelow_bddAbove theorem Real.subset_Icc_sInf_sSup_of_isBounded {s : Set ℝ} (h : IsBounded s) : s ⊆ Icc (sInf s) (sSup s) := subset_Icc_csInf_csSup (Real.isBounded_iff_bddBelow_bddAbove.1 h).1 (Real.isBounded_iff_bddBelow_bddAbove.1 h).2 #align real.subset_Icc_Inf_Sup_of_bounded Real.subset_Icc_sInf_sSup_of_isBounded end section Periodic namespace Function /-- A continuous, periodic function has compact range. -/ theorem Periodic.compact_of_continuous [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsCompact (range f) := by
rw [← hp.image_uIcc hc 0]
/-- A continuous, periodic function has compact range. -/ theorem Periodic.compact_of_continuous [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsCompact (range f) := by
Mathlib.Topology.Instances.Real.198_0.cAejORboOY2cNtK
/-- A continuous, periodic function has compact range. -/ theorem Periodic.compact_of_continuous [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsCompact (range f)
Mathlib_Topology_Instances_Real
α : Type u β : Type v γ : Type w inst✝ : TopologicalSpace α f : ℝ → α c : ℝ hp : Periodic f c hc : c ≠ 0 hf : Continuous f ⊢ IsCompact (f '' [[0, 0 + c]])
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩ rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩ have := c.equiv_lim ε ε0 simp only [mem_map, mem_atTop_sets, mem_setOf_eq] refine' this.imp fun N hN n hn => hε (hN n hn) theorem Real.totallyBounded_ball (x ε : ℝ) : TotallyBounded (ball x ε) := by rw [Real.ball_eq_Ioo]; apply totallyBounded_Ioo #align real.totally_bounded_ball Real.totallyBounded_ball section theorem closure_of_rat_image_lt {q : ℚ} : closure (((↑) : ℚ → ℝ) '' { x | q < x }) = { r | ↑q ≤ r } := Subset.antisymm ((isClosed_ge' _).closure_subset_iff.2 (image_subset_iff.2 fun p h => le_of_lt <| (@Rat.cast_lt ℝ _ _ _).2 h)) fun x hx => mem_closure_iff_nhds.2 fun t ht => let ⟨ε, ε0, hε⟩ := Metric.mem_nhds_iff.1 ht let ⟨p, h₁, h₂⟩ := exists_rat_btwn ((lt_add_iff_pos_right x).2 ε0) ⟨p, hε <| by rwa [mem_ball, Real.dist_eq, abs_of_pos (sub_pos.2 h₁), sub_lt_iff_lt_add'], mem_image_of_mem _ <| Rat.cast_lt.1 <| lt_of_le_of_lt hx.out h₁⟩ #align closure_of_rat_image_lt closure_of_rat_image_lt /- TODO(Mario): Put these back only if needed later lemma closure_of_rat_image_le_eq {q : ℚ} : closure ((coe : ℚ → ℝ) '' {x | q ≤ x}) = {r | ↑q ≤ r} := _ lemma closure_of_rat_image_le_le_eq {a b : ℚ} (hab : a ≤ b) : closure (of_rat '' {q:ℚ | a ≤ q ∧ q ≤ b}) = {r:ℝ | of_rat a ≤ r ∧ r ≤ of_rat b} := _ -/ theorem Real.isBounded_iff_bddBelow_bddAbove {s : Set ℝ} : IsBounded s ↔ BddBelow s ∧ BddAbove s := ⟨fun bdd ↦ by obtain ⟨r, hr⟩ : ∃ r : ℝ, s ⊆ Icc (-r) r := by simpa [Real.closedBall_eq_Icc] using bdd.subset_closedBall 0 exact ⟨bddBelow_Icc.mono hr, bddAbove_Icc.mono hr⟩, fun h => isBounded_of_bddAbove_of_bddBelow h.2 h.1⟩ #align real.bounded_iff_bdd_below_bdd_above Real.isBounded_iff_bddBelow_bddAbove theorem Real.subset_Icc_sInf_sSup_of_isBounded {s : Set ℝ} (h : IsBounded s) : s ⊆ Icc (sInf s) (sSup s) := subset_Icc_csInf_csSup (Real.isBounded_iff_bddBelow_bddAbove.1 h).1 (Real.isBounded_iff_bddBelow_bddAbove.1 h).2 #align real.subset_Icc_Inf_Sup_of_bounded Real.subset_Icc_sInf_sSup_of_isBounded end section Periodic namespace Function /-- A continuous, periodic function has compact range. -/ theorem Periodic.compact_of_continuous [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsCompact (range f) := by rw [← hp.image_uIcc hc 0]
exact isCompact_uIcc.image hf
/-- A continuous, periodic function has compact range. -/ theorem Periodic.compact_of_continuous [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsCompact (range f) := by rw [← hp.image_uIcc hc 0]
Mathlib.Topology.Instances.Real.198_0.cAejORboOY2cNtK
/-- A continuous, periodic function has compact range. -/ theorem Periodic.compact_of_continuous [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsCompact (range f)
Mathlib_Topology_Instances_Real
α : Type u β : Type v γ : Type w a : ℝ ⊢ DiscreteTopology ↥(AddSubgroup.zmultiples a)
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩ rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩ have := c.equiv_lim ε ε0 simp only [mem_map, mem_atTop_sets, mem_setOf_eq] refine' this.imp fun N hN n hn => hε (hN n hn) theorem Real.totallyBounded_ball (x ε : ℝ) : TotallyBounded (ball x ε) := by rw [Real.ball_eq_Ioo]; apply totallyBounded_Ioo #align real.totally_bounded_ball Real.totallyBounded_ball section theorem closure_of_rat_image_lt {q : ℚ} : closure (((↑) : ℚ → ℝ) '' { x | q < x }) = { r | ↑q ≤ r } := Subset.antisymm ((isClosed_ge' _).closure_subset_iff.2 (image_subset_iff.2 fun p h => le_of_lt <| (@Rat.cast_lt ℝ _ _ _).2 h)) fun x hx => mem_closure_iff_nhds.2 fun t ht => let ⟨ε, ε0, hε⟩ := Metric.mem_nhds_iff.1 ht let ⟨p, h₁, h₂⟩ := exists_rat_btwn ((lt_add_iff_pos_right x).2 ε0) ⟨p, hε <| by rwa [mem_ball, Real.dist_eq, abs_of_pos (sub_pos.2 h₁), sub_lt_iff_lt_add'], mem_image_of_mem _ <| Rat.cast_lt.1 <| lt_of_le_of_lt hx.out h₁⟩ #align closure_of_rat_image_lt closure_of_rat_image_lt /- TODO(Mario): Put these back only if needed later lemma closure_of_rat_image_le_eq {q : ℚ} : closure ((coe : ℚ → ℝ) '' {x | q ≤ x}) = {r | ↑q ≤ r} := _ lemma closure_of_rat_image_le_le_eq {a b : ℚ} (hab : a ≤ b) : closure (of_rat '' {q:ℚ | a ≤ q ∧ q ≤ b}) = {r:ℝ | of_rat a ≤ r ∧ r ≤ of_rat b} := _ -/ theorem Real.isBounded_iff_bddBelow_bddAbove {s : Set ℝ} : IsBounded s ↔ BddBelow s ∧ BddAbove s := ⟨fun bdd ↦ by obtain ⟨r, hr⟩ : ∃ r : ℝ, s ⊆ Icc (-r) r := by simpa [Real.closedBall_eq_Icc] using bdd.subset_closedBall 0 exact ⟨bddBelow_Icc.mono hr, bddAbove_Icc.mono hr⟩, fun h => isBounded_of_bddAbove_of_bddBelow h.2 h.1⟩ #align real.bounded_iff_bdd_below_bdd_above Real.isBounded_iff_bddBelow_bddAbove theorem Real.subset_Icc_sInf_sSup_of_isBounded {s : Set ℝ} (h : IsBounded s) : s ⊆ Icc (sInf s) (sSup s) := subset_Icc_csInf_csSup (Real.isBounded_iff_bddBelow_bddAbove.1 h).1 (Real.isBounded_iff_bddBelow_bddAbove.1 h).2 #align real.subset_Icc_Inf_Sup_of_bounded Real.subset_Icc_sInf_sSup_of_isBounded end section Periodic namespace Function /-- A continuous, periodic function has compact range. -/ theorem Periodic.compact_of_continuous [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsCompact (range f) := by rw [← hp.image_uIcc hc 0] exact isCompact_uIcc.image hf #align function.periodic.compact_of_continuous Function.Periodic.compact_of_continuous @[deprecated Function.Periodic.compact_of_continuous] theorem Periodic.compact_of_continuous' [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : 0 < c) (hf : Continuous f) : IsCompact (range f) := hp.compact_of_continuous hc.ne' hf #align function.periodic.compact_of_continuous' Function.Periodic.compact_of_continuous' /-- A continuous, periodic function is bounded. -/ theorem Periodic.isBounded_of_continuous [PseudoMetricSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsBounded (range f) := (hp.compact_of_continuous hc hf).isBounded #align function.periodic.bounded_of_continuous Function.Periodic.isBounded_of_continuous end Function end Periodic section Subgroups namespace Int open Metric /-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a) := by
rcases eq_or_ne a 0 with (rfl | ha)
/-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a) := by
Mathlib.Topology.Instances.Real.227_0.cAejORboOY2cNtK
/-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a)
Mathlib_Topology_Instances_Real
case inl α : Type u β : Type v γ : Type w ⊢ DiscreteTopology ↥(AddSubgroup.zmultiples 0)
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩ rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩ have := c.equiv_lim ε ε0 simp only [mem_map, mem_atTop_sets, mem_setOf_eq] refine' this.imp fun N hN n hn => hε (hN n hn) theorem Real.totallyBounded_ball (x ε : ℝ) : TotallyBounded (ball x ε) := by rw [Real.ball_eq_Ioo]; apply totallyBounded_Ioo #align real.totally_bounded_ball Real.totallyBounded_ball section theorem closure_of_rat_image_lt {q : ℚ} : closure (((↑) : ℚ → ℝ) '' { x | q < x }) = { r | ↑q ≤ r } := Subset.antisymm ((isClosed_ge' _).closure_subset_iff.2 (image_subset_iff.2 fun p h => le_of_lt <| (@Rat.cast_lt ℝ _ _ _).2 h)) fun x hx => mem_closure_iff_nhds.2 fun t ht => let ⟨ε, ε0, hε⟩ := Metric.mem_nhds_iff.1 ht let ⟨p, h₁, h₂⟩ := exists_rat_btwn ((lt_add_iff_pos_right x).2 ε0) ⟨p, hε <| by rwa [mem_ball, Real.dist_eq, abs_of_pos (sub_pos.2 h₁), sub_lt_iff_lt_add'], mem_image_of_mem _ <| Rat.cast_lt.1 <| lt_of_le_of_lt hx.out h₁⟩ #align closure_of_rat_image_lt closure_of_rat_image_lt /- TODO(Mario): Put these back only if needed later lemma closure_of_rat_image_le_eq {q : ℚ} : closure ((coe : ℚ → ℝ) '' {x | q ≤ x}) = {r | ↑q ≤ r} := _ lemma closure_of_rat_image_le_le_eq {a b : ℚ} (hab : a ≤ b) : closure (of_rat '' {q:ℚ | a ≤ q ∧ q ≤ b}) = {r:ℝ | of_rat a ≤ r ∧ r ≤ of_rat b} := _ -/ theorem Real.isBounded_iff_bddBelow_bddAbove {s : Set ℝ} : IsBounded s ↔ BddBelow s ∧ BddAbove s := ⟨fun bdd ↦ by obtain ⟨r, hr⟩ : ∃ r : ℝ, s ⊆ Icc (-r) r := by simpa [Real.closedBall_eq_Icc] using bdd.subset_closedBall 0 exact ⟨bddBelow_Icc.mono hr, bddAbove_Icc.mono hr⟩, fun h => isBounded_of_bddAbove_of_bddBelow h.2 h.1⟩ #align real.bounded_iff_bdd_below_bdd_above Real.isBounded_iff_bddBelow_bddAbove theorem Real.subset_Icc_sInf_sSup_of_isBounded {s : Set ℝ} (h : IsBounded s) : s ⊆ Icc (sInf s) (sSup s) := subset_Icc_csInf_csSup (Real.isBounded_iff_bddBelow_bddAbove.1 h).1 (Real.isBounded_iff_bddBelow_bddAbove.1 h).2 #align real.subset_Icc_Inf_Sup_of_bounded Real.subset_Icc_sInf_sSup_of_isBounded end section Periodic namespace Function /-- A continuous, periodic function has compact range. -/ theorem Periodic.compact_of_continuous [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsCompact (range f) := by rw [← hp.image_uIcc hc 0] exact isCompact_uIcc.image hf #align function.periodic.compact_of_continuous Function.Periodic.compact_of_continuous @[deprecated Function.Periodic.compact_of_continuous] theorem Periodic.compact_of_continuous' [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : 0 < c) (hf : Continuous f) : IsCompact (range f) := hp.compact_of_continuous hc.ne' hf #align function.periodic.compact_of_continuous' Function.Periodic.compact_of_continuous' /-- A continuous, periodic function is bounded. -/ theorem Periodic.isBounded_of_continuous [PseudoMetricSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsBounded (range f) := (hp.compact_of_continuous hc hf).isBounded #align function.periodic.bounded_of_continuous Function.Periodic.isBounded_of_continuous end Function end Periodic section Subgroups namespace Int open Metric /-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a) := by rcases eq_or_ne a 0 with (rfl | ha) ·
rw [AddSubgroup.zmultiples_zero_eq_bot]
/-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a) := by rcases eq_or_ne a 0 with (rfl | ha) ·
Mathlib.Topology.Instances.Real.227_0.cAejORboOY2cNtK
/-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a)
Mathlib_Topology_Instances_Real
case inl α : Type u β : Type v γ : Type w ⊢ DiscreteTopology ↥⊥
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩ rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩ have := c.equiv_lim ε ε0 simp only [mem_map, mem_atTop_sets, mem_setOf_eq] refine' this.imp fun N hN n hn => hε (hN n hn) theorem Real.totallyBounded_ball (x ε : ℝ) : TotallyBounded (ball x ε) := by rw [Real.ball_eq_Ioo]; apply totallyBounded_Ioo #align real.totally_bounded_ball Real.totallyBounded_ball section theorem closure_of_rat_image_lt {q : ℚ} : closure (((↑) : ℚ → ℝ) '' { x | q < x }) = { r | ↑q ≤ r } := Subset.antisymm ((isClosed_ge' _).closure_subset_iff.2 (image_subset_iff.2 fun p h => le_of_lt <| (@Rat.cast_lt ℝ _ _ _).2 h)) fun x hx => mem_closure_iff_nhds.2 fun t ht => let ⟨ε, ε0, hε⟩ := Metric.mem_nhds_iff.1 ht let ⟨p, h₁, h₂⟩ := exists_rat_btwn ((lt_add_iff_pos_right x).2 ε0) ⟨p, hε <| by rwa [mem_ball, Real.dist_eq, abs_of_pos (sub_pos.2 h₁), sub_lt_iff_lt_add'], mem_image_of_mem _ <| Rat.cast_lt.1 <| lt_of_le_of_lt hx.out h₁⟩ #align closure_of_rat_image_lt closure_of_rat_image_lt /- TODO(Mario): Put these back only if needed later lemma closure_of_rat_image_le_eq {q : ℚ} : closure ((coe : ℚ → ℝ) '' {x | q ≤ x}) = {r | ↑q ≤ r} := _ lemma closure_of_rat_image_le_le_eq {a b : ℚ} (hab : a ≤ b) : closure (of_rat '' {q:ℚ | a ≤ q ∧ q ≤ b}) = {r:ℝ | of_rat a ≤ r ∧ r ≤ of_rat b} := _ -/ theorem Real.isBounded_iff_bddBelow_bddAbove {s : Set ℝ} : IsBounded s ↔ BddBelow s ∧ BddAbove s := ⟨fun bdd ↦ by obtain ⟨r, hr⟩ : ∃ r : ℝ, s ⊆ Icc (-r) r := by simpa [Real.closedBall_eq_Icc] using bdd.subset_closedBall 0 exact ⟨bddBelow_Icc.mono hr, bddAbove_Icc.mono hr⟩, fun h => isBounded_of_bddAbove_of_bddBelow h.2 h.1⟩ #align real.bounded_iff_bdd_below_bdd_above Real.isBounded_iff_bddBelow_bddAbove theorem Real.subset_Icc_sInf_sSup_of_isBounded {s : Set ℝ} (h : IsBounded s) : s ⊆ Icc (sInf s) (sSup s) := subset_Icc_csInf_csSup (Real.isBounded_iff_bddBelow_bddAbove.1 h).1 (Real.isBounded_iff_bddBelow_bddAbove.1 h).2 #align real.subset_Icc_Inf_Sup_of_bounded Real.subset_Icc_sInf_sSup_of_isBounded end section Periodic namespace Function /-- A continuous, periodic function has compact range. -/ theorem Periodic.compact_of_continuous [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsCompact (range f) := by rw [← hp.image_uIcc hc 0] exact isCompact_uIcc.image hf #align function.periodic.compact_of_continuous Function.Periodic.compact_of_continuous @[deprecated Function.Periodic.compact_of_continuous] theorem Periodic.compact_of_continuous' [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : 0 < c) (hf : Continuous f) : IsCompact (range f) := hp.compact_of_continuous hc.ne' hf #align function.periodic.compact_of_continuous' Function.Periodic.compact_of_continuous' /-- A continuous, periodic function is bounded. -/ theorem Periodic.isBounded_of_continuous [PseudoMetricSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsBounded (range f) := (hp.compact_of_continuous hc hf).isBounded #align function.periodic.bounded_of_continuous Function.Periodic.isBounded_of_continuous end Function end Periodic section Subgroups namespace Int open Metric /-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a) := by rcases eq_or_ne a 0 with (rfl | ha) · rw [AddSubgroup.zmultiples_zero_eq_bot]
exact Subsingleton.discreteTopology (α := (⊥ : Submodule ℤ ℝ))
/-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a) := by rcases eq_or_ne a 0 with (rfl | ha) · rw [AddSubgroup.zmultiples_zero_eq_bot]
Mathlib.Topology.Instances.Real.227_0.cAejORboOY2cNtK
/-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a)
Mathlib_Topology_Instances_Real
case inr α : Type u β : Type v γ : Type w a : ℝ ha : a ≠ 0 ⊢ DiscreteTopology ↥(AddSubgroup.zmultiples a)
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩ rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩ have := c.equiv_lim ε ε0 simp only [mem_map, mem_atTop_sets, mem_setOf_eq] refine' this.imp fun N hN n hn => hε (hN n hn) theorem Real.totallyBounded_ball (x ε : ℝ) : TotallyBounded (ball x ε) := by rw [Real.ball_eq_Ioo]; apply totallyBounded_Ioo #align real.totally_bounded_ball Real.totallyBounded_ball section theorem closure_of_rat_image_lt {q : ℚ} : closure (((↑) : ℚ → ℝ) '' { x | q < x }) = { r | ↑q ≤ r } := Subset.antisymm ((isClosed_ge' _).closure_subset_iff.2 (image_subset_iff.2 fun p h => le_of_lt <| (@Rat.cast_lt ℝ _ _ _).2 h)) fun x hx => mem_closure_iff_nhds.2 fun t ht => let ⟨ε, ε0, hε⟩ := Metric.mem_nhds_iff.1 ht let ⟨p, h₁, h₂⟩ := exists_rat_btwn ((lt_add_iff_pos_right x).2 ε0) ⟨p, hε <| by rwa [mem_ball, Real.dist_eq, abs_of_pos (sub_pos.2 h₁), sub_lt_iff_lt_add'], mem_image_of_mem _ <| Rat.cast_lt.1 <| lt_of_le_of_lt hx.out h₁⟩ #align closure_of_rat_image_lt closure_of_rat_image_lt /- TODO(Mario): Put these back only if needed later lemma closure_of_rat_image_le_eq {q : ℚ} : closure ((coe : ℚ → ℝ) '' {x | q ≤ x}) = {r | ↑q ≤ r} := _ lemma closure_of_rat_image_le_le_eq {a b : ℚ} (hab : a ≤ b) : closure (of_rat '' {q:ℚ | a ≤ q ∧ q ≤ b}) = {r:ℝ | of_rat a ≤ r ∧ r ≤ of_rat b} := _ -/ theorem Real.isBounded_iff_bddBelow_bddAbove {s : Set ℝ} : IsBounded s ↔ BddBelow s ∧ BddAbove s := ⟨fun bdd ↦ by obtain ⟨r, hr⟩ : ∃ r : ℝ, s ⊆ Icc (-r) r := by simpa [Real.closedBall_eq_Icc] using bdd.subset_closedBall 0 exact ⟨bddBelow_Icc.mono hr, bddAbove_Icc.mono hr⟩, fun h => isBounded_of_bddAbove_of_bddBelow h.2 h.1⟩ #align real.bounded_iff_bdd_below_bdd_above Real.isBounded_iff_bddBelow_bddAbove theorem Real.subset_Icc_sInf_sSup_of_isBounded {s : Set ℝ} (h : IsBounded s) : s ⊆ Icc (sInf s) (sSup s) := subset_Icc_csInf_csSup (Real.isBounded_iff_bddBelow_bddAbove.1 h).1 (Real.isBounded_iff_bddBelow_bddAbove.1 h).2 #align real.subset_Icc_Inf_Sup_of_bounded Real.subset_Icc_sInf_sSup_of_isBounded end section Periodic namespace Function /-- A continuous, periodic function has compact range. -/ theorem Periodic.compact_of_continuous [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsCompact (range f) := by rw [← hp.image_uIcc hc 0] exact isCompact_uIcc.image hf #align function.periodic.compact_of_continuous Function.Periodic.compact_of_continuous @[deprecated Function.Periodic.compact_of_continuous] theorem Periodic.compact_of_continuous' [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : 0 < c) (hf : Continuous f) : IsCompact (range f) := hp.compact_of_continuous hc.ne' hf #align function.periodic.compact_of_continuous' Function.Periodic.compact_of_continuous' /-- A continuous, periodic function is bounded. -/ theorem Periodic.isBounded_of_continuous [PseudoMetricSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsBounded (range f) := (hp.compact_of_continuous hc hf).isBounded #align function.periodic.bounded_of_continuous Function.Periodic.isBounded_of_continuous end Function end Periodic section Subgroups namespace Int open Metric /-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a) := by rcases eq_or_ne a 0 with (rfl | ha) · rw [AddSubgroup.zmultiples_zero_eq_bot] exact Subsingleton.discreteTopology (α := (⊥ : Submodule ℤ ℝ))
rw [discreteTopology_iff_isOpen_singleton_zero, isOpen_induced_iff]
/-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a) := by rcases eq_or_ne a 0 with (rfl | ha) · rw [AddSubgroup.zmultiples_zero_eq_bot] exact Subsingleton.discreteTopology (α := (⊥ : Submodule ℤ ℝ))
Mathlib.Topology.Instances.Real.227_0.cAejORboOY2cNtK
/-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a)
Mathlib_Topology_Instances_Real
case inr α : Type u β : Type v γ : Type w a : ℝ ha : a ≠ 0 ⊢ ∃ t, IsOpen t ∧ Subtype.val ⁻¹' t = {0}
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩ rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩ have := c.equiv_lim ε ε0 simp only [mem_map, mem_atTop_sets, mem_setOf_eq] refine' this.imp fun N hN n hn => hε (hN n hn) theorem Real.totallyBounded_ball (x ε : ℝ) : TotallyBounded (ball x ε) := by rw [Real.ball_eq_Ioo]; apply totallyBounded_Ioo #align real.totally_bounded_ball Real.totallyBounded_ball section theorem closure_of_rat_image_lt {q : ℚ} : closure (((↑) : ℚ → ℝ) '' { x | q < x }) = { r | ↑q ≤ r } := Subset.antisymm ((isClosed_ge' _).closure_subset_iff.2 (image_subset_iff.2 fun p h => le_of_lt <| (@Rat.cast_lt ℝ _ _ _).2 h)) fun x hx => mem_closure_iff_nhds.2 fun t ht => let ⟨ε, ε0, hε⟩ := Metric.mem_nhds_iff.1 ht let ⟨p, h₁, h₂⟩ := exists_rat_btwn ((lt_add_iff_pos_right x).2 ε0) ⟨p, hε <| by rwa [mem_ball, Real.dist_eq, abs_of_pos (sub_pos.2 h₁), sub_lt_iff_lt_add'], mem_image_of_mem _ <| Rat.cast_lt.1 <| lt_of_le_of_lt hx.out h₁⟩ #align closure_of_rat_image_lt closure_of_rat_image_lt /- TODO(Mario): Put these back only if needed later lemma closure_of_rat_image_le_eq {q : ℚ} : closure ((coe : ℚ → ℝ) '' {x | q ≤ x}) = {r | ↑q ≤ r} := _ lemma closure_of_rat_image_le_le_eq {a b : ℚ} (hab : a ≤ b) : closure (of_rat '' {q:ℚ | a ≤ q ∧ q ≤ b}) = {r:ℝ | of_rat a ≤ r ∧ r ≤ of_rat b} := _ -/ theorem Real.isBounded_iff_bddBelow_bddAbove {s : Set ℝ} : IsBounded s ↔ BddBelow s ∧ BddAbove s := ⟨fun bdd ↦ by obtain ⟨r, hr⟩ : ∃ r : ℝ, s ⊆ Icc (-r) r := by simpa [Real.closedBall_eq_Icc] using bdd.subset_closedBall 0 exact ⟨bddBelow_Icc.mono hr, bddAbove_Icc.mono hr⟩, fun h => isBounded_of_bddAbove_of_bddBelow h.2 h.1⟩ #align real.bounded_iff_bdd_below_bdd_above Real.isBounded_iff_bddBelow_bddAbove theorem Real.subset_Icc_sInf_sSup_of_isBounded {s : Set ℝ} (h : IsBounded s) : s ⊆ Icc (sInf s) (sSup s) := subset_Icc_csInf_csSup (Real.isBounded_iff_bddBelow_bddAbove.1 h).1 (Real.isBounded_iff_bddBelow_bddAbove.1 h).2 #align real.subset_Icc_Inf_Sup_of_bounded Real.subset_Icc_sInf_sSup_of_isBounded end section Periodic namespace Function /-- A continuous, periodic function has compact range. -/ theorem Periodic.compact_of_continuous [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsCompact (range f) := by rw [← hp.image_uIcc hc 0] exact isCompact_uIcc.image hf #align function.periodic.compact_of_continuous Function.Periodic.compact_of_continuous @[deprecated Function.Periodic.compact_of_continuous] theorem Periodic.compact_of_continuous' [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : 0 < c) (hf : Continuous f) : IsCompact (range f) := hp.compact_of_continuous hc.ne' hf #align function.periodic.compact_of_continuous' Function.Periodic.compact_of_continuous' /-- A continuous, periodic function is bounded. -/ theorem Periodic.isBounded_of_continuous [PseudoMetricSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsBounded (range f) := (hp.compact_of_continuous hc hf).isBounded #align function.periodic.bounded_of_continuous Function.Periodic.isBounded_of_continuous end Function end Periodic section Subgroups namespace Int open Metric /-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a) := by rcases eq_or_ne a 0 with (rfl | ha) · rw [AddSubgroup.zmultiples_zero_eq_bot] exact Subsingleton.discreteTopology (α := (⊥ : Submodule ℤ ℝ)) rw [discreteTopology_iff_isOpen_singleton_zero, isOpen_induced_iff]
refine' ⟨ball 0 |a|, isOpen_ball, _⟩
/-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a) := by rcases eq_or_ne a 0 with (rfl | ha) · rw [AddSubgroup.zmultiples_zero_eq_bot] exact Subsingleton.discreteTopology (α := (⊥ : Submodule ℤ ℝ)) rw [discreteTopology_iff_isOpen_singleton_zero, isOpen_induced_iff]
Mathlib.Topology.Instances.Real.227_0.cAejORboOY2cNtK
/-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a)
Mathlib_Topology_Instances_Real
case inr α : Type u β : Type v γ : Type w a : ℝ ha : a ≠ 0 ⊢ Subtype.val ⁻¹' ball 0 |a| = {0}
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩ rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩ have := c.equiv_lim ε ε0 simp only [mem_map, mem_atTop_sets, mem_setOf_eq] refine' this.imp fun N hN n hn => hε (hN n hn) theorem Real.totallyBounded_ball (x ε : ℝ) : TotallyBounded (ball x ε) := by rw [Real.ball_eq_Ioo]; apply totallyBounded_Ioo #align real.totally_bounded_ball Real.totallyBounded_ball section theorem closure_of_rat_image_lt {q : ℚ} : closure (((↑) : ℚ → ℝ) '' { x | q < x }) = { r | ↑q ≤ r } := Subset.antisymm ((isClosed_ge' _).closure_subset_iff.2 (image_subset_iff.2 fun p h => le_of_lt <| (@Rat.cast_lt ℝ _ _ _).2 h)) fun x hx => mem_closure_iff_nhds.2 fun t ht => let ⟨ε, ε0, hε⟩ := Metric.mem_nhds_iff.1 ht let ⟨p, h₁, h₂⟩ := exists_rat_btwn ((lt_add_iff_pos_right x).2 ε0) ⟨p, hε <| by rwa [mem_ball, Real.dist_eq, abs_of_pos (sub_pos.2 h₁), sub_lt_iff_lt_add'], mem_image_of_mem _ <| Rat.cast_lt.1 <| lt_of_le_of_lt hx.out h₁⟩ #align closure_of_rat_image_lt closure_of_rat_image_lt /- TODO(Mario): Put these back only if needed later lemma closure_of_rat_image_le_eq {q : ℚ} : closure ((coe : ℚ → ℝ) '' {x | q ≤ x}) = {r | ↑q ≤ r} := _ lemma closure_of_rat_image_le_le_eq {a b : ℚ} (hab : a ≤ b) : closure (of_rat '' {q:ℚ | a ≤ q ∧ q ≤ b}) = {r:ℝ | of_rat a ≤ r ∧ r ≤ of_rat b} := _ -/ theorem Real.isBounded_iff_bddBelow_bddAbove {s : Set ℝ} : IsBounded s ↔ BddBelow s ∧ BddAbove s := ⟨fun bdd ↦ by obtain ⟨r, hr⟩ : ∃ r : ℝ, s ⊆ Icc (-r) r := by simpa [Real.closedBall_eq_Icc] using bdd.subset_closedBall 0 exact ⟨bddBelow_Icc.mono hr, bddAbove_Icc.mono hr⟩, fun h => isBounded_of_bddAbove_of_bddBelow h.2 h.1⟩ #align real.bounded_iff_bdd_below_bdd_above Real.isBounded_iff_bddBelow_bddAbove theorem Real.subset_Icc_sInf_sSup_of_isBounded {s : Set ℝ} (h : IsBounded s) : s ⊆ Icc (sInf s) (sSup s) := subset_Icc_csInf_csSup (Real.isBounded_iff_bddBelow_bddAbove.1 h).1 (Real.isBounded_iff_bddBelow_bddAbove.1 h).2 #align real.subset_Icc_Inf_Sup_of_bounded Real.subset_Icc_sInf_sSup_of_isBounded end section Periodic namespace Function /-- A continuous, periodic function has compact range. -/ theorem Periodic.compact_of_continuous [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsCompact (range f) := by rw [← hp.image_uIcc hc 0] exact isCompact_uIcc.image hf #align function.periodic.compact_of_continuous Function.Periodic.compact_of_continuous @[deprecated Function.Periodic.compact_of_continuous] theorem Periodic.compact_of_continuous' [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : 0 < c) (hf : Continuous f) : IsCompact (range f) := hp.compact_of_continuous hc.ne' hf #align function.periodic.compact_of_continuous' Function.Periodic.compact_of_continuous' /-- A continuous, periodic function is bounded. -/ theorem Periodic.isBounded_of_continuous [PseudoMetricSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsBounded (range f) := (hp.compact_of_continuous hc hf).isBounded #align function.periodic.bounded_of_continuous Function.Periodic.isBounded_of_continuous end Function end Periodic section Subgroups namespace Int open Metric /-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a) := by rcases eq_or_ne a 0 with (rfl | ha) · rw [AddSubgroup.zmultiples_zero_eq_bot] exact Subsingleton.discreteTopology (α := (⊥ : Submodule ℤ ℝ)) rw [discreteTopology_iff_isOpen_singleton_zero, isOpen_induced_iff] refine' ⟨ball 0 |a|, isOpen_ball, _⟩
ext ⟨x, hx⟩
/-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a) := by rcases eq_or_ne a 0 with (rfl | ha) · rw [AddSubgroup.zmultiples_zero_eq_bot] exact Subsingleton.discreteTopology (α := (⊥ : Submodule ℤ ℝ)) rw [discreteTopology_iff_isOpen_singleton_zero, isOpen_induced_iff] refine' ⟨ball 0 |a|, isOpen_ball, _⟩
Mathlib.Topology.Instances.Real.227_0.cAejORboOY2cNtK
/-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a)
Mathlib_Topology_Instances_Real
case inr.h.mk α : Type u β : Type v γ : Type w a : ℝ ha : a ≠ 0 x : ℝ hx : x ∈ AddSubgroup.zmultiples a ⊢ { val := x, property := hx } ∈ Subtype.val ⁻¹' ball 0 |a| ↔ { val := x, property := hx } ∈ {0}
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩ rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩ have := c.equiv_lim ε ε0 simp only [mem_map, mem_atTop_sets, mem_setOf_eq] refine' this.imp fun N hN n hn => hε (hN n hn) theorem Real.totallyBounded_ball (x ε : ℝ) : TotallyBounded (ball x ε) := by rw [Real.ball_eq_Ioo]; apply totallyBounded_Ioo #align real.totally_bounded_ball Real.totallyBounded_ball section theorem closure_of_rat_image_lt {q : ℚ} : closure (((↑) : ℚ → ℝ) '' { x | q < x }) = { r | ↑q ≤ r } := Subset.antisymm ((isClosed_ge' _).closure_subset_iff.2 (image_subset_iff.2 fun p h => le_of_lt <| (@Rat.cast_lt ℝ _ _ _).2 h)) fun x hx => mem_closure_iff_nhds.2 fun t ht => let ⟨ε, ε0, hε⟩ := Metric.mem_nhds_iff.1 ht let ⟨p, h₁, h₂⟩ := exists_rat_btwn ((lt_add_iff_pos_right x).2 ε0) ⟨p, hε <| by rwa [mem_ball, Real.dist_eq, abs_of_pos (sub_pos.2 h₁), sub_lt_iff_lt_add'], mem_image_of_mem _ <| Rat.cast_lt.1 <| lt_of_le_of_lt hx.out h₁⟩ #align closure_of_rat_image_lt closure_of_rat_image_lt /- TODO(Mario): Put these back only if needed later lemma closure_of_rat_image_le_eq {q : ℚ} : closure ((coe : ℚ → ℝ) '' {x | q ≤ x}) = {r | ↑q ≤ r} := _ lemma closure_of_rat_image_le_le_eq {a b : ℚ} (hab : a ≤ b) : closure (of_rat '' {q:ℚ | a ≤ q ∧ q ≤ b}) = {r:ℝ | of_rat a ≤ r ∧ r ≤ of_rat b} := _ -/ theorem Real.isBounded_iff_bddBelow_bddAbove {s : Set ℝ} : IsBounded s ↔ BddBelow s ∧ BddAbove s := ⟨fun bdd ↦ by obtain ⟨r, hr⟩ : ∃ r : ℝ, s ⊆ Icc (-r) r := by simpa [Real.closedBall_eq_Icc] using bdd.subset_closedBall 0 exact ⟨bddBelow_Icc.mono hr, bddAbove_Icc.mono hr⟩, fun h => isBounded_of_bddAbove_of_bddBelow h.2 h.1⟩ #align real.bounded_iff_bdd_below_bdd_above Real.isBounded_iff_bddBelow_bddAbove theorem Real.subset_Icc_sInf_sSup_of_isBounded {s : Set ℝ} (h : IsBounded s) : s ⊆ Icc (sInf s) (sSup s) := subset_Icc_csInf_csSup (Real.isBounded_iff_bddBelow_bddAbove.1 h).1 (Real.isBounded_iff_bddBelow_bddAbove.1 h).2 #align real.subset_Icc_Inf_Sup_of_bounded Real.subset_Icc_sInf_sSup_of_isBounded end section Periodic namespace Function /-- A continuous, periodic function has compact range. -/ theorem Periodic.compact_of_continuous [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsCompact (range f) := by rw [← hp.image_uIcc hc 0] exact isCompact_uIcc.image hf #align function.periodic.compact_of_continuous Function.Periodic.compact_of_continuous @[deprecated Function.Periodic.compact_of_continuous] theorem Periodic.compact_of_continuous' [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : 0 < c) (hf : Continuous f) : IsCompact (range f) := hp.compact_of_continuous hc.ne' hf #align function.periodic.compact_of_continuous' Function.Periodic.compact_of_continuous' /-- A continuous, periodic function is bounded. -/ theorem Periodic.isBounded_of_continuous [PseudoMetricSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsBounded (range f) := (hp.compact_of_continuous hc hf).isBounded #align function.periodic.bounded_of_continuous Function.Periodic.isBounded_of_continuous end Function end Periodic section Subgroups namespace Int open Metric /-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a) := by rcases eq_or_ne a 0 with (rfl | ha) · rw [AddSubgroup.zmultiples_zero_eq_bot] exact Subsingleton.discreteTopology (α := (⊥ : Submodule ℤ ℝ)) rw [discreteTopology_iff_isOpen_singleton_zero, isOpen_induced_iff] refine' ⟨ball 0 |a|, isOpen_ball, _⟩ ext ⟨x, hx⟩
obtain ⟨k, rfl⟩ := AddSubgroup.mem_zmultiples_iff.mp hx
/-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a) := by rcases eq_or_ne a 0 with (rfl | ha) · rw [AddSubgroup.zmultiples_zero_eq_bot] exact Subsingleton.discreteTopology (α := (⊥ : Submodule ℤ ℝ)) rw [discreteTopology_iff_isOpen_singleton_zero, isOpen_induced_iff] refine' ⟨ball 0 |a|, isOpen_ball, _⟩ ext ⟨x, hx⟩
Mathlib.Topology.Instances.Real.227_0.cAejORboOY2cNtK
/-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a)
Mathlib_Topology_Instances_Real
case inr.h.mk.intro α : Type u β : Type v γ : Type w a : ℝ ha : a ≠ 0 k : ℤ hx : k • a ∈ AddSubgroup.zmultiples a ⊢ { val := k • a, property := hx } ∈ Subtype.val ⁻¹' ball 0 |a| ↔ { val := k • a, property := hx } ∈ {0}
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩ rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩ have := c.equiv_lim ε ε0 simp only [mem_map, mem_atTop_sets, mem_setOf_eq] refine' this.imp fun N hN n hn => hε (hN n hn) theorem Real.totallyBounded_ball (x ε : ℝ) : TotallyBounded (ball x ε) := by rw [Real.ball_eq_Ioo]; apply totallyBounded_Ioo #align real.totally_bounded_ball Real.totallyBounded_ball section theorem closure_of_rat_image_lt {q : ℚ} : closure (((↑) : ℚ → ℝ) '' { x | q < x }) = { r | ↑q ≤ r } := Subset.antisymm ((isClosed_ge' _).closure_subset_iff.2 (image_subset_iff.2 fun p h => le_of_lt <| (@Rat.cast_lt ℝ _ _ _).2 h)) fun x hx => mem_closure_iff_nhds.2 fun t ht => let ⟨ε, ε0, hε⟩ := Metric.mem_nhds_iff.1 ht let ⟨p, h₁, h₂⟩ := exists_rat_btwn ((lt_add_iff_pos_right x).2 ε0) ⟨p, hε <| by rwa [mem_ball, Real.dist_eq, abs_of_pos (sub_pos.2 h₁), sub_lt_iff_lt_add'], mem_image_of_mem _ <| Rat.cast_lt.1 <| lt_of_le_of_lt hx.out h₁⟩ #align closure_of_rat_image_lt closure_of_rat_image_lt /- TODO(Mario): Put these back only if needed later lemma closure_of_rat_image_le_eq {q : ℚ} : closure ((coe : ℚ → ℝ) '' {x | q ≤ x}) = {r | ↑q ≤ r} := _ lemma closure_of_rat_image_le_le_eq {a b : ℚ} (hab : a ≤ b) : closure (of_rat '' {q:ℚ | a ≤ q ∧ q ≤ b}) = {r:ℝ | of_rat a ≤ r ∧ r ≤ of_rat b} := _ -/ theorem Real.isBounded_iff_bddBelow_bddAbove {s : Set ℝ} : IsBounded s ↔ BddBelow s ∧ BddAbove s := ⟨fun bdd ↦ by obtain ⟨r, hr⟩ : ∃ r : ℝ, s ⊆ Icc (-r) r := by simpa [Real.closedBall_eq_Icc] using bdd.subset_closedBall 0 exact ⟨bddBelow_Icc.mono hr, bddAbove_Icc.mono hr⟩, fun h => isBounded_of_bddAbove_of_bddBelow h.2 h.1⟩ #align real.bounded_iff_bdd_below_bdd_above Real.isBounded_iff_bddBelow_bddAbove theorem Real.subset_Icc_sInf_sSup_of_isBounded {s : Set ℝ} (h : IsBounded s) : s ⊆ Icc (sInf s) (sSup s) := subset_Icc_csInf_csSup (Real.isBounded_iff_bddBelow_bddAbove.1 h).1 (Real.isBounded_iff_bddBelow_bddAbove.1 h).2 #align real.subset_Icc_Inf_Sup_of_bounded Real.subset_Icc_sInf_sSup_of_isBounded end section Periodic namespace Function /-- A continuous, periodic function has compact range. -/ theorem Periodic.compact_of_continuous [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsCompact (range f) := by rw [← hp.image_uIcc hc 0] exact isCompact_uIcc.image hf #align function.periodic.compact_of_continuous Function.Periodic.compact_of_continuous @[deprecated Function.Periodic.compact_of_continuous] theorem Periodic.compact_of_continuous' [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : 0 < c) (hf : Continuous f) : IsCompact (range f) := hp.compact_of_continuous hc.ne' hf #align function.periodic.compact_of_continuous' Function.Periodic.compact_of_continuous' /-- A continuous, periodic function is bounded. -/ theorem Periodic.isBounded_of_continuous [PseudoMetricSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsBounded (range f) := (hp.compact_of_continuous hc hf).isBounded #align function.periodic.bounded_of_continuous Function.Periodic.isBounded_of_continuous end Function end Periodic section Subgroups namespace Int open Metric /-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a) := by rcases eq_or_ne a 0 with (rfl | ha) · rw [AddSubgroup.zmultiples_zero_eq_bot] exact Subsingleton.discreteTopology (α := (⊥ : Submodule ℤ ℝ)) rw [discreteTopology_iff_isOpen_singleton_zero, isOpen_induced_iff] refine' ⟨ball 0 |a|, isOpen_ball, _⟩ ext ⟨x, hx⟩ obtain ⟨k, rfl⟩ := AddSubgroup.mem_zmultiples_iff.mp hx
simp [ha, Real.dist_eq, abs_mul, (by norm_cast : |(k : ℝ)| < 1 ↔ |k| < 1)]
/-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a) := by rcases eq_or_ne a 0 with (rfl | ha) · rw [AddSubgroup.zmultiples_zero_eq_bot] exact Subsingleton.discreteTopology (α := (⊥ : Submodule ℤ ℝ)) rw [discreteTopology_iff_isOpen_singleton_zero, isOpen_induced_iff] refine' ⟨ball 0 |a|, isOpen_ball, _⟩ ext ⟨x, hx⟩ obtain ⟨k, rfl⟩ := AddSubgroup.mem_zmultiples_iff.mp hx
Mathlib.Topology.Instances.Real.227_0.cAejORboOY2cNtK
/-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a)
Mathlib_Topology_Instances_Real
α : Type u β : Type v γ : Type w a : ℝ ha : a ≠ 0 k : ℤ hx : k • a ∈ AddSubgroup.zmultiples a ⊢ |↑k| < 1 ↔ |k| < 1
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩ rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩ have := c.equiv_lim ε ε0 simp only [mem_map, mem_atTop_sets, mem_setOf_eq] refine' this.imp fun N hN n hn => hε (hN n hn) theorem Real.totallyBounded_ball (x ε : ℝ) : TotallyBounded (ball x ε) := by rw [Real.ball_eq_Ioo]; apply totallyBounded_Ioo #align real.totally_bounded_ball Real.totallyBounded_ball section theorem closure_of_rat_image_lt {q : ℚ} : closure (((↑) : ℚ → ℝ) '' { x | q < x }) = { r | ↑q ≤ r } := Subset.antisymm ((isClosed_ge' _).closure_subset_iff.2 (image_subset_iff.2 fun p h => le_of_lt <| (@Rat.cast_lt ℝ _ _ _).2 h)) fun x hx => mem_closure_iff_nhds.2 fun t ht => let ⟨ε, ε0, hε⟩ := Metric.mem_nhds_iff.1 ht let ⟨p, h₁, h₂⟩ := exists_rat_btwn ((lt_add_iff_pos_right x).2 ε0) ⟨p, hε <| by rwa [mem_ball, Real.dist_eq, abs_of_pos (sub_pos.2 h₁), sub_lt_iff_lt_add'], mem_image_of_mem _ <| Rat.cast_lt.1 <| lt_of_le_of_lt hx.out h₁⟩ #align closure_of_rat_image_lt closure_of_rat_image_lt /- TODO(Mario): Put these back only if needed later lemma closure_of_rat_image_le_eq {q : ℚ} : closure ((coe : ℚ → ℝ) '' {x | q ≤ x}) = {r | ↑q ≤ r} := _ lemma closure_of_rat_image_le_le_eq {a b : ℚ} (hab : a ≤ b) : closure (of_rat '' {q:ℚ | a ≤ q ∧ q ≤ b}) = {r:ℝ | of_rat a ≤ r ∧ r ≤ of_rat b} := _ -/ theorem Real.isBounded_iff_bddBelow_bddAbove {s : Set ℝ} : IsBounded s ↔ BddBelow s ∧ BddAbove s := ⟨fun bdd ↦ by obtain ⟨r, hr⟩ : ∃ r : ℝ, s ⊆ Icc (-r) r := by simpa [Real.closedBall_eq_Icc] using bdd.subset_closedBall 0 exact ⟨bddBelow_Icc.mono hr, bddAbove_Icc.mono hr⟩, fun h => isBounded_of_bddAbove_of_bddBelow h.2 h.1⟩ #align real.bounded_iff_bdd_below_bdd_above Real.isBounded_iff_bddBelow_bddAbove theorem Real.subset_Icc_sInf_sSup_of_isBounded {s : Set ℝ} (h : IsBounded s) : s ⊆ Icc (sInf s) (sSup s) := subset_Icc_csInf_csSup (Real.isBounded_iff_bddBelow_bddAbove.1 h).1 (Real.isBounded_iff_bddBelow_bddAbove.1 h).2 #align real.subset_Icc_Inf_Sup_of_bounded Real.subset_Icc_sInf_sSup_of_isBounded end section Periodic namespace Function /-- A continuous, periodic function has compact range. -/ theorem Periodic.compact_of_continuous [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsCompact (range f) := by rw [← hp.image_uIcc hc 0] exact isCompact_uIcc.image hf #align function.periodic.compact_of_continuous Function.Periodic.compact_of_continuous @[deprecated Function.Periodic.compact_of_continuous] theorem Periodic.compact_of_continuous' [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : 0 < c) (hf : Continuous f) : IsCompact (range f) := hp.compact_of_continuous hc.ne' hf #align function.periodic.compact_of_continuous' Function.Periodic.compact_of_continuous' /-- A continuous, periodic function is bounded. -/ theorem Periodic.isBounded_of_continuous [PseudoMetricSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsBounded (range f) := (hp.compact_of_continuous hc hf).isBounded #align function.periodic.bounded_of_continuous Function.Periodic.isBounded_of_continuous end Function end Periodic section Subgroups namespace Int open Metric /-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a) := by rcases eq_or_ne a 0 with (rfl | ha) · rw [AddSubgroup.zmultiples_zero_eq_bot] exact Subsingleton.discreteTopology (α := (⊥ : Submodule ℤ ℝ)) rw [discreteTopology_iff_isOpen_singleton_zero, isOpen_induced_iff] refine' ⟨ball 0 |a|, isOpen_ball, _⟩ ext ⟨x, hx⟩ obtain ⟨k, rfl⟩ := AddSubgroup.mem_zmultiples_iff.mp hx simp [ha, Real.dist_eq, abs_mul, (by
norm_cast
/-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a) := by rcases eq_or_ne a 0 with (rfl | ha) · rw [AddSubgroup.zmultiples_zero_eq_bot] exact Subsingleton.discreteTopology (α := (⊥ : Submodule ℤ ℝ)) rw [discreteTopology_iff_isOpen_singleton_zero, isOpen_induced_iff] refine' ⟨ball 0 |a|, isOpen_ball, _⟩ ext ⟨x, hx⟩ obtain ⟨k, rfl⟩ := AddSubgroup.mem_zmultiples_iff.mp hx simp [ha, Real.dist_eq, abs_mul, (by
Mathlib.Topology.Instances.Real.227_0.cAejORboOY2cNtK
/-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a)
Mathlib_Topology_Instances_Real
α : Type u β : Type v γ : Type w ⊢ Tendsto Int.cast Filter.cofinite (cocompact ℝ)
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩ rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩ have := c.equiv_lim ε ε0 simp only [mem_map, mem_atTop_sets, mem_setOf_eq] refine' this.imp fun N hN n hn => hε (hN n hn) theorem Real.totallyBounded_ball (x ε : ℝ) : TotallyBounded (ball x ε) := by rw [Real.ball_eq_Ioo]; apply totallyBounded_Ioo #align real.totally_bounded_ball Real.totallyBounded_ball section theorem closure_of_rat_image_lt {q : ℚ} : closure (((↑) : ℚ → ℝ) '' { x | q < x }) = { r | ↑q ≤ r } := Subset.antisymm ((isClosed_ge' _).closure_subset_iff.2 (image_subset_iff.2 fun p h => le_of_lt <| (@Rat.cast_lt ℝ _ _ _).2 h)) fun x hx => mem_closure_iff_nhds.2 fun t ht => let ⟨ε, ε0, hε⟩ := Metric.mem_nhds_iff.1 ht let ⟨p, h₁, h₂⟩ := exists_rat_btwn ((lt_add_iff_pos_right x).2 ε0) ⟨p, hε <| by rwa [mem_ball, Real.dist_eq, abs_of_pos (sub_pos.2 h₁), sub_lt_iff_lt_add'], mem_image_of_mem _ <| Rat.cast_lt.1 <| lt_of_le_of_lt hx.out h₁⟩ #align closure_of_rat_image_lt closure_of_rat_image_lt /- TODO(Mario): Put these back only if needed later lemma closure_of_rat_image_le_eq {q : ℚ} : closure ((coe : ℚ → ℝ) '' {x | q ≤ x}) = {r | ↑q ≤ r} := _ lemma closure_of_rat_image_le_le_eq {a b : ℚ} (hab : a ≤ b) : closure (of_rat '' {q:ℚ | a ≤ q ∧ q ≤ b}) = {r:ℝ | of_rat a ≤ r ∧ r ≤ of_rat b} := _ -/ theorem Real.isBounded_iff_bddBelow_bddAbove {s : Set ℝ} : IsBounded s ↔ BddBelow s ∧ BddAbove s := ⟨fun bdd ↦ by obtain ⟨r, hr⟩ : ∃ r : ℝ, s ⊆ Icc (-r) r := by simpa [Real.closedBall_eq_Icc] using bdd.subset_closedBall 0 exact ⟨bddBelow_Icc.mono hr, bddAbove_Icc.mono hr⟩, fun h => isBounded_of_bddAbove_of_bddBelow h.2 h.1⟩ #align real.bounded_iff_bdd_below_bdd_above Real.isBounded_iff_bddBelow_bddAbove theorem Real.subset_Icc_sInf_sSup_of_isBounded {s : Set ℝ} (h : IsBounded s) : s ⊆ Icc (sInf s) (sSup s) := subset_Icc_csInf_csSup (Real.isBounded_iff_bddBelow_bddAbove.1 h).1 (Real.isBounded_iff_bddBelow_bddAbove.1 h).2 #align real.subset_Icc_Inf_Sup_of_bounded Real.subset_Icc_sInf_sSup_of_isBounded end section Periodic namespace Function /-- A continuous, periodic function has compact range. -/ theorem Periodic.compact_of_continuous [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsCompact (range f) := by rw [← hp.image_uIcc hc 0] exact isCompact_uIcc.image hf #align function.periodic.compact_of_continuous Function.Periodic.compact_of_continuous @[deprecated Function.Periodic.compact_of_continuous] theorem Periodic.compact_of_continuous' [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : 0 < c) (hf : Continuous f) : IsCompact (range f) := hp.compact_of_continuous hc.ne' hf #align function.periodic.compact_of_continuous' Function.Periodic.compact_of_continuous' /-- A continuous, periodic function is bounded. -/ theorem Periodic.isBounded_of_continuous [PseudoMetricSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsBounded (range f) := (hp.compact_of_continuous hc hf).isBounded #align function.periodic.bounded_of_continuous Function.Periodic.isBounded_of_continuous end Function end Periodic section Subgroups namespace Int open Metric /-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a) := by rcases eq_or_ne a 0 with (rfl | ha) · rw [AddSubgroup.zmultiples_zero_eq_bot] exact Subsingleton.discreteTopology (α := (⊥ : Submodule ℤ ℝ)) rw [discreteTopology_iff_isOpen_singleton_zero, isOpen_induced_iff] refine' ⟨ball 0 |a|, isOpen_ball, _⟩ ext ⟨x, hx⟩ obtain ⟨k, rfl⟩ := AddSubgroup.mem_zmultiples_iff.mp hx simp [ha, Real.dist_eq, abs_mul, (by norm_cast : |(k : ℝ)| < 1 ↔ |k| < 1)] /-- Under the coercion from `ℤ` to `ℝ`, inverse images of compact sets are finite. -/ theorem tendsto_coe_cofinite : Tendsto ((↑) : ℤ → ℝ) cofinite (cocompact ℝ) := by
apply (castAddHom ℝ).tendsto_coe_cofinite_of_discrete cast_injective
/-- Under the coercion from `ℤ` to `ℝ`, inverse images of compact sets are finite. -/ theorem tendsto_coe_cofinite : Tendsto ((↑) : ℤ → ℝ) cofinite (cocompact ℝ) := by
Mathlib.Topology.Instances.Real.239_0.cAejORboOY2cNtK
/-- Under the coercion from `ℤ` to `ℝ`, inverse images of compact sets are finite. -/ theorem tendsto_coe_cofinite : Tendsto ((↑) : ℤ → ℝ) cofinite (cocompact ℝ)
Mathlib_Topology_Instances_Real
α : Type u β : Type v γ : Type w ⊢ DiscreteTopology ↥(AddMonoidHom.range (castAddHom ℝ))
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩ rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩ have := c.equiv_lim ε ε0 simp only [mem_map, mem_atTop_sets, mem_setOf_eq] refine' this.imp fun N hN n hn => hε (hN n hn) theorem Real.totallyBounded_ball (x ε : ℝ) : TotallyBounded (ball x ε) := by rw [Real.ball_eq_Ioo]; apply totallyBounded_Ioo #align real.totally_bounded_ball Real.totallyBounded_ball section theorem closure_of_rat_image_lt {q : ℚ} : closure (((↑) : ℚ → ℝ) '' { x | q < x }) = { r | ↑q ≤ r } := Subset.antisymm ((isClosed_ge' _).closure_subset_iff.2 (image_subset_iff.2 fun p h => le_of_lt <| (@Rat.cast_lt ℝ _ _ _).2 h)) fun x hx => mem_closure_iff_nhds.2 fun t ht => let ⟨ε, ε0, hε⟩ := Metric.mem_nhds_iff.1 ht let ⟨p, h₁, h₂⟩ := exists_rat_btwn ((lt_add_iff_pos_right x).2 ε0) ⟨p, hε <| by rwa [mem_ball, Real.dist_eq, abs_of_pos (sub_pos.2 h₁), sub_lt_iff_lt_add'], mem_image_of_mem _ <| Rat.cast_lt.1 <| lt_of_le_of_lt hx.out h₁⟩ #align closure_of_rat_image_lt closure_of_rat_image_lt /- TODO(Mario): Put these back only if needed later lemma closure_of_rat_image_le_eq {q : ℚ} : closure ((coe : ℚ → ℝ) '' {x | q ≤ x}) = {r | ↑q ≤ r} := _ lemma closure_of_rat_image_le_le_eq {a b : ℚ} (hab : a ≤ b) : closure (of_rat '' {q:ℚ | a ≤ q ∧ q ≤ b}) = {r:ℝ | of_rat a ≤ r ∧ r ≤ of_rat b} := _ -/ theorem Real.isBounded_iff_bddBelow_bddAbove {s : Set ℝ} : IsBounded s ↔ BddBelow s ∧ BddAbove s := ⟨fun bdd ↦ by obtain ⟨r, hr⟩ : ∃ r : ℝ, s ⊆ Icc (-r) r := by simpa [Real.closedBall_eq_Icc] using bdd.subset_closedBall 0 exact ⟨bddBelow_Icc.mono hr, bddAbove_Icc.mono hr⟩, fun h => isBounded_of_bddAbove_of_bddBelow h.2 h.1⟩ #align real.bounded_iff_bdd_below_bdd_above Real.isBounded_iff_bddBelow_bddAbove theorem Real.subset_Icc_sInf_sSup_of_isBounded {s : Set ℝ} (h : IsBounded s) : s ⊆ Icc (sInf s) (sSup s) := subset_Icc_csInf_csSup (Real.isBounded_iff_bddBelow_bddAbove.1 h).1 (Real.isBounded_iff_bddBelow_bddAbove.1 h).2 #align real.subset_Icc_Inf_Sup_of_bounded Real.subset_Icc_sInf_sSup_of_isBounded end section Periodic namespace Function /-- A continuous, periodic function has compact range. -/ theorem Periodic.compact_of_continuous [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsCompact (range f) := by rw [← hp.image_uIcc hc 0] exact isCompact_uIcc.image hf #align function.periodic.compact_of_continuous Function.Periodic.compact_of_continuous @[deprecated Function.Periodic.compact_of_continuous] theorem Periodic.compact_of_continuous' [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : 0 < c) (hf : Continuous f) : IsCompact (range f) := hp.compact_of_continuous hc.ne' hf #align function.periodic.compact_of_continuous' Function.Periodic.compact_of_continuous' /-- A continuous, periodic function is bounded. -/ theorem Periodic.isBounded_of_continuous [PseudoMetricSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsBounded (range f) := (hp.compact_of_continuous hc hf).isBounded #align function.periodic.bounded_of_continuous Function.Periodic.isBounded_of_continuous end Function end Periodic section Subgroups namespace Int open Metric /-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a) := by rcases eq_or_ne a 0 with (rfl | ha) · rw [AddSubgroup.zmultiples_zero_eq_bot] exact Subsingleton.discreteTopology (α := (⊥ : Submodule ℤ ℝ)) rw [discreteTopology_iff_isOpen_singleton_zero, isOpen_induced_iff] refine' ⟨ball 0 |a|, isOpen_ball, _⟩ ext ⟨x, hx⟩ obtain ⟨k, rfl⟩ := AddSubgroup.mem_zmultiples_iff.mp hx simp [ha, Real.dist_eq, abs_mul, (by norm_cast : |(k : ℝ)| < 1 ↔ |k| < 1)] /-- Under the coercion from `ℤ` to `ℝ`, inverse images of compact sets are finite. -/ theorem tendsto_coe_cofinite : Tendsto ((↑) : ℤ → ℝ) cofinite (cocompact ℝ) := by apply (castAddHom ℝ).tendsto_coe_cofinite_of_discrete cast_injective
rw [range_castAddHom]
/-- Under the coercion from `ℤ` to `ℝ`, inverse images of compact sets are finite. -/ theorem tendsto_coe_cofinite : Tendsto ((↑) : ℤ → ℝ) cofinite (cocompact ℝ) := by apply (castAddHom ℝ).tendsto_coe_cofinite_of_discrete cast_injective
Mathlib.Topology.Instances.Real.239_0.cAejORboOY2cNtK
/-- Under the coercion from `ℤ` to `ℝ`, inverse images of compact sets are finite. -/ theorem tendsto_coe_cofinite : Tendsto ((↑) : ℤ → ℝ) cofinite (cocompact ℝ)
Mathlib_Topology_Instances_Real
α : Type u β : Type v γ : Type w ⊢ DiscreteTopology ↥(AddSubgroup.zmultiples 1)
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩ rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩ have := c.equiv_lim ε ε0 simp only [mem_map, mem_atTop_sets, mem_setOf_eq] refine' this.imp fun N hN n hn => hε (hN n hn) theorem Real.totallyBounded_ball (x ε : ℝ) : TotallyBounded (ball x ε) := by rw [Real.ball_eq_Ioo]; apply totallyBounded_Ioo #align real.totally_bounded_ball Real.totallyBounded_ball section theorem closure_of_rat_image_lt {q : ℚ} : closure (((↑) : ℚ → ℝ) '' { x | q < x }) = { r | ↑q ≤ r } := Subset.antisymm ((isClosed_ge' _).closure_subset_iff.2 (image_subset_iff.2 fun p h => le_of_lt <| (@Rat.cast_lt ℝ _ _ _).2 h)) fun x hx => mem_closure_iff_nhds.2 fun t ht => let ⟨ε, ε0, hε⟩ := Metric.mem_nhds_iff.1 ht let ⟨p, h₁, h₂⟩ := exists_rat_btwn ((lt_add_iff_pos_right x).2 ε0) ⟨p, hε <| by rwa [mem_ball, Real.dist_eq, abs_of_pos (sub_pos.2 h₁), sub_lt_iff_lt_add'], mem_image_of_mem _ <| Rat.cast_lt.1 <| lt_of_le_of_lt hx.out h₁⟩ #align closure_of_rat_image_lt closure_of_rat_image_lt /- TODO(Mario): Put these back only if needed later lemma closure_of_rat_image_le_eq {q : ℚ} : closure ((coe : ℚ → ℝ) '' {x | q ≤ x}) = {r | ↑q ≤ r} := _ lemma closure_of_rat_image_le_le_eq {a b : ℚ} (hab : a ≤ b) : closure (of_rat '' {q:ℚ | a ≤ q ∧ q ≤ b}) = {r:ℝ | of_rat a ≤ r ∧ r ≤ of_rat b} := _ -/ theorem Real.isBounded_iff_bddBelow_bddAbove {s : Set ℝ} : IsBounded s ↔ BddBelow s ∧ BddAbove s := ⟨fun bdd ↦ by obtain ⟨r, hr⟩ : ∃ r : ℝ, s ⊆ Icc (-r) r := by simpa [Real.closedBall_eq_Icc] using bdd.subset_closedBall 0 exact ⟨bddBelow_Icc.mono hr, bddAbove_Icc.mono hr⟩, fun h => isBounded_of_bddAbove_of_bddBelow h.2 h.1⟩ #align real.bounded_iff_bdd_below_bdd_above Real.isBounded_iff_bddBelow_bddAbove theorem Real.subset_Icc_sInf_sSup_of_isBounded {s : Set ℝ} (h : IsBounded s) : s ⊆ Icc (sInf s) (sSup s) := subset_Icc_csInf_csSup (Real.isBounded_iff_bddBelow_bddAbove.1 h).1 (Real.isBounded_iff_bddBelow_bddAbove.1 h).2 #align real.subset_Icc_Inf_Sup_of_bounded Real.subset_Icc_sInf_sSup_of_isBounded end section Periodic namespace Function /-- A continuous, periodic function has compact range. -/ theorem Periodic.compact_of_continuous [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsCompact (range f) := by rw [← hp.image_uIcc hc 0] exact isCompact_uIcc.image hf #align function.periodic.compact_of_continuous Function.Periodic.compact_of_continuous @[deprecated Function.Periodic.compact_of_continuous] theorem Periodic.compact_of_continuous' [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : 0 < c) (hf : Continuous f) : IsCompact (range f) := hp.compact_of_continuous hc.ne' hf #align function.periodic.compact_of_continuous' Function.Periodic.compact_of_continuous' /-- A continuous, periodic function is bounded. -/ theorem Periodic.isBounded_of_continuous [PseudoMetricSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsBounded (range f) := (hp.compact_of_continuous hc hf).isBounded #align function.periodic.bounded_of_continuous Function.Periodic.isBounded_of_continuous end Function end Periodic section Subgroups namespace Int open Metric /-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a) := by rcases eq_or_ne a 0 with (rfl | ha) · rw [AddSubgroup.zmultiples_zero_eq_bot] exact Subsingleton.discreteTopology (α := (⊥ : Submodule ℤ ℝ)) rw [discreteTopology_iff_isOpen_singleton_zero, isOpen_induced_iff] refine' ⟨ball 0 |a|, isOpen_ball, _⟩ ext ⟨x, hx⟩ obtain ⟨k, rfl⟩ := AddSubgroup.mem_zmultiples_iff.mp hx simp [ha, Real.dist_eq, abs_mul, (by norm_cast : |(k : ℝ)| < 1 ↔ |k| < 1)] /-- Under the coercion from `ℤ` to `ℝ`, inverse images of compact sets are finite. -/ theorem tendsto_coe_cofinite : Tendsto ((↑) : ℤ → ℝ) cofinite (cocompact ℝ) := by apply (castAddHom ℝ).tendsto_coe_cofinite_of_discrete cast_injective rw [range_castAddHom]
infer_instance
/-- Under the coercion from `ℤ` to `ℝ`, inverse images of compact sets are finite. -/ theorem tendsto_coe_cofinite : Tendsto ((↑) : ℤ → ℝ) cofinite (cocompact ℝ) := by apply (castAddHom ℝ).tendsto_coe_cofinite_of_discrete cast_injective rw [range_castAddHom]
Mathlib.Topology.Instances.Real.239_0.cAejORboOY2cNtK
/-- Under the coercion from `ℤ` to `ℝ`, inverse images of compact sets are finite. -/ theorem tendsto_coe_cofinite : Tendsto ((↑) : ℤ → ℝ) cofinite (cocompact ℝ)
Mathlib_Topology_Instances_Real
α : Type u β : Type v γ : Type w a : ℝ ha : a ≠ 0 ⊢ Tendsto (⇑((zmultiplesHom ℝ) a)) Filter.cofinite (cocompact ℝ)
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩ rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩ have := c.equiv_lim ε ε0 simp only [mem_map, mem_atTop_sets, mem_setOf_eq] refine' this.imp fun N hN n hn => hε (hN n hn) theorem Real.totallyBounded_ball (x ε : ℝ) : TotallyBounded (ball x ε) := by rw [Real.ball_eq_Ioo]; apply totallyBounded_Ioo #align real.totally_bounded_ball Real.totallyBounded_ball section theorem closure_of_rat_image_lt {q : ℚ} : closure (((↑) : ℚ → ℝ) '' { x | q < x }) = { r | ↑q ≤ r } := Subset.antisymm ((isClosed_ge' _).closure_subset_iff.2 (image_subset_iff.2 fun p h => le_of_lt <| (@Rat.cast_lt ℝ _ _ _).2 h)) fun x hx => mem_closure_iff_nhds.2 fun t ht => let ⟨ε, ε0, hε⟩ := Metric.mem_nhds_iff.1 ht let ⟨p, h₁, h₂⟩ := exists_rat_btwn ((lt_add_iff_pos_right x).2 ε0) ⟨p, hε <| by rwa [mem_ball, Real.dist_eq, abs_of_pos (sub_pos.2 h₁), sub_lt_iff_lt_add'], mem_image_of_mem _ <| Rat.cast_lt.1 <| lt_of_le_of_lt hx.out h₁⟩ #align closure_of_rat_image_lt closure_of_rat_image_lt /- TODO(Mario): Put these back only if needed later lemma closure_of_rat_image_le_eq {q : ℚ} : closure ((coe : ℚ → ℝ) '' {x | q ≤ x}) = {r | ↑q ≤ r} := _ lemma closure_of_rat_image_le_le_eq {a b : ℚ} (hab : a ≤ b) : closure (of_rat '' {q:ℚ | a ≤ q ∧ q ≤ b}) = {r:ℝ | of_rat a ≤ r ∧ r ≤ of_rat b} := _ -/ theorem Real.isBounded_iff_bddBelow_bddAbove {s : Set ℝ} : IsBounded s ↔ BddBelow s ∧ BddAbove s := ⟨fun bdd ↦ by obtain ⟨r, hr⟩ : ∃ r : ℝ, s ⊆ Icc (-r) r := by simpa [Real.closedBall_eq_Icc] using bdd.subset_closedBall 0 exact ⟨bddBelow_Icc.mono hr, bddAbove_Icc.mono hr⟩, fun h => isBounded_of_bddAbove_of_bddBelow h.2 h.1⟩ #align real.bounded_iff_bdd_below_bdd_above Real.isBounded_iff_bddBelow_bddAbove theorem Real.subset_Icc_sInf_sSup_of_isBounded {s : Set ℝ} (h : IsBounded s) : s ⊆ Icc (sInf s) (sSup s) := subset_Icc_csInf_csSup (Real.isBounded_iff_bddBelow_bddAbove.1 h).1 (Real.isBounded_iff_bddBelow_bddAbove.1 h).2 #align real.subset_Icc_Inf_Sup_of_bounded Real.subset_Icc_sInf_sSup_of_isBounded end section Periodic namespace Function /-- A continuous, periodic function has compact range. -/ theorem Periodic.compact_of_continuous [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsCompact (range f) := by rw [← hp.image_uIcc hc 0] exact isCompact_uIcc.image hf #align function.periodic.compact_of_continuous Function.Periodic.compact_of_continuous @[deprecated Function.Periodic.compact_of_continuous] theorem Periodic.compact_of_continuous' [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : 0 < c) (hf : Continuous f) : IsCompact (range f) := hp.compact_of_continuous hc.ne' hf #align function.periodic.compact_of_continuous' Function.Periodic.compact_of_continuous' /-- A continuous, periodic function is bounded. -/ theorem Periodic.isBounded_of_continuous [PseudoMetricSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsBounded (range f) := (hp.compact_of_continuous hc hf).isBounded #align function.periodic.bounded_of_continuous Function.Periodic.isBounded_of_continuous end Function end Periodic section Subgroups namespace Int open Metric /-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a) := by rcases eq_or_ne a 0 with (rfl | ha) · rw [AddSubgroup.zmultiples_zero_eq_bot] exact Subsingleton.discreteTopology (α := (⊥ : Submodule ℤ ℝ)) rw [discreteTopology_iff_isOpen_singleton_zero, isOpen_induced_iff] refine' ⟨ball 0 |a|, isOpen_ball, _⟩ ext ⟨x, hx⟩ obtain ⟨k, rfl⟩ := AddSubgroup.mem_zmultiples_iff.mp hx simp [ha, Real.dist_eq, abs_mul, (by norm_cast : |(k : ℝ)| < 1 ↔ |k| < 1)] /-- Under the coercion from `ℤ` to `ℝ`, inverse images of compact sets are finite. -/ theorem tendsto_coe_cofinite : Tendsto ((↑) : ℤ → ℝ) cofinite (cocompact ℝ) := by apply (castAddHom ℝ).tendsto_coe_cofinite_of_discrete cast_injective rw [range_castAddHom] infer_instance #align int.tendsto_coe_cofinite Int.tendsto_coe_cofinite /-- For nonzero `a`, the "multiples of `a`" map `zmultiplesHom` from `ℤ` to `ℝ` is discrete, i.e. inverse images of compact sets are finite. -/ theorem tendsto_zmultiplesHom_cofinite {a : ℝ} (ha : a ≠ 0) : Tendsto (zmultiplesHom ℝ a) cofinite (cocompact ℝ) := by
apply (zmultiplesHom ℝ a).tendsto_coe_cofinite_of_discrete $ smul_left_injective ℤ ha
/-- For nonzero `a`, the "multiples of `a`" map `zmultiplesHom` from `ℤ` to `ℝ` is discrete, i.e. inverse images of compact sets are finite. -/ theorem tendsto_zmultiplesHom_cofinite {a : ℝ} (ha : a ≠ 0) : Tendsto (zmultiplesHom ℝ a) cofinite (cocompact ℝ) := by
Mathlib.Topology.Instances.Real.246_0.cAejORboOY2cNtK
/-- For nonzero `a`, the "multiples of `a`" map `zmultiplesHom` from `ℤ` to `ℝ` is discrete, i.e. inverse images of compact sets are finite. -/ theorem tendsto_zmultiplesHom_cofinite {a : ℝ} (ha : a ≠ 0) : Tendsto (zmultiplesHom ℝ a) cofinite (cocompact ℝ)
Mathlib_Topology_Instances_Real
α : Type u β : Type v γ : Type w a : ℝ ha : a ≠ 0 ⊢ DiscreteTopology ↥(AddMonoidHom.range ((zmultiplesHom ℝ) a))
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩ rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩ have := c.equiv_lim ε ε0 simp only [mem_map, mem_atTop_sets, mem_setOf_eq] refine' this.imp fun N hN n hn => hε (hN n hn) theorem Real.totallyBounded_ball (x ε : ℝ) : TotallyBounded (ball x ε) := by rw [Real.ball_eq_Ioo]; apply totallyBounded_Ioo #align real.totally_bounded_ball Real.totallyBounded_ball section theorem closure_of_rat_image_lt {q : ℚ} : closure (((↑) : ℚ → ℝ) '' { x | q < x }) = { r | ↑q ≤ r } := Subset.antisymm ((isClosed_ge' _).closure_subset_iff.2 (image_subset_iff.2 fun p h => le_of_lt <| (@Rat.cast_lt ℝ _ _ _).2 h)) fun x hx => mem_closure_iff_nhds.2 fun t ht => let ⟨ε, ε0, hε⟩ := Metric.mem_nhds_iff.1 ht let ⟨p, h₁, h₂⟩ := exists_rat_btwn ((lt_add_iff_pos_right x).2 ε0) ⟨p, hε <| by rwa [mem_ball, Real.dist_eq, abs_of_pos (sub_pos.2 h₁), sub_lt_iff_lt_add'], mem_image_of_mem _ <| Rat.cast_lt.1 <| lt_of_le_of_lt hx.out h₁⟩ #align closure_of_rat_image_lt closure_of_rat_image_lt /- TODO(Mario): Put these back only if needed later lemma closure_of_rat_image_le_eq {q : ℚ} : closure ((coe : ℚ → ℝ) '' {x | q ≤ x}) = {r | ↑q ≤ r} := _ lemma closure_of_rat_image_le_le_eq {a b : ℚ} (hab : a ≤ b) : closure (of_rat '' {q:ℚ | a ≤ q ∧ q ≤ b}) = {r:ℝ | of_rat a ≤ r ∧ r ≤ of_rat b} := _ -/ theorem Real.isBounded_iff_bddBelow_bddAbove {s : Set ℝ} : IsBounded s ↔ BddBelow s ∧ BddAbove s := ⟨fun bdd ↦ by obtain ⟨r, hr⟩ : ∃ r : ℝ, s ⊆ Icc (-r) r := by simpa [Real.closedBall_eq_Icc] using bdd.subset_closedBall 0 exact ⟨bddBelow_Icc.mono hr, bddAbove_Icc.mono hr⟩, fun h => isBounded_of_bddAbove_of_bddBelow h.2 h.1⟩ #align real.bounded_iff_bdd_below_bdd_above Real.isBounded_iff_bddBelow_bddAbove theorem Real.subset_Icc_sInf_sSup_of_isBounded {s : Set ℝ} (h : IsBounded s) : s ⊆ Icc (sInf s) (sSup s) := subset_Icc_csInf_csSup (Real.isBounded_iff_bddBelow_bddAbove.1 h).1 (Real.isBounded_iff_bddBelow_bddAbove.1 h).2 #align real.subset_Icc_Inf_Sup_of_bounded Real.subset_Icc_sInf_sSup_of_isBounded end section Periodic namespace Function /-- A continuous, periodic function has compact range. -/ theorem Periodic.compact_of_continuous [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsCompact (range f) := by rw [← hp.image_uIcc hc 0] exact isCompact_uIcc.image hf #align function.periodic.compact_of_continuous Function.Periodic.compact_of_continuous @[deprecated Function.Periodic.compact_of_continuous] theorem Periodic.compact_of_continuous' [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : 0 < c) (hf : Continuous f) : IsCompact (range f) := hp.compact_of_continuous hc.ne' hf #align function.periodic.compact_of_continuous' Function.Periodic.compact_of_continuous' /-- A continuous, periodic function is bounded. -/ theorem Periodic.isBounded_of_continuous [PseudoMetricSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsBounded (range f) := (hp.compact_of_continuous hc hf).isBounded #align function.periodic.bounded_of_continuous Function.Periodic.isBounded_of_continuous end Function end Periodic section Subgroups namespace Int open Metric /-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a) := by rcases eq_or_ne a 0 with (rfl | ha) · rw [AddSubgroup.zmultiples_zero_eq_bot] exact Subsingleton.discreteTopology (α := (⊥ : Submodule ℤ ℝ)) rw [discreteTopology_iff_isOpen_singleton_zero, isOpen_induced_iff] refine' ⟨ball 0 |a|, isOpen_ball, _⟩ ext ⟨x, hx⟩ obtain ⟨k, rfl⟩ := AddSubgroup.mem_zmultiples_iff.mp hx simp [ha, Real.dist_eq, abs_mul, (by norm_cast : |(k : ℝ)| < 1 ↔ |k| < 1)] /-- Under the coercion from `ℤ` to `ℝ`, inverse images of compact sets are finite. -/ theorem tendsto_coe_cofinite : Tendsto ((↑) : ℤ → ℝ) cofinite (cocompact ℝ) := by apply (castAddHom ℝ).tendsto_coe_cofinite_of_discrete cast_injective rw [range_castAddHom] infer_instance #align int.tendsto_coe_cofinite Int.tendsto_coe_cofinite /-- For nonzero `a`, the "multiples of `a`" map `zmultiplesHom` from `ℤ` to `ℝ` is discrete, i.e. inverse images of compact sets are finite. -/ theorem tendsto_zmultiplesHom_cofinite {a : ℝ} (ha : a ≠ 0) : Tendsto (zmultiplesHom ℝ a) cofinite (cocompact ℝ) := by apply (zmultiplesHom ℝ a).tendsto_coe_cofinite_of_discrete $ smul_left_injective ℤ ha
rw [AddSubgroup.range_zmultiplesHom]
/-- For nonzero `a`, the "multiples of `a`" map `zmultiplesHom` from `ℤ` to `ℝ` is discrete, i.e. inverse images of compact sets are finite. -/ theorem tendsto_zmultiplesHom_cofinite {a : ℝ} (ha : a ≠ 0) : Tendsto (zmultiplesHom ℝ a) cofinite (cocompact ℝ) := by apply (zmultiplesHom ℝ a).tendsto_coe_cofinite_of_discrete $ smul_left_injective ℤ ha
Mathlib.Topology.Instances.Real.246_0.cAejORboOY2cNtK
/-- For nonzero `a`, the "multiples of `a`" map `zmultiplesHom` from `ℤ` to `ℝ` is discrete, i.e. inverse images of compact sets are finite. -/ theorem tendsto_zmultiplesHom_cofinite {a : ℝ} (ha : a ≠ 0) : Tendsto (zmultiplesHom ℝ a) cofinite (cocompact ℝ)
Mathlib_Topology_Instances_Real
α : Type u β : Type v γ : Type w a : ℝ ha : a ≠ 0 ⊢ DiscreteTopology ↥(AddSubgroup.zmultiples a)
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Algebra.Order.Field import Mathlib.Algebra.Periodic import Mathlib.Topology.Instances.Int #align_import topology.instances.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" /-! # Topological properties of ℝ -/ noncomputable section open Classical Filter Int Metric Set TopologicalSpace Bornology open scoped Topology Uniformity Interval universe u v w variable {α : Type u} {β : Type v} {γ : Type w} instance : NoncompactSpace ℝ := Int.closedEmbedding_coe_real.noncompactSpace theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_add_continuous_lemma abs ε0 ⟨δ, δ0, fun h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ h₁ h₂⟩ #align real.uniform_continuous_add Real.uniformContinuous_add theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨_, ε0, fun h => by rw [dist_comm] at h; simpa only [Real.dist_eq, neg_sub_neg] using h⟩ #align real.uniform_continuous_neg Real.uniformContinuous_neg instance : ContinuousStar ℝ := ⟨continuous_id⟩ instance : UniformAddGroup ℝ := UniformAddGroup.mk' Real.uniformContinuous_add Real.uniformContinuous_neg -- short-circuit type class inference instance : TopologicalAddGroup ℝ := by infer_instance instance : TopologicalRing ℝ := inferInstance instance : TopologicalDivisionRing ℝ := inferInstance instance : ProperSpace ℝ where isCompact_closedBall x r := by rw [Real.closedBall_eq_Icc] apply isCompact_Icc instance : SecondCountableTopology ℝ := secondCountable_of_proper theorem Real.isTopologicalBasis_Ioo_rat : @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b}) := isTopologicalBasis_of_isOpen_of_nhds (by simp (config := { contextual := true }) [isOpen_Ioo]) fun a v hav hv => let ⟨l, u, ⟨hl, hu⟩, h⟩ := mem_nhds_iff_exists_Ioo_subset.mp (IsOpen.mem_nhds hv hav) let ⟨q, hlq, hqa⟩ := exists_rat_btwn hl let ⟨p, hap, hpu⟩ := exists_rat_btwn hu ⟨Ioo q p, by simp only [mem_iUnion] exact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩, ⟨hqa, hap⟩, fun a' ⟨hqa', ha'p⟩ => h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩ #align real.is_topological_basis_Ioo_rat Real.isTopologicalBasis_Ioo_rat @[simp] theorem Real.cobounded_eq : cobounded ℝ = atBot ⊔ atTop := by simp only [← comap_dist_right_atTop (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop] @[simp] theorem Real.cocompact_eq : cocompact ℝ = atBot ⊔ atTop := by rw [← cobounded_eq_cocompact, cobounded_eq] #align real.cocompact_eq Real.cocompact_eq theorem Real.atBot_le_cocompact : atBot ≤ cocompact ℝ := by simp theorem Real.atTop_le_cocompact : atTop ≤ cocompact ℝ := by simp /- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (fun p : ℚ => p + r) := _ lemma uniform_embedding_mul_rat {q : ℚ} (hq : q ≠ 0) : uniform_embedding ((*) q) := _ -/ theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq] #align real.mem_closure_iff Real.mem_closure_iff theorem Real.uniformContinuous_inv (s : Set ℝ) {r : ℝ} (r0 : 0 < r) (H : ∀ x ∈ s, r ≤ |x|) : UniformContinuous fun p : s => p.1⁻¹ := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_inv_continuous_lemma abs ε0 r0 ⟨δ, δ0, fun {a b} h => Hδ (H _ a.2) (H _ b.2) h⟩ #align real.uniform_continuous_inv Real.uniformContinuous_inv theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ) := Metric.uniformContinuous_iff.2 fun ε ε0 => ⟨ε, ε0, lt_of_le_of_lt (abs_abs_sub_abs_le_abs_sub _ _)⟩ #align real.uniform_continuous_abs Real.uniformContinuous_abs @[deprecated continuousAt_inv₀] theorem Real.tendsto_inv {r : ℝ} (r0 : r ≠ 0) : Tendsto (fun q => q⁻¹) (𝓝 r) (𝓝 r⁻¹) := continuousAt_inv₀ r0 #align real.tendsto_inv Real.tendsto_inv theorem Real.continuous_inv : Continuous fun a : { r : ℝ // r ≠ 0 } => a.val⁻¹ := continuousOn_inv₀.restrict #align real.continuous_inv Real.continuous_inv @[deprecated Continuous.inv₀] theorem Real.Continuous.inv [TopologicalSpace α] {f : α → ℝ} (h : ∀ a, f a ≠ 0) (hf : Continuous f) : Continuous fun a => (f a)⁻¹ := hf.inv₀ h #align real.continuous.inv Real.Continuous.inv theorem Real.uniformContinuous_const_mul {x : ℝ} : UniformContinuous (x * ·) := uniformContinuous_const_smul x #align real.uniform_continuous_const_mul Real.uniformContinuous_const_mul theorem Real.uniformContinuous_mul (s : Set (ℝ × ℝ)) {r₁ r₂ : ℝ} (H : ∀ x ∈ s, |(x : ℝ × ℝ).1| < r₁ ∧ |x.2| < r₂) : UniformContinuous fun p : s => p.1.1 * p.1.2 := Metric.uniformContinuous_iff.2 fun _ε ε0 => let ⟨δ, δ0, Hδ⟩ := rat_mul_continuous_lemma abs ε0 ⟨δ, δ0, fun {a b} h => let ⟨h₁, h₂⟩ := max_lt_iff.1 h Hδ (H _ a.2).1 (H _ b.2).2 h₁ h₂⟩ #align real.uniform_continuous_mul Real.uniformContinuous_mul @[deprecated continuous_mul] protected theorem Real.continuous_mul : Continuous fun p : ℝ × ℝ => p.1 * p.2 := continuous_mul #align real.continuous_mul Real.continuous_mul -- porting note: moved `TopologicalRing` instance up instance : CompleteSpace ℝ := by apply complete_of_cauchySeq_tendsto intro u hu let c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩ refine' ⟨c.lim, fun s h => _⟩ rcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩ have := c.equiv_lim ε ε0 simp only [mem_map, mem_atTop_sets, mem_setOf_eq] refine' this.imp fun N hN n hn => hε (hN n hn) theorem Real.totallyBounded_ball (x ε : ℝ) : TotallyBounded (ball x ε) := by rw [Real.ball_eq_Ioo]; apply totallyBounded_Ioo #align real.totally_bounded_ball Real.totallyBounded_ball section theorem closure_of_rat_image_lt {q : ℚ} : closure (((↑) : ℚ → ℝ) '' { x | q < x }) = { r | ↑q ≤ r } := Subset.antisymm ((isClosed_ge' _).closure_subset_iff.2 (image_subset_iff.2 fun p h => le_of_lt <| (@Rat.cast_lt ℝ _ _ _).2 h)) fun x hx => mem_closure_iff_nhds.2 fun t ht => let ⟨ε, ε0, hε⟩ := Metric.mem_nhds_iff.1 ht let ⟨p, h₁, h₂⟩ := exists_rat_btwn ((lt_add_iff_pos_right x).2 ε0) ⟨p, hε <| by rwa [mem_ball, Real.dist_eq, abs_of_pos (sub_pos.2 h₁), sub_lt_iff_lt_add'], mem_image_of_mem _ <| Rat.cast_lt.1 <| lt_of_le_of_lt hx.out h₁⟩ #align closure_of_rat_image_lt closure_of_rat_image_lt /- TODO(Mario): Put these back only if needed later lemma closure_of_rat_image_le_eq {q : ℚ} : closure ((coe : ℚ → ℝ) '' {x | q ≤ x}) = {r | ↑q ≤ r} := _ lemma closure_of_rat_image_le_le_eq {a b : ℚ} (hab : a ≤ b) : closure (of_rat '' {q:ℚ | a ≤ q ∧ q ≤ b}) = {r:ℝ | of_rat a ≤ r ∧ r ≤ of_rat b} := _ -/ theorem Real.isBounded_iff_bddBelow_bddAbove {s : Set ℝ} : IsBounded s ↔ BddBelow s ∧ BddAbove s := ⟨fun bdd ↦ by obtain ⟨r, hr⟩ : ∃ r : ℝ, s ⊆ Icc (-r) r := by simpa [Real.closedBall_eq_Icc] using bdd.subset_closedBall 0 exact ⟨bddBelow_Icc.mono hr, bddAbove_Icc.mono hr⟩, fun h => isBounded_of_bddAbove_of_bddBelow h.2 h.1⟩ #align real.bounded_iff_bdd_below_bdd_above Real.isBounded_iff_bddBelow_bddAbove theorem Real.subset_Icc_sInf_sSup_of_isBounded {s : Set ℝ} (h : IsBounded s) : s ⊆ Icc (sInf s) (sSup s) := subset_Icc_csInf_csSup (Real.isBounded_iff_bddBelow_bddAbove.1 h).1 (Real.isBounded_iff_bddBelow_bddAbove.1 h).2 #align real.subset_Icc_Inf_Sup_of_bounded Real.subset_Icc_sInf_sSup_of_isBounded end section Periodic namespace Function /-- A continuous, periodic function has compact range. -/ theorem Periodic.compact_of_continuous [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsCompact (range f) := by rw [← hp.image_uIcc hc 0] exact isCompact_uIcc.image hf #align function.periodic.compact_of_continuous Function.Periodic.compact_of_continuous @[deprecated Function.Periodic.compact_of_continuous] theorem Periodic.compact_of_continuous' [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : 0 < c) (hf : Continuous f) : IsCompact (range f) := hp.compact_of_continuous hc.ne' hf #align function.periodic.compact_of_continuous' Function.Periodic.compact_of_continuous' /-- A continuous, periodic function is bounded. -/ theorem Periodic.isBounded_of_continuous [PseudoMetricSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c) (hc : c ≠ 0) (hf : Continuous f) : IsBounded (range f) := (hp.compact_of_continuous hc hf).isBounded #align function.periodic.bounded_of_continuous Function.Periodic.isBounded_of_continuous end Function end Periodic section Subgroups namespace Int open Metric /-- This is a special case of `NormedSpace.discreteTopology_zmultiples`. It exists only to simplify dependencies. -/ instance {a : ℝ} : DiscreteTopology (AddSubgroup.zmultiples a) := by rcases eq_or_ne a 0 with (rfl | ha) · rw [AddSubgroup.zmultiples_zero_eq_bot] exact Subsingleton.discreteTopology (α := (⊥ : Submodule ℤ ℝ)) rw [discreteTopology_iff_isOpen_singleton_zero, isOpen_induced_iff] refine' ⟨ball 0 |a|, isOpen_ball, _⟩ ext ⟨x, hx⟩ obtain ⟨k, rfl⟩ := AddSubgroup.mem_zmultiples_iff.mp hx simp [ha, Real.dist_eq, abs_mul, (by norm_cast : |(k : ℝ)| < 1 ↔ |k| < 1)] /-- Under the coercion from `ℤ` to `ℝ`, inverse images of compact sets are finite. -/ theorem tendsto_coe_cofinite : Tendsto ((↑) : ℤ → ℝ) cofinite (cocompact ℝ) := by apply (castAddHom ℝ).tendsto_coe_cofinite_of_discrete cast_injective rw [range_castAddHom] infer_instance #align int.tendsto_coe_cofinite Int.tendsto_coe_cofinite /-- For nonzero `a`, the "multiples of `a`" map `zmultiplesHom` from `ℤ` to `ℝ` is discrete, i.e. inverse images of compact sets are finite. -/ theorem tendsto_zmultiplesHom_cofinite {a : ℝ} (ha : a ≠ 0) : Tendsto (zmultiplesHom ℝ a) cofinite (cocompact ℝ) := by apply (zmultiplesHom ℝ a).tendsto_coe_cofinite_of_discrete $ smul_left_injective ℤ ha rw [AddSubgroup.range_zmultiplesHom]
infer_instance
/-- For nonzero `a`, the "multiples of `a`" map `zmultiplesHom` from `ℤ` to `ℝ` is discrete, i.e. inverse images of compact sets are finite. -/ theorem tendsto_zmultiplesHom_cofinite {a : ℝ} (ha : a ≠ 0) : Tendsto (zmultiplesHom ℝ a) cofinite (cocompact ℝ) := by apply (zmultiplesHom ℝ a).tendsto_coe_cofinite_of_discrete $ smul_left_injective ℤ ha rw [AddSubgroup.range_zmultiplesHom]
Mathlib.Topology.Instances.Real.246_0.cAejORboOY2cNtK
/-- For nonzero `a`, the "multiples of `a`" map `zmultiplesHom` from `ℤ` to `ℝ` is discrete, i.e. inverse images of compact sets are finite. -/ theorem tendsto_zmultiplesHom_cofinite {a : ℝ} (ha : a ≠ 0) : Tendsto (zmultiplesHom ℝ a) cofinite (cocompact ℝ)
Mathlib_Topology_Instances_Real
n : ℕ i : Fin n M : Type u_1 inst✝ : Zero M y : M t : Fin (n + 1) →₀ M s : Fin n →₀ M k : Fin n ⊢ (tail (cons y s)) k = s k
/- Copyright (c) 2021 Ivan Sadofschi Costa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ivan Sadofschi Costa -/ import Mathlib.Data.Finsupp.Defs #align_import data.finsupp.fin from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" /-! # `cons` and `tail` for maps `Fin n →₀ M` We interpret maps `Fin n →₀ M` as `n`-tuples of elements of `M`, We define the following operations: * `Finsupp.tail` : the tail of a map `Fin (n + 1) →₀ M`, i.e., its last `n` entries; * `Finsupp.cons` : adding an element at the beginning of an `n`-tuple, to get an `n + 1`-tuple; In this context, we prove some usual properties of `tail` and `cons`, analogous to those of `Data.Fin.Tuple.Basic`. -/ noncomputable section namespace Finsupp variable {n : ℕ} (i : Fin n) {M : Type*} [Zero M] (y : M) (t : Fin (n + 1) →₀ M) (s : Fin n →₀ M) /-- `tail` for maps `Fin (n + 1) →₀ M`. See `Fin.tail` for more details. -/ def tail (s : Fin (n + 1) →₀ M) : Fin n →₀ M := Finsupp.equivFunOnFinite.symm (Fin.tail s) #align finsupp.tail Finsupp.tail /-- `cons` for maps `Fin n →₀ M`. See `Fin.cons` for more details. -/ def cons (y : M) (s : Fin n →₀ M) : Fin (n + 1) →₀ M := Finsupp.equivFunOnFinite.symm (Fin.cons y s : Fin (n + 1) → M) #align finsupp.cons Finsupp.cons theorem tail_apply : tail t i = t i.succ := rfl #align finsupp.tail_apply Finsupp.tail_apply @[simp] theorem cons_zero : cons y s 0 = y := rfl #align finsupp.cons_zero Finsupp.cons_zero @[simp] theorem cons_succ : cons y s i.succ = s i := -- porting notes: was Fin.cons_succ _ _ _ rfl #align finsupp.cons_succ Finsupp.cons_succ @[simp] theorem tail_cons : tail (cons y s) = s := ext fun k => by
simp only [tail_apply, cons_succ]
@[simp] theorem tail_cons : tail (cons y s) = s := ext fun k => by
Mathlib.Data.Finsupp.Fin.54_0.Ry6yGz0hTElIyP3
@[simp] theorem tail_cons : tail (cons y s) = s
Mathlib_Data_Finsupp_Fin
n : ℕ i : Fin n M : Type u_1 inst✝ : Zero M y : M t : Fin (n + 1) →₀ M s : Fin n →₀ M ⊢ cons (t 0) (tail t) = t
/- Copyright (c) 2021 Ivan Sadofschi Costa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ivan Sadofschi Costa -/ import Mathlib.Data.Finsupp.Defs #align_import data.finsupp.fin from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" /-! # `cons` and `tail` for maps `Fin n →₀ M` We interpret maps `Fin n →₀ M` as `n`-tuples of elements of `M`, We define the following operations: * `Finsupp.tail` : the tail of a map `Fin (n + 1) →₀ M`, i.e., its last `n` entries; * `Finsupp.cons` : adding an element at the beginning of an `n`-tuple, to get an `n + 1`-tuple; In this context, we prove some usual properties of `tail` and `cons`, analogous to those of `Data.Fin.Tuple.Basic`. -/ noncomputable section namespace Finsupp variable {n : ℕ} (i : Fin n) {M : Type*} [Zero M] (y : M) (t : Fin (n + 1) →₀ M) (s : Fin n →₀ M) /-- `tail` for maps `Fin (n + 1) →₀ M`. See `Fin.tail` for more details. -/ def tail (s : Fin (n + 1) →₀ M) : Fin n →₀ M := Finsupp.equivFunOnFinite.symm (Fin.tail s) #align finsupp.tail Finsupp.tail /-- `cons` for maps `Fin n →₀ M`. See `Fin.cons` for more details. -/ def cons (y : M) (s : Fin n →₀ M) : Fin (n + 1) →₀ M := Finsupp.equivFunOnFinite.symm (Fin.cons y s : Fin (n + 1) → M) #align finsupp.cons Finsupp.cons theorem tail_apply : tail t i = t i.succ := rfl #align finsupp.tail_apply Finsupp.tail_apply @[simp] theorem cons_zero : cons y s 0 = y := rfl #align finsupp.cons_zero Finsupp.cons_zero @[simp] theorem cons_succ : cons y s i.succ = s i := -- porting notes: was Fin.cons_succ _ _ _ rfl #align finsupp.cons_succ Finsupp.cons_succ @[simp] theorem tail_cons : tail (cons y s) = s := ext fun k => by simp only [tail_apply, cons_succ] #align finsupp.tail_cons Finsupp.tail_cons @[simp] theorem cons_tail : cons (t 0) (tail t) = t := by
ext a
@[simp] theorem cons_tail : cons (t 0) (tail t) = t := by
Mathlib.Data.Finsupp.Fin.59_0.Ry6yGz0hTElIyP3
@[simp] theorem cons_tail : cons (t 0) (tail t) = t
Mathlib_Data_Finsupp_Fin
case h n : ℕ i : Fin n M : Type u_1 inst✝ : Zero M y : M t : Fin (n + 1) →₀ M s : Fin n →₀ M a : Fin (n + 1) ⊢ (cons (t 0) (tail t)) a = t a
/- Copyright (c) 2021 Ivan Sadofschi Costa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ivan Sadofschi Costa -/ import Mathlib.Data.Finsupp.Defs #align_import data.finsupp.fin from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" /-! # `cons` and `tail` for maps `Fin n →₀ M` We interpret maps `Fin n →₀ M` as `n`-tuples of elements of `M`, We define the following operations: * `Finsupp.tail` : the tail of a map `Fin (n + 1) →₀ M`, i.e., its last `n` entries; * `Finsupp.cons` : adding an element at the beginning of an `n`-tuple, to get an `n + 1`-tuple; In this context, we prove some usual properties of `tail` and `cons`, analogous to those of `Data.Fin.Tuple.Basic`. -/ noncomputable section namespace Finsupp variable {n : ℕ} (i : Fin n) {M : Type*} [Zero M] (y : M) (t : Fin (n + 1) →₀ M) (s : Fin n →₀ M) /-- `tail` for maps `Fin (n + 1) →₀ M`. See `Fin.tail` for more details. -/ def tail (s : Fin (n + 1) →₀ M) : Fin n →₀ M := Finsupp.equivFunOnFinite.symm (Fin.tail s) #align finsupp.tail Finsupp.tail /-- `cons` for maps `Fin n →₀ M`. See `Fin.cons` for more details. -/ def cons (y : M) (s : Fin n →₀ M) : Fin (n + 1) →₀ M := Finsupp.equivFunOnFinite.symm (Fin.cons y s : Fin (n + 1) → M) #align finsupp.cons Finsupp.cons theorem tail_apply : tail t i = t i.succ := rfl #align finsupp.tail_apply Finsupp.tail_apply @[simp] theorem cons_zero : cons y s 0 = y := rfl #align finsupp.cons_zero Finsupp.cons_zero @[simp] theorem cons_succ : cons y s i.succ = s i := -- porting notes: was Fin.cons_succ _ _ _ rfl #align finsupp.cons_succ Finsupp.cons_succ @[simp] theorem tail_cons : tail (cons y s) = s := ext fun k => by simp only [tail_apply, cons_succ] #align finsupp.tail_cons Finsupp.tail_cons @[simp] theorem cons_tail : cons (t 0) (tail t) = t := by ext a
by_cases c_a : a = 0
@[simp] theorem cons_tail : cons (t 0) (tail t) = t := by ext a
Mathlib.Data.Finsupp.Fin.59_0.Ry6yGz0hTElIyP3
@[simp] theorem cons_tail : cons (t 0) (tail t) = t
Mathlib_Data_Finsupp_Fin
case pos n : ℕ i : Fin n M : Type u_1 inst✝ : Zero M y : M t : Fin (n + 1) →₀ M s : Fin n →₀ M a : Fin (n + 1) c_a : a = 0 ⊢ (cons (t 0) (tail t)) a = t a
/- Copyright (c) 2021 Ivan Sadofschi Costa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ivan Sadofschi Costa -/ import Mathlib.Data.Finsupp.Defs #align_import data.finsupp.fin from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" /-! # `cons` and `tail` for maps `Fin n →₀ M` We interpret maps `Fin n →₀ M` as `n`-tuples of elements of `M`, We define the following operations: * `Finsupp.tail` : the tail of a map `Fin (n + 1) →₀ M`, i.e., its last `n` entries; * `Finsupp.cons` : adding an element at the beginning of an `n`-tuple, to get an `n + 1`-tuple; In this context, we prove some usual properties of `tail` and `cons`, analogous to those of `Data.Fin.Tuple.Basic`. -/ noncomputable section namespace Finsupp variable {n : ℕ} (i : Fin n) {M : Type*} [Zero M] (y : M) (t : Fin (n + 1) →₀ M) (s : Fin n →₀ M) /-- `tail` for maps `Fin (n + 1) →₀ M`. See `Fin.tail` for more details. -/ def tail (s : Fin (n + 1) →₀ M) : Fin n →₀ M := Finsupp.equivFunOnFinite.symm (Fin.tail s) #align finsupp.tail Finsupp.tail /-- `cons` for maps `Fin n →₀ M`. See `Fin.cons` for more details. -/ def cons (y : M) (s : Fin n →₀ M) : Fin (n + 1) →₀ M := Finsupp.equivFunOnFinite.symm (Fin.cons y s : Fin (n + 1) → M) #align finsupp.cons Finsupp.cons theorem tail_apply : tail t i = t i.succ := rfl #align finsupp.tail_apply Finsupp.tail_apply @[simp] theorem cons_zero : cons y s 0 = y := rfl #align finsupp.cons_zero Finsupp.cons_zero @[simp] theorem cons_succ : cons y s i.succ = s i := -- porting notes: was Fin.cons_succ _ _ _ rfl #align finsupp.cons_succ Finsupp.cons_succ @[simp] theorem tail_cons : tail (cons y s) = s := ext fun k => by simp only [tail_apply, cons_succ] #align finsupp.tail_cons Finsupp.tail_cons @[simp] theorem cons_tail : cons (t 0) (tail t) = t := by ext a by_cases c_a : a = 0 ·
rw [c_a, cons_zero]
@[simp] theorem cons_tail : cons (t 0) (tail t) = t := by ext a by_cases c_a : a = 0 ·
Mathlib.Data.Finsupp.Fin.59_0.Ry6yGz0hTElIyP3
@[simp] theorem cons_tail : cons (t 0) (tail t) = t
Mathlib_Data_Finsupp_Fin
case neg n : ℕ i : Fin n M : Type u_1 inst✝ : Zero M y : M t : Fin (n + 1) →₀ M s : Fin n →₀ M a : Fin (n + 1) c_a : ¬a = 0 ⊢ (cons (t 0) (tail t)) a = t a
/- Copyright (c) 2021 Ivan Sadofschi Costa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ivan Sadofschi Costa -/ import Mathlib.Data.Finsupp.Defs #align_import data.finsupp.fin from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" /-! # `cons` and `tail` for maps `Fin n →₀ M` We interpret maps `Fin n →₀ M` as `n`-tuples of elements of `M`, We define the following operations: * `Finsupp.tail` : the tail of a map `Fin (n + 1) →₀ M`, i.e., its last `n` entries; * `Finsupp.cons` : adding an element at the beginning of an `n`-tuple, to get an `n + 1`-tuple; In this context, we prove some usual properties of `tail` and `cons`, analogous to those of `Data.Fin.Tuple.Basic`. -/ noncomputable section namespace Finsupp variable {n : ℕ} (i : Fin n) {M : Type*} [Zero M] (y : M) (t : Fin (n + 1) →₀ M) (s : Fin n →₀ M) /-- `tail` for maps `Fin (n + 1) →₀ M`. See `Fin.tail` for more details. -/ def tail (s : Fin (n + 1) →₀ M) : Fin n →₀ M := Finsupp.equivFunOnFinite.symm (Fin.tail s) #align finsupp.tail Finsupp.tail /-- `cons` for maps `Fin n →₀ M`. See `Fin.cons` for more details. -/ def cons (y : M) (s : Fin n →₀ M) : Fin (n + 1) →₀ M := Finsupp.equivFunOnFinite.symm (Fin.cons y s : Fin (n + 1) → M) #align finsupp.cons Finsupp.cons theorem tail_apply : tail t i = t i.succ := rfl #align finsupp.tail_apply Finsupp.tail_apply @[simp] theorem cons_zero : cons y s 0 = y := rfl #align finsupp.cons_zero Finsupp.cons_zero @[simp] theorem cons_succ : cons y s i.succ = s i := -- porting notes: was Fin.cons_succ _ _ _ rfl #align finsupp.cons_succ Finsupp.cons_succ @[simp] theorem tail_cons : tail (cons y s) = s := ext fun k => by simp only [tail_apply, cons_succ] #align finsupp.tail_cons Finsupp.tail_cons @[simp] theorem cons_tail : cons (t 0) (tail t) = t := by ext a by_cases c_a : a = 0 · rw [c_a, cons_zero] ·
rw [← Fin.succ_pred a c_a, cons_succ, ← tail_apply]
@[simp] theorem cons_tail : cons (t 0) (tail t) = t := by ext a by_cases c_a : a = 0 · rw [c_a, cons_zero] ·
Mathlib.Data.Finsupp.Fin.59_0.Ry6yGz0hTElIyP3
@[simp] theorem cons_tail : cons (t 0) (tail t) = t
Mathlib_Data_Finsupp_Fin
n : ℕ i : Fin n M : Type u_1 inst✝ : Zero M y : M t : Fin (n + 1) →₀ M s : Fin n →₀ M ⊢ cons 0 0 = 0
/- Copyright (c) 2021 Ivan Sadofschi Costa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ivan Sadofschi Costa -/ import Mathlib.Data.Finsupp.Defs #align_import data.finsupp.fin from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" /-! # `cons` and `tail` for maps `Fin n →₀ M` We interpret maps `Fin n →₀ M` as `n`-tuples of elements of `M`, We define the following operations: * `Finsupp.tail` : the tail of a map `Fin (n + 1) →₀ M`, i.e., its last `n` entries; * `Finsupp.cons` : adding an element at the beginning of an `n`-tuple, to get an `n + 1`-tuple; In this context, we prove some usual properties of `tail` and `cons`, analogous to those of `Data.Fin.Tuple.Basic`. -/ noncomputable section namespace Finsupp variable {n : ℕ} (i : Fin n) {M : Type*} [Zero M] (y : M) (t : Fin (n + 1) →₀ M) (s : Fin n →₀ M) /-- `tail` for maps `Fin (n + 1) →₀ M`. See `Fin.tail` for more details. -/ def tail (s : Fin (n + 1) →₀ M) : Fin n →₀ M := Finsupp.equivFunOnFinite.symm (Fin.tail s) #align finsupp.tail Finsupp.tail /-- `cons` for maps `Fin n →₀ M`. See `Fin.cons` for more details. -/ def cons (y : M) (s : Fin n →₀ M) : Fin (n + 1) →₀ M := Finsupp.equivFunOnFinite.symm (Fin.cons y s : Fin (n + 1) → M) #align finsupp.cons Finsupp.cons theorem tail_apply : tail t i = t i.succ := rfl #align finsupp.tail_apply Finsupp.tail_apply @[simp] theorem cons_zero : cons y s 0 = y := rfl #align finsupp.cons_zero Finsupp.cons_zero @[simp] theorem cons_succ : cons y s i.succ = s i := -- porting notes: was Fin.cons_succ _ _ _ rfl #align finsupp.cons_succ Finsupp.cons_succ @[simp] theorem tail_cons : tail (cons y s) = s := ext fun k => by simp only [tail_apply, cons_succ] #align finsupp.tail_cons Finsupp.tail_cons @[simp] theorem cons_tail : cons (t 0) (tail t) = t := by ext a by_cases c_a : a = 0 · rw [c_a, cons_zero] · rw [← Fin.succ_pred a c_a, cons_succ, ← tail_apply] #align finsupp.cons_tail Finsupp.cons_tail @[simp] theorem cons_zero_zero : cons 0 (0 : Fin n →₀ M) = 0 := by
ext a
@[simp] theorem cons_zero_zero : cons 0 (0 : Fin n →₀ M) = 0 := by
Mathlib.Data.Finsupp.Fin.67_0.Ry6yGz0hTElIyP3
@[simp] theorem cons_zero_zero : cons 0 (0 : Fin n →₀ M) = 0
Mathlib_Data_Finsupp_Fin
case h n : ℕ i : Fin n M : Type u_1 inst✝ : Zero M y : M t : Fin (n + 1) →₀ M s : Fin n →₀ M a : Fin (n + 1) ⊢ (cons 0 0) a = 0 a
/- Copyright (c) 2021 Ivan Sadofschi Costa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ivan Sadofschi Costa -/ import Mathlib.Data.Finsupp.Defs #align_import data.finsupp.fin from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" /-! # `cons` and `tail` for maps `Fin n →₀ M` We interpret maps `Fin n →₀ M` as `n`-tuples of elements of `M`, We define the following operations: * `Finsupp.tail` : the tail of a map `Fin (n + 1) →₀ M`, i.e., its last `n` entries; * `Finsupp.cons` : adding an element at the beginning of an `n`-tuple, to get an `n + 1`-tuple; In this context, we prove some usual properties of `tail` and `cons`, analogous to those of `Data.Fin.Tuple.Basic`. -/ noncomputable section namespace Finsupp variable {n : ℕ} (i : Fin n) {M : Type*} [Zero M] (y : M) (t : Fin (n + 1) →₀ M) (s : Fin n →₀ M) /-- `tail` for maps `Fin (n + 1) →₀ M`. See `Fin.tail` for more details. -/ def tail (s : Fin (n + 1) →₀ M) : Fin n →₀ M := Finsupp.equivFunOnFinite.symm (Fin.tail s) #align finsupp.tail Finsupp.tail /-- `cons` for maps `Fin n →₀ M`. See `Fin.cons` for more details. -/ def cons (y : M) (s : Fin n →₀ M) : Fin (n + 1) →₀ M := Finsupp.equivFunOnFinite.symm (Fin.cons y s : Fin (n + 1) → M) #align finsupp.cons Finsupp.cons theorem tail_apply : tail t i = t i.succ := rfl #align finsupp.tail_apply Finsupp.tail_apply @[simp] theorem cons_zero : cons y s 0 = y := rfl #align finsupp.cons_zero Finsupp.cons_zero @[simp] theorem cons_succ : cons y s i.succ = s i := -- porting notes: was Fin.cons_succ _ _ _ rfl #align finsupp.cons_succ Finsupp.cons_succ @[simp] theorem tail_cons : tail (cons y s) = s := ext fun k => by simp only [tail_apply, cons_succ] #align finsupp.tail_cons Finsupp.tail_cons @[simp] theorem cons_tail : cons (t 0) (tail t) = t := by ext a by_cases c_a : a = 0 · rw [c_a, cons_zero] · rw [← Fin.succ_pred a c_a, cons_succ, ← tail_apply] #align finsupp.cons_tail Finsupp.cons_tail @[simp] theorem cons_zero_zero : cons 0 (0 : Fin n →₀ M) = 0 := by ext a
by_cases c : a = 0
@[simp] theorem cons_zero_zero : cons 0 (0 : Fin n →₀ M) = 0 := by ext a
Mathlib.Data.Finsupp.Fin.67_0.Ry6yGz0hTElIyP3
@[simp] theorem cons_zero_zero : cons 0 (0 : Fin n →₀ M) = 0
Mathlib_Data_Finsupp_Fin
case pos n : ℕ i : Fin n M : Type u_1 inst✝ : Zero M y : M t : Fin (n + 1) →₀ M s : Fin n →₀ M a : Fin (n + 1) c : a = 0 ⊢ (cons 0 0) a = 0 a
/- Copyright (c) 2021 Ivan Sadofschi Costa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ivan Sadofschi Costa -/ import Mathlib.Data.Finsupp.Defs #align_import data.finsupp.fin from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" /-! # `cons` and `tail` for maps `Fin n →₀ M` We interpret maps `Fin n →₀ M` as `n`-tuples of elements of `M`, We define the following operations: * `Finsupp.tail` : the tail of a map `Fin (n + 1) →₀ M`, i.e., its last `n` entries; * `Finsupp.cons` : adding an element at the beginning of an `n`-tuple, to get an `n + 1`-tuple; In this context, we prove some usual properties of `tail` and `cons`, analogous to those of `Data.Fin.Tuple.Basic`. -/ noncomputable section namespace Finsupp variable {n : ℕ} (i : Fin n) {M : Type*} [Zero M] (y : M) (t : Fin (n + 1) →₀ M) (s : Fin n →₀ M) /-- `tail` for maps `Fin (n + 1) →₀ M`. See `Fin.tail` for more details. -/ def tail (s : Fin (n + 1) →₀ M) : Fin n →₀ M := Finsupp.equivFunOnFinite.symm (Fin.tail s) #align finsupp.tail Finsupp.tail /-- `cons` for maps `Fin n →₀ M`. See `Fin.cons` for more details. -/ def cons (y : M) (s : Fin n →₀ M) : Fin (n + 1) →₀ M := Finsupp.equivFunOnFinite.symm (Fin.cons y s : Fin (n + 1) → M) #align finsupp.cons Finsupp.cons theorem tail_apply : tail t i = t i.succ := rfl #align finsupp.tail_apply Finsupp.tail_apply @[simp] theorem cons_zero : cons y s 0 = y := rfl #align finsupp.cons_zero Finsupp.cons_zero @[simp] theorem cons_succ : cons y s i.succ = s i := -- porting notes: was Fin.cons_succ _ _ _ rfl #align finsupp.cons_succ Finsupp.cons_succ @[simp] theorem tail_cons : tail (cons y s) = s := ext fun k => by simp only [tail_apply, cons_succ] #align finsupp.tail_cons Finsupp.tail_cons @[simp] theorem cons_tail : cons (t 0) (tail t) = t := by ext a by_cases c_a : a = 0 · rw [c_a, cons_zero] · rw [← Fin.succ_pred a c_a, cons_succ, ← tail_apply] #align finsupp.cons_tail Finsupp.cons_tail @[simp] theorem cons_zero_zero : cons 0 (0 : Fin n →₀ M) = 0 := by ext a by_cases c : a = 0 ·
simp [c]
@[simp] theorem cons_zero_zero : cons 0 (0 : Fin n →₀ M) = 0 := by ext a by_cases c : a = 0 ·
Mathlib.Data.Finsupp.Fin.67_0.Ry6yGz0hTElIyP3
@[simp] theorem cons_zero_zero : cons 0 (0 : Fin n →₀ M) = 0
Mathlib_Data_Finsupp_Fin
case neg n : ℕ i : Fin n M : Type u_1 inst✝ : Zero M y : M t : Fin (n + 1) →₀ M s : Fin n →₀ M a : Fin (n + 1) c : ¬a = 0 ⊢ (cons 0 0) a = 0 a
/- Copyright (c) 2021 Ivan Sadofschi Costa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ivan Sadofschi Costa -/ import Mathlib.Data.Finsupp.Defs #align_import data.finsupp.fin from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" /-! # `cons` and `tail` for maps `Fin n →₀ M` We interpret maps `Fin n →₀ M` as `n`-tuples of elements of `M`, We define the following operations: * `Finsupp.tail` : the tail of a map `Fin (n + 1) →₀ M`, i.e., its last `n` entries; * `Finsupp.cons` : adding an element at the beginning of an `n`-tuple, to get an `n + 1`-tuple; In this context, we prove some usual properties of `tail` and `cons`, analogous to those of `Data.Fin.Tuple.Basic`. -/ noncomputable section namespace Finsupp variable {n : ℕ} (i : Fin n) {M : Type*} [Zero M] (y : M) (t : Fin (n + 1) →₀ M) (s : Fin n →₀ M) /-- `tail` for maps `Fin (n + 1) →₀ M`. See `Fin.tail` for more details. -/ def tail (s : Fin (n + 1) →₀ M) : Fin n →₀ M := Finsupp.equivFunOnFinite.symm (Fin.tail s) #align finsupp.tail Finsupp.tail /-- `cons` for maps `Fin n →₀ M`. See `Fin.cons` for more details. -/ def cons (y : M) (s : Fin n →₀ M) : Fin (n + 1) →₀ M := Finsupp.equivFunOnFinite.symm (Fin.cons y s : Fin (n + 1) → M) #align finsupp.cons Finsupp.cons theorem tail_apply : tail t i = t i.succ := rfl #align finsupp.tail_apply Finsupp.tail_apply @[simp] theorem cons_zero : cons y s 0 = y := rfl #align finsupp.cons_zero Finsupp.cons_zero @[simp] theorem cons_succ : cons y s i.succ = s i := -- porting notes: was Fin.cons_succ _ _ _ rfl #align finsupp.cons_succ Finsupp.cons_succ @[simp] theorem tail_cons : tail (cons y s) = s := ext fun k => by simp only [tail_apply, cons_succ] #align finsupp.tail_cons Finsupp.tail_cons @[simp] theorem cons_tail : cons (t 0) (tail t) = t := by ext a by_cases c_a : a = 0 · rw [c_a, cons_zero] · rw [← Fin.succ_pred a c_a, cons_succ, ← tail_apply] #align finsupp.cons_tail Finsupp.cons_tail @[simp] theorem cons_zero_zero : cons 0 (0 : Fin n →₀ M) = 0 := by ext a by_cases c : a = 0 · simp [c] ·
rw [← Fin.succ_pred a c, cons_succ]
@[simp] theorem cons_zero_zero : cons 0 (0 : Fin n →₀ M) = 0 := by ext a by_cases c : a = 0 · simp [c] ·
Mathlib.Data.Finsupp.Fin.67_0.Ry6yGz0hTElIyP3
@[simp] theorem cons_zero_zero : cons 0 (0 : Fin n →₀ M) = 0
Mathlib_Data_Finsupp_Fin
case neg n : ℕ i : Fin n M : Type u_1 inst✝ : Zero M y : M t : Fin (n + 1) →₀ M s : Fin n →₀ M a : Fin (n + 1) c : ¬a = 0 ⊢ 0 (Fin.pred a c) = 0 (Fin.succ (Fin.pred a c))
/- Copyright (c) 2021 Ivan Sadofschi Costa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ivan Sadofschi Costa -/ import Mathlib.Data.Finsupp.Defs #align_import data.finsupp.fin from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" /-! # `cons` and `tail` for maps `Fin n →₀ M` We interpret maps `Fin n →₀ M` as `n`-tuples of elements of `M`, We define the following operations: * `Finsupp.tail` : the tail of a map `Fin (n + 1) →₀ M`, i.e., its last `n` entries; * `Finsupp.cons` : adding an element at the beginning of an `n`-tuple, to get an `n + 1`-tuple; In this context, we prove some usual properties of `tail` and `cons`, analogous to those of `Data.Fin.Tuple.Basic`. -/ noncomputable section namespace Finsupp variable {n : ℕ} (i : Fin n) {M : Type*} [Zero M] (y : M) (t : Fin (n + 1) →₀ M) (s : Fin n →₀ M) /-- `tail` for maps `Fin (n + 1) →₀ M`. See `Fin.tail` for more details. -/ def tail (s : Fin (n + 1) →₀ M) : Fin n →₀ M := Finsupp.equivFunOnFinite.symm (Fin.tail s) #align finsupp.tail Finsupp.tail /-- `cons` for maps `Fin n →₀ M`. See `Fin.cons` for more details. -/ def cons (y : M) (s : Fin n →₀ M) : Fin (n + 1) →₀ M := Finsupp.equivFunOnFinite.symm (Fin.cons y s : Fin (n + 1) → M) #align finsupp.cons Finsupp.cons theorem tail_apply : tail t i = t i.succ := rfl #align finsupp.tail_apply Finsupp.tail_apply @[simp] theorem cons_zero : cons y s 0 = y := rfl #align finsupp.cons_zero Finsupp.cons_zero @[simp] theorem cons_succ : cons y s i.succ = s i := -- porting notes: was Fin.cons_succ _ _ _ rfl #align finsupp.cons_succ Finsupp.cons_succ @[simp] theorem tail_cons : tail (cons y s) = s := ext fun k => by simp only [tail_apply, cons_succ] #align finsupp.tail_cons Finsupp.tail_cons @[simp] theorem cons_tail : cons (t 0) (tail t) = t := by ext a by_cases c_a : a = 0 · rw [c_a, cons_zero] · rw [← Fin.succ_pred a c_a, cons_succ, ← tail_apply] #align finsupp.cons_tail Finsupp.cons_tail @[simp] theorem cons_zero_zero : cons 0 (0 : Fin n →₀ M) = 0 := by ext a by_cases c : a = 0 · simp [c] · rw [← Fin.succ_pred a c, cons_succ]
simp
@[simp] theorem cons_zero_zero : cons 0 (0 : Fin n →₀ M) = 0 := by ext a by_cases c : a = 0 · simp [c] · rw [← Fin.succ_pred a c, cons_succ]
Mathlib.Data.Finsupp.Fin.67_0.Ry6yGz0hTElIyP3
@[simp] theorem cons_zero_zero : cons 0 (0 : Fin n →₀ M) = 0
Mathlib_Data_Finsupp_Fin
n : ℕ i : Fin n M : Type u_1 inst✝ : Zero M y : M t : Fin (n + 1) →₀ M s : Fin n →₀ M h : y ≠ 0 ⊢ cons y s ≠ 0
/- Copyright (c) 2021 Ivan Sadofschi Costa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ivan Sadofschi Costa -/ import Mathlib.Data.Finsupp.Defs #align_import data.finsupp.fin from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" /-! # `cons` and `tail` for maps `Fin n →₀ M` We interpret maps `Fin n →₀ M` as `n`-tuples of elements of `M`, We define the following operations: * `Finsupp.tail` : the tail of a map `Fin (n + 1) →₀ M`, i.e., its last `n` entries; * `Finsupp.cons` : adding an element at the beginning of an `n`-tuple, to get an `n + 1`-tuple; In this context, we prove some usual properties of `tail` and `cons`, analogous to those of `Data.Fin.Tuple.Basic`. -/ noncomputable section namespace Finsupp variable {n : ℕ} (i : Fin n) {M : Type*} [Zero M] (y : M) (t : Fin (n + 1) →₀ M) (s : Fin n →₀ M) /-- `tail` for maps `Fin (n + 1) →₀ M`. See `Fin.tail` for more details. -/ def tail (s : Fin (n + 1) →₀ M) : Fin n →₀ M := Finsupp.equivFunOnFinite.symm (Fin.tail s) #align finsupp.tail Finsupp.tail /-- `cons` for maps `Fin n →₀ M`. See `Fin.cons` for more details. -/ def cons (y : M) (s : Fin n →₀ M) : Fin (n + 1) →₀ M := Finsupp.equivFunOnFinite.symm (Fin.cons y s : Fin (n + 1) → M) #align finsupp.cons Finsupp.cons theorem tail_apply : tail t i = t i.succ := rfl #align finsupp.tail_apply Finsupp.tail_apply @[simp] theorem cons_zero : cons y s 0 = y := rfl #align finsupp.cons_zero Finsupp.cons_zero @[simp] theorem cons_succ : cons y s i.succ = s i := -- porting notes: was Fin.cons_succ _ _ _ rfl #align finsupp.cons_succ Finsupp.cons_succ @[simp] theorem tail_cons : tail (cons y s) = s := ext fun k => by simp only [tail_apply, cons_succ] #align finsupp.tail_cons Finsupp.tail_cons @[simp] theorem cons_tail : cons (t 0) (tail t) = t := by ext a by_cases c_a : a = 0 · rw [c_a, cons_zero] · rw [← Fin.succ_pred a c_a, cons_succ, ← tail_apply] #align finsupp.cons_tail Finsupp.cons_tail @[simp] theorem cons_zero_zero : cons 0 (0 : Fin n →₀ M) = 0 := by ext a by_cases c : a = 0 · simp [c] · rw [← Fin.succ_pred a c, cons_succ] simp #align finsupp.cons_zero_zero Finsupp.cons_zero_zero variable {s} {y} theorem cons_ne_zero_of_left (h : y ≠ 0) : cons y s ≠ 0 := by
contrapose! h with c
theorem cons_ne_zero_of_left (h : y ≠ 0) : cons y s ≠ 0 := by
Mathlib.Data.Finsupp.Fin.78_0.Ry6yGz0hTElIyP3
theorem cons_ne_zero_of_left (h : y ≠ 0) : cons y s ≠ 0
Mathlib_Data_Finsupp_Fin
n : ℕ i : Fin n M : Type u_1 inst✝ : Zero M y : M t : Fin (n + 1) →₀ M s : Fin n →₀ M c : cons y s = 0 ⊢ y = 0
/- Copyright (c) 2021 Ivan Sadofschi Costa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ivan Sadofschi Costa -/ import Mathlib.Data.Finsupp.Defs #align_import data.finsupp.fin from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" /-! # `cons` and `tail` for maps `Fin n →₀ M` We interpret maps `Fin n →₀ M` as `n`-tuples of elements of `M`, We define the following operations: * `Finsupp.tail` : the tail of a map `Fin (n + 1) →₀ M`, i.e., its last `n` entries; * `Finsupp.cons` : adding an element at the beginning of an `n`-tuple, to get an `n + 1`-tuple; In this context, we prove some usual properties of `tail` and `cons`, analogous to those of `Data.Fin.Tuple.Basic`. -/ noncomputable section namespace Finsupp variable {n : ℕ} (i : Fin n) {M : Type*} [Zero M] (y : M) (t : Fin (n + 1) →₀ M) (s : Fin n →₀ M) /-- `tail` for maps `Fin (n + 1) →₀ M`. See `Fin.tail` for more details. -/ def tail (s : Fin (n + 1) →₀ M) : Fin n →₀ M := Finsupp.equivFunOnFinite.symm (Fin.tail s) #align finsupp.tail Finsupp.tail /-- `cons` for maps `Fin n →₀ M`. See `Fin.cons` for more details. -/ def cons (y : M) (s : Fin n →₀ M) : Fin (n + 1) →₀ M := Finsupp.equivFunOnFinite.symm (Fin.cons y s : Fin (n + 1) → M) #align finsupp.cons Finsupp.cons theorem tail_apply : tail t i = t i.succ := rfl #align finsupp.tail_apply Finsupp.tail_apply @[simp] theorem cons_zero : cons y s 0 = y := rfl #align finsupp.cons_zero Finsupp.cons_zero @[simp] theorem cons_succ : cons y s i.succ = s i := -- porting notes: was Fin.cons_succ _ _ _ rfl #align finsupp.cons_succ Finsupp.cons_succ @[simp] theorem tail_cons : tail (cons y s) = s := ext fun k => by simp only [tail_apply, cons_succ] #align finsupp.tail_cons Finsupp.tail_cons @[simp] theorem cons_tail : cons (t 0) (tail t) = t := by ext a by_cases c_a : a = 0 · rw [c_a, cons_zero] · rw [← Fin.succ_pred a c_a, cons_succ, ← tail_apply] #align finsupp.cons_tail Finsupp.cons_tail @[simp] theorem cons_zero_zero : cons 0 (0 : Fin n →₀ M) = 0 := by ext a by_cases c : a = 0 · simp [c] · rw [← Fin.succ_pred a c, cons_succ] simp #align finsupp.cons_zero_zero Finsupp.cons_zero_zero variable {s} {y} theorem cons_ne_zero_of_left (h : y ≠ 0) : cons y s ≠ 0 := by contrapose! h with c
rw [← cons_zero y s, c, Finsupp.coe_zero, Pi.zero_apply]
theorem cons_ne_zero_of_left (h : y ≠ 0) : cons y s ≠ 0 := by contrapose! h with c
Mathlib.Data.Finsupp.Fin.78_0.Ry6yGz0hTElIyP3
theorem cons_ne_zero_of_left (h : y ≠ 0) : cons y s ≠ 0
Mathlib_Data_Finsupp_Fin
n : ℕ i : Fin n M : Type u_1 inst✝ : Zero M y : M t : Fin (n + 1) →₀ M s : Fin n →₀ M h : s ≠ 0 ⊢ cons y s ≠ 0
/- Copyright (c) 2021 Ivan Sadofschi Costa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ivan Sadofschi Costa -/ import Mathlib.Data.Finsupp.Defs #align_import data.finsupp.fin from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" /-! # `cons` and `tail` for maps `Fin n →₀ M` We interpret maps `Fin n →₀ M` as `n`-tuples of elements of `M`, We define the following operations: * `Finsupp.tail` : the tail of a map `Fin (n + 1) →₀ M`, i.e., its last `n` entries; * `Finsupp.cons` : adding an element at the beginning of an `n`-tuple, to get an `n + 1`-tuple; In this context, we prove some usual properties of `tail` and `cons`, analogous to those of `Data.Fin.Tuple.Basic`. -/ noncomputable section namespace Finsupp variable {n : ℕ} (i : Fin n) {M : Type*} [Zero M] (y : M) (t : Fin (n + 1) →₀ M) (s : Fin n →₀ M) /-- `tail` for maps `Fin (n + 1) →₀ M`. See `Fin.tail` for more details. -/ def tail (s : Fin (n + 1) →₀ M) : Fin n →₀ M := Finsupp.equivFunOnFinite.symm (Fin.tail s) #align finsupp.tail Finsupp.tail /-- `cons` for maps `Fin n →₀ M`. See `Fin.cons` for more details. -/ def cons (y : M) (s : Fin n →₀ M) : Fin (n + 1) →₀ M := Finsupp.equivFunOnFinite.symm (Fin.cons y s : Fin (n + 1) → M) #align finsupp.cons Finsupp.cons theorem tail_apply : tail t i = t i.succ := rfl #align finsupp.tail_apply Finsupp.tail_apply @[simp] theorem cons_zero : cons y s 0 = y := rfl #align finsupp.cons_zero Finsupp.cons_zero @[simp] theorem cons_succ : cons y s i.succ = s i := -- porting notes: was Fin.cons_succ _ _ _ rfl #align finsupp.cons_succ Finsupp.cons_succ @[simp] theorem tail_cons : tail (cons y s) = s := ext fun k => by simp only [tail_apply, cons_succ] #align finsupp.tail_cons Finsupp.tail_cons @[simp] theorem cons_tail : cons (t 0) (tail t) = t := by ext a by_cases c_a : a = 0 · rw [c_a, cons_zero] · rw [← Fin.succ_pred a c_a, cons_succ, ← tail_apply] #align finsupp.cons_tail Finsupp.cons_tail @[simp] theorem cons_zero_zero : cons 0 (0 : Fin n →₀ M) = 0 := by ext a by_cases c : a = 0 · simp [c] · rw [← Fin.succ_pred a c, cons_succ] simp #align finsupp.cons_zero_zero Finsupp.cons_zero_zero variable {s} {y} theorem cons_ne_zero_of_left (h : y ≠ 0) : cons y s ≠ 0 := by contrapose! h with c rw [← cons_zero y s, c, Finsupp.coe_zero, Pi.zero_apply] #align finsupp.cons_ne_zero_of_left Finsupp.cons_ne_zero_of_left theorem cons_ne_zero_of_right (h : s ≠ 0) : cons y s ≠ 0 := by
contrapose! h with c
theorem cons_ne_zero_of_right (h : s ≠ 0) : cons y s ≠ 0 := by
Mathlib.Data.Finsupp.Fin.83_0.Ry6yGz0hTElIyP3
theorem cons_ne_zero_of_right (h : s ≠ 0) : cons y s ≠ 0
Mathlib_Data_Finsupp_Fin
n : ℕ i : Fin n M : Type u_1 inst✝ : Zero M y : M t : Fin (n + 1) →₀ M s : Fin n →₀ M c : cons y s = 0 ⊢ s = 0
/- Copyright (c) 2021 Ivan Sadofschi Costa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ivan Sadofschi Costa -/ import Mathlib.Data.Finsupp.Defs #align_import data.finsupp.fin from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" /-! # `cons` and `tail` for maps `Fin n →₀ M` We interpret maps `Fin n →₀ M` as `n`-tuples of elements of `M`, We define the following operations: * `Finsupp.tail` : the tail of a map `Fin (n + 1) →₀ M`, i.e., its last `n` entries; * `Finsupp.cons` : adding an element at the beginning of an `n`-tuple, to get an `n + 1`-tuple; In this context, we prove some usual properties of `tail` and `cons`, analogous to those of `Data.Fin.Tuple.Basic`. -/ noncomputable section namespace Finsupp variable {n : ℕ} (i : Fin n) {M : Type*} [Zero M] (y : M) (t : Fin (n + 1) →₀ M) (s : Fin n →₀ M) /-- `tail` for maps `Fin (n + 1) →₀ M`. See `Fin.tail` for more details. -/ def tail (s : Fin (n + 1) →₀ M) : Fin n →₀ M := Finsupp.equivFunOnFinite.symm (Fin.tail s) #align finsupp.tail Finsupp.tail /-- `cons` for maps `Fin n →₀ M`. See `Fin.cons` for more details. -/ def cons (y : M) (s : Fin n →₀ M) : Fin (n + 1) →₀ M := Finsupp.equivFunOnFinite.symm (Fin.cons y s : Fin (n + 1) → M) #align finsupp.cons Finsupp.cons theorem tail_apply : tail t i = t i.succ := rfl #align finsupp.tail_apply Finsupp.tail_apply @[simp] theorem cons_zero : cons y s 0 = y := rfl #align finsupp.cons_zero Finsupp.cons_zero @[simp] theorem cons_succ : cons y s i.succ = s i := -- porting notes: was Fin.cons_succ _ _ _ rfl #align finsupp.cons_succ Finsupp.cons_succ @[simp] theorem tail_cons : tail (cons y s) = s := ext fun k => by simp only [tail_apply, cons_succ] #align finsupp.tail_cons Finsupp.tail_cons @[simp] theorem cons_tail : cons (t 0) (tail t) = t := by ext a by_cases c_a : a = 0 · rw [c_a, cons_zero] · rw [← Fin.succ_pred a c_a, cons_succ, ← tail_apply] #align finsupp.cons_tail Finsupp.cons_tail @[simp] theorem cons_zero_zero : cons 0 (0 : Fin n →₀ M) = 0 := by ext a by_cases c : a = 0 · simp [c] · rw [← Fin.succ_pred a c, cons_succ] simp #align finsupp.cons_zero_zero Finsupp.cons_zero_zero variable {s} {y} theorem cons_ne_zero_of_left (h : y ≠ 0) : cons y s ≠ 0 := by contrapose! h with c rw [← cons_zero y s, c, Finsupp.coe_zero, Pi.zero_apply] #align finsupp.cons_ne_zero_of_left Finsupp.cons_ne_zero_of_left theorem cons_ne_zero_of_right (h : s ≠ 0) : cons y s ≠ 0 := by contrapose! h with c
ext a
theorem cons_ne_zero_of_right (h : s ≠ 0) : cons y s ≠ 0 := by contrapose! h with c
Mathlib.Data.Finsupp.Fin.83_0.Ry6yGz0hTElIyP3
theorem cons_ne_zero_of_right (h : s ≠ 0) : cons y s ≠ 0
Mathlib_Data_Finsupp_Fin
case h n : ℕ i : Fin n M : Type u_1 inst✝ : Zero M y : M t : Fin (n + 1) →₀ M s : Fin n →₀ M c : cons y s = 0 a : Fin n ⊢ s a = 0 a
/- Copyright (c) 2021 Ivan Sadofschi Costa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ivan Sadofschi Costa -/ import Mathlib.Data.Finsupp.Defs #align_import data.finsupp.fin from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" /-! # `cons` and `tail` for maps `Fin n →₀ M` We interpret maps `Fin n →₀ M` as `n`-tuples of elements of `M`, We define the following operations: * `Finsupp.tail` : the tail of a map `Fin (n + 1) →₀ M`, i.e., its last `n` entries; * `Finsupp.cons` : adding an element at the beginning of an `n`-tuple, to get an `n + 1`-tuple; In this context, we prove some usual properties of `tail` and `cons`, analogous to those of `Data.Fin.Tuple.Basic`. -/ noncomputable section namespace Finsupp variable {n : ℕ} (i : Fin n) {M : Type*} [Zero M] (y : M) (t : Fin (n + 1) →₀ M) (s : Fin n →₀ M) /-- `tail` for maps `Fin (n + 1) →₀ M`. See `Fin.tail` for more details. -/ def tail (s : Fin (n + 1) →₀ M) : Fin n →₀ M := Finsupp.equivFunOnFinite.symm (Fin.tail s) #align finsupp.tail Finsupp.tail /-- `cons` for maps `Fin n →₀ M`. See `Fin.cons` for more details. -/ def cons (y : M) (s : Fin n →₀ M) : Fin (n + 1) →₀ M := Finsupp.equivFunOnFinite.symm (Fin.cons y s : Fin (n + 1) → M) #align finsupp.cons Finsupp.cons theorem tail_apply : tail t i = t i.succ := rfl #align finsupp.tail_apply Finsupp.tail_apply @[simp] theorem cons_zero : cons y s 0 = y := rfl #align finsupp.cons_zero Finsupp.cons_zero @[simp] theorem cons_succ : cons y s i.succ = s i := -- porting notes: was Fin.cons_succ _ _ _ rfl #align finsupp.cons_succ Finsupp.cons_succ @[simp] theorem tail_cons : tail (cons y s) = s := ext fun k => by simp only [tail_apply, cons_succ] #align finsupp.tail_cons Finsupp.tail_cons @[simp] theorem cons_tail : cons (t 0) (tail t) = t := by ext a by_cases c_a : a = 0 · rw [c_a, cons_zero] · rw [← Fin.succ_pred a c_a, cons_succ, ← tail_apply] #align finsupp.cons_tail Finsupp.cons_tail @[simp] theorem cons_zero_zero : cons 0 (0 : Fin n →₀ M) = 0 := by ext a by_cases c : a = 0 · simp [c] · rw [← Fin.succ_pred a c, cons_succ] simp #align finsupp.cons_zero_zero Finsupp.cons_zero_zero variable {s} {y} theorem cons_ne_zero_of_left (h : y ≠ 0) : cons y s ≠ 0 := by contrapose! h with c rw [← cons_zero y s, c, Finsupp.coe_zero, Pi.zero_apply] #align finsupp.cons_ne_zero_of_left Finsupp.cons_ne_zero_of_left theorem cons_ne_zero_of_right (h : s ≠ 0) : cons y s ≠ 0 := by contrapose! h with c ext a
simp [← cons_succ a y s, c]
theorem cons_ne_zero_of_right (h : s ≠ 0) : cons y s ≠ 0 := by contrapose! h with c ext a
Mathlib.Data.Finsupp.Fin.83_0.Ry6yGz0hTElIyP3
theorem cons_ne_zero_of_right (h : s ≠ 0) : cons y s ≠ 0
Mathlib_Data_Finsupp_Fin
n : ℕ i : Fin n M : Type u_1 inst✝ : Zero M y : M t : Fin (n + 1) →₀ M s : Fin n →₀ M ⊢ cons y s ≠ 0 ↔ y ≠ 0 ∨ s ≠ 0
/- Copyright (c) 2021 Ivan Sadofschi Costa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ivan Sadofschi Costa -/ import Mathlib.Data.Finsupp.Defs #align_import data.finsupp.fin from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" /-! # `cons` and `tail` for maps `Fin n →₀ M` We interpret maps `Fin n →₀ M` as `n`-tuples of elements of `M`, We define the following operations: * `Finsupp.tail` : the tail of a map `Fin (n + 1) →₀ M`, i.e., its last `n` entries; * `Finsupp.cons` : adding an element at the beginning of an `n`-tuple, to get an `n + 1`-tuple; In this context, we prove some usual properties of `tail` and `cons`, analogous to those of `Data.Fin.Tuple.Basic`. -/ noncomputable section namespace Finsupp variable {n : ℕ} (i : Fin n) {M : Type*} [Zero M] (y : M) (t : Fin (n + 1) →₀ M) (s : Fin n →₀ M) /-- `tail` for maps `Fin (n + 1) →₀ M`. See `Fin.tail` for more details. -/ def tail (s : Fin (n + 1) →₀ M) : Fin n →₀ M := Finsupp.equivFunOnFinite.symm (Fin.tail s) #align finsupp.tail Finsupp.tail /-- `cons` for maps `Fin n →₀ M`. See `Fin.cons` for more details. -/ def cons (y : M) (s : Fin n →₀ M) : Fin (n + 1) →₀ M := Finsupp.equivFunOnFinite.symm (Fin.cons y s : Fin (n + 1) → M) #align finsupp.cons Finsupp.cons theorem tail_apply : tail t i = t i.succ := rfl #align finsupp.tail_apply Finsupp.tail_apply @[simp] theorem cons_zero : cons y s 0 = y := rfl #align finsupp.cons_zero Finsupp.cons_zero @[simp] theorem cons_succ : cons y s i.succ = s i := -- porting notes: was Fin.cons_succ _ _ _ rfl #align finsupp.cons_succ Finsupp.cons_succ @[simp] theorem tail_cons : tail (cons y s) = s := ext fun k => by simp only [tail_apply, cons_succ] #align finsupp.tail_cons Finsupp.tail_cons @[simp] theorem cons_tail : cons (t 0) (tail t) = t := by ext a by_cases c_a : a = 0 · rw [c_a, cons_zero] · rw [← Fin.succ_pred a c_a, cons_succ, ← tail_apply] #align finsupp.cons_tail Finsupp.cons_tail @[simp] theorem cons_zero_zero : cons 0 (0 : Fin n →₀ M) = 0 := by ext a by_cases c : a = 0 · simp [c] · rw [← Fin.succ_pred a c, cons_succ] simp #align finsupp.cons_zero_zero Finsupp.cons_zero_zero variable {s} {y} theorem cons_ne_zero_of_left (h : y ≠ 0) : cons y s ≠ 0 := by contrapose! h with c rw [← cons_zero y s, c, Finsupp.coe_zero, Pi.zero_apply] #align finsupp.cons_ne_zero_of_left Finsupp.cons_ne_zero_of_left theorem cons_ne_zero_of_right (h : s ≠ 0) : cons y s ≠ 0 := by contrapose! h with c ext a simp [← cons_succ a y s, c] #align finsupp.cons_ne_zero_of_right Finsupp.cons_ne_zero_of_right theorem cons_ne_zero_iff : cons y s ≠ 0 ↔ y ≠ 0 ∨ s ≠ 0 := by
refine' ⟨fun h => _, fun h => h.casesOn cons_ne_zero_of_left cons_ne_zero_of_right⟩
theorem cons_ne_zero_iff : cons y s ≠ 0 ↔ y ≠ 0 ∨ s ≠ 0 := by
Mathlib.Data.Finsupp.Fin.89_0.Ry6yGz0hTElIyP3
theorem cons_ne_zero_iff : cons y s ≠ 0 ↔ y ≠ 0 ∨ s ≠ 0
Mathlib_Data_Finsupp_Fin
n : ℕ i : Fin n M : Type u_1 inst✝ : Zero M y : M t : Fin (n + 1) →₀ M s : Fin n →₀ M h : cons y s ≠ 0 ⊢ y ≠ 0 ∨ s ≠ 0
/- Copyright (c) 2021 Ivan Sadofschi Costa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ivan Sadofschi Costa -/ import Mathlib.Data.Finsupp.Defs #align_import data.finsupp.fin from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" /-! # `cons` and `tail` for maps `Fin n →₀ M` We interpret maps `Fin n →₀ M` as `n`-tuples of elements of `M`, We define the following operations: * `Finsupp.tail` : the tail of a map `Fin (n + 1) →₀ M`, i.e., its last `n` entries; * `Finsupp.cons` : adding an element at the beginning of an `n`-tuple, to get an `n + 1`-tuple; In this context, we prove some usual properties of `tail` and `cons`, analogous to those of `Data.Fin.Tuple.Basic`. -/ noncomputable section namespace Finsupp variable {n : ℕ} (i : Fin n) {M : Type*} [Zero M] (y : M) (t : Fin (n + 1) →₀ M) (s : Fin n →₀ M) /-- `tail` for maps `Fin (n + 1) →₀ M`. See `Fin.tail` for more details. -/ def tail (s : Fin (n + 1) →₀ M) : Fin n →₀ M := Finsupp.equivFunOnFinite.symm (Fin.tail s) #align finsupp.tail Finsupp.tail /-- `cons` for maps `Fin n →₀ M`. See `Fin.cons` for more details. -/ def cons (y : M) (s : Fin n →₀ M) : Fin (n + 1) →₀ M := Finsupp.equivFunOnFinite.symm (Fin.cons y s : Fin (n + 1) → M) #align finsupp.cons Finsupp.cons theorem tail_apply : tail t i = t i.succ := rfl #align finsupp.tail_apply Finsupp.tail_apply @[simp] theorem cons_zero : cons y s 0 = y := rfl #align finsupp.cons_zero Finsupp.cons_zero @[simp] theorem cons_succ : cons y s i.succ = s i := -- porting notes: was Fin.cons_succ _ _ _ rfl #align finsupp.cons_succ Finsupp.cons_succ @[simp] theorem tail_cons : tail (cons y s) = s := ext fun k => by simp only [tail_apply, cons_succ] #align finsupp.tail_cons Finsupp.tail_cons @[simp] theorem cons_tail : cons (t 0) (tail t) = t := by ext a by_cases c_a : a = 0 · rw [c_a, cons_zero] · rw [← Fin.succ_pred a c_a, cons_succ, ← tail_apply] #align finsupp.cons_tail Finsupp.cons_tail @[simp] theorem cons_zero_zero : cons 0 (0 : Fin n →₀ M) = 0 := by ext a by_cases c : a = 0 · simp [c] · rw [← Fin.succ_pred a c, cons_succ] simp #align finsupp.cons_zero_zero Finsupp.cons_zero_zero variable {s} {y} theorem cons_ne_zero_of_left (h : y ≠ 0) : cons y s ≠ 0 := by contrapose! h with c rw [← cons_zero y s, c, Finsupp.coe_zero, Pi.zero_apply] #align finsupp.cons_ne_zero_of_left Finsupp.cons_ne_zero_of_left theorem cons_ne_zero_of_right (h : s ≠ 0) : cons y s ≠ 0 := by contrapose! h with c ext a simp [← cons_succ a y s, c] #align finsupp.cons_ne_zero_of_right Finsupp.cons_ne_zero_of_right theorem cons_ne_zero_iff : cons y s ≠ 0 ↔ y ≠ 0 ∨ s ≠ 0 := by refine' ⟨fun h => _, fun h => h.casesOn cons_ne_zero_of_left cons_ne_zero_of_right⟩
refine' imp_iff_not_or.1 fun h' c => h _
theorem cons_ne_zero_iff : cons y s ≠ 0 ↔ y ≠ 0 ∨ s ≠ 0 := by refine' ⟨fun h => _, fun h => h.casesOn cons_ne_zero_of_left cons_ne_zero_of_right⟩
Mathlib.Data.Finsupp.Fin.89_0.Ry6yGz0hTElIyP3
theorem cons_ne_zero_iff : cons y s ≠ 0 ↔ y ≠ 0 ∨ s ≠ 0
Mathlib_Data_Finsupp_Fin
n : ℕ i : Fin n M : Type u_1 inst✝ : Zero M y : M t : Fin (n + 1) →₀ M s : Fin n →₀ M h : cons y s ≠ 0 h' : y = 0 c : s = 0 ⊢ cons y s = 0
/- Copyright (c) 2021 Ivan Sadofschi Costa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ivan Sadofschi Costa -/ import Mathlib.Data.Finsupp.Defs #align_import data.finsupp.fin from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" /-! # `cons` and `tail` for maps `Fin n →₀ M` We interpret maps `Fin n →₀ M` as `n`-tuples of elements of `M`, We define the following operations: * `Finsupp.tail` : the tail of a map `Fin (n + 1) →₀ M`, i.e., its last `n` entries; * `Finsupp.cons` : adding an element at the beginning of an `n`-tuple, to get an `n + 1`-tuple; In this context, we prove some usual properties of `tail` and `cons`, analogous to those of `Data.Fin.Tuple.Basic`. -/ noncomputable section namespace Finsupp variable {n : ℕ} (i : Fin n) {M : Type*} [Zero M] (y : M) (t : Fin (n + 1) →₀ M) (s : Fin n →₀ M) /-- `tail` for maps `Fin (n + 1) →₀ M`. See `Fin.tail` for more details. -/ def tail (s : Fin (n + 1) →₀ M) : Fin n →₀ M := Finsupp.equivFunOnFinite.symm (Fin.tail s) #align finsupp.tail Finsupp.tail /-- `cons` for maps `Fin n →₀ M`. See `Fin.cons` for more details. -/ def cons (y : M) (s : Fin n →₀ M) : Fin (n + 1) →₀ M := Finsupp.equivFunOnFinite.symm (Fin.cons y s : Fin (n + 1) → M) #align finsupp.cons Finsupp.cons theorem tail_apply : tail t i = t i.succ := rfl #align finsupp.tail_apply Finsupp.tail_apply @[simp] theorem cons_zero : cons y s 0 = y := rfl #align finsupp.cons_zero Finsupp.cons_zero @[simp] theorem cons_succ : cons y s i.succ = s i := -- porting notes: was Fin.cons_succ _ _ _ rfl #align finsupp.cons_succ Finsupp.cons_succ @[simp] theorem tail_cons : tail (cons y s) = s := ext fun k => by simp only [tail_apply, cons_succ] #align finsupp.tail_cons Finsupp.tail_cons @[simp] theorem cons_tail : cons (t 0) (tail t) = t := by ext a by_cases c_a : a = 0 · rw [c_a, cons_zero] · rw [← Fin.succ_pred a c_a, cons_succ, ← tail_apply] #align finsupp.cons_tail Finsupp.cons_tail @[simp] theorem cons_zero_zero : cons 0 (0 : Fin n →₀ M) = 0 := by ext a by_cases c : a = 0 · simp [c] · rw [← Fin.succ_pred a c, cons_succ] simp #align finsupp.cons_zero_zero Finsupp.cons_zero_zero variable {s} {y} theorem cons_ne_zero_of_left (h : y ≠ 0) : cons y s ≠ 0 := by contrapose! h with c rw [← cons_zero y s, c, Finsupp.coe_zero, Pi.zero_apply] #align finsupp.cons_ne_zero_of_left Finsupp.cons_ne_zero_of_left theorem cons_ne_zero_of_right (h : s ≠ 0) : cons y s ≠ 0 := by contrapose! h with c ext a simp [← cons_succ a y s, c] #align finsupp.cons_ne_zero_of_right Finsupp.cons_ne_zero_of_right theorem cons_ne_zero_iff : cons y s ≠ 0 ↔ y ≠ 0 ∨ s ≠ 0 := by refine' ⟨fun h => _, fun h => h.casesOn cons_ne_zero_of_left cons_ne_zero_of_right⟩ refine' imp_iff_not_or.1 fun h' c => h _
rw [h', c, Finsupp.cons_zero_zero]
theorem cons_ne_zero_iff : cons y s ≠ 0 ↔ y ≠ 0 ∨ s ≠ 0 := by refine' ⟨fun h => _, fun h => h.casesOn cons_ne_zero_of_left cons_ne_zero_of_right⟩ refine' imp_iff_not_or.1 fun h' c => h _
Mathlib.Data.Finsupp.Fin.89_0.Ry6yGz0hTElIyP3
theorem cons_ne_zero_iff : cons y s ≠ 0 ↔ y ≠ 0 ∨ s ≠ 0
Mathlib_Data_Finsupp_Fin
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x✝ y✝ z : X s : Set X f g : X → Y x y : X ⊢ TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s, ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s, y ∈ closure {x}, closure {y} ⊆ closure {x}, ClusterPt y (pure x)]
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by
tfae_have 1 → 2
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by
Mathlib.Topology.Inseparable.67_0.2NeLzt0mQ64QlfB
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)]
Mathlib_Topology_Inseparable
case tfae_1_to_2 X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x✝ y✝ z : X s : Set X f g : X → Y x y : X ⊢ x ⤳ y → pure x ≤ 𝓝 y
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 ·
exact (pure_le_nhds _).trans
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 ·
Mathlib.Topology.Inseparable.67_0.2NeLzt0mQ64QlfB
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)]
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x✝ y✝ z : X s : Set X f g : X → Y x y : X tfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y ⊢ TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s, ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s, y ∈ closure {x}, closure {y} ⊆ closure {x}, ClusterPt y (pure x)]
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans
tfae_have 2 → 3
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans
Mathlib.Topology.Inseparable.67_0.2NeLzt0mQ64QlfB
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)]
Mathlib_Topology_Inseparable
case tfae_2_to_3 X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x✝ y✝ z : X s : Set X f g : X → Y x y : X tfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y ⊢ pure x ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 ·
exact fun h s hso hy => h (hso.mem_nhds hy)
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 ·
Mathlib.Topology.Inseparable.67_0.2NeLzt0mQ64QlfB
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)]
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x✝ y✝ z : X s : Set X f g : X → Y x y : X tfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y tfae_2_to_3 : pure x ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s ⊢ TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s, ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s, y ∈ closure {x}, closure {y} ⊆ closure {x}, ClusterPt y (pure x)]
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy)
tfae_have 3 → 4
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy)
Mathlib.Topology.Inseparable.67_0.2NeLzt0mQ64QlfB
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)]
Mathlib_Topology_Inseparable
case tfae_3_to_4 X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x✝ y✝ z : X s : Set X f g : X → Y x y : X tfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y tfae_2_to_3 : pure x ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s ⊢ (∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s) → ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 ·
exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 ·
Mathlib.Topology.Inseparable.67_0.2NeLzt0mQ64QlfB
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)]
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x✝ y✝ z : X s : Set X f g : X → Y x y : X tfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y tfae_2_to_3 : pure x ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s tfae_3_to_4 : (∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s) → ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s ⊢ TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s, ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s, y ∈ closure {x}, closure {y} ⊆ closure {x}, ClusterPt y (pure x)]
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx
tfae_have 4 → 5
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx
Mathlib.Topology.Inseparable.67_0.2NeLzt0mQ64QlfB
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)]
Mathlib_Topology_Inseparable
case tfae_4_to_5 X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x✝ y✝ z : X s : Set X f g : X → Y x y : X tfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y tfae_2_to_3 : pure x ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s tfae_3_to_4 : (∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s) → ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s ⊢ (∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s) → y ∈ closure {x}
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 ·
exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _)
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 ·
Mathlib.Topology.Inseparable.67_0.2NeLzt0mQ64QlfB
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)]
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x✝ y✝ z : X s : Set X f g : X → Y x y : X tfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y tfae_2_to_3 : pure x ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s tfae_3_to_4 : (∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s) → ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s tfae_4_to_5 : (∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s) → y ∈ closure {x} ⊢ TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s, ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s, y ∈ closure {x}, closure {y} ⊆ closure {x}, ClusterPt y (pure x)]
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _)
tfae_have 6 ↔ 5
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _)
Mathlib.Topology.Inseparable.67_0.2NeLzt0mQ64QlfB
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)]
Mathlib_Topology_Inseparable
case tfae_6_iff_5 X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x✝ y✝ z : X s : Set X f g : X → Y x y : X tfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y tfae_2_to_3 : pure x ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s tfae_3_to_4 : (∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s) → ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s tfae_4_to_5 : (∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s) → y ∈ closure {x} ⊢ closure {y} ⊆ closure {x} ↔ y ∈ closure {x}
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 ·
exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 ·
Mathlib.Topology.Inseparable.67_0.2NeLzt0mQ64QlfB
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)]
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x✝ y✝ z : X s : Set X f g : X → Y x y : X tfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y tfae_2_to_3 : pure x ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s tfae_3_to_4 : (∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s) → ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s tfae_4_to_5 : (∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s) → y ∈ closure {x} tfae_6_iff_5 : closure {y} ⊆ closure {x} ↔ y ∈ closure {x} ⊢ TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s, ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s, y ∈ closure {x}, closure {y} ⊆ closure {x}, ClusterPt y (pure x)]
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff
tfae_have 5 ↔ 7
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff
Mathlib.Topology.Inseparable.67_0.2NeLzt0mQ64QlfB
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)]
Mathlib_Topology_Inseparable
case tfae_5_iff_7 X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x✝ y✝ z : X s : Set X f g : X → Y x y : X tfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y tfae_2_to_3 : pure x ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s tfae_3_to_4 : (∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s) → ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s tfae_4_to_5 : (∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s) → y ∈ closure {x} tfae_6_iff_5 : closure {y} ⊆ closure {x} ↔ y ∈ closure {x} ⊢ y ∈ closure {x} ↔ ClusterPt y (pure x)
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 ·
rw [mem_closure_iff_clusterPt, principal_singleton]
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 ·
Mathlib.Topology.Inseparable.67_0.2NeLzt0mQ64QlfB
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)]
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x✝ y✝ z : X s : Set X f g : X → Y x y : X tfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y tfae_2_to_3 : pure x ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s tfae_3_to_4 : (∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s) → ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s tfae_4_to_5 : (∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s) → y ∈ closure {x} tfae_6_iff_5 : closure {y} ⊆ closure {x} ↔ y ∈ closure {x} tfae_5_iff_7 : y ∈ closure {x} ↔ ClusterPt y (pure x) ⊢ TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s, ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s, y ∈ closure {x}, closure {y} ⊆ closure {x}, ClusterPt y (pure x)]
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton]
tfae_have 5 → 1
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton]
Mathlib.Topology.Inseparable.67_0.2NeLzt0mQ64QlfB
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)]
Mathlib_Topology_Inseparable
case tfae_5_to_1 X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x✝ y✝ z : X s : Set X f g : X → Y x y : X tfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y tfae_2_to_3 : pure x ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s tfae_3_to_4 : (∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s) → ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s tfae_4_to_5 : (∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s) → y ∈ closure {x} tfae_6_iff_5 : closure {y} ⊆ closure {x} ↔ y ∈ closure {x} tfae_5_iff_7 : y ∈ closure {x} ↔ ClusterPt y (pure x) ⊢ y ∈ closure {x} → x ⤳ y
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 ·
refine' fun h => (nhds_basis_opens _).ge_iff.2 _
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 ·
Mathlib.Topology.Inseparable.67_0.2NeLzt0mQ64QlfB
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)]
Mathlib_Topology_Inseparable
case tfae_5_to_1 X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x✝ y✝ z : X s : Set X f g : X → Y x y : X tfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y tfae_2_to_3 : pure x ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s tfae_3_to_4 : (∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s) → ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s tfae_4_to_5 : (∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s) → y ∈ closure {x} tfae_6_iff_5 : closure {y} ⊆ closure {x} ↔ y ∈ closure {x} tfae_5_iff_7 : y ∈ closure {x} ↔ ClusterPt y (pure x) h : y ∈ closure {x} ⊢ ∀ (i' : Set X), y ∈ i' ∧ IsOpen i' → i' ∈ 𝓝 x
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _
rintro s ⟨hy, ho⟩
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _
Mathlib.Topology.Inseparable.67_0.2NeLzt0mQ64QlfB
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)]
Mathlib_Topology_Inseparable
case tfae_5_to_1.intro X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x✝ y✝ z : X s✝ : Set X f g : X → Y x y : X tfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y tfae_2_to_3 : pure x ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s tfae_3_to_4 : (∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s) → ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s tfae_4_to_5 : (∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s) → y ∈ closure {x} tfae_6_iff_5 : closure {y} ⊆ closure {x} ↔ y ∈ closure {x} tfae_5_iff_7 : y ∈ closure {x} ↔ ClusterPt y (pure x) h : y ∈ closure {x} s : Set X hy : y ∈ s ho : IsOpen s ⊢ s ∈ 𝓝 x
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩
rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩
Mathlib.Topology.Inseparable.67_0.2NeLzt0mQ64QlfB
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)]
Mathlib_Topology_Inseparable
case tfae_5_to_1.intro.intro.intro X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x y✝ z✝ : X s✝ : Set X f g : X → Y y : X s : Set X hy : y ∈ s ho : IsOpen s z : X hxs : z ∈ s tfae_1_to_2 : z ⤳ y → pure z ≤ 𝓝 y tfae_2_to_3 : pure z ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → z ∈ s tfae_3_to_4 : (∀ (s : Set X), IsOpen s → y ∈ s → z ∈ s) → ∀ (s : Set X), IsClosed s → z ∈ s → y ∈ s tfae_4_to_5 : (∀ (s : Set X), IsClosed s → z ∈ s → y ∈ s) → y ∈ closure {z} tfae_6_iff_5 : closure {y} ⊆ closure {z} ↔ y ∈ closure {z} tfae_5_iff_7 : y ∈ closure {z} ↔ ClusterPt y (pure z) h : y ∈ closure {z} ⊢ s ∈ 𝓝 z
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩
exact ho.mem_nhds hxs
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩
Mathlib.Topology.Inseparable.67_0.2NeLzt0mQ64QlfB
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)]
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x✝ y✝ z : X s : Set X f g : X → Y x y : X tfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y tfae_2_to_3 : pure x ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s tfae_3_to_4 : (∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s) → ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s tfae_4_to_5 : (∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s) → y ∈ closure {x} tfae_6_iff_5 : closure {y} ⊆ closure {x} ↔ y ∈ closure {x} tfae_5_iff_7 : y ∈ closure {x} ↔ ClusterPt y (pure x) tfae_5_to_1 : y ∈ closure {x} → x ⤳ y ⊢ TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s, ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s, y ∈ closure {x}, closure {y} ⊆ closure {x}, ClusterPt y (pure x)]
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs
tfae_finish
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs
Mathlib.Topology.Inseparable.67_0.2NeLzt0mQ64QlfB
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)]
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x y z : X s : Set X f g : X → Y ⊢ ker (𝓝 x) = {y | y ⤳ x}
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by
ext
theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by
Mathlib.Topology.Inseparable.111_0.2NeLzt0mQ64QlfB
theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x}
Mathlib_Topology_Inseparable
case h X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x y z : X s : Set X f g : X → Y x✝ : X ⊢ x✝ ∈ ker (𝓝 x) ↔ x✝ ∈ {y | y ⤳ x}
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext;
simp [specializes_iff_pure, le_def]
theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext;
Mathlib.Topology.Inseparable.111_0.2NeLzt0mQ64QlfB
theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x}
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x y z : X s : Set X f g : X → Y hf : Inducing f ⊢ f x ⤳ f y ↔ x ⤳ y
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext; simp [specializes_iff_pure, le_def] theorem specializes_iff_forall_open : x ⤳ y ↔ ∀ s : Set X, IsOpen s → y ∈ s → x ∈ s := (specializes_TFAE x y).out 0 2 #align specializes_iff_forall_open specializes_iff_forall_open theorem Specializes.mem_open (h : x ⤳ y) (hs : IsOpen s) (hy : y ∈ s) : x ∈ s := specializes_iff_forall_open.1 h s hs hy #align specializes.mem_open Specializes.mem_open theorem IsOpen.not_specializes (hs : IsOpen s) (hx : x ∉ s) (hy : y ∈ s) : ¬x ⤳ y := fun h => hx <| h.mem_open hs hy #align is_open.not_specializes IsOpen.not_specializes theorem specializes_iff_forall_closed : x ⤳ y ↔ ∀ s : Set X, IsClosed s → x ∈ s → y ∈ s := (specializes_TFAE x y).out 0 3 #align specializes_iff_forall_closed specializes_iff_forall_closed theorem Specializes.mem_closed (h : x ⤳ y) (hs : IsClosed s) (hx : x ∈ s) : y ∈ s := specializes_iff_forall_closed.1 h s hs hx #align specializes.mem_closed Specializes.mem_closed theorem IsClosed.not_specializes (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬x ⤳ y := fun h => hy <| h.mem_closed hs hx #align is_closed.not_specializes IsClosed.not_specializes theorem specializes_iff_mem_closure : x ⤳ y ↔ y ∈ closure ({x} : Set X) := (specializes_TFAE x y).out 0 4 #align specializes_iff_mem_closure specializes_iff_mem_closure alias ⟨Specializes.mem_closure, _⟩ := specializes_iff_mem_closure #align specializes.mem_closure Specializes.mem_closure theorem specializes_iff_closure_subset : x ⤳ y ↔ closure ({y} : Set X) ⊆ closure {x} := (specializes_TFAE x y).out 0 5 #align specializes_iff_closure_subset specializes_iff_closure_subset alias ⟨Specializes.closure_subset, _⟩ := specializes_iff_closure_subset #align specializes.closure_subset Specializes.closure_subset -- porting note: new lemma theorem specializes_iff_clusterPt : x ⤳ y ↔ ClusterPt y (pure x) := (specializes_TFAE x y).out 0 6 theorem Filter.HasBasis.specializes_iff {ι} {p : ι → Prop} {s : ι → Set X} (h : (𝓝 y).HasBasis p s) : x ⤳ y ↔ ∀ i, p i → x ∈ s i := specializes_iff_pure.trans h.ge_iff #align filter.has_basis.specializes_iff Filter.HasBasis.specializes_iff theorem specializes_rfl : x ⤳ x := le_rfl #align specializes_rfl specializes_rfl @[refl] theorem specializes_refl (x : X) : x ⤳ x := specializes_rfl #align specializes_refl specializes_refl @[trans] theorem Specializes.trans : x ⤳ y → y ⤳ z → x ⤳ z := le_trans #align specializes.trans Specializes.trans theorem specializes_of_eq (e : x = y) : x ⤳ y := e ▸ specializes_refl x #align specializes_of_eq specializes_of_eq theorem specializes_of_nhdsWithin (h₁ : 𝓝[s] x ≤ 𝓝[s] y) (h₂ : x ∈ s) : x ⤳ y := specializes_iff_pure.2 <| calc pure x ≤ 𝓝[s] x := le_inf (pure_le_nhds _) (le_principal_iff.2 h₂) _ ≤ 𝓝[s] y := h₁ _ ≤ 𝓝 y := inf_le_left #align specializes_of_nhds_within specializes_of_nhdsWithin theorem Specializes.map_of_continuousAt (h : x ⤳ y) (hy : ContinuousAt f y) : f x ⤳ f y := specializes_iff_pure.2 fun _s hs => mem_pure.2 <| mem_preimage.1 <| mem_of_mem_nhds <| hy.mono_left h hs #align specializes.map_of_continuous_at Specializes.map_of_continuousAt theorem Specializes.map (h : x ⤳ y) (hf : Continuous f) : f x ⤳ f y := h.map_of_continuousAt hf.rst.imntinuousAt #align specializes.map Specializes.map theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y := by
simp only [specializes_iff_mem_closure, hf.closure_eq_preimage_closure_image, image_singleton, mem_preimage]
theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y := by
Mathlib.Topology.Inseparable.195_0.2NeLzt0mQ64QlfB
theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x y z : X s : Set X f g : X → Y x₁ x₂ : X y₁ y₂ : Y ⊢ (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext; simp [specializes_iff_pure, le_def] theorem specializes_iff_forall_open : x ⤳ y ↔ ∀ s : Set X, IsOpen s → y ∈ s → x ∈ s := (specializes_TFAE x y).out 0 2 #align specializes_iff_forall_open specializes_iff_forall_open theorem Specializes.mem_open (h : x ⤳ y) (hs : IsOpen s) (hy : y ∈ s) : x ∈ s := specializes_iff_forall_open.1 h s hs hy #align specializes.mem_open Specializes.mem_open theorem IsOpen.not_specializes (hs : IsOpen s) (hx : x ∉ s) (hy : y ∈ s) : ¬x ⤳ y := fun h => hx <| h.mem_open hs hy #align is_open.not_specializes IsOpen.not_specializes theorem specializes_iff_forall_closed : x ⤳ y ↔ ∀ s : Set X, IsClosed s → x ∈ s → y ∈ s := (specializes_TFAE x y).out 0 3 #align specializes_iff_forall_closed specializes_iff_forall_closed theorem Specializes.mem_closed (h : x ⤳ y) (hs : IsClosed s) (hx : x ∈ s) : y ∈ s := specializes_iff_forall_closed.1 h s hs hx #align specializes.mem_closed Specializes.mem_closed theorem IsClosed.not_specializes (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬x ⤳ y := fun h => hy <| h.mem_closed hs hx #align is_closed.not_specializes IsClosed.not_specializes theorem specializes_iff_mem_closure : x ⤳ y ↔ y ∈ closure ({x} : Set X) := (specializes_TFAE x y).out 0 4 #align specializes_iff_mem_closure specializes_iff_mem_closure alias ⟨Specializes.mem_closure, _⟩ := specializes_iff_mem_closure #align specializes.mem_closure Specializes.mem_closure theorem specializes_iff_closure_subset : x ⤳ y ↔ closure ({y} : Set X) ⊆ closure {x} := (specializes_TFAE x y).out 0 5 #align specializes_iff_closure_subset specializes_iff_closure_subset alias ⟨Specializes.closure_subset, _⟩ := specializes_iff_closure_subset #align specializes.closure_subset Specializes.closure_subset -- porting note: new lemma theorem specializes_iff_clusterPt : x ⤳ y ↔ ClusterPt y (pure x) := (specializes_TFAE x y).out 0 6 theorem Filter.HasBasis.specializes_iff {ι} {p : ι → Prop} {s : ι → Set X} (h : (𝓝 y).HasBasis p s) : x ⤳ y ↔ ∀ i, p i → x ∈ s i := specializes_iff_pure.trans h.ge_iff #align filter.has_basis.specializes_iff Filter.HasBasis.specializes_iff theorem specializes_rfl : x ⤳ x := le_rfl #align specializes_rfl specializes_rfl @[refl] theorem specializes_refl (x : X) : x ⤳ x := specializes_rfl #align specializes_refl specializes_refl @[trans] theorem Specializes.trans : x ⤳ y → y ⤳ z → x ⤳ z := le_trans #align specializes.trans Specializes.trans theorem specializes_of_eq (e : x = y) : x ⤳ y := e ▸ specializes_refl x #align specializes_of_eq specializes_of_eq theorem specializes_of_nhdsWithin (h₁ : 𝓝[s] x ≤ 𝓝[s] y) (h₂ : x ∈ s) : x ⤳ y := specializes_iff_pure.2 <| calc pure x ≤ 𝓝[s] x := le_inf (pure_le_nhds _) (le_principal_iff.2 h₂) _ ≤ 𝓝[s] y := h₁ _ ≤ 𝓝 y := inf_le_left #align specializes_of_nhds_within specializes_of_nhdsWithin theorem Specializes.map_of_continuousAt (h : x ⤳ y) (hy : ContinuousAt f y) : f x ⤳ f y := specializes_iff_pure.2 fun _s hs => mem_pure.2 <| mem_preimage.1 <| mem_of_mem_nhds <| hy.mono_left h hs #align specializes.map_of_continuous_at Specializes.map_of_continuousAt theorem Specializes.map (h : x ⤳ y) (hf : Continuous f) : f x ⤳ f y := h.map_of_continuousAt hf.rst.imntinuousAt #align specializes.map Specializes.map theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y := by simp only [specializes_iff_mem_closure, hf.closure_eq_preimage_closure_image, image_singleton, mem_preimage] #align inducing.specializes_iff Inducing.specializes_iff theorem subtype_specializes_iff {p : X → Prop} (x y : Subtype p) : x ⤳ y ↔ (x : X) ⤳ y := inducing_subtype_val.specializes_iff.symm #align subtype_specializes_iff subtype_specializes_iff @[simp] theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂ := by
simp only [Specializes, nhds_prod_eq, prod_le_prod]
@[simp] theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂ := by
Mathlib.Topology.Inseparable.204_0.2NeLzt0mQ64QlfB
@[simp] theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x y z : X s : Set X f✝ g✝ : X → Y f g : (i : ι) → π i ⊢ f ⤳ g ↔ ∀ (i : ι), f i ⤳ g i
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext; simp [specializes_iff_pure, le_def] theorem specializes_iff_forall_open : x ⤳ y ↔ ∀ s : Set X, IsOpen s → y ∈ s → x ∈ s := (specializes_TFAE x y).out 0 2 #align specializes_iff_forall_open specializes_iff_forall_open theorem Specializes.mem_open (h : x ⤳ y) (hs : IsOpen s) (hy : y ∈ s) : x ∈ s := specializes_iff_forall_open.1 h s hs hy #align specializes.mem_open Specializes.mem_open theorem IsOpen.not_specializes (hs : IsOpen s) (hx : x ∉ s) (hy : y ∈ s) : ¬x ⤳ y := fun h => hx <| h.mem_open hs hy #align is_open.not_specializes IsOpen.not_specializes theorem specializes_iff_forall_closed : x ⤳ y ↔ ∀ s : Set X, IsClosed s → x ∈ s → y ∈ s := (specializes_TFAE x y).out 0 3 #align specializes_iff_forall_closed specializes_iff_forall_closed theorem Specializes.mem_closed (h : x ⤳ y) (hs : IsClosed s) (hx : x ∈ s) : y ∈ s := specializes_iff_forall_closed.1 h s hs hx #align specializes.mem_closed Specializes.mem_closed theorem IsClosed.not_specializes (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬x ⤳ y := fun h => hy <| h.mem_closed hs hx #align is_closed.not_specializes IsClosed.not_specializes theorem specializes_iff_mem_closure : x ⤳ y ↔ y ∈ closure ({x} : Set X) := (specializes_TFAE x y).out 0 4 #align specializes_iff_mem_closure specializes_iff_mem_closure alias ⟨Specializes.mem_closure, _⟩ := specializes_iff_mem_closure #align specializes.mem_closure Specializes.mem_closure theorem specializes_iff_closure_subset : x ⤳ y ↔ closure ({y} : Set X) ⊆ closure {x} := (specializes_TFAE x y).out 0 5 #align specializes_iff_closure_subset specializes_iff_closure_subset alias ⟨Specializes.closure_subset, _⟩ := specializes_iff_closure_subset #align specializes.closure_subset Specializes.closure_subset -- porting note: new lemma theorem specializes_iff_clusterPt : x ⤳ y ↔ ClusterPt y (pure x) := (specializes_TFAE x y).out 0 6 theorem Filter.HasBasis.specializes_iff {ι} {p : ι → Prop} {s : ι → Set X} (h : (𝓝 y).HasBasis p s) : x ⤳ y ↔ ∀ i, p i → x ∈ s i := specializes_iff_pure.trans h.ge_iff #align filter.has_basis.specializes_iff Filter.HasBasis.specializes_iff theorem specializes_rfl : x ⤳ x := le_rfl #align specializes_rfl specializes_rfl @[refl] theorem specializes_refl (x : X) : x ⤳ x := specializes_rfl #align specializes_refl specializes_refl @[trans] theorem Specializes.trans : x ⤳ y → y ⤳ z → x ⤳ z := le_trans #align specializes.trans Specializes.trans theorem specializes_of_eq (e : x = y) : x ⤳ y := e ▸ specializes_refl x #align specializes_of_eq specializes_of_eq theorem specializes_of_nhdsWithin (h₁ : 𝓝[s] x ≤ 𝓝[s] y) (h₂ : x ∈ s) : x ⤳ y := specializes_iff_pure.2 <| calc pure x ≤ 𝓝[s] x := le_inf (pure_le_nhds _) (le_principal_iff.2 h₂) _ ≤ 𝓝[s] y := h₁ _ ≤ 𝓝 y := inf_le_left #align specializes_of_nhds_within specializes_of_nhdsWithin theorem Specializes.map_of_continuousAt (h : x ⤳ y) (hy : ContinuousAt f y) : f x ⤳ f y := specializes_iff_pure.2 fun _s hs => mem_pure.2 <| mem_preimage.1 <| mem_of_mem_nhds <| hy.mono_left h hs #align specializes.map_of_continuous_at Specializes.map_of_continuousAt theorem Specializes.map (h : x ⤳ y) (hf : Continuous f) : f x ⤳ f y := h.map_of_continuousAt hf.rst.imntinuousAt #align specializes.map Specializes.map theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y := by simp only [specializes_iff_mem_closure, hf.closure_eq_preimage_closure_image, image_singleton, mem_preimage] #align inducing.specializes_iff Inducing.specializes_iff theorem subtype_specializes_iff {p : X → Prop} (x y : Subtype p) : x ⤳ y ↔ (x : X) ⤳ y := inducing_subtype_val.specializes_iff.symm #align subtype_specializes_iff subtype_specializes_iff @[simp] theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂ := by simp only [Specializes, nhds_prod_eq, prod_le_prod] #align specializes_prod specializes_prod theorem Specializes.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ⤳ x₂) (hy : y₁ ⤳ y₂) : (x₁, y₁) ⤳ (x₂, y₂) := specializes_prod.2 ⟨hx, hy⟩ #align specializes.prod Specializes.prod @[simp] theorem specializes_pi {f g : ∀ i, π i} : f ⤳ g ↔ ∀ i, f i ⤳ g i := by
simp only [Specializes, nhds_pi, pi_le_pi]
@[simp] theorem specializes_pi {f g : ∀ i, π i} : f ⤳ g ↔ ∀ i, f i ⤳ g i := by
Mathlib.Topology.Inseparable.214_0.2NeLzt0mQ64QlfB
@[simp] theorem specializes_pi {f g : ∀ i, π i} : f ⤳ g ↔ ∀ i, f i ⤳ g i
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x y z : X s : Set X f g : X → Y ⊢ ¬x ⤳ y ↔ ∃ S, IsOpen S ∧ y ∈ S ∧ x ∉ S
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext; simp [specializes_iff_pure, le_def] theorem specializes_iff_forall_open : x ⤳ y ↔ ∀ s : Set X, IsOpen s → y ∈ s → x ∈ s := (specializes_TFAE x y).out 0 2 #align specializes_iff_forall_open specializes_iff_forall_open theorem Specializes.mem_open (h : x ⤳ y) (hs : IsOpen s) (hy : y ∈ s) : x ∈ s := specializes_iff_forall_open.1 h s hs hy #align specializes.mem_open Specializes.mem_open theorem IsOpen.not_specializes (hs : IsOpen s) (hx : x ∉ s) (hy : y ∈ s) : ¬x ⤳ y := fun h => hx <| h.mem_open hs hy #align is_open.not_specializes IsOpen.not_specializes theorem specializes_iff_forall_closed : x ⤳ y ↔ ∀ s : Set X, IsClosed s → x ∈ s → y ∈ s := (specializes_TFAE x y).out 0 3 #align specializes_iff_forall_closed specializes_iff_forall_closed theorem Specializes.mem_closed (h : x ⤳ y) (hs : IsClosed s) (hx : x ∈ s) : y ∈ s := specializes_iff_forall_closed.1 h s hs hx #align specializes.mem_closed Specializes.mem_closed theorem IsClosed.not_specializes (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬x ⤳ y := fun h => hy <| h.mem_closed hs hx #align is_closed.not_specializes IsClosed.not_specializes theorem specializes_iff_mem_closure : x ⤳ y ↔ y ∈ closure ({x} : Set X) := (specializes_TFAE x y).out 0 4 #align specializes_iff_mem_closure specializes_iff_mem_closure alias ⟨Specializes.mem_closure, _⟩ := specializes_iff_mem_closure #align specializes.mem_closure Specializes.mem_closure theorem specializes_iff_closure_subset : x ⤳ y ↔ closure ({y} : Set X) ⊆ closure {x} := (specializes_TFAE x y).out 0 5 #align specializes_iff_closure_subset specializes_iff_closure_subset alias ⟨Specializes.closure_subset, _⟩ := specializes_iff_closure_subset #align specializes.closure_subset Specializes.closure_subset -- porting note: new lemma theorem specializes_iff_clusterPt : x ⤳ y ↔ ClusterPt y (pure x) := (specializes_TFAE x y).out 0 6 theorem Filter.HasBasis.specializes_iff {ι} {p : ι → Prop} {s : ι → Set X} (h : (𝓝 y).HasBasis p s) : x ⤳ y ↔ ∀ i, p i → x ∈ s i := specializes_iff_pure.trans h.ge_iff #align filter.has_basis.specializes_iff Filter.HasBasis.specializes_iff theorem specializes_rfl : x ⤳ x := le_rfl #align specializes_rfl specializes_rfl @[refl] theorem specializes_refl (x : X) : x ⤳ x := specializes_rfl #align specializes_refl specializes_refl @[trans] theorem Specializes.trans : x ⤳ y → y ⤳ z → x ⤳ z := le_trans #align specializes.trans Specializes.trans theorem specializes_of_eq (e : x = y) : x ⤳ y := e ▸ specializes_refl x #align specializes_of_eq specializes_of_eq theorem specializes_of_nhdsWithin (h₁ : 𝓝[s] x ≤ 𝓝[s] y) (h₂ : x ∈ s) : x ⤳ y := specializes_iff_pure.2 <| calc pure x ≤ 𝓝[s] x := le_inf (pure_le_nhds _) (le_principal_iff.2 h₂) _ ≤ 𝓝[s] y := h₁ _ ≤ 𝓝 y := inf_le_left #align specializes_of_nhds_within specializes_of_nhdsWithin theorem Specializes.map_of_continuousAt (h : x ⤳ y) (hy : ContinuousAt f y) : f x ⤳ f y := specializes_iff_pure.2 fun _s hs => mem_pure.2 <| mem_preimage.1 <| mem_of_mem_nhds <| hy.mono_left h hs #align specializes.map_of_continuous_at Specializes.map_of_continuousAt theorem Specializes.map (h : x ⤳ y) (hf : Continuous f) : f x ⤳ f y := h.map_of_continuousAt hf.rst.imntinuousAt #align specializes.map Specializes.map theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y := by simp only [specializes_iff_mem_closure, hf.closure_eq_preimage_closure_image, image_singleton, mem_preimage] #align inducing.specializes_iff Inducing.specializes_iff theorem subtype_specializes_iff {p : X → Prop} (x y : Subtype p) : x ⤳ y ↔ (x : X) ⤳ y := inducing_subtype_val.specializes_iff.symm #align subtype_specializes_iff subtype_specializes_iff @[simp] theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂ := by simp only [Specializes, nhds_prod_eq, prod_le_prod] #align specializes_prod specializes_prod theorem Specializes.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ⤳ x₂) (hy : y₁ ⤳ y₂) : (x₁, y₁) ⤳ (x₂, y₂) := specializes_prod.2 ⟨hx, hy⟩ #align specializes.prod Specializes.prod @[simp] theorem specializes_pi {f g : ∀ i, π i} : f ⤳ g ↔ ∀ i, f i ⤳ g i := by simp only [Specializes, nhds_pi, pi_le_pi] #align specializes_pi specializes_pi theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S := by
rw [specializes_iff_forall_open]
theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S := by
Mathlib.Topology.Inseparable.219_0.2NeLzt0mQ64QlfB
theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x y z : X s : Set X f g : X → Y ⊢ (¬∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s) ↔ ∃ S, IsOpen S ∧ y ∈ S ∧ x ∉ S
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext; simp [specializes_iff_pure, le_def] theorem specializes_iff_forall_open : x ⤳ y ↔ ∀ s : Set X, IsOpen s → y ∈ s → x ∈ s := (specializes_TFAE x y).out 0 2 #align specializes_iff_forall_open specializes_iff_forall_open theorem Specializes.mem_open (h : x ⤳ y) (hs : IsOpen s) (hy : y ∈ s) : x ∈ s := specializes_iff_forall_open.1 h s hs hy #align specializes.mem_open Specializes.mem_open theorem IsOpen.not_specializes (hs : IsOpen s) (hx : x ∉ s) (hy : y ∈ s) : ¬x ⤳ y := fun h => hx <| h.mem_open hs hy #align is_open.not_specializes IsOpen.not_specializes theorem specializes_iff_forall_closed : x ⤳ y ↔ ∀ s : Set X, IsClosed s → x ∈ s → y ∈ s := (specializes_TFAE x y).out 0 3 #align specializes_iff_forall_closed specializes_iff_forall_closed theorem Specializes.mem_closed (h : x ⤳ y) (hs : IsClosed s) (hx : x ∈ s) : y ∈ s := specializes_iff_forall_closed.1 h s hs hx #align specializes.mem_closed Specializes.mem_closed theorem IsClosed.not_specializes (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬x ⤳ y := fun h => hy <| h.mem_closed hs hx #align is_closed.not_specializes IsClosed.not_specializes theorem specializes_iff_mem_closure : x ⤳ y ↔ y ∈ closure ({x} : Set X) := (specializes_TFAE x y).out 0 4 #align specializes_iff_mem_closure specializes_iff_mem_closure alias ⟨Specializes.mem_closure, _⟩ := specializes_iff_mem_closure #align specializes.mem_closure Specializes.mem_closure theorem specializes_iff_closure_subset : x ⤳ y ↔ closure ({y} : Set X) ⊆ closure {x} := (specializes_TFAE x y).out 0 5 #align specializes_iff_closure_subset specializes_iff_closure_subset alias ⟨Specializes.closure_subset, _⟩ := specializes_iff_closure_subset #align specializes.closure_subset Specializes.closure_subset -- porting note: new lemma theorem specializes_iff_clusterPt : x ⤳ y ↔ ClusterPt y (pure x) := (specializes_TFAE x y).out 0 6 theorem Filter.HasBasis.specializes_iff {ι} {p : ι → Prop} {s : ι → Set X} (h : (𝓝 y).HasBasis p s) : x ⤳ y ↔ ∀ i, p i → x ∈ s i := specializes_iff_pure.trans h.ge_iff #align filter.has_basis.specializes_iff Filter.HasBasis.specializes_iff theorem specializes_rfl : x ⤳ x := le_rfl #align specializes_rfl specializes_rfl @[refl] theorem specializes_refl (x : X) : x ⤳ x := specializes_rfl #align specializes_refl specializes_refl @[trans] theorem Specializes.trans : x ⤳ y → y ⤳ z → x ⤳ z := le_trans #align specializes.trans Specializes.trans theorem specializes_of_eq (e : x = y) : x ⤳ y := e ▸ specializes_refl x #align specializes_of_eq specializes_of_eq theorem specializes_of_nhdsWithin (h₁ : 𝓝[s] x ≤ 𝓝[s] y) (h₂ : x ∈ s) : x ⤳ y := specializes_iff_pure.2 <| calc pure x ≤ 𝓝[s] x := le_inf (pure_le_nhds _) (le_principal_iff.2 h₂) _ ≤ 𝓝[s] y := h₁ _ ≤ 𝓝 y := inf_le_left #align specializes_of_nhds_within specializes_of_nhdsWithin theorem Specializes.map_of_continuousAt (h : x ⤳ y) (hy : ContinuousAt f y) : f x ⤳ f y := specializes_iff_pure.2 fun _s hs => mem_pure.2 <| mem_preimage.1 <| mem_of_mem_nhds <| hy.mono_left h hs #align specializes.map_of_continuous_at Specializes.map_of_continuousAt theorem Specializes.map (h : x ⤳ y) (hf : Continuous f) : f x ⤳ f y := h.map_of_continuousAt hf.rst.imntinuousAt #align specializes.map Specializes.map theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y := by simp only [specializes_iff_mem_closure, hf.closure_eq_preimage_closure_image, image_singleton, mem_preimage] #align inducing.specializes_iff Inducing.specializes_iff theorem subtype_specializes_iff {p : X → Prop} (x y : Subtype p) : x ⤳ y ↔ (x : X) ⤳ y := inducing_subtype_val.specializes_iff.symm #align subtype_specializes_iff subtype_specializes_iff @[simp] theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂ := by simp only [Specializes, nhds_prod_eq, prod_le_prod] #align specializes_prod specializes_prod theorem Specializes.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ⤳ x₂) (hy : y₁ ⤳ y₂) : (x₁, y₁) ⤳ (x₂, y₂) := specializes_prod.2 ⟨hx, hy⟩ #align specializes.prod Specializes.prod @[simp] theorem specializes_pi {f g : ∀ i, π i} : f ⤳ g ↔ ∀ i, f i ⤳ g i := by simp only [Specializes, nhds_pi, pi_le_pi] #align specializes_pi specializes_pi theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S := by rw [specializes_iff_forall_open]
push_neg
theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S := by rw [specializes_iff_forall_open]
Mathlib.Topology.Inseparable.219_0.2NeLzt0mQ64QlfB
theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x y z : X s : Set X f g : X → Y ⊢ (∃ s, IsOpen s ∧ y ∈ s ∧ x ∉ s) ↔ ∃ S, IsOpen S ∧ y ∈ S ∧ x ∉ S
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext; simp [specializes_iff_pure, le_def] theorem specializes_iff_forall_open : x ⤳ y ↔ ∀ s : Set X, IsOpen s → y ∈ s → x ∈ s := (specializes_TFAE x y).out 0 2 #align specializes_iff_forall_open specializes_iff_forall_open theorem Specializes.mem_open (h : x ⤳ y) (hs : IsOpen s) (hy : y ∈ s) : x ∈ s := specializes_iff_forall_open.1 h s hs hy #align specializes.mem_open Specializes.mem_open theorem IsOpen.not_specializes (hs : IsOpen s) (hx : x ∉ s) (hy : y ∈ s) : ¬x ⤳ y := fun h => hx <| h.mem_open hs hy #align is_open.not_specializes IsOpen.not_specializes theorem specializes_iff_forall_closed : x ⤳ y ↔ ∀ s : Set X, IsClosed s → x ∈ s → y ∈ s := (specializes_TFAE x y).out 0 3 #align specializes_iff_forall_closed specializes_iff_forall_closed theorem Specializes.mem_closed (h : x ⤳ y) (hs : IsClosed s) (hx : x ∈ s) : y ∈ s := specializes_iff_forall_closed.1 h s hs hx #align specializes.mem_closed Specializes.mem_closed theorem IsClosed.not_specializes (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬x ⤳ y := fun h => hy <| h.mem_closed hs hx #align is_closed.not_specializes IsClosed.not_specializes theorem specializes_iff_mem_closure : x ⤳ y ↔ y ∈ closure ({x} : Set X) := (specializes_TFAE x y).out 0 4 #align specializes_iff_mem_closure specializes_iff_mem_closure alias ⟨Specializes.mem_closure, _⟩ := specializes_iff_mem_closure #align specializes.mem_closure Specializes.mem_closure theorem specializes_iff_closure_subset : x ⤳ y ↔ closure ({y} : Set X) ⊆ closure {x} := (specializes_TFAE x y).out 0 5 #align specializes_iff_closure_subset specializes_iff_closure_subset alias ⟨Specializes.closure_subset, _⟩ := specializes_iff_closure_subset #align specializes.closure_subset Specializes.closure_subset -- porting note: new lemma theorem specializes_iff_clusterPt : x ⤳ y ↔ ClusterPt y (pure x) := (specializes_TFAE x y).out 0 6 theorem Filter.HasBasis.specializes_iff {ι} {p : ι → Prop} {s : ι → Set X} (h : (𝓝 y).HasBasis p s) : x ⤳ y ↔ ∀ i, p i → x ∈ s i := specializes_iff_pure.trans h.ge_iff #align filter.has_basis.specializes_iff Filter.HasBasis.specializes_iff theorem specializes_rfl : x ⤳ x := le_rfl #align specializes_rfl specializes_rfl @[refl] theorem specializes_refl (x : X) : x ⤳ x := specializes_rfl #align specializes_refl specializes_refl @[trans] theorem Specializes.trans : x ⤳ y → y ⤳ z → x ⤳ z := le_trans #align specializes.trans Specializes.trans theorem specializes_of_eq (e : x = y) : x ⤳ y := e ▸ specializes_refl x #align specializes_of_eq specializes_of_eq theorem specializes_of_nhdsWithin (h₁ : 𝓝[s] x ≤ 𝓝[s] y) (h₂ : x ∈ s) : x ⤳ y := specializes_iff_pure.2 <| calc pure x ≤ 𝓝[s] x := le_inf (pure_le_nhds _) (le_principal_iff.2 h₂) _ ≤ 𝓝[s] y := h₁ _ ≤ 𝓝 y := inf_le_left #align specializes_of_nhds_within specializes_of_nhdsWithin theorem Specializes.map_of_continuousAt (h : x ⤳ y) (hy : ContinuousAt f y) : f x ⤳ f y := specializes_iff_pure.2 fun _s hs => mem_pure.2 <| mem_preimage.1 <| mem_of_mem_nhds <| hy.mono_left h hs #align specializes.map_of_continuous_at Specializes.map_of_continuousAt theorem Specializes.map (h : x ⤳ y) (hf : Continuous f) : f x ⤳ f y := h.map_of_continuousAt hf.rst.imntinuousAt #align specializes.map Specializes.map theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y := by simp only [specializes_iff_mem_closure, hf.closure_eq_preimage_closure_image, image_singleton, mem_preimage] #align inducing.specializes_iff Inducing.specializes_iff theorem subtype_specializes_iff {p : X → Prop} (x y : Subtype p) : x ⤳ y ↔ (x : X) ⤳ y := inducing_subtype_val.specializes_iff.symm #align subtype_specializes_iff subtype_specializes_iff @[simp] theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂ := by simp only [Specializes, nhds_prod_eq, prod_le_prod] #align specializes_prod specializes_prod theorem Specializes.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ⤳ x₂) (hy : y₁ ⤳ y₂) : (x₁, y₁) ⤳ (x₂, y₂) := specializes_prod.2 ⟨hx, hy⟩ #align specializes.prod Specializes.prod @[simp] theorem specializes_pi {f g : ∀ i, π i} : f ⤳ g ↔ ∀ i, f i ⤳ g i := by simp only [Specializes, nhds_pi, pi_le_pi] #align specializes_pi specializes_pi theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S := by rw [specializes_iff_forall_open] push_neg
rfl
theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S := by rw [specializes_iff_forall_open] push_neg
Mathlib.Topology.Inseparable.219_0.2NeLzt0mQ64QlfB
theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x y z : X s : Set X f g : X → Y ⊢ ¬x ⤳ y ↔ ∃ S, IsClosed S ∧ x ∈ S ∧ y ∉ S
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext; simp [specializes_iff_pure, le_def] theorem specializes_iff_forall_open : x ⤳ y ↔ ∀ s : Set X, IsOpen s → y ∈ s → x ∈ s := (specializes_TFAE x y).out 0 2 #align specializes_iff_forall_open specializes_iff_forall_open theorem Specializes.mem_open (h : x ⤳ y) (hs : IsOpen s) (hy : y ∈ s) : x ∈ s := specializes_iff_forall_open.1 h s hs hy #align specializes.mem_open Specializes.mem_open theorem IsOpen.not_specializes (hs : IsOpen s) (hx : x ∉ s) (hy : y ∈ s) : ¬x ⤳ y := fun h => hx <| h.mem_open hs hy #align is_open.not_specializes IsOpen.not_specializes theorem specializes_iff_forall_closed : x ⤳ y ↔ ∀ s : Set X, IsClosed s → x ∈ s → y ∈ s := (specializes_TFAE x y).out 0 3 #align specializes_iff_forall_closed specializes_iff_forall_closed theorem Specializes.mem_closed (h : x ⤳ y) (hs : IsClosed s) (hx : x ∈ s) : y ∈ s := specializes_iff_forall_closed.1 h s hs hx #align specializes.mem_closed Specializes.mem_closed theorem IsClosed.not_specializes (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬x ⤳ y := fun h => hy <| h.mem_closed hs hx #align is_closed.not_specializes IsClosed.not_specializes theorem specializes_iff_mem_closure : x ⤳ y ↔ y ∈ closure ({x} : Set X) := (specializes_TFAE x y).out 0 4 #align specializes_iff_mem_closure specializes_iff_mem_closure alias ⟨Specializes.mem_closure, _⟩ := specializes_iff_mem_closure #align specializes.mem_closure Specializes.mem_closure theorem specializes_iff_closure_subset : x ⤳ y ↔ closure ({y} : Set X) ⊆ closure {x} := (specializes_TFAE x y).out 0 5 #align specializes_iff_closure_subset specializes_iff_closure_subset alias ⟨Specializes.closure_subset, _⟩ := specializes_iff_closure_subset #align specializes.closure_subset Specializes.closure_subset -- porting note: new lemma theorem specializes_iff_clusterPt : x ⤳ y ↔ ClusterPt y (pure x) := (specializes_TFAE x y).out 0 6 theorem Filter.HasBasis.specializes_iff {ι} {p : ι → Prop} {s : ι → Set X} (h : (𝓝 y).HasBasis p s) : x ⤳ y ↔ ∀ i, p i → x ∈ s i := specializes_iff_pure.trans h.ge_iff #align filter.has_basis.specializes_iff Filter.HasBasis.specializes_iff theorem specializes_rfl : x ⤳ x := le_rfl #align specializes_rfl specializes_rfl @[refl] theorem specializes_refl (x : X) : x ⤳ x := specializes_rfl #align specializes_refl specializes_refl @[trans] theorem Specializes.trans : x ⤳ y → y ⤳ z → x ⤳ z := le_trans #align specializes.trans Specializes.trans theorem specializes_of_eq (e : x = y) : x ⤳ y := e ▸ specializes_refl x #align specializes_of_eq specializes_of_eq theorem specializes_of_nhdsWithin (h₁ : 𝓝[s] x ≤ 𝓝[s] y) (h₂ : x ∈ s) : x ⤳ y := specializes_iff_pure.2 <| calc pure x ≤ 𝓝[s] x := le_inf (pure_le_nhds _) (le_principal_iff.2 h₂) _ ≤ 𝓝[s] y := h₁ _ ≤ 𝓝 y := inf_le_left #align specializes_of_nhds_within specializes_of_nhdsWithin theorem Specializes.map_of_continuousAt (h : x ⤳ y) (hy : ContinuousAt f y) : f x ⤳ f y := specializes_iff_pure.2 fun _s hs => mem_pure.2 <| mem_preimage.1 <| mem_of_mem_nhds <| hy.mono_left h hs #align specializes.map_of_continuous_at Specializes.map_of_continuousAt theorem Specializes.map (h : x ⤳ y) (hf : Continuous f) : f x ⤳ f y := h.map_of_continuousAt hf.rst.imntinuousAt #align specializes.map Specializes.map theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y := by simp only [specializes_iff_mem_closure, hf.closure_eq_preimage_closure_image, image_singleton, mem_preimage] #align inducing.specializes_iff Inducing.specializes_iff theorem subtype_specializes_iff {p : X → Prop} (x y : Subtype p) : x ⤳ y ↔ (x : X) ⤳ y := inducing_subtype_val.specializes_iff.symm #align subtype_specializes_iff subtype_specializes_iff @[simp] theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂ := by simp only [Specializes, nhds_prod_eq, prod_le_prod] #align specializes_prod specializes_prod theorem Specializes.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ⤳ x₂) (hy : y₁ ⤳ y₂) : (x₁, y₁) ⤳ (x₂, y₂) := specializes_prod.2 ⟨hx, hy⟩ #align specializes.prod Specializes.prod @[simp] theorem specializes_pi {f g : ∀ i, π i} : f ⤳ g ↔ ∀ i, f i ⤳ g i := by simp only [Specializes, nhds_pi, pi_le_pi] #align specializes_pi specializes_pi theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S := by rw [specializes_iff_forall_open] push_neg rfl #align not_specializes_iff_exists_open not_specializes_iff_exists_open theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S := by
rw [specializes_iff_forall_closed]
theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S := by
Mathlib.Topology.Inseparable.225_0.2NeLzt0mQ64QlfB
theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x y z : X s : Set X f g : X → Y ⊢ (¬∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s) ↔ ∃ S, IsClosed S ∧ x ∈ S ∧ y ∉ S
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext; simp [specializes_iff_pure, le_def] theorem specializes_iff_forall_open : x ⤳ y ↔ ∀ s : Set X, IsOpen s → y ∈ s → x ∈ s := (specializes_TFAE x y).out 0 2 #align specializes_iff_forall_open specializes_iff_forall_open theorem Specializes.mem_open (h : x ⤳ y) (hs : IsOpen s) (hy : y ∈ s) : x ∈ s := specializes_iff_forall_open.1 h s hs hy #align specializes.mem_open Specializes.mem_open theorem IsOpen.not_specializes (hs : IsOpen s) (hx : x ∉ s) (hy : y ∈ s) : ¬x ⤳ y := fun h => hx <| h.mem_open hs hy #align is_open.not_specializes IsOpen.not_specializes theorem specializes_iff_forall_closed : x ⤳ y ↔ ∀ s : Set X, IsClosed s → x ∈ s → y ∈ s := (specializes_TFAE x y).out 0 3 #align specializes_iff_forall_closed specializes_iff_forall_closed theorem Specializes.mem_closed (h : x ⤳ y) (hs : IsClosed s) (hx : x ∈ s) : y ∈ s := specializes_iff_forall_closed.1 h s hs hx #align specializes.mem_closed Specializes.mem_closed theorem IsClosed.not_specializes (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬x ⤳ y := fun h => hy <| h.mem_closed hs hx #align is_closed.not_specializes IsClosed.not_specializes theorem specializes_iff_mem_closure : x ⤳ y ↔ y ∈ closure ({x} : Set X) := (specializes_TFAE x y).out 0 4 #align specializes_iff_mem_closure specializes_iff_mem_closure alias ⟨Specializes.mem_closure, _⟩ := specializes_iff_mem_closure #align specializes.mem_closure Specializes.mem_closure theorem specializes_iff_closure_subset : x ⤳ y ↔ closure ({y} : Set X) ⊆ closure {x} := (specializes_TFAE x y).out 0 5 #align specializes_iff_closure_subset specializes_iff_closure_subset alias ⟨Specializes.closure_subset, _⟩ := specializes_iff_closure_subset #align specializes.closure_subset Specializes.closure_subset -- porting note: new lemma theorem specializes_iff_clusterPt : x ⤳ y ↔ ClusterPt y (pure x) := (specializes_TFAE x y).out 0 6 theorem Filter.HasBasis.specializes_iff {ι} {p : ι → Prop} {s : ι → Set X} (h : (𝓝 y).HasBasis p s) : x ⤳ y ↔ ∀ i, p i → x ∈ s i := specializes_iff_pure.trans h.ge_iff #align filter.has_basis.specializes_iff Filter.HasBasis.specializes_iff theorem specializes_rfl : x ⤳ x := le_rfl #align specializes_rfl specializes_rfl @[refl] theorem specializes_refl (x : X) : x ⤳ x := specializes_rfl #align specializes_refl specializes_refl @[trans] theorem Specializes.trans : x ⤳ y → y ⤳ z → x ⤳ z := le_trans #align specializes.trans Specializes.trans theorem specializes_of_eq (e : x = y) : x ⤳ y := e ▸ specializes_refl x #align specializes_of_eq specializes_of_eq theorem specializes_of_nhdsWithin (h₁ : 𝓝[s] x ≤ 𝓝[s] y) (h₂ : x ∈ s) : x ⤳ y := specializes_iff_pure.2 <| calc pure x ≤ 𝓝[s] x := le_inf (pure_le_nhds _) (le_principal_iff.2 h₂) _ ≤ 𝓝[s] y := h₁ _ ≤ 𝓝 y := inf_le_left #align specializes_of_nhds_within specializes_of_nhdsWithin theorem Specializes.map_of_continuousAt (h : x ⤳ y) (hy : ContinuousAt f y) : f x ⤳ f y := specializes_iff_pure.2 fun _s hs => mem_pure.2 <| mem_preimage.1 <| mem_of_mem_nhds <| hy.mono_left h hs #align specializes.map_of_continuous_at Specializes.map_of_continuousAt theorem Specializes.map (h : x ⤳ y) (hf : Continuous f) : f x ⤳ f y := h.map_of_continuousAt hf.rst.imntinuousAt #align specializes.map Specializes.map theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y := by simp only [specializes_iff_mem_closure, hf.closure_eq_preimage_closure_image, image_singleton, mem_preimage] #align inducing.specializes_iff Inducing.specializes_iff theorem subtype_specializes_iff {p : X → Prop} (x y : Subtype p) : x ⤳ y ↔ (x : X) ⤳ y := inducing_subtype_val.specializes_iff.symm #align subtype_specializes_iff subtype_specializes_iff @[simp] theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂ := by simp only [Specializes, nhds_prod_eq, prod_le_prod] #align specializes_prod specializes_prod theorem Specializes.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ⤳ x₂) (hy : y₁ ⤳ y₂) : (x₁, y₁) ⤳ (x₂, y₂) := specializes_prod.2 ⟨hx, hy⟩ #align specializes.prod Specializes.prod @[simp] theorem specializes_pi {f g : ∀ i, π i} : f ⤳ g ↔ ∀ i, f i ⤳ g i := by simp only [Specializes, nhds_pi, pi_le_pi] #align specializes_pi specializes_pi theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S := by rw [specializes_iff_forall_open] push_neg rfl #align not_specializes_iff_exists_open not_specializes_iff_exists_open theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S := by rw [specializes_iff_forall_closed]
push_neg
theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S := by rw [specializes_iff_forall_closed]
Mathlib.Topology.Inseparable.225_0.2NeLzt0mQ64QlfB
theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x y z : X s : Set X f g : X → Y ⊢ (∃ s, IsClosed s ∧ x ∈ s ∧ y ∉ s) ↔ ∃ S, IsClosed S ∧ x ∈ S ∧ y ∉ S
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext; simp [specializes_iff_pure, le_def] theorem specializes_iff_forall_open : x ⤳ y ↔ ∀ s : Set X, IsOpen s → y ∈ s → x ∈ s := (specializes_TFAE x y).out 0 2 #align specializes_iff_forall_open specializes_iff_forall_open theorem Specializes.mem_open (h : x ⤳ y) (hs : IsOpen s) (hy : y ∈ s) : x ∈ s := specializes_iff_forall_open.1 h s hs hy #align specializes.mem_open Specializes.mem_open theorem IsOpen.not_specializes (hs : IsOpen s) (hx : x ∉ s) (hy : y ∈ s) : ¬x ⤳ y := fun h => hx <| h.mem_open hs hy #align is_open.not_specializes IsOpen.not_specializes theorem specializes_iff_forall_closed : x ⤳ y ↔ ∀ s : Set X, IsClosed s → x ∈ s → y ∈ s := (specializes_TFAE x y).out 0 3 #align specializes_iff_forall_closed specializes_iff_forall_closed theorem Specializes.mem_closed (h : x ⤳ y) (hs : IsClosed s) (hx : x ∈ s) : y ∈ s := specializes_iff_forall_closed.1 h s hs hx #align specializes.mem_closed Specializes.mem_closed theorem IsClosed.not_specializes (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬x ⤳ y := fun h => hy <| h.mem_closed hs hx #align is_closed.not_specializes IsClosed.not_specializes theorem specializes_iff_mem_closure : x ⤳ y ↔ y ∈ closure ({x} : Set X) := (specializes_TFAE x y).out 0 4 #align specializes_iff_mem_closure specializes_iff_mem_closure alias ⟨Specializes.mem_closure, _⟩ := specializes_iff_mem_closure #align specializes.mem_closure Specializes.mem_closure theorem specializes_iff_closure_subset : x ⤳ y ↔ closure ({y} : Set X) ⊆ closure {x} := (specializes_TFAE x y).out 0 5 #align specializes_iff_closure_subset specializes_iff_closure_subset alias ⟨Specializes.closure_subset, _⟩ := specializes_iff_closure_subset #align specializes.closure_subset Specializes.closure_subset -- porting note: new lemma theorem specializes_iff_clusterPt : x ⤳ y ↔ ClusterPt y (pure x) := (specializes_TFAE x y).out 0 6 theorem Filter.HasBasis.specializes_iff {ι} {p : ι → Prop} {s : ι → Set X} (h : (𝓝 y).HasBasis p s) : x ⤳ y ↔ ∀ i, p i → x ∈ s i := specializes_iff_pure.trans h.ge_iff #align filter.has_basis.specializes_iff Filter.HasBasis.specializes_iff theorem specializes_rfl : x ⤳ x := le_rfl #align specializes_rfl specializes_rfl @[refl] theorem specializes_refl (x : X) : x ⤳ x := specializes_rfl #align specializes_refl specializes_refl @[trans] theorem Specializes.trans : x ⤳ y → y ⤳ z → x ⤳ z := le_trans #align specializes.trans Specializes.trans theorem specializes_of_eq (e : x = y) : x ⤳ y := e ▸ specializes_refl x #align specializes_of_eq specializes_of_eq theorem specializes_of_nhdsWithin (h₁ : 𝓝[s] x ≤ 𝓝[s] y) (h₂ : x ∈ s) : x ⤳ y := specializes_iff_pure.2 <| calc pure x ≤ 𝓝[s] x := le_inf (pure_le_nhds _) (le_principal_iff.2 h₂) _ ≤ 𝓝[s] y := h₁ _ ≤ 𝓝 y := inf_le_left #align specializes_of_nhds_within specializes_of_nhdsWithin theorem Specializes.map_of_continuousAt (h : x ⤳ y) (hy : ContinuousAt f y) : f x ⤳ f y := specializes_iff_pure.2 fun _s hs => mem_pure.2 <| mem_preimage.1 <| mem_of_mem_nhds <| hy.mono_left h hs #align specializes.map_of_continuous_at Specializes.map_of_continuousAt theorem Specializes.map (h : x ⤳ y) (hf : Continuous f) : f x ⤳ f y := h.map_of_continuousAt hf.rst.imntinuousAt #align specializes.map Specializes.map theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y := by simp only [specializes_iff_mem_closure, hf.closure_eq_preimage_closure_image, image_singleton, mem_preimage] #align inducing.specializes_iff Inducing.specializes_iff theorem subtype_specializes_iff {p : X → Prop} (x y : Subtype p) : x ⤳ y ↔ (x : X) ⤳ y := inducing_subtype_val.specializes_iff.symm #align subtype_specializes_iff subtype_specializes_iff @[simp] theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂ := by simp only [Specializes, nhds_prod_eq, prod_le_prod] #align specializes_prod specializes_prod theorem Specializes.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ⤳ x₂) (hy : y₁ ⤳ y₂) : (x₁, y₁) ⤳ (x₂, y₂) := specializes_prod.2 ⟨hx, hy⟩ #align specializes.prod Specializes.prod @[simp] theorem specializes_pi {f g : ∀ i, π i} : f ⤳ g ↔ ∀ i, f i ⤳ g i := by simp only [Specializes, nhds_pi, pi_le_pi] #align specializes_pi specializes_pi theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S := by rw [specializes_iff_forall_open] push_neg rfl #align not_specializes_iff_exists_open not_specializes_iff_exists_open theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S := by rw [specializes_iff_forall_closed] push_neg
rfl
theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S := by rw [specializes_iff_forall_closed] push_neg
Mathlib.Topology.Inseparable.225_0.2NeLzt0mQ64QlfB
theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝⁴ : TopologicalSpace X inst✝³ : TopologicalSpace Y inst✝² : TopologicalSpace Z inst✝¹ : (i : ι) → TopologicalSpace (π i) x y z : X s : Set X f g : X → Y inst✝ : DecidablePred fun x => x ∈ s hs : IsOpen s hf : Continuous f hg : Continuous g hspec : ∀ (x : X), f x ⤳ g x ⊢ Continuous (piecewise s f g)
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext; simp [specializes_iff_pure, le_def] theorem specializes_iff_forall_open : x ⤳ y ↔ ∀ s : Set X, IsOpen s → y ∈ s → x ∈ s := (specializes_TFAE x y).out 0 2 #align specializes_iff_forall_open specializes_iff_forall_open theorem Specializes.mem_open (h : x ⤳ y) (hs : IsOpen s) (hy : y ∈ s) : x ∈ s := specializes_iff_forall_open.1 h s hs hy #align specializes.mem_open Specializes.mem_open theorem IsOpen.not_specializes (hs : IsOpen s) (hx : x ∉ s) (hy : y ∈ s) : ¬x ⤳ y := fun h => hx <| h.mem_open hs hy #align is_open.not_specializes IsOpen.not_specializes theorem specializes_iff_forall_closed : x ⤳ y ↔ ∀ s : Set X, IsClosed s → x ∈ s → y ∈ s := (specializes_TFAE x y).out 0 3 #align specializes_iff_forall_closed specializes_iff_forall_closed theorem Specializes.mem_closed (h : x ⤳ y) (hs : IsClosed s) (hx : x ∈ s) : y ∈ s := specializes_iff_forall_closed.1 h s hs hx #align specializes.mem_closed Specializes.mem_closed theorem IsClosed.not_specializes (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬x ⤳ y := fun h => hy <| h.mem_closed hs hx #align is_closed.not_specializes IsClosed.not_specializes theorem specializes_iff_mem_closure : x ⤳ y ↔ y ∈ closure ({x} : Set X) := (specializes_TFAE x y).out 0 4 #align specializes_iff_mem_closure specializes_iff_mem_closure alias ⟨Specializes.mem_closure, _⟩ := specializes_iff_mem_closure #align specializes.mem_closure Specializes.mem_closure theorem specializes_iff_closure_subset : x ⤳ y ↔ closure ({y} : Set X) ⊆ closure {x} := (specializes_TFAE x y).out 0 5 #align specializes_iff_closure_subset specializes_iff_closure_subset alias ⟨Specializes.closure_subset, _⟩ := specializes_iff_closure_subset #align specializes.closure_subset Specializes.closure_subset -- porting note: new lemma theorem specializes_iff_clusterPt : x ⤳ y ↔ ClusterPt y (pure x) := (specializes_TFAE x y).out 0 6 theorem Filter.HasBasis.specializes_iff {ι} {p : ι → Prop} {s : ι → Set X} (h : (𝓝 y).HasBasis p s) : x ⤳ y ↔ ∀ i, p i → x ∈ s i := specializes_iff_pure.trans h.ge_iff #align filter.has_basis.specializes_iff Filter.HasBasis.specializes_iff theorem specializes_rfl : x ⤳ x := le_rfl #align specializes_rfl specializes_rfl @[refl] theorem specializes_refl (x : X) : x ⤳ x := specializes_rfl #align specializes_refl specializes_refl @[trans] theorem Specializes.trans : x ⤳ y → y ⤳ z → x ⤳ z := le_trans #align specializes.trans Specializes.trans theorem specializes_of_eq (e : x = y) : x ⤳ y := e ▸ specializes_refl x #align specializes_of_eq specializes_of_eq theorem specializes_of_nhdsWithin (h₁ : 𝓝[s] x ≤ 𝓝[s] y) (h₂ : x ∈ s) : x ⤳ y := specializes_iff_pure.2 <| calc pure x ≤ 𝓝[s] x := le_inf (pure_le_nhds _) (le_principal_iff.2 h₂) _ ≤ 𝓝[s] y := h₁ _ ≤ 𝓝 y := inf_le_left #align specializes_of_nhds_within specializes_of_nhdsWithin theorem Specializes.map_of_continuousAt (h : x ⤳ y) (hy : ContinuousAt f y) : f x ⤳ f y := specializes_iff_pure.2 fun _s hs => mem_pure.2 <| mem_preimage.1 <| mem_of_mem_nhds <| hy.mono_left h hs #align specializes.map_of_continuous_at Specializes.map_of_continuousAt theorem Specializes.map (h : x ⤳ y) (hf : Continuous f) : f x ⤳ f y := h.map_of_continuousAt hf.rst.imntinuousAt #align specializes.map Specializes.map theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y := by simp only [specializes_iff_mem_closure, hf.closure_eq_preimage_closure_image, image_singleton, mem_preimage] #align inducing.specializes_iff Inducing.specializes_iff theorem subtype_specializes_iff {p : X → Prop} (x y : Subtype p) : x ⤳ y ↔ (x : X) ⤳ y := inducing_subtype_val.specializes_iff.symm #align subtype_specializes_iff subtype_specializes_iff @[simp] theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂ := by simp only [Specializes, nhds_prod_eq, prod_le_prod] #align specializes_prod specializes_prod theorem Specializes.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ⤳ x₂) (hy : y₁ ⤳ y₂) : (x₁, y₁) ⤳ (x₂, y₂) := specializes_prod.2 ⟨hx, hy⟩ #align specializes.prod Specializes.prod @[simp] theorem specializes_pi {f g : ∀ i, π i} : f ⤳ g ↔ ∀ i, f i ⤳ g i := by simp only [Specializes, nhds_pi, pi_le_pi] #align specializes_pi specializes_pi theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S := by rw [specializes_iff_forall_open] push_neg rfl #align not_specializes_iff_exists_open not_specializes_iff_exists_open theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S := by rw [specializes_iff_forall_closed] push_neg rfl #align not_specializes_iff_exists_closed not_specializes_iff_exists_closed theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) : Continuous (s.piecewise f g) := by
have : ∀ U, IsOpen U → g ⁻¹' U ⊆ f ⁻¹' U := fun U hU x hx ↦ (hspec x).mem_open hU hx
theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) : Continuous (s.piecewise f g) := by
Mathlib.Topology.Inseparable.231_0.2NeLzt0mQ64QlfB
theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) : Continuous (s.piecewise f g)
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝⁴ : TopologicalSpace X inst✝³ : TopologicalSpace Y inst✝² : TopologicalSpace Z inst✝¹ : (i : ι) → TopologicalSpace (π i) x y z : X s : Set X f g : X → Y inst✝ : DecidablePred fun x => x ∈ s hs : IsOpen s hf : Continuous f hg : Continuous g hspec : ∀ (x : X), f x ⤳ g x this : ∀ (U : Set Y), IsOpen U → g ⁻¹' U ⊆ f ⁻¹' U ⊢ Continuous (piecewise s f g)
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext; simp [specializes_iff_pure, le_def] theorem specializes_iff_forall_open : x ⤳ y ↔ ∀ s : Set X, IsOpen s → y ∈ s → x ∈ s := (specializes_TFAE x y).out 0 2 #align specializes_iff_forall_open specializes_iff_forall_open theorem Specializes.mem_open (h : x ⤳ y) (hs : IsOpen s) (hy : y ∈ s) : x ∈ s := specializes_iff_forall_open.1 h s hs hy #align specializes.mem_open Specializes.mem_open theorem IsOpen.not_specializes (hs : IsOpen s) (hx : x ∉ s) (hy : y ∈ s) : ¬x ⤳ y := fun h => hx <| h.mem_open hs hy #align is_open.not_specializes IsOpen.not_specializes theorem specializes_iff_forall_closed : x ⤳ y ↔ ∀ s : Set X, IsClosed s → x ∈ s → y ∈ s := (specializes_TFAE x y).out 0 3 #align specializes_iff_forall_closed specializes_iff_forall_closed theorem Specializes.mem_closed (h : x ⤳ y) (hs : IsClosed s) (hx : x ∈ s) : y ∈ s := specializes_iff_forall_closed.1 h s hs hx #align specializes.mem_closed Specializes.mem_closed theorem IsClosed.not_specializes (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬x ⤳ y := fun h => hy <| h.mem_closed hs hx #align is_closed.not_specializes IsClosed.not_specializes theorem specializes_iff_mem_closure : x ⤳ y ↔ y ∈ closure ({x} : Set X) := (specializes_TFAE x y).out 0 4 #align specializes_iff_mem_closure specializes_iff_mem_closure alias ⟨Specializes.mem_closure, _⟩ := specializes_iff_mem_closure #align specializes.mem_closure Specializes.mem_closure theorem specializes_iff_closure_subset : x ⤳ y ↔ closure ({y} : Set X) ⊆ closure {x} := (specializes_TFAE x y).out 0 5 #align specializes_iff_closure_subset specializes_iff_closure_subset alias ⟨Specializes.closure_subset, _⟩ := specializes_iff_closure_subset #align specializes.closure_subset Specializes.closure_subset -- porting note: new lemma theorem specializes_iff_clusterPt : x ⤳ y ↔ ClusterPt y (pure x) := (specializes_TFAE x y).out 0 6 theorem Filter.HasBasis.specializes_iff {ι} {p : ι → Prop} {s : ι → Set X} (h : (𝓝 y).HasBasis p s) : x ⤳ y ↔ ∀ i, p i → x ∈ s i := specializes_iff_pure.trans h.ge_iff #align filter.has_basis.specializes_iff Filter.HasBasis.specializes_iff theorem specializes_rfl : x ⤳ x := le_rfl #align specializes_rfl specializes_rfl @[refl] theorem specializes_refl (x : X) : x ⤳ x := specializes_rfl #align specializes_refl specializes_refl @[trans] theorem Specializes.trans : x ⤳ y → y ⤳ z → x ⤳ z := le_trans #align specializes.trans Specializes.trans theorem specializes_of_eq (e : x = y) : x ⤳ y := e ▸ specializes_refl x #align specializes_of_eq specializes_of_eq theorem specializes_of_nhdsWithin (h₁ : 𝓝[s] x ≤ 𝓝[s] y) (h₂ : x ∈ s) : x ⤳ y := specializes_iff_pure.2 <| calc pure x ≤ 𝓝[s] x := le_inf (pure_le_nhds _) (le_principal_iff.2 h₂) _ ≤ 𝓝[s] y := h₁ _ ≤ 𝓝 y := inf_le_left #align specializes_of_nhds_within specializes_of_nhdsWithin theorem Specializes.map_of_continuousAt (h : x ⤳ y) (hy : ContinuousAt f y) : f x ⤳ f y := specializes_iff_pure.2 fun _s hs => mem_pure.2 <| mem_preimage.1 <| mem_of_mem_nhds <| hy.mono_left h hs #align specializes.map_of_continuous_at Specializes.map_of_continuousAt theorem Specializes.map (h : x ⤳ y) (hf : Continuous f) : f x ⤳ f y := h.map_of_continuousAt hf.rst.imntinuousAt #align specializes.map Specializes.map theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y := by simp only [specializes_iff_mem_closure, hf.closure_eq_preimage_closure_image, image_singleton, mem_preimage] #align inducing.specializes_iff Inducing.specializes_iff theorem subtype_specializes_iff {p : X → Prop} (x y : Subtype p) : x ⤳ y ↔ (x : X) ⤳ y := inducing_subtype_val.specializes_iff.symm #align subtype_specializes_iff subtype_specializes_iff @[simp] theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂ := by simp only [Specializes, nhds_prod_eq, prod_le_prod] #align specializes_prod specializes_prod theorem Specializes.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ⤳ x₂) (hy : y₁ ⤳ y₂) : (x₁, y₁) ⤳ (x₂, y₂) := specializes_prod.2 ⟨hx, hy⟩ #align specializes.prod Specializes.prod @[simp] theorem specializes_pi {f g : ∀ i, π i} : f ⤳ g ↔ ∀ i, f i ⤳ g i := by simp only [Specializes, nhds_pi, pi_le_pi] #align specializes_pi specializes_pi theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S := by rw [specializes_iff_forall_open] push_neg rfl #align not_specializes_iff_exists_open not_specializes_iff_exists_open theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S := by rw [specializes_iff_forall_closed] push_neg rfl #align not_specializes_iff_exists_closed not_specializes_iff_exists_closed theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) : Continuous (s.piecewise f g) := by have : ∀ U, IsOpen U → g ⁻¹' U ⊆ f ⁻¹' U := fun U hU x hx ↦ (hspec x).mem_open hU hx
rw [continuous_def]
theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) : Continuous (s.piecewise f g) := by have : ∀ U, IsOpen U → g ⁻¹' U ⊆ f ⁻¹' U := fun U hU x hx ↦ (hspec x).mem_open hU hx
Mathlib.Topology.Inseparable.231_0.2NeLzt0mQ64QlfB
theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) : Continuous (s.piecewise f g)
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝⁴ : TopologicalSpace X inst✝³ : TopologicalSpace Y inst✝² : TopologicalSpace Z inst✝¹ : (i : ι) → TopologicalSpace (π i) x y z : X s : Set X f g : X → Y inst✝ : DecidablePred fun x => x ∈ s hs : IsOpen s hf : Continuous f hg : Continuous g hspec : ∀ (x : X), f x ⤳ g x this : ∀ (U : Set Y), IsOpen U → g ⁻¹' U ⊆ f ⁻¹' U ⊢ ∀ (s_1 : Set Y), IsOpen s_1 → IsOpen (piecewise s f g ⁻¹' s_1)
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext; simp [specializes_iff_pure, le_def] theorem specializes_iff_forall_open : x ⤳ y ↔ ∀ s : Set X, IsOpen s → y ∈ s → x ∈ s := (specializes_TFAE x y).out 0 2 #align specializes_iff_forall_open specializes_iff_forall_open theorem Specializes.mem_open (h : x ⤳ y) (hs : IsOpen s) (hy : y ∈ s) : x ∈ s := specializes_iff_forall_open.1 h s hs hy #align specializes.mem_open Specializes.mem_open theorem IsOpen.not_specializes (hs : IsOpen s) (hx : x ∉ s) (hy : y ∈ s) : ¬x ⤳ y := fun h => hx <| h.mem_open hs hy #align is_open.not_specializes IsOpen.not_specializes theorem specializes_iff_forall_closed : x ⤳ y ↔ ∀ s : Set X, IsClosed s → x ∈ s → y ∈ s := (specializes_TFAE x y).out 0 3 #align specializes_iff_forall_closed specializes_iff_forall_closed theorem Specializes.mem_closed (h : x ⤳ y) (hs : IsClosed s) (hx : x ∈ s) : y ∈ s := specializes_iff_forall_closed.1 h s hs hx #align specializes.mem_closed Specializes.mem_closed theorem IsClosed.not_specializes (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬x ⤳ y := fun h => hy <| h.mem_closed hs hx #align is_closed.not_specializes IsClosed.not_specializes theorem specializes_iff_mem_closure : x ⤳ y ↔ y ∈ closure ({x} : Set X) := (specializes_TFAE x y).out 0 4 #align specializes_iff_mem_closure specializes_iff_mem_closure alias ⟨Specializes.mem_closure, _⟩ := specializes_iff_mem_closure #align specializes.mem_closure Specializes.mem_closure theorem specializes_iff_closure_subset : x ⤳ y ↔ closure ({y} : Set X) ⊆ closure {x} := (specializes_TFAE x y).out 0 5 #align specializes_iff_closure_subset specializes_iff_closure_subset alias ⟨Specializes.closure_subset, _⟩ := specializes_iff_closure_subset #align specializes.closure_subset Specializes.closure_subset -- porting note: new lemma theorem specializes_iff_clusterPt : x ⤳ y ↔ ClusterPt y (pure x) := (specializes_TFAE x y).out 0 6 theorem Filter.HasBasis.specializes_iff {ι} {p : ι → Prop} {s : ι → Set X} (h : (𝓝 y).HasBasis p s) : x ⤳ y ↔ ∀ i, p i → x ∈ s i := specializes_iff_pure.trans h.ge_iff #align filter.has_basis.specializes_iff Filter.HasBasis.specializes_iff theorem specializes_rfl : x ⤳ x := le_rfl #align specializes_rfl specializes_rfl @[refl] theorem specializes_refl (x : X) : x ⤳ x := specializes_rfl #align specializes_refl specializes_refl @[trans] theorem Specializes.trans : x ⤳ y → y ⤳ z → x ⤳ z := le_trans #align specializes.trans Specializes.trans theorem specializes_of_eq (e : x = y) : x ⤳ y := e ▸ specializes_refl x #align specializes_of_eq specializes_of_eq theorem specializes_of_nhdsWithin (h₁ : 𝓝[s] x ≤ 𝓝[s] y) (h₂ : x ∈ s) : x ⤳ y := specializes_iff_pure.2 <| calc pure x ≤ 𝓝[s] x := le_inf (pure_le_nhds _) (le_principal_iff.2 h₂) _ ≤ 𝓝[s] y := h₁ _ ≤ 𝓝 y := inf_le_left #align specializes_of_nhds_within specializes_of_nhdsWithin theorem Specializes.map_of_continuousAt (h : x ⤳ y) (hy : ContinuousAt f y) : f x ⤳ f y := specializes_iff_pure.2 fun _s hs => mem_pure.2 <| mem_preimage.1 <| mem_of_mem_nhds <| hy.mono_left h hs #align specializes.map_of_continuous_at Specializes.map_of_continuousAt theorem Specializes.map (h : x ⤳ y) (hf : Continuous f) : f x ⤳ f y := h.map_of_continuousAt hf.rst.imntinuousAt #align specializes.map Specializes.map theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y := by simp only [specializes_iff_mem_closure, hf.closure_eq_preimage_closure_image, image_singleton, mem_preimage] #align inducing.specializes_iff Inducing.specializes_iff theorem subtype_specializes_iff {p : X → Prop} (x y : Subtype p) : x ⤳ y ↔ (x : X) ⤳ y := inducing_subtype_val.specializes_iff.symm #align subtype_specializes_iff subtype_specializes_iff @[simp] theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂ := by simp only [Specializes, nhds_prod_eq, prod_le_prod] #align specializes_prod specializes_prod theorem Specializes.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ⤳ x₂) (hy : y₁ ⤳ y₂) : (x₁, y₁) ⤳ (x₂, y₂) := specializes_prod.2 ⟨hx, hy⟩ #align specializes.prod Specializes.prod @[simp] theorem specializes_pi {f g : ∀ i, π i} : f ⤳ g ↔ ∀ i, f i ⤳ g i := by simp only [Specializes, nhds_pi, pi_le_pi] #align specializes_pi specializes_pi theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S := by rw [specializes_iff_forall_open] push_neg rfl #align not_specializes_iff_exists_open not_specializes_iff_exists_open theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S := by rw [specializes_iff_forall_closed] push_neg rfl #align not_specializes_iff_exists_closed not_specializes_iff_exists_closed theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) : Continuous (s.piecewise f g) := by have : ∀ U, IsOpen U → g ⁻¹' U ⊆ f ⁻¹' U := fun U hU x hx ↦ (hspec x).mem_open hU hx rw [continuous_def]
intro U hU
theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) : Continuous (s.piecewise f g) := by have : ∀ U, IsOpen U → g ⁻¹' U ⊆ f ⁻¹' U := fun U hU x hx ↦ (hspec x).mem_open hU hx rw [continuous_def]
Mathlib.Topology.Inseparable.231_0.2NeLzt0mQ64QlfB
theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) : Continuous (s.piecewise f g)
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝⁴ : TopologicalSpace X inst✝³ : TopologicalSpace Y inst✝² : TopologicalSpace Z inst✝¹ : (i : ι) → TopologicalSpace (π i) x y z : X s : Set X f g : X → Y inst✝ : DecidablePred fun x => x ∈ s hs : IsOpen s hf : Continuous f hg : Continuous g hspec : ∀ (x : X), f x ⤳ g x this : ∀ (U : Set Y), IsOpen U → g ⁻¹' U ⊆ f ⁻¹' U U : Set Y hU : IsOpen U ⊢ IsOpen (piecewise s f g ⁻¹' U)
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext; simp [specializes_iff_pure, le_def] theorem specializes_iff_forall_open : x ⤳ y ↔ ∀ s : Set X, IsOpen s → y ∈ s → x ∈ s := (specializes_TFAE x y).out 0 2 #align specializes_iff_forall_open specializes_iff_forall_open theorem Specializes.mem_open (h : x ⤳ y) (hs : IsOpen s) (hy : y ∈ s) : x ∈ s := specializes_iff_forall_open.1 h s hs hy #align specializes.mem_open Specializes.mem_open theorem IsOpen.not_specializes (hs : IsOpen s) (hx : x ∉ s) (hy : y ∈ s) : ¬x ⤳ y := fun h => hx <| h.mem_open hs hy #align is_open.not_specializes IsOpen.not_specializes theorem specializes_iff_forall_closed : x ⤳ y ↔ ∀ s : Set X, IsClosed s → x ∈ s → y ∈ s := (specializes_TFAE x y).out 0 3 #align specializes_iff_forall_closed specializes_iff_forall_closed theorem Specializes.mem_closed (h : x ⤳ y) (hs : IsClosed s) (hx : x ∈ s) : y ∈ s := specializes_iff_forall_closed.1 h s hs hx #align specializes.mem_closed Specializes.mem_closed theorem IsClosed.not_specializes (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬x ⤳ y := fun h => hy <| h.mem_closed hs hx #align is_closed.not_specializes IsClosed.not_specializes theorem specializes_iff_mem_closure : x ⤳ y ↔ y ∈ closure ({x} : Set X) := (specializes_TFAE x y).out 0 4 #align specializes_iff_mem_closure specializes_iff_mem_closure alias ⟨Specializes.mem_closure, _⟩ := specializes_iff_mem_closure #align specializes.mem_closure Specializes.mem_closure theorem specializes_iff_closure_subset : x ⤳ y ↔ closure ({y} : Set X) ⊆ closure {x} := (specializes_TFAE x y).out 0 5 #align specializes_iff_closure_subset specializes_iff_closure_subset alias ⟨Specializes.closure_subset, _⟩ := specializes_iff_closure_subset #align specializes.closure_subset Specializes.closure_subset -- porting note: new lemma theorem specializes_iff_clusterPt : x ⤳ y ↔ ClusterPt y (pure x) := (specializes_TFAE x y).out 0 6 theorem Filter.HasBasis.specializes_iff {ι} {p : ι → Prop} {s : ι → Set X} (h : (𝓝 y).HasBasis p s) : x ⤳ y ↔ ∀ i, p i → x ∈ s i := specializes_iff_pure.trans h.ge_iff #align filter.has_basis.specializes_iff Filter.HasBasis.specializes_iff theorem specializes_rfl : x ⤳ x := le_rfl #align specializes_rfl specializes_rfl @[refl] theorem specializes_refl (x : X) : x ⤳ x := specializes_rfl #align specializes_refl specializes_refl @[trans] theorem Specializes.trans : x ⤳ y → y ⤳ z → x ⤳ z := le_trans #align specializes.trans Specializes.trans theorem specializes_of_eq (e : x = y) : x ⤳ y := e ▸ specializes_refl x #align specializes_of_eq specializes_of_eq theorem specializes_of_nhdsWithin (h₁ : 𝓝[s] x ≤ 𝓝[s] y) (h₂ : x ∈ s) : x ⤳ y := specializes_iff_pure.2 <| calc pure x ≤ 𝓝[s] x := le_inf (pure_le_nhds _) (le_principal_iff.2 h₂) _ ≤ 𝓝[s] y := h₁ _ ≤ 𝓝 y := inf_le_left #align specializes_of_nhds_within specializes_of_nhdsWithin theorem Specializes.map_of_continuousAt (h : x ⤳ y) (hy : ContinuousAt f y) : f x ⤳ f y := specializes_iff_pure.2 fun _s hs => mem_pure.2 <| mem_preimage.1 <| mem_of_mem_nhds <| hy.mono_left h hs #align specializes.map_of_continuous_at Specializes.map_of_continuousAt theorem Specializes.map (h : x ⤳ y) (hf : Continuous f) : f x ⤳ f y := h.map_of_continuousAt hf.rst.imntinuousAt #align specializes.map Specializes.map theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y := by simp only [specializes_iff_mem_closure, hf.closure_eq_preimage_closure_image, image_singleton, mem_preimage] #align inducing.specializes_iff Inducing.specializes_iff theorem subtype_specializes_iff {p : X → Prop} (x y : Subtype p) : x ⤳ y ↔ (x : X) ⤳ y := inducing_subtype_val.specializes_iff.symm #align subtype_specializes_iff subtype_specializes_iff @[simp] theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂ := by simp only [Specializes, nhds_prod_eq, prod_le_prod] #align specializes_prod specializes_prod theorem Specializes.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ⤳ x₂) (hy : y₁ ⤳ y₂) : (x₁, y₁) ⤳ (x₂, y₂) := specializes_prod.2 ⟨hx, hy⟩ #align specializes.prod Specializes.prod @[simp] theorem specializes_pi {f g : ∀ i, π i} : f ⤳ g ↔ ∀ i, f i ⤳ g i := by simp only [Specializes, nhds_pi, pi_le_pi] #align specializes_pi specializes_pi theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S := by rw [specializes_iff_forall_open] push_neg rfl #align not_specializes_iff_exists_open not_specializes_iff_exists_open theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S := by rw [specializes_iff_forall_closed] push_neg rfl #align not_specializes_iff_exists_closed not_specializes_iff_exists_closed theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) : Continuous (s.piecewise f g) := by have : ∀ U, IsOpen U → g ⁻¹' U ⊆ f ⁻¹' U := fun U hU x hx ↦ (hspec x).mem_open hU hx rw [continuous_def] intro U hU
rw [piecewise_preimage, ite_eq_of_subset_right _ (this U hU)]
theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) : Continuous (s.piecewise f g) := by have : ∀ U, IsOpen U → g ⁻¹' U ⊆ f ⁻¹' U := fun U hU x hx ↦ (hspec x).mem_open hU hx rw [continuous_def] intro U hU
Mathlib.Topology.Inseparable.231_0.2NeLzt0mQ64QlfB
theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) : Continuous (s.piecewise f g)
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝⁴ : TopologicalSpace X inst✝³ : TopologicalSpace Y inst✝² : TopologicalSpace Z inst✝¹ : (i : ι) → TopologicalSpace (π i) x y z : X s : Set X f g : X → Y inst✝ : DecidablePred fun x => x ∈ s hs : IsOpen s hf : Continuous f hg : Continuous g hspec : ∀ (x : X), f x ⤳ g x this : ∀ (U : Set Y), IsOpen U → g ⁻¹' U ⊆ f ⁻¹' U U : Set Y hU : IsOpen U ⊢ IsOpen (f ⁻¹' U ∩ s ∪ g ⁻¹' U)
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext; simp [specializes_iff_pure, le_def] theorem specializes_iff_forall_open : x ⤳ y ↔ ∀ s : Set X, IsOpen s → y ∈ s → x ∈ s := (specializes_TFAE x y).out 0 2 #align specializes_iff_forall_open specializes_iff_forall_open theorem Specializes.mem_open (h : x ⤳ y) (hs : IsOpen s) (hy : y ∈ s) : x ∈ s := specializes_iff_forall_open.1 h s hs hy #align specializes.mem_open Specializes.mem_open theorem IsOpen.not_specializes (hs : IsOpen s) (hx : x ∉ s) (hy : y ∈ s) : ¬x ⤳ y := fun h => hx <| h.mem_open hs hy #align is_open.not_specializes IsOpen.not_specializes theorem specializes_iff_forall_closed : x ⤳ y ↔ ∀ s : Set X, IsClosed s → x ∈ s → y ∈ s := (specializes_TFAE x y).out 0 3 #align specializes_iff_forall_closed specializes_iff_forall_closed theorem Specializes.mem_closed (h : x ⤳ y) (hs : IsClosed s) (hx : x ∈ s) : y ∈ s := specializes_iff_forall_closed.1 h s hs hx #align specializes.mem_closed Specializes.mem_closed theorem IsClosed.not_specializes (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬x ⤳ y := fun h => hy <| h.mem_closed hs hx #align is_closed.not_specializes IsClosed.not_specializes theorem specializes_iff_mem_closure : x ⤳ y ↔ y ∈ closure ({x} : Set X) := (specializes_TFAE x y).out 0 4 #align specializes_iff_mem_closure specializes_iff_mem_closure alias ⟨Specializes.mem_closure, _⟩ := specializes_iff_mem_closure #align specializes.mem_closure Specializes.mem_closure theorem specializes_iff_closure_subset : x ⤳ y ↔ closure ({y} : Set X) ⊆ closure {x} := (specializes_TFAE x y).out 0 5 #align specializes_iff_closure_subset specializes_iff_closure_subset alias ⟨Specializes.closure_subset, _⟩ := specializes_iff_closure_subset #align specializes.closure_subset Specializes.closure_subset -- porting note: new lemma theorem specializes_iff_clusterPt : x ⤳ y ↔ ClusterPt y (pure x) := (specializes_TFAE x y).out 0 6 theorem Filter.HasBasis.specializes_iff {ι} {p : ι → Prop} {s : ι → Set X} (h : (𝓝 y).HasBasis p s) : x ⤳ y ↔ ∀ i, p i → x ∈ s i := specializes_iff_pure.trans h.ge_iff #align filter.has_basis.specializes_iff Filter.HasBasis.specializes_iff theorem specializes_rfl : x ⤳ x := le_rfl #align specializes_rfl specializes_rfl @[refl] theorem specializes_refl (x : X) : x ⤳ x := specializes_rfl #align specializes_refl specializes_refl @[trans] theorem Specializes.trans : x ⤳ y → y ⤳ z → x ⤳ z := le_trans #align specializes.trans Specializes.trans theorem specializes_of_eq (e : x = y) : x ⤳ y := e ▸ specializes_refl x #align specializes_of_eq specializes_of_eq theorem specializes_of_nhdsWithin (h₁ : 𝓝[s] x ≤ 𝓝[s] y) (h₂ : x ∈ s) : x ⤳ y := specializes_iff_pure.2 <| calc pure x ≤ 𝓝[s] x := le_inf (pure_le_nhds _) (le_principal_iff.2 h₂) _ ≤ 𝓝[s] y := h₁ _ ≤ 𝓝 y := inf_le_left #align specializes_of_nhds_within specializes_of_nhdsWithin theorem Specializes.map_of_continuousAt (h : x ⤳ y) (hy : ContinuousAt f y) : f x ⤳ f y := specializes_iff_pure.2 fun _s hs => mem_pure.2 <| mem_preimage.1 <| mem_of_mem_nhds <| hy.mono_left h hs #align specializes.map_of_continuous_at Specializes.map_of_continuousAt theorem Specializes.map (h : x ⤳ y) (hf : Continuous f) : f x ⤳ f y := h.map_of_continuousAt hf.rst.imntinuousAt #align specializes.map Specializes.map theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y := by simp only [specializes_iff_mem_closure, hf.closure_eq_preimage_closure_image, image_singleton, mem_preimage] #align inducing.specializes_iff Inducing.specializes_iff theorem subtype_specializes_iff {p : X → Prop} (x y : Subtype p) : x ⤳ y ↔ (x : X) ⤳ y := inducing_subtype_val.specializes_iff.symm #align subtype_specializes_iff subtype_specializes_iff @[simp] theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂ := by simp only [Specializes, nhds_prod_eq, prod_le_prod] #align specializes_prod specializes_prod theorem Specializes.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ⤳ x₂) (hy : y₁ ⤳ y₂) : (x₁, y₁) ⤳ (x₂, y₂) := specializes_prod.2 ⟨hx, hy⟩ #align specializes.prod Specializes.prod @[simp] theorem specializes_pi {f g : ∀ i, π i} : f ⤳ g ↔ ∀ i, f i ⤳ g i := by simp only [Specializes, nhds_pi, pi_le_pi] #align specializes_pi specializes_pi theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S := by rw [specializes_iff_forall_open] push_neg rfl #align not_specializes_iff_exists_open not_specializes_iff_exists_open theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S := by rw [specializes_iff_forall_closed] push_neg rfl #align not_specializes_iff_exists_closed not_specializes_iff_exists_closed theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) : Continuous (s.piecewise f g) := by have : ∀ U, IsOpen U → g ⁻¹' U ⊆ f ⁻¹' U := fun U hU x hx ↦ (hspec x).mem_open hU hx rw [continuous_def] intro U hU rw [piecewise_preimage, ite_eq_of_subset_right _ (this U hU)]
exact hU.preimage hf |>.inter hs |>.union (hU.preimage hg)
theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) : Continuous (s.piecewise f g) := by have : ∀ U, IsOpen U → g ⁻¹' U ⊆ f ⁻¹' U := fun U hU x hx ↦ (hspec x).mem_open hU hx rw [continuous_def] intro U hU rw [piecewise_preimage, ite_eq_of_subset_right _ (this U hU)]
Mathlib.Topology.Inseparable.231_0.2NeLzt0mQ64QlfB
theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) : Continuous (s.piecewise f g)
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝⁴ : TopologicalSpace X inst✝³ : TopologicalSpace Y inst✝² : TopologicalSpace Z inst✝¹ : (i : ι) → TopologicalSpace (π i) x y z : X s : Set X f g : X → Y inst✝ : DecidablePred fun x => x ∈ s hs : IsClosed s hf : Continuous f hg : Continuous g hspec : ∀ (x : X), g x ⤳ f x ⊢ Continuous (piecewise s f g)
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext; simp [specializes_iff_pure, le_def] theorem specializes_iff_forall_open : x ⤳ y ↔ ∀ s : Set X, IsOpen s → y ∈ s → x ∈ s := (specializes_TFAE x y).out 0 2 #align specializes_iff_forall_open specializes_iff_forall_open theorem Specializes.mem_open (h : x ⤳ y) (hs : IsOpen s) (hy : y ∈ s) : x ∈ s := specializes_iff_forall_open.1 h s hs hy #align specializes.mem_open Specializes.mem_open theorem IsOpen.not_specializes (hs : IsOpen s) (hx : x ∉ s) (hy : y ∈ s) : ¬x ⤳ y := fun h => hx <| h.mem_open hs hy #align is_open.not_specializes IsOpen.not_specializes theorem specializes_iff_forall_closed : x ⤳ y ↔ ∀ s : Set X, IsClosed s → x ∈ s → y ∈ s := (specializes_TFAE x y).out 0 3 #align specializes_iff_forall_closed specializes_iff_forall_closed theorem Specializes.mem_closed (h : x ⤳ y) (hs : IsClosed s) (hx : x ∈ s) : y ∈ s := specializes_iff_forall_closed.1 h s hs hx #align specializes.mem_closed Specializes.mem_closed theorem IsClosed.not_specializes (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬x ⤳ y := fun h => hy <| h.mem_closed hs hx #align is_closed.not_specializes IsClosed.not_specializes theorem specializes_iff_mem_closure : x ⤳ y ↔ y ∈ closure ({x} : Set X) := (specializes_TFAE x y).out 0 4 #align specializes_iff_mem_closure specializes_iff_mem_closure alias ⟨Specializes.mem_closure, _⟩ := specializes_iff_mem_closure #align specializes.mem_closure Specializes.mem_closure theorem specializes_iff_closure_subset : x ⤳ y ↔ closure ({y} : Set X) ⊆ closure {x} := (specializes_TFAE x y).out 0 5 #align specializes_iff_closure_subset specializes_iff_closure_subset alias ⟨Specializes.closure_subset, _⟩ := specializes_iff_closure_subset #align specializes.closure_subset Specializes.closure_subset -- porting note: new lemma theorem specializes_iff_clusterPt : x ⤳ y ↔ ClusterPt y (pure x) := (specializes_TFAE x y).out 0 6 theorem Filter.HasBasis.specializes_iff {ι} {p : ι → Prop} {s : ι → Set X} (h : (𝓝 y).HasBasis p s) : x ⤳ y ↔ ∀ i, p i → x ∈ s i := specializes_iff_pure.trans h.ge_iff #align filter.has_basis.specializes_iff Filter.HasBasis.specializes_iff theorem specializes_rfl : x ⤳ x := le_rfl #align specializes_rfl specializes_rfl @[refl] theorem specializes_refl (x : X) : x ⤳ x := specializes_rfl #align specializes_refl specializes_refl @[trans] theorem Specializes.trans : x ⤳ y → y ⤳ z → x ⤳ z := le_trans #align specializes.trans Specializes.trans theorem specializes_of_eq (e : x = y) : x ⤳ y := e ▸ specializes_refl x #align specializes_of_eq specializes_of_eq theorem specializes_of_nhdsWithin (h₁ : 𝓝[s] x ≤ 𝓝[s] y) (h₂ : x ∈ s) : x ⤳ y := specializes_iff_pure.2 <| calc pure x ≤ 𝓝[s] x := le_inf (pure_le_nhds _) (le_principal_iff.2 h₂) _ ≤ 𝓝[s] y := h₁ _ ≤ 𝓝 y := inf_le_left #align specializes_of_nhds_within specializes_of_nhdsWithin theorem Specializes.map_of_continuousAt (h : x ⤳ y) (hy : ContinuousAt f y) : f x ⤳ f y := specializes_iff_pure.2 fun _s hs => mem_pure.2 <| mem_preimage.1 <| mem_of_mem_nhds <| hy.mono_left h hs #align specializes.map_of_continuous_at Specializes.map_of_continuousAt theorem Specializes.map (h : x ⤳ y) (hf : Continuous f) : f x ⤳ f y := h.map_of_continuousAt hf.rst.imntinuousAt #align specializes.map Specializes.map theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y := by simp only [specializes_iff_mem_closure, hf.closure_eq_preimage_closure_image, image_singleton, mem_preimage] #align inducing.specializes_iff Inducing.specializes_iff theorem subtype_specializes_iff {p : X → Prop} (x y : Subtype p) : x ⤳ y ↔ (x : X) ⤳ y := inducing_subtype_val.specializes_iff.symm #align subtype_specializes_iff subtype_specializes_iff @[simp] theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂ := by simp only [Specializes, nhds_prod_eq, prod_le_prod] #align specializes_prod specializes_prod theorem Specializes.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ⤳ x₂) (hy : y₁ ⤳ y₂) : (x₁, y₁) ⤳ (x₂, y₂) := specializes_prod.2 ⟨hx, hy⟩ #align specializes.prod Specializes.prod @[simp] theorem specializes_pi {f g : ∀ i, π i} : f ⤳ g ↔ ∀ i, f i ⤳ g i := by simp only [Specializes, nhds_pi, pi_le_pi] #align specializes_pi specializes_pi theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S := by rw [specializes_iff_forall_open] push_neg rfl #align not_specializes_iff_exists_open not_specializes_iff_exists_open theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S := by rw [specializes_iff_forall_closed] push_neg rfl #align not_specializes_iff_exists_closed not_specializes_iff_exists_closed theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) : Continuous (s.piecewise f g) := by have : ∀ U, IsOpen U → g ⁻¹' U ⊆ f ⁻¹' U := fun U hU x hx ↦ (hspec x).mem_open hU hx rw [continuous_def] intro U hU rw [piecewise_preimage, ite_eq_of_subset_right _ (this U hU)] exact hU.preimage hf |>.inter hs |>.union (hU.preimage hg) theorem IsClosed.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsClosed s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, g x ⤳ f x) : Continuous (s.piecewise f g) := by
simpa only [piecewise_compl] using hs.isOpen_compl.continuous_piecewise_of_specializes hg hf hspec
theorem IsClosed.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsClosed s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, g x ⤳ f x) : Continuous (s.piecewise f g) := by
Mathlib.Topology.Inseparable.240_0.2NeLzt0mQ64QlfB
theorem IsClosed.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsClosed s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, g x ⤳ f x) : Continuous (s.piecewise f g)
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x y z : X s : Set X f g : X → Y ⊢ (x ~ᵢ y) ↔ ∀ (s : Set X), IsOpen s → (x ∈ s ↔ y ∈ s)
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext; simp [specializes_iff_pure, le_def] theorem specializes_iff_forall_open : x ⤳ y ↔ ∀ s : Set X, IsOpen s → y ∈ s → x ∈ s := (specializes_TFAE x y).out 0 2 #align specializes_iff_forall_open specializes_iff_forall_open theorem Specializes.mem_open (h : x ⤳ y) (hs : IsOpen s) (hy : y ∈ s) : x ∈ s := specializes_iff_forall_open.1 h s hs hy #align specializes.mem_open Specializes.mem_open theorem IsOpen.not_specializes (hs : IsOpen s) (hx : x ∉ s) (hy : y ∈ s) : ¬x ⤳ y := fun h => hx <| h.mem_open hs hy #align is_open.not_specializes IsOpen.not_specializes theorem specializes_iff_forall_closed : x ⤳ y ↔ ∀ s : Set X, IsClosed s → x ∈ s → y ∈ s := (specializes_TFAE x y).out 0 3 #align specializes_iff_forall_closed specializes_iff_forall_closed theorem Specializes.mem_closed (h : x ⤳ y) (hs : IsClosed s) (hx : x ∈ s) : y ∈ s := specializes_iff_forall_closed.1 h s hs hx #align specializes.mem_closed Specializes.mem_closed theorem IsClosed.not_specializes (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬x ⤳ y := fun h => hy <| h.mem_closed hs hx #align is_closed.not_specializes IsClosed.not_specializes theorem specializes_iff_mem_closure : x ⤳ y ↔ y ∈ closure ({x} : Set X) := (specializes_TFAE x y).out 0 4 #align specializes_iff_mem_closure specializes_iff_mem_closure alias ⟨Specializes.mem_closure, _⟩ := specializes_iff_mem_closure #align specializes.mem_closure Specializes.mem_closure theorem specializes_iff_closure_subset : x ⤳ y ↔ closure ({y} : Set X) ⊆ closure {x} := (specializes_TFAE x y).out 0 5 #align specializes_iff_closure_subset specializes_iff_closure_subset alias ⟨Specializes.closure_subset, _⟩ := specializes_iff_closure_subset #align specializes.closure_subset Specializes.closure_subset -- porting note: new lemma theorem specializes_iff_clusterPt : x ⤳ y ↔ ClusterPt y (pure x) := (specializes_TFAE x y).out 0 6 theorem Filter.HasBasis.specializes_iff {ι} {p : ι → Prop} {s : ι → Set X} (h : (𝓝 y).HasBasis p s) : x ⤳ y ↔ ∀ i, p i → x ∈ s i := specializes_iff_pure.trans h.ge_iff #align filter.has_basis.specializes_iff Filter.HasBasis.specializes_iff theorem specializes_rfl : x ⤳ x := le_rfl #align specializes_rfl specializes_rfl @[refl] theorem specializes_refl (x : X) : x ⤳ x := specializes_rfl #align specializes_refl specializes_refl @[trans] theorem Specializes.trans : x ⤳ y → y ⤳ z → x ⤳ z := le_trans #align specializes.trans Specializes.trans theorem specializes_of_eq (e : x = y) : x ⤳ y := e ▸ specializes_refl x #align specializes_of_eq specializes_of_eq theorem specializes_of_nhdsWithin (h₁ : 𝓝[s] x ≤ 𝓝[s] y) (h₂ : x ∈ s) : x ⤳ y := specializes_iff_pure.2 <| calc pure x ≤ 𝓝[s] x := le_inf (pure_le_nhds _) (le_principal_iff.2 h₂) _ ≤ 𝓝[s] y := h₁ _ ≤ 𝓝 y := inf_le_left #align specializes_of_nhds_within specializes_of_nhdsWithin theorem Specializes.map_of_continuousAt (h : x ⤳ y) (hy : ContinuousAt f y) : f x ⤳ f y := specializes_iff_pure.2 fun _s hs => mem_pure.2 <| mem_preimage.1 <| mem_of_mem_nhds <| hy.mono_left h hs #align specializes.map_of_continuous_at Specializes.map_of_continuousAt theorem Specializes.map (h : x ⤳ y) (hf : Continuous f) : f x ⤳ f y := h.map_of_continuousAt hf.rst.imntinuousAt #align specializes.map Specializes.map theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y := by simp only [specializes_iff_mem_closure, hf.closure_eq_preimage_closure_image, image_singleton, mem_preimage] #align inducing.specializes_iff Inducing.specializes_iff theorem subtype_specializes_iff {p : X → Prop} (x y : Subtype p) : x ⤳ y ↔ (x : X) ⤳ y := inducing_subtype_val.specializes_iff.symm #align subtype_specializes_iff subtype_specializes_iff @[simp] theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂ := by simp only [Specializes, nhds_prod_eq, prod_le_prod] #align specializes_prod specializes_prod theorem Specializes.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ⤳ x₂) (hy : y₁ ⤳ y₂) : (x₁, y₁) ⤳ (x₂, y₂) := specializes_prod.2 ⟨hx, hy⟩ #align specializes.prod Specializes.prod @[simp] theorem specializes_pi {f g : ∀ i, π i} : f ⤳ g ↔ ∀ i, f i ⤳ g i := by simp only [Specializes, nhds_pi, pi_le_pi] #align specializes_pi specializes_pi theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S := by rw [specializes_iff_forall_open] push_neg rfl #align not_specializes_iff_exists_open not_specializes_iff_exists_open theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S := by rw [specializes_iff_forall_closed] push_neg rfl #align not_specializes_iff_exists_closed not_specializes_iff_exists_closed theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) : Continuous (s.piecewise f g) := by have : ∀ U, IsOpen U → g ⁻¹' U ⊆ f ⁻¹' U := fun U hU x hx ↦ (hspec x).mem_open hU hx rw [continuous_def] intro U hU rw [piecewise_preimage, ite_eq_of_subset_right _ (this U hU)] exact hU.preimage hf |>.inter hs |>.union (hU.preimage hg) theorem IsClosed.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsClosed s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, g x ⤳ f x) : Continuous (s.piecewise f g) := by simpa only [piecewise_compl] using hs.isOpen_compl.continuous_piecewise_of_specializes hg hf hspec variable (X) /-- Specialization forms a preorder on the topological space. -/ def specializationPreorder : Preorder X := { Preorder.lift (OrderDual.toDual ∘ 𝓝) with le := fun x y => y ⤳ x lt := fun x y => y ⤳ x ∧ ¬x ⤳ y } #align specialization_preorder specializationPreorder variable {X} /-- A continuous function is monotone with respect to the specialization preorders on the domain and the codomain. -/ theorem Continuous.specialization_monotone (hf : Continuous f) : @Monotone _ _ (specializationPreorder X) (specializationPreorder Y) f := fun _ _ h => h.map hf #align continuous.specialization_monotone Continuous.specialization_monotone /-! ### `Inseparable` relation -/ /-- Two points `x` and `y` in a topological space are `Inseparable` if any of the following equivalent properties hold: - `𝓝 x = 𝓝 y`; we use this property as the definition; - for any open set `s`, `x ∈ s ↔ y ∈ s`, see `inseparable_iff_open`; - for any closed set `s`, `x ∈ s ↔ y ∈ s`, see `inseparable_iff_closed`; - `x ∈ closure {y}` and `y ∈ closure {x}`, see `inseparable_iff_mem_closure`; - `closure {x} = closure {y}`, see `inseparable_iff_closure_eq`. -/ def Inseparable (x y : X) : Prop := 𝓝 x = 𝓝 y #align inseparable Inseparable local infixl:0 " ~ᵢ " => Inseparable theorem inseparable_def : (x ~ᵢ y) ↔ 𝓝 x = 𝓝 y := Iff.rfl #align inseparable_def inseparable_def theorem inseparable_iff_specializes_and : (x ~ᵢ y) ↔ x ⤳ y ∧ y ⤳ x := le_antisymm_iff #align inseparable_iff_specializes_and inseparable_iff_specializes_and theorem Inseparable.specializes (h : x ~ᵢ y) : x ⤳ y := h.le #align inseparable.specializes Inseparable.specializes theorem Inseparable.specializes' (h : x ~ᵢ y) : y ⤳ x := h.ge #align inseparable.specializes' Inseparable.specializes' theorem Specializes.antisymm (h₁ : x ⤳ y) (h₂ : y ⤳ x) : x ~ᵢ y := le_antisymm h₁ h₂ #align specializes.antisymm Specializes.antisymm theorem inseparable_iff_forall_open : (x ~ᵢ y) ↔ ∀ s : Set X, IsOpen s → (x ∈ s ↔ y ∈ s) := by
simp only [inseparable_iff_specializes_and, specializes_iff_forall_open, ← forall_and, ← iff_def, Iff.comm]
theorem inseparable_iff_forall_open : (x ~ᵢ y) ↔ ∀ s : Set X, IsOpen s → (x ∈ s ↔ y ∈ s) := by
Mathlib.Topology.Inseparable.299_0.2NeLzt0mQ64QlfB
theorem inseparable_iff_forall_open : (x ~ᵢ y) ↔ ∀ s : Set X, IsOpen s → (x ∈ s ↔ y ∈ s)
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x y z : X s : Set X f g : X → Y ⊢ ¬(x ~ᵢ y) ↔ ∃ s, IsOpen s ∧ Xor' (x ∈ s) (y ∈ s)
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext; simp [specializes_iff_pure, le_def] theorem specializes_iff_forall_open : x ⤳ y ↔ ∀ s : Set X, IsOpen s → y ∈ s → x ∈ s := (specializes_TFAE x y).out 0 2 #align specializes_iff_forall_open specializes_iff_forall_open theorem Specializes.mem_open (h : x ⤳ y) (hs : IsOpen s) (hy : y ∈ s) : x ∈ s := specializes_iff_forall_open.1 h s hs hy #align specializes.mem_open Specializes.mem_open theorem IsOpen.not_specializes (hs : IsOpen s) (hx : x ∉ s) (hy : y ∈ s) : ¬x ⤳ y := fun h => hx <| h.mem_open hs hy #align is_open.not_specializes IsOpen.not_specializes theorem specializes_iff_forall_closed : x ⤳ y ↔ ∀ s : Set X, IsClosed s → x ∈ s → y ∈ s := (specializes_TFAE x y).out 0 3 #align specializes_iff_forall_closed specializes_iff_forall_closed theorem Specializes.mem_closed (h : x ⤳ y) (hs : IsClosed s) (hx : x ∈ s) : y ∈ s := specializes_iff_forall_closed.1 h s hs hx #align specializes.mem_closed Specializes.mem_closed theorem IsClosed.not_specializes (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬x ⤳ y := fun h => hy <| h.mem_closed hs hx #align is_closed.not_specializes IsClosed.not_specializes theorem specializes_iff_mem_closure : x ⤳ y ↔ y ∈ closure ({x} : Set X) := (specializes_TFAE x y).out 0 4 #align specializes_iff_mem_closure specializes_iff_mem_closure alias ⟨Specializes.mem_closure, _⟩ := specializes_iff_mem_closure #align specializes.mem_closure Specializes.mem_closure theorem specializes_iff_closure_subset : x ⤳ y ↔ closure ({y} : Set X) ⊆ closure {x} := (specializes_TFAE x y).out 0 5 #align specializes_iff_closure_subset specializes_iff_closure_subset alias ⟨Specializes.closure_subset, _⟩ := specializes_iff_closure_subset #align specializes.closure_subset Specializes.closure_subset -- porting note: new lemma theorem specializes_iff_clusterPt : x ⤳ y ↔ ClusterPt y (pure x) := (specializes_TFAE x y).out 0 6 theorem Filter.HasBasis.specializes_iff {ι} {p : ι → Prop} {s : ι → Set X} (h : (𝓝 y).HasBasis p s) : x ⤳ y ↔ ∀ i, p i → x ∈ s i := specializes_iff_pure.trans h.ge_iff #align filter.has_basis.specializes_iff Filter.HasBasis.specializes_iff theorem specializes_rfl : x ⤳ x := le_rfl #align specializes_rfl specializes_rfl @[refl] theorem specializes_refl (x : X) : x ⤳ x := specializes_rfl #align specializes_refl specializes_refl @[trans] theorem Specializes.trans : x ⤳ y → y ⤳ z → x ⤳ z := le_trans #align specializes.trans Specializes.trans theorem specializes_of_eq (e : x = y) : x ⤳ y := e ▸ specializes_refl x #align specializes_of_eq specializes_of_eq theorem specializes_of_nhdsWithin (h₁ : 𝓝[s] x ≤ 𝓝[s] y) (h₂ : x ∈ s) : x ⤳ y := specializes_iff_pure.2 <| calc pure x ≤ 𝓝[s] x := le_inf (pure_le_nhds _) (le_principal_iff.2 h₂) _ ≤ 𝓝[s] y := h₁ _ ≤ 𝓝 y := inf_le_left #align specializes_of_nhds_within specializes_of_nhdsWithin theorem Specializes.map_of_continuousAt (h : x ⤳ y) (hy : ContinuousAt f y) : f x ⤳ f y := specializes_iff_pure.2 fun _s hs => mem_pure.2 <| mem_preimage.1 <| mem_of_mem_nhds <| hy.mono_left h hs #align specializes.map_of_continuous_at Specializes.map_of_continuousAt theorem Specializes.map (h : x ⤳ y) (hf : Continuous f) : f x ⤳ f y := h.map_of_continuousAt hf.rst.imntinuousAt #align specializes.map Specializes.map theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y := by simp only [specializes_iff_mem_closure, hf.closure_eq_preimage_closure_image, image_singleton, mem_preimage] #align inducing.specializes_iff Inducing.specializes_iff theorem subtype_specializes_iff {p : X → Prop} (x y : Subtype p) : x ⤳ y ↔ (x : X) ⤳ y := inducing_subtype_val.specializes_iff.symm #align subtype_specializes_iff subtype_specializes_iff @[simp] theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂ := by simp only [Specializes, nhds_prod_eq, prod_le_prod] #align specializes_prod specializes_prod theorem Specializes.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ⤳ x₂) (hy : y₁ ⤳ y₂) : (x₁, y₁) ⤳ (x₂, y₂) := specializes_prod.2 ⟨hx, hy⟩ #align specializes.prod Specializes.prod @[simp] theorem specializes_pi {f g : ∀ i, π i} : f ⤳ g ↔ ∀ i, f i ⤳ g i := by simp only [Specializes, nhds_pi, pi_le_pi] #align specializes_pi specializes_pi theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S := by rw [specializes_iff_forall_open] push_neg rfl #align not_specializes_iff_exists_open not_specializes_iff_exists_open theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S := by rw [specializes_iff_forall_closed] push_neg rfl #align not_specializes_iff_exists_closed not_specializes_iff_exists_closed theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) : Continuous (s.piecewise f g) := by have : ∀ U, IsOpen U → g ⁻¹' U ⊆ f ⁻¹' U := fun U hU x hx ↦ (hspec x).mem_open hU hx rw [continuous_def] intro U hU rw [piecewise_preimage, ite_eq_of_subset_right _ (this U hU)] exact hU.preimage hf |>.inter hs |>.union (hU.preimage hg) theorem IsClosed.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsClosed s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, g x ⤳ f x) : Continuous (s.piecewise f g) := by simpa only [piecewise_compl] using hs.isOpen_compl.continuous_piecewise_of_specializes hg hf hspec variable (X) /-- Specialization forms a preorder on the topological space. -/ def specializationPreorder : Preorder X := { Preorder.lift (OrderDual.toDual ∘ 𝓝) with le := fun x y => y ⤳ x lt := fun x y => y ⤳ x ∧ ¬x ⤳ y } #align specialization_preorder specializationPreorder variable {X} /-- A continuous function is monotone with respect to the specialization preorders on the domain and the codomain. -/ theorem Continuous.specialization_monotone (hf : Continuous f) : @Monotone _ _ (specializationPreorder X) (specializationPreorder Y) f := fun _ _ h => h.map hf #align continuous.specialization_monotone Continuous.specialization_monotone /-! ### `Inseparable` relation -/ /-- Two points `x` and `y` in a topological space are `Inseparable` if any of the following equivalent properties hold: - `𝓝 x = 𝓝 y`; we use this property as the definition; - for any open set `s`, `x ∈ s ↔ y ∈ s`, see `inseparable_iff_open`; - for any closed set `s`, `x ∈ s ↔ y ∈ s`, see `inseparable_iff_closed`; - `x ∈ closure {y}` and `y ∈ closure {x}`, see `inseparable_iff_mem_closure`; - `closure {x} = closure {y}`, see `inseparable_iff_closure_eq`. -/ def Inseparable (x y : X) : Prop := 𝓝 x = 𝓝 y #align inseparable Inseparable local infixl:0 " ~ᵢ " => Inseparable theorem inseparable_def : (x ~ᵢ y) ↔ 𝓝 x = 𝓝 y := Iff.rfl #align inseparable_def inseparable_def theorem inseparable_iff_specializes_and : (x ~ᵢ y) ↔ x ⤳ y ∧ y ⤳ x := le_antisymm_iff #align inseparable_iff_specializes_and inseparable_iff_specializes_and theorem Inseparable.specializes (h : x ~ᵢ y) : x ⤳ y := h.le #align inseparable.specializes Inseparable.specializes theorem Inseparable.specializes' (h : x ~ᵢ y) : y ⤳ x := h.ge #align inseparable.specializes' Inseparable.specializes' theorem Specializes.antisymm (h₁ : x ⤳ y) (h₂ : y ⤳ x) : x ~ᵢ y := le_antisymm h₁ h₂ #align specializes.antisymm Specializes.antisymm theorem inseparable_iff_forall_open : (x ~ᵢ y) ↔ ∀ s : Set X, IsOpen s → (x ∈ s ↔ y ∈ s) := by simp only [inseparable_iff_specializes_and, specializes_iff_forall_open, ← forall_and, ← iff_def, Iff.comm] #align inseparable_iff_forall_open inseparable_iff_forall_open theorem not_inseparable_iff_exists_open : ¬(x ~ᵢ y) ↔ ∃ s : Set X, IsOpen s ∧ Xor' (x ∈ s) (y ∈ s) := by
simp [inseparable_iff_forall_open, ← xor_iff_not_iff]
theorem not_inseparable_iff_exists_open : ¬(x ~ᵢ y) ↔ ∃ s : Set X, IsOpen s ∧ Xor' (x ∈ s) (y ∈ s) := by
Mathlib.Topology.Inseparable.304_0.2NeLzt0mQ64QlfB
theorem not_inseparable_iff_exists_open : ¬(x ~ᵢ y) ↔ ∃ s : Set X, IsOpen s ∧ Xor' (x ∈ s) (y ∈ s)
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x y z : X s : Set X f g : X → Y ⊢ (x ~ᵢ y) ↔ ∀ (s : Set X), IsClosed s → (x ∈ s ↔ y ∈ s)
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext; simp [specializes_iff_pure, le_def] theorem specializes_iff_forall_open : x ⤳ y ↔ ∀ s : Set X, IsOpen s → y ∈ s → x ∈ s := (specializes_TFAE x y).out 0 2 #align specializes_iff_forall_open specializes_iff_forall_open theorem Specializes.mem_open (h : x ⤳ y) (hs : IsOpen s) (hy : y ∈ s) : x ∈ s := specializes_iff_forall_open.1 h s hs hy #align specializes.mem_open Specializes.mem_open theorem IsOpen.not_specializes (hs : IsOpen s) (hx : x ∉ s) (hy : y ∈ s) : ¬x ⤳ y := fun h => hx <| h.mem_open hs hy #align is_open.not_specializes IsOpen.not_specializes theorem specializes_iff_forall_closed : x ⤳ y ↔ ∀ s : Set X, IsClosed s → x ∈ s → y ∈ s := (specializes_TFAE x y).out 0 3 #align specializes_iff_forall_closed specializes_iff_forall_closed theorem Specializes.mem_closed (h : x ⤳ y) (hs : IsClosed s) (hx : x ∈ s) : y ∈ s := specializes_iff_forall_closed.1 h s hs hx #align specializes.mem_closed Specializes.mem_closed theorem IsClosed.not_specializes (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬x ⤳ y := fun h => hy <| h.mem_closed hs hx #align is_closed.not_specializes IsClosed.not_specializes theorem specializes_iff_mem_closure : x ⤳ y ↔ y ∈ closure ({x} : Set X) := (specializes_TFAE x y).out 0 4 #align specializes_iff_mem_closure specializes_iff_mem_closure alias ⟨Specializes.mem_closure, _⟩ := specializes_iff_mem_closure #align specializes.mem_closure Specializes.mem_closure theorem specializes_iff_closure_subset : x ⤳ y ↔ closure ({y} : Set X) ⊆ closure {x} := (specializes_TFAE x y).out 0 5 #align specializes_iff_closure_subset specializes_iff_closure_subset alias ⟨Specializes.closure_subset, _⟩ := specializes_iff_closure_subset #align specializes.closure_subset Specializes.closure_subset -- porting note: new lemma theorem specializes_iff_clusterPt : x ⤳ y ↔ ClusterPt y (pure x) := (specializes_TFAE x y).out 0 6 theorem Filter.HasBasis.specializes_iff {ι} {p : ι → Prop} {s : ι → Set X} (h : (𝓝 y).HasBasis p s) : x ⤳ y ↔ ∀ i, p i → x ∈ s i := specializes_iff_pure.trans h.ge_iff #align filter.has_basis.specializes_iff Filter.HasBasis.specializes_iff theorem specializes_rfl : x ⤳ x := le_rfl #align specializes_rfl specializes_rfl @[refl] theorem specializes_refl (x : X) : x ⤳ x := specializes_rfl #align specializes_refl specializes_refl @[trans] theorem Specializes.trans : x ⤳ y → y ⤳ z → x ⤳ z := le_trans #align specializes.trans Specializes.trans theorem specializes_of_eq (e : x = y) : x ⤳ y := e ▸ specializes_refl x #align specializes_of_eq specializes_of_eq theorem specializes_of_nhdsWithin (h₁ : 𝓝[s] x ≤ 𝓝[s] y) (h₂ : x ∈ s) : x ⤳ y := specializes_iff_pure.2 <| calc pure x ≤ 𝓝[s] x := le_inf (pure_le_nhds _) (le_principal_iff.2 h₂) _ ≤ 𝓝[s] y := h₁ _ ≤ 𝓝 y := inf_le_left #align specializes_of_nhds_within specializes_of_nhdsWithin theorem Specializes.map_of_continuousAt (h : x ⤳ y) (hy : ContinuousAt f y) : f x ⤳ f y := specializes_iff_pure.2 fun _s hs => mem_pure.2 <| mem_preimage.1 <| mem_of_mem_nhds <| hy.mono_left h hs #align specializes.map_of_continuous_at Specializes.map_of_continuousAt theorem Specializes.map (h : x ⤳ y) (hf : Continuous f) : f x ⤳ f y := h.map_of_continuousAt hf.rst.imntinuousAt #align specializes.map Specializes.map theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y := by simp only [specializes_iff_mem_closure, hf.closure_eq_preimage_closure_image, image_singleton, mem_preimage] #align inducing.specializes_iff Inducing.specializes_iff theorem subtype_specializes_iff {p : X → Prop} (x y : Subtype p) : x ⤳ y ↔ (x : X) ⤳ y := inducing_subtype_val.specializes_iff.symm #align subtype_specializes_iff subtype_specializes_iff @[simp] theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂ := by simp only [Specializes, nhds_prod_eq, prod_le_prod] #align specializes_prod specializes_prod theorem Specializes.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ⤳ x₂) (hy : y₁ ⤳ y₂) : (x₁, y₁) ⤳ (x₂, y₂) := specializes_prod.2 ⟨hx, hy⟩ #align specializes.prod Specializes.prod @[simp] theorem specializes_pi {f g : ∀ i, π i} : f ⤳ g ↔ ∀ i, f i ⤳ g i := by simp only [Specializes, nhds_pi, pi_le_pi] #align specializes_pi specializes_pi theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S := by rw [specializes_iff_forall_open] push_neg rfl #align not_specializes_iff_exists_open not_specializes_iff_exists_open theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S := by rw [specializes_iff_forall_closed] push_neg rfl #align not_specializes_iff_exists_closed not_specializes_iff_exists_closed theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) : Continuous (s.piecewise f g) := by have : ∀ U, IsOpen U → g ⁻¹' U ⊆ f ⁻¹' U := fun U hU x hx ↦ (hspec x).mem_open hU hx rw [continuous_def] intro U hU rw [piecewise_preimage, ite_eq_of_subset_right _ (this U hU)] exact hU.preimage hf |>.inter hs |>.union (hU.preimage hg) theorem IsClosed.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsClosed s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, g x ⤳ f x) : Continuous (s.piecewise f g) := by simpa only [piecewise_compl] using hs.isOpen_compl.continuous_piecewise_of_specializes hg hf hspec variable (X) /-- Specialization forms a preorder on the topological space. -/ def specializationPreorder : Preorder X := { Preorder.lift (OrderDual.toDual ∘ 𝓝) with le := fun x y => y ⤳ x lt := fun x y => y ⤳ x ∧ ¬x ⤳ y } #align specialization_preorder specializationPreorder variable {X} /-- A continuous function is monotone with respect to the specialization preorders on the domain and the codomain. -/ theorem Continuous.specialization_monotone (hf : Continuous f) : @Monotone _ _ (specializationPreorder X) (specializationPreorder Y) f := fun _ _ h => h.map hf #align continuous.specialization_monotone Continuous.specialization_monotone /-! ### `Inseparable` relation -/ /-- Two points `x` and `y` in a topological space are `Inseparable` if any of the following equivalent properties hold: - `𝓝 x = 𝓝 y`; we use this property as the definition; - for any open set `s`, `x ∈ s ↔ y ∈ s`, see `inseparable_iff_open`; - for any closed set `s`, `x ∈ s ↔ y ∈ s`, see `inseparable_iff_closed`; - `x ∈ closure {y}` and `y ∈ closure {x}`, see `inseparable_iff_mem_closure`; - `closure {x} = closure {y}`, see `inseparable_iff_closure_eq`. -/ def Inseparable (x y : X) : Prop := 𝓝 x = 𝓝 y #align inseparable Inseparable local infixl:0 " ~ᵢ " => Inseparable theorem inseparable_def : (x ~ᵢ y) ↔ 𝓝 x = 𝓝 y := Iff.rfl #align inseparable_def inseparable_def theorem inseparable_iff_specializes_and : (x ~ᵢ y) ↔ x ⤳ y ∧ y ⤳ x := le_antisymm_iff #align inseparable_iff_specializes_and inseparable_iff_specializes_and theorem Inseparable.specializes (h : x ~ᵢ y) : x ⤳ y := h.le #align inseparable.specializes Inseparable.specializes theorem Inseparable.specializes' (h : x ~ᵢ y) : y ⤳ x := h.ge #align inseparable.specializes' Inseparable.specializes' theorem Specializes.antisymm (h₁ : x ⤳ y) (h₂ : y ⤳ x) : x ~ᵢ y := le_antisymm h₁ h₂ #align specializes.antisymm Specializes.antisymm theorem inseparable_iff_forall_open : (x ~ᵢ y) ↔ ∀ s : Set X, IsOpen s → (x ∈ s ↔ y ∈ s) := by simp only [inseparable_iff_specializes_and, specializes_iff_forall_open, ← forall_and, ← iff_def, Iff.comm] #align inseparable_iff_forall_open inseparable_iff_forall_open theorem not_inseparable_iff_exists_open : ¬(x ~ᵢ y) ↔ ∃ s : Set X, IsOpen s ∧ Xor' (x ∈ s) (y ∈ s) := by simp [inseparable_iff_forall_open, ← xor_iff_not_iff] #align not_inseparable_iff_exists_open not_inseparable_iff_exists_open theorem inseparable_iff_forall_closed : (x ~ᵢ y) ↔ ∀ s : Set X, IsClosed s → (x ∈ s ↔ y ∈ s) := by
simp only [inseparable_iff_specializes_and, specializes_iff_forall_closed, ← forall_and, ← iff_def]
theorem inseparable_iff_forall_closed : (x ~ᵢ y) ↔ ∀ s : Set X, IsClosed s → (x ∈ s ↔ y ∈ s) := by
Mathlib.Topology.Inseparable.309_0.2NeLzt0mQ64QlfB
theorem inseparable_iff_forall_closed : (x ~ᵢ y) ↔ ∀ s : Set X, IsClosed s → (x ∈ s ↔ y ∈ s)
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x y z : X s : Set X f g : X → Y ⊢ x ⤳ y ∧ y ⤳ x ↔ x ∈ closure {y} ∧ y ∈ closure {x}
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext; simp [specializes_iff_pure, le_def] theorem specializes_iff_forall_open : x ⤳ y ↔ ∀ s : Set X, IsOpen s → y ∈ s → x ∈ s := (specializes_TFAE x y).out 0 2 #align specializes_iff_forall_open specializes_iff_forall_open theorem Specializes.mem_open (h : x ⤳ y) (hs : IsOpen s) (hy : y ∈ s) : x ∈ s := specializes_iff_forall_open.1 h s hs hy #align specializes.mem_open Specializes.mem_open theorem IsOpen.not_specializes (hs : IsOpen s) (hx : x ∉ s) (hy : y ∈ s) : ¬x ⤳ y := fun h => hx <| h.mem_open hs hy #align is_open.not_specializes IsOpen.not_specializes theorem specializes_iff_forall_closed : x ⤳ y ↔ ∀ s : Set X, IsClosed s → x ∈ s → y ∈ s := (specializes_TFAE x y).out 0 3 #align specializes_iff_forall_closed specializes_iff_forall_closed theorem Specializes.mem_closed (h : x ⤳ y) (hs : IsClosed s) (hx : x ∈ s) : y ∈ s := specializes_iff_forall_closed.1 h s hs hx #align specializes.mem_closed Specializes.mem_closed theorem IsClosed.not_specializes (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬x ⤳ y := fun h => hy <| h.mem_closed hs hx #align is_closed.not_specializes IsClosed.not_specializes theorem specializes_iff_mem_closure : x ⤳ y ↔ y ∈ closure ({x} : Set X) := (specializes_TFAE x y).out 0 4 #align specializes_iff_mem_closure specializes_iff_mem_closure alias ⟨Specializes.mem_closure, _⟩ := specializes_iff_mem_closure #align specializes.mem_closure Specializes.mem_closure theorem specializes_iff_closure_subset : x ⤳ y ↔ closure ({y} : Set X) ⊆ closure {x} := (specializes_TFAE x y).out 0 5 #align specializes_iff_closure_subset specializes_iff_closure_subset alias ⟨Specializes.closure_subset, _⟩ := specializes_iff_closure_subset #align specializes.closure_subset Specializes.closure_subset -- porting note: new lemma theorem specializes_iff_clusterPt : x ⤳ y ↔ ClusterPt y (pure x) := (specializes_TFAE x y).out 0 6 theorem Filter.HasBasis.specializes_iff {ι} {p : ι → Prop} {s : ι → Set X} (h : (𝓝 y).HasBasis p s) : x ⤳ y ↔ ∀ i, p i → x ∈ s i := specializes_iff_pure.trans h.ge_iff #align filter.has_basis.specializes_iff Filter.HasBasis.specializes_iff theorem specializes_rfl : x ⤳ x := le_rfl #align specializes_rfl specializes_rfl @[refl] theorem specializes_refl (x : X) : x ⤳ x := specializes_rfl #align specializes_refl specializes_refl @[trans] theorem Specializes.trans : x ⤳ y → y ⤳ z → x ⤳ z := le_trans #align specializes.trans Specializes.trans theorem specializes_of_eq (e : x = y) : x ⤳ y := e ▸ specializes_refl x #align specializes_of_eq specializes_of_eq theorem specializes_of_nhdsWithin (h₁ : 𝓝[s] x ≤ 𝓝[s] y) (h₂ : x ∈ s) : x ⤳ y := specializes_iff_pure.2 <| calc pure x ≤ 𝓝[s] x := le_inf (pure_le_nhds _) (le_principal_iff.2 h₂) _ ≤ 𝓝[s] y := h₁ _ ≤ 𝓝 y := inf_le_left #align specializes_of_nhds_within specializes_of_nhdsWithin theorem Specializes.map_of_continuousAt (h : x ⤳ y) (hy : ContinuousAt f y) : f x ⤳ f y := specializes_iff_pure.2 fun _s hs => mem_pure.2 <| mem_preimage.1 <| mem_of_mem_nhds <| hy.mono_left h hs #align specializes.map_of_continuous_at Specializes.map_of_continuousAt theorem Specializes.map (h : x ⤳ y) (hf : Continuous f) : f x ⤳ f y := h.map_of_continuousAt hf.rst.imntinuousAt #align specializes.map Specializes.map theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y := by simp only [specializes_iff_mem_closure, hf.closure_eq_preimage_closure_image, image_singleton, mem_preimage] #align inducing.specializes_iff Inducing.specializes_iff theorem subtype_specializes_iff {p : X → Prop} (x y : Subtype p) : x ⤳ y ↔ (x : X) ⤳ y := inducing_subtype_val.specializes_iff.symm #align subtype_specializes_iff subtype_specializes_iff @[simp] theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂ := by simp only [Specializes, nhds_prod_eq, prod_le_prod] #align specializes_prod specializes_prod theorem Specializes.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ⤳ x₂) (hy : y₁ ⤳ y₂) : (x₁, y₁) ⤳ (x₂, y₂) := specializes_prod.2 ⟨hx, hy⟩ #align specializes.prod Specializes.prod @[simp] theorem specializes_pi {f g : ∀ i, π i} : f ⤳ g ↔ ∀ i, f i ⤳ g i := by simp only [Specializes, nhds_pi, pi_le_pi] #align specializes_pi specializes_pi theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S := by rw [specializes_iff_forall_open] push_neg rfl #align not_specializes_iff_exists_open not_specializes_iff_exists_open theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S := by rw [specializes_iff_forall_closed] push_neg rfl #align not_specializes_iff_exists_closed not_specializes_iff_exists_closed theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) : Continuous (s.piecewise f g) := by have : ∀ U, IsOpen U → g ⁻¹' U ⊆ f ⁻¹' U := fun U hU x hx ↦ (hspec x).mem_open hU hx rw [continuous_def] intro U hU rw [piecewise_preimage, ite_eq_of_subset_right _ (this U hU)] exact hU.preimage hf |>.inter hs |>.union (hU.preimage hg) theorem IsClosed.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsClosed s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, g x ⤳ f x) : Continuous (s.piecewise f g) := by simpa only [piecewise_compl] using hs.isOpen_compl.continuous_piecewise_of_specializes hg hf hspec variable (X) /-- Specialization forms a preorder on the topological space. -/ def specializationPreorder : Preorder X := { Preorder.lift (OrderDual.toDual ∘ 𝓝) with le := fun x y => y ⤳ x lt := fun x y => y ⤳ x ∧ ¬x ⤳ y } #align specialization_preorder specializationPreorder variable {X} /-- A continuous function is monotone with respect to the specialization preorders on the domain and the codomain. -/ theorem Continuous.specialization_monotone (hf : Continuous f) : @Monotone _ _ (specializationPreorder X) (specializationPreorder Y) f := fun _ _ h => h.map hf #align continuous.specialization_monotone Continuous.specialization_monotone /-! ### `Inseparable` relation -/ /-- Two points `x` and `y` in a topological space are `Inseparable` if any of the following equivalent properties hold: - `𝓝 x = 𝓝 y`; we use this property as the definition; - for any open set `s`, `x ∈ s ↔ y ∈ s`, see `inseparable_iff_open`; - for any closed set `s`, `x ∈ s ↔ y ∈ s`, see `inseparable_iff_closed`; - `x ∈ closure {y}` and `y ∈ closure {x}`, see `inseparable_iff_mem_closure`; - `closure {x} = closure {y}`, see `inseparable_iff_closure_eq`. -/ def Inseparable (x y : X) : Prop := 𝓝 x = 𝓝 y #align inseparable Inseparable local infixl:0 " ~ᵢ " => Inseparable theorem inseparable_def : (x ~ᵢ y) ↔ 𝓝 x = 𝓝 y := Iff.rfl #align inseparable_def inseparable_def theorem inseparable_iff_specializes_and : (x ~ᵢ y) ↔ x ⤳ y ∧ y ⤳ x := le_antisymm_iff #align inseparable_iff_specializes_and inseparable_iff_specializes_and theorem Inseparable.specializes (h : x ~ᵢ y) : x ⤳ y := h.le #align inseparable.specializes Inseparable.specializes theorem Inseparable.specializes' (h : x ~ᵢ y) : y ⤳ x := h.ge #align inseparable.specializes' Inseparable.specializes' theorem Specializes.antisymm (h₁ : x ⤳ y) (h₂ : y ⤳ x) : x ~ᵢ y := le_antisymm h₁ h₂ #align specializes.antisymm Specializes.antisymm theorem inseparable_iff_forall_open : (x ~ᵢ y) ↔ ∀ s : Set X, IsOpen s → (x ∈ s ↔ y ∈ s) := by simp only [inseparable_iff_specializes_and, specializes_iff_forall_open, ← forall_and, ← iff_def, Iff.comm] #align inseparable_iff_forall_open inseparable_iff_forall_open theorem not_inseparable_iff_exists_open : ¬(x ~ᵢ y) ↔ ∃ s : Set X, IsOpen s ∧ Xor' (x ∈ s) (y ∈ s) := by simp [inseparable_iff_forall_open, ← xor_iff_not_iff] #align not_inseparable_iff_exists_open not_inseparable_iff_exists_open theorem inseparable_iff_forall_closed : (x ~ᵢ y) ↔ ∀ s : Set X, IsClosed s → (x ∈ s ↔ y ∈ s) := by simp only [inseparable_iff_specializes_and, specializes_iff_forall_closed, ← forall_and, ← iff_def] #align inseparable_iff_forall_closed inseparable_iff_forall_closed theorem inseparable_iff_mem_closure : (x ~ᵢ y) ↔ x ∈ closure ({y} : Set X) ∧ y ∈ closure ({x} : Set X) := inseparable_iff_specializes_and.trans <| by
simp only [specializes_iff_mem_closure, and_comm]
theorem inseparable_iff_mem_closure : (x ~ᵢ y) ↔ x ∈ closure ({y} : Set X) ∧ y ∈ closure ({x} : Set X) := inseparable_iff_specializes_and.trans <| by
Mathlib.Topology.Inseparable.314_0.2NeLzt0mQ64QlfB
theorem inseparable_iff_mem_closure : (x ~ᵢ y) ↔ x ∈ closure ({y} : Set X) ∧ y ∈ closure ({x} : Set X)
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x y z : X s : Set X f g : X → Y ⊢ (x ~ᵢ y) ↔ closure {x} = closure {y}
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext; simp [specializes_iff_pure, le_def] theorem specializes_iff_forall_open : x ⤳ y ↔ ∀ s : Set X, IsOpen s → y ∈ s → x ∈ s := (specializes_TFAE x y).out 0 2 #align specializes_iff_forall_open specializes_iff_forall_open theorem Specializes.mem_open (h : x ⤳ y) (hs : IsOpen s) (hy : y ∈ s) : x ∈ s := specializes_iff_forall_open.1 h s hs hy #align specializes.mem_open Specializes.mem_open theorem IsOpen.not_specializes (hs : IsOpen s) (hx : x ∉ s) (hy : y ∈ s) : ¬x ⤳ y := fun h => hx <| h.mem_open hs hy #align is_open.not_specializes IsOpen.not_specializes theorem specializes_iff_forall_closed : x ⤳ y ↔ ∀ s : Set X, IsClosed s → x ∈ s → y ∈ s := (specializes_TFAE x y).out 0 3 #align specializes_iff_forall_closed specializes_iff_forall_closed theorem Specializes.mem_closed (h : x ⤳ y) (hs : IsClosed s) (hx : x ∈ s) : y ∈ s := specializes_iff_forall_closed.1 h s hs hx #align specializes.mem_closed Specializes.mem_closed theorem IsClosed.not_specializes (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬x ⤳ y := fun h => hy <| h.mem_closed hs hx #align is_closed.not_specializes IsClosed.not_specializes theorem specializes_iff_mem_closure : x ⤳ y ↔ y ∈ closure ({x} : Set X) := (specializes_TFAE x y).out 0 4 #align specializes_iff_mem_closure specializes_iff_mem_closure alias ⟨Specializes.mem_closure, _⟩ := specializes_iff_mem_closure #align specializes.mem_closure Specializes.mem_closure theorem specializes_iff_closure_subset : x ⤳ y ↔ closure ({y} : Set X) ⊆ closure {x} := (specializes_TFAE x y).out 0 5 #align specializes_iff_closure_subset specializes_iff_closure_subset alias ⟨Specializes.closure_subset, _⟩ := specializes_iff_closure_subset #align specializes.closure_subset Specializes.closure_subset -- porting note: new lemma theorem specializes_iff_clusterPt : x ⤳ y ↔ ClusterPt y (pure x) := (specializes_TFAE x y).out 0 6 theorem Filter.HasBasis.specializes_iff {ι} {p : ι → Prop} {s : ι → Set X} (h : (𝓝 y).HasBasis p s) : x ⤳ y ↔ ∀ i, p i → x ∈ s i := specializes_iff_pure.trans h.ge_iff #align filter.has_basis.specializes_iff Filter.HasBasis.specializes_iff theorem specializes_rfl : x ⤳ x := le_rfl #align specializes_rfl specializes_rfl @[refl] theorem specializes_refl (x : X) : x ⤳ x := specializes_rfl #align specializes_refl specializes_refl @[trans] theorem Specializes.trans : x ⤳ y → y ⤳ z → x ⤳ z := le_trans #align specializes.trans Specializes.trans theorem specializes_of_eq (e : x = y) : x ⤳ y := e ▸ specializes_refl x #align specializes_of_eq specializes_of_eq theorem specializes_of_nhdsWithin (h₁ : 𝓝[s] x ≤ 𝓝[s] y) (h₂ : x ∈ s) : x ⤳ y := specializes_iff_pure.2 <| calc pure x ≤ 𝓝[s] x := le_inf (pure_le_nhds _) (le_principal_iff.2 h₂) _ ≤ 𝓝[s] y := h₁ _ ≤ 𝓝 y := inf_le_left #align specializes_of_nhds_within specializes_of_nhdsWithin theorem Specializes.map_of_continuousAt (h : x ⤳ y) (hy : ContinuousAt f y) : f x ⤳ f y := specializes_iff_pure.2 fun _s hs => mem_pure.2 <| mem_preimage.1 <| mem_of_mem_nhds <| hy.mono_left h hs #align specializes.map_of_continuous_at Specializes.map_of_continuousAt theorem Specializes.map (h : x ⤳ y) (hf : Continuous f) : f x ⤳ f y := h.map_of_continuousAt hf.rst.imntinuousAt #align specializes.map Specializes.map theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y := by simp only [specializes_iff_mem_closure, hf.closure_eq_preimage_closure_image, image_singleton, mem_preimage] #align inducing.specializes_iff Inducing.specializes_iff theorem subtype_specializes_iff {p : X → Prop} (x y : Subtype p) : x ⤳ y ↔ (x : X) ⤳ y := inducing_subtype_val.specializes_iff.symm #align subtype_specializes_iff subtype_specializes_iff @[simp] theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂ := by simp only [Specializes, nhds_prod_eq, prod_le_prod] #align specializes_prod specializes_prod theorem Specializes.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ⤳ x₂) (hy : y₁ ⤳ y₂) : (x₁, y₁) ⤳ (x₂, y₂) := specializes_prod.2 ⟨hx, hy⟩ #align specializes.prod Specializes.prod @[simp] theorem specializes_pi {f g : ∀ i, π i} : f ⤳ g ↔ ∀ i, f i ⤳ g i := by simp only [Specializes, nhds_pi, pi_le_pi] #align specializes_pi specializes_pi theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S := by rw [specializes_iff_forall_open] push_neg rfl #align not_specializes_iff_exists_open not_specializes_iff_exists_open theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S := by rw [specializes_iff_forall_closed] push_neg rfl #align not_specializes_iff_exists_closed not_specializes_iff_exists_closed theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) : Continuous (s.piecewise f g) := by have : ∀ U, IsOpen U → g ⁻¹' U ⊆ f ⁻¹' U := fun U hU x hx ↦ (hspec x).mem_open hU hx rw [continuous_def] intro U hU rw [piecewise_preimage, ite_eq_of_subset_right _ (this U hU)] exact hU.preimage hf |>.inter hs |>.union (hU.preimage hg) theorem IsClosed.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsClosed s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, g x ⤳ f x) : Continuous (s.piecewise f g) := by simpa only [piecewise_compl] using hs.isOpen_compl.continuous_piecewise_of_specializes hg hf hspec variable (X) /-- Specialization forms a preorder on the topological space. -/ def specializationPreorder : Preorder X := { Preorder.lift (OrderDual.toDual ∘ 𝓝) with le := fun x y => y ⤳ x lt := fun x y => y ⤳ x ∧ ¬x ⤳ y } #align specialization_preorder specializationPreorder variable {X} /-- A continuous function is monotone with respect to the specialization preorders on the domain and the codomain. -/ theorem Continuous.specialization_monotone (hf : Continuous f) : @Monotone _ _ (specializationPreorder X) (specializationPreorder Y) f := fun _ _ h => h.map hf #align continuous.specialization_monotone Continuous.specialization_monotone /-! ### `Inseparable` relation -/ /-- Two points `x` and `y` in a topological space are `Inseparable` if any of the following equivalent properties hold: - `𝓝 x = 𝓝 y`; we use this property as the definition; - for any open set `s`, `x ∈ s ↔ y ∈ s`, see `inseparable_iff_open`; - for any closed set `s`, `x ∈ s ↔ y ∈ s`, see `inseparable_iff_closed`; - `x ∈ closure {y}` and `y ∈ closure {x}`, see `inseparable_iff_mem_closure`; - `closure {x} = closure {y}`, see `inseparable_iff_closure_eq`. -/ def Inseparable (x y : X) : Prop := 𝓝 x = 𝓝 y #align inseparable Inseparable local infixl:0 " ~ᵢ " => Inseparable theorem inseparable_def : (x ~ᵢ y) ↔ 𝓝 x = 𝓝 y := Iff.rfl #align inseparable_def inseparable_def theorem inseparable_iff_specializes_and : (x ~ᵢ y) ↔ x ⤳ y ∧ y ⤳ x := le_antisymm_iff #align inseparable_iff_specializes_and inseparable_iff_specializes_and theorem Inseparable.specializes (h : x ~ᵢ y) : x ⤳ y := h.le #align inseparable.specializes Inseparable.specializes theorem Inseparable.specializes' (h : x ~ᵢ y) : y ⤳ x := h.ge #align inseparable.specializes' Inseparable.specializes' theorem Specializes.antisymm (h₁ : x ⤳ y) (h₂ : y ⤳ x) : x ~ᵢ y := le_antisymm h₁ h₂ #align specializes.antisymm Specializes.antisymm theorem inseparable_iff_forall_open : (x ~ᵢ y) ↔ ∀ s : Set X, IsOpen s → (x ∈ s ↔ y ∈ s) := by simp only [inseparable_iff_specializes_and, specializes_iff_forall_open, ← forall_and, ← iff_def, Iff.comm] #align inseparable_iff_forall_open inseparable_iff_forall_open theorem not_inseparable_iff_exists_open : ¬(x ~ᵢ y) ↔ ∃ s : Set X, IsOpen s ∧ Xor' (x ∈ s) (y ∈ s) := by simp [inseparable_iff_forall_open, ← xor_iff_not_iff] #align not_inseparable_iff_exists_open not_inseparable_iff_exists_open theorem inseparable_iff_forall_closed : (x ~ᵢ y) ↔ ∀ s : Set X, IsClosed s → (x ∈ s ↔ y ∈ s) := by simp only [inseparable_iff_specializes_and, specializes_iff_forall_closed, ← forall_and, ← iff_def] #align inseparable_iff_forall_closed inseparable_iff_forall_closed theorem inseparable_iff_mem_closure : (x ~ᵢ y) ↔ x ∈ closure ({y} : Set X) ∧ y ∈ closure ({x} : Set X) := inseparable_iff_specializes_and.trans <| by simp only [specializes_iff_mem_closure, and_comm] #align inseparable_iff_mem_closure inseparable_iff_mem_closure theorem inseparable_iff_closure_eq : (x ~ᵢ y) ↔ closure ({x} : Set X) = closure {y} := by
simp only [inseparable_iff_specializes_and, specializes_iff_closure_subset, ← subset_antisymm_iff, eq_comm]
theorem inseparable_iff_closure_eq : (x ~ᵢ y) ↔ closure ({x} : Set X) = closure {y} := by
Mathlib.Topology.Inseparable.319_0.2NeLzt0mQ64QlfB
theorem inseparable_iff_closure_eq : (x ~ᵢ y) ↔ closure ({x} : Set X) = closure {y}
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x y z : X s : Set X f g : X → Y hf : Inducing f ⊢ (f x ~ᵢ f y) ↔ (x ~ᵢ y)
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext; simp [specializes_iff_pure, le_def] theorem specializes_iff_forall_open : x ⤳ y ↔ ∀ s : Set X, IsOpen s → y ∈ s → x ∈ s := (specializes_TFAE x y).out 0 2 #align specializes_iff_forall_open specializes_iff_forall_open theorem Specializes.mem_open (h : x ⤳ y) (hs : IsOpen s) (hy : y ∈ s) : x ∈ s := specializes_iff_forall_open.1 h s hs hy #align specializes.mem_open Specializes.mem_open theorem IsOpen.not_specializes (hs : IsOpen s) (hx : x ∉ s) (hy : y ∈ s) : ¬x ⤳ y := fun h => hx <| h.mem_open hs hy #align is_open.not_specializes IsOpen.not_specializes theorem specializes_iff_forall_closed : x ⤳ y ↔ ∀ s : Set X, IsClosed s → x ∈ s → y ∈ s := (specializes_TFAE x y).out 0 3 #align specializes_iff_forall_closed specializes_iff_forall_closed theorem Specializes.mem_closed (h : x ⤳ y) (hs : IsClosed s) (hx : x ∈ s) : y ∈ s := specializes_iff_forall_closed.1 h s hs hx #align specializes.mem_closed Specializes.mem_closed theorem IsClosed.not_specializes (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬x ⤳ y := fun h => hy <| h.mem_closed hs hx #align is_closed.not_specializes IsClosed.not_specializes theorem specializes_iff_mem_closure : x ⤳ y ↔ y ∈ closure ({x} : Set X) := (specializes_TFAE x y).out 0 4 #align specializes_iff_mem_closure specializes_iff_mem_closure alias ⟨Specializes.mem_closure, _⟩ := specializes_iff_mem_closure #align specializes.mem_closure Specializes.mem_closure theorem specializes_iff_closure_subset : x ⤳ y ↔ closure ({y} : Set X) ⊆ closure {x} := (specializes_TFAE x y).out 0 5 #align specializes_iff_closure_subset specializes_iff_closure_subset alias ⟨Specializes.closure_subset, _⟩ := specializes_iff_closure_subset #align specializes.closure_subset Specializes.closure_subset -- porting note: new lemma theorem specializes_iff_clusterPt : x ⤳ y ↔ ClusterPt y (pure x) := (specializes_TFAE x y).out 0 6 theorem Filter.HasBasis.specializes_iff {ι} {p : ι → Prop} {s : ι → Set X} (h : (𝓝 y).HasBasis p s) : x ⤳ y ↔ ∀ i, p i → x ∈ s i := specializes_iff_pure.trans h.ge_iff #align filter.has_basis.specializes_iff Filter.HasBasis.specializes_iff theorem specializes_rfl : x ⤳ x := le_rfl #align specializes_rfl specializes_rfl @[refl] theorem specializes_refl (x : X) : x ⤳ x := specializes_rfl #align specializes_refl specializes_refl @[trans] theorem Specializes.trans : x ⤳ y → y ⤳ z → x ⤳ z := le_trans #align specializes.trans Specializes.trans theorem specializes_of_eq (e : x = y) : x ⤳ y := e ▸ specializes_refl x #align specializes_of_eq specializes_of_eq theorem specializes_of_nhdsWithin (h₁ : 𝓝[s] x ≤ 𝓝[s] y) (h₂ : x ∈ s) : x ⤳ y := specializes_iff_pure.2 <| calc pure x ≤ 𝓝[s] x := le_inf (pure_le_nhds _) (le_principal_iff.2 h₂) _ ≤ 𝓝[s] y := h₁ _ ≤ 𝓝 y := inf_le_left #align specializes_of_nhds_within specializes_of_nhdsWithin theorem Specializes.map_of_continuousAt (h : x ⤳ y) (hy : ContinuousAt f y) : f x ⤳ f y := specializes_iff_pure.2 fun _s hs => mem_pure.2 <| mem_preimage.1 <| mem_of_mem_nhds <| hy.mono_left h hs #align specializes.map_of_continuous_at Specializes.map_of_continuousAt theorem Specializes.map (h : x ⤳ y) (hf : Continuous f) : f x ⤳ f y := h.map_of_continuousAt hf.rst.imntinuousAt #align specializes.map Specializes.map theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y := by simp only [specializes_iff_mem_closure, hf.closure_eq_preimage_closure_image, image_singleton, mem_preimage] #align inducing.specializes_iff Inducing.specializes_iff theorem subtype_specializes_iff {p : X → Prop} (x y : Subtype p) : x ⤳ y ↔ (x : X) ⤳ y := inducing_subtype_val.specializes_iff.symm #align subtype_specializes_iff subtype_specializes_iff @[simp] theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂ := by simp only [Specializes, nhds_prod_eq, prod_le_prod] #align specializes_prod specializes_prod theorem Specializes.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ⤳ x₂) (hy : y₁ ⤳ y₂) : (x₁, y₁) ⤳ (x₂, y₂) := specializes_prod.2 ⟨hx, hy⟩ #align specializes.prod Specializes.prod @[simp] theorem specializes_pi {f g : ∀ i, π i} : f ⤳ g ↔ ∀ i, f i ⤳ g i := by simp only [Specializes, nhds_pi, pi_le_pi] #align specializes_pi specializes_pi theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S := by rw [specializes_iff_forall_open] push_neg rfl #align not_specializes_iff_exists_open not_specializes_iff_exists_open theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S := by rw [specializes_iff_forall_closed] push_neg rfl #align not_specializes_iff_exists_closed not_specializes_iff_exists_closed theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) : Continuous (s.piecewise f g) := by have : ∀ U, IsOpen U → g ⁻¹' U ⊆ f ⁻¹' U := fun U hU x hx ↦ (hspec x).mem_open hU hx rw [continuous_def] intro U hU rw [piecewise_preimage, ite_eq_of_subset_right _ (this U hU)] exact hU.preimage hf |>.inter hs |>.union (hU.preimage hg) theorem IsClosed.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsClosed s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, g x ⤳ f x) : Continuous (s.piecewise f g) := by simpa only [piecewise_compl] using hs.isOpen_compl.continuous_piecewise_of_specializes hg hf hspec variable (X) /-- Specialization forms a preorder on the topological space. -/ def specializationPreorder : Preorder X := { Preorder.lift (OrderDual.toDual ∘ 𝓝) with le := fun x y => y ⤳ x lt := fun x y => y ⤳ x ∧ ¬x ⤳ y } #align specialization_preorder specializationPreorder variable {X} /-- A continuous function is monotone with respect to the specialization preorders on the domain and the codomain. -/ theorem Continuous.specialization_monotone (hf : Continuous f) : @Monotone _ _ (specializationPreorder X) (specializationPreorder Y) f := fun _ _ h => h.map hf #align continuous.specialization_monotone Continuous.specialization_monotone /-! ### `Inseparable` relation -/ /-- Two points `x` and `y` in a topological space are `Inseparable` if any of the following equivalent properties hold: - `𝓝 x = 𝓝 y`; we use this property as the definition; - for any open set `s`, `x ∈ s ↔ y ∈ s`, see `inseparable_iff_open`; - for any closed set `s`, `x ∈ s ↔ y ∈ s`, see `inseparable_iff_closed`; - `x ∈ closure {y}` and `y ∈ closure {x}`, see `inseparable_iff_mem_closure`; - `closure {x} = closure {y}`, see `inseparable_iff_closure_eq`. -/ def Inseparable (x y : X) : Prop := 𝓝 x = 𝓝 y #align inseparable Inseparable local infixl:0 " ~ᵢ " => Inseparable theorem inseparable_def : (x ~ᵢ y) ↔ 𝓝 x = 𝓝 y := Iff.rfl #align inseparable_def inseparable_def theorem inseparable_iff_specializes_and : (x ~ᵢ y) ↔ x ⤳ y ∧ y ⤳ x := le_antisymm_iff #align inseparable_iff_specializes_and inseparable_iff_specializes_and theorem Inseparable.specializes (h : x ~ᵢ y) : x ⤳ y := h.le #align inseparable.specializes Inseparable.specializes theorem Inseparable.specializes' (h : x ~ᵢ y) : y ⤳ x := h.ge #align inseparable.specializes' Inseparable.specializes' theorem Specializes.antisymm (h₁ : x ⤳ y) (h₂ : y ⤳ x) : x ~ᵢ y := le_antisymm h₁ h₂ #align specializes.antisymm Specializes.antisymm theorem inseparable_iff_forall_open : (x ~ᵢ y) ↔ ∀ s : Set X, IsOpen s → (x ∈ s ↔ y ∈ s) := by simp only [inseparable_iff_specializes_and, specializes_iff_forall_open, ← forall_and, ← iff_def, Iff.comm] #align inseparable_iff_forall_open inseparable_iff_forall_open theorem not_inseparable_iff_exists_open : ¬(x ~ᵢ y) ↔ ∃ s : Set X, IsOpen s ∧ Xor' (x ∈ s) (y ∈ s) := by simp [inseparable_iff_forall_open, ← xor_iff_not_iff] #align not_inseparable_iff_exists_open not_inseparable_iff_exists_open theorem inseparable_iff_forall_closed : (x ~ᵢ y) ↔ ∀ s : Set X, IsClosed s → (x ∈ s ↔ y ∈ s) := by simp only [inseparable_iff_specializes_and, specializes_iff_forall_closed, ← forall_and, ← iff_def] #align inseparable_iff_forall_closed inseparable_iff_forall_closed theorem inseparable_iff_mem_closure : (x ~ᵢ y) ↔ x ∈ closure ({y} : Set X) ∧ y ∈ closure ({x} : Set X) := inseparable_iff_specializes_and.trans <| by simp only [specializes_iff_mem_closure, and_comm] #align inseparable_iff_mem_closure inseparable_iff_mem_closure theorem inseparable_iff_closure_eq : (x ~ᵢ y) ↔ closure ({x} : Set X) = closure {y} := by simp only [inseparable_iff_specializes_and, specializes_iff_closure_subset, ← subset_antisymm_iff, eq_comm] #align inseparable_iff_closure_eq inseparable_iff_closure_eq theorem inseparable_of_nhdsWithin_eq (hx : x ∈ s) (hy : y ∈ s) (h : 𝓝[s] x = 𝓝[s] y) : x ~ᵢ y := (specializes_of_nhdsWithin h.le hx).antisymm (specializes_of_nhdsWithin h.ge hy) #align inseparable_of_nhds_within_eq inseparable_of_nhdsWithin_eq theorem Inducing.inseparable_iff (hf : Inducing f) : (f x ~ᵢ f y) ↔ (x ~ᵢ y) := by
simp only [inseparable_iff_specializes_and, hf.specializes_iff]
theorem Inducing.inseparable_iff (hf : Inducing f) : (f x ~ᵢ f y) ↔ (x ~ᵢ y) := by
Mathlib.Topology.Inseparable.328_0.2NeLzt0mQ64QlfB
theorem Inducing.inseparable_iff (hf : Inducing f) : (f x ~ᵢ f y) ↔ (x ~ᵢ y)
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x y z : X s : Set X f g : X → Y x₁ x₂ : X y₁ y₂ : Y ⊢ ((x₁, y₁) ~ᵢ (x₂, y₂)) ↔ (x₁ ~ᵢ x₂) ∧ (y₁ ~ᵢ y₂)
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext; simp [specializes_iff_pure, le_def] theorem specializes_iff_forall_open : x ⤳ y ↔ ∀ s : Set X, IsOpen s → y ∈ s → x ∈ s := (specializes_TFAE x y).out 0 2 #align specializes_iff_forall_open specializes_iff_forall_open theorem Specializes.mem_open (h : x ⤳ y) (hs : IsOpen s) (hy : y ∈ s) : x ∈ s := specializes_iff_forall_open.1 h s hs hy #align specializes.mem_open Specializes.mem_open theorem IsOpen.not_specializes (hs : IsOpen s) (hx : x ∉ s) (hy : y ∈ s) : ¬x ⤳ y := fun h => hx <| h.mem_open hs hy #align is_open.not_specializes IsOpen.not_specializes theorem specializes_iff_forall_closed : x ⤳ y ↔ ∀ s : Set X, IsClosed s → x ∈ s → y ∈ s := (specializes_TFAE x y).out 0 3 #align specializes_iff_forall_closed specializes_iff_forall_closed theorem Specializes.mem_closed (h : x ⤳ y) (hs : IsClosed s) (hx : x ∈ s) : y ∈ s := specializes_iff_forall_closed.1 h s hs hx #align specializes.mem_closed Specializes.mem_closed theorem IsClosed.not_specializes (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬x ⤳ y := fun h => hy <| h.mem_closed hs hx #align is_closed.not_specializes IsClosed.not_specializes theorem specializes_iff_mem_closure : x ⤳ y ↔ y ∈ closure ({x} : Set X) := (specializes_TFAE x y).out 0 4 #align specializes_iff_mem_closure specializes_iff_mem_closure alias ⟨Specializes.mem_closure, _⟩ := specializes_iff_mem_closure #align specializes.mem_closure Specializes.mem_closure theorem specializes_iff_closure_subset : x ⤳ y ↔ closure ({y} : Set X) ⊆ closure {x} := (specializes_TFAE x y).out 0 5 #align specializes_iff_closure_subset specializes_iff_closure_subset alias ⟨Specializes.closure_subset, _⟩ := specializes_iff_closure_subset #align specializes.closure_subset Specializes.closure_subset -- porting note: new lemma theorem specializes_iff_clusterPt : x ⤳ y ↔ ClusterPt y (pure x) := (specializes_TFAE x y).out 0 6 theorem Filter.HasBasis.specializes_iff {ι} {p : ι → Prop} {s : ι → Set X} (h : (𝓝 y).HasBasis p s) : x ⤳ y ↔ ∀ i, p i → x ∈ s i := specializes_iff_pure.trans h.ge_iff #align filter.has_basis.specializes_iff Filter.HasBasis.specializes_iff theorem specializes_rfl : x ⤳ x := le_rfl #align specializes_rfl specializes_rfl @[refl] theorem specializes_refl (x : X) : x ⤳ x := specializes_rfl #align specializes_refl specializes_refl @[trans] theorem Specializes.trans : x ⤳ y → y ⤳ z → x ⤳ z := le_trans #align specializes.trans Specializes.trans theorem specializes_of_eq (e : x = y) : x ⤳ y := e ▸ specializes_refl x #align specializes_of_eq specializes_of_eq theorem specializes_of_nhdsWithin (h₁ : 𝓝[s] x ≤ 𝓝[s] y) (h₂ : x ∈ s) : x ⤳ y := specializes_iff_pure.2 <| calc pure x ≤ 𝓝[s] x := le_inf (pure_le_nhds _) (le_principal_iff.2 h₂) _ ≤ 𝓝[s] y := h₁ _ ≤ 𝓝 y := inf_le_left #align specializes_of_nhds_within specializes_of_nhdsWithin theorem Specializes.map_of_continuousAt (h : x ⤳ y) (hy : ContinuousAt f y) : f x ⤳ f y := specializes_iff_pure.2 fun _s hs => mem_pure.2 <| mem_preimage.1 <| mem_of_mem_nhds <| hy.mono_left h hs #align specializes.map_of_continuous_at Specializes.map_of_continuousAt theorem Specializes.map (h : x ⤳ y) (hf : Continuous f) : f x ⤳ f y := h.map_of_continuousAt hf.rst.imntinuousAt #align specializes.map Specializes.map theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y := by simp only [specializes_iff_mem_closure, hf.closure_eq_preimage_closure_image, image_singleton, mem_preimage] #align inducing.specializes_iff Inducing.specializes_iff theorem subtype_specializes_iff {p : X → Prop} (x y : Subtype p) : x ⤳ y ↔ (x : X) ⤳ y := inducing_subtype_val.specializes_iff.symm #align subtype_specializes_iff subtype_specializes_iff @[simp] theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂ := by simp only [Specializes, nhds_prod_eq, prod_le_prod] #align specializes_prod specializes_prod theorem Specializes.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ⤳ x₂) (hy : y₁ ⤳ y₂) : (x₁, y₁) ⤳ (x₂, y₂) := specializes_prod.2 ⟨hx, hy⟩ #align specializes.prod Specializes.prod @[simp] theorem specializes_pi {f g : ∀ i, π i} : f ⤳ g ↔ ∀ i, f i ⤳ g i := by simp only [Specializes, nhds_pi, pi_le_pi] #align specializes_pi specializes_pi theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S := by rw [specializes_iff_forall_open] push_neg rfl #align not_specializes_iff_exists_open not_specializes_iff_exists_open theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S := by rw [specializes_iff_forall_closed] push_neg rfl #align not_specializes_iff_exists_closed not_specializes_iff_exists_closed theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) : Continuous (s.piecewise f g) := by have : ∀ U, IsOpen U → g ⁻¹' U ⊆ f ⁻¹' U := fun U hU x hx ↦ (hspec x).mem_open hU hx rw [continuous_def] intro U hU rw [piecewise_preimage, ite_eq_of_subset_right _ (this U hU)] exact hU.preimage hf |>.inter hs |>.union (hU.preimage hg) theorem IsClosed.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsClosed s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, g x ⤳ f x) : Continuous (s.piecewise f g) := by simpa only [piecewise_compl] using hs.isOpen_compl.continuous_piecewise_of_specializes hg hf hspec variable (X) /-- Specialization forms a preorder on the topological space. -/ def specializationPreorder : Preorder X := { Preorder.lift (OrderDual.toDual ∘ 𝓝) with le := fun x y => y ⤳ x lt := fun x y => y ⤳ x ∧ ¬x ⤳ y } #align specialization_preorder specializationPreorder variable {X} /-- A continuous function is monotone with respect to the specialization preorders on the domain and the codomain. -/ theorem Continuous.specialization_monotone (hf : Continuous f) : @Monotone _ _ (specializationPreorder X) (specializationPreorder Y) f := fun _ _ h => h.map hf #align continuous.specialization_monotone Continuous.specialization_monotone /-! ### `Inseparable` relation -/ /-- Two points `x` and `y` in a topological space are `Inseparable` if any of the following equivalent properties hold: - `𝓝 x = 𝓝 y`; we use this property as the definition; - for any open set `s`, `x ∈ s ↔ y ∈ s`, see `inseparable_iff_open`; - for any closed set `s`, `x ∈ s ↔ y ∈ s`, see `inseparable_iff_closed`; - `x ∈ closure {y}` and `y ∈ closure {x}`, see `inseparable_iff_mem_closure`; - `closure {x} = closure {y}`, see `inseparable_iff_closure_eq`. -/ def Inseparable (x y : X) : Prop := 𝓝 x = 𝓝 y #align inseparable Inseparable local infixl:0 " ~ᵢ " => Inseparable theorem inseparable_def : (x ~ᵢ y) ↔ 𝓝 x = 𝓝 y := Iff.rfl #align inseparable_def inseparable_def theorem inseparable_iff_specializes_and : (x ~ᵢ y) ↔ x ⤳ y ∧ y ⤳ x := le_antisymm_iff #align inseparable_iff_specializes_and inseparable_iff_specializes_and theorem Inseparable.specializes (h : x ~ᵢ y) : x ⤳ y := h.le #align inseparable.specializes Inseparable.specializes theorem Inseparable.specializes' (h : x ~ᵢ y) : y ⤳ x := h.ge #align inseparable.specializes' Inseparable.specializes' theorem Specializes.antisymm (h₁ : x ⤳ y) (h₂ : y ⤳ x) : x ~ᵢ y := le_antisymm h₁ h₂ #align specializes.antisymm Specializes.antisymm theorem inseparable_iff_forall_open : (x ~ᵢ y) ↔ ∀ s : Set X, IsOpen s → (x ∈ s ↔ y ∈ s) := by simp only [inseparable_iff_specializes_and, specializes_iff_forall_open, ← forall_and, ← iff_def, Iff.comm] #align inseparable_iff_forall_open inseparable_iff_forall_open theorem not_inseparable_iff_exists_open : ¬(x ~ᵢ y) ↔ ∃ s : Set X, IsOpen s ∧ Xor' (x ∈ s) (y ∈ s) := by simp [inseparable_iff_forall_open, ← xor_iff_not_iff] #align not_inseparable_iff_exists_open not_inseparable_iff_exists_open theorem inseparable_iff_forall_closed : (x ~ᵢ y) ↔ ∀ s : Set X, IsClosed s → (x ∈ s ↔ y ∈ s) := by simp only [inseparable_iff_specializes_and, specializes_iff_forall_closed, ← forall_and, ← iff_def] #align inseparable_iff_forall_closed inseparable_iff_forall_closed theorem inseparable_iff_mem_closure : (x ~ᵢ y) ↔ x ∈ closure ({y} : Set X) ∧ y ∈ closure ({x} : Set X) := inseparable_iff_specializes_and.trans <| by simp only [specializes_iff_mem_closure, and_comm] #align inseparable_iff_mem_closure inseparable_iff_mem_closure theorem inseparable_iff_closure_eq : (x ~ᵢ y) ↔ closure ({x} : Set X) = closure {y} := by simp only [inseparable_iff_specializes_and, specializes_iff_closure_subset, ← subset_antisymm_iff, eq_comm] #align inseparable_iff_closure_eq inseparable_iff_closure_eq theorem inseparable_of_nhdsWithin_eq (hx : x ∈ s) (hy : y ∈ s) (h : 𝓝[s] x = 𝓝[s] y) : x ~ᵢ y := (specializes_of_nhdsWithin h.le hx).antisymm (specializes_of_nhdsWithin h.ge hy) #align inseparable_of_nhds_within_eq inseparable_of_nhdsWithin_eq theorem Inducing.inseparable_iff (hf : Inducing f) : (f x ~ᵢ f y) ↔ (x ~ᵢ y) := by simp only [inseparable_iff_specializes_and, hf.specializes_iff] #align inducing.inseparable_iff Inducing.inseparable_iff theorem subtype_inseparable_iff {p : X → Prop} (x y : Subtype p) : (x ~ᵢ y) ↔ ((x : X) ~ᵢ y) := inducing_subtype_val.inseparable_iff.symm #align subtype_inseparable_iff subtype_inseparable_iff @[simp] theorem inseparable_prod {x₁ x₂ : X} {y₁ y₂ : Y} : ((x₁, y₁) ~ᵢ (x₂, y₂)) ↔ (x₁ ~ᵢ x₂) ∧ (y₁ ~ᵢ y₂) := by
simp only [Inseparable, nhds_prod_eq, prod_inj]
@[simp] theorem inseparable_prod {x₁ x₂ : X} {y₁ y₂ : Y} : ((x₁, y₁) ~ᵢ (x₂, y₂)) ↔ (x₁ ~ᵢ x₂) ∧ (y₁ ~ᵢ y₂) := by
Mathlib.Topology.Inseparable.336_0.2NeLzt0mQ64QlfB
@[simp] theorem inseparable_prod {x₁ x₂ : X} {y₁ y₂ : Y} : ((x₁, y₁) ~ᵢ (x₂, y₂)) ↔ (x₁ ~ᵢ x₂) ∧ (y₁ ~ᵢ y₂)
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x y z : X s : Set X f✝ g✝ : X → Y f g : (i : ι) → π i ⊢ (f ~ᵢ g) ↔ ∀ (i : ι), f i ~ᵢ g i
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext; simp [specializes_iff_pure, le_def] theorem specializes_iff_forall_open : x ⤳ y ↔ ∀ s : Set X, IsOpen s → y ∈ s → x ∈ s := (specializes_TFAE x y).out 0 2 #align specializes_iff_forall_open specializes_iff_forall_open theorem Specializes.mem_open (h : x ⤳ y) (hs : IsOpen s) (hy : y ∈ s) : x ∈ s := specializes_iff_forall_open.1 h s hs hy #align specializes.mem_open Specializes.mem_open theorem IsOpen.not_specializes (hs : IsOpen s) (hx : x ∉ s) (hy : y ∈ s) : ¬x ⤳ y := fun h => hx <| h.mem_open hs hy #align is_open.not_specializes IsOpen.not_specializes theorem specializes_iff_forall_closed : x ⤳ y ↔ ∀ s : Set X, IsClosed s → x ∈ s → y ∈ s := (specializes_TFAE x y).out 0 3 #align specializes_iff_forall_closed specializes_iff_forall_closed theorem Specializes.mem_closed (h : x ⤳ y) (hs : IsClosed s) (hx : x ∈ s) : y ∈ s := specializes_iff_forall_closed.1 h s hs hx #align specializes.mem_closed Specializes.mem_closed theorem IsClosed.not_specializes (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬x ⤳ y := fun h => hy <| h.mem_closed hs hx #align is_closed.not_specializes IsClosed.not_specializes theorem specializes_iff_mem_closure : x ⤳ y ↔ y ∈ closure ({x} : Set X) := (specializes_TFAE x y).out 0 4 #align specializes_iff_mem_closure specializes_iff_mem_closure alias ⟨Specializes.mem_closure, _⟩ := specializes_iff_mem_closure #align specializes.mem_closure Specializes.mem_closure theorem specializes_iff_closure_subset : x ⤳ y ↔ closure ({y} : Set X) ⊆ closure {x} := (specializes_TFAE x y).out 0 5 #align specializes_iff_closure_subset specializes_iff_closure_subset alias ⟨Specializes.closure_subset, _⟩ := specializes_iff_closure_subset #align specializes.closure_subset Specializes.closure_subset -- porting note: new lemma theorem specializes_iff_clusterPt : x ⤳ y ↔ ClusterPt y (pure x) := (specializes_TFAE x y).out 0 6 theorem Filter.HasBasis.specializes_iff {ι} {p : ι → Prop} {s : ι → Set X} (h : (𝓝 y).HasBasis p s) : x ⤳ y ↔ ∀ i, p i → x ∈ s i := specializes_iff_pure.trans h.ge_iff #align filter.has_basis.specializes_iff Filter.HasBasis.specializes_iff theorem specializes_rfl : x ⤳ x := le_rfl #align specializes_rfl specializes_rfl @[refl] theorem specializes_refl (x : X) : x ⤳ x := specializes_rfl #align specializes_refl specializes_refl @[trans] theorem Specializes.trans : x ⤳ y → y ⤳ z → x ⤳ z := le_trans #align specializes.trans Specializes.trans theorem specializes_of_eq (e : x = y) : x ⤳ y := e ▸ specializes_refl x #align specializes_of_eq specializes_of_eq theorem specializes_of_nhdsWithin (h₁ : 𝓝[s] x ≤ 𝓝[s] y) (h₂ : x ∈ s) : x ⤳ y := specializes_iff_pure.2 <| calc pure x ≤ 𝓝[s] x := le_inf (pure_le_nhds _) (le_principal_iff.2 h₂) _ ≤ 𝓝[s] y := h₁ _ ≤ 𝓝 y := inf_le_left #align specializes_of_nhds_within specializes_of_nhdsWithin theorem Specializes.map_of_continuousAt (h : x ⤳ y) (hy : ContinuousAt f y) : f x ⤳ f y := specializes_iff_pure.2 fun _s hs => mem_pure.2 <| mem_preimage.1 <| mem_of_mem_nhds <| hy.mono_left h hs #align specializes.map_of_continuous_at Specializes.map_of_continuousAt theorem Specializes.map (h : x ⤳ y) (hf : Continuous f) : f x ⤳ f y := h.map_of_continuousAt hf.rst.imntinuousAt #align specializes.map Specializes.map theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y := by simp only [specializes_iff_mem_closure, hf.closure_eq_preimage_closure_image, image_singleton, mem_preimage] #align inducing.specializes_iff Inducing.specializes_iff theorem subtype_specializes_iff {p : X → Prop} (x y : Subtype p) : x ⤳ y ↔ (x : X) ⤳ y := inducing_subtype_val.specializes_iff.symm #align subtype_specializes_iff subtype_specializes_iff @[simp] theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂ := by simp only [Specializes, nhds_prod_eq, prod_le_prod] #align specializes_prod specializes_prod theorem Specializes.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ⤳ x₂) (hy : y₁ ⤳ y₂) : (x₁, y₁) ⤳ (x₂, y₂) := specializes_prod.2 ⟨hx, hy⟩ #align specializes.prod Specializes.prod @[simp] theorem specializes_pi {f g : ∀ i, π i} : f ⤳ g ↔ ∀ i, f i ⤳ g i := by simp only [Specializes, nhds_pi, pi_le_pi] #align specializes_pi specializes_pi theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S := by rw [specializes_iff_forall_open] push_neg rfl #align not_specializes_iff_exists_open not_specializes_iff_exists_open theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S := by rw [specializes_iff_forall_closed] push_neg rfl #align not_specializes_iff_exists_closed not_specializes_iff_exists_closed theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) : Continuous (s.piecewise f g) := by have : ∀ U, IsOpen U → g ⁻¹' U ⊆ f ⁻¹' U := fun U hU x hx ↦ (hspec x).mem_open hU hx rw [continuous_def] intro U hU rw [piecewise_preimage, ite_eq_of_subset_right _ (this U hU)] exact hU.preimage hf |>.inter hs |>.union (hU.preimage hg) theorem IsClosed.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsClosed s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, g x ⤳ f x) : Continuous (s.piecewise f g) := by simpa only [piecewise_compl] using hs.isOpen_compl.continuous_piecewise_of_specializes hg hf hspec variable (X) /-- Specialization forms a preorder on the topological space. -/ def specializationPreorder : Preorder X := { Preorder.lift (OrderDual.toDual ∘ 𝓝) with le := fun x y => y ⤳ x lt := fun x y => y ⤳ x ∧ ¬x ⤳ y } #align specialization_preorder specializationPreorder variable {X} /-- A continuous function is monotone with respect to the specialization preorders on the domain and the codomain. -/ theorem Continuous.specialization_monotone (hf : Continuous f) : @Monotone _ _ (specializationPreorder X) (specializationPreorder Y) f := fun _ _ h => h.map hf #align continuous.specialization_monotone Continuous.specialization_monotone /-! ### `Inseparable` relation -/ /-- Two points `x` and `y` in a topological space are `Inseparable` if any of the following equivalent properties hold: - `𝓝 x = 𝓝 y`; we use this property as the definition; - for any open set `s`, `x ∈ s ↔ y ∈ s`, see `inseparable_iff_open`; - for any closed set `s`, `x ∈ s ↔ y ∈ s`, see `inseparable_iff_closed`; - `x ∈ closure {y}` and `y ∈ closure {x}`, see `inseparable_iff_mem_closure`; - `closure {x} = closure {y}`, see `inseparable_iff_closure_eq`. -/ def Inseparable (x y : X) : Prop := 𝓝 x = 𝓝 y #align inseparable Inseparable local infixl:0 " ~ᵢ " => Inseparable theorem inseparable_def : (x ~ᵢ y) ↔ 𝓝 x = 𝓝 y := Iff.rfl #align inseparable_def inseparable_def theorem inseparable_iff_specializes_and : (x ~ᵢ y) ↔ x ⤳ y ∧ y ⤳ x := le_antisymm_iff #align inseparable_iff_specializes_and inseparable_iff_specializes_and theorem Inseparable.specializes (h : x ~ᵢ y) : x ⤳ y := h.le #align inseparable.specializes Inseparable.specializes theorem Inseparable.specializes' (h : x ~ᵢ y) : y ⤳ x := h.ge #align inseparable.specializes' Inseparable.specializes' theorem Specializes.antisymm (h₁ : x ⤳ y) (h₂ : y ⤳ x) : x ~ᵢ y := le_antisymm h₁ h₂ #align specializes.antisymm Specializes.antisymm theorem inseparable_iff_forall_open : (x ~ᵢ y) ↔ ∀ s : Set X, IsOpen s → (x ∈ s ↔ y ∈ s) := by simp only [inseparable_iff_specializes_and, specializes_iff_forall_open, ← forall_and, ← iff_def, Iff.comm] #align inseparable_iff_forall_open inseparable_iff_forall_open theorem not_inseparable_iff_exists_open : ¬(x ~ᵢ y) ↔ ∃ s : Set X, IsOpen s ∧ Xor' (x ∈ s) (y ∈ s) := by simp [inseparable_iff_forall_open, ← xor_iff_not_iff] #align not_inseparable_iff_exists_open not_inseparable_iff_exists_open theorem inseparable_iff_forall_closed : (x ~ᵢ y) ↔ ∀ s : Set X, IsClosed s → (x ∈ s ↔ y ∈ s) := by simp only [inseparable_iff_specializes_and, specializes_iff_forall_closed, ← forall_and, ← iff_def] #align inseparable_iff_forall_closed inseparable_iff_forall_closed theorem inseparable_iff_mem_closure : (x ~ᵢ y) ↔ x ∈ closure ({y} : Set X) ∧ y ∈ closure ({x} : Set X) := inseparable_iff_specializes_and.trans <| by simp only [specializes_iff_mem_closure, and_comm] #align inseparable_iff_mem_closure inseparable_iff_mem_closure theorem inseparable_iff_closure_eq : (x ~ᵢ y) ↔ closure ({x} : Set X) = closure {y} := by simp only [inseparable_iff_specializes_and, specializes_iff_closure_subset, ← subset_antisymm_iff, eq_comm] #align inseparable_iff_closure_eq inseparable_iff_closure_eq theorem inseparable_of_nhdsWithin_eq (hx : x ∈ s) (hy : y ∈ s) (h : 𝓝[s] x = 𝓝[s] y) : x ~ᵢ y := (specializes_of_nhdsWithin h.le hx).antisymm (specializes_of_nhdsWithin h.ge hy) #align inseparable_of_nhds_within_eq inseparable_of_nhdsWithin_eq theorem Inducing.inseparable_iff (hf : Inducing f) : (f x ~ᵢ f y) ↔ (x ~ᵢ y) := by simp only [inseparable_iff_specializes_and, hf.specializes_iff] #align inducing.inseparable_iff Inducing.inseparable_iff theorem subtype_inseparable_iff {p : X → Prop} (x y : Subtype p) : (x ~ᵢ y) ↔ ((x : X) ~ᵢ y) := inducing_subtype_val.inseparable_iff.symm #align subtype_inseparable_iff subtype_inseparable_iff @[simp] theorem inseparable_prod {x₁ x₂ : X} {y₁ y₂ : Y} : ((x₁, y₁) ~ᵢ (x₂, y₂)) ↔ (x₁ ~ᵢ x₂) ∧ (y₁ ~ᵢ y₂) := by simp only [Inseparable, nhds_prod_eq, prod_inj] #align inseparable_prod inseparable_prod theorem Inseparable.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ~ᵢ x₂) (hy : y₁ ~ᵢ y₂) : (x₁, y₁) ~ᵢ (x₂, y₂) := inseparable_prod.2 ⟨hx, hy⟩ #align inseparable.prod Inseparable.prod @[simp] theorem inseparable_pi {f g : ∀ i, π i} : (f ~ᵢ g) ↔ ∀ i, f i ~ᵢ g i := by
simp only [Inseparable, nhds_pi, funext_iff, pi_inj]
@[simp] theorem inseparable_pi {f g : ∀ i, π i} : (f ~ᵢ g) ↔ ∀ i, f i ~ᵢ g i := by
Mathlib.Topology.Inseparable.346_0.2NeLzt0mQ64QlfB
@[simp] theorem inseparable_pi {f g : ∀ i, π i} : (f ~ᵢ g) ↔ ∀ i, f i ~ᵢ g i
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x y z : X s : Set X f g : X → Y t : Set (SeparationQuotient X) hs : IsOpen s ⊢ mk ⁻¹' (mk '' s) = s
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext; simp [specializes_iff_pure, le_def] theorem specializes_iff_forall_open : x ⤳ y ↔ ∀ s : Set X, IsOpen s → y ∈ s → x ∈ s := (specializes_TFAE x y).out 0 2 #align specializes_iff_forall_open specializes_iff_forall_open theorem Specializes.mem_open (h : x ⤳ y) (hs : IsOpen s) (hy : y ∈ s) : x ∈ s := specializes_iff_forall_open.1 h s hs hy #align specializes.mem_open Specializes.mem_open theorem IsOpen.not_specializes (hs : IsOpen s) (hx : x ∉ s) (hy : y ∈ s) : ¬x ⤳ y := fun h => hx <| h.mem_open hs hy #align is_open.not_specializes IsOpen.not_specializes theorem specializes_iff_forall_closed : x ⤳ y ↔ ∀ s : Set X, IsClosed s → x ∈ s → y ∈ s := (specializes_TFAE x y).out 0 3 #align specializes_iff_forall_closed specializes_iff_forall_closed theorem Specializes.mem_closed (h : x ⤳ y) (hs : IsClosed s) (hx : x ∈ s) : y ∈ s := specializes_iff_forall_closed.1 h s hs hx #align specializes.mem_closed Specializes.mem_closed theorem IsClosed.not_specializes (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬x ⤳ y := fun h => hy <| h.mem_closed hs hx #align is_closed.not_specializes IsClosed.not_specializes theorem specializes_iff_mem_closure : x ⤳ y ↔ y ∈ closure ({x} : Set X) := (specializes_TFAE x y).out 0 4 #align specializes_iff_mem_closure specializes_iff_mem_closure alias ⟨Specializes.mem_closure, _⟩ := specializes_iff_mem_closure #align specializes.mem_closure Specializes.mem_closure theorem specializes_iff_closure_subset : x ⤳ y ↔ closure ({y} : Set X) ⊆ closure {x} := (specializes_TFAE x y).out 0 5 #align specializes_iff_closure_subset specializes_iff_closure_subset alias ⟨Specializes.closure_subset, _⟩ := specializes_iff_closure_subset #align specializes.closure_subset Specializes.closure_subset -- porting note: new lemma theorem specializes_iff_clusterPt : x ⤳ y ↔ ClusterPt y (pure x) := (specializes_TFAE x y).out 0 6 theorem Filter.HasBasis.specializes_iff {ι} {p : ι → Prop} {s : ι → Set X} (h : (𝓝 y).HasBasis p s) : x ⤳ y ↔ ∀ i, p i → x ∈ s i := specializes_iff_pure.trans h.ge_iff #align filter.has_basis.specializes_iff Filter.HasBasis.specializes_iff theorem specializes_rfl : x ⤳ x := le_rfl #align specializes_rfl specializes_rfl @[refl] theorem specializes_refl (x : X) : x ⤳ x := specializes_rfl #align specializes_refl specializes_refl @[trans] theorem Specializes.trans : x ⤳ y → y ⤳ z → x ⤳ z := le_trans #align specializes.trans Specializes.trans theorem specializes_of_eq (e : x = y) : x ⤳ y := e ▸ specializes_refl x #align specializes_of_eq specializes_of_eq theorem specializes_of_nhdsWithin (h₁ : 𝓝[s] x ≤ 𝓝[s] y) (h₂ : x ∈ s) : x ⤳ y := specializes_iff_pure.2 <| calc pure x ≤ 𝓝[s] x := le_inf (pure_le_nhds _) (le_principal_iff.2 h₂) _ ≤ 𝓝[s] y := h₁ _ ≤ 𝓝 y := inf_le_left #align specializes_of_nhds_within specializes_of_nhdsWithin theorem Specializes.map_of_continuousAt (h : x ⤳ y) (hy : ContinuousAt f y) : f x ⤳ f y := specializes_iff_pure.2 fun _s hs => mem_pure.2 <| mem_preimage.1 <| mem_of_mem_nhds <| hy.mono_left h hs #align specializes.map_of_continuous_at Specializes.map_of_continuousAt theorem Specializes.map (h : x ⤳ y) (hf : Continuous f) : f x ⤳ f y := h.map_of_continuousAt hf.rst.imntinuousAt #align specializes.map Specializes.map theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y := by simp only [specializes_iff_mem_closure, hf.closure_eq_preimage_closure_image, image_singleton, mem_preimage] #align inducing.specializes_iff Inducing.specializes_iff theorem subtype_specializes_iff {p : X → Prop} (x y : Subtype p) : x ⤳ y ↔ (x : X) ⤳ y := inducing_subtype_val.specializes_iff.symm #align subtype_specializes_iff subtype_specializes_iff @[simp] theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂ := by simp only [Specializes, nhds_prod_eq, prod_le_prod] #align specializes_prod specializes_prod theorem Specializes.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ⤳ x₂) (hy : y₁ ⤳ y₂) : (x₁, y₁) ⤳ (x₂, y₂) := specializes_prod.2 ⟨hx, hy⟩ #align specializes.prod Specializes.prod @[simp] theorem specializes_pi {f g : ∀ i, π i} : f ⤳ g ↔ ∀ i, f i ⤳ g i := by simp only [Specializes, nhds_pi, pi_le_pi] #align specializes_pi specializes_pi theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S := by rw [specializes_iff_forall_open] push_neg rfl #align not_specializes_iff_exists_open not_specializes_iff_exists_open theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S := by rw [specializes_iff_forall_closed] push_neg rfl #align not_specializes_iff_exists_closed not_specializes_iff_exists_closed theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) : Continuous (s.piecewise f g) := by have : ∀ U, IsOpen U → g ⁻¹' U ⊆ f ⁻¹' U := fun U hU x hx ↦ (hspec x).mem_open hU hx rw [continuous_def] intro U hU rw [piecewise_preimage, ite_eq_of_subset_right _ (this U hU)] exact hU.preimage hf |>.inter hs |>.union (hU.preimage hg) theorem IsClosed.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsClosed s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, g x ⤳ f x) : Continuous (s.piecewise f g) := by simpa only [piecewise_compl] using hs.isOpen_compl.continuous_piecewise_of_specializes hg hf hspec variable (X) /-- Specialization forms a preorder on the topological space. -/ def specializationPreorder : Preorder X := { Preorder.lift (OrderDual.toDual ∘ 𝓝) with le := fun x y => y ⤳ x lt := fun x y => y ⤳ x ∧ ¬x ⤳ y } #align specialization_preorder specializationPreorder variable {X} /-- A continuous function is monotone with respect to the specialization preorders on the domain and the codomain. -/ theorem Continuous.specialization_monotone (hf : Continuous f) : @Monotone _ _ (specializationPreorder X) (specializationPreorder Y) f := fun _ _ h => h.map hf #align continuous.specialization_monotone Continuous.specialization_monotone /-! ### `Inseparable` relation -/ /-- Two points `x` and `y` in a topological space are `Inseparable` if any of the following equivalent properties hold: - `𝓝 x = 𝓝 y`; we use this property as the definition; - for any open set `s`, `x ∈ s ↔ y ∈ s`, see `inseparable_iff_open`; - for any closed set `s`, `x ∈ s ↔ y ∈ s`, see `inseparable_iff_closed`; - `x ∈ closure {y}` and `y ∈ closure {x}`, see `inseparable_iff_mem_closure`; - `closure {x} = closure {y}`, see `inseparable_iff_closure_eq`. -/ def Inseparable (x y : X) : Prop := 𝓝 x = 𝓝 y #align inseparable Inseparable local infixl:0 " ~ᵢ " => Inseparable theorem inseparable_def : (x ~ᵢ y) ↔ 𝓝 x = 𝓝 y := Iff.rfl #align inseparable_def inseparable_def theorem inseparable_iff_specializes_and : (x ~ᵢ y) ↔ x ⤳ y ∧ y ⤳ x := le_antisymm_iff #align inseparable_iff_specializes_and inseparable_iff_specializes_and theorem Inseparable.specializes (h : x ~ᵢ y) : x ⤳ y := h.le #align inseparable.specializes Inseparable.specializes theorem Inseparable.specializes' (h : x ~ᵢ y) : y ⤳ x := h.ge #align inseparable.specializes' Inseparable.specializes' theorem Specializes.antisymm (h₁ : x ⤳ y) (h₂ : y ⤳ x) : x ~ᵢ y := le_antisymm h₁ h₂ #align specializes.antisymm Specializes.antisymm theorem inseparable_iff_forall_open : (x ~ᵢ y) ↔ ∀ s : Set X, IsOpen s → (x ∈ s ↔ y ∈ s) := by simp only [inseparable_iff_specializes_and, specializes_iff_forall_open, ← forall_and, ← iff_def, Iff.comm] #align inseparable_iff_forall_open inseparable_iff_forall_open theorem not_inseparable_iff_exists_open : ¬(x ~ᵢ y) ↔ ∃ s : Set X, IsOpen s ∧ Xor' (x ∈ s) (y ∈ s) := by simp [inseparable_iff_forall_open, ← xor_iff_not_iff] #align not_inseparable_iff_exists_open not_inseparable_iff_exists_open theorem inseparable_iff_forall_closed : (x ~ᵢ y) ↔ ∀ s : Set X, IsClosed s → (x ∈ s ↔ y ∈ s) := by simp only [inseparable_iff_specializes_and, specializes_iff_forall_closed, ← forall_and, ← iff_def] #align inseparable_iff_forall_closed inseparable_iff_forall_closed theorem inseparable_iff_mem_closure : (x ~ᵢ y) ↔ x ∈ closure ({y} : Set X) ∧ y ∈ closure ({x} : Set X) := inseparable_iff_specializes_and.trans <| by simp only [specializes_iff_mem_closure, and_comm] #align inseparable_iff_mem_closure inseparable_iff_mem_closure theorem inseparable_iff_closure_eq : (x ~ᵢ y) ↔ closure ({x} : Set X) = closure {y} := by simp only [inseparable_iff_specializes_and, specializes_iff_closure_subset, ← subset_antisymm_iff, eq_comm] #align inseparable_iff_closure_eq inseparable_iff_closure_eq theorem inseparable_of_nhdsWithin_eq (hx : x ∈ s) (hy : y ∈ s) (h : 𝓝[s] x = 𝓝[s] y) : x ~ᵢ y := (specializes_of_nhdsWithin h.le hx).antisymm (specializes_of_nhdsWithin h.ge hy) #align inseparable_of_nhds_within_eq inseparable_of_nhdsWithin_eq theorem Inducing.inseparable_iff (hf : Inducing f) : (f x ~ᵢ f y) ↔ (x ~ᵢ y) := by simp only [inseparable_iff_specializes_and, hf.specializes_iff] #align inducing.inseparable_iff Inducing.inseparable_iff theorem subtype_inseparable_iff {p : X → Prop} (x y : Subtype p) : (x ~ᵢ y) ↔ ((x : X) ~ᵢ y) := inducing_subtype_val.inseparable_iff.symm #align subtype_inseparable_iff subtype_inseparable_iff @[simp] theorem inseparable_prod {x₁ x₂ : X} {y₁ y₂ : Y} : ((x₁, y₁) ~ᵢ (x₂, y₂)) ↔ (x₁ ~ᵢ x₂) ∧ (y₁ ~ᵢ y₂) := by simp only [Inseparable, nhds_prod_eq, prod_inj] #align inseparable_prod inseparable_prod theorem Inseparable.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ~ᵢ x₂) (hy : y₁ ~ᵢ y₂) : (x₁, y₁) ~ᵢ (x₂, y₂) := inseparable_prod.2 ⟨hx, hy⟩ #align inseparable.prod Inseparable.prod @[simp] theorem inseparable_pi {f g : ∀ i, π i} : (f ~ᵢ g) ↔ ∀ i, f i ~ᵢ g i := by simp only [Inseparable, nhds_pi, funext_iff, pi_inj] #align inseparable_pi inseparable_pi namespace Inseparable @[refl] theorem refl (x : X) : x ~ᵢ x := Eq.refl (𝓝 x) #align inseparable.refl Inseparable.refl theorem rfl : x ~ᵢ x := refl x #align inseparable.rfl Inseparable.rfl theorem of_eq (e : x = y) : Inseparable x y := e ▸ refl x #align inseparable.of_eq Inseparable.of_eq @[symm] nonrec theorem symm (h : x ~ᵢ y) : y ~ᵢ x := h.symm #align inseparable.symm Inseparable.symm @[trans] nonrec theorem trans (h₁ : x ~ᵢ y) (h₂ : y ~ᵢ z) : x ~ᵢ z := h₁.trans h₂ #align inseparable.trans Inseparable.trans theorem nhds_eq (h : x ~ᵢ y) : 𝓝 x = 𝓝 y := h #align inseparable.nhds_eq Inseparable.nhds_eq theorem mem_open_iff (h : x ~ᵢ y) (hs : IsOpen s) : x ∈ s ↔ y ∈ s := inseparable_iff_forall_open.1 h s hs #align inseparable.mem_open_iff Inseparable.mem_open_iff theorem mem_closed_iff (h : x ~ᵢ y) (hs : IsClosed s) : x ∈ s ↔ y ∈ s := inseparable_iff_forall_closed.1 h s hs #align inseparable.mem_closed_iff Inseparable.mem_closed_iff theorem map_of_continuousAt (h : x ~ᵢ y) (hx : ContinuousAt f x) (hy : ContinuousAt f y) : f x ~ᵢ f y := (h.specializes.map_of_continuousAt hy).antisymm (h.specializes'.map_of_continuousAt hx) #align inseparable.map_of_continuous_at Inseparable.map_of_continuousAt theorem map (h : x ~ᵢ y) (hf : Continuous f) : f x ~ᵢ f y := h.map_of_continuousAt hf.rst.imntinuousAt hf.rst.imntinuousAt #align inseparable.map Inseparable.map end Inseparable theorem IsClosed.not_inseparable (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬(x ~ᵢ y) := fun h => hy <| (h.mem_closed_iff hs).1 hx #align is_closed.not_inseparable IsClosed.not_inseparable theorem IsOpen.not_inseparable (hs : IsOpen s) (hx : x ∈ s) (hy : y ∉ s) : ¬(x ~ᵢ y) := fun h => hy <| (h.mem_open_iff hs).1 hx #align is_open.not_inseparable IsOpen.not_inseparable /-! ### Separation quotient In this section we define the quotient of a topological space by the `Inseparable` relation. -/ variable (X) /-- A `setoid` version of `Inseparable`, used to define the `SeparationQuotient`. -/ def inseparableSetoid : Setoid X := { Setoid.comap 𝓝 ⊥ with r := Inseparable } #align inseparable_setoid inseparableSetoid /-- The quotient of a topological space by its `inseparableSetoid`. This quotient is guaranteed to be a T₀ space. -/ def SeparationQuotient := Quotient (inseparableSetoid X) #align separation_quotient SeparationQuotient instance : TopologicalSpace (SeparationQuotient X) := instTopologicalSpaceQuotient variable {X} variable {t : Set (SeparationQuotient X)} namespace SeparationQuotient /-- The natural map from a topological space to its separation quotient. -/ def mk : X → SeparationQuotient X := Quotient.mk'' #align separation_quotient.mk SeparationQuotient.mk theorem quotientMap_mk : QuotientMap (mk : X → SeparationQuotient X) := quotientMap_quot_mk #align separation_quotient.quotient_map_mk SeparationQuotient.quotientMap_mk theorem continuous_mk : Continuous (mk : X → SeparationQuotient X) := continuous_quot_mk #align separation_quotient.continuous_mk SeparationQuotient.continuous_mk @[simp] theorem mk_eq_mk : mk x = mk y ↔ (x ~ᵢ y) := Quotient.eq'' #align separation_quotient.mk_eq_mk SeparationQuotient.mk_eq_mk theorem surjective_mk : Surjective (mk : X → SeparationQuotient X) := surjective_quot_mk _ #align separation_quotient.surjective_mk SeparationQuotient.surjective_mk @[simp] theorem range_mk : range (mk : X → SeparationQuotient X) = univ := surjective_mk.range_eq #align separation_quotient.range_mk SeparationQuotient.range_mk instance [Nonempty X] : Nonempty (SeparationQuotient X) := Nonempty.map mk ‹_› instance [Inhabited X] : Inhabited (SeparationQuotient X) := ⟨mk default⟩ instance [Subsingleton X] : Subsingleton (SeparationQuotient X) := surjective_mk.subsingleton theorem preimage_image_mk_open (hs : IsOpen s) : mk ⁻¹' (mk '' s) = s := by
refine' Subset.antisymm _ (subset_preimage_image _ _)
theorem preimage_image_mk_open (hs : IsOpen s) : mk ⁻¹' (mk '' s) = s := by
Mathlib.Topology.Inseparable.464_0.2NeLzt0mQ64QlfB
theorem preimage_image_mk_open (hs : IsOpen s) : mk ⁻¹' (mk '' s) = s
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x y z : X s : Set X f g : X → Y t : Set (SeparationQuotient X) hs : IsOpen s ⊢ mk ⁻¹' (mk '' s) ⊆ s
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext; simp [specializes_iff_pure, le_def] theorem specializes_iff_forall_open : x ⤳ y ↔ ∀ s : Set X, IsOpen s → y ∈ s → x ∈ s := (specializes_TFAE x y).out 0 2 #align specializes_iff_forall_open specializes_iff_forall_open theorem Specializes.mem_open (h : x ⤳ y) (hs : IsOpen s) (hy : y ∈ s) : x ∈ s := specializes_iff_forall_open.1 h s hs hy #align specializes.mem_open Specializes.mem_open theorem IsOpen.not_specializes (hs : IsOpen s) (hx : x ∉ s) (hy : y ∈ s) : ¬x ⤳ y := fun h => hx <| h.mem_open hs hy #align is_open.not_specializes IsOpen.not_specializes theorem specializes_iff_forall_closed : x ⤳ y ↔ ∀ s : Set X, IsClosed s → x ∈ s → y ∈ s := (specializes_TFAE x y).out 0 3 #align specializes_iff_forall_closed specializes_iff_forall_closed theorem Specializes.mem_closed (h : x ⤳ y) (hs : IsClosed s) (hx : x ∈ s) : y ∈ s := specializes_iff_forall_closed.1 h s hs hx #align specializes.mem_closed Specializes.mem_closed theorem IsClosed.not_specializes (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬x ⤳ y := fun h => hy <| h.mem_closed hs hx #align is_closed.not_specializes IsClosed.not_specializes theorem specializes_iff_mem_closure : x ⤳ y ↔ y ∈ closure ({x} : Set X) := (specializes_TFAE x y).out 0 4 #align specializes_iff_mem_closure specializes_iff_mem_closure alias ⟨Specializes.mem_closure, _⟩ := specializes_iff_mem_closure #align specializes.mem_closure Specializes.mem_closure theorem specializes_iff_closure_subset : x ⤳ y ↔ closure ({y} : Set X) ⊆ closure {x} := (specializes_TFAE x y).out 0 5 #align specializes_iff_closure_subset specializes_iff_closure_subset alias ⟨Specializes.closure_subset, _⟩ := specializes_iff_closure_subset #align specializes.closure_subset Specializes.closure_subset -- porting note: new lemma theorem specializes_iff_clusterPt : x ⤳ y ↔ ClusterPt y (pure x) := (specializes_TFAE x y).out 0 6 theorem Filter.HasBasis.specializes_iff {ι} {p : ι → Prop} {s : ι → Set X} (h : (𝓝 y).HasBasis p s) : x ⤳ y ↔ ∀ i, p i → x ∈ s i := specializes_iff_pure.trans h.ge_iff #align filter.has_basis.specializes_iff Filter.HasBasis.specializes_iff theorem specializes_rfl : x ⤳ x := le_rfl #align specializes_rfl specializes_rfl @[refl] theorem specializes_refl (x : X) : x ⤳ x := specializes_rfl #align specializes_refl specializes_refl @[trans] theorem Specializes.trans : x ⤳ y → y ⤳ z → x ⤳ z := le_trans #align specializes.trans Specializes.trans theorem specializes_of_eq (e : x = y) : x ⤳ y := e ▸ specializes_refl x #align specializes_of_eq specializes_of_eq theorem specializes_of_nhdsWithin (h₁ : 𝓝[s] x ≤ 𝓝[s] y) (h₂ : x ∈ s) : x ⤳ y := specializes_iff_pure.2 <| calc pure x ≤ 𝓝[s] x := le_inf (pure_le_nhds _) (le_principal_iff.2 h₂) _ ≤ 𝓝[s] y := h₁ _ ≤ 𝓝 y := inf_le_left #align specializes_of_nhds_within specializes_of_nhdsWithin theorem Specializes.map_of_continuousAt (h : x ⤳ y) (hy : ContinuousAt f y) : f x ⤳ f y := specializes_iff_pure.2 fun _s hs => mem_pure.2 <| mem_preimage.1 <| mem_of_mem_nhds <| hy.mono_left h hs #align specializes.map_of_continuous_at Specializes.map_of_continuousAt theorem Specializes.map (h : x ⤳ y) (hf : Continuous f) : f x ⤳ f y := h.map_of_continuousAt hf.rst.imntinuousAt #align specializes.map Specializes.map theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y := by simp only [specializes_iff_mem_closure, hf.closure_eq_preimage_closure_image, image_singleton, mem_preimage] #align inducing.specializes_iff Inducing.specializes_iff theorem subtype_specializes_iff {p : X → Prop} (x y : Subtype p) : x ⤳ y ↔ (x : X) ⤳ y := inducing_subtype_val.specializes_iff.symm #align subtype_specializes_iff subtype_specializes_iff @[simp] theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂ := by simp only [Specializes, nhds_prod_eq, prod_le_prod] #align specializes_prod specializes_prod theorem Specializes.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ⤳ x₂) (hy : y₁ ⤳ y₂) : (x₁, y₁) ⤳ (x₂, y₂) := specializes_prod.2 ⟨hx, hy⟩ #align specializes.prod Specializes.prod @[simp] theorem specializes_pi {f g : ∀ i, π i} : f ⤳ g ↔ ∀ i, f i ⤳ g i := by simp only [Specializes, nhds_pi, pi_le_pi] #align specializes_pi specializes_pi theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S := by rw [specializes_iff_forall_open] push_neg rfl #align not_specializes_iff_exists_open not_specializes_iff_exists_open theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S := by rw [specializes_iff_forall_closed] push_neg rfl #align not_specializes_iff_exists_closed not_specializes_iff_exists_closed theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) : Continuous (s.piecewise f g) := by have : ∀ U, IsOpen U → g ⁻¹' U ⊆ f ⁻¹' U := fun U hU x hx ↦ (hspec x).mem_open hU hx rw [continuous_def] intro U hU rw [piecewise_preimage, ite_eq_of_subset_right _ (this U hU)] exact hU.preimage hf |>.inter hs |>.union (hU.preimage hg) theorem IsClosed.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsClosed s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, g x ⤳ f x) : Continuous (s.piecewise f g) := by simpa only [piecewise_compl] using hs.isOpen_compl.continuous_piecewise_of_specializes hg hf hspec variable (X) /-- Specialization forms a preorder on the topological space. -/ def specializationPreorder : Preorder X := { Preorder.lift (OrderDual.toDual ∘ 𝓝) with le := fun x y => y ⤳ x lt := fun x y => y ⤳ x ∧ ¬x ⤳ y } #align specialization_preorder specializationPreorder variable {X} /-- A continuous function is monotone with respect to the specialization preorders on the domain and the codomain. -/ theorem Continuous.specialization_monotone (hf : Continuous f) : @Monotone _ _ (specializationPreorder X) (specializationPreorder Y) f := fun _ _ h => h.map hf #align continuous.specialization_monotone Continuous.specialization_monotone /-! ### `Inseparable` relation -/ /-- Two points `x` and `y` in a topological space are `Inseparable` if any of the following equivalent properties hold: - `𝓝 x = 𝓝 y`; we use this property as the definition; - for any open set `s`, `x ∈ s ↔ y ∈ s`, see `inseparable_iff_open`; - for any closed set `s`, `x ∈ s ↔ y ∈ s`, see `inseparable_iff_closed`; - `x ∈ closure {y}` and `y ∈ closure {x}`, see `inseparable_iff_mem_closure`; - `closure {x} = closure {y}`, see `inseparable_iff_closure_eq`. -/ def Inseparable (x y : X) : Prop := 𝓝 x = 𝓝 y #align inseparable Inseparable local infixl:0 " ~ᵢ " => Inseparable theorem inseparable_def : (x ~ᵢ y) ↔ 𝓝 x = 𝓝 y := Iff.rfl #align inseparable_def inseparable_def theorem inseparable_iff_specializes_and : (x ~ᵢ y) ↔ x ⤳ y ∧ y ⤳ x := le_antisymm_iff #align inseparable_iff_specializes_and inseparable_iff_specializes_and theorem Inseparable.specializes (h : x ~ᵢ y) : x ⤳ y := h.le #align inseparable.specializes Inseparable.specializes theorem Inseparable.specializes' (h : x ~ᵢ y) : y ⤳ x := h.ge #align inseparable.specializes' Inseparable.specializes' theorem Specializes.antisymm (h₁ : x ⤳ y) (h₂ : y ⤳ x) : x ~ᵢ y := le_antisymm h₁ h₂ #align specializes.antisymm Specializes.antisymm theorem inseparable_iff_forall_open : (x ~ᵢ y) ↔ ∀ s : Set X, IsOpen s → (x ∈ s ↔ y ∈ s) := by simp only [inseparable_iff_specializes_and, specializes_iff_forall_open, ← forall_and, ← iff_def, Iff.comm] #align inseparable_iff_forall_open inseparable_iff_forall_open theorem not_inseparable_iff_exists_open : ¬(x ~ᵢ y) ↔ ∃ s : Set X, IsOpen s ∧ Xor' (x ∈ s) (y ∈ s) := by simp [inseparable_iff_forall_open, ← xor_iff_not_iff] #align not_inseparable_iff_exists_open not_inseparable_iff_exists_open theorem inseparable_iff_forall_closed : (x ~ᵢ y) ↔ ∀ s : Set X, IsClosed s → (x ∈ s ↔ y ∈ s) := by simp only [inseparable_iff_specializes_and, specializes_iff_forall_closed, ← forall_and, ← iff_def] #align inseparable_iff_forall_closed inseparable_iff_forall_closed theorem inseparable_iff_mem_closure : (x ~ᵢ y) ↔ x ∈ closure ({y} : Set X) ∧ y ∈ closure ({x} : Set X) := inseparable_iff_specializes_and.trans <| by simp only [specializes_iff_mem_closure, and_comm] #align inseparable_iff_mem_closure inseparable_iff_mem_closure theorem inseparable_iff_closure_eq : (x ~ᵢ y) ↔ closure ({x} : Set X) = closure {y} := by simp only [inseparable_iff_specializes_and, specializes_iff_closure_subset, ← subset_antisymm_iff, eq_comm] #align inseparable_iff_closure_eq inseparable_iff_closure_eq theorem inseparable_of_nhdsWithin_eq (hx : x ∈ s) (hy : y ∈ s) (h : 𝓝[s] x = 𝓝[s] y) : x ~ᵢ y := (specializes_of_nhdsWithin h.le hx).antisymm (specializes_of_nhdsWithin h.ge hy) #align inseparable_of_nhds_within_eq inseparable_of_nhdsWithin_eq theorem Inducing.inseparable_iff (hf : Inducing f) : (f x ~ᵢ f y) ↔ (x ~ᵢ y) := by simp only [inseparable_iff_specializes_and, hf.specializes_iff] #align inducing.inseparable_iff Inducing.inseparable_iff theorem subtype_inseparable_iff {p : X → Prop} (x y : Subtype p) : (x ~ᵢ y) ↔ ((x : X) ~ᵢ y) := inducing_subtype_val.inseparable_iff.symm #align subtype_inseparable_iff subtype_inseparable_iff @[simp] theorem inseparable_prod {x₁ x₂ : X} {y₁ y₂ : Y} : ((x₁, y₁) ~ᵢ (x₂, y₂)) ↔ (x₁ ~ᵢ x₂) ∧ (y₁ ~ᵢ y₂) := by simp only [Inseparable, nhds_prod_eq, prod_inj] #align inseparable_prod inseparable_prod theorem Inseparable.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ~ᵢ x₂) (hy : y₁ ~ᵢ y₂) : (x₁, y₁) ~ᵢ (x₂, y₂) := inseparable_prod.2 ⟨hx, hy⟩ #align inseparable.prod Inseparable.prod @[simp] theorem inseparable_pi {f g : ∀ i, π i} : (f ~ᵢ g) ↔ ∀ i, f i ~ᵢ g i := by simp only [Inseparable, nhds_pi, funext_iff, pi_inj] #align inseparable_pi inseparable_pi namespace Inseparable @[refl] theorem refl (x : X) : x ~ᵢ x := Eq.refl (𝓝 x) #align inseparable.refl Inseparable.refl theorem rfl : x ~ᵢ x := refl x #align inseparable.rfl Inseparable.rfl theorem of_eq (e : x = y) : Inseparable x y := e ▸ refl x #align inseparable.of_eq Inseparable.of_eq @[symm] nonrec theorem symm (h : x ~ᵢ y) : y ~ᵢ x := h.symm #align inseparable.symm Inseparable.symm @[trans] nonrec theorem trans (h₁ : x ~ᵢ y) (h₂ : y ~ᵢ z) : x ~ᵢ z := h₁.trans h₂ #align inseparable.trans Inseparable.trans theorem nhds_eq (h : x ~ᵢ y) : 𝓝 x = 𝓝 y := h #align inseparable.nhds_eq Inseparable.nhds_eq theorem mem_open_iff (h : x ~ᵢ y) (hs : IsOpen s) : x ∈ s ↔ y ∈ s := inseparable_iff_forall_open.1 h s hs #align inseparable.mem_open_iff Inseparable.mem_open_iff theorem mem_closed_iff (h : x ~ᵢ y) (hs : IsClosed s) : x ∈ s ↔ y ∈ s := inseparable_iff_forall_closed.1 h s hs #align inseparable.mem_closed_iff Inseparable.mem_closed_iff theorem map_of_continuousAt (h : x ~ᵢ y) (hx : ContinuousAt f x) (hy : ContinuousAt f y) : f x ~ᵢ f y := (h.specializes.map_of_continuousAt hy).antisymm (h.specializes'.map_of_continuousAt hx) #align inseparable.map_of_continuous_at Inseparable.map_of_continuousAt theorem map (h : x ~ᵢ y) (hf : Continuous f) : f x ~ᵢ f y := h.map_of_continuousAt hf.rst.imntinuousAt hf.rst.imntinuousAt #align inseparable.map Inseparable.map end Inseparable theorem IsClosed.not_inseparable (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬(x ~ᵢ y) := fun h => hy <| (h.mem_closed_iff hs).1 hx #align is_closed.not_inseparable IsClosed.not_inseparable theorem IsOpen.not_inseparable (hs : IsOpen s) (hx : x ∈ s) (hy : y ∉ s) : ¬(x ~ᵢ y) := fun h => hy <| (h.mem_open_iff hs).1 hx #align is_open.not_inseparable IsOpen.not_inseparable /-! ### Separation quotient In this section we define the quotient of a topological space by the `Inseparable` relation. -/ variable (X) /-- A `setoid` version of `Inseparable`, used to define the `SeparationQuotient`. -/ def inseparableSetoid : Setoid X := { Setoid.comap 𝓝 ⊥ with r := Inseparable } #align inseparable_setoid inseparableSetoid /-- The quotient of a topological space by its `inseparableSetoid`. This quotient is guaranteed to be a T₀ space. -/ def SeparationQuotient := Quotient (inseparableSetoid X) #align separation_quotient SeparationQuotient instance : TopologicalSpace (SeparationQuotient X) := instTopologicalSpaceQuotient variable {X} variable {t : Set (SeparationQuotient X)} namespace SeparationQuotient /-- The natural map from a topological space to its separation quotient. -/ def mk : X → SeparationQuotient X := Quotient.mk'' #align separation_quotient.mk SeparationQuotient.mk theorem quotientMap_mk : QuotientMap (mk : X → SeparationQuotient X) := quotientMap_quot_mk #align separation_quotient.quotient_map_mk SeparationQuotient.quotientMap_mk theorem continuous_mk : Continuous (mk : X → SeparationQuotient X) := continuous_quot_mk #align separation_quotient.continuous_mk SeparationQuotient.continuous_mk @[simp] theorem mk_eq_mk : mk x = mk y ↔ (x ~ᵢ y) := Quotient.eq'' #align separation_quotient.mk_eq_mk SeparationQuotient.mk_eq_mk theorem surjective_mk : Surjective (mk : X → SeparationQuotient X) := surjective_quot_mk _ #align separation_quotient.surjective_mk SeparationQuotient.surjective_mk @[simp] theorem range_mk : range (mk : X → SeparationQuotient X) = univ := surjective_mk.range_eq #align separation_quotient.range_mk SeparationQuotient.range_mk instance [Nonempty X] : Nonempty (SeparationQuotient X) := Nonempty.map mk ‹_› instance [Inhabited X] : Inhabited (SeparationQuotient X) := ⟨mk default⟩ instance [Subsingleton X] : Subsingleton (SeparationQuotient X) := surjective_mk.subsingleton theorem preimage_image_mk_open (hs : IsOpen s) : mk ⁻¹' (mk '' s) = s := by refine' Subset.antisymm _ (subset_preimage_image _ _)
rintro x ⟨y, hys, hxy⟩
theorem preimage_image_mk_open (hs : IsOpen s) : mk ⁻¹' (mk '' s) = s := by refine' Subset.antisymm _ (subset_preimage_image _ _)
Mathlib.Topology.Inseparable.464_0.2NeLzt0mQ64QlfB
theorem preimage_image_mk_open (hs : IsOpen s) : mk ⁻¹' (mk '' s) = s
Mathlib_Topology_Inseparable
case intro.intro X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x✝ y✝ z : X s : Set X f g : X → Y t : Set (SeparationQuotient X) hs : IsOpen s x y : X hys : y ∈ s hxy : mk y = mk x ⊢ x ∈ s
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext; simp [specializes_iff_pure, le_def] theorem specializes_iff_forall_open : x ⤳ y ↔ ∀ s : Set X, IsOpen s → y ∈ s → x ∈ s := (specializes_TFAE x y).out 0 2 #align specializes_iff_forall_open specializes_iff_forall_open theorem Specializes.mem_open (h : x ⤳ y) (hs : IsOpen s) (hy : y ∈ s) : x ∈ s := specializes_iff_forall_open.1 h s hs hy #align specializes.mem_open Specializes.mem_open theorem IsOpen.not_specializes (hs : IsOpen s) (hx : x ∉ s) (hy : y ∈ s) : ¬x ⤳ y := fun h => hx <| h.mem_open hs hy #align is_open.not_specializes IsOpen.not_specializes theorem specializes_iff_forall_closed : x ⤳ y ↔ ∀ s : Set X, IsClosed s → x ∈ s → y ∈ s := (specializes_TFAE x y).out 0 3 #align specializes_iff_forall_closed specializes_iff_forall_closed theorem Specializes.mem_closed (h : x ⤳ y) (hs : IsClosed s) (hx : x ∈ s) : y ∈ s := specializes_iff_forall_closed.1 h s hs hx #align specializes.mem_closed Specializes.mem_closed theorem IsClosed.not_specializes (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬x ⤳ y := fun h => hy <| h.mem_closed hs hx #align is_closed.not_specializes IsClosed.not_specializes theorem specializes_iff_mem_closure : x ⤳ y ↔ y ∈ closure ({x} : Set X) := (specializes_TFAE x y).out 0 4 #align specializes_iff_mem_closure specializes_iff_mem_closure alias ⟨Specializes.mem_closure, _⟩ := specializes_iff_mem_closure #align specializes.mem_closure Specializes.mem_closure theorem specializes_iff_closure_subset : x ⤳ y ↔ closure ({y} : Set X) ⊆ closure {x} := (specializes_TFAE x y).out 0 5 #align specializes_iff_closure_subset specializes_iff_closure_subset alias ⟨Specializes.closure_subset, _⟩ := specializes_iff_closure_subset #align specializes.closure_subset Specializes.closure_subset -- porting note: new lemma theorem specializes_iff_clusterPt : x ⤳ y ↔ ClusterPt y (pure x) := (specializes_TFAE x y).out 0 6 theorem Filter.HasBasis.specializes_iff {ι} {p : ι → Prop} {s : ι → Set X} (h : (𝓝 y).HasBasis p s) : x ⤳ y ↔ ∀ i, p i → x ∈ s i := specializes_iff_pure.trans h.ge_iff #align filter.has_basis.specializes_iff Filter.HasBasis.specializes_iff theorem specializes_rfl : x ⤳ x := le_rfl #align specializes_rfl specializes_rfl @[refl] theorem specializes_refl (x : X) : x ⤳ x := specializes_rfl #align specializes_refl specializes_refl @[trans] theorem Specializes.trans : x ⤳ y → y ⤳ z → x ⤳ z := le_trans #align specializes.trans Specializes.trans theorem specializes_of_eq (e : x = y) : x ⤳ y := e ▸ specializes_refl x #align specializes_of_eq specializes_of_eq theorem specializes_of_nhdsWithin (h₁ : 𝓝[s] x ≤ 𝓝[s] y) (h₂ : x ∈ s) : x ⤳ y := specializes_iff_pure.2 <| calc pure x ≤ 𝓝[s] x := le_inf (pure_le_nhds _) (le_principal_iff.2 h₂) _ ≤ 𝓝[s] y := h₁ _ ≤ 𝓝 y := inf_le_left #align specializes_of_nhds_within specializes_of_nhdsWithin theorem Specializes.map_of_continuousAt (h : x ⤳ y) (hy : ContinuousAt f y) : f x ⤳ f y := specializes_iff_pure.2 fun _s hs => mem_pure.2 <| mem_preimage.1 <| mem_of_mem_nhds <| hy.mono_left h hs #align specializes.map_of_continuous_at Specializes.map_of_continuousAt theorem Specializes.map (h : x ⤳ y) (hf : Continuous f) : f x ⤳ f y := h.map_of_continuousAt hf.rst.imntinuousAt #align specializes.map Specializes.map theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y := by simp only [specializes_iff_mem_closure, hf.closure_eq_preimage_closure_image, image_singleton, mem_preimage] #align inducing.specializes_iff Inducing.specializes_iff theorem subtype_specializes_iff {p : X → Prop} (x y : Subtype p) : x ⤳ y ↔ (x : X) ⤳ y := inducing_subtype_val.specializes_iff.symm #align subtype_specializes_iff subtype_specializes_iff @[simp] theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂ := by simp only [Specializes, nhds_prod_eq, prod_le_prod] #align specializes_prod specializes_prod theorem Specializes.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ⤳ x₂) (hy : y₁ ⤳ y₂) : (x₁, y₁) ⤳ (x₂, y₂) := specializes_prod.2 ⟨hx, hy⟩ #align specializes.prod Specializes.prod @[simp] theorem specializes_pi {f g : ∀ i, π i} : f ⤳ g ↔ ∀ i, f i ⤳ g i := by simp only [Specializes, nhds_pi, pi_le_pi] #align specializes_pi specializes_pi theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S := by rw [specializes_iff_forall_open] push_neg rfl #align not_specializes_iff_exists_open not_specializes_iff_exists_open theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S := by rw [specializes_iff_forall_closed] push_neg rfl #align not_specializes_iff_exists_closed not_specializes_iff_exists_closed theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) : Continuous (s.piecewise f g) := by have : ∀ U, IsOpen U → g ⁻¹' U ⊆ f ⁻¹' U := fun U hU x hx ↦ (hspec x).mem_open hU hx rw [continuous_def] intro U hU rw [piecewise_preimage, ite_eq_of_subset_right _ (this U hU)] exact hU.preimage hf |>.inter hs |>.union (hU.preimage hg) theorem IsClosed.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsClosed s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, g x ⤳ f x) : Continuous (s.piecewise f g) := by simpa only [piecewise_compl] using hs.isOpen_compl.continuous_piecewise_of_specializes hg hf hspec variable (X) /-- Specialization forms a preorder on the topological space. -/ def specializationPreorder : Preorder X := { Preorder.lift (OrderDual.toDual ∘ 𝓝) with le := fun x y => y ⤳ x lt := fun x y => y ⤳ x ∧ ¬x ⤳ y } #align specialization_preorder specializationPreorder variable {X} /-- A continuous function is monotone with respect to the specialization preorders on the domain and the codomain. -/ theorem Continuous.specialization_monotone (hf : Continuous f) : @Monotone _ _ (specializationPreorder X) (specializationPreorder Y) f := fun _ _ h => h.map hf #align continuous.specialization_monotone Continuous.specialization_monotone /-! ### `Inseparable` relation -/ /-- Two points `x` and `y` in a topological space are `Inseparable` if any of the following equivalent properties hold: - `𝓝 x = 𝓝 y`; we use this property as the definition; - for any open set `s`, `x ∈ s ↔ y ∈ s`, see `inseparable_iff_open`; - for any closed set `s`, `x ∈ s ↔ y ∈ s`, see `inseparable_iff_closed`; - `x ∈ closure {y}` and `y ∈ closure {x}`, see `inseparable_iff_mem_closure`; - `closure {x} = closure {y}`, see `inseparable_iff_closure_eq`. -/ def Inseparable (x y : X) : Prop := 𝓝 x = 𝓝 y #align inseparable Inseparable local infixl:0 " ~ᵢ " => Inseparable theorem inseparable_def : (x ~ᵢ y) ↔ 𝓝 x = 𝓝 y := Iff.rfl #align inseparable_def inseparable_def theorem inseparable_iff_specializes_and : (x ~ᵢ y) ↔ x ⤳ y ∧ y ⤳ x := le_antisymm_iff #align inseparable_iff_specializes_and inseparable_iff_specializes_and theorem Inseparable.specializes (h : x ~ᵢ y) : x ⤳ y := h.le #align inseparable.specializes Inseparable.specializes theorem Inseparable.specializes' (h : x ~ᵢ y) : y ⤳ x := h.ge #align inseparable.specializes' Inseparable.specializes' theorem Specializes.antisymm (h₁ : x ⤳ y) (h₂ : y ⤳ x) : x ~ᵢ y := le_antisymm h₁ h₂ #align specializes.antisymm Specializes.antisymm theorem inseparable_iff_forall_open : (x ~ᵢ y) ↔ ∀ s : Set X, IsOpen s → (x ∈ s ↔ y ∈ s) := by simp only [inseparable_iff_specializes_and, specializes_iff_forall_open, ← forall_and, ← iff_def, Iff.comm] #align inseparable_iff_forall_open inseparable_iff_forall_open theorem not_inseparable_iff_exists_open : ¬(x ~ᵢ y) ↔ ∃ s : Set X, IsOpen s ∧ Xor' (x ∈ s) (y ∈ s) := by simp [inseparable_iff_forall_open, ← xor_iff_not_iff] #align not_inseparable_iff_exists_open not_inseparable_iff_exists_open theorem inseparable_iff_forall_closed : (x ~ᵢ y) ↔ ∀ s : Set X, IsClosed s → (x ∈ s ↔ y ∈ s) := by simp only [inseparable_iff_specializes_and, specializes_iff_forall_closed, ← forall_and, ← iff_def] #align inseparable_iff_forall_closed inseparable_iff_forall_closed theorem inseparable_iff_mem_closure : (x ~ᵢ y) ↔ x ∈ closure ({y} : Set X) ∧ y ∈ closure ({x} : Set X) := inseparable_iff_specializes_and.trans <| by simp only [specializes_iff_mem_closure, and_comm] #align inseparable_iff_mem_closure inseparable_iff_mem_closure theorem inseparable_iff_closure_eq : (x ~ᵢ y) ↔ closure ({x} : Set X) = closure {y} := by simp only [inseparable_iff_specializes_and, specializes_iff_closure_subset, ← subset_antisymm_iff, eq_comm] #align inseparable_iff_closure_eq inseparable_iff_closure_eq theorem inseparable_of_nhdsWithin_eq (hx : x ∈ s) (hy : y ∈ s) (h : 𝓝[s] x = 𝓝[s] y) : x ~ᵢ y := (specializes_of_nhdsWithin h.le hx).antisymm (specializes_of_nhdsWithin h.ge hy) #align inseparable_of_nhds_within_eq inseparable_of_nhdsWithin_eq theorem Inducing.inseparable_iff (hf : Inducing f) : (f x ~ᵢ f y) ↔ (x ~ᵢ y) := by simp only [inseparable_iff_specializes_and, hf.specializes_iff] #align inducing.inseparable_iff Inducing.inseparable_iff theorem subtype_inseparable_iff {p : X → Prop} (x y : Subtype p) : (x ~ᵢ y) ↔ ((x : X) ~ᵢ y) := inducing_subtype_val.inseparable_iff.symm #align subtype_inseparable_iff subtype_inseparable_iff @[simp] theorem inseparable_prod {x₁ x₂ : X} {y₁ y₂ : Y} : ((x₁, y₁) ~ᵢ (x₂, y₂)) ↔ (x₁ ~ᵢ x₂) ∧ (y₁ ~ᵢ y₂) := by simp only [Inseparable, nhds_prod_eq, prod_inj] #align inseparable_prod inseparable_prod theorem Inseparable.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ~ᵢ x₂) (hy : y₁ ~ᵢ y₂) : (x₁, y₁) ~ᵢ (x₂, y₂) := inseparable_prod.2 ⟨hx, hy⟩ #align inseparable.prod Inseparable.prod @[simp] theorem inseparable_pi {f g : ∀ i, π i} : (f ~ᵢ g) ↔ ∀ i, f i ~ᵢ g i := by simp only [Inseparable, nhds_pi, funext_iff, pi_inj] #align inseparable_pi inseparable_pi namespace Inseparable @[refl] theorem refl (x : X) : x ~ᵢ x := Eq.refl (𝓝 x) #align inseparable.refl Inseparable.refl theorem rfl : x ~ᵢ x := refl x #align inseparable.rfl Inseparable.rfl theorem of_eq (e : x = y) : Inseparable x y := e ▸ refl x #align inseparable.of_eq Inseparable.of_eq @[symm] nonrec theorem symm (h : x ~ᵢ y) : y ~ᵢ x := h.symm #align inseparable.symm Inseparable.symm @[trans] nonrec theorem trans (h₁ : x ~ᵢ y) (h₂ : y ~ᵢ z) : x ~ᵢ z := h₁.trans h₂ #align inseparable.trans Inseparable.trans theorem nhds_eq (h : x ~ᵢ y) : 𝓝 x = 𝓝 y := h #align inseparable.nhds_eq Inseparable.nhds_eq theorem mem_open_iff (h : x ~ᵢ y) (hs : IsOpen s) : x ∈ s ↔ y ∈ s := inseparable_iff_forall_open.1 h s hs #align inseparable.mem_open_iff Inseparable.mem_open_iff theorem mem_closed_iff (h : x ~ᵢ y) (hs : IsClosed s) : x ∈ s ↔ y ∈ s := inseparable_iff_forall_closed.1 h s hs #align inseparable.mem_closed_iff Inseparable.mem_closed_iff theorem map_of_continuousAt (h : x ~ᵢ y) (hx : ContinuousAt f x) (hy : ContinuousAt f y) : f x ~ᵢ f y := (h.specializes.map_of_continuousAt hy).antisymm (h.specializes'.map_of_continuousAt hx) #align inseparable.map_of_continuous_at Inseparable.map_of_continuousAt theorem map (h : x ~ᵢ y) (hf : Continuous f) : f x ~ᵢ f y := h.map_of_continuousAt hf.rst.imntinuousAt hf.rst.imntinuousAt #align inseparable.map Inseparable.map end Inseparable theorem IsClosed.not_inseparable (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬(x ~ᵢ y) := fun h => hy <| (h.mem_closed_iff hs).1 hx #align is_closed.not_inseparable IsClosed.not_inseparable theorem IsOpen.not_inseparable (hs : IsOpen s) (hx : x ∈ s) (hy : y ∉ s) : ¬(x ~ᵢ y) := fun h => hy <| (h.mem_open_iff hs).1 hx #align is_open.not_inseparable IsOpen.not_inseparable /-! ### Separation quotient In this section we define the quotient of a topological space by the `Inseparable` relation. -/ variable (X) /-- A `setoid` version of `Inseparable`, used to define the `SeparationQuotient`. -/ def inseparableSetoid : Setoid X := { Setoid.comap 𝓝 ⊥ with r := Inseparable } #align inseparable_setoid inseparableSetoid /-- The quotient of a topological space by its `inseparableSetoid`. This quotient is guaranteed to be a T₀ space. -/ def SeparationQuotient := Quotient (inseparableSetoid X) #align separation_quotient SeparationQuotient instance : TopologicalSpace (SeparationQuotient X) := instTopologicalSpaceQuotient variable {X} variable {t : Set (SeparationQuotient X)} namespace SeparationQuotient /-- The natural map from a topological space to its separation quotient. -/ def mk : X → SeparationQuotient X := Quotient.mk'' #align separation_quotient.mk SeparationQuotient.mk theorem quotientMap_mk : QuotientMap (mk : X → SeparationQuotient X) := quotientMap_quot_mk #align separation_quotient.quotient_map_mk SeparationQuotient.quotientMap_mk theorem continuous_mk : Continuous (mk : X → SeparationQuotient X) := continuous_quot_mk #align separation_quotient.continuous_mk SeparationQuotient.continuous_mk @[simp] theorem mk_eq_mk : mk x = mk y ↔ (x ~ᵢ y) := Quotient.eq'' #align separation_quotient.mk_eq_mk SeparationQuotient.mk_eq_mk theorem surjective_mk : Surjective (mk : X → SeparationQuotient X) := surjective_quot_mk _ #align separation_quotient.surjective_mk SeparationQuotient.surjective_mk @[simp] theorem range_mk : range (mk : X → SeparationQuotient X) = univ := surjective_mk.range_eq #align separation_quotient.range_mk SeparationQuotient.range_mk instance [Nonempty X] : Nonempty (SeparationQuotient X) := Nonempty.map mk ‹_› instance [Inhabited X] : Inhabited (SeparationQuotient X) := ⟨mk default⟩ instance [Subsingleton X] : Subsingleton (SeparationQuotient X) := surjective_mk.subsingleton theorem preimage_image_mk_open (hs : IsOpen s) : mk ⁻¹' (mk '' s) = s := by refine' Subset.antisymm _ (subset_preimage_image _ _) rintro x ⟨y, hys, hxy⟩
exact ((mk_eq_mk.1 hxy).mem_open_iff hs).1 hys
theorem preimage_image_mk_open (hs : IsOpen s) : mk ⁻¹' (mk '' s) = s := by refine' Subset.antisymm _ (subset_preimage_image _ _) rintro x ⟨y, hys, hxy⟩
Mathlib.Topology.Inseparable.464_0.2NeLzt0mQ64QlfB
theorem preimage_image_mk_open (hs : IsOpen s) : mk ⁻¹' (mk '' s) = s
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x y z : X s✝ : Set X f g : X → Y t : Set (SeparationQuotient X) s : Set X hs : IsOpen s ⊢ IsOpen (mk ⁻¹' (mk '' s))
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext; simp [specializes_iff_pure, le_def] theorem specializes_iff_forall_open : x ⤳ y ↔ ∀ s : Set X, IsOpen s → y ∈ s → x ∈ s := (specializes_TFAE x y).out 0 2 #align specializes_iff_forall_open specializes_iff_forall_open theorem Specializes.mem_open (h : x ⤳ y) (hs : IsOpen s) (hy : y ∈ s) : x ∈ s := specializes_iff_forall_open.1 h s hs hy #align specializes.mem_open Specializes.mem_open theorem IsOpen.not_specializes (hs : IsOpen s) (hx : x ∉ s) (hy : y ∈ s) : ¬x ⤳ y := fun h => hx <| h.mem_open hs hy #align is_open.not_specializes IsOpen.not_specializes theorem specializes_iff_forall_closed : x ⤳ y ↔ ∀ s : Set X, IsClosed s → x ∈ s → y ∈ s := (specializes_TFAE x y).out 0 3 #align specializes_iff_forall_closed specializes_iff_forall_closed theorem Specializes.mem_closed (h : x ⤳ y) (hs : IsClosed s) (hx : x ∈ s) : y ∈ s := specializes_iff_forall_closed.1 h s hs hx #align specializes.mem_closed Specializes.mem_closed theorem IsClosed.not_specializes (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬x ⤳ y := fun h => hy <| h.mem_closed hs hx #align is_closed.not_specializes IsClosed.not_specializes theorem specializes_iff_mem_closure : x ⤳ y ↔ y ∈ closure ({x} : Set X) := (specializes_TFAE x y).out 0 4 #align specializes_iff_mem_closure specializes_iff_mem_closure alias ⟨Specializes.mem_closure, _⟩ := specializes_iff_mem_closure #align specializes.mem_closure Specializes.mem_closure theorem specializes_iff_closure_subset : x ⤳ y ↔ closure ({y} : Set X) ⊆ closure {x} := (specializes_TFAE x y).out 0 5 #align specializes_iff_closure_subset specializes_iff_closure_subset alias ⟨Specializes.closure_subset, _⟩ := specializes_iff_closure_subset #align specializes.closure_subset Specializes.closure_subset -- porting note: new lemma theorem specializes_iff_clusterPt : x ⤳ y ↔ ClusterPt y (pure x) := (specializes_TFAE x y).out 0 6 theorem Filter.HasBasis.specializes_iff {ι} {p : ι → Prop} {s : ι → Set X} (h : (𝓝 y).HasBasis p s) : x ⤳ y ↔ ∀ i, p i → x ∈ s i := specializes_iff_pure.trans h.ge_iff #align filter.has_basis.specializes_iff Filter.HasBasis.specializes_iff theorem specializes_rfl : x ⤳ x := le_rfl #align specializes_rfl specializes_rfl @[refl] theorem specializes_refl (x : X) : x ⤳ x := specializes_rfl #align specializes_refl specializes_refl @[trans] theorem Specializes.trans : x ⤳ y → y ⤳ z → x ⤳ z := le_trans #align specializes.trans Specializes.trans theorem specializes_of_eq (e : x = y) : x ⤳ y := e ▸ specializes_refl x #align specializes_of_eq specializes_of_eq theorem specializes_of_nhdsWithin (h₁ : 𝓝[s] x ≤ 𝓝[s] y) (h₂ : x ∈ s) : x ⤳ y := specializes_iff_pure.2 <| calc pure x ≤ 𝓝[s] x := le_inf (pure_le_nhds _) (le_principal_iff.2 h₂) _ ≤ 𝓝[s] y := h₁ _ ≤ 𝓝 y := inf_le_left #align specializes_of_nhds_within specializes_of_nhdsWithin theorem Specializes.map_of_continuousAt (h : x ⤳ y) (hy : ContinuousAt f y) : f x ⤳ f y := specializes_iff_pure.2 fun _s hs => mem_pure.2 <| mem_preimage.1 <| mem_of_mem_nhds <| hy.mono_left h hs #align specializes.map_of_continuous_at Specializes.map_of_continuousAt theorem Specializes.map (h : x ⤳ y) (hf : Continuous f) : f x ⤳ f y := h.map_of_continuousAt hf.rst.imntinuousAt #align specializes.map Specializes.map theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y := by simp only [specializes_iff_mem_closure, hf.closure_eq_preimage_closure_image, image_singleton, mem_preimage] #align inducing.specializes_iff Inducing.specializes_iff theorem subtype_specializes_iff {p : X → Prop} (x y : Subtype p) : x ⤳ y ↔ (x : X) ⤳ y := inducing_subtype_val.specializes_iff.symm #align subtype_specializes_iff subtype_specializes_iff @[simp] theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂ := by simp only [Specializes, nhds_prod_eq, prod_le_prod] #align specializes_prod specializes_prod theorem Specializes.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ⤳ x₂) (hy : y₁ ⤳ y₂) : (x₁, y₁) ⤳ (x₂, y₂) := specializes_prod.2 ⟨hx, hy⟩ #align specializes.prod Specializes.prod @[simp] theorem specializes_pi {f g : ∀ i, π i} : f ⤳ g ↔ ∀ i, f i ⤳ g i := by simp only [Specializes, nhds_pi, pi_le_pi] #align specializes_pi specializes_pi theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S := by rw [specializes_iff_forall_open] push_neg rfl #align not_specializes_iff_exists_open not_specializes_iff_exists_open theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S := by rw [specializes_iff_forall_closed] push_neg rfl #align not_specializes_iff_exists_closed not_specializes_iff_exists_closed theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) : Continuous (s.piecewise f g) := by have : ∀ U, IsOpen U → g ⁻¹' U ⊆ f ⁻¹' U := fun U hU x hx ↦ (hspec x).mem_open hU hx rw [continuous_def] intro U hU rw [piecewise_preimage, ite_eq_of_subset_right _ (this U hU)] exact hU.preimage hf |>.inter hs |>.union (hU.preimage hg) theorem IsClosed.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsClosed s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, g x ⤳ f x) : Continuous (s.piecewise f g) := by simpa only [piecewise_compl] using hs.isOpen_compl.continuous_piecewise_of_specializes hg hf hspec variable (X) /-- Specialization forms a preorder on the topological space. -/ def specializationPreorder : Preorder X := { Preorder.lift (OrderDual.toDual ∘ 𝓝) with le := fun x y => y ⤳ x lt := fun x y => y ⤳ x ∧ ¬x ⤳ y } #align specialization_preorder specializationPreorder variable {X} /-- A continuous function is monotone with respect to the specialization preorders on the domain and the codomain. -/ theorem Continuous.specialization_monotone (hf : Continuous f) : @Monotone _ _ (specializationPreorder X) (specializationPreorder Y) f := fun _ _ h => h.map hf #align continuous.specialization_monotone Continuous.specialization_monotone /-! ### `Inseparable` relation -/ /-- Two points `x` and `y` in a topological space are `Inseparable` if any of the following equivalent properties hold: - `𝓝 x = 𝓝 y`; we use this property as the definition; - for any open set `s`, `x ∈ s ↔ y ∈ s`, see `inseparable_iff_open`; - for any closed set `s`, `x ∈ s ↔ y ∈ s`, see `inseparable_iff_closed`; - `x ∈ closure {y}` and `y ∈ closure {x}`, see `inseparable_iff_mem_closure`; - `closure {x} = closure {y}`, see `inseparable_iff_closure_eq`. -/ def Inseparable (x y : X) : Prop := 𝓝 x = 𝓝 y #align inseparable Inseparable local infixl:0 " ~ᵢ " => Inseparable theorem inseparable_def : (x ~ᵢ y) ↔ 𝓝 x = 𝓝 y := Iff.rfl #align inseparable_def inseparable_def theorem inseparable_iff_specializes_and : (x ~ᵢ y) ↔ x ⤳ y ∧ y ⤳ x := le_antisymm_iff #align inseparable_iff_specializes_and inseparable_iff_specializes_and theorem Inseparable.specializes (h : x ~ᵢ y) : x ⤳ y := h.le #align inseparable.specializes Inseparable.specializes theorem Inseparable.specializes' (h : x ~ᵢ y) : y ⤳ x := h.ge #align inseparable.specializes' Inseparable.specializes' theorem Specializes.antisymm (h₁ : x ⤳ y) (h₂ : y ⤳ x) : x ~ᵢ y := le_antisymm h₁ h₂ #align specializes.antisymm Specializes.antisymm theorem inseparable_iff_forall_open : (x ~ᵢ y) ↔ ∀ s : Set X, IsOpen s → (x ∈ s ↔ y ∈ s) := by simp only [inseparable_iff_specializes_and, specializes_iff_forall_open, ← forall_and, ← iff_def, Iff.comm] #align inseparable_iff_forall_open inseparable_iff_forall_open theorem not_inseparable_iff_exists_open : ¬(x ~ᵢ y) ↔ ∃ s : Set X, IsOpen s ∧ Xor' (x ∈ s) (y ∈ s) := by simp [inseparable_iff_forall_open, ← xor_iff_not_iff] #align not_inseparable_iff_exists_open not_inseparable_iff_exists_open theorem inseparable_iff_forall_closed : (x ~ᵢ y) ↔ ∀ s : Set X, IsClosed s → (x ∈ s ↔ y ∈ s) := by simp only [inseparable_iff_specializes_and, specializes_iff_forall_closed, ← forall_and, ← iff_def] #align inseparable_iff_forall_closed inseparable_iff_forall_closed theorem inseparable_iff_mem_closure : (x ~ᵢ y) ↔ x ∈ closure ({y} : Set X) ∧ y ∈ closure ({x} : Set X) := inseparable_iff_specializes_and.trans <| by simp only [specializes_iff_mem_closure, and_comm] #align inseparable_iff_mem_closure inseparable_iff_mem_closure theorem inseparable_iff_closure_eq : (x ~ᵢ y) ↔ closure ({x} : Set X) = closure {y} := by simp only [inseparable_iff_specializes_and, specializes_iff_closure_subset, ← subset_antisymm_iff, eq_comm] #align inseparable_iff_closure_eq inseparable_iff_closure_eq theorem inseparable_of_nhdsWithin_eq (hx : x ∈ s) (hy : y ∈ s) (h : 𝓝[s] x = 𝓝[s] y) : x ~ᵢ y := (specializes_of_nhdsWithin h.le hx).antisymm (specializes_of_nhdsWithin h.ge hy) #align inseparable_of_nhds_within_eq inseparable_of_nhdsWithin_eq theorem Inducing.inseparable_iff (hf : Inducing f) : (f x ~ᵢ f y) ↔ (x ~ᵢ y) := by simp only [inseparable_iff_specializes_and, hf.specializes_iff] #align inducing.inseparable_iff Inducing.inseparable_iff theorem subtype_inseparable_iff {p : X → Prop} (x y : Subtype p) : (x ~ᵢ y) ↔ ((x : X) ~ᵢ y) := inducing_subtype_val.inseparable_iff.symm #align subtype_inseparable_iff subtype_inseparable_iff @[simp] theorem inseparable_prod {x₁ x₂ : X} {y₁ y₂ : Y} : ((x₁, y₁) ~ᵢ (x₂, y₂)) ↔ (x₁ ~ᵢ x₂) ∧ (y₁ ~ᵢ y₂) := by simp only [Inseparable, nhds_prod_eq, prod_inj] #align inseparable_prod inseparable_prod theorem Inseparable.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ~ᵢ x₂) (hy : y₁ ~ᵢ y₂) : (x₁, y₁) ~ᵢ (x₂, y₂) := inseparable_prod.2 ⟨hx, hy⟩ #align inseparable.prod Inseparable.prod @[simp] theorem inseparable_pi {f g : ∀ i, π i} : (f ~ᵢ g) ↔ ∀ i, f i ~ᵢ g i := by simp only [Inseparable, nhds_pi, funext_iff, pi_inj] #align inseparable_pi inseparable_pi namespace Inseparable @[refl] theorem refl (x : X) : x ~ᵢ x := Eq.refl (𝓝 x) #align inseparable.refl Inseparable.refl theorem rfl : x ~ᵢ x := refl x #align inseparable.rfl Inseparable.rfl theorem of_eq (e : x = y) : Inseparable x y := e ▸ refl x #align inseparable.of_eq Inseparable.of_eq @[symm] nonrec theorem symm (h : x ~ᵢ y) : y ~ᵢ x := h.symm #align inseparable.symm Inseparable.symm @[trans] nonrec theorem trans (h₁ : x ~ᵢ y) (h₂ : y ~ᵢ z) : x ~ᵢ z := h₁.trans h₂ #align inseparable.trans Inseparable.trans theorem nhds_eq (h : x ~ᵢ y) : 𝓝 x = 𝓝 y := h #align inseparable.nhds_eq Inseparable.nhds_eq theorem mem_open_iff (h : x ~ᵢ y) (hs : IsOpen s) : x ∈ s ↔ y ∈ s := inseparable_iff_forall_open.1 h s hs #align inseparable.mem_open_iff Inseparable.mem_open_iff theorem mem_closed_iff (h : x ~ᵢ y) (hs : IsClosed s) : x ∈ s ↔ y ∈ s := inseparable_iff_forall_closed.1 h s hs #align inseparable.mem_closed_iff Inseparable.mem_closed_iff theorem map_of_continuousAt (h : x ~ᵢ y) (hx : ContinuousAt f x) (hy : ContinuousAt f y) : f x ~ᵢ f y := (h.specializes.map_of_continuousAt hy).antisymm (h.specializes'.map_of_continuousAt hx) #align inseparable.map_of_continuous_at Inseparable.map_of_continuousAt theorem map (h : x ~ᵢ y) (hf : Continuous f) : f x ~ᵢ f y := h.map_of_continuousAt hf.rst.imntinuousAt hf.rst.imntinuousAt #align inseparable.map Inseparable.map end Inseparable theorem IsClosed.not_inseparable (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬(x ~ᵢ y) := fun h => hy <| (h.mem_closed_iff hs).1 hx #align is_closed.not_inseparable IsClosed.not_inseparable theorem IsOpen.not_inseparable (hs : IsOpen s) (hx : x ∈ s) (hy : y ∉ s) : ¬(x ~ᵢ y) := fun h => hy <| (h.mem_open_iff hs).1 hx #align is_open.not_inseparable IsOpen.not_inseparable /-! ### Separation quotient In this section we define the quotient of a topological space by the `Inseparable` relation. -/ variable (X) /-- A `setoid` version of `Inseparable`, used to define the `SeparationQuotient`. -/ def inseparableSetoid : Setoid X := { Setoid.comap 𝓝 ⊥ with r := Inseparable } #align inseparable_setoid inseparableSetoid /-- The quotient of a topological space by its `inseparableSetoid`. This quotient is guaranteed to be a T₀ space. -/ def SeparationQuotient := Quotient (inseparableSetoid X) #align separation_quotient SeparationQuotient instance : TopologicalSpace (SeparationQuotient X) := instTopologicalSpaceQuotient variable {X} variable {t : Set (SeparationQuotient X)} namespace SeparationQuotient /-- The natural map from a topological space to its separation quotient. -/ def mk : X → SeparationQuotient X := Quotient.mk'' #align separation_quotient.mk SeparationQuotient.mk theorem quotientMap_mk : QuotientMap (mk : X → SeparationQuotient X) := quotientMap_quot_mk #align separation_quotient.quotient_map_mk SeparationQuotient.quotientMap_mk theorem continuous_mk : Continuous (mk : X → SeparationQuotient X) := continuous_quot_mk #align separation_quotient.continuous_mk SeparationQuotient.continuous_mk @[simp] theorem mk_eq_mk : mk x = mk y ↔ (x ~ᵢ y) := Quotient.eq'' #align separation_quotient.mk_eq_mk SeparationQuotient.mk_eq_mk theorem surjective_mk : Surjective (mk : X → SeparationQuotient X) := surjective_quot_mk _ #align separation_quotient.surjective_mk SeparationQuotient.surjective_mk @[simp] theorem range_mk : range (mk : X → SeparationQuotient X) = univ := surjective_mk.range_eq #align separation_quotient.range_mk SeparationQuotient.range_mk instance [Nonempty X] : Nonempty (SeparationQuotient X) := Nonempty.map mk ‹_› instance [Inhabited X] : Inhabited (SeparationQuotient X) := ⟨mk default⟩ instance [Subsingleton X] : Subsingleton (SeparationQuotient X) := surjective_mk.subsingleton theorem preimage_image_mk_open (hs : IsOpen s) : mk ⁻¹' (mk '' s) = s := by refine' Subset.antisymm _ (subset_preimage_image _ _) rintro x ⟨y, hys, hxy⟩ exact ((mk_eq_mk.1 hxy).mem_open_iff hs).1 hys #align separation_quotient.preimage_image_mk_open SeparationQuotient.preimage_image_mk_open theorem isOpenMap_mk : IsOpenMap (mk : X → SeparationQuotient X) := fun s hs => quotientMap_mk.isOpen_preimage.1 <| by
rwa [preimage_image_mk_open hs]
theorem isOpenMap_mk : IsOpenMap (mk : X → SeparationQuotient X) := fun s hs => quotientMap_mk.isOpen_preimage.1 <| by
Mathlib.Topology.Inseparable.470_0.2NeLzt0mQ64QlfB
theorem isOpenMap_mk : IsOpenMap (mk : X → SeparationQuotient X)
Mathlib_Topology_Inseparable
X : Type u_1 Y : Type u_2 Z : Type u_3 α : Type u_4 ι : Type u_5 π : ι → Type u_6 inst✝³ : TopologicalSpace X inst✝² : TopologicalSpace Y inst✝¹ : TopologicalSpace Z inst✝ : (i : ι) → TopologicalSpace (π i) x y z : X s : Set X f g : X → Y t : Set (SeparationQuotient X) hs : IsClosed s ⊢ mk ⁻¹' (mk '' s) = s
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury G. Kudryashov -/ import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn #align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" /-! # Inseparable points in a topological space In this file we define * `Specializes` (notation: `x ⤳ y`) : a relation saying that `𝓝 x ≤ 𝓝 y`; * `Inseparable`: a relation saying that two points in a topological space have the same neighbourhoods; equivalently, they can't be separated by an open set; * `InseparableSetoid X`: same relation, as a `Setoid`; * `SeparationQuotient X`: the quotient of `X` by its `InseparableSetoid`. We also prove various basic properties of the relation `Inseparable`. ## Notations - `x ⤳ y`: notation for `Specializes x y`; - `x ~ᵢ y` is used as a local notation for `Inseparable x y`; - `𝓝 x` is the neighbourhoods filter `nhds x` of a point `x`, defined elsewhere. ## Tags topological space, separation setoid -/ open Set Filter Function Topology List variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [∀ i, TopologicalSpace (π i)] {x y z : X} {s : Set X} {f g : X → Y} /-! ### `Specializes` relation -/ /-- `x` specializes to `y` (notation: `x ⤳ y`) if either of the following equivalent properties hold: * `𝓝 x ≤ 𝓝 y`; this property is used as the definition; * `pure x ≤ 𝓝 y`; in other words, any neighbourhood of `y` contains `x`; * `y ∈ closure {x}`; * `closure {y} ⊆ closure {x}`; * for any closed set `s` we have `x ∈ s → y ∈ s`; * for any open set `s` we have `y ∈ s → x ∈ s`; * `y` is a cluster point of the filter `pure x = 𝓟 {x}`. This relation defines a `Preorder` on `X`. If `X` is a T₀ space, then this preorder is a partial order. If `X` is a T₁ space, then this partial order is trivial : `x ⤳ y ↔ x = y`. -/ def Specializes (x y : X) : Prop := 𝓝 x ≤ 𝓝 y #align specializes Specializes @[inherit_doc] infixl:300 " ⤳ " => Specializes /-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas below. -/ theorem specializes_TFAE (x y : X) : TFAE [x ⤳ y, pure x ≤ 𝓝 y, ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s, ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s, y ∈ closure ({ x } : Set X), closure ({ y } : Set X) ⊆ closure { x }, ClusterPt y (pure x)] := by tfae_have 1 → 2 · exact (pure_le_nhds _).trans tfae_have 2 → 3 · exact fun h s hso hy => h (hso.mem_nhds hy) tfae_have 3 → 4 · exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx tfae_have 4 → 5 · exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _) tfae_have 6 ↔ 5 · exact isClosed_closure.closure_subset_iff.trans singleton_subset_iff tfae_have 5 ↔ 7 · rw [mem_closure_iff_clusterPt, principal_singleton] tfae_have 5 → 1 · refine' fun h => (nhds_basis_opens _).ge_iff.2 _ rintro s ⟨hy, ho⟩ rcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩ exact ho.mem_nhds hxs tfae_finish #align specializes_tfae specializes_TFAE theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y := Iff.rfl #align specializes_iff_nhds specializes_iff_nhds theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y := (specializes_TFAE x y).out 0 1 #align specializes_iff_pure specializes_iff_pure alias ⟨Specializes.nhds_le_nhds, _⟩ := specializes_iff_nhds #align specializes.nhds_le_nhds Specializes.nhds_le_nhds alias ⟨Specializes.pure_le_nhds, _⟩ := specializes_iff_pure #align specializes.pure_le_nhds Specializes.pure_le_nhds theorem ker_nhds_eq_specializes : (𝓝 x).ker = {y | y ⤳ x} := by ext; simp [specializes_iff_pure, le_def] theorem specializes_iff_forall_open : x ⤳ y ↔ ∀ s : Set X, IsOpen s → y ∈ s → x ∈ s := (specializes_TFAE x y).out 0 2 #align specializes_iff_forall_open specializes_iff_forall_open theorem Specializes.mem_open (h : x ⤳ y) (hs : IsOpen s) (hy : y ∈ s) : x ∈ s := specializes_iff_forall_open.1 h s hs hy #align specializes.mem_open Specializes.mem_open theorem IsOpen.not_specializes (hs : IsOpen s) (hx : x ∉ s) (hy : y ∈ s) : ¬x ⤳ y := fun h => hx <| h.mem_open hs hy #align is_open.not_specializes IsOpen.not_specializes theorem specializes_iff_forall_closed : x ⤳ y ↔ ∀ s : Set X, IsClosed s → x ∈ s → y ∈ s := (specializes_TFAE x y).out 0 3 #align specializes_iff_forall_closed specializes_iff_forall_closed theorem Specializes.mem_closed (h : x ⤳ y) (hs : IsClosed s) (hx : x ∈ s) : y ∈ s := specializes_iff_forall_closed.1 h s hs hx #align specializes.mem_closed Specializes.mem_closed theorem IsClosed.not_specializes (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬x ⤳ y := fun h => hy <| h.mem_closed hs hx #align is_closed.not_specializes IsClosed.not_specializes theorem specializes_iff_mem_closure : x ⤳ y ↔ y ∈ closure ({x} : Set X) := (specializes_TFAE x y).out 0 4 #align specializes_iff_mem_closure specializes_iff_mem_closure alias ⟨Specializes.mem_closure, _⟩ := specializes_iff_mem_closure #align specializes.mem_closure Specializes.mem_closure theorem specializes_iff_closure_subset : x ⤳ y ↔ closure ({y} : Set X) ⊆ closure {x} := (specializes_TFAE x y).out 0 5 #align specializes_iff_closure_subset specializes_iff_closure_subset alias ⟨Specializes.closure_subset, _⟩ := specializes_iff_closure_subset #align specializes.closure_subset Specializes.closure_subset -- porting note: new lemma theorem specializes_iff_clusterPt : x ⤳ y ↔ ClusterPt y (pure x) := (specializes_TFAE x y).out 0 6 theorem Filter.HasBasis.specializes_iff {ι} {p : ι → Prop} {s : ι → Set X} (h : (𝓝 y).HasBasis p s) : x ⤳ y ↔ ∀ i, p i → x ∈ s i := specializes_iff_pure.trans h.ge_iff #align filter.has_basis.specializes_iff Filter.HasBasis.specializes_iff theorem specializes_rfl : x ⤳ x := le_rfl #align specializes_rfl specializes_rfl @[refl] theorem specializes_refl (x : X) : x ⤳ x := specializes_rfl #align specializes_refl specializes_refl @[trans] theorem Specializes.trans : x ⤳ y → y ⤳ z → x ⤳ z := le_trans #align specializes.trans Specializes.trans theorem specializes_of_eq (e : x = y) : x ⤳ y := e ▸ specializes_refl x #align specializes_of_eq specializes_of_eq theorem specializes_of_nhdsWithin (h₁ : 𝓝[s] x ≤ 𝓝[s] y) (h₂ : x ∈ s) : x ⤳ y := specializes_iff_pure.2 <| calc pure x ≤ 𝓝[s] x := le_inf (pure_le_nhds _) (le_principal_iff.2 h₂) _ ≤ 𝓝[s] y := h₁ _ ≤ 𝓝 y := inf_le_left #align specializes_of_nhds_within specializes_of_nhdsWithin theorem Specializes.map_of_continuousAt (h : x ⤳ y) (hy : ContinuousAt f y) : f x ⤳ f y := specializes_iff_pure.2 fun _s hs => mem_pure.2 <| mem_preimage.1 <| mem_of_mem_nhds <| hy.mono_left h hs #align specializes.map_of_continuous_at Specializes.map_of_continuousAt theorem Specializes.map (h : x ⤳ y) (hf : Continuous f) : f x ⤳ f y := h.map_of_continuousAt hf.rst.imntinuousAt #align specializes.map Specializes.map theorem Inducing.specializes_iff (hf : Inducing f) : f x ⤳ f y ↔ x ⤳ y := by simp only [specializes_iff_mem_closure, hf.closure_eq_preimage_closure_image, image_singleton, mem_preimage] #align inducing.specializes_iff Inducing.specializes_iff theorem subtype_specializes_iff {p : X → Prop} (x y : Subtype p) : x ⤳ y ↔ (x : X) ⤳ y := inducing_subtype_val.specializes_iff.symm #align subtype_specializes_iff subtype_specializes_iff @[simp] theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂ := by simp only [Specializes, nhds_prod_eq, prod_le_prod] #align specializes_prod specializes_prod theorem Specializes.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ⤳ x₂) (hy : y₁ ⤳ y₂) : (x₁, y₁) ⤳ (x₂, y₂) := specializes_prod.2 ⟨hx, hy⟩ #align specializes.prod Specializes.prod @[simp] theorem specializes_pi {f g : ∀ i, π i} : f ⤳ g ↔ ∀ i, f i ⤳ g i := by simp only [Specializes, nhds_pi, pi_le_pi] #align specializes_pi specializes_pi theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S := by rw [specializes_iff_forall_open] push_neg rfl #align not_specializes_iff_exists_open not_specializes_iff_exists_open theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S := by rw [specializes_iff_forall_closed] push_neg rfl #align not_specializes_iff_exists_closed not_specializes_iff_exists_closed theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) : Continuous (s.piecewise f g) := by have : ∀ U, IsOpen U → g ⁻¹' U ⊆ f ⁻¹' U := fun U hU x hx ↦ (hspec x).mem_open hU hx rw [continuous_def] intro U hU rw [piecewise_preimage, ite_eq_of_subset_right _ (this U hU)] exact hU.preimage hf |>.inter hs |>.union (hU.preimage hg) theorem IsClosed.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsClosed s) (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, g x ⤳ f x) : Continuous (s.piecewise f g) := by simpa only [piecewise_compl] using hs.isOpen_compl.continuous_piecewise_of_specializes hg hf hspec variable (X) /-- Specialization forms a preorder on the topological space. -/ def specializationPreorder : Preorder X := { Preorder.lift (OrderDual.toDual ∘ 𝓝) with le := fun x y => y ⤳ x lt := fun x y => y ⤳ x ∧ ¬x ⤳ y } #align specialization_preorder specializationPreorder variable {X} /-- A continuous function is monotone with respect to the specialization preorders on the domain and the codomain. -/ theorem Continuous.specialization_monotone (hf : Continuous f) : @Monotone _ _ (specializationPreorder X) (specializationPreorder Y) f := fun _ _ h => h.map hf #align continuous.specialization_monotone Continuous.specialization_monotone /-! ### `Inseparable` relation -/ /-- Two points `x` and `y` in a topological space are `Inseparable` if any of the following equivalent properties hold: - `𝓝 x = 𝓝 y`; we use this property as the definition; - for any open set `s`, `x ∈ s ↔ y ∈ s`, see `inseparable_iff_open`; - for any closed set `s`, `x ∈ s ↔ y ∈ s`, see `inseparable_iff_closed`; - `x ∈ closure {y}` and `y ∈ closure {x}`, see `inseparable_iff_mem_closure`; - `closure {x} = closure {y}`, see `inseparable_iff_closure_eq`. -/ def Inseparable (x y : X) : Prop := 𝓝 x = 𝓝 y #align inseparable Inseparable local infixl:0 " ~ᵢ " => Inseparable theorem inseparable_def : (x ~ᵢ y) ↔ 𝓝 x = 𝓝 y := Iff.rfl #align inseparable_def inseparable_def theorem inseparable_iff_specializes_and : (x ~ᵢ y) ↔ x ⤳ y ∧ y ⤳ x := le_antisymm_iff #align inseparable_iff_specializes_and inseparable_iff_specializes_and theorem Inseparable.specializes (h : x ~ᵢ y) : x ⤳ y := h.le #align inseparable.specializes Inseparable.specializes theorem Inseparable.specializes' (h : x ~ᵢ y) : y ⤳ x := h.ge #align inseparable.specializes' Inseparable.specializes' theorem Specializes.antisymm (h₁ : x ⤳ y) (h₂ : y ⤳ x) : x ~ᵢ y := le_antisymm h₁ h₂ #align specializes.antisymm Specializes.antisymm theorem inseparable_iff_forall_open : (x ~ᵢ y) ↔ ∀ s : Set X, IsOpen s → (x ∈ s ↔ y ∈ s) := by simp only [inseparable_iff_specializes_and, specializes_iff_forall_open, ← forall_and, ← iff_def, Iff.comm] #align inseparable_iff_forall_open inseparable_iff_forall_open theorem not_inseparable_iff_exists_open : ¬(x ~ᵢ y) ↔ ∃ s : Set X, IsOpen s ∧ Xor' (x ∈ s) (y ∈ s) := by simp [inseparable_iff_forall_open, ← xor_iff_not_iff] #align not_inseparable_iff_exists_open not_inseparable_iff_exists_open theorem inseparable_iff_forall_closed : (x ~ᵢ y) ↔ ∀ s : Set X, IsClosed s → (x ∈ s ↔ y ∈ s) := by simp only [inseparable_iff_specializes_and, specializes_iff_forall_closed, ← forall_and, ← iff_def] #align inseparable_iff_forall_closed inseparable_iff_forall_closed theorem inseparable_iff_mem_closure : (x ~ᵢ y) ↔ x ∈ closure ({y} : Set X) ∧ y ∈ closure ({x} : Set X) := inseparable_iff_specializes_and.trans <| by simp only [specializes_iff_mem_closure, and_comm] #align inseparable_iff_mem_closure inseparable_iff_mem_closure theorem inseparable_iff_closure_eq : (x ~ᵢ y) ↔ closure ({x} : Set X) = closure {y} := by simp only [inseparable_iff_specializes_and, specializes_iff_closure_subset, ← subset_antisymm_iff, eq_comm] #align inseparable_iff_closure_eq inseparable_iff_closure_eq theorem inseparable_of_nhdsWithin_eq (hx : x ∈ s) (hy : y ∈ s) (h : 𝓝[s] x = 𝓝[s] y) : x ~ᵢ y := (specializes_of_nhdsWithin h.le hx).antisymm (specializes_of_nhdsWithin h.ge hy) #align inseparable_of_nhds_within_eq inseparable_of_nhdsWithin_eq theorem Inducing.inseparable_iff (hf : Inducing f) : (f x ~ᵢ f y) ↔ (x ~ᵢ y) := by simp only [inseparable_iff_specializes_and, hf.specializes_iff] #align inducing.inseparable_iff Inducing.inseparable_iff theorem subtype_inseparable_iff {p : X → Prop} (x y : Subtype p) : (x ~ᵢ y) ↔ ((x : X) ~ᵢ y) := inducing_subtype_val.inseparable_iff.symm #align subtype_inseparable_iff subtype_inseparable_iff @[simp] theorem inseparable_prod {x₁ x₂ : X} {y₁ y₂ : Y} : ((x₁, y₁) ~ᵢ (x₂, y₂)) ↔ (x₁ ~ᵢ x₂) ∧ (y₁ ~ᵢ y₂) := by simp only [Inseparable, nhds_prod_eq, prod_inj] #align inseparable_prod inseparable_prod theorem Inseparable.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ~ᵢ x₂) (hy : y₁ ~ᵢ y₂) : (x₁, y₁) ~ᵢ (x₂, y₂) := inseparable_prod.2 ⟨hx, hy⟩ #align inseparable.prod Inseparable.prod @[simp] theorem inseparable_pi {f g : ∀ i, π i} : (f ~ᵢ g) ↔ ∀ i, f i ~ᵢ g i := by simp only [Inseparable, nhds_pi, funext_iff, pi_inj] #align inseparable_pi inseparable_pi namespace Inseparable @[refl] theorem refl (x : X) : x ~ᵢ x := Eq.refl (𝓝 x) #align inseparable.refl Inseparable.refl theorem rfl : x ~ᵢ x := refl x #align inseparable.rfl Inseparable.rfl theorem of_eq (e : x = y) : Inseparable x y := e ▸ refl x #align inseparable.of_eq Inseparable.of_eq @[symm] nonrec theorem symm (h : x ~ᵢ y) : y ~ᵢ x := h.symm #align inseparable.symm Inseparable.symm @[trans] nonrec theorem trans (h₁ : x ~ᵢ y) (h₂ : y ~ᵢ z) : x ~ᵢ z := h₁.trans h₂ #align inseparable.trans Inseparable.trans theorem nhds_eq (h : x ~ᵢ y) : 𝓝 x = 𝓝 y := h #align inseparable.nhds_eq Inseparable.nhds_eq theorem mem_open_iff (h : x ~ᵢ y) (hs : IsOpen s) : x ∈ s ↔ y ∈ s := inseparable_iff_forall_open.1 h s hs #align inseparable.mem_open_iff Inseparable.mem_open_iff theorem mem_closed_iff (h : x ~ᵢ y) (hs : IsClosed s) : x ∈ s ↔ y ∈ s := inseparable_iff_forall_closed.1 h s hs #align inseparable.mem_closed_iff Inseparable.mem_closed_iff theorem map_of_continuousAt (h : x ~ᵢ y) (hx : ContinuousAt f x) (hy : ContinuousAt f y) : f x ~ᵢ f y := (h.specializes.map_of_continuousAt hy).antisymm (h.specializes'.map_of_continuousAt hx) #align inseparable.map_of_continuous_at Inseparable.map_of_continuousAt theorem map (h : x ~ᵢ y) (hf : Continuous f) : f x ~ᵢ f y := h.map_of_continuousAt hf.rst.imntinuousAt hf.rst.imntinuousAt #align inseparable.map Inseparable.map end Inseparable theorem IsClosed.not_inseparable (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬(x ~ᵢ y) := fun h => hy <| (h.mem_closed_iff hs).1 hx #align is_closed.not_inseparable IsClosed.not_inseparable theorem IsOpen.not_inseparable (hs : IsOpen s) (hx : x ∈ s) (hy : y ∉ s) : ¬(x ~ᵢ y) := fun h => hy <| (h.mem_open_iff hs).1 hx #align is_open.not_inseparable IsOpen.not_inseparable /-! ### Separation quotient In this section we define the quotient of a topological space by the `Inseparable` relation. -/ variable (X) /-- A `setoid` version of `Inseparable`, used to define the `SeparationQuotient`. -/ def inseparableSetoid : Setoid X := { Setoid.comap 𝓝 ⊥ with r := Inseparable } #align inseparable_setoid inseparableSetoid /-- The quotient of a topological space by its `inseparableSetoid`. This quotient is guaranteed to be a T₀ space. -/ def SeparationQuotient := Quotient (inseparableSetoid X) #align separation_quotient SeparationQuotient instance : TopologicalSpace (SeparationQuotient X) := instTopologicalSpaceQuotient variable {X} variable {t : Set (SeparationQuotient X)} namespace SeparationQuotient /-- The natural map from a topological space to its separation quotient. -/ def mk : X → SeparationQuotient X := Quotient.mk'' #align separation_quotient.mk SeparationQuotient.mk theorem quotientMap_mk : QuotientMap (mk : X → SeparationQuotient X) := quotientMap_quot_mk #align separation_quotient.quotient_map_mk SeparationQuotient.quotientMap_mk theorem continuous_mk : Continuous (mk : X → SeparationQuotient X) := continuous_quot_mk #align separation_quotient.continuous_mk SeparationQuotient.continuous_mk @[simp] theorem mk_eq_mk : mk x = mk y ↔ (x ~ᵢ y) := Quotient.eq'' #align separation_quotient.mk_eq_mk SeparationQuotient.mk_eq_mk theorem surjective_mk : Surjective (mk : X → SeparationQuotient X) := surjective_quot_mk _ #align separation_quotient.surjective_mk SeparationQuotient.surjective_mk @[simp] theorem range_mk : range (mk : X → SeparationQuotient X) = univ := surjective_mk.range_eq #align separation_quotient.range_mk SeparationQuotient.range_mk instance [Nonempty X] : Nonempty (SeparationQuotient X) := Nonempty.map mk ‹_› instance [Inhabited X] : Inhabited (SeparationQuotient X) := ⟨mk default⟩ instance [Subsingleton X] : Subsingleton (SeparationQuotient X) := surjective_mk.subsingleton theorem preimage_image_mk_open (hs : IsOpen s) : mk ⁻¹' (mk '' s) = s := by refine' Subset.antisymm _ (subset_preimage_image _ _) rintro x ⟨y, hys, hxy⟩ exact ((mk_eq_mk.1 hxy).mem_open_iff hs).1 hys #align separation_quotient.preimage_image_mk_open SeparationQuotient.preimage_image_mk_open theorem isOpenMap_mk : IsOpenMap (mk : X → SeparationQuotient X) := fun s hs => quotientMap_mk.isOpen_preimage.1 <| by rwa [preimage_image_mk_open hs] #align separation_quotient.is_open_map_mk SeparationQuotient.isOpenMap_mk theorem preimage_image_mk_closed (hs : IsClosed s) : mk ⁻¹' (mk '' s) = s := by
refine' Subset.antisymm _ (subset_preimage_image _ _)
theorem preimage_image_mk_closed (hs : IsClosed s) : mk ⁻¹' (mk '' s) = s := by
Mathlib.Topology.Inseparable.474_0.2NeLzt0mQ64QlfB
theorem preimage_image_mk_closed (hs : IsClosed s) : mk ⁻¹' (mk '' s) = s
Mathlib_Topology_Inseparable