doc-next-gen

Mathlib.Topology.Constructions

Module docstring

{"# Constructions of new topological spaces from old ones

This file constructs pi types, subtypes and quotients of topological spaces and sets up their basic theory, such as criteria for maps into or out of these constructions to be continuous; descriptions of the open sets, neighborhood filters, and generators of these constructions; and their behavior with respect to embeddings and other specific classes of maps.

Implementation note

The constructed topologies are defined using induced and coinduced topologies along with the complete lattice structure on topologies. Their universal properties (for example, a map X → Y × Z is continuous if and only if both projections X → Y, X → Z are) follow easily using order-theoretic descriptions of continuity. With more work we can also extract descriptions of the open sets, neighborhood filters and so on.

Tags

product, subspace, quotient space

","### Additive, Multiplicative

The topology on those type synonyms is inherited without change. ","### Order dual

The topology on this type synonym is inherited without change. "}

instTopologicalSpaceQuot instance
{r : X → X → Prop} [t : TopologicalSpace X] : TopologicalSpace (Quot r)
Full source
instance {r : X → X → Prop} [t : TopologicalSpace X] : TopologicalSpace (Quot r) :=
  coinduced (Quot.mk r) t
Topology on Quotient Spaces by Relations
Informal description
For any type $X$ with a topological space structure and any relation $r$ on $X$, the quotient space $\text{Quot } r$ inherits a topological space structure from $X$.
instTopologicalSpaceSigma instance
{ι : Type*} {X : ι → Type v} [t₂ : ∀ i, TopologicalSpace (X i)] : TopologicalSpace (Sigma X)
Full source
instance instTopologicalSpaceSigma {ι : Type*} {X : ι → Type v} [t₂ : ∀ i, TopologicalSpace (X i)] :
    TopologicalSpace (Sigma X) :=
  ⨆ i, coinduced (Sigma.mk i) (t₂ i)
Disjoint Union Topology on Sigma Types
Informal description
For any family of topological spaces $\{X_i\}_{i \in \iota}$ indexed by a type $\iota$, the disjoint union $\Sigma X$ (also known as the coproduct) is equipped with the disjoint union topology, where a set is open if and only if its preimage under each inclusion map $X_i \to \Sigma X$ is open in $X_i$.
Pi.topologicalSpace instance
{ι : Type*} {Y : ι → Type v} [t₂ : (i : ι) → TopologicalSpace (Y i)] : TopologicalSpace ((i : ι) → Y i)
Full source
instance Pi.topologicalSpace {ι : Type*} {Y : ι → Type v} [t₂ : (i : ι) → TopologicalSpace (Y i)] :
    TopologicalSpace ((i : ι) → Y i) :=
  ⨅ i, induced (fun f => f i) (t₂ i)
Product Topology on Indexed Families of Spaces
Informal description
For any family of topological spaces $\{Y_i\}_{i \in \iota}$ indexed by a type $\iota$, the product space $\prod_{i \in \iota} Y_i$ is equipped with the product topology, where a function into the product is continuous if and only if each of its component functions is continuous.
ULift.topologicalSpace instance
[t : TopologicalSpace X] : TopologicalSpace (ULift.{v, u} X)
Full source
instance ULift.topologicalSpace [t : TopologicalSpace X] : TopologicalSpace (ULift.{v, u} X) :=
  t.induced ULift.down
Topology on Lifted Types
Informal description
For any topological space $X$, the lifted type $\mathrm{ULift}\, X$ inherits a topological space structure from $X$.
instTopologicalSpaceAdditive instance
: TopologicalSpace (Additive X)
Full source
instance : TopologicalSpace (Additive X) := ‹TopologicalSpace X›
Topology on Additive Group Structure
Informal description
The additive group structure on a type $X$ inherits the same topology as $X$ itself. That is, the topology on $\text{Additive}(X)$ is identical to the topology on $X$.
instTopologicalSpaceMultiplicative instance
: TopologicalSpace (Multiplicative X)
Full source
instance : TopologicalSpace (Multiplicative X) := ‹TopologicalSpace X›
Topology on Multiplicative Types
Informal description
The multiplicative version of a type $X$ inherits the same topological space structure as $X$.
instDiscreteTopologyAdditive instance
[DiscreteTopology X] : DiscreteTopology (Additive X)
Full source
instance [DiscreteTopology X] : DiscreteTopology (Additive X) := ‹DiscreteTopology X›
Discrete Topology on Additive Group Structure
Informal description
For any type $X$ with a discrete topology, the additive group structure $\text{Additive}(X)$ also has a discrete topology.
instDiscreteTopologyMultiplicative instance
[DiscreteTopology X] : DiscreteTopology (Multiplicative X)
Full source
instance [DiscreteTopology X] : DiscreteTopology (Multiplicative X) := ‹DiscreteTopology X›
Discrete Topology on Multiplicative Types
Informal description
For any type $X$ with a discrete topology, the multiplicative version $\text{Multiplicative}(X)$ also has a discrete topology.
continuous_ofMul theorem
: Continuous (ofMul : X → Additive X)
Full source
theorem continuous_ofMul : Continuous (ofMul : X → Additive X) := continuous_id
Continuity of the Original-to-Additive Conversion Map
Informal description
The function $\text{ofMul} : X \to \text{Additive}\, X$, which maps a type $X$ to its additive version, is continuous when both $X$ and $\text{Additive}\, X$ are equipped with the same topology.
continuous_toMul theorem
: Continuous (toMul : Additive X → X)
Full source
theorem continuous_toMul : Continuous (toMul : Additive X → X) := continuous_id
Continuity of the Additive-to-Original Conversion Map
Informal description
The function $\text{toMul} : \text{Additive}\, X \to X$, which converts from the additive group structure to the original type, is continuous when both $\text{Additive}\, X$ and $X$ are equipped with the same topology.
continuous_ofAdd theorem
: Continuous (ofAdd : X → Multiplicative X)
Full source
theorem continuous_ofAdd : Continuous (ofAdd : X → Multiplicative X) := continuous_id
Continuity of the Additive-to-Multiplicative Conversion Map
Informal description
The function $\text{ofAdd} : X \to \text{Multiplicative}\, X$, which maps a type $X$ to its multiplicative version, is continuous when both $X$ and $\text{Multiplicative}\, X$ are equipped with the same topology.
continuous_toAdd theorem
: Continuous (toAdd : Multiplicative X → X)
Full source
theorem continuous_toAdd : Continuous (toAdd : Multiplicative X → X) := continuous_id
Continuity of the Multiplicative-to-Additive Conversion Map
Informal description
The function $\text{toAdd} : \text{Multiplicative}\, X \to X$, which converts from the multiplicative group structure to the original type, is continuous when both $\text{Multiplicative}\, X$ and $X$ are equipped with the same topology.
isOpenMap_ofMul theorem
: IsOpenMap (ofMul : X → Additive X)
Full source
theorem isOpenMap_ofMul : IsOpenMap (ofMul : X → Additive X) := IsOpenMap.id
Canonical Multiplicative-to-Additive Map is Open
Informal description
The canonical map $\text{ofMul} : X \to \text{Additive}\, X$ is an open map, meaning that for every open set $U \subseteq X$, its image $\text{ofMul}(U)$ is open in $\text{Additive}\, X$.
isOpenMap_toMul theorem
: IsOpenMap (toMul : Additive X → X)
Full source
theorem isOpenMap_toMul : IsOpenMap (toMul : Additive X → X) := IsOpenMap.id
Canonical Additive-to-Multiplicative Map is Open
Informal description
The canonical map $\text{toMul} : \text{Additive}\, X \to X$ is an open map, meaning that for every open set $U \subseteq \text{Additive}\, X$, its image $\text{toMul}(U)$ is open in $X$.
isOpenMap_ofAdd theorem
: IsOpenMap (ofAdd : X → Multiplicative X)
Full source
theorem isOpenMap_ofAdd : IsOpenMap (ofAdd : X → Multiplicative X) := IsOpenMap.id
Canonical Additive-to-Multiplicative Map is Open
Informal description
The canonical map $\text{ofAdd} : X \to \text{Multiplicative}\, X$ is an open map, meaning that for every open set $U \subseteq X$, its image $\text{ofAdd}(U)$ is open in $\text{Multiplicative}\, X$.
isOpenMap_toAdd theorem
: IsOpenMap (toAdd : Multiplicative X → X)
Full source
theorem isOpenMap_toAdd : IsOpenMap (toAdd : Multiplicative X → X) := IsOpenMap.id
Openness of the Multiplicative-to-Additive Conversion Map
Informal description
The canonical map $\text{toAdd} : \text{Multiplicative}\, X \to X$ is an open map, meaning that for every open set $U \subseteq \text{Multiplicative}\, X$, its image $\text{toAdd}(U)$ is open in $X$.
isClosedMap_ofMul theorem
: IsClosedMap (ofMul : X → Additive X)
Full source
theorem isClosedMap_ofMul : IsClosedMap (ofMul : X → Additive X) := IsClosedMap.id
Closedness of the Multiplicative-to-Additive Conversion Map
Informal description
The map $\mathrm{ofMul} \colon X \to \mathrm{Additive}(X)$, which converts from the original type to its additive version, is a closed map. That is, the image of any closed subset of $X$ under $\mathrm{ofMul}$ is closed in $\mathrm{Additive}(X)$.
isClosedMap_toMul theorem
: IsClosedMap (toMul : Additive X → X)
Full source
theorem isClosedMap_toMul : IsClosedMap (toMul : Additive X → X) := IsClosedMap.id
Closedness of the Additive-to-Multiplicative Conversion Map
Informal description
The map $\mathrm{toMul} \colon \mathrm{Additive}(X) \to X$, which converts from the additive group structure to the original type, is a closed map. That is, the image of any closed subset of $\mathrm{Additive}(X)$ under $\mathrm{toMul}$ is closed in $X$.
isClosedMap_ofAdd theorem
: IsClosedMap (ofAdd : X → Multiplicative X)
Full source
theorem isClosedMap_ofAdd : IsClosedMap (ofAdd : X → Multiplicative X) := IsClosedMap.id
Closedness of the Multiplicative Conversion Map
Informal description
The map $\mathrm{ofAdd} \colon X \to \mathrm{Multiplicative}(X)$, which converts from the original type to its multiplicative version, is a closed map. That is, the image of any closed subset of $X$ under $\mathrm{ofAdd}$ is closed in $\mathrm{Multiplicative}(X)$.
isClosedMap_toAdd theorem
: IsClosedMap (toAdd : Multiplicative X → X)
Full source
theorem isClosedMap_toAdd : IsClosedMap (toAdd : Multiplicative X → X) := IsClosedMap.id
Closedness of the Multiplicative-to-Additive Conversion Map
Informal description
The map $\mathrm{toAdd} \colon \mathrm{Multiplicative}(X) \to X$, which converts from the multiplicative group structure to the original type, is a closed map. That is, the image of any closed subset of $\mathrm{Multiplicative}(X)$ under $\mathrm{toAdd}$ is closed in $X$.
nhds_ofMul theorem
(x : X) : 𝓝 (ofMul x) = map ofMul (𝓝 x)
Full source
theorem nhds_ofMul (x : X) : 𝓝 (ofMul x) = map ofMul (𝓝 x) := rfl
Neighborhood Filter Preservation under Multiplicative Conversion
Informal description
For any element $x$ in a topological space $X$, the neighborhood filter of $\mathrm{ofMul}(x)$ in the multiplicative version of $X$ is equal to the image of the neighborhood filter of $x$ under the $\mathrm{ofMul}$ map. In other words, $\mathcal{N}(\mathrm{ofMul}(x)) = \mathrm{ofMul}_*(\mathcal{N}(x))$.
nhds_ofAdd theorem
(x : X) : 𝓝 (ofAdd x) = map ofAdd (𝓝 x)
Full source
theorem nhds_ofAdd (x : X) : 𝓝 (ofAdd x) = map ofAdd (𝓝 x) := rfl
Neighborhood Filter Preservation under Additive Conversion
Informal description
For any element $x$ in a topological space $X$, the neighborhood filter of $\mathrm{ofAdd}(x)$ in the additive version of $X$ is equal to the image of the neighborhood filter of $x$ under the $\mathrm{ofAdd}$ map. That is, $\mathcal{N}(\mathrm{ofAdd}(x)) = \mathrm{ofAdd}_*(\mathcal{N}(x))$.
nhds_toMul theorem
(x : Additive X) : 𝓝 x.toMul = map toMul (𝓝 x)
Full source
theorem nhds_toMul (x : Additive X) : 𝓝 x.toMul = map toMul (𝓝 x) := rfl
Neighborhood Filter Preservation under Multiplicative Conversion
Informal description
For any element $x$ in the additive version of a topological space $X$, the neighborhood filter of $x$ viewed as a multiplicative element (via the `toMul` function) is equal to the image of the neighborhood filter of $x$ under the `toMul` map.
nhds_toAdd theorem
(x : Multiplicative X) : 𝓝 x.toAdd = map toAdd (𝓝 x)
Full source
theorem nhds_toAdd (x : Multiplicative X) : 𝓝 x.toAdd = map toAdd (𝓝 x) := rfl
Neighborhood Filter Preservation under Additive Conversion
Informal description
For any element $x$ in the multiplicative version of a topological space $X$, the neighborhood filter of $x$ viewed as an additive element (via the `toAdd` function) is equal to the image of the neighborhood filter of $x$ under the `toAdd` map.
OrderDual.instTopologicalSpace instance
: TopologicalSpace Xᵒᵈ
Full source
instance OrderDual.instTopologicalSpace : TopologicalSpace Xᵒᵈ := ‹_›
Topology on Order Dual
Informal description
The order dual $X^\text{op}$ of a topological space $X$ inherits the same topological structure as $X$.
OrderDual.instDiscreteTopology instance
[DiscreteTopology X] : DiscreteTopology Xᵒᵈ
Full source
instance OrderDual.instDiscreteTopology [DiscreteTopology X] : DiscreteTopology Xᵒᵈ := ‹_›
Discrete Topology on Order Dual
Informal description
For any topological space $X$ with the discrete topology, the order dual $X^\text{op}$ also has the discrete topology.
continuous_toDual theorem
: Continuous (toDual : X → Xᵒᵈ)
Full source
theorem continuous_toDual : Continuous (toDual : X → Xᵒᵈ) := continuous_id
Continuity of the Order Dual Canonical Map
Informal description
The canonical map $\mathrm{toDual} \colon X \to X^\text{op}$ from a topological space $X$ to its order dual $X^\text{op}$ is continuous.
continuous_ofDual theorem
: Continuous (ofDual : Xᵒᵈ → X)
Full source
theorem continuous_ofDual : Continuous (ofDual : Xᵒᵈ → X) := continuous_id
Continuity of the Order Dual Canonical Inverse Map
Informal description
The canonical map $\mathrm{ofDual} \colon X^\text{op} \to X$ from the order dual of a topological space $X$ back to $X$ is continuous.
isOpenMap_toDual theorem
: IsOpenMap (toDual : X → Xᵒᵈ)
Full source
theorem isOpenMap_toDual : IsOpenMap (toDual : X → Xᵒᵈ) := IsOpenMap.id
Order Dual Canonical Map is Open
Informal description
The canonical map $\mathrm{toDual} \colon X \to X^\text{op}$ from a topological space $X$ to its order dual $X^\text{op}$ is an open map, meaning that the image of any open subset of $X$ under $\mathrm{toDual}$ is open in $X^\text{op}$.
isOpenMap_ofDual theorem
: IsOpenMap (ofDual : Xᵒᵈ → X)
Full source
theorem isOpenMap_ofDual : IsOpenMap (ofDual : Xᵒᵈ → X) := IsOpenMap.id
Openness of the Order Dual Canonical Inverse Map
Informal description
The canonical map $\mathrm{ofDual} \colon X^\text{op} \to X$ from the order dual of a topological space $X$ back to $X$ is an open map, meaning that the image of any open subset of $X^\text{op}$ under $\mathrm{ofDual}$ is open in $X$.
isClosedMap_toDual theorem
: IsClosedMap (toDual : X → Xᵒᵈ)
Full source
theorem isClosedMap_toDual : IsClosedMap (toDual : X → Xᵒᵈ) := IsClosedMap.id
Order Dual Canonical Map is Closed
Informal description
The canonical map $\mathrm{toDual} \colon X \to X^\text{op}$ from a topological space $X$ to its order dual $X^\text{op}$ is a closed map, meaning that the image of any closed subset of $X$ under $\mathrm{toDual}$ is closed in $X^\text{op}$.
isClosedMap_ofDual theorem
: IsClosedMap (ofDual : Xᵒᵈ → X)
Full source
theorem isClosedMap_ofDual : IsClosedMap (ofDual : Xᵒᵈ → X) := IsClosedMap.id
Order Dual Canonical Map is Closed (Inverse Direction)
Informal description
The canonical map $\mathrm{ofDual} \colon X^\text{op} \to X$ from the order dual of a topological space $X$ back to $X$ is a closed map, meaning that the image of any closed subset of $X^\text{op}$ under $\mathrm{ofDual}$ is closed in $X$.
nhds_toDual theorem
(x : X) : 𝓝 (toDual x) = map toDual (𝓝 x)
Full source
theorem nhds_toDual (x : X) : 𝓝 (toDual x) = map toDual (𝓝 x) := rfl
Neighborhood Filter Preservation under Order Dualization
Informal description
For any point $x$ in a topological space $X$, the neighborhood filter of $\mathrm{toDual}(x)$ in the order dual $X^\text{op}$ is equal to the image under $\mathrm{toDual}$ of the neighborhood filter of $x$ in $X$. In other words, $\mathcal{N}(\mathrm{toDual}(x)) = \mathrm{toDual}_*(\mathcal{N}(x))$.
nhds_ofDual theorem
(x : X) : 𝓝 (ofDual x) = map ofDual (𝓝 x)
Full source
theorem nhds_ofDual (x : X) : 𝓝 (ofDual x) = map ofDual (𝓝 x) := rfl
Neighborhood Filter Preservation under Order Dualization (Inverse Direction)
Informal description
For any point $x$ in a topological space $X$, the neighborhood filter of $\mathrm{ofDual}(x)$ in the order dual $X^\text{op}$ is equal to the image under $\mathrm{ofDual}$ of the neighborhood filter of $x$ in $X$. In other words, $\mathcal{N}(\mathrm{ofDual}(x)) = \mathrm{ofDual}_*(\mathcal{N}(x))$.
OrderDual.instNeBotNhdsWithinIoi instance
[(𝓝[<] x).NeBot] : (𝓝[>] toDual x).NeBot
Full source
instance OrderDual.instNeBotNhdsWithinIoi [(𝓝[<] x).NeBot] : (𝓝[>] toDual x).NeBot := ‹_›
Non-triviality of Neighborhood Filter in Order Dual for Right-infinite Interval
Informal description
For a topological space $X$ with a point $x$ such that the neighborhood filter within the left-infinite right-open interval $(-\infty, x)$ is non-trivial, the neighborhood filter within the right-infinite left-open interval $(x, \infty)$ in the order dual $X^\text{op}$ is also non-trivial.
OrderDual.instNeBotNhdsWithinIio instance
[(𝓝[>] x).NeBot] : (𝓝[<] toDual x).NeBot
Full source
instance OrderDual.instNeBotNhdsWithinIio [(𝓝[>] x).NeBot] : (𝓝[<] toDual x).NeBot := ‹_›
Non-triviality of Neighborhood Filter in Order Dual for Left-infinite Interval
Informal description
For a topological space $X$ with a point $x$ such that the neighborhood filter within the right-infinite left-open interval $(x, \infty)$ is non-trivial, the neighborhood filter within the left-infinite right-open interval $(-\infty, x)$ in the order dual $X^\text{op}$ is also non-trivial.
Quotient.preimage_mem_nhds theorem
[TopologicalSpace X] [s : Setoid X] {V : Set <| Quotient s} {x : X} (hs : V ∈ 𝓝 (Quotient.mk' x)) : Quotient.mk' ⁻¹' V ∈ 𝓝 x
Full source
theorem Quotient.preimage_mem_nhds [TopologicalSpace X] [s : Setoid X] {V : Set <| Quotient s}
    {x : X} (hs : V ∈ 𝓝 (Quotient.mk' x)) : Quotient.mk'Quotient.mk' ⁻¹' VQuotient.mk' ⁻¹' V ∈ 𝓝 x :=
  preimage_nhds_coinduced hs
Neighborhood Preimage under Quotient Map
Informal description
Let $X$ be a topological space with an equivalence relation given by a setoid $s$, and let $\text{Quotient}\, s$ be the corresponding quotient space. For any subset $V$ of the quotient space and any point $x \in X$, if $V$ is a neighborhood of the equivalence class $\text{Quotient.mk'}\, x$ in the quotient topology, then the preimage of $V$ under the quotient map $\text{Quotient.mk'}$ is a neighborhood of $x$ in $X$.
Dense.quotient theorem
[Setoid X] [TopologicalSpace X] {s : Set X} (H : Dense s) : Dense (Quotient.mk' '' s)
Full source
/-- The image of a dense set under `Quotient.mk'` is a dense set. -/
theorem Dense.quotient [Setoid X] [TopologicalSpace X] {s : Set X} (H : Dense s) :
    Dense (Quotient.mk'Quotient.mk' '' s) :=
  Quotient.mk''_surjective.denseRange.dense_image continuous_coinduced_rng H
Density Preservation under Quotient Maps
Informal description
Let $X$ be a topological space with an equivalence relation given by a setoid, and let $s \subseteq X$ be a dense subset. Then the image of $s$ under the quotient map $\text{Quotient.mk'}$ is dense in the quotient space $\text{Quotient}\, s$.
DenseRange.quotient theorem
[Setoid X] [TopologicalSpace X] {f : Y → X} (hf : DenseRange f) : DenseRange (Quotient.mk' ∘ f)
Full source
/-- The composition of `Quotient.mk'` and a function with dense range has dense range. -/
theorem DenseRange.quotient [Setoid X] [TopologicalSpace X] {f : Y → X} (hf : DenseRange f) :
    DenseRange (Quotient.mk'Quotient.mk' ∘ f) :=
  Quotient.mk''_surjective.denseRange.comp hf continuous_coinduced_rng
Density Preservation under Quotient Maps for Functions with Dense Range
Informal description
Let $X$ be a topological space with an equivalence relation given by a setoid, and let $f \colon Y \to X$ be a function with dense range. Then the composition of $f$ with the quotient map $\text{Quotient.mk'} \colon X \to \text{Quotient}\, X$ also has dense range in the quotient space.
continuous_map_of_le theorem
{α : Type*} [TopologicalSpace α] {s t : Setoid α} (h : s ≤ t) : Continuous (Setoid.map_of_le h)
Full source
theorem continuous_map_of_le {α : Type*} [TopologicalSpace α]
    {s t : Setoid α} (h : s ≤ t) : Continuous (Setoid.map_of_le h) :=
  continuous_coinduced_rng
Continuity of the Induced Map Between Quotient Spaces for Weaker Equivalence Relations
Informal description
Let $X$ be a topological space and let $s$ and $t$ be equivalence relations on $X$ such that $s \leq t$ (i.e., $s(x,y)$ implies $t(x,y)$ for all $x, y \in X$). Then the induced map $\text{Quotient}\, s \to \text{Quotient}\, t$ is continuous.
continuous_map_sInf theorem
{α : Type*} [TopologicalSpace α] {S : Set (Setoid α)} {s : Setoid α} (h : s ∈ S) : Continuous (Setoid.map_sInf h)
Full source
theorem continuous_map_sInf {α : Type*} [TopologicalSpace α]
    {S : Set (Setoid α)} {s : Setoid α} (h : s ∈ S) : Continuous (Setoid.map_sInf h) :=
  continuous_coinduced_rng
Continuity of Quotient Map from Infimum of Equivalence Relations
Informal description
Let $X$ be a topological space and let $S$ be a set of equivalence relations on $X$. For any equivalence relation $s \in S$, the canonical map from the quotient space of the infimum of $S$ to the quotient space of $s$ is continuous. That is, the map $\text{Quotient}(\bigwedge S) \to \text{Quotient}(s)$ is continuous.
instDiscreteTopologySubtype instance
{p : X → Prop} [TopologicalSpace X] [DiscreteTopology X] : DiscreteTopology (Subtype p)
Full source
instance {p : X → Prop} [TopologicalSpace X] [DiscreteTopology X] : DiscreteTopology (Subtype p) :=
  ⟨bot_unique fun s _ => ⟨(↑) '' s, isOpen_discrete _, preimage_image_eq _ Subtype.val_injective⟩⟩
Discrete Topology on Subtypes of Discrete Spaces
Informal description
For any topological space $X$ with the discrete topology and any predicate $p$ on $X$, the subtype $\{x \in X \mid p(x)\}$ also inherits the discrete topology.
Sum.discreteTopology instance
[TopologicalSpace X] [TopologicalSpace Y] [h : DiscreteTopology X] [hY : DiscreteTopology Y] : DiscreteTopology (X ⊕ Y)
Full source
instance Sum.discreteTopology [TopologicalSpace X] [TopologicalSpace Y] [h : DiscreteTopology X]
    [hY : DiscreteTopology Y] : DiscreteTopology (X ⊕ Y) :=
  ⟨sup_eq_bot_iff.2 <| by simp [h.eq_bot, hY.eq_bot]⟩
Discrete Topology on Direct Sum of Discrete Spaces
Informal description
For any two topological spaces $X$ and $Y$ with discrete topologies, the direct sum $X \oplus Y$ also has a discrete topology.
Sigma.discreteTopology instance
{ι : Type*} {Y : ι → Type v} [∀ i, TopologicalSpace (Y i)] [h : ∀ i, DiscreteTopology (Y i)] : DiscreteTopology (Sigma Y)
Full source
instance Sigma.discreteTopology {ι : Type*} {Y : ι → Type v} [∀ i, TopologicalSpace (Y i)]
    [h : ∀ i, DiscreteTopology (Y i)] : DiscreteTopology (Sigma Y) :=
  ⟨iSup_eq_bot.2 fun _ => by simp only [(h _).eq_bot, coinduced_bot]⟩
Discrete Topology on Sigma Types of Discrete Spaces
Informal description
For any family of topological spaces $\{Y_i\}_{i \in \iota}$ indexed by a type $\iota$, if each $Y_i$ has the discrete topology, then the disjoint union $\Sigma Y$ also has the discrete topology.
comap_nhdsWithin_range theorem
{α β} [TopologicalSpace β] (f : α → β) (y : β) : comap f (𝓝[range f] y) = comap f (𝓝 y)
Full source
@[simp] lemma comap_nhdsWithin_range {α β} [TopologicalSpace β] (f : α → β) (y : β) :
    comap f (𝓝[range f] y) = comap f (𝓝 y) := comap_inf_principal_range
Equality of Preimages of Restricted and Full Neighborhood Filters
Informal description
For any topological space $\beta$ and any function $f : \alpha \to \beta$, the preimage under $f$ of the neighborhood filter of $y$ restricted to the range of $f$ is equal to the preimage under $f$ of the full neighborhood filter of $y$. In other words, \[ \text{comap}_f(\mathcal{N}_{\text{range}(f)}(y)) = \text{comap}_f(\mathcal{N}(y)) \] where $\mathcal{N}_{\text{range}(f)}(y)$ denotes the neighborhood filter of $y$ within the range of $f$ and $\mathcal{N}(y)$ denotes the full neighborhood filter of $y$ in $\beta$.
mem_nhds_subtype theorem
(s : Set X) (x : { x // x ∈ s }) (t : Set { x // x ∈ s }) : t ∈ 𝓝 x ↔ ∃ u ∈ 𝓝 (x : X), Subtype.val ⁻¹' u ⊆ t
Full source
theorem mem_nhds_subtype (s : Set X) (x : { x // x ∈ s }) (t : Set { x // x ∈ s }) :
    t ∈ 𝓝 xt ∈ 𝓝 x ↔ ∃ u ∈ 𝓝 (x : X), Subtype.val ⁻¹' u ⊆ t :=
  mem_nhds_induced _ x t
Characterization of Neighborhoods in Subspace Topology via Preimage
Informal description
Let $X$ be a topological space, $s \subseteq X$ a subset, and $x \in s$. For any set $t \subseteq s$, $t$ is a neighborhood of $x$ in the subspace topology on $s$ if and only if there exists a neighborhood $u$ of $x$ in $X$ such that the preimage of $u$ under the inclusion map $\iota: s \hookrightarrow X$ is contained in $t$. In symbols: \[ t \in \mathcal{N}_x \iff \exists u \in \mathcal{N}_x, \iota^{-1}(u) \subseteq t \] where $\mathcal{N}_x$ denotes the neighborhood filter at $x$ in the respective topologies.
nhds_subtype theorem
(s : Set X) (x : { x // x ∈ s }) : 𝓝 x = comap (↑) (𝓝 (x : X))
Full source
theorem nhds_subtype (s : Set X) (x : { x // x ∈ s }) : 𝓝 x = comap (↑) (𝓝 (x : X)) :=
  nhds_induced _ x
Neighborhood Filter in Subspace Topology via Preimage
Informal description
For any subset $s$ of a topological space $X$ and any point $x \in s$, the neighborhood filter $\mathcal{N}_x$ of $x$ in the subspace topology on $s$ is equal to the preimage under the inclusion map of the neighborhood filter $\mathcal{N}_x$ of $x$ in $X$. In other words, $\mathcal{N}_x = \text{comap}(\iota, \mathcal{N}_x)$, where $\iota: s \hookrightarrow X$ is the inclusion map.
nhds_subtype_eq_comap_nhdsWithin theorem
(s : Set X) (x : { x // x ∈ s }) : 𝓝 x = comap (↑) (𝓝[s] (x : X))
Full source
lemma nhds_subtype_eq_comap_nhdsWithin (s : Set X) (x : { x // x ∈ s }) :
    𝓝 x = comap (↑) (𝓝[s] (x : X)) := by
  rw [nhds_subtype, ← comap_nhdsWithin_range, Subtype.range_val]
Subspace Neighborhood Filter as Preimage of Restricted Neighborhood Filter
Informal description
For any subset $s$ of a topological space $X$ and any point $x \in s$, the neighborhood filter $\mathcal{N}_x$ of $x$ in the subspace topology on $s$ is equal to the preimage under the inclusion map of the neighborhood filter of $x$ in $X$ restricted to $s$. In symbols: \[ \mathcal{N}_x = \text{comap}(\iota, \mathcal{N}_s(x)) \] where $\iota: s \hookrightarrow X$ is the inclusion map and $\mathcal{N}_s(x)$ denotes the neighborhood filter of $x$ within $s$ in $X$.
nhdsWithin_subtype_eq_bot_iff theorem
{s t : Set X} {x : s} : 𝓝[((↑) : s → X) ⁻¹' t] x = ⊥ ↔ 𝓝[t] (x : X) ⊓ 𝓟 s = ⊥
Full source
theorem nhdsWithin_subtype_eq_bot_iff {s t : Set X} {x : s} :
    𝓝[((↑) : s → X) ⁻¹' t] x𝓝[((↑) : s → X) ⁻¹' t] x = ⊥ ↔ 𝓝[t] (x : X) ⊓ 𝓟 s = ⊥ := by
  rw [inf_principal_eq_bot_iff_comap, nhdsWithin, nhdsWithin, comap_inf, comap_principal,
    nhds_induced]
Triviality of Subspace Neighborhood Filter within Preimage of a Set
Informal description
For a subset $s$ of a topological space $X$, a subset $t \subseteq X$, and a point $x \in s$, the neighborhood filter of $x$ within the subspace topology on $s$ restricted to the preimage of $t$ under the inclusion map is trivial if and only if the intersection of the neighborhood filter of $x$ within $t$ in $X$ and the principal filter of $s$ is trivial. In other words, $\mathcal{N}_{s \cap t}(x) = \bot$ if and only if $\mathcal{N}_t(x) \cap \mathcal{P}(s) = \bot$, where $\mathcal{N}_A(y)$ denotes the neighborhood filter of $y$ within $A$ and $\mathcal{P}(s)$ is the principal filter generated by $s$.
nhds_ne_subtype_eq_bot_iff theorem
{S : Set X} {x : S} : 𝓝[≠] x = ⊥ ↔ 𝓝[≠] (x : X) ⊓ 𝓟 S = ⊥
Full source
theorem nhds_ne_subtype_eq_bot_iff {S : Set X} {x : S} :
    𝓝[≠] x𝓝[≠] x = ⊥ ↔ 𝓝[≠] (x : X) ⊓ 𝓟 S = ⊥ := by
  rw [← nhdsWithin_subtype_eq_bot_iff, preimage_compl, ← image_singleton,
    Subtype.coe_injective.preimage_image]
Triviality of Subspace Neighborhood Filter at a Point versus Ambient Space
Informal description
For a subset $S$ of a topological space $X$ and a point $x \in S$, the neighborhood filter of $x$ in the subspace topology on $S$ restricted to the complement of $x$ is trivial if and only if the intersection of the neighborhood filter of $x$ in $X$ restricted to the complement of $x$ and the principal filter of $S$ is trivial. In symbols: \[ \mathcal{N}_{S \setminus \{x\}}(x) = \bot \leftrightarrow \mathcal{N}_{X \setminus \{x\}}(x) \cap \mathcal{P}(S) = \bot \]
nhds_ne_subtype_neBot_iff theorem
{S : Set X} {x : S} : (𝓝[≠] x).NeBot ↔ (𝓝[≠] (x : X) ⊓ 𝓟 S).NeBot
Full source
theorem nhds_ne_subtype_neBot_iff {S : Set X} {x : S} :
    (𝓝[≠] x).NeBot ↔ (𝓝[≠] (x : X) ⊓ 𝓟 S).NeBot := by
  rw [neBot_iff, neBot_iff, not_iff_not, nhds_ne_subtype_eq_bot_iff]
Nontriviality of Subspace Neighborhood Filter at a Point versus Ambient Space
Informal description
For a subset $S$ of a topological space $X$ and a point $x \in S$, the neighborhood filter of $x$ in the subspace topology on $S$ restricted to the complement of $x$ is nontrivial if and only if the intersection of the neighborhood filter of $x$ in $X$ restricted to the complement of $x$ and the principal filter of $S$ is nontrivial. In symbols: \[ \mathcal{N}_{S \setminus \{x\}}(x) \neq \bot \leftrightarrow \mathcal{N}_{X \setminus \{x\}}(x) \cap \mathcal{P}(S) \neq \bot \]
discreteTopology_subtype_iff theorem
{S : Set X} : DiscreteTopology S ↔ ∀ x ∈ S, 𝓝[≠] x ⊓ 𝓟 S = ⊥
Full source
theorem discreteTopology_subtype_iff {S : Set X} :
    DiscreteTopologyDiscreteTopology S ↔ ∀ x ∈ S, 𝓝[≠] x ⊓ 𝓟 S = ⊥ := by
  simp_rw [discreteTopology_iff_nhds_ne, SetCoe.forall', nhds_ne_subtype_eq_bot_iff]
Discrete Topology Characterization for Subsets via Neighborhood Filters
Informal description
A subset $S$ of a topological space $X$ has the discrete topology if and only if for every point $x \in S$, the neighborhood filter of $x$ in $X$ restricted to the complement of $x$ and intersected with the principal filter of $S$ is the trivial filter.
CofiniteTopology definition
(X : Type*)
Full source
/-- A type synonym equipped with the topology whose open sets are the empty set and the sets with
finite complements. -/
def CofiniteTopology (X : Type*) := X
Cofinite topology
Informal description
The type `CofiniteTopology X` is a type synonym for `X` equipped with the cofinite topology, where the open sets are precisely the empty set and the subsets of `X` with finite complements.
CofiniteTopology.of definition
: X ≃ CofiniteTopology X
Full source
/-- The identity equivalence between `` and `CofiniteTopology `. -/
def of : X ≃ CofiniteTopology X :=
  Equiv.refl X
Identity equivalence between $X$ and its cofinite topology
Informal description
The identity equivalence between a type $X$ and `CofiniteTopology X`, which is the bijection given by the identity function, with its inverse also being the identity function.
CofiniteTopology.instInhabited instance
[Inhabited X] : Inhabited (CofiniteTopology X)
Full source
instance [Inhabited X] : Inhabited (CofiniteTopology X) where default := of default
Inhabitedness of Cofinite Topology
Informal description
For any inhabited type $X$, the cofinite topology on $X$ is also inhabited.
CofiniteTopology.instTopologicalSpace instance
: TopologicalSpace (CofiniteTopology X)
Full source
instance : TopologicalSpace (CofiniteTopology X) where
  IsOpen s := s.NonemptySet.Finite sᶜ
  isOpen_univ := by simp
  isOpen_inter s t := by
    rintro hs ht ⟨x, hxs, hxt⟩
    rw [compl_inter]
    exact (hs ⟨x, hxs⟩).union (ht ⟨x, hxt⟩)
  isOpen_sUnion := by
    rintro s h ⟨x, t, hts, hzt⟩
    rw [compl_sUnion]
    exact Finite.sInter (mem_image_of_mem _ hts) (h t hts ⟨x, hzt⟩)
The Cofinite Topology on a Type
Informal description
The type `CofiniteTopology X` is equipped with the cofinite topology, where a set is open if and only if it is either empty or its complement is finite.
CofiniteTopology.isOpen_iff theorem
{s : Set (CofiniteTopology X)} : IsOpen s ↔ s.Nonempty → sᶜ.Finite
Full source
theorem isOpen_iff {s : Set (CofiniteTopology X)} : IsOpenIsOpen s ↔ s.Nonempty → sᶜ.Finite :=
  Iff.rfl
Characterization of Open Sets in Cofinite Topology
Informal description
A subset $s$ of the cofinite topology on a type $X$ is open if and only if whenever $s$ is nonempty, its complement $s^c$ is finite.
CofiniteTopology.isOpen_iff' theorem
{s : Set (CofiniteTopology X)} : IsOpen s ↔ s = ∅ ∨ sᶜ.Finite
Full source
theorem isOpen_iff' {s : Set (CofiniteTopology X)} : IsOpenIsOpen s ↔ s = ∅ ∨ sᶜ.Finite := by
  simp only [isOpen_iff, nonempty_iff_ne_empty, or_iff_not_imp_left]
Characterization of Open Sets in Cofinite Topology
Informal description
For any subset $s$ of the cofinite topology on a type $X$, $s$ is open if and only if either $s$ is the empty set or the complement of $s$ is finite.
CofiniteTopology.isClosed_iff theorem
{s : Set (CofiniteTopology X)} : IsClosed s ↔ s = univ ∨ s.Finite
Full source
theorem isClosed_iff {s : Set (CofiniteTopology X)} : IsClosedIsClosed s ↔ s = univ ∨ s.Finite := by
  simp only [← isOpen_compl_iff, isOpen_iff', compl_compl, compl_empty_iff]
Characterization of Closed Sets in Cofinite Topology
Informal description
A subset $s$ of the cofinite topology on a type $X$ is closed if and only if either $s$ is the entire space $X$ or $s$ is a finite set.
CofiniteTopology.nhds_eq theorem
(x : CofiniteTopology X) : 𝓝 x = pure x ⊔ cofinite
Full source
theorem nhds_eq (x : CofiniteTopology X) : 𝓝 x = purepure x ⊔ cofinite := by
  ext U
  rw [mem_nhds_iff]
  constructor
  · rintro ⟨V, hVU, V_op, haV⟩
    exact mem_sup.mpr ⟨hVU haV, mem_of_superset (V_op ⟨_, haV⟩) hVU⟩
  · rintro ⟨hU : x ∈ U, hU' : Uᶜ.Finite⟩
    exact ⟨U, Subset.rfl, fun _ => hU', hU⟩
Neighborhood Filter in Cofinite Topology: $\mathcal{N}(x) = \{x\} \sqcup \text{cofinite}$
Informal description
For any point $x$ in the cofinite topology on a type $X$, the neighborhood filter $\mathcal{N}(x)$ is equal to the supremum of the pure filter (generated by $\{x\}$) and the cofinite filter (consisting of all subsets with finite complements).
CofiniteTopology.mem_nhds_iff theorem
{x : CofiniteTopology X} {s : Set (CofiniteTopology X)} : s ∈ 𝓝 x ↔ x ∈ s ∧ sᶜ.Finite
Full source
theorem mem_nhds_iff {x : CofiniteTopology X} {s : Set (CofiniteTopology X)} :
    s ∈ 𝓝 xs ∈ 𝓝 x ↔ x ∈ s ∧ sᶜ.Finite := by simp [nhds_eq]
Neighborhood Characterization in Cofinite Topology: $s \in \mathcal{N}(x) \leftrightarrow x \in s \land s^c \text{ finite}$
Informal description
For any point $x$ in the cofinite topology on a type $X$, a subset $s$ is a neighborhood of $x$ if and only if $x$ belongs to $s$ and the complement of $s$ is finite. In other words, $s \in \mathcal{N}(x) \leftrightarrow x \in s \land s^c \text{ is finite}$.
MapClusterPt.curry_prodMap theorem
{α β : Type*} {f : α → X} {g : β → Y} {la : Filter α} {lb : Filter β} {x : X} {y : Y} (hf : MapClusterPt x la f) (hg : MapClusterPt y lb g) : MapClusterPt (x, y) (la.curry lb) (.map f g)
Full source
theorem MapClusterPt.curry_prodMap {α β : Type*}
    {f : α → X} {g : β → Y} {la : Filter α} {lb : Filter β} {x : X} {y : Y}
    (hf : MapClusterPt x la f) (hg : MapClusterPt y lb g) :
    MapClusterPt (x, y) (la.curry lb) (.map f g) := by
  rw [mapClusterPt_iff_frequently] at hf hg
  rw [((𝓝 x).basis_sets.prod_nhds (𝓝 y).basis_sets).mapClusterPt_iff_frequently]
  rintro ⟨s, t⟩ ⟨hs, ht⟩
  rw [frequently_curry_iff]
  exact (hf s hs).mono fun x hx ↦ (hg t ht).mono fun y hy ↦ ⟨hx, hy⟩
Cluster Points of Product Map under Curried Filter
Informal description
Let $X$ and $Y$ be topological spaces, $\alpha$ and $\beta$ be types, and $f : \alpha \to X$, $g : \beta \to Y$ be functions. Given filters $l_a$ on $\alpha$ and $l_b$ on $\beta$, and points $x \in X$, $y \in Y$, if $x$ is a cluster point of $f$ with respect to $l_a$ and $y$ is a cluster point of $g$ with respect to $l_b$, then $(x, y)$ is a cluster point of the product map $(f, g) : \alpha \times \beta \to X \times Y$ with respect to the curried filter $l_a.\mathrm{curry}\, l_b$.
MapClusterPt.prodMap theorem
{α β : Type*} {f : α → X} {g : β → Y} {la : Filter α} {lb : Filter β} {x : X} {y : Y} (hf : MapClusterPt x la f) (hg : MapClusterPt y lb g) : MapClusterPt (x, y) (la ×ˢ lb) (.map f g)
Full source
theorem MapClusterPt.prodMap {α β : Type*}
    {f : α → X} {g : β → Y} {la : Filter α} {lb : Filter β} {x : X} {y : Y}
    (hf : MapClusterPt x la f) (hg : MapClusterPt y lb g) :
    MapClusterPt (x, y) (la ×ˢ lb) (.map f g) :=
  (hf.curry_prodMap hg).mono <| map_mono curry_le_prod
Cluster Points of Product Map under Product Filter
Informal description
Let $X$ and $Y$ be topological spaces, $\alpha$ and $\beta$ be types, and $f : \alpha \to X$, $g : \beta \to Y$ be functions. Given filters $l_a$ on $\alpha$ and $l_b$ on $\beta$, and points $x \in X$, $y \in Y$, if $x$ is a cluster point of $f$ with respect to $l_a$ and $y$ is a cluster point of $g$ with respect to $l_b$, then $(x, y)$ is a cluster point of the product map $(f, g) : \alpha \times \beta \to X \times Y$ with respect to the product filter $l_a \times^s l_b$.
continuous_bool_rng theorem
[TopologicalSpace X] {f : X → Bool} (b : Bool) : Continuous f ↔ IsClopen (f ⁻¹' { b })
Full source
lemma continuous_bool_rng [TopologicalSpace X] {f : X → Bool} (b : Bool) :
    ContinuousContinuous f ↔ IsClopen (f ⁻¹' {b}) := by
  rw [continuous_discrete_rng, Bool.forall_bool' b, IsClopen, ← isOpen_compl_iff, ← preimage_compl,
    Bool.compl_singleton, and_comm]
Continuity Criterion for Boolean-Valued Functions via Clopen Preimages
Informal description
Let $X$ be a topological space and $f \colon X \to \{\text{true}, \text{false}\}$ a function to the boolean set. Then $f$ is continuous if and only if the preimage $f^{-1}(\{b\})$ is both closed and open (i.e., clopen) for every boolean value $b \in \{\text{true}, \text{false}\}$.
Topology.IsInducing.subtypeVal theorem
{t : Set Y} : IsInducing ((↑) : t → Y)
Full source
lemma Topology.IsInducing.subtypeVal {t : Set Y} : IsInducing ((↑) : t → Y) := ⟨rfl⟩
Inclusion Map is Inducing for Subspace Topology
Informal description
For any subset $t$ of a topological space $Y$, the inclusion map $\iota: t \to Y$ is inducing, meaning the topology on $t$ is the coarsest topology making $\iota$ continuous.
Topology.IsInducing.of_codRestrict theorem
{f : X → Y} {t : Set Y} (ht : ∀ x, f x ∈ t) (h : IsInducing (t.codRestrict f ht)) : IsInducing f
Full source
lemma Topology.IsInducing.of_codRestrict {f : X → Y} {t : Set Y} (ht : ∀ x, f x ∈ t)
    (h : IsInducing (t.codRestrict f ht)) : IsInducing f := subtypeVal.comp h
Inducing Property of a Map via Codomain Restriction
Informal description
Let $f \colon X \to Y$ be a map between topological spaces and $t \subseteq Y$ a subset such that $f(x) \in t$ for all $x \in X$. If the codomain-restricted map $f \colon X \to t$ (given by $\mathrm{codRestrict}\, f\, t\, ht$) is inducing, then the original map $f \colon X \to Y$ is also inducing.
Topology.IsEmbedding.subtypeVal theorem
: IsEmbedding ((↑) : Subtype p → X)
Full source
lemma Topology.IsEmbedding.subtypeVal : IsEmbedding ((↑) : Subtype p → X) :=
  ⟨.subtypeVal, Subtype.coe_injective⟩
Subtype Inclusion is a Topological Embedding
Informal description
The inclusion map $\iota: \{x \in X \mid p(x)\} \to X$ is an embedding, meaning it is injective and the topology on the subtype $\{x \in X \mid p(x)\}$ is the coarsest topology making $\iota$ continuous.
Topology.IsClosedEmbedding.subtypeVal theorem
(h : IsClosed {a | p a}) : IsClosedEmbedding ((↑) : Subtype p → X)
Full source
theorem Topology.IsClosedEmbedding.subtypeVal (h : IsClosed {a | p a}) :
    IsClosedEmbedding ((↑) : Subtype p → X) :=
  ⟨.subtypeVal, by rwa [Subtype.range_coe_subtype]⟩
Closed Subtype Inclusion is a Closed Embedding
Informal description
For any topological space $X$ and a predicate $p : X \to \text{Prop}$, if the set $\{x \in X \mid p(x)\}$ is closed in $X$, then the inclusion map $\iota: \{x \in X \mid p(x)\} \to X$ is a closed embedding.
continuous_subtype_val theorem
: Continuous (@Subtype.val X p)
Full source
@[continuity, fun_prop]
theorem continuous_subtype_val : Continuous (@Subtype.val X p) :=
  continuous_induced_dom
Continuity of Subtype Inclusion Map
Informal description
The canonical inclusion map from a subtype $\{x \in X \mid p(x)\}$ to the ambient topological space $X$ is continuous.
Continuous.subtype_val theorem
{f : Y → Subtype p} (hf : Continuous f) : Continuous fun x => (f x : X)
Full source
theorem Continuous.subtype_val {f : Y → Subtype p} (hf : Continuous f) :
    Continuous fun x => (f x : X) :=
  continuous_subtype_val.comp hf
Continuity of Composition with Subtype Inclusion
Informal description
Let $X$ be a topological space with a predicate $p$ on $X$, and let $Y$ be another topological space. If a function $f : Y \to \{x \in X \mid p(x)\}$ is continuous, then the composition of $f$ with the inclusion map $\{x \in X \mid p(x)\} \to X$ is also continuous.
IsOpen.isOpenMap_subtype_val theorem
{s : Set X} (hs : IsOpen s) : IsOpenMap ((↑) : s → X)
Full source
theorem IsOpen.isOpenMap_subtype_val {s : Set X} (hs : IsOpen s) : IsOpenMap ((↑) : s → X) :=
  hs.isOpenEmbedding_subtypeVal.isOpenMap
Open Subset Inclusion is an Open Map
Informal description
For any open subset $s$ of a topological space $X$, the inclusion map $\iota \colon s \to X$ is an open map. That is, the image of any open set in $s$ under $\iota$ is open in $X$.
IsOpenMap.restrict theorem
{f : X → Y} (hf : IsOpenMap f) {s : Set X} (hs : IsOpen s) : IsOpenMap (s.restrict f)
Full source
theorem IsOpenMap.restrict {f : X → Y} (hf : IsOpenMap f) {s : Set X} (hs : IsOpen s) :
    IsOpenMap (s.restrict f) :=
  hf.comp hs.isOpenMap_subtype_val
Restriction of an Open Map to an Open Subset is Open
Informal description
Let $f \colon X \to Y$ be an open map between topological spaces, and let $s \subseteq X$ be an open subset. Then the restriction of $f$ to $s$, denoted by $f|_s \colon s \to Y$, is also an open map.
IsClosed.isClosedEmbedding_subtypeVal theorem
{s : Set X} (hs : IsClosed s) : IsClosedEmbedding ((↑) : s → X)
Full source
lemma IsClosed.isClosedEmbedding_subtypeVal {s : Set X} (hs : IsClosed s) :
    IsClosedEmbedding ((↑) : s → X) := .subtypeVal hs
Closed Subset Inclusion is a Closed Embedding
Informal description
For any closed subset $s$ of a topological space $X$, the inclusion map $\iota \colon s \to X$ is a closed embedding. That is, $\iota$ is a homeomorphism onto its image and its image is closed in $X$.
IsClosed.isClosedMap_subtype_val theorem
{s : Set X} (hs : IsClosed s) : IsClosedMap ((↑) : s → X)
Full source
theorem IsClosed.isClosedMap_subtype_val {s : Set X} (hs : IsClosed s) :
    IsClosedMap ((↑) : s → X) :=
  hs.isClosedEmbedding_subtypeVal.isClosedMap
Inclusion of Closed Subset is a Closed Map
Informal description
For any closed subset $s$ of a topological space $X$, the inclusion map $\iota \colon s \to X$ is a closed map. That is, the image of any closed subset of $s$ under $\iota$ is closed in $X$.
Continuous.subtype_mk theorem
{f : Y → X} (h : Continuous f) (hp : ∀ x, p (f x)) : Continuous fun x => (⟨f x, hp x⟩ : Subtype p)
Full source
@[continuity, fun_prop]
theorem Continuous.subtype_mk {f : Y → X} (h : Continuous f) (hp : ∀ x, p (f x)) :
    Continuous fun x => (⟨f x, hp x⟩ : Subtype p) :=
  continuous_induced_rng.2 h
Continuity of Subtype Construction from Continuous Function
Informal description
Let $f : Y \to X$ be a continuous function between topological spaces, and let $p : X \to \text{Prop}$ be a predicate on $X$. If for every $x \in Y$, the image $f(x)$ satisfies $p$, then the function $x \mapsto \langle f(x), \text{hp } x \rangle$ from $Y$ to the subtype $\{x \in X \mid p(x)\}$ is continuous.
Continuous.subtype_map theorem
{f : X → Y} (h : Continuous f) {q : Y → Prop} (hpq : ∀ x, p x → q (f x)) : Continuous (Subtype.map f hpq)
Full source
theorem Continuous.subtype_map {f : X → Y} (h : Continuous f) {q : Y → Prop}
    (hpq : ∀ x, p x → q (f x)) : Continuous (Subtype.map f hpq) :=
  (h.comp continuous_subtype_val).subtype_mk _
Continuity of Subtype Mapping via Continuous Function
Informal description
Let $X$ and $Y$ be topological spaces, $p : X \to \text{Prop}$ and $q : Y \to \text{Prop}$ be predicates, and $f : X \to Y$ be a continuous function such that for every $x \in X$, $p(x)$ implies $q(f(x))$. Then the induced map $\text{Subtype.map } f \text{ hpq} : \{x \in X \mid p(x)\} \to \{y \in Y \mid q(y)\}$ is continuous.
continuous_inclusion theorem
{s t : Set X} (h : s ⊆ t) : Continuous (inclusion h)
Full source
theorem continuous_inclusion {s t : Set X} (h : s ⊆ t) : Continuous (inclusion h) :=
  continuous_id.subtype_map h
Continuity of Subset Inclusion Map
Informal description
For any topological space $X$ and subsets $s, t \subseteq X$ such that $s \subseteq t$, the inclusion map $\iota : s \to t$ is continuous.
continuousAt_subtype_val theorem
{p : X → Prop} {x : Subtype p} : ContinuousAt ((↑) : Subtype p → X) x
Full source
theorem continuousAt_subtype_val {p : X → Prop} {x : Subtype p} :
    ContinuousAt ((↑) : Subtype p → X) x :=
  continuous_subtype_val.continuousAt
Pointwise Continuity of Subtype Inclusion Map
Informal description
For any topological space $X$ and predicate $p : X \to \text{Prop}$, the canonical inclusion map $\iota : \{x \in X \mid p(x)\} \to X$ is continuous at every point $x$ in the subtype.
Subtype.dense_iff theorem
{s : Set X} {t : Set s} : Dense t ↔ s ⊆ closure ((↑) '' t)
Full source
theorem Subtype.dense_iff {s : Set X} {t : Set s} : DenseDense t ↔ s ⊆ closure ((↑) '' t) := by
  rw [IsInducing.subtypeVal.dense_iff, SetCoe.forall]
  rfl
Density Characterization for Subspaces via Inclusion Map
Informal description
For a subset $s$ of a topological space $X$ and a subset $t$ of $s$ (viewed as a subspace), $t$ is dense in $s$ if and only if $s$ is contained in the closure of the image of $t$ under the inclusion map $\iota : s \to X$.
map_nhds_subtype_val theorem
{s : Set X} (x : s) : map ((↑) : s → X) (𝓝 x) = 𝓝[s] ↑x
Full source
theorem map_nhds_subtype_val {s : Set X} (x : s) : map ((↑) : s → X) (𝓝 x) = 𝓝[s] ↑x := by
  rw [IsInducing.subtypeVal.map_nhds_eq, Subtype.range_val]
Pushforward of Subspace Neighborhood Filter Equals Restricted Neighborhood Filter
Informal description
For any subset $s$ of a topological space $X$ and any point $x \in s$, the pushforward of the neighborhood filter of $x$ (in the subspace topology on $s$) under the inclusion map $\iota: s \to X$ equals the neighborhood filter of $\iota(x)$ in $X$ restricted to $s$. In symbols: $\iota_*(\mathcal{N}_s(x)) = \mathcal{N}_X(\iota(x))|_s$, where $\mathcal{N}_s(x)$ denotes the neighborhood filter of $x$ in the subspace $s$, $\iota_*$ denotes the pushforward filter, and $\mathcal{N}_X(\iota(x))|_s$ is the restriction to $s$ of the neighborhood filter of $\iota(x)$ in $X$.
map_nhds_subtype_coe_eq_nhds theorem
{x : X} (hx : p x) (h : ∀ᶠ x in 𝓝 x, p x) : map ((↑) : Subtype p → X) (𝓝 ⟨x, hx⟩) = 𝓝 x
Full source
theorem map_nhds_subtype_coe_eq_nhds {x : X} (hx : p x) (h : ∀ᶠ x in 𝓝 x, p x) :
    map ((↑) : Subtype p → X) (𝓝 ⟨x, hx⟩) = 𝓝 x :=
  map_nhds_induced_of_mem <| by rw [Subtype.range_val]; exact h
Equality of Neighborhood Filters via Local Validity of Predicate
Informal description
Let $X$ be a topological space and $p$ a predicate on $X$. For a point $x \in X$ where $p(x)$ holds, if $p$ holds for all points in some neighborhood of $x$, then the pushforward of the neighborhood filter of $\langle x, h_x \rangle$ in the subspace $\{y \in X \mid p(y)\}$ under the inclusion map equals the neighborhood filter of $x$ in $X$. In symbols: $\text{map}\, \iota\, \mathcal{N}(\langle x, h_x \rangle) = \mathcal{N}(x)$, where $\iota : \{y \in X \mid p(y)\} \to X$ is the inclusion map.
nhds_subtype_eq_comap theorem
{x : X} {h : p x} : 𝓝 (⟨x, h⟩ : Subtype p) = comap (↑) (𝓝 x)
Full source
theorem nhds_subtype_eq_comap {x : X} {h : p x} : 𝓝 (⟨x, h⟩ : Subtype p) = comap (↑) (𝓝 x) :=
  nhds_induced _ _
Neighborhood Filter of Subspace Point via Preimage of Inclusion Map
Informal description
For a topological space $X$ and a predicate $p$ on $X$, given a point $x \in X$ with $p(x)$ true, the neighborhood filter of $\langle x, h\rangle$ in the subspace $\{a \in X \mid p(a)\}$ (where $h$ is the proof that $p(x)$ holds) is equal to the preimage of the neighborhood filter of $x$ in $X$ under the inclusion map. In symbols: $\mathcal{N}(\langle x, h\rangle) = \text{comap}(\iota, \mathcal{N}(x))$ where $\iota$ is the inclusion map from the subspace to $X$.
tendsto_subtype_rng theorem
{Y : Type*} {p : X → Prop} {l : Filter Y} {f : Y → Subtype p} : ∀ {x : Subtype p}, Tendsto f l (𝓝 x) ↔ Tendsto (fun x => (f x : X)) l (𝓝 (x : X))
Full source
theorem tendsto_subtype_rng {Y : Type*} {p : X → Prop} {l : Filter Y} {f : Y → Subtype p} :
    ∀ {x : Subtype p}, TendstoTendsto f l (𝓝 x) ↔ Tendsto (fun x => (f x : X)) l (𝓝 (x : X))
  | ⟨a, ha⟩ => by rw [nhds_subtype_eq_comap, tendsto_comap_iff]; rfl
Characterization of Convergence in Subspace via Inclusion Map
Informal description
Let $X$ be a topological space with a predicate $p : X \to \text{Prop}$, and let $Y$ be any type. For a filter $l$ on $Y$ and a function $f : Y \to \{x \in X \mid p(x)\}$, the following are equivalent for any point $x$ in the subspace $\{x \in X \mid p(x)\}$: 1. The function $f$ tends to $x$ with respect to the filter $l$ and the subspace topology. 2. The composition $\iota \circ f : Y \to X$ (where $\iota$ is the inclusion map) tends to $\iota(x)$ with respect to the filter $l$ and the topology on $X$. In symbols: $\text{Tendsto}\, f\, l\, (\mathcal{N}(x)) \leftrightarrow \text{Tendsto}\, (\iota \circ f)\, l\, (\mathcal{N}(\iota(x)))$.
closure_subtype theorem
{x : { a // p a }} {s : Set { a // p a }} : x ∈ closure s ↔ (x : X) ∈ closure (((↑) : _ → X) '' s)
Full source
theorem closure_subtype {x : { a // p a }} {s : Set { a // p a }} :
    x ∈ closure sx ∈ closure s ↔ (x : X) ∈ closure (((↑) : _ → X) '' s) :=
  closure_induced
Closure in Subspace Equals Closure in Ambient Space for Subspace Points
Informal description
For a topological space $X$ with a predicate $p : X \to \mathrm{Prop}$, let $S$ be a subset of the subspace $\{a \in X \mid p(a)\}$. For any point $x$ in this subspace, $x$ belongs to the closure of $S$ in the subspace topology if and only if the underlying point $x \in X$ belongs to the closure of the image of $S$ under the inclusion map in $X$. In symbols: For $x \in \{a \in X \mid p(a)\}$ and $S \subseteq \{a \in X \mid p(a)\}$, $$x \in \overline{S} \leftrightarrow x \in \overline{\iota(S)}$$ where $\iota$ is the inclusion map from the subspace to $X$, and closures are taken in their respective topologies.
continuousAt_codRestrict_iff theorem
{f : X → Y} {t : Set Y} (h1 : ∀ x, f x ∈ t) {x : X} : ContinuousAt (codRestrict f t h1) x ↔ ContinuousAt f x
Full source
@[simp]
theorem continuousAt_codRestrict_iff {f : X → Y} {t : Set Y} (h1 : ∀ x, f x ∈ t) {x : X} :
    ContinuousAtContinuousAt (codRestrict f t h1) x ↔ ContinuousAt f x :=
  IsInducing.subtypeVal.continuousAt_iff
Continuity at a Point for Codomain-Restricted Functions
Informal description
Let $f : X \to Y$ be a function between topological spaces, and let $t \subseteq Y$ be a subset such that $f(x) \in t$ for all $x \in X$. For any point $x \in X$, the codomain-restricted function $\mathrm{codRestrict}\, f\, t\, h_1 : X \to t$ is continuous at $x$ if and only if the original function $f$ is continuous at $x$.
ContinuousAt.restrict theorem
{f : X → Y} {s : Set X} {t : Set Y} (h1 : MapsTo f s t) {x : s} (h2 : ContinuousAt f x) : ContinuousAt (h1.restrict f s t) x
Full source
theorem ContinuousAt.restrict {f : X → Y} {s : Set X} {t : Set Y} (h1 : MapsTo f s t) {x : s}
    (h2 : ContinuousAt f x) : ContinuousAt (h1.restrict f s t) x :=
  (h2.comp continuousAt_subtype_val).codRestrict _
Continuity of Restricted Function at a Point
Informal description
Let $X$ and $Y$ be topological spaces, $f : X \to Y$ a function, and $s \subseteq X$, $t \subseteq Y$ subsets such that $f$ maps $s$ into $t$ (i.e., $f(s) \subseteq t$). If $f$ is continuous at a point $x \in s$, then the restricted function $f|_{s,t} : s \to t$ is continuous at $x$ (where $s$ and $t$ carry the subspace topologies).
ContinuousAt.restrictPreimage theorem
{f : X → Y} {s : Set Y} {x : f ⁻¹' s} (h : ContinuousAt f x) : ContinuousAt (s.restrictPreimage f) x
Full source
theorem ContinuousAt.restrictPreimage {f : X → Y} {s : Set Y} {x : f ⁻¹' s} (h : ContinuousAt f x) :
    ContinuousAt (s.restrictPreimage f) x :=
  h.restrict _
Continuity of Preimage-Restricted Function at a Point
Informal description
Let $X$ and $Y$ be topological spaces, $f : X \to Y$ a function, and $s \subseteq Y$ a subset. For any point $x$ in the preimage $f^{-1}(s)$, if $f$ is continuous at $x$, then the restricted function $f|_{f^{-1}(s)} : f^{-1}(s) \to s$ is continuous at $x$ (where $f^{-1}(s)$ and $s$ carry the subspace topologies).
Continuous.codRestrict theorem
{f : X → Y} {s : Set Y} (hf : Continuous f) (hs : ∀ a, f a ∈ s) : Continuous (s.codRestrict f hs)
Full source
@[continuity, fun_prop]
theorem Continuous.codRestrict {f : X → Y} {s : Set Y} (hf : Continuous f) (hs : ∀ a, f a ∈ s) :
    Continuous (s.codRestrict f hs) :=
  hf.subtype_mk hs
Continuity of Codomain-Restricted Function
Informal description
Let $f : X \to Y$ be a continuous function between topological spaces, and let $s \subseteq Y$ be a subset such that $f(x) \in s$ for all $x \in X$. Then the codomain-restricted function $f|_{s} : X \to s$ is continuous.
Continuous.restrict theorem
{f : X → Y} {s : Set X} {t : Set Y} (h1 : MapsTo f s t) (h2 : Continuous f) : Continuous (h1.restrict f s t)
Full source
@[continuity, fun_prop]
theorem Continuous.restrict {f : X → Y} {s : Set X} {t : Set Y} (h1 : MapsTo f s t)
    (h2 : Continuous f) : Continuous (h1.restrict f s t) :=
  (h2.comp continuous_subtype_val).codRestrict _
Continuity of Restricted Function Between Subsets
Informal description
Let $X$ and $Y$ be topological spaces, $f : X \to Y$ a continuous function, and $s \subseteq X$, $t \subseteq Y$ subsets such that $f$ maps $s$ into $t$ (i.e., $f(x) \in t$ for all $x \in s$). Then the restricted function $f|_s^t : s \to t$ is continuous.
Continuous.restrictPreimage theorem
{f : X → Y} {s : Set Y} (h : Continuous f) : Continuous (s.restrictPreimage f)
Full source
@[continuity, fun_prop]
theorem Continuous.restrictPreimage {f : X → Y} {s : Set Y} (h : Continuous f) :
    Continuous (s.restrictPreimage f) :=
  h.restrict _
Continuity of Function Restricted to Preimage
Informal description
Let $X$ and $Y$ be topological spaces and $f : X \to Y$ a continuous function. For any subset $s \subseteq Y$, the restriction of $f$ to the preimage $f^{-1}(s)$, denoted by $f|_{f^{-1}(s)} : f^{-1}(s) \to s$, is continuous.
Topology.IsEmbedding.restrict theorem
{f : X → Y} (hf : IsEmbedding f) {s : Set X} {t : Set Y} (H : s.MapsTo f t) : IsEmbedding H.restrict
Full source
lemma Topology.IsEmbedding.restrict {f : X → Y}
    (hf : IsEmbedding f) {s : Set X} {t : Set Y} (H : s.MapsTo f t) :
    IsEmbedding H.restrict :=
  .of_comp (hf.continuous.restrict H) continuous_subtype_val (hf.comp .subtypeVal)
Restriction of an Embedding is an Embedding
Informal description
Let $X$ and $Y$ be topological spaces, $f \colon X \to Y$ an embedding, and $s \subseteq X$, $t \subseteq Y$ subsets such that $f$ maps $s$ into $t$. Then the restricted function $f|_s^t \colon s \to t$ is also an embedding.
Topology.IsOpenEmbedding.restrict theorem
{f : X → Y} (hf : IsOpenEmbedding f) {s : Set X} {t : Set Y} (H : s.MapsTo f t) (hs : IsOpen s) : IsOpenEmbedding H.restrict
Full source
lemma Topology.IsOpenEmbedding.restrict {f : X → Y}
    (hf : IsOpenEmbedding f) {s : Set X} {t : Set Y} (H : s.MapsTo f t) (hs : IsOpen s) :
    IsOpenEmbedding H.restrict :=
  ⟨hf.isEmbedding.restrict H, (by
    rw [MapsTo.range_restrict]
    exact continuous_subtype_val.1 _ (hf.isOpenMap _ hs))⟩
Restriction of Open Embedding to Open Subset is Open Embedding
Informal description
Let $X$ and $Y$ be topological spaces, $f \colon X \to Y$ an open embedding, and $s \subseteq X$, $t \subseteq Y$ subsets such that $f$ maps $s$ into $t$. If $s$ is open in $X$, then the restricted function $f|_s^t \colon s \to t$ is also an open embedding.
Topology.IsInducing.codRestrict theorem
{e : X → Y} (he : IsInducing e) {s : Set Y} (hs : ∀ x, e x ∈ s) : IsInducing (codRestrict e s hs)
Full source
theorem Topology.IsInducing.codRestrict {e : X → Y} (he : IsInducing e) {s : Set Y}
    (hs : ∀ x, e x ∈ s) : IsInducing (codRestrict e s hs) :=
  he.of_comp (he.continuous.codRestrict hs) continuous_subtype_val
Inducing Property Preserved Under Codomain Restriction
Informal description
Let $e \colon X \to Y$ be an inducing map between topological spaces, and let $s \subseteq Y$ be a subset such that $e(x) \in s$ for all $x \in X$. Then the codomain-restricted map $e|_{s} \colon X \to s$ is also inducing.
Topology.IsEmbedding.codRestrict theorem
{e : X → Y} (he : IsEmbedding e) (s : Set Y) (hs : ∀ x, e x ∈ s) : IsEmbedding (codRestrict e s hs)
Full source
protected lemma Topology.IsEmbedding.codRestrict {e : X → Y} (he : IsEmbedding e) (s : Set Y)
    (hs : ∀ x, e x ∈ s) : IsEmbedding (codRestrict e s hs) :=
  he.of_comp (he.continuous.codRestrict hs) continuous_subtype_val
Embedding Property Preserved Under Codomain Restriction
Informal description
Let $e \colon X \to Y$ be an embedding between topological spaces, and let $s \subseteq Y$ be a subset such that $e(x) \in s$ for all $x \in X$. Then the codomain-restricted map $e|_{s} \colon X \to s$ is also an embedding.
Topology.IsOpenEmbedding.inclusion theorem
(hst : s ⊆ t) (hs : IsOpen (t ↓∩ s)) : IsOpenEmbedding (inclusion hst)
Full source
protected lemma Topology.IsOpenEmbedding.inclusion (hst : s ⊆ t) (hs : IsOpen (t ↓∩ s)) :
    IsOpenEmbedding (inclusion hst) where
  toIsEmbedding := .inclusion _
  isOpen_range := by rwa [range_inclusion]
Canonical inclusion of subsets is an open embedding when the intersection is open
Informal description
Let $X$ be a topological space and $s, t \subseteq X$ with $s \subseteq t$. If the intersection $t \cap s$ is open in $t$ (with the subspace topology), then the canonical inclusion map $\iota: s \to t$ is an open embedding.
Topology.IsClosedEmbedding.inclusion theorem
(hst : s ⊆ t) (hs : IsClosed (t ↓∩ s)) : IsClosedEmbedding (inclusion hst)
Full source
protected lemma Topology.IsClosedEmbedding.inclusion (hst : s ⊆ t) (hs : IsClosed (t ↓∩ s)) :
    IsClosedEmbedding (inclusion hst) where
  toIsEmbedding := .inclusion _
  isClosed_range := by rwa [range_inclusion]
Canonical inclusion of subsets is a closed embedding when the intersection is closed
Informal description
Let $X$ be a topological space and $s, t \subseteq X$ with $s \subseteq t$. If the intersection $t \cap s$ is closed in $t$ (with the subspace topology), then the canonical inclusion map $\iota: s \to t$ is a closed embedding.
DiscreteTopology.of_subset theorem
{X : Type*} [TopologicalSpace X] {s t : Set X} (_ : DiscreteTopology s) (ts : t ⊆ s) : DiscreteTopology t
Full source
/-- Let `s, t ⊆ X` be two subsets of a topological space `X`.  If `t ⊆ s` and the topology induced
by `X`on `s` is discrete, then also the topology induces on `t` is discrete. -/
theorem DiscreteTopology.of_subset {X : Type*} [TopologicalSpace X] {s t : Set X}
    (_ : DiscreteTopology s) (ts : t ⊆ s) : DiscreteTopology t :=
  (IsEmbedding.inclusion ts).discreteTopology
Discrete Topology is Inherited by Subsets
Informal description
Let $X$ be a topological space and $s, t \subseteq X$ be subsets such that $t \subseteq s$. If the subspace topology on $s$ is discrete, then the subspace topology on $t$ is also discrete.
DiscreteTopology.preimage_of_continuous_injective theorem
{X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] (s : Set Y) [DiscreteTopology s] {f : X → Y} (hc : Continuous f) (hinj : Function.Injective f) : DiscreteTopology (f ⁻¹' s)
Full source
/-- Let `s` be a discrete subset of a topological space. Then the preimage of `s` by
a continuous injective map is also discrete. -/
theorem DiscreteTopology.preimage_of_continuous_injective {X Y : Type*} [TopologicalSpace X]
    [TopologicalSpace Y] (s : Set Y) [DiscreteTopology s] {f : X → Y} (hc : Continuous f)
    (hinj : Function.Injective f) : DiscreteTopology (f ⁻¹' s) :=
  DiscreteTopology.of_continuous_injective (β := s) (Continuous.restrict
    (by exact fun _ x ↦ x) hc) ((MapsTo.restrict_inj _).mpr hinj.injOn)
Preimage of Discrete Set under Continuous Injection is Discrete
Informal description
Let $X$ and $Y$ be topological spaces, $s \subseteq Y$ a subset with the discrete topology, and $f : X \to Y$ a continuous injective function. Then the preimage $f^{-1}(s) \subseteq X$ also has the discrete topology.
Topology.IsQuotientMap.restrictPreimage_isOpen theorem
{f : X → Y} (hf : IsQuotientMap f) {s : Set Y} (hs : IsOpen s) : IsQuotientMap (s.restrictPreimage f)
Full source
/-- If `f : X → Y` is a quotient map,
then its restriction to the preimage of an open set is a quotient map too. -/
theorem Topology.IsQuotientMap.restrictPreimage_isOpen {f : X → Y} (hf : IsQuotientMap f)
    {s : Set Y} (hs : IsOpen s) : IsQuotientMap (s.restrictPreimage f) := by
  refine isQuotientMap_iff.2 ⟨hf.surjective.restrictPreimage _, fun U ↦ ?_⟩
  rw [hs.isOpenEmbedding_subtypeVal.isOpen_iff_image_isOpen, ← hf.isOpen_preimage,
    (hs.preimage hf.continuous).isOpenEmbedding_subtypeVal.isOpen_iff_image_isOpen,
    image_val_preimage_restrictPreimage]
Restriction of Quotient Map to Open Preimage is Quotient Map
Informal description
Let $f \colon X \to Y$ be a quotient map between topological spaces, and let $s \subseteq Y$ be an open subset. Then the restriction of $f$ to the preimage $f^{-1}(s)$, denoted by $\text{restrictPreimage}\ s\ f \colon f^{-1}(s) \to s$, is also a quotient map.
isClosed_preimage_val theorem
{s t : Set X} : IsClosed (s ↓∩ t) ↔ s ∩ closure (s ∩ t) ⊆ t
Full source
lemma isClosed_preimage_val {s t : Set X} : IsClosedIsClosed (s ↓∩ t) ↔ s ∩ closure (s ∩ t) ⊆ t := by
  rw [← closure_eq_iff_isClosed, IsEmbedding.subtypeVal.closure_eq_preimage_closure_image,
    ← Subtype.val_injective.image_injective.eq_iff, Subtype.image_preimage_coe,
    Subtype.image_preimage_coe, subset_antisymm_iff, and_iff_left, Set.subset_inter_iff,
    and_iff_right]
  exacts [Set.inter_subset_left, Set.subset_inter Set.inter_subset_left subset_closure]
Closedness Criterion for Preimage under Subtype Inclusion
Informal description
For any subsets $s$ and $t$ of a topological space $X$, the preimage of $t$ under the inclusion map of $s$ (denoted $s \downarrow\cap t$) is closed in the subspace topology of $s$ if and only if the intersection of $s$ with the closure of $s \cap t$ is contained in $t$. In other words: $$\text{IsClosed}(s \downarrow\cap t) \leftrightarrow s \cap \overline{s \cap t} \subseteq t.$$
frontier_inter_open_inter theorem
{s t : Set X} (ht : IsOpen t) : frontier (s ∩ t) ∩ t = frontier s ∩ t
Full source
theorem frontier_inter_open_inter {s t : Set X} (ht : IsOpen t) :
    frontierfrontier (s ∩ t) ∩ t = frontierfrontier s ∩ t := by
  simp only [Set.inter_comm _ t, ← Subtype.preimage_coe_eq_preimage_coe_iff,
    ht.isOpenMap_subtype_val.preimage_frontier_eq_frontier_preimage continuous_subtype_val,
    Subtype.preimage_coe_self_inter]
Frontier of Intersection with Open Set: $\partial(s \cap t) \cap t = \partial s \cap t$
Informal description
For any subsets $s$ and $t$ of a topological space $X$, if $t$ is open, then the intersection of the frontier of $s \cap t$ with $t$ equals the intersection of the frontier of $s$ with $t$. That is, \[ \partial(s \cap t) \cap t = \partial s \cap t. \]
IsOpen.preimage_val theorem
{s t : Set X} (ht : IsOpen t) : IsOpen (s ↓∩ t)
Full source
lemma IsOpen.preimage_val {s t : Set X} (ht : IsOpen t) : IsOpen (s ↓∩ t) :=
  ht.preimage continuous_subtype_val
Openness of Preimage under Subtype Inclusion for Open Sets
Informal description
For any open subset $t$ of a topological space $X$, the preimage of $t$ under the inclusion map of a subtype $s$ (denoted $s \downarrow\cap t$) is open in the subspace topology of $s$.
IsClosed.preimage_val theorem
{s t : Set X} (ht : IsClosed t) : IsClosed (s ↓∩ t)
Full source
lemma IsClosed.preimage_val {s t : Set X} (ht : IsClosed t) : IsClosed (s ↓∩ t) :=
  ht.preimage continuous_subtype_val
Closedness of Preimage under Subtype Inclusion for Closed Sets
Informal description
For any closed subset $t$ of a topological space $X$, the preimage of $t$ under the inclusion map of a subtype $s$ (denoted $s \downarrow\cap t$) is closed in the subspace topology of $s$.
IsOpen.inter_preimage_val_iff theorem
{s t : Set X} (hs : IsOpen s) : IsOpen (s ↓∩ t) ↔ IsOpen (s ∩ t)
Full source
@[simp] lemma IsOpen.inter_preimage_val_iff {s t : Set X} (hs : IsOpen s) :
    IsOpenIsOpen (s ↓∩ t) ↔ IsOpen (s ∩ t) :=
  ⟨fun h ↦ by simpa using hs.isOpenMap_subtype_val _ h,
    fun h ↦ (Subtype.preimage_coe_self_inter _ _).symm ▸ h.preimage_val⟩
Openness of Preimage under Subtype Inclusion Equals Openness of Intersection
Informal description
For any open subset $s$ of a topological space $X$ and any subset $t \subseteq X$, the preimage of $t$ under the inclusion map of $s$ (denoted $s \downarrow\cap t$) is open in the subspace topology of $s$ if and only if the intersection $s \cap t$ is open in $X$.
IsClosed.inter_preimage_val_iff theorem
{s t : Set X} (hs : IsClosed s) : IsClosed (s ↓∩ t) ↔ IsClosed (s ∩ t)
Full source
@[simp] lemma IsClosed.inter_preimage_val_iff {s t : Set X} (hs : IsClosed s) :
    IsClosedIsClosed (s ↓∩ t) ↔ IsClosed (s ∩ t) :=
  ⟨fun h ↦ by simpa using hs.isClosedMap_subtype_val _ h,
    fun h ↦ (Subtype.preimage_coe_self_inter _ _).symm ▸ h.preimage_val⟩
Closedness Criterion for Subspace Preimage vs. Intersection
Informal description
For any closed subset $s$ of a topological space $X$ and any subset $t \subseteq X$, the preimage of $t$ under the inclusion map of $s$ (denoted $s \downarrow\cap t$) is closed in the subspace topology of $s$ if and only if the intersection $s \cap t$ is closed in $X$.
isQuotientMap_quot_mk theorem
: IsQuotientMap (@Quot.mk X r)
Full source
theorem isQuotientMap_quot_mk : IsQuotientMap (@Quot.mk X r) :=
  ⟨Quot.exists_rep, rfl⟩
Quotient Map Property of $\text{Quot.mk}$
Informal description
The quotient map $\text{Quot.mk} : X \to \text{Quot } r$ is a quotient map in the topological sense, meaning it is continuous and surjective, and the topology on $\text{Quot } r$ is the finest topology for which this map is continuous.
continuous_quot_mk theorem
: Continuous (@Quot.mk X r)
Full source
@[continuity, fun_prop]
theorem continuous_quot_mk : Continuous (@Quot.mk X r) :=
  continuous_coinduced_rng
Continuity of the Quotient Map
Informal description
The canonical quotient map $\text{Quot.mk}_r : X \to \text{Quot } r$ is continuous, where $X$ is a topological space and $r$ is a relation on $X$.
continuous_quot_lift theorem
{f : X → Y} (hr : ∀ a b, r a b → f a = f b) (h : Continuous f) : Continuous (Quot.lift f hr : Quot r → Y)
Full source
@[continuity, fun_prop]
theorem continuous_quot_lift {f : X → Y} (hr : ∀ a b, r a b → f a = f b) (h : Continuous f) :
    Continuous (Quot.lift f hr : Quot r → Y) :=
  continuous_coinduced_dom.2 h
Continuity of Lifted Function on Quotient Space
Informal description
Let $X$ and $Y$ be topological spaces, $r$ be a relation on $X$, and $f: X \to Y$ be a continuous function. If $f$ respects the relation $r$ (i.e., $r(a,b)$ implies $f(a) = f(b)$ for all $a,b \in X$), then the induced function $\text{Quot.lift } f \text{ hr} : \text{Quot } r \to Y$ is continuous.
isQuotientMap_quotient_mk' theorem
: IsQuotientMap (@Quotient.mk' X s)
Full source
theorem isQuotientMap_quotient_mk' : IsQuotientMap (@Quotient.mk' X s) :=
  isQuotientMap_quot_mk
Quotient Projection is a Quotient Map
Informal description
The canonical projection map $\pi : X \to X/{\sim}$ from a topological space $X$ to its quotient space $X/{\sim}$ (where $\sim$ is an equivalence relation on $X$) is a quotient map, meaning it is continuous, surjective, and the topology on $X/{\sim}$ is the finest topology for which $\pi$ is continuous.
continuous_quotient_mk' theorem
: Continuous (@Quotient.mk' X s)
Full source
theorem continuous_quotient_mk' : Continuous (@Quotient.mk' X s) :=
  continuous_coinduced_rng
Continuity of Quotient Projection Map
Informal description
The canonical projection map $\pi : X \to X/{\sim}$ from a topological space $X$ to its quotient space $X/{\sim}$ (where $\sim$ is an equivalence relation on $X$) is continuous.
Continuous.quotient_lift theorem
{f : X → Y} (h : Continuous f) (hs : ∀ a b, a ≈ b → f a = f b) : Continuous (Quotient.lift f hs : Quotient s → Y)
Full source
theorem Continuous.quotient_lift {f : X → Y} (h : Continuous f) (hs : ∀ a b, a ≈ b → f a = f b) :
    Continuous (Quotient.lift f hs : Quotient s → Y) :=
  continuous_coinduced_dom.2 h
Continuity of the Lift of a Function to a Quotient Space
Informal description
Let $X$ be a topological space with an equivalence relation $\approx$ (given by a setoid $s$), and let $f \colon X \to Y$ be a continuous map to another topological space $Y$. If $f$ respects the equivalence relation, i.e., for all $a, b \in X$ with $a \approx b$ we have $f(a) = f(b)$, then the induced map $\overline{f} \colon \text{Quotient}\, s \to Y$ is also continuous.
Continuous.quotient_liftOn' theorem
{f : X → Y} (h : Continuous f) (hs : ∀ a b, s a b → f a = f b) : Continuous (fun x => Quotient.liftOn' x f hs : Quotient s → Y)
Full source
theorem Continuous.quotient_liftOn' {f : X → Y} (h : Continuous f)
    (hs : ∀ a b, s a b → f a = f b) :
    Continuous (fun x => Quotient.liftOn' x f hs : Quotient s → Y) :=
  h.quotient_lift hs
Continuity of the Lift of a Function to a Quotient Space (Primed Version)
Informal description
Let $X$ be a topological space with an equivalence relation $\sim$ (given by a setoid $s$), and let $f \colon X \to Y$ be a continuous map to another topological space $Y$. If $f$ respects the equivalence relation, i.e., for all $a, b \in X$ with $a \sim b$ we have $f(a) = f(b)$, then the induced map $\overline{f} \colon X/{\sim} \to Y$ defined by $\overline{f}([x]) = f(x)$ is also continuous.
Continuous.quotient_map' theorem
{t : Setoid Y} {f : X → Y} (hf : Continuous f) (H : (s.r ⇒ t.r) f f) : Continuous (Quotient.map' f H)
Full source
@[continuity, fun_prop]
theorem Continuous.quotient_map' {t : Setoid Y} {f : X → Y} (hf : Continuous f)
    (H : (s.r ⇒ t.r) f f) : Continuous (Quotient.map' f H) :=
  (continuous_quotient_mk'.comp hf).quotient_lift _
Continuity of the Induced Map Between Quotient Spaces
Informal description
Let $X$ and $Y$ be topological spaces with equivalence relations $\sim_X$ and $\sim_Y$ respectively (given by setoids $s$ and $t$). If $f \colon X \to Y$ is a continuous function that respects these equivalence relations (i.e., for all $a, b \in X$ with $a \sim_X b$ we have $f(a) \sim_Y f(b)$), then the induced map $\overline{f} \colon X/{\sim_X} \to Y/{\sim_Y}$ is also continuous.
continuous_pi_iff theorem
: Continuous f ↔ ∀ i, Continuous fun a => f a i
Full source
theorem continuous_pi_iff : ContinuousContinuous f ↔ ∀ i, Continuous fun a => f a i := by
  simp only [continuous_iInf_rng, continuous_induced_rng, comp_def]
Characterization of Continuous Functions into Product Spaces via Component Continuity
Informal description
A function $f$ into a product space $\prod_{i \in \iota} Y_i$ is continuous if and only if for every index $i \in \iota$, the component function $a \mapsto f(a)_i$ is continuous.
continuous_pi theorem
(h : ∀ i, Continuous fun a => f a i) : Continuous f
Full source
@[continuity, fun_prop]
theorem continuous_pi (h : ∀ i, Continuous fun a => f a i) : Continuous f :=
  continuous_pi_iff.2 h
Continuity of Functions into Product Spaces via Component Continuity
Informal description
If for every index $i$ in the index set $\iota$, the component function $a \mapsto f(a)_i$ is continuous, then the function $f \colon X \to \prod_{i \in \iota} Y_i$ is continuous.
continuous_apply theorem
(i : ι) : Continuous fun p : ∀ i, π i => p i
Full source
@[continuity, fun_prop]
theorem continuous_apply (i : ι) : Continuous fun p : ∀ i, π i => p i :=
  continuous_iInf_dom continuous_induced_dom
Continuity of Projection Maps in Product Spaces
Informal description
For any index $i$ in the index set $\iota$, the projection map $\pi_i \colon \prod_{i \in \iota} \pi_i \to \pi_i$ defined by $\pi_i(p) = p_i$ is continuous with respect to the product topology on $\prod_{i \in \iota} \pi_i$.
continuous_apply_apply theorem
{ρ : κ → ι → Type*} [∀ j i, TopologicalSpace (ρ j i)] (j : κ) (i : ι) : Continuous fun p : ∀ j, ∀ i, ρ j i => p j i
Full source
@[continuity]
theorem continuous_apply_apply {ρ : κ → ι → Type*} [∀ j i, TopologicalSpace (ρ j i)] (j : κ)
    (i : ι) : Continuous fun p : ∀ j, ∀ i, ρ j i => p j i :=
  (continuous_apply i).comp (continuous_apply j)
Continuity of Double Projection in Nested Product Spaces
Informal description
For any family of topological spaces $\{\rho_{j,i}\}_{j \in \kappa, i \in \iota}$ indexed by types $\kappa$ and $\iota$, and for any fixed indices $j \in \kappa$ and $i \in \iota$, the projection map $\pi_{j,i} \colon \prod_{j \in \kappa} \prod_{i \in \iota} \rho_{j,i} \to \rho_{j,i}$ defined by $\pi_{j,i}(p) = p_j i$ is continuous with respect to the product topology on $\prod_{j \in \kappa} \prod_{i \in \iota} \rho_{j,i}$.
continuousAt_apply theorem
(i : ι) (x : ∀ i, π i) : ContinuousAt (fun p : ∀ i, π i => p i) x
Full source
theorem continuousAt_apply (i : ι) (x : ∀ i, π i) : ContinuousAt (fun p : ∀ i, π i => p i) x :=
  (continuous_apply i).continuousAt
Pointwise Continuity of Projection Maps in Product Spaces
Informal description
For any index $i$ in the index set $\iota$ and any point $x$ in the product space $\prod_{i \in \iota} \pi_i$, the projection map $\pi_i \colon \prod_{i \in \iota} \pi_i \to \pi_i$ defined by $\pi_i(p) = p_i$ is continuous at $x$ with respect to the product topology on $\prod_{i \in \iota} \pi_i$.
Filter.Tendsto.apply_nhds theorem
{l : Filter Y} {f : Y → ∀ i, π i} {x : ∀ i, π i} (h : Tendsto f l (𝓝 x)) (i : ι) : Tendsto (fun a => f a i) l (𝓝 <| x i)
Full source
theorem Filter.Tendsto.apply_nhds {l : Filter Y} {f : Y → ∀ i, π i} {x : ∀ i, π i}
    (h : Tendsto f l (𝓝 x)) (i : ι) : Tendsto (fun a => f a i) l (𝓝 <| x i) :=
  (continuousAt_apply i _).tendsto.comp h
Componentwise Convergence in Product Spaces
Informal description
Let $Y$ be a topological space, $\{π_i\}_{i \in \iota}$ a family of topological spaces, and $f \colon Y \to \prod_{i \in \iota} π_i$ a map. If $f$ tends to $x \in \prod_{i \in \iota} π_i$ as the input tends to some limit point with respect to the neighborhood filter $\mathcal{N}(x)$, then for each index $i \in \iota$, the component function $f_i \colon Y \to π_i$ defined by $f_i(a) = f(a)_i$ tends to $x_i$ with respect to the neighborhood filter $\mathcal{N}(x_i)$.
Continuous.piMap theorem
{Y : ι → Type*} [∀ i, TopologicalSpace (Y i)] {f : ∀ i, π i → Y i} (hf : ∀ i, Continuous (f i)) : Continuous (Pi.map f)
Full source
@[fun_prop]
protected theorem Continuous.piMap {Y : ι → Type*} [∀ i, TopologicalSpace (Y i)]
    {f : ∀ i, π i → Y i} (hf : ∀ i, Continuous (f i)) : Continuous (Pi.map f) :=
  continuous_pi fun i ↦ (hf i).comp (continuous_apply i)
Continuity of Product Map via Componentwise Continuity
Informal description
Let $\{Y_i\}_{i \in \iota}$ be a family of topological spaces, and for each $i \in \iota$, let $f_i \colon \pi_i \to Y_i$ be a continuous function. Then the product map $\prod_{i \in \iota} f_i \colon \prod_{i \in \iota} \pi_i \to \prod_{i \in \iota} Y_i$ is continuous.
nhds_pi theorem
{a : ∀ i, π i} : 𝓝 a = pi fun i => 𝓝 (a i)
Full source
theorem nhds_pi {a : ∀ i, π i} : 𝓝 a = pi fun i => 𝓝 (a i) := by
  simp only [nhds_iInf, nhds_induced, Filter.pi]
Neighborhood Filter in Product Space is Componentwise Product
Informal description
For any point $a = (a_i)_{i \in \iota}$ in the product space $\prod_{i \in \iota} \pi_i$, the neighborhood filter $\mathcal{N}(a)$ is equal to the product of the neighborhood filters $\mathcal{N}(a_i)$ for each component $a_i$.
IsOpenMap.piMap theorem
{Y : ι → Type*} [∀ i, TopologicalSpace (Y i)] {f : ∀ i, π i → Y i} (hfo : ∀ i, IsOpenMap (f i)) (hsurj : ∀ᶠ i in cofinite, Surjective (f i)) : IsOpenMap (Pi.map f)
Full source
protected theorem IsOpenMap.piMap {Y : ι → Type*} [∀ i, TopologicalSpace (Y i)] {f : ∀ i, π i → Y i}
    (hfo : ∀ i, IsOpenMap (f i)) (hsurj : ∀ᶠ i in cofinite, Surjective (f i)) :
    IsOpenMap (Pi.map f) := by
  refine IsOpenMap.of_nhds_le fun x ↦ ?_
  rw [nhds_pi, nhds_pi, map_piMap_pi hsurj]
  exact Filter.pi_mono fun i ↦ (hfo i).nhds_le _
Openness of Product Map under Cofinite Surjectivity Condition
Informal description
Let $\{Y_i\}_{i \in \iota}$ be a family of topological spaces, and for each $i \in \iota$, let $f_i : \pi_i \to Y_i$ be an open map. Suppose that for all but finitely many indices $i \in \iota$, the functions $f_i$ are surjective. Then the product map $\prod_{i \in \iota} f_i : \prod_{i \in \iota} \pi_i \to \prod_{i \in \iota} Y_i$ is also an open map.
IsOpenQuotientMap.piMap theorem
{Y : ι → Type*} [∀ i, TopologicalSpace (Y i)] {f : ∀ i, π i → Y i} (hf : ∀ i, IsOpenQuotientMap (f i)) : IsOpenQuotientMap (Pi.map f)
Full source
protected theorem IsOpenQuotientMap.piMap {Y : ι → Type*} [∀ i, TopologicalSpace (Y i)]
    {f : ∀ i, π i → Y i} (hf : ∀ i, IsOpenQuotientMap (f i)) : IsOpenQuotientMap (Pi.map f) :=
  ⟨.piMap fun i ↦ (hf i).1, .piMap fun i ↦ (hf i).2, .piMap (fun i ↦ (hf i).3) <|
    .of_forall fun i ↦ (hf i).1⟩
Product of Open Quotient Maps is Open Quotient Map
Informal description
Let $\{Y_i\}_{i \in \iota}$ be a family of topological spaces, and for each $i \in \iota$, let $f_i \colon \pi_i \to Y_i$ be an open quotient map. Then the product map $\prod_{i \in \iota} f_i \colon \prod_{i \in \iota} \pi_i \to \prod_{i \in \iota} Y_i$ is also an open quotient map.
tendsto_pi_nhds theorem
{f : Y → ∀ i, π i} {g : ∀ i, π i} {u : Filter Y} : Tendsto f u (𝓝 g) ↔ ∀ x, Tendsto (fun i => f i x) u (𝓝 (g x))
Full source
theorem tendsto_pi_nhds {f : Y → ∀ i, π i} {g : ∀ i, π i} {u : Filter Y} :
    TendstoTendsto f u (𝓝 g) ↔ ∀ x, Tendsto (fun i => f i x) u (𝓝 (g x)) := by
  rw [nhds_pi, Filter.tendsto_pi]
Componentwise Convergence in Product Space
Informal description
For a function $f \colon Y \to \prod_{i} \pi_i$ and a point $g \in \prod_{i} \pi_i$, the function $f$ tends to $g$ with respect to the filter $u$ on $Y$ if and only if, for every index $x$, the component function $i \mapsto f(i)(x)$ tends to $g(x)$ with respect to $u$.
continuousAt_pi theorem
{f : X → ∀ i, π i} {x : X} : ContinuousAt f x ↔ ∀ i, ContinuousAt (fun y => f y i) x
Full source
theorem continuousAt_pi {f : X → ∀ i, π i} {x : X} :
    ContinuousAtContinuousAt f x ↔ ∀ i, ContinuousAt (fun y => f y i) x :=
  tendsto_pi_nhds
Componentwise Continuity in Product Space at a Point
Informal description
A function $f \colon X \to \prod_{i} \pi_i$ is continuous at a point $x \in X$ if and only if, for every index $i$, the component function $y \mapsto f(y)_i$ is continuous at $x$.
continuousAt_pi' theorem
{f : X → ∀ i, π i} {x : X} (hf : ∀ i, ContinuousAt (fun y => f y i) x) : ContinuousAt f x
Full source
@[fun_prop]
theorem continuousAt_pi' {f : X → ∀ i, π i} {x : X} (hf : ∀ i, ContinuousAt (fun y => f y i) x) :
    ContinuousAt f x :=
  continuousAt_pi.2 hf
Continuity of Product-Valued Function via Componentwise Continuity at a Point
Informal description
Let $f \colon X \to \prod_{i} \pi_i$ be a function and $x \in X$ a point. If for every index $i$, the component function $y \mapsto f(y)_i$ is continuous at $x$, then $f$ is continuous at $x$.
ContinuousAt.piMap theorem
{Y : ι → Type*} [∀ i, TopologicalSpace (Y i)] {f : ∀ i, π i → Y i} {x : ∀ i, π i} (hf : ∀ i, ContinuousAt (f i) (x i)) : ContinuousAt (Pi.map f) x
Full source
@[fun_prop]
protected theorem ContinuousAt.piMap {Y : ι → Type*} [∀ i, TopologicalSpace (Y i)]
    {f : ∀ i, π i → Y i} {x : ∀ i, π i} (hf : ∀ i, ContinuousAt (f i) (x i)) :
    ContinuousAt (Pi.map f) x :=
  continuousAt_pi.2 fun i ↦ (hf i).comp (continuousAt_apply i x)
Continuity of Product Map at a Point
Informal description
Let $\{Y_i\}_{i \in \iota}$ be a family of topological spaces, and let $f_i \colon \pi_i \to Y_i$ be a family of functions. For a point $x \in \prod_{i \in \iota} \pi_i$, if each $f_i$ is continuous at $x_i$, then the product map $\text{Pi.map}\, f \colon \prod_{i \in \iota} \pi_i \to \prod_{i \in \iota} Y_i$ is continuous at $x$.
Pi.continuous_precomp' theorem
{ι' : Type*} (φ : ι' → ι) : Continuous (fun (f : (∀ i, π i)) (j : ι') ↦ f (φ j))
Full source
theorem Pi.continuous_precomp' {ι' : Type*} (φ : ι' → ι) :
    Continuous (fun (f : (∀ i, π i)) (j : ι') ↦ f (φ j)) :=
  continuous_pi fun j ↦ continuous_apply (φ j)
Continuity of Precomposition in Product Spaces
Informal description
For any function $\varphi \colon \iota' \to \iota$ between index sets, the precomposition map $f \mapsto (f \circ \varphi) \colon \prod_{i \in \iota} \pi_i \to \prod_{j \in \iota'} \pi_{\varphi(j)}$ is continuous with respect to the product topologies.
Pi.continuous_precomp theorem
{ι' : Type*} (φ : ι' → ι) : Continuous (· ∘ φ : (ι → X) → (ι' → X))
Full source
theorem Pi.continuous_precomp {ι' : Type*} (φ : ι' → ι) :
    Continuous (· ∘ φ : (ι → X) → (ι' → X)) :=
  Pi.continuous_precomp' φ
Continuity of Precomposition in Function Spaces
Informal description
For any function $\varphi \colon \iota' \to \iota$ between index sets, the precomposition map $F \mapsto F \circ \varphi \colon (\iota \to X) \to (\iota' \to X)$ is continuous with respect to the product topologies.
Pi.continuous_postcomp' theorem
{X : ι → Type*} [∀ i, TopologicalSpace (X i)] {g : ∀ i, π i → X i} (hg : ∀ i, Continuous (g i)) : Continuous (fun (f : (∀ i, π i)) (i : ι) ↦ g i (f i))
Full source
theorem Pi.continuous_postcomp' {X : ι → Type*} [∀ i, TopologicalSpace (X i)]
    {g : ∀ i, π i → X i} (hg : ∀ i, Continuous (g i)) :
    Continuous (fun (f : (∀ i, π i)) (i : ι) ↦ g i (f i)) :=
  continuous_pi fun i ↦ (hg i).comp <| continuous_apply i
Continuity of Componentwise Postcomposition in Product Spaces
Informal description
Let $\{X_i\}_{i \in \iota}$ and $\{\pi_i\}_{i \in \iota}$ be families of topological spaces indexed by $\iota$, and for each $i \in \iota$, let $g_i \colon \pi_i \to X_i$ be a continuous function. Then the function $F \colon \prod_{i \in \iota} \pi_i \to \prod_{i \in \iota} X_i$ defined by $F(f)(i) = g_i(f(i))$ is continuous with respect to the product topologies.
Pi.continuous_postcomp theorem
[TopologicalSpace Y] {g : X → Y} (hg : Continuous g) : Continuous (g ∘ · : (ι → X) → (ι → Y))
Full source
theorem Pi.continuous_postcomp [TopologicalSpace Y] {g : X → Y} (hg : Continuous g) :
    Continuous (g ∘ · : (ι → X) → (ι → Y)) :=
  Pi.continuous_postcomp' fun _ ↦ hg
Continuity of Postcomposition in Product Spaces
Informal description
Let $X$ and $Y$ be topological spaces, and let $g \colon X \to Y$ be a continuous function. Then the function $G \colon \prod_{i \in \iota} X \to \prod_{i \in \iota} Y$ defined by $G(f)(i) = g(f(i))$ is continuous with respect to the product topologies.
Pi.induced_precomp' theorem
{ι' : Type*} (φ : ι' → ι) : induced (fun (f : (∀ i, π i)) (j : ι') ↦ f (φ j)) Pi.topologicalSpace = ⨅ i', induced (eval (φ i')) (T (φ i'))
Full source
lemma Pi.induced_precomp' {ι' : Type*} (φ : ι' → ι) :
    induced (fun (f : (∀ i, π i)) (j : ι') ↦ f (φ j)) Pi.topologicalSpace =
    ⨅ i', induced (eval (φ i')) (T (φ i')) := by
  simp [Pi.topologicalSpace, induced_iInf, induced_compose, comp_def]
Precomposition-Induced Topology Equals Infimum of Evaluation Topologies
Informal description
Let $\{Y_i\}_{i \in \iota}$ be a family of topological spaces indexed by $\iota$, and let $\varphi : \iota' \to \iota$ be a map between index types. The topology induced on the function space $\prod_{i \in \iota} Y_i$ by precomposition with $\varphi$ (i.e., the coarsest topology making the maps $f \mapsto f(\varphi(j))$ continuous for each $j \in \iota'$) is equal to the infimum of the topologies induced by evaluation at $\varphi(i')$ for each $i' \in \iota'$.
Pi.induced_precomp theorem
[TopologicalSpace Y] {ι' : Type*} (φ : ι' → ι) : induced (· ∘ φ) Pi.topologicalSpace = ⨅ i', induced (eval (φ i')) ‹TopologicalSpace Y›
Full source
lemma Pi.induced_precomp [TopologicalSpace Y] {ι' : Type*} (φ : ι' → ι) :
    induced (· ∘ φ) Pi.topologicalSpace =
    ⨅ i', induced (eval (φ i')) ‹TopologicalSpace Y› :=
  induced_precomp' φ
Precomposition-Induced Topology Equals Infimum of Evaluation Topologies on Function Space
Informal description
Let $Y$ be a topological space and $\{Y_i\}_{i \in \iota}$ be a family of topological spaces indexed by $\iota$. For any map $\varphi : \iota' \to \iota$ between index types, the topology induced on the function space $\prod_{i \in \iota} Y_i$ by precomposition with $\varphi$ (i.e., the coarsest topology making the maps $f \mapsto f \circ \varphi$ continuous) is equal to the infimum of the topologies induced by evaluation at $\varphi(i')$ for each $i' \in \iota'$.
Pi.continuous_restrict theorem
(S : Set ι) : Continuous (S.restrict : (∀ i : ι, π i) → (∀ i : S, π i))
Full source
@[continuity, fun_prop]
lemma Pi.continuous_restrict (S : Set ι) :
    Continuous (S.restrict : (∀ i : ι, π i) → (∀ i : S, π i)) :=
  Pi.continuous_precomp' ((↑) : S → ι)
Continuity of Restriction Map in Product Spaces
Informal description
For any subset $S$ of the index set $\iota$, the restriction map $f \mapsto f|_S$ from the product space $\prod_{i \in \iota} \pi_i$ to $\prod_{i \in S} \pi_i$ is continuous, where both spaces are equipped with their respective product topologies.
Pi.continuous_restrict₂ theorem
{s t : Set ι} (hst : s ⊆ t) : Continuous (restrict₂ (π := π) hst)
Full source
@[continuity, fun_prop]
lemma Pi.continuous_restrict₂ {s t : Set ι} (hst : s ⊆ t) : Continuous (restrict₂ (π := π) hst) :=
  continuous_pi fun _ ↦ continuous_apply _
Continuity of Restriction Map Between Product Spaces for Subset Inclusion
Informal description
For any subsets $s$ and $t$ of an index set $\iota$ with $s \subseteq t$, the restriction map $\text{restrict}_hst \colon \prod_{i \in t} \pi_i \to \prod_{i \in s} \pi_i$ is continuous with respect to the product topologies on $\prod_{i \in t} \pi_i$ and $\prod_{i \in s} \pi_i$.
Finset.continuous_restrict theorem
(s : Finset ι) : Continuous (s.restrict (π := π))
Full source
@[continuity, fun_prop]
theorem Finset.continuous_restrict (s : Finset ι) : Continuous (s.restrict (π := π)) :=
  continuous_pi fun _ ↦ continuous_apply _
Continuity of Finite Restriction in Product Spaces
Informal description
For any finite subset $s$ of the index set $\iota$, the restriction map $s.\text{restrict} \colon \prod_{i \in \iota} \pi_i \to \prod_{i \in s} \pi_i$ is continuous with respect to the product topologies on $\prod_{i \in \iota} \pi_i$ and $\prod_{i \in s} \pi_i$.
Finset.continuous_restrict₂ theorem
{s t : Finset ι} (hst : s ⊆ t) : Continuous (Finset.restrict₂ (π := π) hst)
Full source
@[continuity, fun_prop]
theorem Finset.continuous_restrict₂ {s t : Finset ι} (hst : s ⊆ t) :
    Continuous (Finset.restrict₂ (π := π) hst) :=
  continuous_pi fun _ ↦ continuous_apply _
Continuity of Finite Restriction Map Between Product Spaces
Informal description
For any finite subsets $s$ and $t$ of the index set $\iota$ with $s \subseteq t$, the restriction map $Finset.restrict₂ \colon \prod_{i \in t} \pi_i \to \prod_{i \in s} \pi_i$ is continuous with respect to the product topologies on $\prod_{i \in t} \pi_i$ and $\prod_{i \in s} \pi_i$.
Pi.continuous_restrict_apply theorem
(s : Set X) {f : X → Z} (hf : Continuous f) : Continuous (s.restrict f)
Full source
@[continuity, fun_prop]
theorem Pi.continuous_restrict_apply (s : Set X) {f : X → Z} (hf : Continuous f) :
    Continuous (s.restrict f) := hf.comp continuous_subtype_val
Continuity of Restricted Function
Informal description
Let $X$ and $Z$ be topological spaces, $s \subseteq X$ be a subset, and $f : X \to Z$ be a continuous function. Then the restriction of $f$ to $s$, denoted by $f|_s : s \to Z$, is continuous.
Pi.continuous_restrict₂_apply theorem
{s t : Set X} (hst : s ⊆ t) {f : t → Z} (hf : Continuous f) : Continuous (restrict₂ (π := fun _ ↦ Z) hst f)
Full source
@[continuity, fun_prop]
theorem Pi.continuous_restrict₂_apply {s t : Set X} (hst : s ⊆ t)
    {f : t → Z} (hf : Continuous f) :
    Continuous (restrict₂ (π := fun _ ↦ Z) hst f) := hf.comp (continuous_inclusion hst)
Continuity of Restricted Function on Subset
Informal description
Let $X$ and $Z$ be topological spaces, and let $s, t \subseteq X$ be subsets with $s \subseteq t$. For any continuous function $f : t \to Z$, the restriction of $f$ to $s$, denoted by $f|_s : s \to Z$, is continuous.
Finset.continuous_restrict_apply theorem
(s : Finset X) {f : X → Z} (hf : Continuous f) : Continuous (s.restrict f)
Full source
@[continuity, fun_prop]
theorem Finset.continuous_restrict_apply (s : Finset X) {f : X → Z} (hf : Continuous f) :
    Continuous (s.restrict f) := hf.comp continuous_subtype_val
Continuity of Finite Restriction of Continuous Function
Informal description
Let $X$ and $Z$ be topological spaces, $s$ be a finite subset of $X$, and $f : X \to Z$ be a continuous function. Then the restriction of $f$ to $s$, denoted by $s.\text{restrict}\,f$, is continuous.
Finset.continuous_restrict₂_apply theorem
{s t : Finset X} (hst : s ⊆ t) {f : t → Z} (hf : Continuous f) : Continuous (restrict₂ (π := fun _ ↦ Z) hst f)
Full source
@[continuity, fun_prop]
theorem Finset.continuous_restrict₂_apply {s t : Finset X} (hst : s ⊆ t)
    {f : t → Z} (hf : Continuous f) :
    Continuous (restrict₂ (π := fun _ ↦ Z) hst f) := hf.comp (continuous_inclusion hst)
Continuity of Restricted Function on Finite Subsets
Informal description
Let $X$ and $Z$ be topological spaces, and let $s, t$ be finite subsets of $X$ such that $s \subseteq t$. For any continuous function $f : t \to Z$, the restricted function $\text{restrict}_2 f : s \to Z$ is continuous.
Pi.induced_restrict theorem
(S : Set ι) : induced (S.restrict) Pi.topologicalSpace = ⨅ i ∈ S, induced (eval i) (T i)
Full source
lemma Pi.induced_restrict (S : Set ι) :
    induced (S.restrict) Pi.topologicalSpace =
    ⨅ i ∈ S, induced (eval i) (T i) := by
  simp +unfoldPartialApp [← iInf_subtype'', ← induced_precomp' ((↑) : S → ι),
    restrict]
Restriction-Induced Topology Equals Infimum of Evaluation Topologies on Subset
Informal description
Let $\{\pi_i\}_{i \in \iota}$ be a family of topological spaces indexed by a set $\iota$, and let $S \subseteq \iota$ be a subset. The topology induced on the restricted product space $\prod_{i \in S} \pi_i$ by the restriction map $S.\text{restrict}$ is equal to the infimum of the topologies induced by the evaluation maps $\text{eval}_i$ for each $i \in S$.
Pi.induced_restrict_sUnion theorem
(𝔖 : Set (Set ι)) : induced (⋃₀ 𝔖).restrict (Pi.topologicalSpace (Y := fun i : (⋃₀ 𝔖) ↦ π i)) = ⨅ S ∈ 𝔖, induced S.restrict Pi.topologicalSpace
Full source
lemma Pi.induced_restrict_sUnion (𝔖 : Set (Set ι)) :
    induced (⋃₀ 𝔖).restrict (Pi.topologicalSpace (Y := fun i : (⋃₀ 𝔖) ↦ π i)) =
    ⨅ S ∈ 𝔖, induced S.restrict Pi.topologicalSpace := by
  simp_rw [Pi.induced_restrict, iInf_sUnion]
Restriction-Induced Topology on Union Equals Infimum of Restriction Topologies
Informal description
Let $\{\pi_i\}_{i \in \iota}$ be a family of topological spaces indexed by a set $\iota$, and let $\mathfrak{S}$ be a collection of subsets of $\iota$. The topology induced on the product space $\prod_{i \in \bigcup₀ \mathfrak{S}} \pi_i$ by the restriction map $(\bigcup₀ \mathfrak{S}).\text{restrict}$ is equal to the infimum over all $S \in \mathfrak{S}$ of the topologies induced by the restriction maps $S.\text{restrict}$ on $\prod_{i \in S} \pi_i$. In symbols: \[ \text{induced}\, (\bigcup₀ \mathfrak{S}).\text{restrict}\, \text{Pi.topologicalSpace} = \bigsqcap_{S \in \mathfrak{S}} \text{induced}\, S.\text{restrict}\, \text{Pi.topologicalSpace} \]
Filter.Tendsto.update theorem
[DecidableEq ι] {l : Filter Y} {f : Y → ∀ i, π i} {x : ∀ i, π i} (hf : Tendsto f l (𝓝 x)) (i : ι) {g : Y → π i} {xi : π i} (hg : Tendsto g l (𝓝 xi)) : Tendsto (fun a => update (f a) i (g a)) l (𝓝 <| update x i xi)
Full source
theorem Filter.Tendsto.update [DecidableEq ι] {l : Filter Y} {f : Y → ∀ i, π i} {x : ∀ i, π i}
    (hf : Tendsto f l (𝓝 x)) (i : ι) {g : Y → π i} {xi : π i} (hg : Tendsto g l (𝓝 xi)) :
    Tendsto (fun a => update (f a) i (g a)) l (𝓝 <| update x i xi) :=
  tendsto_pi_nhds.2 fun j => by rcases eq_or_ne j i with (rfl | hj) <;> simp [*, hf.apply_nhds]
Convergence of Updated Functions in Product Spaces
Informal description
Let $\iota$ be a type with decidable equality, $Y$ a topological space, and $\{\pi_i\}_{i \in \iota}$ a family of topological spaces. Suppose $f \colon Y \to \prod_{i \in \iota} \pi_i$ is a function that tends to $x \in \prod_{i \in \iota} \pi_i$ as the input tends to some limit with respect to the neighborhood filter $\mathcal{N}(x)$. For any index $i \in \iota$, if $g \colon Y \to \pi_i$ is a function that tends to $x_i \in \pi_i$ with respect to $\mathcal{N}(x_i)$, then the updated function $a \mapsto \text{update}\, (f\, a)\, i\, (g\, a)$ tends to $\text{update}\, x\, i\, x_i$ with respect to $\mathcal{N}(\text{update}\, x\, i\, x_i)$.
ContinuousAt.update theorem
[DecidableEq ι] {x : X} (hf : ContinuousAt f x) (i : ι) {g : X → π i} (hg : ContinuousAt g x) : ContinuousAt (fun a => update (f a) i (g a)) x
Full source
theorem ContinuousAt.update [DecidableEq ι] {x : X} (hf : ContinuousAt f x) (i : ι) {g : X → π i}
    (hg : ContinuousAt g x) : ContinuousAt (fun a => update (f a) i (g a)) x :=
  hf.tendsto.update i hg
Continuity of Function Update at a Point in Product Spaces
Informal description
Let $X$ and $\{\pi_i\}_{i \in \iota}$ be topological spaces, where $\iota$ is a type with decidable equality. Suppose $f \colon X \to \prod_{i \in \iota} \pi_i$ is continuous at a point $x \in X$, and $g \colon X \to \pi_i$ is continuous at $x$ for some index $i \in \iota$. Then the function $a \mapsto \text{update}\, (f(a))\, i\, (g(a))$ is continuous at $x$, where $\text{update}$ modifies the $i$-th component of $f(a)$ to be $g(a)$ while leaving other components unchanged.
Continuous.update theorem
[DecidableEq ι] (hf : Continuous f) (i : ι) {g : X → π i} (hg : Continuous g) : Continuous fun a => update (f a) i (g a)
Full source
theorem Continuous.update [DecidableEq ι] (hf : Continuous f) (i : ι) {g : X → π i}
    (hg : Continuous g) : Continuous fun a => update (f a) i (g a) :=
  continuous_iff_continuousAt.2 fun _ => hf.continuousAt.update i hg.continuousAt
Continuity of Function Update in Product Spaces
Informal description
Let $X$ and $\{\pi_i\}_{i \in \iota}$ be topological spaces, where $\iota$ is a type with decidable equality. If $f \colon X \to \prod_{i \in \iota} \pi_i$ is continuous and $g \colon X \to \pi_i$ is continuous for some index $i \in \iota$, then the function $a \mapsto \text{update}\, (f(a))\, i\, (g(a))$ is continuous, where $\text{update}$ modifies the $i$-th component of $f(a)$ to be $g(a)$ while leaving other components unchanged.
continuous_update theorem
[DecidableEq ι] (i : ι) : Continuous fun f : (∀ j, π j) × π i => update f.1 i f.2
Full source
/-- `Function.update f i x` is continuous in `(f, x)`. -/
@[continuity, fun_prop]
theorem continuous_update [DecidableEq ι] (i : ι) :
    Continuous fun f : (∀ j, π j) × π i => update f.1 i f.2 :=
  continuous_fst.update i continuous_snd
Continuity of Componentwise Update in Product Topology
Informal description
Let $\{\pi_j\}_{j \in \iota}$ be a family of topological spaces indexed by a type $\iota$ with decidable equality. For any fixed index $i \in \iota$, the function $(f, x) \mapsto \text{update}\, f\, i\, x$ is continuous, where $\text{update}\, f\, i\, x$ denotes the function obtained by modifying the $i$-th component of $f$ to be $x$ while leaving all other components unchanged.
continuous_mulSingle theorem
[∀ i, One (π i)] [DecidableEq ι] (i : ι) : Continuous fun x => (Pi.mulSingle i x : ∀ i, π i)
Full source
/-- `Pi.mulSingle i x` is continuous in `x`. -/
@[to_additive (attr := continuity) "`Pi.single i x` is continuous in `x`."]
theorem continuous_mulSingle [∀ i, One (π i)] [DecidableEq ι] (i : ι) :
    Continuous fun x => (Pi.mulSingle i x : ∀ i, π i) :=
  continuous_const.update _ continuous_id
Continuity of Pointwise Insertion in Product Spaces
Informal description
Let $\{\pi_i\}_{i \in \iota}$ be a family of topological spaces with distinguished elements (i.e., each $\pi_i$ has a one-element), where $\iota$ is a type with decidable equality. For any fixed index $i \in \iota$, the function $x \mapsto \text{mulSingle}_i(x)$, which maps $x \in \pi_i$ to the element of $\prod_{j \in \iota} \pi_j$ that equals $x$ at index $i$ and the distinguished element at all other indices, is continuous.
Filter.Tendsto.finCons theorem
{f : Y → π 0} {g : Y → ∀ j : Fin n, π j.succ} {l : Filter Y} {x : π 0} {y : ∀ j, π (Fin.succ j)} (hf : Tendsto f l (𝓝 x)) (hg : Tendsto g l (𝓝 y)) : Tendsto (fun a => Fin.cons (f a) (g a)) l (𝓝 <| Fin.cons x y)
Full source
theorem Filter.Tendsto.finCons
    {f : Y → π 0} {g : Y → ∀ j : Fin n, π j.succ} {l : Filter Y} {x : π 0} {y : ∀ j, π (Fin.succ j)}
    (hf : Tendsto f l (𝓝 x)) (hg : Tendsto g l (𝓝 y)) :
    Tendsto (fun a => Fin.cons (f a) (g a)) l (𝓝 <| Fin.cons x y) :=
  tendsto_pi_nhds.2 fun j => Fin.cases (by simpa) (by simpa using tendsto_pi_nhds.1 hg) j
Componentwise Convergence of Prepended Tuple in Product Space
Informal description
Let $Y$ be a topological space, $\pi$ be a family of topological spaces indexed by $\text{Fin} (n+1)$, and $l$ be a filter on $Y$. Suppose $f \colon Y \to \pi(0)$ and $g \colon Y \to \prod_{j : \text{Fin} n} \pi(j.\text{succ})$ are functions such that $f$ tends to $x \in \pi(0)$ and $g$ tends to $y \in \prod_{j : \text{Fin} n} \pi(j.\text{succ})$ with respect to $l$. Then the function $a \mapsto \text{Fin.cons}(f(a), g(a))$ tends to $\text{Fin.cons}(x, y)$ in the product topology on $\prod_{i : \text{Fin} (n+1)} \pi(i)$ with respect to $l$.
ContinuousAt.finCons theorem
{f : X → π 0} {g : X → ∀ j : Fin n, π (Fin.succ j)} {x : X} (hf : ContinuousAt f x) (hg : ContinuousAt g x) : ContinuousAt (fun a => Fin.cons (f a) (g a)) x
Full source
theorem ContinuousAt.finCons {f : X → π 0} {g : X → ∀ j : Fin n, π (Fin.succ j)} {x : X}
    (hf : ContinuousAt f x) (hg : ContinuousAt g x) :
    ContinuousAt (fun a => Fin.cons (f a) (g a)) x :=
  hf.tendsto.finCons hg
Continuity of Prepended Tuple at a Point in Product Space
Informal description
Let $X$ be a topological space and $\pi$ be a family of topological spaces indexed by $\text{Fin} (n+1)$. Given functions $f \colon X \to \pi(0)$ and $g \colon X \to \prod_{j : \text{Fin} n} \pi(j.\text{succ})$ that are continuous at a point $x \in X$, the function $a \mapsto \text{Fin.cons}(f(a), g(a))$ is also continuous at $x$.
Continuous.finCons theorem
{f : X → π 0} {g : X → ∀ j : Fin n, π (Fin.succ j)} (hf : Continuous f) (hg : Continuous g) : Continuous fun a => Fin.cons (f a) (g a)
Full source
theorem Continuous.finCons {f : X → π 0} {g : X → ∀ j : Fin n, π (Fin.succ j)}
    (hf : Continuous f) (hg : Continuous g) : Continuous fun a => Fin.cons (f a) (g a) :=
  continuous_iff_continuousAt.2 fun _ => hf.continuousAt.finCons hg.continuousAt
Continuity of Prepended Tuple in Product Space
Informal description
Let $X$ be a topological space and $\pi$ be a family of topological spaces indexed by $\text{Fin} (n+1)$. Given continuous functions $f \colon X \to \pi(0)$ and $g \colon X \to \prod_{j : \text{Fin} n} \pi(j.\text{succ})$, the function $a \mapsto \text{Fin.cons}(f(a), g(a))$ is also continuous.
Filter.Tendsto.matrixVecCons theorem
{f : Y → Z} {g : Y → Fin n → Z} {l : Filter Y} {x : Z} {y : Fin n → Z} (hf : Tendsto f l (𝓝 x)) (hg : Tendsto g l (𝓝 y)) : Tendsto (fun a => Matrix.vecCons (f a) (g a)) l (𝓝 <| Matrix.vecCons x y)
Full source
theorem Filter.Tendsto.matrixVecCons
    {f : Y → Z} {g : Y → Fin n → Z} {l : Filter Y} {x : Z} {y : Fin n → Z}
    (hf : Tendsto f l (𝓝 x)) (hg : Tendsto g l (𝓝 y)) :
    Tendsto (fun a => Matrix.vecCons (f a) (g a)) l (𝓝 <| Matrix.vecCons x y) :=
  hf.finCons hg
Componentwise Convergence of Prepended Vector in Function Space
Informal description
Let $Y$ be a topological space, $Z$ be a topological space, and $l$ be a filter on $Y$. Suppose $f \colon Y \to Z$ and $g \colon Y \to \text{Fin} n \to Z$ are functions such that $f$ tends to $x \in Z$ and $g$ tends to $y \in \text{Fin} n \to Z$ with respect to $l$. Then the function $a \mapsto \text{vecCons}(f(a), g(a))$ tends to $\text{vecCons}(x, y)$ in the product topology on $\text{Fin} (n+1) \to Z$ with respect to $l$.
ContinuousAt.matrixVecCons theorem
{f : X → Z} {g : X → Fin n → Z} {x : X} (hf : ContinuousAt f x) (hg : ContinuousAt g x) : ContinuousAt (fun a => Matrix.vecCons (f a) (g a)) x
Full source
theorem ContinuousAt.matrixVecCons
    {f : X → Z} {g : X → Fin n → Z} {x : X} (hf : ContinuousAt f x) (hg : ContinuousAt g x) :
    ContinuousAt (fun a => Matrix.vecCons (f a) (g a)) x :=
  hf.finCons hg
Continuity of Prepended Vector at a Point in Product Space
Informal description
Let $X$ and $Z$ be topological spaces, and let $n$ be a natural number. Given functions $f \colon X \to Z$ and $g \colon X \to \text{Fin} n \to Z$ that are continuous at a point $x \in X$, the function $a \mapsto \text{vecCons}(f(a), g(a))$ is also continuous at $x$. Here, $\text{vecCons}$ prepends $f(a)$ to the vector $g(a)$, resulting in a vector of length $n+1$.
Continuous.matrixVecCons theorem
{f : X → Z} {g : X → Fin n → Z} (hf : Continuous f) (hg : Continuous g) : Continuous fun a => Matrix.vecCons (f a) (g a)
Full source
theorem Continuous.matrixVecCons
    {f : X → Z} {g : X → Fin n → Z} (hf : Continuous f) (hg : Continuous g) :
    Continuous fun a => Matrix.vecCons (f a) (g a) :=
  hf.finCons hg
Continuity of Vector Prepending in Product Space
Informal description
Let $X$ and $Z$ be topological spaces, and let $n$ be a natural number. Given continuous functions $f \colon X \to Z$ and $g \colon X \to \text{Fin} n \to Z$, the function $a \mapsto \text{vecCons}(f(a), g(a))$ is also continuous, where $\text{vecCons}$ prepends $f(a)$ to the vector $g(a)$, resulting in a vector of length $n+1$.
Filter.Tendsto.finSnoc theorem
{f : Y → ∀ j : Fin n, π j.castSucc} {g : Y → π (Fin.last _)} {l : Filter Y} {x : ∀ j, π (Fin.castSucc j)} {y : π (Fin.last _)} (hf : Tendsto f l (𝓝 x)) (hg : Tendsto g l (𝓝 y)) : Tendsto (fun a => Fin.snoc (f a) (g a)) l (𝓝 <| Fin.snoc x y)
Full source
theorem Filter.Tendsto.finSnoc
    {f : Y → ∀ j : Fin n, π j.castSucc} {g : Y → π (Fin.last _)}
    {l : Filter Y} {x : ∀ j, π (Fin.castSucc j)} {y : π (Fin.last _)}
    (hf : Tendsto f l (𝓝 x)) (hg : Tendsto g l (𝓝 y)) :
    Tendsto (fun a => Fin.snoc (f a) (g a)) l (𝓝 <| Fin.snoc x y) :=
  tendsto_pi_nhds.2 fun j => Fin.lastCases (by simpa) (by simpa using tendsto_pi_nhds.1 hf) j
Convergence of Appended Tuples in Product Space
Informal description
Let $Y$ be a type, $\pi$ a family of types indexed by $\text{Fin } (n+1)$, and $l$ a filter on $Y$. Given functions $f \colon Y \to \prod_{j \in \text{Fin } n} \pi_{j.\text{castSucc}}$ and $g \colon Y \to \pi_{\text{last } n}$, and points $x \in \prod_{j \in \text{Fin } n} \pi_{j.\text{castSucc}}$ and $y \in \pi_{\text{last } n}$, if $f$ tends to $x$ with respect to $l$ and $g$ tends to $y$ with respect to $l$, then the function $a \mapsto \text{snoc}(f(a), g(a))$ tends to $\text{snoc}(x, y)$ with respect to $l$.
ContinuousAt.finSnoc theorem
{f : X → ∀ j : Fin n, π j.castSucc} {g : X → π (Fin.last _)} {x : X} (hf : ContinuousAt f x) (hg : ContinuousAt g x) : ContinuousAt (fun a => Fin.snoc (f a) (g a)) x
Full source
theorem ContinuousAt.finSnoc {f : X → ∀ j : Fin n, π j.castSucc} {g : X → π (Fin.last _)} {x : X}
    (hf : ContinuousAt f x) (hg : ContinuousAt g x) :
    ContinuousAt (fun a => Fin.snoc (f a) (g a)) x :=
  hf.tendsto.finSnoc hg
Continuity at a Point of Appended Tuples in Product Space
Informal description
Let $X$ be a topological space and $\pi$ a family of types indexed by $\text{Fin}(n+1)$. Given functions $f \colon X \to \prod_{j \in \text{Fin}(n)} \pi_{j.\text{castSucc}}$ and $g \colon X \to \pi_{\text{last } n}$ that are continuous at a point $x \in X$, the function $a \mapsto \text{snoc}(f(a), g(a))$ is continuous at $x$.
Continuous.finSnoc theorem
{f : X → ∀ j : Fin n, π j.castSucc} {g : X → π (Fin.last _)} (hf : Continuous f) (hg : Continuous g) : Continuous fun a => Fin.snoc (f a) (g a)
Full source
theorem Continuous.finSnoc {f : X → ∀ j : Fin n, π j.castSucc} {g : X → π (Fin.last _)}
    (hf : Continuous f) (hg : Continuous g) : Continuous fun a => Fin.snoc (f a) (g a) :=
  continuous_iff_continuousAt.2 fun _ => hf.continuousAt.finSnoc hg.continuousAt
Continuity of Appended Tuples in Finite Product Space
Informal description
Let $X$ be a topological space and $\{\pi_j\}_{j \in \text{Fin}(n+1)}$ a family of topological spaces. Given continuous functions $f \colon X \to \prod_{j \in \text{Fin}(n)} \pi_{j.\text{castSucc}}$ and $g \colon X \to \pi_{\text{last } n}$, the function $a \mapsto \text{snoc}(f(a), g(a))$ is continuous.
Filter.Tendsto.finInsertNth theorem
(i : Fin (n + 1)) {f : Y → π i} {g : Y → ∀ j : Fin n, π (i.succAbove j)} {l : Filter Y} {x : π i} {y : ∀ j, π (i.succAbove j)} (hf : Tendsto f l (𝓝 x)) (hg : Tendsto g l (𝓝 y)) : Tendsto (fun a => i.insertNth (f a) (g a)) l (𝓝 <| i.insertNth x y)
Full source
theorem Filter.Tendsto.finInsertNth
    (i : Fin (n + 1)) {f : Y → π i} {g : Y → ∀ j : Fin n, π (i.succAbove j)} {l : Filter Y}
    {x : π i} {y : ∀ j, π (i.succAbove j)} (hf : Tendsto f l (𝓝 x)) (hg : Tendsto g l (𝓝 y)) :
    Tendsto (fun a => i.insertNth (f a) (g a)) l (𝓝 <| i.insertNth x y) :=
  tendsto_pi_nhds.2 fun j => Fin.succAboveCases i (by simpa) (by simpa using tendsto_pi_nhds.1 hg) j
Convergence of Inserted Tuple in Product Space
Informal description
Let $i \in \text{Fin}(n+1)$ be an index, and let $f \colon Y \to \pi_i$ and $g \colon Y \to \prod_{j \in \text{Fin}(n)} \pi_{i.\text{succAbove}\,j}$ be functions. Suppose $f$ tends to $x \in \pi_i$ and $g$ tends to $y \in \prod_{j \in \text{Fin}(n)} \pi_{i.\text{succAbove}\,j}$ with respect to a filter $l$ on $Y$. Then the function $a \mapsto i.\text{insertNth}\,(f\,a)\,(g\,a)$ tends to $i.\text{insertNth}\,x\,y$ with respect to $l$.
ContinuousAt.finInsertNth theorem
(i : Fin (n + 1)) {f : X → π i} {g : X → ∀ j : Fin n, π (i.succAbove j)} {x : X} (hf : ContinuousAt f x) (hg : ContinuousAt g x) : ContinuousAt (fun a => i.insertNth (f a) (g a)) x
Full source
theorem ContinuousAt.finInsertNth
    (i : Fin (n + 1)) {f : X → π i} {g : X → ∀ j : Fin n, π (i.succAbove j)} {x : X}
    (hf : ContinuousAt f x) (hg : ContinuousAt g x) :
    ContinuousAt (fun a => i.insertNth (f a) (g a)) x :=
  hf.tendsto.finInsertNth i hg
Continuity of Inserted Tuple at a Point in Finite Product Space
Informal description
Let $X$ be a topological space and $\{\pi_j\}_{j \in \text{Fin}(n+1)}$ a family of topological spaces. For any index $i \in \text{Fin}(n+1)$, if the functions $f \colon X \to \pi_i$ and $g \colon X \to \prod_{j \in \text{Fin}(n)} \pi_{i.\text{succAbove}\,j}$ are continuous at a point $x \in X$, then the function $a \mapsto i.\text{insertNth}\,(f\,a)\,(g\,a)$ is also continuous at $x$.
Continuous.finInsertNth theorem
(i : Fin (n + 1)) {f : X → π i} {g : X → ∀ j : Fin n, π (i.succAbove j)} (hf : Continuous f) (hg : Continuous g) : Continuous fun a => i.insertNth (f a) (g a)
Full source
theorem Continuous.finInsertNth
    (i : Fin (n + 1)) {f : X → π i} {g : X → ∀ j : Fin n, π (i.succAbove j)}
    (hf : Continuous f) (hg : Continuous g) : Continuous fun a => i.insertNth (f a) (g a) :=
  continuous_iff_continuousAt.2 fun _ => hf.continuousAt.finInsertNth i hg.continuousAt
Continuity of Inserted Tuple in Finite Product Space
Informal description
Let $X$ be a topological space and $\{\pi_j\}_{j \in \text{Fin}(n+1)}$ a family of topological spaces. For any index $i \in \text{Fin}(n+1)$, if the functions $f \colon X \to \pi_i$ and $g \colon X \to \prod_{j \in \text{Fin}(n)} \pi_{i.\text{succAbove}\,j}$ are continuous, then the function $a \mapsto i.\text{insertNth}\,(f\,a)\,(g\,a)$ is also continuous.
Filter.Tendsto.finInit theorem
{f : Y → ∀ j : Fin (n + 1), π j} {l : Filter Y} {x : ∀ j, π j} (hg : Tendsto f l (𝓝 x)) : Tendsto (fun a ↦ Fin.init (f a)) l (𝓝 <| Fin.init x)
Full source
theorem Filter.Tendsto.finInit {f : Y → ∀ j : Fin (n + 1), π j} {l : Filter Y} {x : ∀ j, π j}
    (hg : Tendsto f l (𝓝 x)) : Tendsto (fun a ↦ Fin.init (f a)) l (𝓝 <| Fin.init x) :=
  tendsto_pi_nhds.2 fun j ↦ apply_nhds hg j.castSucc
Convergence of Initial Segment in Finite Product Space
Informal description
Let $Y$ be a topological space, $\{\pi_j\}_{j \in \text{Fin}(n+1)}$ a family of topological spaces, and $f \colon Y \to \prod_{j \in \text{Fin}(n+1)} \pi_j$ a map. If $f$ tends to $x \in \prod_{j \in \text{Fin}(n+1)} \pi_j$ as the input tends to some limit point with respect to the neighborhood filter $\mathcal{N}(x)$, then the function $\text{Fin.init} \circ f \colon Y \to \prod_{j \in \text{Fin}(n)} \pi_j$ defined by $(\text{Fin.init} \circ f)(a) = (f(a)_0, \dots, f(a)_{n-1})$ tends to $\text{Fin.init}(x) = (x_0, \dots, x_{n-1})$ with respect to the neighborhood filter $\mathcal{N}(\text{Fin.init}(x))$.
ContinuousAt.finInit theorem
{f : X → ∀ j : Fin (n + 1), π j} {x : X} (hf : ContinuousAt f x) : ContinuousAt (fun a ↦ Fin.init (f a)) x
Full source
@[fun_prop]
theorem ContinuousAt.finInit {f : X → ∀ j : Fin (n + 1), π j} {x : X}
    (hf : ContinuousAt f x) : ContinuousAt (fun a ↦ Fin.init (f a)) x :=
  hf.tendsto.finInit
Continuity of Initial Segment in Finite Product Spaces at a Point
Informal description
Let $X$ be a topological space, $\{\pi_j\}_{j \in \text{Fin}(n+1)}$ a family of topological spaces, and $f \colon X \to \prod_{j \in \text{Fin}(n+1)} \pi_j$ a map. If $f$ is continuous at a point $x \in X$, then the function $\text{Fin.init} \circ f \colon X \to \prod_{j \in \text{Fin}(n)} \pi_j$ defined by $(\text{Fin.init} \circ f)(a) = (f(a)_0, \dots, f(a)_{n-1})$ is also continuous at $x$.
Continuous.finInit theorem
{f : X → ∀ j : Fin (n + 1), π j} (hf : Continuous f) : Continuous fun a ↦ Fin.init (f a)
Full source
@[fun_prop]
theorem Continuous.finInit {f : X → ∀ j : Fin (n + 1), π j} (hf : Continuous f) :
    Continuous fun a ↦ Fin.init (f a) :=
  continuous_iff_continuousAt.2 fun _ ↦ hf.continuousAt.finInit
Continuity of Initial Segment in Finite Product Spaces
Informal description
Let $X$ and $\{\pi_j\}_{j \in \text{Fin}(n+1)}$ be topological spaces, and let $f \colon X \to \prod_{j \in \text{Fin}(n+1)} \pi_j$ be a continuous function. Then the function $\text{Fin.init} \circ f \colon X \to \prod_{j \in \text{Fin}(n)} \pi_j$, defined by $(\text{Fin.init} \circ f)(a) = (f(a)_0, \dots, f(a)_{n-1})$, is also continuous.
Filter.Tendsto.finTail theorem
{f : Y → ∀ j : Fin (n + 1), π j} {l : Filter Y} {x : ∀ j, π j} (hg : Tendsto f l (𝓝 x)) : Tendsto (fun a ↦ Fin.tail (f a)) l (𝓝 <| Fin.tail x)
Full source
theorem Filter.Tendsto.finTail {f : Y → ∀ j : Fin (n + 1), π j} {l : Filter Y} {x : ∀ j, π j}
    (hg : Tendsto f l (𝓝 x)) : Tendsto (fun a ↦ Fin.tail (f a)) l (𝓝 <| Fin.tail x) :=
  tendsto_pi_nhds.2 fun j ↦ apply_nhds hg j.succ
Convergence of Tail Components in Finite Product Spaces
Informal description
Let $Y$ be a topological space, $\{\pi_j\}_{j \in \text{Fin}(n+1)}$ a family of topological spaces, and $f \colon Y \to \prod_{j \in \text{Fin}(n+1)} \pi_j$ a map. If $f$ tends to $x \in \prod_{j \in \text{Fin}(n+1)} \pi_j$ as the input tends to some limit point with respect to the neighborhood filter $\mathcal{N}(x)$, then the tail of $f$, defined by $(f(a))_{j+1}$ for $j \in \text{Fin}(n)$, tends to the tail of $x$ with respect to the neighborhood filter $\mathcal{N}(\text{Fin.tail}(x))$.
ContinuousAt.finTail theorem
{f : X → ∀ j : Fin (n + 1), π j} {x : X} (hf : ContinuousAt f x) : ContinuousAt (fun a ↦ Fin.tail (f a)) x
Full source
@[fun_prop]
theorem ContinuousAt.finTail {f : X → ∀ j : Fin (n + 1), π j} {x : X}
    (hf : ContinuousAt f x) : ContinuousAt (fun a ↦ Fin.tail (f a)) x :=
  hf.tendsto.finTail
Continuity of Tail Components at a Point in Finite Product Spaces
Informal description
Let $X$ and $\{\pi_j\}_{j \in \text{Fin}(n+1)}$ be topological spaces, and let $f \colon X \to \prod_{j \in \text{Fin}(n+1)} \pi_j$ be a function. If $f$ is continuous at a point $x \in X$, then the function $\text{Fin.tail} \circ f$, which maps $a \in X$ to the tail $(f(a))_{j+1}$ for $j \in \text{Fin}(n)$, is also continuous at $x$.
Continuous.finTail theorem
{f : X → ∀ j : Fin (n + 1), π j} (hf : Continuous f) : Continuous fun a ↦ Fin.tail (f a)
Full source
@[fun_prop]
theorem Continuous.finTail {f : X → ∀ j : Fin (n + 1), π j} (hf : Continuous f) :
    Continuous fun a ↦ Fin.tail (f a) :=
  continuous_iff_continuousAt.2 fun _ ↦ hf.continuousAt.finTail
Continuity of Tail Components in Finite Product Spaces
Informal description
Let $X$ and $\{\pi_j\}_{j \in \text{Fin}(n+1)}$ be topological spaces, and let $f \colon X \to \prod_{j \in \text{Fin}(n+1)} \pi_j$ be a continuous function. Then the function $\text{Fin.tail} \circ f$, which maps each $a \in X$ to the tail $(f(a))_{j+1}$ for $j \in \text{Fin}(n)$, is also continuous.
isOpen_set_pi theorem
{i : Set ι} {s : ∀ a, Set (π a)} (hi : i.Finite) (hs : ∀ a ∈ i, IsOpen (s a)) : IsOpen (pi i s)
Full source
theorem isOpen_set_pi {i : Set ι} {s : ∀ a, Set (π a)} (hi : i.Finite)
    (hs : ∀ a ∈ i, IsOpen (s a)) : IsOpen (pi i s) := by
  rw [pi_def]; exact hi.isOpen_biInter fun a ha => (hs _ ha).preimage (continuous_apply _)
Openness of Finite Product of Open Sets in Product Topology
Informal description
Let $\{Y_i\}_{i \in \iota}$ be a family of topological spaces indexed by $\iota$, and let $i \subseteq \iota$ be a finite subset. For each $a \in i$, let $s_a \subseteq Y_a$ be an open subset. Then the product set $\prod_{a \in i} s_a$ is open in the product topology on $\prod_{i \in \iota} Y_i$.
isOpen_pi_iff theorem
{s : Set (∀ a, π a)} : IsOpen s ↔ ∀ f, f ∈ s → ∃ (I : Finset ι) (u : ∀ a, Set (π a)), (∀ a, a ∈ I → IsOpen (u a) ∧ f a ∈ u a) ∧ (I : Set ι).pi u ⊆ s
Full source
theorem isOpen_pi_iff {s : Set (∀ a, π a)} :
    IsOpenIsOpen s ↔
      ∀ f, f ∈ s → ∃ (I : Finset ι) (u : ∀ a, Set (π a)),
        (∀ a, a ∈ I → IsOpen (u a) ∧ f a ∈ u a) ∧ (I : Set ι).pi u ⊆ s := by
  rw [isOpen_iff_nhds]
  simp_rw [le_principal_iff, nhds_pi, Filter.mem_pi', mem_nhds_iff]
  refine forall₂_congr fun a _ => ⟨?_, ?_⟩
  · rintro ⟨I, t, ⟨h1, h2⟩⟩
    refine ⟨I, fun a => eval a '' (I : Set ι).pi fun a => (h1 a).choose, fun i hi => ?_, ?_⟩
    · simp_rw [eval_image_pi (Finset.mem_coe.mpr hi)
          (pi_nonempty_iff.mpr fun i => ⟨_, fun _ => (h1 i).choose_spec.2.2⟩)]
      exact (h1 i).choose_spec.2
    · exact Subset.trans
        (pi_mono fun i hi => (eval_image_pi_subset hi).trans (h1 i).choose_spec.1) h2
  · rintro ⟨I, t, ⟨h1, h2⟩⟩
    classical
    refine ⟨I, fun a => ite (a ∈ I) (t a) univ, fun i => ?_, ?_⟩
    · by_cases hi : i ∈ I
      · use t i
        simp_rw [if_pos hi]
        exact ⟨Subset.rfl, (h1 i) hi⟩
      · use univ
        simp_rw [if_neg hi]
        exact ⟨Subset.rfl, isOpen_univ, mem_univ _⟩
    · rw [← univ_pi_ite]
      simp only [← ite_and, ← Finset.mem_coe, and_self_iff, univ_pi_ite, h2]
Characterization of Open Sets in Product Topology via Finite Subproducts
Informal description
A subset $s \subseteq \prod_{a \in \iota} \pi_a$ is open in the product topology if and only if for every $f \in s$, there exists a finite subset $I \subseteq \iota$ and a family of open sets $\{u_a\}_{a \in \iota}$ such that: 1. For each $a \in I$, the set $u_a \subseteq \pi_a$ is open and contains $f(a)$; 2. The product set $\prod_{a \in I} u_a$ is contained in $s$.
isOpen_pi_iff' theorem
[Finite ι] {s : Set (∀ a, π a)} : IsOpen s ↔ ∀ f, f ∈ s → ∃ u : ∀ a, Set (π a), (∀ a, IsOpen (u a) ∧ f a ∈ u a) ∧ univ.pi u ⊆ s
Full source
theorem isOpen_pi_iff' [Finite ι] {s : Set (∀ a, π a)} :
    IsOpenIsOpen s ↔
      ∀ f, f ∈ s → ∃ u : ∀ a, Set (π a), (∀ a, IsOpen (u a) ∧ f a ∈ u a) ∧ univ.pi u ⊆ s := by
  cases nonempty_fintype ι
  rw [isOpen_iff_nhds]
  simp_rw [le_principal_iff, nhds_pi, Filter.mem_pi', mem_nhds_iff]
  refine forall₂_congr fun a _ => ⟨?_, ?_⟩
  · rintro ⟨I, t, ⟨h1, h2⟩⟩
    refine
      ⟨fun i => (h1 i).choose,
        ⟨fun i => (h1 i).choose_spec.2,
          (pi_mono fun i _ => (h1 i).choose_spec.1).trans (Subset.trans ?_ h2)⟩⟩
    rw [← pi_inter_compl (I : Set ι)]
    exact inter_subset_left
  · exact fun ⟨u, ⟨h1, _⟩⟩ =>
      ⟨Finset.univ, u, ⟨fun i => ⟨u i, ⟨rfl.subset, h1 i⟩⟩, by rwa [Finset.coe_univ]⟩⟩
Characterization of Open Sets in Finite Product Topology
Informal description
Let $\iota$ be a finite index set and $\{\pi_a\}_{a \in \iota}$ a family of topological spaces. A subset $s \subseteq \prod_{a \in \iota} \pi_a$ is open in the product topology if and only if for every $f \in s$, there exists a family of open sets $\{u_a\}_{a \in \iota}$ such that: 1. Each $u_a \subseteq \pi_a$ is open and contains $f(a)$; 2. The product set $\prod_{a \in \iota} u_a$ is contained in $s$.
isClosed_set_pi theorem
{i : Set ι} {s : ∀ a, Set (π a)} (hs : ∀ a ∈ i, IsClosed (s a)) : IsClosed (pi i s)
Full source
theorem isClosed_set_pi {i : Set ι} {s : ∀ a, Set (π a)} (hs : ∀ a ∈ i, IsClosed (s a)) :
    IsClosed (pi i s) := by
  rw [pi_def]; exact isClosed_biInter fun a ha => (hs _ ha).preimage (continuous_apply _)
Product of Closed Sets is Closed in Product Topology
Informal description
For any subset $i \subseteq \iota$ and any family of closed sets $\{s_a\}_{a \in \iota}$ where each $s_a \subseteq \pi_a$ is closed for $a \in i$, the product set $\prod_{a \in i} s_a$ is closed in the product space $\prod_{a \in \iota} \pi_a$ equipped with the product topology.
mem_nhds_of_pi_mem_nhds theorem
{I : Set ι} {s : ∀ i, Set (π i)} (a : ∀ i, π i) (hs : I.pi s ∈ 𝓝 a) {i : ι} (hi : i ∈ I) : s i ∈ 𝓝 (a i)
Full source
theorem mem_nhds_of_pi_mem_nhds {I : Set ι} {s : ∀ i, Set (π i)} (a : ∀ i, π i) (hs : I.pi s ∈ 𝓝 a)
    {i : ι} (hi : i ∈ I) : s i ∈ 𝓝 (a i) := by
  rw [nhds_pi] at hs; exact mem_of_pi_mem_pi hs hi
Neighborhoods in Product Space Imply Componentwise Neighborhoods
Informal description
For any index set $I \subseteq \iota$ and family of sets $s_i \subseteq \pi_i$ for each $i \in \iota$, if the product set $\prod_{i \in I} s_i$ is a neighborhood of the point $a = (a_i)_{i \in \iota}$ in the product topology, then for each $i \in I$, the set $s_i$ is a neighborhood of $a_i$ in the topology of $\pi_i$.
set_pi_mem_nhds theorem
{i : Set ι} {s : ∀ a, Set (π a)} {x : ∀ a, π a} (hi : i.Finite) (hs : ∀ a ∈ i, s a ∈ 𝓝 (x a)) : pi i s ∈ 𝓝 x
Full source
theorem set_pi_mem_nhds {i : Set ι} {s : ∀ a, Set (π a)} {x : ∀ a, π a} (hi : i.Finite)
    (hs : ∀ a ∈ i, s a ∈ 𝓝 (x a)) : pipi i s ∈ 𝓝 x := by
  rw [pi_def, biInter_mem hi]
  exact fun a ha => (continuous_apply a).continuousAt (hs a ha)
Neighborhood Property of Finite Product Sets in Product Topology
Informal description
Let $\{π_a\}_{a \in \iota}$ be a family of topological spaces, $i \subseteq \iota$ a finite subset, and $\{s_a\}_{a \in \iota}$ a family of sets with $s_a \subseteq π_a$ for each $a \in \iota$. Given a point $x \in \prod_{a \in \iota} π_a$, if for each $a \in i$ the set $s_a$ is a neighborhood of $x_a$ in $π_a$, then the product set $\prod_{a \in i} s_a$ is a neighborhood of $x$ in the product space $\prod_{a \in \iota} π_a$ equipped with the product topology.
set_pi_mem_nhds_iff theorem
{I : Set ι} (hI : I.Finite) {s : ∀ i, Set (π i)} (a : ∀ i, π i) : I.pi s ∈ 𝓝 a ↔ ∀ i : ι, i ∈ I → s i ∈ 𝓝 (a i)
Full source
theorem set_pi_mem_nhds_iff {I : Set ι} (hI : I.Finite) {s : ∀ i, Set (π i)} (a : ∀ i, π i) :
    I.pi s ∈ 𝓝 aI.pi s ∈ 𝓝 a ↔ ∀ i : ι, i ∈ I → s i ∈ 𝓝 (a i) := by
  rw [nhds_pi, pi_mem_pi_iff hI]
Neighborhood Criterion for Finite Product Sets: $\prod_{i \in I} s_i \in \mathcal{N}(a) \leftrightarrow \forall i \in I, s_i \in \mathcal{N}(a_i)$
Informal description
Let $I$ be a finite subset of the index set $\iota$, and for each $i \in \iota$, let $s_i$ be a subset of the topological space $\pi_i$. For a point $a = (a_i)_{i \in \iota}$ in the product space $\prod_{i \in \iota} \pi_i$, the product set $\prod_{i \in I} s_i$ is a neighborhood of $a$ if and only if for every $i \in I$, the set $s_i$ is a neighborhood of $a_i$ in $\pi_i$.
interior_pi_set theorem
{I : Set ι} (hI : I.Finite) {s : ∀ i, Set (π i)} : interior (pi I s) = I.pi fun i => interior (s i)
Full source
theorem interior_pi_set {I : Set ι} (hI : I.Finite) {s : ∀ i, Set (π i)} :
    interior (pi I s) = I.pi fun i => interior (s i) := by
  ext a
  simp only [Set.mem_pi, mem_interior_iff_mem_nhds, set_pi_mem_nhds_iff hI]
Interior of Finite Product Set Equals Product of Interiors
Informal description
For any finite subset $I$ of the index set $\iota$ and any family of sets $\{s_i\}_{i \in \iota}$ where each $s_i$ is a subset of the topological space $\pi_i$, the interior of the product set $\prod_{i \in I} s_i$ in the product topology is equal to the product of the interiors of the individual sets $s_i$, i.e., $$ \text{interior}\left(\prod_{i \in I} s_i\right) = \prod_{i \in I} \text{interior}(s_i). $$
exists_finset_piecewise_mem_of_mem_nhds theorem
[DecidableEq ι] {s : Set (∀ a, π a)} {x : ∀ a, π a} (hs : s ∈ 𝓝 x) (y : ∀ a, π a) : ∃ I : Finset ι, I.piecewise x y ∈ s
Full source
theorem exists_finset_piecewise_mem_of_mem_nhds [DecidableEq ι] {s : Set (∀ a, π a)} {x : ∀ a, π a}
    (hs : s ∈ 𝓝 x) (y : ∀ a, π a) : ∃ I : Finset ι, I.piecewise x y ∈ s := by
  simp only [nhds_pi, Filter.mem_pi'] at hs
  rcases hs with ⟨I, t, htx, hts⟩
  refine ⟨I, hts fun i hi => ?_⟩
  simpa [Finset.mem_coe.1 hi] using mem_of_mem_nhds (htx i)
Existence of Finite Modification in Product Neighborhoods
Informal description
Let $\iota$ be a type with decidable equality, and let $\pi_a$ be a topological space for each $a \in \iota$. For any neighborhood $s$ of a point $x \in \prod_{a \in \iota} \pi_a$ and any other point $y \in \prod_{a \in \iota} \pi_a$, there exists a finite subset $I \subseteq \iota$ such that the function obtained by piecing together $x$ and $y$ on $I$ (i.e., equal to $x$ on $I$ and $y$ on its complement) belongs to $s$.
pi_generateFrom_eq theorem
{π : ι → Type*} {g : ∀ a, Set (Set (π a))} : (@Pi.topologicalSpace ι π fun a => generateFrom (g a)) = generateFrom {t | ∃ (s : ∀ a, Set (π a)) (i : Finset ι), (∀ a ∈ i, s a ∈ g a) ∧ t = pi (↑i) s}
Full source
theorem pi_generateFrom_eq {π : ι → Type*} {g : ∀ a, Set (Set (π a))} :
    (@Pi.topologicalSpace ι π fun a => generateFrom (g a)) =
      generateFrom
        { t | ∃ (s : ∀ a, Set (π a)) (i : Finset ι), (∀ a ∈ i, s a ∈ g a) ∧ t = pi (↑i) s } := by
  refine le_antisymm ?_ ?_
  · apply le_generateFrom
    rintro _ ⟨s, i, hi, rfl⟩
    letI := fun a => generateFrom (g a)
    exact isOpen_set_pi i.finite_toSet (fun a ha => GenerateOpen.basic _ (hi a ha))
  · classical
    refine le_iInf fun i => coinduced_le_iff_le_induced.1 <| le_generateFrom fun s hs => ?_
    refine GenerateOpen.basic _ ⟨update (fun i => univ) i s, {i}, ?_⟩
    simp [hs]
Product Topology as Generated by Finite Products of Generating Sets
Informal description
Let $\{Y_i\}_{i \in \iota}$ be a family of topological spaces indexed by $\iota$, where each $Y_i$ is equipped with the topology generated by a collection of subsets $g_i \subseteq \mathcal{P}(Y_i)$. Then the product topology on $\prod_{i \in \iota} Y_i$ coincides with the topology generated by sets of the form $\prod_{i \in I} s_i$, where $I$ is a finite subset of $\iota$ and for each $i \in I$, $s_i$ belongs to $g_i$.
pi_eq_generateFrom theorem
: Pi.topologicalSpace = generateFrom {g | ∃ (s : ∀ a, Set (π a)) (i : Finset ι), (∀ a ∈ i, IsOpen (s a)) ∧ g = pi (↑i) s}
Full source
theorem pi_eq_generateFrom :
    Pi.topologicalSpace =
      generateFrom
        { g | ∃ (s : ∀ a, Set (π a)) (i : Finset ι), (∀ a ∈ i, IsOpen (s a)) ∧ g = pi (↑i) s } :=
  calc Pi.topologicalSpace
  _ = @Pi.topologicalSpace ι π fun _ => generateFrom { s | IsOpen s } := by
    simp only [generateFrom_setOf_isOpen]
  _ = _ := pi_generateFrom_eq
Product Topology as Generated by Finite Products of Open Sets
Informal description
The product topology on $\prod_{a \in \iota} \pi_a$ is equal to the topology generated by sets of the form $\prod_{a \in I} s_a$, where $I$ is a finite subset of $\iota$ and each $s_a$ is an open subset of $\pi_a$.
pi_generateFrom_eq_finite theorem
{π : ι → Type*} {g : ∀ a, Set (Set (π a))} [Finite ι] (hg : ∀ a, ⋃₀ g a = univ) : (@Pi.topologicalSpace ι π fun a => generateFrom (g a)) = generateFrom {t | ∃ s : ∀ a, Set (π a), (∀ a, s a ∈ g a) ∧ t = pi univ s}
Full source
theorem pi_generateFrom_eq_finite {π : ι → Type*} {g : ∀ a, Set (Set (π a))} [Finite ι]
    (hg : ∀ a, ⋃₀ g a = univ) :
    (@Pi.topologicalSpace ι π fun a => generateFrom (g a)) =
      generateFrom { t | ∃ s : ∀ a, Set (π a), (∀ a, s a ∈ g a) ∧ t = pi univ s } := by
  cases nonempty_fintype ι
  rw [pi_generateFrom_eq]
  refine le_antisymm (generateFrom_anti ?_) (le_generateFrom ?_)
  · exact fun s ⟨t, ht, Eq⟩ => ⟨t, Finset.univ, by simp [ht, Eq]⟩
  · rintro s ⟨t, i, ht, rfl⟩
    letI := generateFrom { t | ∃ s : ∀ a, Set (π a), (∀ a, s a ∈ g a) ∧ t = pi univ s }
    refine isOpen_iff_forall_mem_open.2 fun f hf => ?_
    choose c hcg hfc using fun a => sUnion_eq_univ_iff.1 (hg a) (f a)
    refine ⟨pi i t ∩ pi ((↑i)ᶜ : Set ι) c, inter_subset_left, ?_, ⟨hf, fun a _ => hfc a⟩⟩
    classical
    rw [← univ_pi_piecewise]
    refine GenerateOpen.basic _ ⟨_, fun a => ?_, rfl⟩
    by_cases a ∈ i <;> simp [*]
Product Topology Characterization for Finite Index Sets with Covering Generators
Informal description
Let $\{\pi_a\}_{a \in \iota}$ be a finite family of types, each equipped with a collection $g_a$ of subsets of $\pi_a$ whose union covers $\pi_a$ (i.e., $\bigcup_{S \in g_a} S = \pi_a$ for each $a$). Then the product topology on $\prod_{a \in \iota} \pi_a$, where each $\pi_a$ is given the topology generated by $g_a$, coincides with the topology generated by sets of the form $\prod_{a \in \iota} s_a$, where each $s_a \in g_a$.
induced_to_pi theorem
{X : Type*} (f : X → ∀ i, π i) : induced f Pi.topologicalSpace = ⨅ i, induced (f · i) inferInstance
Full source
theorem induced_to_pi {X : Type*} (f : X → ∀ i, π i) :
    induced f Pi.topologicalSpace = ⨅ i, induced (f · i) inferInstance := by
  simp_rw [Pi.topologicalSpace, induced_iInf, induced_compose, Function.comp_def]
Induced Topology on Domain of Product-Valued Function Equals Infimum of Component-Induced Topologies
Informal description
For any function $f \colon X \to \prod_{i} \pi_i$ from a topological space $X$ to a product space $\prod_{i} \pi_i$ (where each $\pi_i$ is a topological space), the topology induced on $X$ by $f$ is equal to the infimum of the topologies induced by each component function $f_i \colon X \to \pi_i$. In other words, the induced topology $\text{induced}\, f\, \text{Pi.topologicalSpace}$ is equal to $\bigsqcap_i \text{induced}\, (f \cdot i)\, \text{inferInstance}$.
inducing_iInf_to_pi theorem
{X : Type*} (f : ∀ i, X → π i) : @IsInducing X (∀ i, π i) (⨅ i, induced (f i) inferInstance) _ fun x i => f i x
Full source
/-- Suppose `π i` is a family of topological spaces indexed by `i : ι`, and `X` is a type
endowed with a family of maps `f i : X → π i` for every `i : ι`, hence inducing a
map `g : X → Π i, π i`. This lemma shows that infimum of the topologies on `X` induced by
the `f i` as `i : ι` varies is simply the topology on `X` induced by `g : X → Π i, π i`
where `Π i, π i` is endowed with the usual product topology. -/
theorem inducing_iInf_to_pi {X : Type*} (f : ∀ i, X → π i) :
    @IsInducing X (∀ i, π i) (⨅ i, induced (f i) inferInstance) _ fun x i => f i x :=
  letI := ⨅ i, induced (f i) inferInstance; ⟨(induced_to_pi _).symm⟩
Inducing Property of the Canonical Map to a Product Space with Infimum Topology
Informal description
Let $\{π_i\}_{i \in \iota}$ be a family of topological spaces indexed by $\iota$, and let $X$ be a topological space equipped with a family of continuous maps $f_i \colon X \to π_i$ for each $i \in \iota$. Then the map $g \colon X \to \prod_{i \in \iota} π_i$ defined by $g(x)_i = f_i(x)$ is an inducing map with respect to the infimum topology $\bigsqcap_i \text{induced}\, f_i\, \text{inferInstance}$ on $X$ and the product topology on $\prod_{i \in \iota} π_i$.
Pi.discreteTopology instance
: DiscreteTopology (∀ i, π i)
Full source
/-- A finite product of discrete spaces is discrete. -/
instance Pi.discreteTopology : DiscreteTopology (∀ i, π i) :=
  singletons_open_iff_discrete.mp fun x => by
    rw [← univ_pi_singleton]
    exact isOpen_set_pi finite_univ fun i _ => (isOpen_discrete {x i})
Finite Product of Discrete Spaces is Discrete
Informal description
For any finite family of discrete topological spaces $\{\pi_i\}_{i \in \iota}$, the product space $\prod_{i \in \iota} \pi_i$ equipped with the product topology is also discrete.
continuous_sigmaMk theorem
{i : ι} : Continuous (@Sigma.mk ι σ i)
Full source
@[continuity, fun_prop]
theorem continuous_sigmaMk {i : ι} : Continuous (@Sigma.mk ι σ i) :=
  continuous_iSup_rng continuous_coinduced_rng
Continuity of Canonical Inclusion into Disjoint Union Space
Informal description
For any index $i \in \iota$, the canonical inclusion map $\Sigma.mk_i : \sigma(i) \to \Sigma \sigma$ is continuous, where $\Sigma \sigma$ is the disjoint union of the family $\{\sigma(i)\}_{i \in \iota}$ equipped with the disjoint union topology.
isOpen_sigma_iff theorem
{s : Set (Sigma σ)} : IsOpen s ↔ ∀ i, IsOpen (Sigma.mk i ⁻¹' s)
Full source
theorem isOpen_sigma_iff {s : Set (Sigma σ)} : IsOpenIsOpen s ↔ ∀ i, IsOpen (Sigma.mk i ⁻¹' s) := by
  rw [isOpen_iSup_iff]
  rfl
Characterization of Open Sets in Disjoint Union Topology
Informal description
A subset $s$ of the disjoint union $\Sigma \sigma$ is open if and only if for every index $i$, the preimage of $s$ under the canonical inclusion map $\Sigma.mk_i : \sigma(i) \to \Sigma \sigma$ is open in $\sigma(i)$.
isClosed_sigma_iff theorem
{s : Set (Sigma σ)} : IsClosed s ↔ ∀ i, IsClosed (Sigma.mk i ⁻¹' s)
Full source
theorem isClosed_sigma_iff {s : Set (Sigma σ)} : IsClosedIsClosed s ↔ ∀ i, IsClosed (Sigma.mk i ⁻¹' s) := by
  simp only [← isOpen_compl_iff, isOpen_sigma_iff, preimage_compl]
Characterization of Closed Sets in Disjoint Union Topology
Informal description
A subset $s$ of the disjoint union $\Sigma \sigma$ is closed if and only if for every index $i$, the preimage of $s$ under the canonical inclusion map $\Sigma.mk_i : \sigma(i) \to \Sigma \sigma$ is closed in $\sigma(i)$.
isOpenMap_sigmaMk theorem
{i : ι} : IsOpenMap (@Sigma.mk ι σ i)
Full source
theorem isOpenMap_sigmaMk {i : ι} : IsOpenMap (@Sigma.mk ι σ i) := by
  intro s hs
  rw [isOpen_sigma_iff]
  intro j
  rcases eq_or_ne j i with (rfl | hne)
  · rwa [preimage_image_eq _ sigma_mk_injective]
  · rw [preimage_image_sigmaMk_of_ne hne]
    exact isOpen_empty
Canonical Inclusion Maps are Open in Disjoint Union Topology
Informal description
For any index $i$ in the indexing type $\iota$, the canonical inclusion map $\Sigma.\text{mk}_i : \sigma(i) \to \Sigma_{j \in \iota} \sigma(j)$ is an open map. That is, the image of any open set in $\sigma(i)$ under $\Sigma.\text{mk}_i$ is open in the disjoint union topology on $\Sigma \sigma$.
isOpen_range_sigmaMk theorem
{i : ι} : IsOpen (range (@Sigma.mk ι σ i))
Full source
theorem isOpen_range_sigmaMk {i : ι} : IsOpen (range (@Sigma.mk ι σ i)) :=
  isOpenMap_sigmaMk.isOpen_range
Openness of Canonical Inclusion Range in Disjoint Union Topology
Informal description
For any index $i$ in the indexing type $\iota$, the range of the canonical inclusion map $\Sigma.\text{mk}_i : \sigma(i) \to \Sigma_{j \in \iota} \sigma(j)$ is an open subset of the disjoint union $\Sigma \sigma$ equipped with the disjoint union topology.
isClosedMap_sigmaMk theorem
{i : ι} : IsClosedMap (@Sigma.mk ι σ i)
Full source
theorem isClosedMap_sigmaMk {i : ι} : IsClosedMap (@Sigma.mk ι σ i) := by
  intro s hs
  rw [isClosed_sigma_iff]
  intro j
  rcases eq_or_ne j i with (rfl | hne)
  · rwa [preimage_image_eq _ sigma_mk_injective]
  · rw [preimage_image_sigmaMk_of_ne hne]
    exact isClosed_empty
Canonical Sigma Embedding is Closed Map
Informal description
For any index $i \in \iota$, the canonical embedding $\Sigma.\text{mk}_i : \sigma(i) \to \Sigma_{j \in \iota} \sigma(j)$ is a closed map. That is, the image of any closed subset of $\sigma(i)$ under $\Sigma.\text{mk}_i$ is closed in the disjoint union topology on $\Sigma \sigma$.
isClosed_range_sigmaMk theorem
{i : ι} : IsClosed (range (@Sigma.mk ι σ i))
Full source
theorem isClosed_range_sigmaMk {i : ι} : IsClosed (range (@Sigma.mk ι σ i)) :=
  isClosedMap_sigmaMk.isClosed_range
Closedness of Canonical Sigma Embedding Range
Informal description
For any index $i \in \iota$, the range of the canonical embedding $\Sigma.\text{mk}_i : \sigma(i) \to \Sigma_{j \in \iota} \sigma(j)$ is a closed subset of the disjoint union $\Sigma \sigma$ equipped with the disjoint union topology.
Topology.IsOpenEmbedding.sigmaMk theorem
{i : ι} : IsOpenEmbedding (@Sigma.mk ι σ i)
Full source
lemma Topology.IsOpenEmbedding.sigmaMk {i : ι} : IsOpenEmbedding (@Sigma.mk ι σ i) :=
  .of_continuous_injective_isOpenMap continuous_sigmaMk sigma_mk_injective isOpenMap_sigmaMk
Canonical Sigma Inclusion is an Open Embedding
Informal description
For any index $i \in \iota$, the canonical inclusion map $\Sigma.\text{mk}_i : \sigma(i) \to \Sigma_{j \in \iota} \sigma(j)$ is an open embedding. That is, it is a homeomorphism onto its image and the image is open in the disjoint union topology on $\Sigma \sigma$.
Topology.IsClosedEmbedding.sigmaMk theorem
{i : ι} : IsClosedEmbedding (@Sigma.mk ι σ i)
Full source
lemma Topology.IsClosedEmbedding.sigmaMk {i : ι} : IsClosedEmbedding (@Sigma.mk ι σ i) :=
  .of_continuous_injective_isClosedMap continuous_sigmaMk sigma_mk_injective isClosedMap_sigmaMk
Canonical Sigma Inclusion is a Closed Embedding
Informal description
For any index $i \in \iota$, the canonical inclusion map $\Sigma.\text{mk}_i : \sigma(i) \to \Sigma \sigma$ is a closed embedding. That is, it is a continuous, injective map that is a homeomorphism onto its image, and the image of any closed set in $\sigma(i)$ is closed in the disjoint union space $\Sigma \sigma$.
Topology.IsEmbedding.sigmaMk theorem
{i : ι} : IsEmbedding (@Sigma.mk ι σ i)
Full source
lemma Topology.IsEmbedding.sigmaMk {i : ι} : IsEmbedding (@Sigma.mk ι σ i) :=
  IsClosedEmbedding.sigmaMk.1
Canonical Sigma Inclusion is an Embedding
Informal description
For any index $i \in \iota$, the canonical inclusion map $\Sigma.\text{mk}_i : \sigma(i) \to \Sigma \sigma$ is an embedding. That is, it is a continuous, injective map that is a homeomorphism onto its image.
Sigma.nhds_mk theorem
(i : ι) (x : σ i) : 𝓝 (⟨i, x⟩ : Sigma σ) = Filter.map (Sigma.mk i) (𝓝 x)
Full source
theorem Sigma.nhds_mk (i : ι) (x : σ i) : 𝓝 (⟨i, x⟩ : Sigma σ) = Filter.map (Sigma.mk i) (𝓝 x) :=
  (IsOpenEmbedding.sigmaMk.map_nhds_eq x).symm
Neighborhood Filter Characterization in Disjoint Union Space via Canonical Inclusion
Informal description
For any index $i \in \iota$ and any point $x \in \sigma(i)$, the neighborhood filter at the point $(i, x)$ in the disjoint union space $\Sigma \sigma$ is equal to the pushforward of the neighborhood filter at $x$ in $\sigma(i)$ under the canonical inclusion map $\Sigma.\text{mk}_i : \sigma(i) \to \Sigma \sigma$. In other words, $\mathcal{N}_{(i, x)} = \text{map}\, (\Sigma.\text{mk}_i)\, (\mathcal{N}_x)$.
Sigma.nhds_eq theorem
(x : Sigma σ) : 𝓝 x = Filter.map (Sigma.mk x.1) (𝓝 x.2)
Full source
theorem Sigma.nhds_eq (x : Sigma σ) : 𝓝 x = Filter.map (Sigma.mk x.1) (𝓝 x.2) := by
  cases x
  apply Sigma.nhds_mk
Neighborhood Filter Characterization in Disjoint Union Space via Canonical Inclusion
Informal description
For any point $x = (i, y)$ in the disjoint union space $\Sigma \sigma$, the neighborhood filter $\mathcal{N}_x$ at $x$ is equal to the pushforward of the neighborhood filter $\mathcal{N}_y$ at $y$ in the component space $\sigma(i)$ under the canonical inclusion map $\Sigma.\text{mk}_i : \sigma(i) \to \Sigma \sigma$. In other words, $\mathcal{N}_{(i, y)} = \text{map}\, (\Sigma.\text{mk}_i)\, (\mathcal{N}_y)$.
comap_sigmaMk_nhds theorem
(i : ι) (x : σ i) : comap (Sigma.mk i) (𝓝 ⟨i, x⟩) = 𝓝 x
Full source
theorem comap_sigmaMk_nhds (i : ι) (x : σ i) : comap (Sigma.mk i) (𝓝 ⟨i, x⟩) = 𝓝 x :=
  (IsEmbedding.sigmaMk.nhds_eq_comap _).symm
Neighborhood Filter Preimage under Canonical Sigma Inclusion
Informal description
For any index $i \in \iota$ and any point $x \in \sigma(i)$, the preimage of the neighborhood filter at $(i, x)$ in the disjoint union $\Sigma \sigma$ under the canonical inclusion map $\Sigma.\text{mk}_i : \sigma(i) \to \Sigma \sigma$ is equal to the neighborhood filter at $x$ in $\sigma(i)$. In other words, $(\Sigma.\text{mk}_i)^{-1}(\mathcal{N}_{(i, x)}) = \mathcal{N}_x$.
isOpen_sigma_fst_preimage theorem
(s : Set ι) : IsOpen (Sigma.fst ⁻¹' s : Set (Σ a, σ a))
Full source
theorem isOpen_sigma_fst_preimage (s : Set ι) : IsOpen (Sigma.fstSigma.fst ⁻¹' s : Set (Σ a, σ a)) := by
  rw [← biUnion_of_singleton s, preimage_iUnion₂]
  simp only [← range_sigmaMk]
  exact isOpen_biUnion fun _ _ => isOpen_range_sigmaMk
Openness of First Projection Preimage in Disjoint Union Topology
Informal description
For any subset $s$ of the index set $\iota$, the preimage of $s$ under the first projection $\Sigma.\text{fst} : \Sigma_{a \in \iota} \sigma(a) \to \iota$ is an open subset of the disjoint union $\Sigma_{a \in \iota} \sigma(a)$ equipped with the disjoint union topology.
continuous_sigma_iff theorem
{f : Sigma σ → X} : Continuous f ↔ ∀ i, Continuous fun a => f ⟨i, a⟩
Full source
/-- A map out of a sum type is continuous iff its restriction to each summand is. -/
@[simp]
theorem continuous_sigma_iff {f : Sigma σ → X} :
    ContinuousContinuous f ↔ ∀ i, Continuous fun a => f ⟨i, a⟩ := by
  delta instTopologicalSpaceSigma
  rw [continuous_iSup_dom]
  exact forall_congr' fun _ => continuous_coinduced_dom
Continuity Criterion for Functions on Disjoint Unions
Informal description
A function $f \colon \Sigma \sigma \to X$ from a disjoint union of topological spaces is continuous if and only if for every index $i$, the restriction $f \circ \mathrm{Sigma.mk}_i \colon \sigma_i \to X$ is continuous.
continuous_sigma theorem
{f : Sigma σ → X} (hf : ∀ i, Continuous fun a => f ⟨i, a⟩) : Continuous f
Full source
/-- A map out of a sum type is continuous if its restriction to each summand is. -/
@[continuity, fun_prop]
theorem continuous_sigma {f : Sigma σ → X} (hf : ∀ i, Continuous fun a => f ⟨i, a⟩) :
    Continuous f :=
  continuous_sigma_iff.2 hf
Continuity of Functions on Disjoint Unions via Componentwise Continuity
Informal description
Let $\{X_i\}_{i \in I}$ be a family of topological spaces and let $f \colon \Sigma X \to Y$ be a function from their disjoint union to a topological space $Y$. If for every index $i \in I$, the restriction $f|_{X_i} \colon X_i \to Y$ is continuous, then $f$ is continuous.
inducing_sigma theorem
{f : Sigma σ → X} : IsInducing f ↔ (∀ i, IsInducing (f ∘ Sigma.mk i)) ∧ (∀ i, ∃ U, IsOpen U ∧ ∀ x, f x ∈ U ↔ x.1 = i)
Full source
/-- A map defined on a sigma type (a.k.a. the disjoint union of an indexed family of topological
spaces) is inducing iff its restriction to each component is inducing and each the image of each
component under `f` can be separated from the images of all other components by an open set. -/
theorem inducing_sigma {f : Sigma σ → X} :
    IsInducingIsInducing f ↔ (∀ i, IsInducing (f ∘ Sigma.mk i)) ∧
      (∀ i, ∃ U, IsOpen U ∧ ∀ x, f x ∈ U ↔ x.1 = i) := by
  refine ⟨fun h ↦ ⟨fun i ↦ h.comp IsEmbedding.sigmaMk.1, fun i ↦ ?_⟩, ?_⟩
  · rcases h.isOpen_iff.1 (isOpen_range_sigmaMk (i := i)) with ⟨U, hUo, hU⟩
    refine ⟨U, hUo, ?_⟩
    simpa [Set.ext_iff] using hU
  · refine fun ⟨h₁, h₂⟩ ↦ isInducing_iff_nhds.2 fun ⟨i, x⟩ ↦ ?_
    rw [Sigma.nhds_mk, (h₁ i).nhds_eq_comap, comp_apply, ← comap_comap, map_comap_of_mem]
    rcases h₂ i with ⟨U, hUo, hU⟩
    filter_upwards [preimage_mem_comap <| hUo.mem_nhds <| (hU _).2 rfl] with y hy
    simpa [hU] using hy
Characterization of Inducing Maps on Disjoint Unions via Componentwise Conditions and Separation
Informal description
A map $f \colon \Sigma \sigma \to X$ from the disjoint union of topological spaces $\{\sigma_i\}_{i \in \iota}$ to a topological space $X$ is inducing if and only if: 1. For each index $i \in \iota$, the restriction $f \circ \mathrm{Sigma.mk}_i \colon \sigma_i \to X$ is inducing, and 2. For each index $i \in \iota$, there exists an open set $U \subseteq X$ such that for any point $x \in \Sigma \sigma$, $f(x) \in U$ if and only if the first component of $x$ equals $i$.
continuous_sigma_map theorem
{f₁ : ι → κ} {f₂ : ∀ i, σ i → τ (f₁ i)} : Continuous (Sigma.map f₁ f₂) ↔ ∀ i, Continuous (f₂ i)
Full source
@[simp 1100]
theorem continuous_sigma_map {f₁ : ι → κ} {f₂ : ∀ i, σ i → τ (f₁ i)} :
    ContinuousContinuous (Sigma.map f₁ f₂) ↔ ∀ i, Continuous (f₂ i) :=
  continuous_sigma_iff.trans <| by
    simp only [Sigma.map, IsEmbedding.sigmaMk.continuous_iff, comp_def]
Continuity of Sigma Mapping via Componentwise Continuity
Informal description
Let $\{X_i\}_{i \in \iota}$ and $\{Y_j\}_{j \in \kappa}$ be families of topological spaces, and let $f_1: \iota \to \kappa$ and $f_2: \forall i, X_i \to Y_{f_1(i)}$ be functions. The map $\Sigma.\text{map}\, f_1\, f_2: \Sigma X \to \Sigma Y$ is continuous if and only if for every index $i \in \iota$, the component function $f_2(i): X_i \to Y_{f_1(i)}$ is continuous.
Continuous.sigma_map theorem
{f₁ : ι → κ} {f₂ : ∀ i, σ i → τ (f₁ i)} (hf : ∀ i, Continuous (f₂ i)) : Continuous (Sigma.map f₁ f₂)
Full source
@[continuity, fun_prop]
theorem Continuous.sigma_map {f₁ : ι → κ} {f₂ : ∀ i, σ i → τ (f₁ i)} (hf : ∀ i, Continuous (f₂ i)) :
    Continuous (Sigma.map f₁ f₂) :=
  continuous_sigma_map.2 hf
Continuity of Sigma Mapping via Componentwise Continuity
Informal description
Let $\{X_i\}_{i \in \iota}$ and $\{Y_j\}_{j \in \kappa}$ be families of topological spaces, and let $f_1: \iota \to \kappa$ and $f_2: \forall i, X_i \to Y_{f_1(i)}$ be functions. If for every index $i \in \iota$, the component function $f_2(i): X_i \to Y_{f_1(i)}$ is continuous, then the map $\Sigma.\text{map}\, f_1\, f_2: \Sigma X \to \Sigma Y$ is continuous.
isOpenMap_sigma theorem
{f : Sigma σ → X} : IsOpenMap f ↔ ∀ i, IsOpenMap fun a => f ⟨i, a⟩
Full source
theorem isOpenMap_sigma {f : Sigma σ → X} : IsOpenMapIsOpenMap f ↔ ∀ i, IsOpenMap fun a => f ⟨i, a⟩ := by
  simp only [isOpenMap_iff_nhds_le, Sigma.forall, Sigma.nhds_eq, map_map, comp_def]
Open Map Characterization for Disjoint Union Spaces
Informal description
A function $f \colon \Sigma \sigma \to X$ from a disjoint union space to a topological space $X$ is an open map if and only if for every index $i$, the restriction $f_i \colon \sigma(i) \to X$ defined by $f_i(a) = f(i, a)$ is an open map.
isOpenMap_sigma_map theorem
{f₁ : ι → κ} {f₂ : ∀ i, σ i → τ (f₁ i)} : IsOpenMap (Sigma.map f₁ f₂) ↔ ∀ i, IsOpenMap (f₂ i)
Full source
theorem isOpenMap_sigma_map {f₁ : ι → κ} {f₂ : ∀ i, σ i → τ (f₁ i)} :
    IsOpenMapIsOpenMap (Sigma.map f₁ f₂) ↔ ∀ i, IsOpenMap (f₂ i) :=
  isOpenMap_sigma.trans <|
    forall_congr' fun i => (@IsOpenEmbedding.sigmaMk _ _ _ (f₁ i)).isOpenMap_iff.symm
Open Map Characterization for Sigma Mapping via Componentwise Open Maps
Informal description
Let $\{X_i\}_{i \in \iota}$ and $\{Y_j\}_{j \in \kappa}$ be families of topological spaces, and let $f_1: \iota \to \kappa$ and $f_2: \forall i, X_i \to Y_{f_1(i)}$ be functions. The map $\Sigma f_1 f_2: \Sigma X \to \Sigma Y$ is an open map if and only if for every index $i \in \iota$, the component map $f_2(i): X_i \to Y_{f_1(i)}$ is an open map.
Topology.isInducing_sigmaMap theorem
{f₁ : ι → κ} {f₂ : ∀ i, σ i → τ (f₁ i)} (h₁ : Injective f₁) : IsInducing (Sigma.map f₁ f₂) ↔ ∀ i, IsInducing (f₂ i)
Full source
lemma Topology.isInducing_sigmaMap {f₁ : ι → κ} {f₂ : ∀ i, σ i → τ (f₁ i)}
    (h₁ : Injective f₁) : IsInducingIsInducing (Sigma.map f₁ f₂) ↔ ∀ i, IsInducing (f₂ i) := by
  simp only [isInducing_iff_nhds, Sigma.forall, Sigma.nhds_mk, Sigma.map_mk,
    ← map_sigma_mk_comap h₁, map_inj sigma_mk_injective]
Inducing Property of Sigma Map via Componentwise Inducing Maps
Informal description
Let $\{X_i\}_{i \in \iota}$ and $\{Y_j\}_{j \in \kappa}$ be families of topological spaces, and let $f_1: \iota \to \kappa$ be an injective function. For each $i \in \iota$, let $f_2^i: X_i \to Y_{f_1(i)}$ be a continuous map. Then the induced map $\Sigma f_1 f_2: \Sigma X \to \Sigma Y$ is an inducing map (i.e., the topology on $\Sigma X$ is the coarsest topology making $\Sigma f_1 f_2$ continuous) if and only if for each $i \in \iota$, the map $f_2^i$ is inducing.
Topology.isEmbedding_sigmaMap theorem
{f₁ : ι → κ} {f₂ : ∀ i, σ i → τ (f₁ i)} (h : Injective f₁) : IsEmbedding (Sigma.map f₁ f₂) ↔ ∀ i, IsEmbedding (f₂ i)
Full source
lemma Topology.isEmbedding_sigmaMap {f₁ : ι → κ} {f₂ : ∀ i, σ i → τ (f₁ i)}
    (h : Injective f₁) : IsEmbeddingIsEmbedding (Sigma.map f₁ f₂) ↔ ∀ i, IsEmbedding (f₂ i) := by
  simp only [isEmbedding_iff, Injective.sigma_map, isInducing_sigmaMap h, forall_and,
    h.sigma_map_iff]
Embedding Property of Sigma Map via Component-wise Embeddings
Informal description
Let $\{X_i\}_{i \in \iota}$ and $\{Y_j\}_{j \in \kappa}$ be families of topological spaces, and let $f_1: \iota \to \kappa$ be an injective function. For each $i \in \iota$, let $f_2^i: X_i \to Y_{f_1(i)}$ be a continuous map. Then the induced map $\Sigma f_1 f_2: \Sigma X \to \Sigma Y$ is a topological embedding if and only if for each $i \in \iota$, the map $f_2^i$ is a topological embedding.
Topology.isOpenEmbedding_sigmaMap theorem
{f₁ : ι → κ} {f₂ : ∀ i, σ i → τ (f₁ i)} (h : Injective f₁) : IsOpenEmbedding (Sigma.map f₁ f₂) ↔ ∀ i, IsOpenEmbedding (f₂ i)
Full source
lemma Topology.isOpenEmbedding_sigmaMap {f₁ : ι → κ} {f₂ : ∀ i, σ i → τ (f₁ i)} (h : Injective f₁) :
    IsOpenEmbeddingIsOpenEmbedding (Sigma.map f₁ f₂) ↔ ∀ i, IsOpenEmbedding (f₂ i) := by
  simp only [isOpenEmbedding_iff_isEmbedding_isOpenMap, isOpenMap_sigma_map, isEmbedding_sigmaMap h,
    forall_and]
Open Embedding Property of Sigma Map via Component-wise Open Embeddings
Informal description
Let $\{X_i\}_{i \in \iota}$ and $\{Y_j\}_{j \in \kappa}$ be families of topological spaces, and let $f_1: \iota \to \kappa$ be an injective function. For each $i \in \iota$, let $f_2^i: X_i \to Y_{f_1(i)}$ be a continuous map. Then the induced map $\Sigma f_1 f_2: \Sigma X \to \Sigma Y$ is an open topological embedding if and only if for each $i \in \iota$, the map $f_2^i$ is an open topological embedding.
ULift.isOpen_iff theorem
[TopologicalSpace X] {s : Set (ULift.{v} X)} : IsOpen s ↔ IsOpen (ULift.up ⁻¹' s)
Full source
theorem ULift.isOpen_iff [TopologicalSpace X] {s : Set (ULift.{v} X)} :
    IsOpenIsOpen s ↔ IsOpen (ULift.up ⁻¹' s) := by
  rw [ULift.topologicalSpace, ← Equiv.ulift_apply, ← Equiv.ulift.coinduced_symm, ← isOpen_coinduced]
Characterization of Open Sets in Lifted Topological Space via Preimage
Informal description
For a topological space $X$ and a subset $s$ of the lifted space $\mathrm{ULift}\, X$, $s$ is open if and only if its preimage under the lifting map $\mathrm{ULift.up} : X \to \mathrm{ULift}\, X$ is open in $X$.
ULift.isClosed_iff theorem
[TopologicalSpace X] {s : Set (ULift.{v} X)} : IsClosed s ↔ IsClosed (ULift.up ⁻¹' s)
Full source
theorem ULift.isClosed_iff [TopologicalSpace X] {s : Set (ULift.{v} X)} :
    IsClosedIsClosed s ↔ IsClosed (ULift.up ⁻¹' s) := by
  rw [← isOpen_compl_iff, ← isOpen_compl_iff, isOpen_iff, preimage_compl]
Characterization of Closed Sets in Lifted Topological Space via Preimage
Informal description
For a topological space $X$ and a subset $s$ of the lifted space $\mathrm{ULift}\, X$, $s$ is closed if and only if its preimage under the lifting map $\mathrm{ULift.up} : X \to \mathrm{ULift}\, X$ is closed in $X$.
continuous_uliftDown theorem
[TopologicalSpace X] : Continuous (ULift.down : ULift.{v, u} X → X)
Full source
@[continuity, fun_prop]
theorem continuous_uliftDown [TopologicalSpace X] : Continuous (ULift.down : ULift.{v, u} X → X) :=
  continuous_induced_dom
Continuity of the Down Projection on Lifted Types
Informal description
For any topological space $X$, the projection map $\mathrm{ULift.down} : \mathrm{ULift}\, X \to X$ is continuous.
continuous_uliftMap theorem
[TopologicalSpace X] [TopologicalSpace Y] (f : X → Y) (hf : Continuous f) : Continuous (ULift.map f : ULift.{u'} X → ULift.{v'} Y)
Full source
@[continuity, fun_prop]
theorem continuous_uliftMap [TopologicalSpace X] [TopologicalSpace Y]
    (f : X → Y) (hf : Continuous f) :
    Continuous (ULift.map f : ULift.{u'} X → ULift.{v'} Y) := by
  change Continuous (ULift.upULift.up ∘ f ∘ ULift.down)
  fun_prop
Continuity of Lifted Maps Between Topological Spaces
Informal description
Let $X$ and $Y$ be topological spaces, and let $f : X \to Y$ be a continuous function. Then the lifted function $\mathrm{ULift.map}\, f : \mathrm{ULift}\, X \to \mathrm{ULift}\, Y$ is also continuous.
Topology.IsEmbedding.uliftDown theorem
[TopologicalSpace X] : IsEmbedding (ULift.down : ULift.{v, u} X → X)
Full source
lemma Topology.IsEmbedding.uliftDown [TopologicalSpace X] :
    IsEmbedding (ULift.down : ULift.{v, u} X → X) := ⟨⟨rfl⟩, ULift.down_injective⟩
Embedding Property of the Down Projection on Lifted Types
Informal description
For any topological space $X$, the projection map $\mathrm{ULift.down} : \mathrm{ULift}\, X \to X$ is an embedding. That is, it is a homeomorphism onto its image, equipped with the subspace topology inherited from $X$.
Topology.IsClosedEmbedding.uliftDown theorem
[TopologicalSpace X] : IsClosedEmbedding (ULift.down : ULift.{v, u} X → X)
Full source
lemma Topology.IsClosedEmbedding.uliftDown [TopologicalSpace X] :
    IsClosedEmbedding (ULift.down : ULift.{v, u} X → X) :=
  ⟨.uliftDown, by simp only [ULift.down_surjective.range_eq, isClosed_univ]⟩
Closed Embedding Property of the Down Projection on Lifted Types
Informal description
For any topological space $X$, the projection map $\mathrm{ULift.down} : \mathrm{ULift}\, X \to X$ is a closed embedding. That is, it is an embedding (a homeomorphism onto its image) and its image is a closed subset of $X$.
IsOpen.trans theorem
(ht : IsOpen t) (hs : IsOpen s) : IsOpen (t : Set X)
Full source
theorem IsOpen.trans (ht : IsOpen t) (hs : IsOpen s) : IsOpen (t : Set X) := by
  rcases isOpen_induced_iff.mp ht with ⟨s', hs', rfl⟩
  rw [Subtype.image_preimage_coe]
  exact hs.inter hs'
Intersection of Open Sets is Open
Informal description
For any subsets $s$ and $t$ of a topological space $X$, if both $s$ and $t$ are open, then their intersection $s \cap t$ is also open.
IsClosed.trans theorem
(ht : IsClosed t) (hs : IsClosed s) : IsClosed (t : Set X)
Full source
theorem IsClosed.trans (ht : IsClosed t) (hs : IsClosed s) : IsClosed (t : Set X) := by
  rcases isClosed_induced_iff.mp ht with ⟨s', hs', rfl⟩
  rw [Subtype.image_preimage_coe]
  exact hs.inter hs'
Intersection of Closed Sets is Closed
Informal description
If $t$ and $s$ are closed subsets of a topological space $X$, then their intersection $t \cap s$ is also closed in $X$.
nhdsSet_prod_le theorem
(s : Set X) (t : Set Y) : 𝓝ˢ (s ×ˢ t) ≤ 𝓝ˢ s ×ˢ 𝓝ˢ t
Full source
/-- The product of a neighborhood of `s` and a neighborhood of `t` is a neighborhood of `s ×ˢ t`,
formulated in terms of a filter inequality. -/
theorem nhdsSet_prod_le (s : Set X) (t : Set Y) : 𝓝ˢ (s ×ˢ t) ≤ 𝓝ˢ s ×ˢ 𝓝ˢ t :=
  ((hasBasis_nhdsSet _).prod (hasBasis_nhdsSet _)).ge_iff.2 fun (_u, _v) ⟨⟨huo, hsu⟩, hvo, htv⟩ ↦
    (huo.prod hvo).mem_nhdsSet.2 <| prod_mono hsu htv
Neighborhood Filter of Product Set is Contained in Product of Neighborhood Filters
Informal description
For any subsets $s \subseteq X$ and $t \subseteq Y$ of topological spaces $X$ and $Y$, the neighborhood filter of the product set $s \times t$ is contained in the product of the neighborhood filters of $s$ and $t$, i.e., $\mathcal{N}(s \times t) \leq \mathcal{N}(s) \times \mathcal{N}(t)$.
Filter.eventually_nhdsSet_prod_iff theorem
{p : X × Y → Prop} : (∀ᶠ q in 𝓝ˢ (s ×ˢ t), p q) ↔ ∀ x ∈ s, ∀ y ∈ t, ∃ px : X → Prop, (∀ᶠ x' in 𝓝 x, px x') ∧ ∃ py : Y → Prop, (∀ᶠ y' in 𝓝 y, py y') ∧ ∀ {x : X}, px x → ∀ {y : Y}, py y → p (x, y)
Full source
theorem Filter.eventually_nhdsSet_prod_iff {p : X × Y → Prop} :
    (∀ᶠ q in 𝓝ˢ (s ×ˢ t), p q) ↔
      ∀ x ∈ s, ∀ y ∈ t,
          ∃ px : X → Prop, (∀ᶠ x' in 𝓝 x, px x') ∧ ∃ py : Y → Prop, (∀ᶠ y' in 𝓝 y, py y') ∧
            ∀ {x : X}, px x → ∀ {y : Y}, py y → p (x, y) := by
  simp_rw [eventually_nhdsSet_iff_forall, forall_prod_set, nhds_prod_eq, eventually_prod_iff]
Characterization of Neighborhood Filter on Product Sets
Informal description
For any predicate $p$ on the product space $X \times Y$, the following are equivalent: 1. The predicate $p$ holds eventually for all points in the neighborhood filter of the product set $s \times t$. 2. For every $x \in s$ and $y \in t$, there exist predicates $p_x$ on $X$ and $p_y$ on $Y$ such that: - $p_x$ holds eventually in the neighborhood of $x$, - $p_y$ holds eventually in the neighborhood of $y$, - For any $x' \in X$ satisfying $p_x$ and any $y' \in Y$ satisfying $p_y$, the predicate $p(x', y')$ holds.
Filter.Eventually.prod_nhdsSet theorem
{p : X × Y → Prop} {px : X → Prop} {py : Y → Prop} (hp : ∀ {x : X}, px x → ∀ {y : Y}, py y → p (x, y)) (hs : ∀ᶠ x in 𝓝ˢ s, px x) (ht : ∀ᶠ y in 𝓝ˢ t, py y) : ∀ᶠ q in 𝓝ˢ (s ×ˢ t), p q
Full source
theorem Filter.Eventually.prod_nhdsSet {p : X × Y → Prop} {px : X → Prop} {py : Y → Prop}
    (hp : ∀ {x : X}, px x → ∀ {y : Y}, py y → p (x, y)) (hs : ∀ᶠ x in 𝓝ˢ s, px x)
    (ht : ∀ᶠ y in 𝓝ˢ t, py y) : ∀ᶠ q in 𝓝ˢ (s ×ˢ t), p q :=
  nhdsSet_prod_le _ _ (mem_of_superset (prod_mem_prod hs ht) fun _ ⟨hx, hy⟩ ↦ hp hx hy)
Neighborhood Filter of Product Set Preserves Eventual Properties
Informal description
Let $X$ and $Y$ be topological spaces, $s \subseteq X$ and $t \subseteq Y$ subsets, and $p : X \times Y \to \text{Prop}$ a predicate. Suppose there exist predicates $p_x : X \to \text{Prop}$ and $p_y : Y \to \text{Prop}$ such that: 1. For all $x \in X$ and $y \in Y$, if $p_x(x)$ and $p_y(y)$ hold, then $p(x,y)$ holds. 2. $p_x$ holds eventually in the neighborhood filter of $s$. 3. $p_y$ holds eventually in the neighborhood filter of $t$. Then $p$ holds eventually in the neighborhood filter of the product set $s \times t$.