File: Mathlib/Topology/Perfect.lean

full_name: AccPt.nhds_inter
code: /-- If `x` is an accumulation point of a set `C` and `U` is a neighborhood of `x`,
then `x` is an accumulation point of `U ∩ C`. -/
theorem AccPt.nhds_inter {x : α} {U : Set α} (h_acc : AccPt x (𝓟 C)) (hU : U ∈ 𝓝 x) :
    AccPt x (𝓟 (U ∩ C)) 
goal: AccPt x (𝓟 (U ∩ C))

full_name: Preperfect
code: /-- A set `C` is preperfect if all of its points are accumulation points of itself.
If `C` is nonempty and `α` is a T1 space, this is equivalent to the closure of `C` being perfect.
See `preperfect_iff_perfect_closure`. -/
def Preperfect (C : Set α) : Prop 
goal: Prop

full_name: Perfect
code: /-- A set `C` is called perfect if it is closed and all of its
points are accumulation points of itself.
Note that we do not require `C` to be nonempty. -/
@[mk_iff perfect_def]
structure Perfect (C : Set α) : Prop where
  closed : IsClosed C
  acc : Preperfect C
goal: Prop

full_name: perfect_def
code: /-- A set `C` is called perfect if it is closed and all of its
points are accumulation points of itself.
Note that we do not require `C` to be nonempty. -/
@[mk_iff perfect_def]
structure Perfect (C : Set α) : Prop where
  closed : IsClosed C
  acc : Preperfect C
goal: Perfect C ↔ IsClosed C ∧ Preperfect C

full_name: Perfect.closed
code: /-- A set `C` is called perfect if it is closed and all of its
points are accumulation points of itself.
Note that we do not require `C` to be nonempty. -/
@[mk_iff perfect_def]
structure Perfect (C : Set α) : Prop where
  closed : IsClosed C
  acc : Preperfect C
goal: IsClosed C

full_name: Perfect.acc
code: /-- A set `C` is called perfect if it is closed and all of its
points are accumulation points of itself.
Note that we do not require `C` to be nonempty. -/
@[mk_iff perfect_def]
structure Perfect (C : Set α) : Prop where
  closed : IsClosed C
  acc : Preperfect C
goal: Preperfect C

full_name: preperfect_iff_nhds
code: theorem preperfect_iff_nhds : Preperfect C ↔ ∀ x ∈ C, ∀ U ∈ 𝓝 x, ∃ y ∈ U ∩ C, y ≠ x 
goal: Preperfect C ↔ ∀ x ∈ C, ∀ U ∈ 𝓝 x, ∃ y ∈ U ∩ C, y ≠ x

full_name: perfectSpace_def
code: /--
A topological space `X` is said to be perfect if its universe is a perfect set.
Equivalently, this means that `𝓝[≠] x ≠ ⊥` for every point `x : X`.
-/
@[mk_iff perfectSpace_def]
class PerfectSpace : Prop :=
  univ_preperfect : Preperfect (Set.univ : Set α)
goal: PerfectSpace α ↔ Preperfect Set.univ

full_name: PerfectSpace
code: /--
A topological space `X` is said to be perfect if its universe is a perfect set.
Equivalently, this means that `𝓝[≠] x ≠ ⊥` for every point `x : X`.
-/
@[mk_iff perfectSpace_def]
class PerfectSpace : Prop :=
  univ_preperfect : Preperfect (Set.univ : Set α)
goal: Prop

full_name: PerfectSpace.univ_preperfect
code: /--
A topological space `X` is said to be perfect if its universe is a perfect set.
Equivalently, this means that `𝓝[≠] x ≠ ⊥` for every point `x : X`.
-/
@[mk_iff perfectSpace_def]
class PerfectSpace : Prop :=
  univ_preperfect : Preperfect (Set.univ : Set α)
goal: Preperfect Set.univ

full_name: PerfectSpace.univ_perfect
code: theorem PerfectSpace.univ_perfect [PerfectSpace α] : Perfect (Set.univ : Set α) 
goal: Perfect Set.univ

full_name: Preperfect.open_inter
code: /-- The intersection of a preperfect set and an open set is preperfect. -/
theorem Preperfect.open_inter {U : Set α} (hC : Preperfect C) (hU : IsOpen U) :
    Preperfect (U ∩ C) 
goal: Preperfect (U ∩ C)

full_name: Preperfect.perfect_closure
code: /-- The closure of a preperfect set is perfect.
For a converse, see `preperfect_iff_perfect_closure`. -/
theorem Preperfect.perfect_closure (hC : Preperfect C) : Perfect (closure C) 
goal: Perfect (closure C)

full_name: preperfect_iff_perfect_closure
code: /-- In a T1 space, being preperfect is equivalent to having perfect closure. -/
theorem preperfect_iff_perfect_closure [T1Space α] : Preperfect C ↔ Perfect (closure C) 
goal: Preperfect C ↔ Perfect (closure C)

full_name: Perfect.closure_nhds_inter
code: theorem Perfect.closure_nhds_inter {U : Set α} (hC : Perfect C) (x : α) (xC : x ∈ C) (xU : x ∈ U)
    (Uop : IsOpen U) : Perfect (closure (U ∩ C)) ∧ (closure (U ∩ C)).Nonempty 
goal: Perfect (closure (U ∩ C)) ∧ (closure (U ∩ C)).Nonempty

full_name: Perfect.splitting
code: /-- Given a perfect nonempty set in a T2.5 space, we can find two disjoint perfect subsets.
This is the main inductive step in the proof of the Cantor-Bendixson Theorem. -/
theorem Perfect.splitting [T25Space α] (hC : Perfect C) (hnonempty : C.Nonempty) :
    ∃ C₀ C₁ : Set α,
    (Perfect C₀ ∧ C₀.Nonempty ∧ C₀ ⊆ C) ∧ (Perfect C₁ ∧ C₁.Nonempty ∧ C₁ ⊆ C) ∧ Disjoint C₀ C₁ 
goal: ∃ C₀ C₁, (Perfect C₀ ∧ C₀.Nonempty ∧ C₀ ⊆ C) ∧ (Perfect C₁ ∧ C₁.Nonempty ∧ C₁ ⊆ C) ∧ Disjoint C₀ C₁

full_name: IsPreconnected.preperfect_of_nontrivial
code: lemma IsPreconnected.preperfect_of_nontrivial [T1Space α] {U : Set α} (hu : U.Nontrivial)
    (h : IsPreconnected U) : Preperfect U 
goal: Preperfect U

full_name: exists_countable_union_perfect_of_isClosed
code: /-- The **Cantor-Bendixson Theorem**: Any closed subset of a second countable space
can be written as the union of a countable set and a perfect set. -/
theorem exists_countable_union_perfect_of_isClosed [SecondCountableTopology α]
    (hclosed : IsClosed C) : ∃ V D : Set α, V.Countable ∧ Perfect D ∧ C = V ∪ D 
goal: ∃ V D, V.Countable ∧ Perfect D ∧ C = V ∪ D

full_name: exists_perfect_nonempty_of_isClosed_of_not_countable
code: /-- Any uncountable closed set in a second countable space contains a nonempty perfect subset. -/
theorem exists_perfect_nonempty_of_isClosed_of_not_countable [SecondCountableTopology α]
    (hclosed : IsClosed C) (hunc : ¬C.Countable) : ∃ D : Set α, Perfect D ∧ D.Nonempty ∧ D ⊆ C 
goal: ∃ D, Perfect D ∧ D.Nonempty ∧ D ⊆ C

full_name: perfectSpace_iff_forall_not_isolated
code: theorem perfectSpace_iff_forall_not_isolated : PerfectSpace X ↔ ∀ x : X, Filter.NeBot (𝓝[≠] x) 
goal: PerfectSpace X ↔ ∀ (x : X), (𝓝[≠] x).NeBot

full_name: PerfectSpace.not_isolated
code: instance PerfectSpace.not_isolated [PerfectSpace X] (x : X) : Filter.NeBot (𝓝[≠] x) 
goal: (𝓝[≠] x).NeBot