# mathlibdocumentation

topology.algebra.ordered

# Theory of topology on ordered spaces

## Main definitions

The order topology on an ordered space is the topology generated by all open intervals (or equivalently by those of the form (-∞, a) and (b, +∞)). We define it as preorder.topology α. However, we do not register it as an instance (as many existing ordered types already have topologies, which would be equal but not definitionally equal to preorder.topology α). Instead, we introduce a class order_topology α(which is a Prop, also known as a mixin) saying that on the type α having already a topological space structure and a preorder structure, the topological structure is equal to the order topology.

We also introduce another (mixin) class order_closed_topology α saying that the set of points (x, y) with x ≤ y is closed in the product space. This is automatically satisfied on a linear order with the order topology.

We prove many basic properties of such topologies.

## Main statements

This file contains the proofs of the following facts. For exact requirements (order_closed_topology vs order_topology, preorder vs partial_order vs linear_order etc) see their statements.

### Open / closed sets

• is_open_lt : if f and g are continuous functions, then {x | f x < g x} is open;
• is_open_Iio, is_open_Ioi, is_open_Ioo : open intervals are open;
• is_closed_le : if f and g are continuous functions, then {x | f x ≤ g x} is closed;
• is_closed_Iic, is_closed_Ici, is_closed_Icc : closed intervals are closed;
• frontier_le_subset_eq, frontier_lt_subset_eq : frontiers of both {x | f x ≤ g x} and {x | f x < g x} are included by {x | f x = g x};
• exists_Ioc_subset_of_mem_nhds, exists_Ico_subset_of_mem_nhds : if x < y, then any neighborhood of x includes an interval [x, z) for some z ∈ (x, y], and any neighborhood of y includes an interval (z, y] for some z ∈ [x, y).

### Convergence and inequalities

• le_of_tendsto_of_tendsto : if f converges to a, g converges to b, and eventually f x ≤ g x, then a ≤ b
• le_of_tendsto, ge_of_tendsto : if f converges to a and eventually f x ≤ b (resp., b ≤ f x), then a ≤ b (resp., b ≤ a); we also provide primed versions that assume the inequalities to hold for allx.

### Min, max, Sup and Inf

• continuous.min, continuous.max: pointwise min/max of two continuous functions is continuous.
• tendsto.min, tendsto.max : if f tends to a and g tends to b, then their pointwise min/max tend to min a b and max a b, respectively.
• tendsto_of_tendsto_of_tendsto_of_le_of_le : theorem known as squeeze theorem, sandwich theorem, theorem of Carabinieri, and two policemen (and a drunk) theorem; if g and h both converge to a, and eventually g x ≤ f x ≤ h x, then f converges to a.

### Connected sets and Intermediate Value Theorem

• is_preconnected_I?? : all intervals I?? are preconnected,
• is_preconnected.intermediate_value, intermediate_value_univ : Intermediate Value Theorem for connected sets and connected spaces, respectively;
• intermediate_value_Icc, intermediate_value_Icc': Intermediate Value Theorem for functions on closed intervals.

### Miscellaneous facts

• is_compact.exists_forall_le, is_compact.exists_forall_ge : extreme value theorem, a continuous function on a compact set takes its minimum and maximum values.
• is_closed.Icc_subset_of_forall_mem_nhds_within : “Continuous induction” principle; if s ∩ [a, b] is closed, a ∈ s, and for each x ∈ [a, b) ∩ s some of its right neighborhoods is included s, then [a, b] ⊆ s.
• is_closed.Icc_subset_of_forall_exists_gt, is_closed.mem_of_ge_of_forall_exists_gt : two other versions of the “continuous induction” principle.

## Implementation

We do _not_ register the order topology as an instance on a preorder (or even on a linear order). Indeed, on many such spaces, a topology has already been constructed in a different way (think of the discrete spaces ℕ or ℤ, or ℝ that could inherit a topology as the completion of ℚ), and is in general not defeq to the one generated by the intervals. We make it available as a definition preorder.topology α though, that can be registered as an instance when necessary, or for specific types.

@[class]
structure order_closed_topology (α : Type u_1) [preorder α] :
Prop

A topology on a set which is both a topological space and a preorder is _order-closed_ if the set of points (x, y) with x ≤ y is closed in the product space. We introduce this as a mixin. This property is satisfied for the order topology on a linear order, but it can be satisfied more generally, and suffices to derive many interesting properties relating order and topology.

Instances
@[instance]
def order_dual.topological_space {α : Type u}  :

Equations
theorem is_closed_le_prod {α : Type u} [preorder α] [t : order_closed_topology α] :
is_closed {p : α × α | p.fst p.snd}

theorem is_closed_le {α : Type u} {β : Type v} [preorder α] [t : order_closed_topology α] {f g : β → α} :
is_closed {b : β | f b g b}

theorem is_closed_le' {α : Type u} [preorder α] [t : order_closed_topology α] (a : α) :
is_closed {b : α | b a}

theorem is_closed_Iic {α : Type u} [preorder α] [t : order_closed_topology α] {a : α} :

theorem is_closed_ge' {α : Type u} [preorder α] [t : order_closed_topology α] (a : α) :
is_closed {b : α | a b}

theorem is_closed_Ici {α : Type u} [preorder α] [t : order_closed_topology α] {a : α} :

@[instance]

theorem is_closed_Icc {α : Type u} [preorder α] [t : order_closed_topology α] {a b : α} :

@[simp]
theorem closure_Icc {α : Type u} [preorder α] [t : order_closed_topology α] (a b : α) :
closure (set.Icc a b) = b

@[simp]
theorem closure_Iic {α : Type u} [preorder α] [t : order_closed_topology α] (a : α) :

@[simp]
theorem closure_Ici {α : Type u} [preorder α] [t : order_closed_topology α] (a : α) :

theorem le_of_tendsto_of_tendsto {α : Type u} {β : Type v} [preorder α] [t : order_closed_topology α] {f g : β → α} {b : filter β} {a₁ a₂ : α} [b.ne_bot] :
(𝓝 a₁) (𝓝 a₂)f ≤ᶠ[b] ga₁ a₂

theorem le_of_tendsto_of_tendsto' {α : Type u} {β : Type v} [preorder α] [t : order_closed_topology α] {f g : β → α} {b : filter β} {a₁ a₂ : α} [b.ne_bot] :
(𝓝 a₁) (𝓝 a₂)(∀ (x : β), f x g x)a₁ a₂

theorem le_of_tendsto {α : Type u} {β : Type v} [preorder α] [t : order_closed_topology α] {f : β → α} {a b : α} {x : filter β} [x.ne_bot] :
(𝓝 a)(∀ᶠ (c : β) in x, f c b)a b

theorem le_of_tendsto' {α : Type u} {β : Type v} [preorder α] [t : order_closed_topology α] {f : β → α} {a b : α} {x : filter β} [x.ne_bot] :
(𝓝 a)(∀ (c : β), f c b)a b

theorem ge_of_tendsto {α : Type u} {β : Type v} [preorder α] [t : order_closed_topology α] {f : β → α} {a b : α} {x : filter β} [x.ne_bot] :
(𝓝 a)(∀ᶠ (c : β) in x, b f c)b a

theorem ge_of_tendsto' {α : Type u} {β : Type v} [preorder α] [t : order_closed_topology α] {f : β → α} {a b : α} {x : filter β} [x.ne_bot] :
(𝓝 a)(∀ (c : β), b f c)b a

@[simp]
theorem closure_le_eq {α : Type u} {β : Type v} [preorder α] [t : order_closed_topology α] {f g : β → α} :
closure {b : β | f b g b} = {b : β | f b g b}

theorem closure_lt_subset_le {α : Type u} {β : Type v} [preorder α] [t : order_closed_topology α] {f g : β → α} :
closure {b : β | f b < g b} {b : β | f b g b}

theorem continuous_within_at.closure_le {α : Type u} {β : Type v} [preorder α] [t : order_closed_topology α] {f g : β → α} {s : set β} {x : β} :
x x x(∀ (y : β), y sf y g y)f x g x

theorem is_closed.is_closed_le {α : Type u} {β : Type v} [preorder α] [t : order_closed_topology α] {f g : β → α} {s : set β} :
is_closed {x ∈ s | f x g x}

If s is a closed set and two functions f and g are continuous on s, then the set {x ∈ s | f x ≤ g x} is a closed set.

theorem nhds_within_Ici_ne_bot {α : Type u} [preorder α] {a b : α} :
a b𝓝[] b

theorem nhds_within_Ici_self_ne_bot {α : Type u} [preorder α] (a : α) :

theorem nhds_within_Iic_ne_bot {α : Type u} [preorder α] {a b : α} :
a b𝓝[] a

theorem nhds_within_Iic_self_ne_bot {α : Type u} [preorder α] (a : α) :

@[instance]

theorem is_open_lt_prod {α : Type u} [linear_order α]  :
is_open {p : α × α | p.fst < p.snd}

theorem is_open_lt {α : Type u} {β : Type v} [linear_order α] {f g : β → α} :
is_open {b : β | f b < g b}

theorem is_open_Iio {α : Type u} [linear_order α] {a : α} :

theorem is_open_Ioi {α : Type u} [linear_order α] {a : α} :

theorem is_open_Ioo {α : Type u} [linear_order α] {a b : α} :

@[simp]
theorem interior_Ioi {α : Type u} [linear_order α] {a : α} :

@[simp]
theorem interior_Iio {α : Type u} [linear_order α] {a : α} :

@[simp]
theorem interior_Ioo {α : Type u} [linear_order α] {a b : α} :

theorem intermediate_value_univ₂ {α : Type u} [linear_order α] {γ : Type u_1} {a b : γ} {f g : γ → α} :
f a g ag b f b(∃ (x : γ), f x = g x)

Intermediate value theorem for two functions: if f and g are two continuous functions on a preconnected space and f a ≤ g a and g b ≤ f b, then for some x we have f x = g x.

theorem is_preconnected.intermediate_value₂ {α : Type u} [linear_order α] {γ : Type u_1} {s : set γ} (hs : is_preconnected s) {a b : γ} (ha : a s) (hb : b s) {f g : γ → α} :
f a g ag b f b(∃ (x : γ) (H : x s), f x = g x)

Intermediate value theorem for two functions: if f and g are two functions continuous on a preconnected set s and for some a b ∈ s we have f a ≤ g a and g b ≤ f b, then for some x ∈ s we have f x = g x.

theorem is_preconnected.intermediate_value {α : Type u} [linear_order α] {γ : Type u_1} {s : set γ} (hs : is_preconnected s) {a b : γ} (ha : a s) (hb : b s) {f : γ → α} :
set.Icc (f a) (f b) f '' s

Intermediate Value Theorem for continuous functions on connected sets.

theorem intermediate_value_univ {α : Type u} [linear_order α] {γ : Type u_1} (a b : γ) {f : γ → α} :
set.Icc (f a) (f b)

Intermediate Value Theorem for continuous functions on connected spaces.

theorem is_preconnected.Icc_subset {α : Type u} [linear_order α] {s : set α} (hs : is_preconnected s) {a b : α} :
a sb s b s

If a preconnected set contains endpoints of an interval, then it includes the whole interval.

theorem is_connected.Icc_subset {α : Type u} [linear_order α] {s : set α} (hs : is_connected s) {a b : α} :
a sb s b s

If a preconnected set contains endpoints of an interval, then it includes the whole interval.

theorem is_preconnected.eq_univ_of_unbounded {α : Type u} [linear_order α] {s : set α} :

If preconnected set in a linear order space is unbounded below and above, then it is the whole space.

### Neighborhoods to the left and to the right on an order_closed_topology

Limits to the left and to the right of real functions are defined in terms of neighborhoods to the left and to the right, either open or closed, i.e., members of 𝓝[Ioi a] a and 𝓝[Ici a] a on the right, and similarly on the left. Here we simply prove that all right-neighborhoods of a point are equal, and we'll prove later other useful characterizations which require the stronger hypothesis order_topology α

#### Right neighborhoods, point excluded

theorem Ioo_mem_nhds_within_Ioi {α : Type u} [linear_order α] {a b c : α} :
b c c 𝓝[] b

theorem Ioc_mem_nhds_within_Ioi {α : Type u} [linear_order α] {a b c : α} :
b c c 𝓝[] b

theorem Ico_mem_nhds_within_Ioi {α : Type u} [linear_order α] {a b c : α} :
b c c 𝓝[] b

theorem Icc_mem_nhds_within_Ioi {α : Type u} [linear_order α] {a b c : α} :
b c c 𝓝[] b

@[simp]
theorem nhds_within_Ioc_eq_nhds_within_Ioi {α : Type u} [linear_order α] {a b : α} :
a < b𝓝[ b] a = 𝓝[] a

@[simp]
theorem nhds_within_Ioo_eq_nhds_within_Ioi {α : Type u} [linear_order α] {a b : α} :
a < b𝓝[ b] a = 𝓝[] a

@[simp]
theorem continuous_within_at_Ioc_iff_Ioi {α : Type u} {β : Type v} [linear_order α] {a b : α} {f : α → β} :
a < b (set.Ioc a b) a a)

@[simp]
theorem continuous_within_at_Ioo_iff_Ioi {α : Type u} {β : Type v} [linear_order α] {a b : α} {f : α → β} :
a < b (set.Ioo a b) a a)

#### Left neighborhoods, point excluded

theorem Ioo_mem_nhds_within_Iio {α : Type u} [linear_order α] {a b c : α} :
b c c 𝓝[] b

theorem Ico_mem_nhds_within_Iio {α : Type u} [linear_order α] {a b c : α} :
b c c 𝓝[] b

theorem Ioc_mem_nhds_within_Iio {α : Type u} [linear_order α] {a b c : α} :
b c c 𝓝[] b

theorem Icc_mem_nhds_within_Iio {α : Type u} [linear_order α] {a b c : α} :
b c c 𝓝[] b

@[simp]
theorem nhds_within_Ico_eq_nhds_within_Iio {α : Type u} [linear_order α] {a b : α} :
a < b𝓝[ b] b = 𝓝[] b

@[simp]
theorem nhds_within_Ioo_eq_nhds_within_Iio {α : Type u} [linear_order α] {a b : α} :
a < b𝓝[ b] b = 𝓝[] b

@[simp]
theorem continuous_within_at_Ico_iff_Iio {α : Type u} {β : Type v} [linear_order α] {a b : α} {f : α → β} :
a < b (set.Ico a b) b b)

@[simp]
theorem continuous_within_at_Ioo_iff_Iio {α : Type u} {β : Type v} [linear_order α] {a b : α} {f : α → β} :
a < b (set.Ioo a b) b b)

#### Right neighborhoods, point included

theorem Ioo_mem_nhds_within_Ici {α : Type u} [linear_order α] {a b c : α} :
b c c 𝓝[] b

theorem Ioc_mem_nhds_within_Ici {α : Type u} [linear_order α] {a b c : α} :
b c c 𝓝[] b

theorem Ico_mem_nhds_within_Ici {α : Type u} [linear_order α] {a b c : α} :
b c c 𝓝[] b

theorem Icc_mem_nhds_within_Ici {α : Type u} [linear_order α] {a b c : α} :
b c c 𝓝[] b

@[simp]
theorem nhds_within_Icc_eq_nhds_within_Ici {α : Type u} [linear_order α] {a b : α} :
a < b𝓝[ b] a = 𝓝[] a

@[simp]
theorem nhds_within_Ico_eq_nhds_within_Ici {α : Type u} [linear_order α] {a b : α} :
a < b𝓝[ b] a = 𝓝[] a

@[simp]
theorem continuous_within_at_Icc_iff_Ici {α : Type u} {β : Type v} [linear_order α] {a b : α} {f : α → β} :
a < b (set.Icc a b) a a)

@[simp]
theorem continuous_within_at_Ico_iff_Ici {α : Type u} {β : Type v} [linear_order α] {a b : α} {f : α → β} :
a < b (set.Ico a b) a a)

#### Left neighborhoods, point included

theorem Ioo_mem_nhds_within_Iic {α : Type u} [linear_order α] {a b c : α} :
b c c 𝓝[] b

theorem Ico_mem_nhds_within_Iic {α : Type u} [linear_order α] {a b c : α} :
b c c 𝓝[] b

theorem Ioc_mem_nhds_within_Iic {α : Type u} [linear_order α] {a b c : α} :
b c c 𝓝[] b

theorem Icc_mem_nhds_within_Iic {α : Type u} [linear_order α] {a b c : α} :
b c c 𝓝[] b

@[simp]
theorem nhds_within_Icc_eq_nhds_within_Iic {α : Type u} [linear_order α] {a b : α} :
a < b𝓝[ b] b = 𝓝[] b

@[simp]
theorem nhds_within_Ioc_eq_nhds_within_Iic {α : Type u} [linear_order α] {a b : α} :
a < b𝓝[ b] b = 𝓝[] b

@[simp]
theorem continuous_within_at_Icc_iff_Iic {α : Type u} {β : Type v} [linear_order α] {a b : α} {f : α → β} :
a < b (set.Icc a b) b b)

@[simp]
theorem continuous_within_at_Ioc_iff_Iic {α : Type u} {β : Type v} [linear_order α] {a b : α} {f : α → β} :
a < b (set.Ioc a b) b b)

theorem frontier_le_subset_eq {α : Type u} {β : Type v} [linear_order α] {f g : β → α}  :
frontier {b : β | f b g b} {b : β | f b = g b}

theorem frontier_lt_subset_eq {α : Type u} {β : Type v} [linear_order α] {f g : β → α}  :
frontier {b : β | f b < g b} {b : β | f b = g b}

theorem continuous.min {α : Type u} {β : Type v} [linear_order α] {f g : β → α}  :
continuous (λ (b : β), min (f b) (g b))

theorem continuous.max {α : Type u} {β : Type v} [linear_order α] {f g : β → α}  :
continuous (λ (b : β), max (f b) (g b))

theorem continuous_min {α : Type u} [linear_order α]  :
continuous (λ (p : α × α), min p.fst p.snd)

theorem continuous_max {α : Type u} [linear_order α]  :
continuous (λ (p : α × α), max p.fst p.snd)

theorem tendsto.max {α : Type u} {β : Type v} [linear_order α] {f g : β → α} {b : filter β} {a₁ a₂ : α} :
(𝓝 a₁) (𝓝 a₂)filter.tendsto (λ (b : β), max (f b) (g b)) b (𝓝 (max a₁ a₂))

theorem tendsto.min {α : Type u} {β : Type v} [linear_order α] {f g : β → α} {b : filter β} {a₁ a₂ : α} :
(𝓝 a₁) (𝓝 a₂)filter.tendsto (λ (b : β), min (f b) (g b)) b (𝓝 (min a₁ a₂))

@[class]
structure order_topology (α : Type u_1) [t : topological_space α] [preorder α] :
Prop

The order topology on an ordered type is the topology generated by open intervals. We register it on a preorder, but it is mostly interesting in linear orders, where it is also order-closed. We define it as a mixin. If you want to introduce the order topology on a preorder, use preorder.topology.

Instances
def preorder.topology (α : Type u_1) [preorder α] :

(Order) topology on a partial order α generated by the subbase of open intervals (a, ∞) = { x ∣ a < x }, (-∞ , b) = {x ∣ x < b} for all a, b in α. We do not register it as an instance as many ordered sets are already endowed with the same topology, most often in a non-defeq way though. Register as a local instance when necessary.

Equations
@[instance]
def order_dual.order_topology {α : Type u_1}  :

theorem is_open_iff_generate_intervals {α : Type u} [t : order_topology α] {s : set α} :
topological_space.generate_open {s : set α | ∃ (a : α), s = s = set.Iio a} s

theorem is_open_lt' {α : Type u} [t : order_topology α] (a : α) :
is_open {b : α | a < b}

theorem is_open_gt' {α : Type u} [t : order_topology α] (a : α) :
is_open {b : α | b < a}

theorem lt_mem_nhds {α : Type u} [t : order_topology α] {a b : α} :
a < b(∀ᶠ (x : α) in 𝓝 b, a < x)

theorem le_mem_nhds {α : Type u} [t : order_topology α] {a b : α} :
a < b(∀ᶠ (x : α) in 𝓝 b, a x)

theorem gt_mem_nhds {α : Type u} [t : order_topology α] {a b : α} :
a < b(∀ᶠ (x : α) in 𝓝 a, x < b)

theorem ge_mem_nhds {α : Type u} [t : order_topology α] {a b : α} :
a < b(∀ᶠ (x : α) in 𝓝 a, x b)

theorem nhds_eq_order {α : Type u} [t : order_topology α] (a : α) :
𝓝 a = (⨅ (b : α) (H : b set.Iio a), 𝓟 (set.Ioi b)) ⨅ (b : α) (H : b set.Ioi a), 𝓟 (set.Iio b)

theorem tendsto_order {α : Type u} {β : Type v} [t : order_topology α] {f : β → α} {a : α} {x : filter β} :
(𝓝 a) (∀ (a' : α), a' < a(∀ᶠ (b : β) in x, a' < f b)) ∀ (a' : α), a' > a(∀ᶠ (b : β) in x, f b < a')

@[instance]
def tendsto_Icc_class_nhds {α : Type u} [t : order_topology α] (a : α) :
(𝓝 a)

@[instance]
def tendsto_Ico_class_nhds {α : Type u} [t : order_topology α] (a : α) :
(𝓝 a)

@[instance]
def tendsto_Ioc_class_nhds {α : Type u} [t : order_topology α] (a : α) :
(𝓝 a)

@[instance]
def tendsto_Ioo_class_nhds {α : Type u} [t : order_topology α] (a : α) :
(𝓝 a)

@[instance]
def tendsto_Ixx_nhds_within {α : Type u} (a : α) {s t : set α} {Ixx : α → α → set α} [ (𝓝 a) (𝓝 a)] [ (𝓟 s) (𝓟 t)] :
(𝓝[s] a) (𝓝[t] a)

theorem tendsto_of_tendsto_of_tendsto_of_le_of_le' {α : Type u} {β : Type v} [t : order_topology α] {f g h : β → α} {b : filter β} {a : α} :
(𝓝 a) (𝓝 a)(∀ᶠ (b : β) in b, g b f b)(∀ᶠ (b : β) in b, f b h b) (𝓝 a)

Also known as squeeze or sandwich theorem. This version assumes that inequalities hold eventually for the filter.

theorem tendsto_of_tendsto_of_tendsto_of_le_of_le {α : Type u} {β : Type v} [t : order_topology α] {f g h : β → α} {b : filter β} {a : α} :
(𝓝 a) (𝓝 a)g ff h (𝓝 a)

Also known as squeeze or sandwich theorem. This version assumes that inequalities hold everywhere.

theorem nhds_order_unbounded {α : Type u} [t : order_topology α] {a : α} :
(∃ (u : α), a < u)(∃ (l : α), l < a)(𝓝 a = ⨅ (l : α) (h₂ : l < a) (u : α) (h₂ : a < u), 𝓟 (set.Ioo l u))

theorem tendsto_order_unbounded {α : Type u} {β : Type v} [t : order_topology α] {f : β → α} {a : α} {x : filter β} :
(∃ (u : α), a < u)(∃ (l : α), l < a)(∀ (l u : α), l < aa < u(∀ᶠ (b : β) in x, l < f b f b < u)) (𝓝 a)

theorem induced_order_topology' {α : Type u} {β : Type v} [ta : topological_space β] (f : α → β) :
(∀ {x y : α}, f x < f y x < y)(∀ {a : α} {x : β}, x < f a(∃ (b : α) (H : b < a), x f b))(∀ {a : α} {x : β}, f a < x(∃ (b : α) (H : b > a), f b x))

theorem induced_order_topology {α : Type u} {β : Type v} [ta : topological_space β] (f : α → β) :
(∀ {x y : α}, f x < f y x < y)(∀ {x y : β}, x < y(∃ (a : α), x < f a f a < y))

@[instance]
def order_topology_of_ord_connected {α : Type u} [ta : topological_space α] [linear_order α] {t : set α} [ht : t.ord_connected] :

On an ord_connected subset of a linear order, the order topology for the restriction of the order is the same as the restriction to the subset of the order topology.

theorem nhds_top_order {α : Type u} [order_top α]  :
= ⨅ (l : α) (h₂ : l < ), 𝓟 (set.Ioi l)

theorem nhds_bot_order {α : Type u} [order_bot α]  :
= ⨅ (l : α) (h₂ : < l), 𝓟 (set.Iio l)

theorem tendsto_nhds_top_mono {α : Type u} {β : Type v} [order_top β] {l : filter α} {f g : α → β} :
(𝓝 )f ≤ᶠ[l] g (𝓝 )

theorem tendsto_nhds_bot_mono {α : Type u} {β : Type v} [order_bot β] {l : filter α} {f g : α → β} :
(𝓝 )g ≤ᶠ[l] f (𝓝 )

theorem tendsto_nhds_top_mono' {α : Type u} {β : Type v} [order_top β] {l : filter α} {f g : α → β} :
(𝓝 )f g (𝓝 )

theorem tendsto_nhds_bot_mono' {α : Type u} {β : Type v} [order_bot β] {l : filter α} {f g : α → β} :
(𝓝 )g f (𝓝 )

theorem exists_Ioc_subset_of_mem_nhds' {α : Type u} [linear_order α] {a : α} {s : set α} (hs : s 𝓝 a) {l : α} :
l < a(∃ (l' : α) (H : l' a), set.Ioc l' a s)

theorem exists_Ico_subset_of_mem_nhds' {α : Type u} [linear_order α] {a : α} {s : set α} (hs : s 𝓝 a) {u : α} :
a < u(∃ (u' : α) (H : u' u), u' s)

theorem exists_Ioc_subset_of_mem_nhds {α : Type u} [linear_order α] {a : α} {s : set α} :
s 𝓝 a(∃ (l : α), l < a)(∃ (l : α) (H : l < a), a s)

theorem exists_Ico_subset_of_mem_nhds {α : Type u} [linear_order α] {a : α} {s : set α} :
s 𝓝 a(∃ (u : α), a < u)(∃ (u : α) (_x : a < u), u s)

theorem mem_nhds_unbounded {α : Type u} [linear_order α] {a : α} {s : set α} :
(∃ (u : α), a < u)(∃ (l : α), l < a)(s 𝓝 a ∃ (l u : α), l < a a < u ∀ (b : α), l < bb < ub s)

theorem order_separated {α : Type u} [linear_order α] {a₁ a₂ : α} :
a₁ < a₂(∃ (u v : set α), a₁ u a₂ v ∀ (b₁ : α), b₁ u∀ (b₂ : α), b₂ vb₁ < b₂)

@[instance]

theorem order_topology.t2_space {α : Type u} [linear_order α]  :

@[instance]
def order_topology.regular_space {α : Type u} [linear_order α]  :

theorem mem_nhds_iff_exists_Ioo_subset' {α : Type u} [linear_order α] {a l' u' : α} {s : set α} :
l' < aa < u'(s 𝓝 a ∃ (l u : α), a u u s)

A set is a neighborhood of a if and only if it contains an interval (l, u) containing a, provided a is neither a bottom element nor a top element.

theorem mem_nhds_iff_exists_Ioo_subset {α : Type u} [linear_order α] [no_top_order α] [no_bot_order α] {a : α} {s : set α} :
s 𝓝 a ∃ (l u : α), a u u s

A set is a neighborhood of a if and only if it contains an interval (l, u) containing a.

theorem filter.eventually.exists_Ioo_subset {α : Type u} [linear_order α] [no_top_order α] [no_bot_order α] {a : α} {p : α → Prop} :
(∀ᶠ (x : α) in 𝓝 a, p x)(∃ (l u : α), a u u {x : α | p x})

theorem Iio_mem_nhds {α : Type u} [linear_order α] {a b : α} :
a < b 𝓝 a

theorem Ioi_mem_nhds {α : Type u} [linear_order α] {a b : α} :
a < b 𝓝 b

theorem Ioo_mem_nhds {α : Type u} [linear_order α] {a b x : α} :
a < xx < b b 𝓝 x

theorem disjoint_nhds_at_top {α : Type u} [linear_order α] [no_top_order α] (x : α) :

@[simp]
theorem inf_nhds_at_top {α : Type u} [linear_order α] [no_top_order α] (x : α) :

theorem disjoint_nhds_at_bot {α : Type u} [linear_order α] [no_bot_order α] (x : α) :

@[simp]
theorem inf_nhds_at_bot {α : Type u} [linear_order α] [no_bot_order α] (x : α) :

theorem not_tendsto_nhds_of_tendsto_at_top {α : Type u} {β : Type v} [linear_order α] [no_top_order α] {F : filter β} [F.ne_bot] {f : β → α} (hf : filter.at_top) (x : α) :
¬ (𝓝 x)

theorem not_tendsto_at_top_of_tendsto_nhds {α : Type u} {β : Type v} [linear_order α] [no_top_order α] {F : filter β} [F.ne_bot] {f : β → α} {x : α} :
(𝓝 x)

theorem not_tendsto_nhds_of_tendsto_at_bot {α : Type u} {β : Type v} [linear_order α] [no_bot_order α] {F : filter β} [F.ne_bot] {f : β → α} (hf : filter.at_bot) (x : α) :
¬ (𝓝 x)

theorem not_tendsto_at_bot_of_tendsto_nhds {α : Type u} {β : Type v} [linear_order α] [no_bot_order α] {F : filter β} [F.ne_bot] {f : β → α} {x : α} :
(𝓝 x)

### Neighborhoods to the left and to the right on an order_topology

We've seen some properties of left and right neighborhood of a point in an order_closed_topology. In an order_topology, such neighborhoods can be characterized as the sets containing suitable intervals to the right or to the left of a. We give now these characterizations.

theorem tfae_mem_nhds_within_Ioi {α : Type u} [linear_order α] {a b : α} (hab : a < b) (s : set α) :
[s 𝓝[] a, s 𝓝[ b] a, s 𝓝[ b] a, ∃ (u : α) (H : u b), u s, ∃ (u : α) (H : u set.Ioi a), u s].tfae

The following statements are equivalent:

1. s is a neighborhood of a within (a, +∞)
2. s is a neighborhood of a within (a, b]
3. s is a neighborhood of a within (a, b)
4. s includes (a, u) for some u ∈ (a, b]
5. s includes (a, u) for some u > a
theorem mem_nhds_within_Ioi_iff_exists_mem_Ioc_Ioo_subset {α : Type u} [linear_order α] {a u' : α} {s : set α} :
a < u'(s 𝓝[] a ∃ (u : α) (H : u u'), u s)

theorem mem_nhds_within_Ioi_iff_exists_Ioo_subset' {α : Type u} [linear_order α] {a u' : α} {s : set α} :
a < u'(s 𝓝[] a ∃ (u : α) (H : u set.Ioi a), u s)

A set is a neighborhood of a within (a, +∞) if and only if it contains an interval (a, u) with a < u < u', provided a is not a top element.

theorem mem_nhds_within_Ioi_iff_exists_Ioo_subset {α : Type u} [linear_order α] [no_top_order α] {a : α} {s : set α} :
s 𝓝[] a ∃ (u : α) (H : u set.Ioi a), u s

A set is a neighborhood of a within (a, +∞) if and only if it contains an interval (a, u) with a < u.

theorem mem_nhds_within_Ioi_iff_exists_Ioc_subset {α : Type u} [linear_order α] [no_top_order α] {a : α} {s : set α} :
s 𝓝[] a ∃ (u : α) (H : u set.Ioi a), u s

A set is a neighborhood of a within (a, +∞) if and only if it contains an interval (a, u] with a < u.

theorem tfae_mem_nhds_within_Iio {α : Type u} [linear_order α] {a b : α} (h : a < b) (s : set α) :
[s 𝓝[] b, s 𝓝[ b] b, s 𝓝[ b] b, ∃ (l : α) (H : l b), b s, ∃ (l : α) (H : l set.Iio b), b s].tfae

The following statements are equivalent:

1. s is a neighborhood of b within (-∞, b)
2. s is a neighborhood of b within [a, b)
3. s is a neighborhood of b within (a, b)
4. s includes (l, b) for some l ∈ [a, b)
5. s includes (l, b) for some l < b
theorem mem_nhds_within_Iio_iff_exists_mem_Ico_Ioo_subset {α : Type u} [linear_order α] {a l' : α} {s : set α} :
l' < a(s 𝓝[] a ∃ (l : α) (H : l set.Ico l' a), a s)

theorem mem_nhds_within_Iio_iff_exists_Ioo_subset' {α : Type u} [linear_order α] {a l' : α} {s : set α} :
l' < a(s 𝓝[] a ∃ (l : α) (H : l set.Iio a), a s)

A set is a neighborhood of a within (-∞, a) if and only if it contains an interval (l, a) with l < a, provided a is not a bottom element.

theorem mem_nhds_within_Iio_iff_exists_Ioo_subset {α : Type u} [linear_order α] [no_bot_order α] {a : α} {s : set α} :
s 𝓝[] a ∃ (l : α) (H : l set.Iio a), a s

A set is a neighborhood of a within (-∞, a) if and only if it contains an interval (l, a) with l < a.

theorem mem_nhds_within_Iio_iff_exists_Ico_subset {α : Type u} [linear_order α] [no_bot_order α] {a : α} {s : set α} :
s 𝓝[] a ∃ (l : α) (H : l set.Iio a), a s

A set is a neighborhood of a within (-∞, a) if and only if it contains an interval [l, a) with l < a.

theorem tfae_mem_nhds_within_Ici {α : Type u} [linear_order α] {a b : α} (hab : a < b) (s : set α) :
[s 𝓝[] a, s 𝓝[ b] a, s 𝓝[ b] a, ∃ (u : α) (H : u b), u s, ∃ (u : α) (H : u set.Ioi a), u s].tfae

The following statements are equivalent:

1. s is a neighborhood of a within [a, +∞)
2. s is a neighborhood of a within [a, b]
3. s is a neighborhood of a within [a, b)
4. s includes [a, u) for some u ∈ (a, b]
5. s includes [a, u) for some u > a
theorem mem_nhds_within_Ici_iff_exists_mem_Ioc_Ico_subset {α : Type u} [linear_order α] {a u' : α} {s : set α} :
a < u'(s 𝓝[] a ∃ (u : α) (H : u u'), u s)

theorem mem_nhds_within_Ici_iff_exists_Ico_subset' {α : Type u} [linear_order α] {a u' : α} {s : set α} :
a < u'(s 𝓝[] a ∃ (u : α) (H : u set.Ioi a), u s)

A set is a neighborhood of a within [a, +∞) if and only if it contains an interval [a, u) with a < u < u', provided a is not a top element.

theorem mem_nhds_within_Ici_iff_exists_Ico_subset {α : Type u} [linear_order α] [no_top_order α] {a : α} {s : set α} :
s 𝓝[] a ∃ (u : α) (H : u set.Ioi a), u s

A set is a neighborhood of a within [a, +∞) if and only if it contains an interval [a, u) with a < u.

theorem mem_nhds_within_Ici_iff_exists_Icc_subset' {α : Type u} [linear_order α] [no_top_order α] {a : α} {s : set α} :
s 𝓝[] a ∃ (u : α) (H : u set.Ioi a), u s

A set is a neighborhood of a within [a, +∞) if and only if it contains an interval [a, u] with a < u.

theorem tfae_mem_nhds_within_Iic {α : Type u} [linear_order α] {a b : α} (h : a < b) (s : set α) :
[s 𝓝[] b, s 𝓝[ b] b, s 𝓝[ b] b, ∃ (l : α) (H : l b), b s, ∃ (l : α) (H : l set.Iio b), b s].tfae

The following statements are equivalent:

1. s is a neighborhood of b within (-∞, b]
2. s is a neighborhood of b within [a, b]
3. s is a neighborhood of b within (a, b]
4. s includes (l, b] for some l ∈ [a, b)
5. s includes (l, b] for some l < b
theorem mem_nhds_within_Iic_iff_exists_mem_Ico_Ioc_subset {α : Type u} [linear_order α] {a l' : α} {s : set α} :
l' < a(s 𝓝[] a ∃ (l : α) (H : l set.Ico l' a), a s)

theorem mem_nhds_within_Iic_iff_exists_Ioc_subset' {α : Type u} [linear_order α] {a l' : α} {s : set α} :
l' < a(s 𝓝[] a ∃ (l : α) (H : l set.Iio a), a s)

A set is a neighborhood of a within (-∞, a] if and only if it contains an interval (l, a] with l < a, provided a is not a bottom element.

theorem mem_nhds_within_Iic_iff_exists_Ioc_subset {α : Type u} [linear_order α] [no_bot_order α] {a : α} {s : set α} :
s 𝓝[] a ∃ (l : α) (H : l set.Iio a), a s

A set is a neighborhood of a within (-∞, a] if and only if it contains an interval (l, a] with l < a.

theorem mem_nhds_within_Iic_iff_exists_Icc_subset' {α : Type u} [linear_order α] [no_bot_order α] {a : α} {s : set α} :
s 𝓝[] a ∃ (l : α) (H : l set.Iio a), a s

A set is a neighborhood of a within (-∞, a] if and only if it contains an interval [l, a] with l < a.

theorem mem_nhds_within_Ici_iff_exists_Icc_subset {α : Type u} [linear_order α] [no_top_order α] {a : α} {s : set α} :
s 𝓝[] a ∃ (u : α), a < u u s

A set is a neighborhood of a within [a, +∞) if and only if it contains an interval [a, u] with a < u.

theorem mem_nhds_within_Iic_iff_exists_Icc_subset {α : Type u} [linear_order α] [no_bot_order α] {a : α} {s : set α} :
s 𝓝[] a ∃ (l : α), l < a a s

A set is a neighborhood of a within (-∞, a] if and only if it contains an interval [l, a] with l < a.

theorem continuous_right_of_strict_mono_surjective {α : Type u} {β : Type v} [linear_order α] [linear_order β] {f : α → β} (h_mono : strict_mono f) (h_surj : function.surjective f) (a : α) :
a

If f : α → β is strictly monotone and surjective, it is everywhere right-continuous. Superseded later in this file by continuous_of_strict_mono_surjective (same assumptions).

theorem continuous_left_of_strict_mono_surjective {α : Type u} {β : Type v} [linear_order α] [linear_order β] {f : α → β} (h_mono : strict_mono f) (h_surj : function.surjective f) (a : α) :
a

If f : α → β is strictly monotone and surjective, it is everywhere left-continuous. Superseded later in this file by continuous_of_strict_mono_surjective (same assumptions).

theorem tendsto_at_top_add_tendsto_left {α : Type u} {β : Type v} {l : filter β} {f g : β → α} {C : α} :
(𝓝 C)filter.tendsto (λ (x : β), f x + g x) l filter.at_top

In a linearly ordered ring with the order topology, if f tends to C and g tends to at_top then f + g tends to at_top.

theorem tendsto_at_bot_add_tendsto_left {α : Type u} {β : Type v} {l : filter β} {f g : β → α} {C : α} :
(𝓝 C)filter.tendsto (λ (x : β), f x + g x) l filter.at_bot

In a linearly ordered ring with the order topology, if f tends to C and g tends to at_bot then f + g tends to at_bot.

theorem tendsto_at_top_add_tendsto_right {α : Type u} {β : Type v} {l : filter β} {f g : β → α} {C : α} :
(𝓝 C)filter.tendsto (λ (x : β), f x + g x) l filter.at_top

In a linearly ordered ring with the order topology, if f tends to at_top and g tends to C then f + g tends to at_top.

theorem tendsto_at_bot_add_tendsto_right {α : Type u} {β : Type v} {l : filter β} {f g : β → α} {C : α} :
(𝓝 C)filter.tendsto (λ (x : β), f x + g x) l filter.at_bot

In a linearly ordered ring with the order topology, if f tends to at_bot and g tends to C then f + g tends to at_bot.

theorem tendsto_pow_at_top {α : Type u} {n : } :
1 nfilter.tendsto (λ (x : α), x ^ n) filter.at_top filter.at_top

The function x^n tends to +∞ at +∞ for any positive natural n. A version for positive real powers exists as tendsto_rpow_at_top.

theorem tendsto_at_top_mul_left {α : Type u} {β : Type v} [archimedean α] {l : filter β} {f : β → α} {r : α} :
0 < rfilter.tendsto (λ (x : β), r * f x) l filter.at_top

If a function tends to infinity along a filter, then this function multiplied by a positive constant (on the left) also tends to infinity. The archimedean assumption is convenient to get a statement that works on ℕ, ℤ and ℝ, although not necessary (a version in ordered fields is given in tendsto_at_top_mul_left').

theorem tendsto_at_top_mul_right {α : Type u} {β : Type v} [archimedean α] {l : filter β} {f : β → α} {r : α} :
0 < rfilter.tendsto (λ (x : β), (f x) * r) l filter.at_top

If a function tends to infinity along a filter, then this function multiplied by a positive constant (on the right) also tends to infinity. The archimedean assumption is convenient to get a statement that works on ℕ, ℤ and ℝ, although not necessary (a version in ordered fields is given in tendsto_at_top_mul_right').

theorem tendsto_at_top_mul_left' {α : Type u} {β : Type v} {l : filter β} {f : β → α} {r : α} :
0 < rfilter.tendsto (λ (x : β), r * f x) l filter.at_top

If a function tends to infinity along a filter, then this function multiplied by a positive constant (on the left) also tends to infinity. For a version working in ℕ or ℤ, use tendsto_at_top_mul_left instead.

theorem tendsto_at_top_mul_right' {α : Type u} {β : Type v} {l : filter β} {f : β → α} {r : α} :
0 < rfilter.tendsto (λ (x : β), (f x) * r) l filter.at_top

If a function tends to infinity along a filter, then this function multiplied by a positive constant (on the right) also tends to infinity. For a version working in ℕ or ℤ, use tendsto_at_top_mul_right instead.

theorem tendsto_at_top_div {α : Type u} {β : Type v} {l : filter β} {f : β → α} {r : α} :
0 < rfilter.tendsto (λ (x : β), f x / r) l filter.at_top

If a function tends to infinity along a filter, then this function divided by a positive constant also tends to infinity.

theorem tendsto_mul_at_top {α : Type u} {β : Type v} {l : filter β} {f g : β → α} {C : α} :
0 < C (𝓝 C)filter.tendsto (λ (x : β), (f x) * g x) l filter.at_top

In a linearly ordered field with the order topology, if f tends to at_top and g tends to a positive constant C then f * g tends to at_top.

theorem tendsto_mul_at_bot {α : Type u} {β : Type v} {l : filter β} {f g : β → α} {C : α} :
C < 0 (𝓝 C)filter.tendsto (λ (x : β), (f x) * g x) l filter.at_bot

In a linearly ordered field with the order topology, if f tends to at_top and g tends to a negative constant C then f * g tends to at_bot.

theorem tendsto_inv_zero_at_top {α : Type u}  :

The function x ↦ x⁻¹ tends to +∞ on the right of 0.

theorem tendsto_inv_at_top_zero' {α : Type u}  :

The function r ↦ r⁻¹ tends to 0 on the right as r → +∞.

theorem tendsto_inv_at_top_zero {α : Type u}  :

theorem tendsto.inv_tendsto_at_top {α : Type u} {β : Type v} {l : filter β} {f : β → α} :
(𝓝 0)

theorem tendsto.inv_tendsto_zero {α : Type u} {β : Type v} {l : filter β} {f : β → α} :
(𝓝[] 0)

theorem tendsto_pow_neg_at_top {α : Type u} {n : } :
1 nfilter.tendsto (λ (x : α), x ^ -n) filter.at_top (𝓝 0)

The function x^(-n) tends to 0 at +∞ for any positive natural n. A version for positive real powers exists as tendsto_rpow_neg_at_top.

theorem preimage_neg {α : Type u} [add_group α] :

theorem filter.map_neg {α : Type u} [add_group α] :

theorem neg_preimage_closure {α : Type u} {s : set α} :
(λ (r : α), -r) ⁻¹' = closure ((λ (r : α), -r) '' s)

theorem is_lub.nhds_within_ne_bot {α : Type u} [linear_order α] {a : α} {s : set α} :
as.nonempty(𝓝[s] a).ne_bot

theorem is_glb.nhds_within_ne_bot {α : Type u} [linear_order α] {a : α} {s : set α} :
as.nonempty(𝓝[s] a).ne_bot

theorem is_lub_of_mem_nhds {α : Type u} [linear_order α] {s : set α} {a : α} {f : filter α} (hsa : a ) (hsf : s f) [(f 𝓝 a).ne_bot] :
a

theorem is_glb_of_mem_nhds {α : Type u} [linear_order α] {s : set α} {a : α} {f : filter α} :
s f(f 𝓝 a).ne_bot a

theorem is_lub_of_is_lub_of_tendsto {α : Type u} {β : Type v} [linear_order α] [linear_order β] {f : α → β} {s : set α} {a : α} {b : β} :
(∀ (x : α), x s∀ (y : α), y sx yf x f y) as.nonempty (𝓝[s] a) (𝓝 b)is_lub (f '' s) b

theorem is_glb_of_is_glb_of_tendsto {α : Type u} {β : Type v} [linear_order α] [linear_order β] {f : α → β} {s : set α} {a : α} {b : β} :
(∀ (x : α), x s∀ (y : α), y sx yf x f y) as.nonempty (𝓝[s] a) (𝓝 b)is_glb (f '' s) b

theorem is_glb_of_is_lub_of_tendsto {α : Type u} {β : Type v} [linear_order α] [linear_order β] {f : α → β} {s : set α} {a : α} {b : β} :
(∀ (x : α), x s∀ (y : α), y sx yf y f x) as.nonempty (𝓝[s] a) (𝓝 b)is_glb (f '' s) b

theorem is_lub_of_is_glb_of_tendsto {α : Type u} {β : Type v} [linear_order α] [linear_order β] {f : α → β} {s : set α} {a : α} {b : β} :
(∀ (x : α), x s∀ (y : α), y sx yf y f x) as.nonempty (𝓝[s] a) (𝓝 b)is_lub (f '' s) b

theorem mem_closure_of_is_lub {α : Type u} [linear_order α] {a : α} {s : set α} :
as.nonemptya

theorem mem_of_is_lub_of_is_closed {α : Type u} [linear_order α] {a : α} {s : set α} :
as.nonemptya s

theorem mem_closure_of_is_glb {α : Type u} [linear_order α] {a : α} {s : set α} :
as.nonemptya

theorem mem_of_is_glb_of_is_closed {α : Type u} [linear_order α] {a : α} {s : set α} :
as.nonemptya s

theorem is_compact.bdd_below {α : Type u} [linear_order α] [nonempty α] {s : set α} :

A compact set is bounded below

theorem is_compact.bdd_above {α : Type u} [linear_order α] [nonempty α] {s : set α} :

A compact set is bounded above

theorem closure_Ioi' {α : Type u} [linear_order α] {a b : α} :
a < bclosure (set.Ioi a) =

The closure of the interval (a, +∞) is the closed interval [a, +∞), unless a is a top element.

@[simp]
theorem closure_Ioi {α : Type u} [linear_order α] (a : α) [no_top_order α] :

The closure of the interval (a, +∞) is the closed interval [a, +∞).

theorem closure_Iio' {α : Type u} [linear_order α] {a b : α} :
b < aclosure (set.Iio a) =

The closure of the interval (-∞, a) is the closed interval (-∞, a], unless a is a bottom element.

@[simp]
theorem closure_Iio {α : Type u} [linear_order α] (a : α) [no_bot_order α] :

The closure of the interval (-∞, a) is the interval (-∞, a].

@[simp]
theorem closure_Ioo {α : Type u} [linear_order α] {a b : α} :
a < bclosure (set.Ioo a b) = b

The closure of the open interval (a, b) is the closed interval [a, b].

@[simp]
theorem closure_Ioc {α : Type u} [linear_order α] {a b : α} :
a < bclosure (set.Ioc a b) = b

The closure of the interval (a, b] is the closed interval [a, b].

@[simp]
theorem closure_Ico {α : Type u} [linear_order α] {a b : α} :
a < bclosure (set.Ico a b) = b

The closure of the interval [a, b) is the closed interval [a, b].

@[simp]
theorem interior_Ici {α : Type u} [linear_order α] [no_bot_order α] {a : α} :

@[simp]
theorem interior_Iic {α : Type u} [linear_order α] [no_top_order α] {a : α} :

@[simp]
theorem interior_Icc {α : Type u} [linear_order α] [no_bot_order α] [no_top_order α] {a b : α} :

@[simp]
theorem interior_Ico {α : Type u} [linear_order α] [no_bot_order α] {a b : α} :

@[simp]
theorem interior_Ioc {α : Type u} [linear_order α] [no_top_order α] {a b : α} :

@[simp]
theorem frontier_Ici {α : Type u} [linear_order α] [no_bot_order α] {a : α} :

@[simp]
theorem frontier_Iic {α : Type u} [linear_order α] [no_top_order α] {a : α} :

@[simp]
theorem frontier_Ioi {α : Type u} [linear_order α] [no_top_order α] {a : α} :

@[simp]
theorem frontier_Iio {α : Type u} [linear_order α] [no_bot_order α] {a : α} :

@[simp]
theorem frontier_Icc {α : Type u} [linear_order α] [no_bot_order α] [no_top_order α] {a b : α} :
a < bfrontier (set.Icc a b) = {a, b}

@[simp]
theorem frontier_Ioo {α : Type u} [linear_order α] {a b : α} :
a < bfrontier (set.Ioo a b) = {a, b}

@[simp]
theorem frontier_Ico {α : Type u} [linear_order α] [no_bot_order α] {a b : α} :
a < bfrontier (set.Ico a b) = {a, b}

@[simp]
theorem frontier_Ioc {α : Type u} [linear_order α] [no_top_order α] {a b : α} :
a < bfrontier (set.Ioc a b) = {a, b}

theorem nhds_within_Ioi_ne_bot' {α : Type u} [linear_order α] {a b c : α} :
a < ca b(𝓝[] b).ne_bot

theorem nhds_within_Ioi_ne_bot {α : Type u} [linear_order α] [no_top_order α] {a b : α} :
a b(𝓝[] b).ne_bot

theorem nhds_within_Ioi_self_ne_bot' {α : Type u} [linear_order α] {a b : α} :
a < b(𝓝[] a).ne_bot

@[instance]
theorem nhds_within_Ioi_self_ne_bot {α : Type u} [linear_order α] [no_top_order α] (a : α) :

theorem nhds_within_Iio_ne_bot' {α : Type u} [linear_order α] {a b c : α} :
a < cb c(𝓝[] b).ne_bot

theorem nhds_within_Iio_ne_bot {α : Type u} [linear_order α] [no_bot_order α] {a b : α} :
a b(𝓝[] a).ne_bot

theorem nhds_within_Iio_self_ne_bot' {α : Type u} [linear_order α] {a b : α} :
a < b(𝓝[] b).ne_bot

@[instance]
theorem nhds_within_Iio_self_ne_bot {α : Type u} [linear_order α] [no_bot_order α] (a : α) :

theorem Ioo_at_top_eq_nhds_within {α : Type u} [linear_order α] {a b : α} :
a < b

The at_top filter for an open interval Ioo a b comes from the left-neighbourhoods filter at the right endpoint in the ambient order.

theorem Ioo_at_bot_eq_nhds_within {α : Type u} [linear_order α] {a b : α} :
a < b

The at_bot filter for an open interval Ioo a b comes from the right-neighbourhoods filter at the left endpoint in the ambient order.

theorem Sup_mem_closure {α : Type u} {s : set α} :
s.nonemptySup s

theorem Inf_mem_closure {α : Type u} {s : set α} :
s.nonemptyInf s

theorem is_closed.Sup_mem {α : Type u} {s : set α} :
s.nonemptySup s s

theorem is_closed.Inf_mem {α : Type u} {s : set α} :
s.nonemptyInf s s

theorem map_Sup_of_continuous_at_of_monotone' {α : Type u} {β : Type v} {f : α → β} {s : set α} :
(Sup s)s.nonemptyf (Sup s) = Sup (f '' s)

A monotone function continuous at the supremum of a nonempty set sends this supremum to the supremum of the image of this set.

theorem map_Sup_of_continuous_at_of_monotone {α : Type u} {β : Type v} {f : α → β} {s : set α} :
(Sup s)f = f (Sup s) = Sup (f '' s)

A monotone function s sending bot to bot and continuous at the supremum of a set sends this supremum to the supremum of the image of this set.

theorem map_supr_of_continuous_at_of_monotone' {α : Type u} {β : Type v} {ι : Sort u_1} [nonempty ι] {f : α → β} {g : ι → α} :
(supr g)(f (⨆ (i : ι), g i) = ⨆ (i : ι), f (g i))

A monotone function continuous at the indexed supremum over a nonempty Sort sends this indexed supremum to the indexed supremum of the composition.

theorem map_supr_of_continuous_at_of_monotone {α : Type u} {β : Type v} {ι : Sort u_1} {f : α → β} {g : ι → α} :
(supr g)f = (f (⨆ (i : ι), g i) = ⨆ (i : ι), f (g i))

If a monotone function sending bot to bot is continuous at the indexed supremum over a Sort, then it sends this indexed supremum to the indexed supremum of the composition.

theorem map_Inf_of_continuous_at_of_monotone' {α : Type u} {β : Type v} {f : α → β} {s : set α} :
(Inf s)s.nonemptyf (Inf s) = Inf (f '' s)

A monotone function continuous at the infimum of a nonempty set sends this infimum to the infimum of the image of this set.

theorem map_Inf_of_continuous_at_of_monotone {α : Type u} {β : Type v} {f : α → β} {s : set α} :
(Inf s)f = f (Inf s) = Inf (f '' s)

A monotone function s sending top to top and continuous at the infimum of a set sends this infimum to the infimum of the image of this set.

theorem map_infi_of_continuous_at_of_monotone' {α : Type u} {β : Type v} {ι : Sort u_1} [nonempty ι] {f : α → β} {g : ι → α} :
(infi g)(f (⨅ (i : ι), g i) = ⨅ (i : ι), f (g i))

A monotone function continuous at the indexed infimum over a nonempty Sort sends this indexed infimum to the indexed infimum of the composition.

theorem map_infi_of_continuous_at_of_monotone {α : Type u} {β : Type v} {ι : Sort u_1} {f : α → β} {g : ι → α} :
(infi g)f = f (infi g) = infi (f g)

If a monotone function sending top to top is continuous at the indexed infimum over a Sort, then it sends this indexed infimum to the indexed infimum of the composition.

theorem cSup_mem_closure {α : Type u} {s : set α} :
s.nonemptySup s

theorem cInf_mem_closure {α : Type u} {s : set α} :
s.nonemptyInf s

theorem is_closed.cSup_mem {α : Type u} {s : set α} :
s.nonemptySup s s

theorem is_closed.cInf_mem {α : Type u} {s : set α} :
s.nonemptyInf s s

theorem map_cSup_of_continuous_at_of_monotone {α : Type u} {β : Type v} {f : α → β} {s : set α} :
(Sup s)s.nonemptyf (Sup s) = Sup (f '' s)

If a monotone function is continuous at the supremum of a nonempty bounded above set s, then it sends this supremum to the supremum of the image of s.

theorem map_csupr_of_continuous_at_of_monotone {α : Type u} {β : Type v} {γ : Type w} [nonempty γ] {f : α → β} {g : γ → α} :
(⨆ (i : γ), g i)(f (⨆ (i : γ), g i) = ⨆ (i : γ), f (g i))

If a monotone function is continuous at the indexed supremum of a bounded function on a nonempty Sort, then it sends this supremum to the supremum of the composition.

theorem map_cInf_of_continuous_at_of_monotone {α : Type u} {β : Type v} {f : α → β} {s : set α} :
(Inf s)s.nonemptyf (Inf s) = Inf (f '' s)

If a monotone function is continuous at the infimum of a nonempty bounded below set s, then it sends this infimum to the infimum of the image of s.

theorem map_cinfi_of_continuous_at_of_monotone {α : Type u} {β : Type v} {γ : Type w} [nonempty γ] {f : α → β} {g : γ → α} :
(⨅ (i : γ), g i)(f (⨅ (i : γ), g i) = ⨅ (i : γ), f (g i))

A continuous monotone function sends indexed infimum to indexed infimum in conditionally complete linear order, under a boundedness assumption.

theorem is_connected.Ioo_cInf_cSup_subset {α : Type u} {s : set α} :
set.Ioo (Inf s) (Sup s) s

A bounded connected subset of a conditionally complete linear order includes the open interval (Inf s, Sup s).

theorem eq_Icc_cInf_cSup_of_connected_bdd_closed {α : Type u} {s : set α} :
s = set.Icc (Inf s) (Sup s)

theorem is_preconnected.Ioi_cInf_subset {α : Type u} {s : set α} :
set.Ioi (Inf s) s

theorem is_preconnected.Iio_cSup_subset {α : Type u} {s : set α} :
set.Iio (Sup s) s

theorem is_preconnected.mem_intervals {α : Type u} {s : set α} :
s {set.Icc (Inf s) (Sup s), set.Ico (Inf s) (Sup s), set.Ioc (Inf s) (Sup s), set.Ioo (Inf s) (Sup s), set.Ici (Inf s), set.Ioi (Inf s), set.Iic (Sup s), set.Iio (Sup s), set.univ, }

A preconnected set in a conditionally complete linear order is either one of the intervals [Inf s, Sup s], [Inf s, Sup s), (Inf s, Sup s], (Inf s, Sup s), [Inf s, +∞), (Inf s, +∞), (-∞, Sup s], (-∞, Sup s), (-∞, +∞), or ∅. The converse statement requires α to be densely ordererd.

theorem set_of_is_preconnected_subset_of_ordered {α : Type u}  :

A preconnected set is either one of the intervals Icc, Ico, Ioc, Ioo, Ici, Ioi, Iic, Iio, or univ, or ∅. The converse statement requires α to be densely ordererd. Though one can represent ∅ as (Inf s, Inf s), we include it into the list of possible cases to improve readability.

theorem is_closed.mem_of_ge_of_forall_exists_gt {α : Type u} {a b : α} {s : set α} :
is_closed (s b)a sa b(∀ (x : α), x s b(s b).nonempty)b s

A "continuous induction principle" for a closed interval: if a set s meets [a, b] on a closed subset, contains a, and the set s ∩ [a, b) has no maximal point, then b ∈ s.

theorem is_closed.Icc_subset_of_forall_exists_gt {α : Type u} {a b : α} {s : set α} :
is_closed (s b)a s(∀ (x : α), x s b∀ (y : α), y (s y).nonempty) b s

A "continuous induction principle" for a closed interval: if a set s meets [a, b] on a closed subset, contains a, and for any a ≤ x < y ≤ b, x ∈ s, the set s ∩ (x, y] is not empty, then [a, b] ⊆ s.

theorem is_closed.Icc_subset_of_forall_mem_nhds_within {α : Type u} {a b : α} {s : set α} :
is_closed (s b)a s(∀ (x : α), x s bs 𝓝[] x) b s

A "continuous induction principle" for a closed interval: if a set s meets [a, b] on a closed subset, contains a, and for any x ∈ s ∩ [a, b) the set s includes some open neighborhood of x within (x, +∞), then [a, b] ⊆ s.

theorem is_preconnected_Icc {α : Type u} {a b : α} :

A closed interval in a densely ordered conditionally complete linear order is preconnected.

theorem is_preconnected_interval {α : Type u} {a b : α} :

theorem is_preconnected_iff_ord_connected {α : Type u} {s : set α} :

theorem is_preconnected_Ici {α : Type u} {a : α} :

theorem is_preconnected_Iic {α : Type u} {a : α} :

theorem is_preconnected_Iio {α : Type u} {a : α} :

theorem is_preconnected_Ioi {α : Type u} {a : α} :

theorem is_preconnected_Ioo {α : Type u} {a b : α} :

theorem is_preconnected_Ioc {α : Type u} {a b : α} :

theorem is_preconnected_Ico {α : Type u} {a b : α} :

@[instance]
def ordered_connected_space {α : Type u}  :

theorem set_of_is_preconnected_eq_of_ordered {α : Type u}  :

In a dense conditionally complete linear order, the set of preconnected sets is exactly the set of the intervals Icc, Ico, Ioc, Ioo, Ici, Ioi, Iic, Iio, (-∞, +∞), or ∅. Though one can represent ∅ as (Inf s, Inf s), we include it into the list of possible cases to improve readability.

theorem intermediate_value_Icc {α : Type u} {β : Type v} {a b : α} (hab : a b) {f : α → β} :
(set.Icc a b)set.Icc (f a) (f b) f '' b

Intermediate Value Theorem for continuous functions on closed intervals, case f a ≤ t ≤ f b.

theorem intermediate_value_Icc' {α : Type u} {β : Type v} {a b : α} (hab : a b) {f : α → β} :
(set.Icc a b)set.Icc (f b) (f a) f '' b

Intermediate Value Theorem for continuous functions on closed intervals, case f a ≥ t ≥ f b.

theorem surjective_of_continuous {α : Type u} {β : Type v} {f : α → β} :

A continuous function which tendsto at_top at_top and to at_bot at_bot is surjective.

theorem surjective_of_continuous' {α : Type u} {β : Type v} {f : α → β} :

A continuous function which tendsto at_bot at_top and to at_top at_bot is surjective.

theorem is_compact.Inf_mem {α : Type u} {s : set α} :
s.nonemptyInf s s

theorem is_compact.Sup_mem {α : Type u} {s : set α} :
s.nonemptySup s s

theorem is_compact.is_glb_Inf {α : Type u} {s : set α} :
s.nonempty (Inf s)

theorem is_compact.is_lub_Sup {α : Type u} {s : set α} :
s.nonempty (Sup s)

theorem is_compact.is_least_Inf {α : Type u} {s : set α} :
s.nonempty (Inf s)

theorem is_compact.is_greatest_Sup {α : Type u} {s : set α} :
s.nonempty (Sup s)

theorem is_compact.exists_is_least {α : Type u} {s : set α} :
s.nonempty(∃ (x : α), x)

theorem is_compact.exists_is_greatest {α : Type u} {s : set α} :
s.nonempty(∃ (x : α), x)

theorem is_compact.exists_is_glb {α : Type u} {s : set α} :
s.nonempty(∃ (x : α) (H : x s), x)

theorem is_compact.exists_is_lub {α : Type u} {s : set α} :
s.nonempty(∃ (x : α) (H : x s), x)

theorem is_compact.exists_Inf_image_eq {β : Type v} {α : Type u} {s : set α} (hs : is_compact s) (ne_s : s.nonempty) {f : α → β} :
(∃ (x : α) (H : x s), Inf (f '' s) = f x)

theorem is_compact.exists_Sup_image_eq {β : Type v} {α : Type u} {s : set α} (a : is_compact s) (a_1 : s.nonempty) {f : α → β} :
(∃ (x : α) (H : x s), Sup (f '' s) = f x)

theorem eq_Icc_of_connected_compact {α : Type u} {s : set α} :
s = set.Icc (Inf s) (Sup s)

theorem is_compact.exists_forall_le {β : Type v} {α : Type u} {s : set α} (hs : is_compact s) (ne_s : s.nonempty) {f : α → β} :
(∃ (x : α) (H : x s), ∀ (y : α), y sf x f y)

The extreme value theorem: a continuous function realizes its minimum on a compact set

theorem is_compact.exists_forall_ge {β : Type v} {α : Type u} {s : set α} (a : is_compact s) (a_1 : s.nonempty) {f : α → β} :
(∃ (x : α) (H : x s), ∀ (y : α), y sf y f x)

The extreme value theorem: a continuous function realizes its maximum on a compact set

theorem continuous.exists_forall_le {β : Type v} {α : Type u_1} [nonempty α] {f : α → β} :
(∃ (x : α), ∀ (y : α), f x f y)

The extreme value theorem: if a continuous function f tends to infinity away from compact sets, then it has a global minimum.

theorem continuous.exists_forall_ge {β : Type v} {α : Type u_1} [nonempty α] {f : α → β} :
(∃ (x : α), ∀ (y : α), f y f x)

The extreme value theorem: if a continuous function f tends to negative infinity away from compactx sets, then it has a global maximum.

theorem is_bounded_le_nhds {α : Type u} (a : α) :

theorem filter.tendsto.is_bounded_under_le {α : Type u} {β : Type v} {f : filter β} {u : β → α} {a : α} :
(𝓝 a)

theorem is_cobounded_ge_nhds {α : Type u} (a : α) :

theorem filter.tendsto.is_cobounded_under_ge {α : Type u} {β : Type v} {f : filter β} {u : β → α} {a : α} [f.ne_bot] :
(𝓝 a)

theorem is_bounded_ge_nhds {α : Type u} (a : α) :
(𝓝 a)

theorem filter.tendsto.is_bounded_under_ge {α : Type u} {β : Type v} {f : filter β} {u : β → α} {a : α} :
(𝓝 a)

theorem is_cobounded_le_nhds {α : Type u} (a : α) :

theorem filter.tendsto.is_cobounded_under_le {α : Type u} {β : Type v} {f : filter β} {u : β → α} {a : α} [f.ne_bot] :
(𝓝 a)

theorem lt_mem_sets_of_Limsup_lt {α : Type u} {f : filter α} {b : α} :
f.Limsup < b(∀ᶠ (a : α) in f, a < b)

theorem gt_mem_sets_of_Liminf_gt {α : Type u} {f : filter α} {b : α} :
b < f.Liminf(∀ᶠ (a : α) in f, b < a)

theorem le_nhds_of_Limsup_eq_Liminf {α : Type u} {f : filter α} {a : α} :
f.Limsup = af.Liminf = af 𝓝 a

If the liminf and the limsup of a filter coincide, then this filter converges to their common value, at least if the filter is eventually bounded above and below.

theorem Limsup_nhds {α : Type u} (a : α) :
(𝓝 a).Limsup = a

theorem Liminf_nhds {α : Type u} (a : α) :
(𝓝 a).Liminf = a

theorem Liminf_eq_of_le_nhds {α : Type u} {f : filter α} {a : α} [f.ne_bot] :
f 𝓝 af.Liminf = a

If a filter is converging, its limsup coincides with its limit.

theorem Limsup_eq_of_le_nhds {α : Type u} {f : filter α} {a : α} [f.ne_bot] :
f 𝓝 af.Limsup = a

If a filter is converging, its liminf coincides with its limit.

theorem filter.tendsto.limsup_eq {α : Type u} {β : Type v} {f : filter β} {u : β → α} {a : α} [f.ne_bot] :
(𝓝 a)f.limsup u = a

If a function has a limit, then its limsup coincides with its limit.

theorem filter.tendsto.liminf_eq {α : Type u} {β : Type v} {f : filter β} {u : β → α} {a : α} [f.ne_bot] :
(𝓝 a)f.liminf u = a

If a function has a limit, then its liminf coincides with its limit.

theorem tendsto_of_liminf_eq_limsup {α : Type u} {β : Type v} {f : filter β} {u : β → α} {a : α} :
f.liminf u = af.limsup u = a (𝓝 a)

If the liminf and the limsup of a function coincide, then the limit of the function exists and has the same value

theorem tendsto_of_le_liminf_of_limsup_le {α : Type u} {β : Type v} {f : filter β} {u : β → α} {a : α} :
a f.liminf uf.limsup u a (𝓝 a)

If a number a is less than or equal to the liminf of a function f at some filter and is greater than or equal to the limsup of f, then f tends to a along this filter.

theorem order_topology_of_nhds_abs {α : Type u_1}  :
(∀ (a : α), 𝓝 a = ⨅ (r : α) (H : r > 0), 𝓟 {b : α | abs (a - b) < r})

theorem tendsto_abs_at_top_at_top {α : Type u}  :

$\lim_{x\to+\infty}|x|=+\infty$

theorem linear_ordered_add_comm_group.tendsto_nhds {α : Type u} {β : Type u_1} (f : β → α) (x : filter β) (a : α) :
(𝓝 a) ∀ (ε : α), ε > 0(∀ᶠ (b : β) in x, abs (f b - a) < ε)

Here is a counter-example to a version of the following with conditionally_complete_lattice α. Take α = [0, 1) → ℝ with the natural lattice structure, ι = ℕ. Put f n x = -x^n. Then ⨆ n, f n = 0 while none of f n is strictly greater than the constant function -0.5`.

theorem tendsto_at_top_csupr {ι : Type u_1} {α : Type u_2} [preorder ι] {f : ι → α} :
(𝓝 (⨆ (i : ι), f i))

theorem tendsto_at_top_cinfi {ι : Type u_1} {α : Type u_2} [preorder ι] {f : ι → α} :
(∀ ⦃i j : ι⦄, i jf j f i) (𝓝 (⨅ (i : ι), f i))

theorem tendsto_at_top_supr {ι : Type u_1} {α : Type u_2} [preorder ι] {f : ι → α} :
(𝓝 (⨆ (i : ι), f i))

theorem tendsto_at_top_infi {ι : Type u_1} {α : Type u_2} [preorder ι] {f : ι → α} :
(∀ ⦃i j : ι⦄, i jf j f i) (𝓝 (⨅ (i : ι), f i))

theorem tendsto_of_monotone {ι : Type u_1} {α : Type u_2} [preorder ι] {f : ι → α} :
∃ (l : α), (𝓝 l))

theorem supr_eq_of_tendsto {α : Type u_1} {β : Type u_2} [nonempty β] {f : β → α} {a : α} :
(𝓝 a)supr f = a

theorem infi_eq_of_tendsto {β : Type v} {α : Type u_1} [nonempty β] {f : β → α} {a : α} :
(∀ (n m : β), n mf m f n) (𝓝 a)infi f = a

theorem tendsto_inv_nhds_within_Ioi {α : Type u} {a : α} :

theorem tendsto_neg_nhds_within_Ioi {α : Type u} {a : α} :

theorem tendsto_inv_nhds_within_Iio {α : Type u} {a : α} :

theorem tendsto_neg_nhds_within_Iio {α : Type u} {a : α} :

theorem tendsto_inv_nhds_within_Ioi_inv {α : Type u} {a : α} :
(𝓝[] a)

theorem tendsto_neg_nhds_within_Ioi_neg {α : Type u} {a : α} :
(𝓝[] a)

theorem tendsto_inv_nhds_within_Iio_inv {α : Type u} {a : α} :
(𝓝[] a)

theorem tendsto_neg_nhds_within_Iio_neg {α : Type u} {a : α} :
(𝓝[] a)

theorem tendsto_inv_nhds_within_Ici {α : Type u} {a : α} :

theorem tendsto_neg_nhds_within_Ici {α : Type u} {a : α} :

theorem tendsto_inv_nhds_within_Iic {α : Type u} {a : α} :

theorem tendsto_neg_nhds_within_Iic {α : Type u} {a : α} :

theorem tendsto_neg_nhds_within_Ici_neg {α : Type u} {a : α} :
(𝓝[] a)

theorem tendsto_inv_nhds_within_Ici_inv {α : Type u} {a : α} :
(𝓝[] a)

theorem tendsto_neg_nhds_within_Iic_neg {α : Type u} {a : α} :
(𝓝[] a)

theorem tendsto_inv_nhds_within_Iic_inv {α : Type u} {a : α} :
(𝓝[] a)

theorem nhds_left_sup_nhds_right {α : Type u} (a : α) [linear_order α] :

theorem nhds_left'_sup_nhds_right {α : Type u} (a : α) [linear_order α] :

theorem nhds_left_sup_nhds_right' {α : Type u} (a : α) [linear_order α] :

theorem continuous_at_iff_continuous_left_right {α : Type u} {β : Type v} [linear_order α] {a : α} {f : α → β} :
a a

theorem continuous_on_Icc_extend_from_Ioo {α : Type u} {β : Type v} [linear_order α] {f : α → β} {a b : α} {la lb : β} :
a < b (set.Ioo a b) (𝓝[] a) (𝓝 la) (𝓝[] b) (𝓝 lb)continuous_on (extend_from (set.Ioo a b) f) (set.Icc a b)

theorem eq_lim_at_left_extend_from_Ioo {α : Type u} {β : Type v} [linear_order α] [t2_space β] {f : α → β} {a b : α} {la : β} :
a < b (𝓝[] a) (𝓝 la)extend_from (set.Ioo a b) f a = la

theorem eq_lim_at_right_extend_from_Ioo {α : Type u} {β : Type v} [linear_order α] [t2_space β] {f : α → β} {a b : α} {lb : β} :
a < b (𝓝[] b) (𝓝 lb)extend_from (set.Ioo a b) f b = lb

theorem continuous_on_Ico_extend_from_Ioo {α : Type u} {β : Type v} [linear_order α] {f : α → β} {a b : α} {la : β} :
a < b (set.Ioo a b) (𝓝[] a) (𝓝 la)continuous_on (extend_from (set.Ioo a b) f) (set.Ico a b)