# mathlibdocumentation

topology.path_connected

# Path connectedness #

## Main definitions #

In the file the unit interval [0, 1] in ℝ is denoted by I, and X is a topological space.

• path (x y : X) is the type of paths from x to y, i.e., continuous maps from I to X mapping 0 to x and 1 to y.
• path.map is the image of a path under a continuous map.
• joined (x y : X) means there is a path between x and y.
• joined.some_path (h : joined x y) selects some path between two points x and y.
• path_component (x : X) is the set of points joined to x.
• path_connected_space X is a predicate class asserting that X is non-empty and every two points of X are joined.

Then there are corresponding relative notions for F : set X.

• joined_in F (x y : X) means there is a path γ joining x to y with values in F.
• joined_in.some_path (h : joined_in F x y) selects a path from x to y inside F.
• path_component_in F (x : X) is the set of points joined to x in F.
• is_path_connected F asserts that F is non-empty and every two points of F are joined in F.
• loc_path_connected_space X is a predicate class asserting that X is locally path-connected: each point has a basis of path-connected neighborhoods (we do not ask these to be open).

## Main theorems #

• joined and joined_in F are transitive relations.

One can link the absolute and relative version in two directions, using (univ : set X) or the subtype ↥F.

• path_connected_space_iff_univ : path_connected_space X ↔ is_path_connected (univ : set X)
• is_path_connected_iff_path_connected_space : is_path_connected F ↔ path_connected_space ↥F

For locally path connected spaces, we have

• path_connected_space_iff_connected_space : path_connected_space X ↔ connected_space X
• is_connected_iff_is_path_connected (U_op : is_open U) : is_path_connected U ↔ is_connected U

## Implementation notes #

By default, all paths have I as their source and X as their target, but there is an operation set.Icc_extend that will extend any continuous map γ : I → X into a continuous map Icc_extend zero_le_one γ : ℝ → X that is constant before 0 and after 1.

This is used to define path.extend that turns γ : path x y into a continuous map γ.extend : ℝ → X whose restriction to I is the original γ, and is equal to x on (-∞, 0] and to y on [1, +∞).

### Paths #

@[nolint]
structure path {X : Type u_1} (x y : X) :
Type u_1
• to_fun :
• continuous' :
• source' : c.to_fun 0 = x
• target' : c.to_fun 1 = y

Continuous path connecting two points x and y in a topological space

@[instance]
def path.has_coe_to_fun {X : Type u_1} {x y : X} :
Equations
@[ext]
theorem path.ext {X : Type u_1} {x y : X} {γ₁ γ₂ : path x y} :
γ₁ = γ₂γ₁ = γ₂
@[simp]
theorem path.coe_mk {X : Type u_1} {x y : X} (f : unit_interval → X) (h₁ : continuous f) (h₂ : f 0 = x) (h₃ : f 1 = y) :
{to_fun := f, continuous' := h₁, source' := h₂, target' := h₃} = f
theorem path.continuous {X : Type u_1} {x y : X} (γ : path x y) :
@[simp]
theorem path.source {X : Type u_1} {x y : X} (γ : path x y) :
γ 0 = x
@[simp]
theorem path.target {X : Type u_1} {x y : X} (γ : path x y) :
γ 1 = y
@[instance]
def path.has_uncurry_path {X : Type u_1} {α : Type u_2} {x y : α → X} :
function.has_uncurry (Π (a : α), path (x a) (y a)) X

Any function φ : Π (a : α), path (x a) (y a) can be seen as a function α × I → X.

Equations
def path.refl {X : Type u_1} (x : X) :
path x x

The constant path from a point to itself

Equations
@[simp]
theorem path.refl_range {X : Type u_1} {a : X} :
= {a}
def path.symm {X : Type u_1} {x y : X} (γ : path x y) :
path y x

The reverse of a path from x to y, as a path from y to x

Equations
@[simp]
theorem path.refl_symm {X : Type u_1} {a : X} :
@[simp]
theorem path.symm_range {X : Type u_1} {a b : X} (γ : path a b) :
def path.extend {X : Type u_1} {x y : X} (γ : path x y) :
→ X

A continuous map extending a path to ℝ, constant before 0 and after 1.

Equations
theorem path.continuous_extend {X : Type u_1} {x y : X} (γ : path x y) :
@[simp]
theorem path.extend_extends {X : Type u_1} {a b : X} (γ : path a b) {t : } (ht : t 1) :
γ.extend t = γ t, ht⟩
theorem path.extend_zero {X : Type u_1} {x y : X} (γ : path x y) :
γ.extend 0 = x
theorem path.extend_one {X : Type u_1} {x y : X} (γ : path x y) :
γ.extend 1 = y
@[simp]
theorem path.extend_extends' {X : Type u_1} {a b : X} (γ : path a b) (t : (set.Icc 0 1)) :
γ.extend t = γ t
@[simp]
theorem path.extend_range {X : Type u_1} {a b : X} (γ : path a b) :
theorem path.extend_of_le_zero {X : Type u_1} {a b : X} (γ : path a b) {t : } (ht : t 0) :
γ.extend t = a
theorem path.extend_of_one_le {X : Type u_1} {a b : X} (γ : path a b) {t : } (ht : 1 t) :
γ.extend t = b
@[simp]
theorem path.refl_extend {X : Type u_1} {a : X} :
(path.refl a).extend = λ (_x : ), a
def path.of_line {X : Type u_1} {x y : X} {f : → X} (hf : unit_interval) (h₀ : f 0 = x) (h₁ : f 1 = y) :
path x y

The path obtained from a map defined on ℝ by restriction to the unit interval.

Equations
theorem path.of_line_mem {X : Type u_1} {x y : X} {f : → X} (hf : unit_interval) (h₀ : f 0 = x) (h₁ : f 1 = y) (t : unit_interval) :
(path.of_line hf h₀ h₁) t
def path.trans {X : Type u_1} {x y z : X} (γ : path x y) (γ' : path y z) :
path x z

Concatenation of two paths from x to y and from y to z, putting the first path on [0, 1/2] and the second one on [1/2, 1].

Equations
@[simp]
theorem path.refl_trans_refl {X : Type u_1} {a : X} :
theorem path.trans_range {X : Type u_1} {a b c : X} (γ₁ : path a b) (γ₂ : path b c) :
set.range (γ₁.trans γ₂) =
def path.map {X : Type u_1} {x y : X} (γ : path x y) {Y : Type u_2} {f : X → Y} (h : continuous f) :
path (f x) (f y)

Image of a path from x to y by a continuous map

Equations
@[simp]
theorem path.map_coe {X : Type u_1} {x y : X} (γ : path x y) {Y : Type u_2} {f : X → Y} (h : continuous f) :
(γ.map h) = f γ
def path.cast {X : Type u_1} {x y : X} (γ : path x y) {x' y' : X} (hx : x' = x) (hy : y' = y) :
path x' y'

Casting a path from x to y to a path from x' to y' when x' = x and y' = y

Equations
@[simp]
theorem path.symm_cast {X : Type u_1} {a₁ a₂ b₁ b₂ : X} (γ : path a₂ b₂) (ha : a₁ = a₂) (hb : b₁ = b₂) :
(γ.cast ha hb).symm = γ.symm.cast hb ha
@[simp]
theorem path.trans_cast {X : Type u_1} {a₁ a₂ b₁ b₂ c₁ c₂ : X} (γ : path a₂ b₂) (γ' : path b₂ c₂) (ha : a₁ = a₂) (hb : b₁ = b₂) (hc : c₁ = c₂) :
(γ.cast ha hb).trans (γ'.cast hb hc) = (γ.trans γ').cast ha hc
@[simp]
theorem path.cast_coe {X : Type u_1} {x y : X} (γ : path x y) {x' y' : X} (hx : x' = x) (hy : y' = y) :
(γ.cast hx hy) = γ
theorem path.symm_continuous_family {X : Type u_1} {ι : Type u_2} {a b : ι → X} (γ : Π (t : ι), path (a t) (b t)) (h : continuous γ) :
continuous (λ (t : ι), (γ t).symm)
theorem path.continuous_uncurry_extend_of_continuous_family {X : Type u_1} {ι : Type u_2} {a b : ι → X} (γ : Π (t : ι), path (a t) (b t)) (h : continuous γ) :
continuous (λ (t : ι), (γ t).extend)
theorem path.trans_continuous_family {X : Type u_1} {ι : Type u_2} {a b c : ι → X} (γ₁ : Π (t : ι), path (a t) (b t)) (h₁ : continuous γ₁) (γ₂ : Π (t : ι), path (b t) (c t)) (h₂ : continuous γ₂) :
continuous (λ (t : ι), (γ₁ t).trans (γ₂ t))

#### Truncating a path #

def path.truncate {X : Type u_1} {a b : X} (γ : path a b) (t₀ t₁ : ) :
path (γ.extend (min t₀ t₁)) (γ.extend t₁)

γ.truncate t₀ t₁ is the path which follows the path γ on the time interval [t₀, t₁] and stays still otherwise.

Equations
def path.truncate_of_le {X : Type u_1} {a b : X} (γ : path a b) {t₀ t₁ : } (h : t₀ t₁) :
path (γ.extend t₀) (γ.extend t₁)

γ.truncate_of_le t₀ t₁ h, where h : t₀ ≤ t₁ is γ.truncate t₀ t₁ casted as a path from γ.extend t₀ to γ.extend t₁.

Equations
theorem path.truncate_range {X : Type u_1} {a b : X} (γ : path a b) {t₀ t₁ : } :
set.range (γ.truncate t₀ t₁)
theorem path.truncate_continuous_family {X : Type u_1} {a b : X} (γ : path a b) :
continuous (λ (x : , (γ.truncate x.fst x.snd.fst) x.snd.snd)

For a path γ, γ.truncate gives a "continuous family of paths", by which we mean the uncurried function which maps (t₀, t₁, s) to γ.truncate t₀ t₁ s is continuous.

theorem path.truncate_const_continuous_family {X : Type u_1} {a b : X} (γ : path a b) (t : ) :
@[simp]
theorem path.truncate_self {X : Type u_1} {a b : X} (γ : path a b) (t : ) :
γ.truncate t t = (path.refl (γ.extend t)).cast _ rfl
@[simp]
theorem path.truncate_zero_zero {X : Type u_1} {a b : X} (γ : path a b) :
γ.truncate 0 0 = (path.refl a).cast _ _
@[simp]
theorem path.truncate_one_one {X : Type u_1} {a b : X} (γ : path a b) :
γ.truncate 1 1 = (path.refl b).cast _ _
@[simp]
theorem path.truncate_zero_one {X : Type u_1} {a b : X} (γ : path a b) :
γ.truncate 0 1 = γ.cast _ _

### Being joined by a path #

def joined {X : Type u_1} (x y : X) :
Prop

The relation "being joined by a path". This is an equivalence relation.

Equations
theorem joined.refl {X : Type u_1} (x : X) :
x
def joined.some_path {X : Type u_1} {x y : X} (h : y) :
path x y

When two points are joined, choose some path from x to y.

Equations
theorem joined.symm {X : Type u_1} {x y : X} (h : y) :
x
theorem joined.trans {X : Type u_1} {x y z : X} (hxy : y) (hyz : z) :
z
def path_setoid (X : Type u_1)  :

The setoid corresponding the equivalence relation of being joined by a continuous path.

Equations
def zeroth_homotopy (X : Type u_1)  :
Type u_1

The quotient type of points of a topological space modulo being joined by a continuous path.

Equations
@[instance]
Equations

### Being joined by a path inside a set #

def joined_in {X : Type u_1} (F : set X) (x y : X) :
Prop

The relation "being joined by a path in F". Not quite an equivalence relation since it's not reflexive for points that do not belong to F.

Equations
theorem joined_in.mem {X : Type u_1} {x y : X} {F : set X} (h : x y) :
x F y F
theorem joined_in.source_mem {X : Type u_1} {x y : X} {F : set X} (h : x y) :
x F
theorem joined_in.target_mem {X : Type u_1} {x y : X} {F : set X} (h : x y) :
y F
def joined_in.some_path {X : Type u_1} {x y : X} {F : set X} (h : x y) :
path x y

When x and y are joined in F, choose a path from x to y inside F

Equations
theorem joined_in.some_path_mem {X : Type u_1} {x y : X} {F : set X} (h : x y) (t : unit_interval) :
theorem joined_in.joined_subtype {X : Type u_1} {x y : X} {F : set X} (h : x y) :
joined x, _⟩ y, _⟩

If x and y are joined in the set F, then they are joined in the subtype F.

theorem joined_in.of_line {X : Type u_1} {x y : X} {F : set X} {f : → X} (hf : unit_interval) (h₀ : f 0 = x) (h₁ : f 1 = y) (hF : F) :
x y
theorem joined_in.joined {X : Type u_1} {x y : X} {F : set X} (h : x y) :
y
theorem joined_in_iff_joined {X : Type u_1} {x y : X} {F : set X} (x_in : x F) (y_in : y F) :
x y joined x, x_in⟩ y, y_in⟩
@[simp]
theorem joined_in_univ {X : Type u_1} {x y : X} :
y
theorem joined_in.mono {X : Type u_1} {x y : X} {U V : set X} (h : x y) (hUV : U V) :
x y
theorem joined_in.refl {X : Type u_1} {x : X} {F : set X} (h : x F) :
x x
theorem joined_in.symm {X : Type u_1} {x y : X} {F : set X} (h : x y) :
y x
theorem joined_in.trans {X : Type u_1} {x y z : X} {F : set X} (hxy : x y) (hyz : y z) :
x z

### Path component #

def path_component {X : Type u_1} (x : X) :
set X

The path component of x is the set of points that can be joined to x.

Equations
• = {y : X | y}
@[simp]
theorem mem_path_component_self {X : Type u_1} (x : X) :
@[simp]
theorem path_component.nonempty {X : Type u_1} (x : X) :
theorem mem_path_component_of_mem {X : Type u_1} {x y : X} (h : x ) :
theorem path_component_symm {X : Type u_1} {x y : X} :
theorem path_component_congr {X : Type u_1} {x y : X} (h : x ) :
theorem path_component_subset_component {X : Type u_1} (x : X) :
def path_component_in {X : Type u_1} (x : X) (F : set X) :
set X

The path component of x in F is the set of points that can be joined to x in F.

Equations
• = {y : X | x y}
@[simp]
theorem path_component_in_univ {X : Type u_1} (x : X) :
theorem joined.mem_path_component {X : Type u_1} {x y z : X} (hyz : z) (hxy : y ) :

### Path connected sets #

def is_path_connected {X : Type u_1} (F : set X) :
Prop

A set F is path connected if it contains a point that can be joined to all other in F.

Equations
• = ∃ (x : X) (H : x F), ∀ {y : X}, y F x y
theorem is_path_connected_iff_eq {X : Type u_1} {F : set X} :
∃ (x : X) (H : x F), = F
theorem is_path_connected.joined_in {X : Type u_1} {F : set X} (h : is_path_connected F) (x y : X) (H : x F) (H_1 : y F) :
x y
theorem is_path_connected_iff {X : Type u_1} {F : set X} :
F.nonempty ∀ (x y : X), x Fy F x y
theorem is_path_connected.image {X : Type u_1} {F : set X} {Y : Type u_2} (hF : is_path_connected F) {f : X → Y} (hf : continuous f) :
theorem is_path_connected.mem_path_component {X : Type u_1} {x y : X} {F : set X} (h : is_path_connected F) (x_in : x F) (y_in : y F) :
theorem is_path_connected.subset_path_component {X : Type u_1} {x : X} {F : set X} (h : is_path_connected F) (x_in : x F) :
theorem is_path_connected.union {X : Type u_1} {U V : set X} (hU : is_path_connected U) (hV : is_path_connected V) (hUV : (U V).nonempty) :
theorem is_path_connected.preimage_coe {X : Type u_1} {U W : set X} (hW : is_path_connected W) (hWU : W U) :

If a set W is path-connected, then it is also path-connected when seen as a set in a smaller ambient type U (when U contains W).

theorem is_path_connected.exists_path_through_family {X : Type u_1} {n : } {s : set X} (h : is_path_connected s) (p : fin (n + 1) → X) (hp : ∀ (i : fin (n + 1)), p i s) :
∃ (γ : path (p 0) (p n)), s ∀ (i : fin (n + 1)), p i
theorem is_path_connected.exists_path_through_family' {X : Type u_1} {n : } {s : set X} (h : is_path_connected s) (p : fin (n + 1) → X) (hp : ∀ (i : fin (n + 1)), p i s) :
∃ (γ : path (p 0) (p n)) (t : fin (n + 1)unit_interval), (∀ (t : unit_interval), γ t s) ∀ (i : fin (n + 1)), γ (t i) = p i

### Path connected spaces #

@[class]
structure path_connected_space (X : Type u_3)  :
Prop
• nonempty :
• joined : ∀ (x y : X), y

A topological space is path-connected if it is non-empty and every two points can be joined by a continuous path.

Instances
def path_connected_space.some_path {X : Type u_1} (x y : X) :
path x y

Use path-connectedness to build a path between two points.

Equations
theorem is_path_connected_iff_path_connected_space {X : Type u_1} {F : set X} :
theorem path_connected_space_iff_univ {X : Type u_1}  :
theorem path_connected_space_iff_eq {X : Type u_1}  :
∃ (x : X),
@[instance]
def path_connected_space.connected_space {X : Type u_1}  :
theorem path_connected_space.exists_path_through_family {X : Type u_1} {n : } (p : fin (n + 1) → X) :
∃ (γ : path (p 0) (p n)), ∀ (i : fin (n + 1)), p i
theorem path_connected_space.exists_path_through_family' {X : Type u_1} {n : } (p : fin (n + 1) → X) :
∃ (γ : path (p 0) (p n)) (t : fin (n + 1)unit_interval), ∀ (i : fin (n + 1)), γ (t i) = p i

### Locally path connected spaces #

@[class]
structure loc_path_connected_space (X : Type u_3)  :
Prop

A topological space is locally path connected, at every point, path connected neighborhoods form a neighborhood basis.

Instances
theorem loc_path_connected_of_bases {X : Type u_1} {ι : Type u_2} {p : ι → Prop} {s : X → ι → set X} (h : ∀ (x : X), (𝓝 x).has_basis p (s x)) (h' : ∀ (x : X) (i : ι), p iis_path_connected (s x i)) :
theorem path_connected_subset_basis {X : Type u_1} {x : X} {U : set X} (h : is_open U) (hx : x U) :
(𝓝 x).has_basis (λ (s : set X), s 𝓝 x s U) id
theorem loc_path_connected_of_is_open {X : Type u_1} {U : set X} (h : is_open U) :
theorem is_open.is_connected_iff_is_path_connected {X : Type u_1} {U : set X} (U_op : is_open U) :