File: Mathlib/Topology/Connected/Clopen.lean

full_name: IsPreconnected.subset_isClopen
code: /-- Preconnected sets are either contained in or disjoint to any given clopen set. -/
theorem IsPreconnected.subset_isClopen {s t : Set α} (hs : IsPreconnected s) (ht : IsClopen t)
    (hne : (s ∩ t).Nonempty) : s ⊆ t 
goal: s ⊆ t

full_name: Sigma.isConnected_iff
code: theorem Sigma.isConnected_iff [∀ i, TopologicalSpace (π i)] {s : Set (Σi, π i)} :
    IsConnected s ↔ ∃ i t, IsConnected t ∧ s = Sigma.mk i '' t 
goal: IsConnected s ↔ ∃ i t, IsConnected t ∧ s = Sigma.mk i '' t

full_name: Sigma.isPreconnected_iff
code: theorem Sigma.isPreconnected_iff [hι : Nonempty ι] [∀ i, TopologicalSpace (π i)]
    {s : Set (Σi, π i)} : IsPreconnected s ↔ ∃ i t, IsPreconnected t ∧ s = Sigma.mk i '' t 
goal: IsPreconnected s ↔ ∃ i t, IsPreconnected t ∧ s = Sigma.mk i '' t

full_name: Sum.isConnected_iff
code: theorem Sum.isConnected_iff [TopologicalSpace β] {s : Set (α ⊕ β)} :
    IsConnected s ↔
      (∃ t, IsConnected t ∧ s = Sum.inl '' t) ∨ ∃ t, IsConnected t ∧ s = Sum.inr '' t 
goal: IsConnected s ↔ (∃ t, IsConnected t ∧ s = Sum.inl '' t) ∨ ∃ t, IsConnected t ∧ s = Sum.inr '' t

full_name: Sum.isPreconnected_iff
code: theorem Sum.isPreconnected_iff [TopologicalSpace β] {s : Set (α ⊕ β)} :
    IsPreconnected s ↔
      (∃ t, IsPreconnected t ∧ s = Sum.inl '' t) ∨ ∃ t, IsPreconnected t ∧ s = Sum.inr '' t 
goal: IsPreconnected s ↔ (∃ t, IsPreconnected t ∧ s = Sum.inl '' t) ∨ ∃ t, IsPreconnected t ∧ s = Sum.inr '' t

full_name: Continuous.exists_lift_sigma
code: /-- A continuous map from a connected space to a disjoint union `Σ i, π i` can be lifted to one of
the components `π i`. See also `ContinuousMap.exists_lift_sigma` for a version with bundled
`ContinuousMap`s. -/
theorem Continuous.exists_lift_sigma [ConnectedSpace α] [∀ i, TopologicalSpace (π i)]
    {f : α → Σ i, π i} (hf : Continuous f) :
    ∃ (i : ι) (g : α → π i), Continuous g ∧ f = Sigma.mk i ∘ g 
goal: ∃ i g, Continuous g ∧ f = Sigma.mk i ∘ g

full_name: nonempty_inter
code: theorem nonempty_inter [PreconnectedSpace α] {s t : Set α} :
    IsOpen s → IsOpen t → s ∪ t = univ → s.Nonempty → t.Nonempty → (s ∩ t).Nonempty 
goal: IsOpen s → IsOpen t → s ∪ t = Set.univ → s.Nonempty → t.Nonempty → (s ∩ t).Nonempty

full_name: isClopen_iff
code: theorem isClopen_iff [PreconnectedSpace α] {s : Set α} : IsClopen s ↔ s = ∅ ∨ s = univ 
goal: IsClopen s ↔ s = ∅ ∨ s = Set.univ

full_name: IsClopen.eq_univ
code: theorem IsClopen.eq_univ [PreconnectedSpace α] {s : Set α} (h' : IsClopen s) (h : s.Nonempty) :
    s = univ 
goal: s = Set.univ

full_name: subsingleton_of_disjoint_isClopen
code: /-- In a preconnected space, any disjoint family of non-empty clopen subsets has at most one
element. -/
lemma subsingleton_of_disjoint_isClopen
    (h_clopen : ∀ i, IsClopen (s i)) :
    Subsingleton ι 
goal: Subsingleton ι

full_name: subsingleton_of_disjoint_isOpen_iUnion_eq_univ
code: /-- In a preconnected space, any disjoint cover by non-empty open subsets has at most one
element. -/
lemma subsingleton_of_disjoint_isOpen_iUnion_eq_univ
    (h_open : ∀ i, IsOpen (s i)) (h_Union : ⋃ i, s i = univ) :
    Subsingleton ι 
goal: Subsingleton ι

full_name: subsingleton_of_disjoint_isClosed_iUnion_eq_univ
code: /-- In a preconnected space, any finite disjoint cover by non-empty closed subsets has at most one
element. -/
lemma subsingleton_of_disjoint_isClosed_iUnion_eq_univ [Finite ι]
    (h_closed : ∀ i, IsClosed (s i)) (h_Union : ⋃ i, s i = univ) :
    Subsingleton ι 
goal: Subsingleton ι

full_name: frontier_eq_empty_iff
code: theorem frontier_eq_empty_iff [PreconnectedSpace α] {s : Set α} :
    frontier s = ∅ ↔ s = ∅ ∨ s = univ 
goal: frontier s = ∅ ↔ s = ∅ ∨ s = Set.univ

full_name: nonempty_frontier_iff
code: theorem nonempty_frontier_iff [PreconnectedSpace α] {s : Set α} :
    (frontier s).Nonempty ↔ s.Nonempty ∧ s ≠ univ 
goal: (frontier s).Nonempty ↔ s.Nonempty ∧ s ≠ Set.univ

full_name: PreconnectedSpace.induction₂'
code: /-- In a preconnected space, given a transitive relation `P`, if `P x y` and `P y x` are true
for `y` close enough to `x`, then `P x y` holds for all `x, y`. This is a version of the fact
that, if an equivalence relation has open classes, then it has a single equivalence class. -/
lemma PreconnectedSpace.induction₂' [PreconnectedSpace α] (P : α → α → Prop)
    (h : ∀ x, ∀ᶠ y in 𝓝 x, P x y ∧ P y x) (h' : Transitive P) (x y : α) :
    P x y 
goal: P x y

full_name: PreconnectedSpace.induction₂
code: /-- In a preconnected space, if a symmetric transitive relation `P x y` is true for `y` close
enough to `x`, then it holds for all `x, y`. This is a version of the fact that, if an equivalence
relation has open classes, then it has a single equivalence class. -/
lemma PreconnectedSpace.induction₂ [PreconnectedSpace α] (P : α → α → Prop)
    (h : ∀ x, ∀ᶠ y in 𝓝 x, P x y) (h' : Transitive P) (h'' : Symmetric P) (x y : α) :
    P x y 
goal: P x y

full_name: IsPreconnected.induction₂'
code: /-- In a preconnected set, given a transitive relation `P`, if `P x y` and `P y x` are true
for `y` close enough to `x`, then `P x y` holds for all `x, y`. This is a version of the fact
that, if an equivalence relation has open classes, then it has a single equivalence class. -/
lemma IsPreconnected.induction₂' {s : Set α} (hs : IsPreconnected s) (P : α → α → Prop)
    (h : ∀ x ∈ s, ∀ᶠ y in 𝓝[s] x, P x y ∧ P y x)
    (h' : ∀ x y z, x ∈ s → y ∈ s → z ∈ s → P x y → P y z → P x z)
    {x y : α} (hx : x ∈ s) (hy : y ∈ s) : P x y 
goal: P x y

full_name: IsPreconnected.induction₂
code: /-- In a preconnected set, if a symmetric transitive relation `P x y` is true for `y` close
enough to `x`, then it holds for all `x, y`. This is a version of the fact that, if an equivalence
relation has open classes, then it has a single equivalence class. -/
lemma IsPreconnected.induction₂ {s : Set α} (hs : IsPreconnected s) (P : α → α → Prop)
    (h : ∀ x ∈ s, ∀ᶠ y in 𝓝[s] x, P x y)
    (h' : ∀ x y z, x ∈ s → y ∈ s → z ∈ s → P x y → P y z → P x z)
    (h'' : ∀ x y, x ∈ s → y ∈ s → P x y → P y x)
    {x y : α} (hx : x ∈ s) (hy : y ∈ s) : P x y 
goal: P x y

full_name: isPreconnected_iff_subset_of_disjoint
code: /-- A set `s` is preconnected if and only if for every cover by two open sets that are disjoint on
`s`, it is contained in one of the two covering sets. -/
theorem isPreconnected_iff_subset_of_disjoint {s : Set α} :
    IsPreconnected s ↔
      ∀ u v, IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v 
goal: IsPreconnected s ↔ ∀ (u v : Set α), IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v

full_name: isConnected_iff_sUnion_disjoint_open
code: /-- A set `s` is connected if and only if
for every cover by a finite collection of open sets that are pairwise disjoint on `s`,
it is contained in one of the members of the collection. -/
theorem isConnected_iff_sUnion_disjoint_open {s : Set α} :
    IsConnected s ↔
      ∀ U : Finset (Set α), (∀ u v : Set α, u ∈ U → v ∈ U → (s ∩ (u ∩ v)).Nonempty → u = v) →
        (∀ u ∈ U, IsOpen u) → (s ⊆ ⋃₀ ↑U) → ∃ u ∈ U, s ⊆ u 
goal: IsConnected s ↔
  ∀ (U : Finset (Set α)),
    (∀ (u v : Set α), u ∈ U → v ∈ U → (s ∩ (u ∩ v)).Nonempty → u = v) → (∀ u ∈ U, IsOpen u) → s ⊆ ⋃₀ ↑U → ∃ u ∈ U, s ⊆ u

full_name: disjoint_or_subset_of_isClopen
code: /-- Preconnected sets are either contained in or disjoint to any given clopen set. -/
theorem disjoint_or_subset_of_isClopen {s t : Set α} (hs : IsPreconnected s) (ht : IsClopen t) :
    Disjoint s t ∨ s ⊆ t 
goal: Disjoint s t ∨ s ⊆ t

full_name: isPreconnected_iff_subset_of_disjoint_closed
code: /-- A set `s` is preconnected if and only if
for every cover by two closed sets that are disjoint on `s`,
it is contained in one of the two covering sets. -/
theorem isPreconnected_iff_subset_of_disjoint_closed :
    IsPreconnected s ↔
      ∀ u v, IsClosed u → IsClosed v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v 
goal: IsPreconnected s ↔ ∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v

full_name: isPreconnected_iff_subset_of_fully_disjoint_closed
code: /-- A closed set `s` is preconnected if and only if for every cover by two closed sets that are
disjoint, it is contained in one of the two covering sets. -/
theorem isPreconnected_iff_subset_of_fully_disjoint_closed {s : Set α} (hs : IsClosed s) :
    IsPreconnected s ↔
      ∀ u v, IsClosed u → IsClosed v → s ⊆ u ∪ v → Disjoint u v → s ⊆ u ∨ s ⊆ v 
goal: IsPreconnected s ↔ ∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → Disjoint u v → s ⊆ u ∨ s ⊆ v

full_name: IsClopen.connectedComponent_subset
code: theorem IsClopen.connectedComponent_subset {x} (hs : IsClopen s) (hx : x ∈ s) :
    connectedComponent x ⊆ s 
goal: connectedComponent x ⊆ s

full_name: connectedComponent_subset_iInter_isClopen
code: /-- The connected component of a point is always a subset of the intersection of all its clopen
neighbourhoods. -/
theorem connectedComponent_subset_iInter_isClopen {x : α} :
    connectedComponent x ⊆ ⋂ Z : { Z : Set α // IsClopen Z ∧ x ∈ Z }, Z 
goal: connectedComponent x ⊆ ⋂ Z, ↑Z

full_name: IsClopen.biUnion_connectedComponent_eq
code: /-- A clopen set is the union of its connected components. -/
theorem IsClopen.biUnion_connectedComponent_eq {Z : Set α} (h : IsClopen Z) :
    ⋃ x ∈ Z, connectedComponent x = Z 
goal: ⋃ x ∈ Z, connectedComponent x = Z

full_name: preimage_connectedComponent_connected
code: /-- The preimage of a connected component is preconnected if the function has connected fibers
and a subset is closed iff the preimage is. -/
theorem preimage_connectedComponent_connected [TopologicalSpace β] {f : α → β}
    (connected_fibers : ∀ t : β, IsConnected (f ⁻¹' {t}))
    (hcl : ∀ T : Set β, IsClosed T ↔ IsClosed (f ⁻¹' T)) (t : β) :
    IsConnected (f ⁻¹' connectedComponent t) 
goal: IsConnected (f ⁻¹' connectedComponent t)

full_name: QuotientMap.preimage_connectedComponent
code: theorem QuotientMap.preimage_connectedComponent [TopologicalSpace β] {f : α → β}
    (hf : QuotientMap f) (h_fibers : ∀ y : β, IsConnected (f ⁻¹' {y})) (a : α) :
    f ⁻¹' connectedComponent (f a) = connectedComponent a 
goal: f ⁻¹' connectedComponent (f a) = connectedComponent a

full_name: QuotientMap.image_connectedComponent
code: theorem QuotientMap.image_connectedComponent [TopologicalSpace β] {f : α → β} (hf : QuotientMap f)
    (h_fibers : ∀ y : β, IsConnected (f ⁻¹' {y})) (a : α) :
    f '' connectedComponent a = connectedComponent (f a) 
goal: f '' connectedComponent a = connectedComponent (f a)

full_name: connectedComponentSetoid
code: /-- The setoid of connected components of a topological space -/
def connectedComponentSetoid (α : Type*) [TopologicalSpace α] : Setoid α 
goal: Setoid α

full_name: ConnectedComponents
code: /-- The quotient of a space by its connected components -/
def ConnectedComponents (α : Type u) [TopologicalSpace α] 
goal: Type u

full_name: ConnectedComponents.mk
code: /-- Coercion from a topological space to the set of connected components of this space. -/
def mk : α → ConnectedComponents α 
goal: α → ConnectedComponents α

full_name: ConnectedComponents.instCoeTC
code: instance : CoeTC α (ConnectedComponents α) 
goal: CoeTC α (ConnectedComponents α)

full_name: ConnectedComponents.coe_eq_coe
code: @[simp]
theorem coe_eq_coe {x y : α} :
    (x : ConnectedComponents α) = y ↔ connectedComponent x = connectedComponent y 
goal: ConnectedComponents.mk x = ConnectedComponents.mk y ↔ connectedComponent x = connectedComponent y

full_name: ConnectedComponents.coe_ne_coe
code: theorem coe_ne_coe {x y : α} :
    (x : ConnectedComponents α) ≠ y ↔ connectedComponent x ≠ connectedComponent y 
goal: ConnectedComponents.mk x ≠ ConnectedComponents.mk y ↔ connectedComponent x ≠ connectedComponent y

full_name: ConnectedComponents.coe_eq_coe'
code: theorem coe_eq_coe' {x y : α} : (x : ConnectedComponents α) = y ↔ x ∈ connectedComponent y 
goal: ConnectedComponents.mk x = ConnectedComponents.mk y ↔ x ∈ connectedComponent y

full_name: ConnectedComponents.instInhabited
code: instance [Inhabited α] : Inhabited (ConnectedComponents α) 
goal: Inhabited (ConnectedComponents α)

full_name: ConnectedComponents.instTopologicalSpace
code: instance : TopologicalSpace (ConnectedComponents α) 
goal: TopologicalSpace (ConnectedComponents α)

full_name: ConnectedComponents.surjective_coe
code: theorem surjective_coe : Surjective (mk : α → ConnectedComponents α) 
goal: Function.Surjective ConnectedComponents.mk

full_name: ConnectedComponents.quotientMap_coe
code: theorem quotientMap_coe : QuotientMap (mk : α → ConnectedComponents α) 
goal: QuotientMap ConnectedComponents.mk

full_name: ConnectedComponents.continuous_coe
code: @[continuity]
theorem continuous_coe : Continuous (mk : α → ConnectedComponents α) 
goal: Continuous ConnectedComponents.mk

full_name: ConnectedComponents.range_coe
code: @[simp]
theorem range_coe : range (mk : α → ConnectedComponents α) = univ 
goal: Set.range ConnectedComponents.mk = Set.univ

full_name: connectedComponents_preimage_singleton
code: /-- The preimage of a singleton in `connectedComponents` is the connected component
of an element in the equivalence class. -/
theorem connectedComponents_preimage_singleton {x : α} :
    (↑) ⁻¹' ({↑x} : Set (ConnectedComponents α)) = connectedComponent x 
goal: ConnectedComponents.mk ⁻¹' {ConnectedComponents.mk x} = connectedComponent x

full_name: connectedComponents_preimage_image
code: /-- The preimage of the image of a set under the quotient map to `connectedComponents α`
is the union of the connected components of the elements in it. -/
theorem connectedComponents_preimage_image (U : Set α) :
    (↑) ⁻¹' ((↑) '' U : Set (ConnectedComponents α)) = ⋃ x ∈ U, connectedComponent x 
goal: ConnectedComponents.mk ⁻¹' (ConnectedComponents.mk '' U) = ⋃ x ∈ U, connectedComponent x

full_name: isPreconnected_of_forall_constant
code: /-- If every map to `Bool` (a discrete two-element space), that is
continuous on a set `s`, is constant on s, then s is preconnected -/
theorem isPreconnected_of_forall_constant {s : Set α}
    (hs : ∀ f : α → Bool, ContinuousOn f s → ∀ x ∈ s, ∀ y ∈ s, f x = f y) : IsPreconnected s 
goal: IsPreconnected s

full_name: preconnectedSpace_of_forall_constant
code: /-- A `PreconnectedSpace` version of `isPreconnected_of_forall_constant` -/
theorem preconnectedSpace_of_forall_constant
    (hs : ∀ f : α → Bool, Continuous f → ∀ x y, f x = f y) : PreconnectedSpace α 
goal: PreconnectedSpace α