Chapter 01 — Background
Proofs omitted. Hover over highlighted terms to see their Lean types.
Text 1.0.1
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Pointwise addition of two subsets of an additive commutative group is the set of all pairwise sums.
open Set
open scoped Pointwise
universe u
variable {X : Type u} [AddCommGroup X]
theorem pointwise_add_eq_setOf_add (C D : Set X) :
C + D = {x | ∃ c ∈ C, ∃ d ∈ D, c + d = x}Text 1.0.2
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.2 (1): A subset of a real vector space is a cone when it equals its set of positive real multiples.
open Set
open scoped Pointwise
universe u
variable {X : Type u} [AddCommGroup X] [Module ℝ X]
def IsCone (C : Set X) : Prop :=
C = (Ioi (0 : ℝ) : Set ℝ) • CText 1.0.3
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.3: a subset of a real vector space is the nonempty carrier of a real affine subspace exactly when it is nonempty and equal to its affine span.
open scoped Pointwise
universe u
namespace Set
variable {X : Type u} [AddCommGroup X] [Module ℝ X]
theorem exists_nonempty_affineSubspace_iff_nonempty_eq_affineSpan (C : Set X) :
(∃ S : AffineSubspace ℝ X, (S : Set X) = C ∧ (S : Set X).Nonempty) ↔
C.Nonempty ∧ (affineSpan ℝ C : Set X) = CText 1.0.4
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.4 (1): the span of C is the intersection of all linear subspaces of X containing C.
open Set
universe u
variable {X : Type u} [AddCommGroup X] [Module ℝ X]
theorem span_eq_sInf_submodule (C : Set X) :
Submodule.span ℝ C = sInf {S : Submodule ℝ X | C ⊆ S}Text 1.0.5
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.5: if C is a nonempty affine subspace of a real vector space, then the textbook difference set C - C is the carrier of the canonical direction subspace C.direction, and C is the translate of this direction through any point of C.
universe u
open Set
open AffineSubspace
variable {X : Type u} [AddCommGroup X] [Module ℝ X]
theorem text_1_0_5 (C : AffineSubspace ℝ X) (hC : (C : Set X).Nonempty) :
(C.direction : Set X) = (C : Set X) -ᵥ (C : Set X) ∧
∀ ⦃x : X⦄, x ∈ C → (C : Set X) = (fun v ↦ v +ᵥ x) '' (C.direction : Set X)Text 1.0.6
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.6 (1): The closed line segment [x,y] in a real vector space is mathlib's segment ℝ x y.
open Set
universe u
variable {X : Type u} [AddCommGroup X] [Module ℝ X]
recall segmentText 1.0.7
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.7: the half-open segment ]x,y] coincides with the half-open segment [y,x[.
universe u
open Set
variable {X : Type u} [AddCommGroup X] [Module ℝ X]
theorem text_1_0_7 (x y : X) :
openClosedSegment x y = closedOpenSegment y xText 1.0.8
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.8: a set-valued operator from X to Y is canonically just a map X → Set Y.
universe u v
variable (X : Type u) (Y : Type v)
#check X → Set YText 1.0.9
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.9: The image A(C) of a set C under a set-valued operator A is the union of the value sets A x for x ∈ C.
universe u v w
namespace SetValuedOperator
variable {X : Type u} {Y : Type v} {Z : Type w}
def image (A : SetValuedOperator X Y) (C : Set X) : Set Y := ⋃ x ∈ C, A xText 1.0.10
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.10: The domain of a set-valued operator A is the set of points x for which A x is nonempty.
universe u v
namespace SetValuedOperator
variable {X : Type u} {Y : Type v}
def dom (A : SetValuedOperator X Y) : Set X := { x | (A x).Nonempty }Text 1.0.11
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.11: The inverse of a set-valued operator is the operator obtained by reversing its graph, equivalently by sending u : Y to the set of x : X such that u ∈ A x.
universe u v
namespace SetValuedOperator
variable {X : Type u} {Y : Type v}
def inverse (A : SetValuedOperator X Y) : SetValuedOperator Y X := fun u ↦ { x | u ∈ A x }Text 1.0.12
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.12 (1): the domain of the inverse of a set-valued operator is the range of the original operator.
universe u v
namespace SetValuedOperator
variable {X : Type u} {Y : Type v}
@[simp] theorem dom_inverse (A : SetValuedOperator X Y) :
A.inverse.dom = A.rangeText 1.0.13
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.13: a set-valued operator is at most single-valued when each value set has at most one element, equivalently when every value over its domain is a singleton.
universe u v
namespace SetValuedOperator
variable {X : Type u} {Y : Type v}
def IsAtMostSingleValued (A : SetValuedOperator X Y) : Prop :=
∀ x, (A x).SubsingletonText 1.0.14
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.14: a selection of A is an operator T : A.dom → Y such that T x ∈ A x for every x ∈ A.dom.
universe u v
namespace SetValuedOperator
variable {X : Type u} {Y : Type v}
variable {A : SetValuedOperator X Y}
abbrev Selection (A : SetValuedOperator X Y) : Type (max u v) := ∀ x : A.dom, A xText 1.0.15
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.15: the image T(C) of a subset C ⊆ X under a single-valued map T : X → Y is the canonical set-theoretic construction Set.image T C.
universe u v
variable {X : Type u} {Y : Type v}
theorem image_eq_set_image (T : X → Y) (C : Set X) :
T '' C = Set.image T CText 1.0.16
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.16: for set-valued operators A B : X → Set Y and a real scalar c (λ in the text), the linear combination A + λ B is the pointwise operator satisfying (A + c • B) x = A x + c • B x.
open scoped Pointwise
universe u v
namespace SetValuedOperator
variable {X : Type u} {Y : Type v} [AddCommGroup Y] [Module ℝ Y]
@[simp] theorem add_smul_apply (A B : SetValuedOperator X Y) (c : ℝ) (x : X) :
(A + c • B) x = A x + c • B xText 1.0.17
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.17 (1): the graph of the pointwise linear combination A + λ B consists of the pairs (x, u + λ • v) coming from matching graph points of A and B.
open scoped Pointwise
universe u v
namespace SetValuedOperator
variable {X : Type u} {Y : Type v} [AddCommGroup Y] [Module ℝ Y]
theorem graph_add_smul (A B : SetValuedOperator X Y) (r : ℝ) :
(A + r • B).graph =
{ xw | ∃ u v, (xw.1, u) ∈ A.graph ∧ (xw.1, v) ∈ B.graph ∧ xw.2 = u + r • v }Text 1.0.18
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.18: an operator between real scalar-action spaces is positively homogeneous when it commutes with scalar multiplication by every positive real scalar.
universe u v
def PositivelyHomogeneous {X : Type u} {Y : Type v} [SMul ℝ X] [SMul ℝ Y] (T : X → Y) : Prop :=
∀ ⦃a : ℝ⦄, 0 < a → ∀ x : X, T (a • x) = a • T xText 1.0.19
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.19: affine mappings between real vector spaces are the canonical affine maps X →ᵃ[ℝ] Y.
universe u v
theorem affineMap_notation_eq (X : Type u) (Y : Type v) [AddCommGroup X] [Module ℝ X]
[AddCommGroup Y] [Module ℝ Y] :
(X →ᵃ[ℝ] Y) = AffineMap ℝ X YText 1.0.20
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.20: a map between real vector spaces is affine, in the canonical sense of arising from an element of X →ᵃ[ℝ] Y, exactly when its translate through the origin, x ↦ T x - T 0, is linear.
universe u v
variable {X : Type u} {Y : Type v} [AddCommGroup X] [Module ℝ X]
[AddCommGroup Y] [Module ℝ Y]
theorem affine_iff_isLinearMap_sub_apply_zero (T : X → Y) :
(∃ A : X →ᵃ[ℝ] Y, (A : X → Y) = T) ↔
IsLinearMap ℝ (fun x : X ↦ T x - T 0)Text 1.0.21
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.21: The translation of a set-valued operator A by y sends x to the value of A at x - y.
universe u v
namespace SetValuedOperator
variable {X : Type u} {Y : Type v} [AddGroup X]
def translate (A : SetValuedOperator X Y) (y : X) : SetValuedOperator X Y :=
fun x ↦ A (x - y)Text 1.0.22
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.22: the textbook notion of a directed set is exactly a nonempty type equipped with a reflexive, transitive, and directed relation, equivalently a nonempty type with a directed preorder relation.
universe u
theorem isDirectedSet_iff {α : Type u} {r : α → α → Prop} :
(Nonempty α ∧ Std.Refl r ∧ IsTrans α r ∧ IsDirected α r) ↔
Nonempty α ∧ IsPreorder α r ∧ IsDirected α rText 1.0.23
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.23: once the directed-set structure on the index type is fixed in the ambient context, a net in X indexed by A is formalized by the canonical function type A → X. The textbook's nonemptiness assumption on X does not affect this underlying data.
universe u v
variable (A : Type u) (X : Type v)
#check A → XText 1.0.24
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
A net is eventually in Y exactly when all sufficiently large indices map into Y.
universe u v
namespace Net
variable {A : Type u} {X : Type v} [Preorder A] [IsDirectedOrder A] [Nonempty A]
theorem eventuallyIn_iff_exists_forall_ge_mem (x : A → X) (Y : Set X) :
(∀ᶠ a in Filter.atTop, x a ∈ Y) ↔ ∃ a : A, ∀ b ≥ a, x b ∈ YText 1.0.25
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.25: a net y is a subnet of a net x via k exactly when the textbook reindexing-and-cofinality condition holds, equivalently when y = x ∘ k and k tends to atTop.
open Filter
universe u v w
namespace Net
variable {X : Type u} {A : Type v} {B : Type w}
theorem isSubnetOfVia_iff [Preorder A] [Preorder B] [IsDirectedOrder A] [IsDirectedOrder B]
[Nonempty B] {x : A → X} {y : B → X} {k : B → A} :
(y = x ∘ k ∧ ∀ a : A, ∃ d : B, ∀ b : B, d ≤ b → a ≤ k b) ↔
y = x ∘ k ∧ Tendsto k atTop atTopText 1.0.26
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.26: the extended real line is formalized by the canonical type EReal of real numbers with adjoined bottom and top elements ⊥ and ⊤, equipped with the extended order; the textbook's conventions about indeterminate arithmetic expressions are handled separately when needed.
recall EReal : TypeText 1.0.27
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.27: the extended interval ]ξ, +∞] is the usual real interval ]ξ, +∞[, embedded into EReal, with the point +∞ adjoined.
open Set
namespace EReal
theorem openClosedUpperInfiniteInterval_eq_image_Ioi_union_top (ξ : ℝ) :
Ioi (ξ : EReal) = Real.toEReal '' Ioi ξ ∪ ({(⊤ : EReal)} : Set EReal)Text 1.0.28
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.28: for a set S of extended reals, the canonical complete-lattice infimum sInf S is its infimum, i.e. the greatest lower bound of S; this is exactly the EReal specialization of the standard theorem isGLB_sInf.
recall isGLB_sInf {α : Type*} [CompleteSemilatticeInf α] (s : Set α) : IsGLB s (sInf s)Text 1.0.29
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.29: for an extended-real-valued net indexed by a nonempty directed set, the limit inferior is the supremum of the infima of the tails and the limit superior is the infimum of the suprema of the tails.
open Filter
universe u
namespace Net
variable {A : Type u} [Preorder A] [IsDirectedOrder A]
theorem tail_liminf_limsup_formulas [Nonempty A] (ξ : A → EReal) :
Filter.liminf ξ atTop = sSup (Set.range fun a : A ↦ sInf (ξ '' Set.Ici a)) ∧
Filter.limsup ξ atTop = sInf (Set.range fun a : A ↦ sSup (ξ '' Set.Ici a))Text 1.0.30
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.30: for an EReal-valued net on a nonempty directed index set, the lower limit is bounded above by the upper limit.
open Filter
universe u
namespace Net
variable {A : Type u} [Nonempty A] [Preorder A] [IsDirectedOrder A]
theorem liminf_le_limsup (ξ : A → EReal) :
liminf ξ atTop ≤ limsup ξ atTopText 1.0.31
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.31: the effective domain of an extended-real-valued function is the set of points at which the function takes a finite value. Equivalently, it is the preimage of the open interval Ioo ⊥ ⊤, i.e. the points where the value is neither +∞ nor -∞.
universe u
namespace ERealFunction
variable {X : Type u}
def effectiveDom (f : X → EReal) : Set X :=
f ⁻¹' Set.Ioo (⊥ : EReal) ⊤Text 1.0.32
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.32: addition on EReal with the textbook convention that the indeterminate sums +∞ + -∞ and -∞ + +∞ are assigned the value +∞.
universe u
namespace EReal
variable {X : Type u}
def sumWithTopBotAsTop : EReal → EReal → ERealText 1.0.33
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.33: the effective domain of the textbook pointwise sum of two extended-real-valued functions is the intersection of their effective domains.
universe u
open EReal
namespace ERealFunction
variable {X : Type u}
theorem effectiveDom_pointwiseSum_eq_inter (f g : X → EReal) :
effectiveDom (pointwiseSum f g) = effectiveDom f ∩ effectiveDom gText 1.0.34
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.34: a topology on a type X is the canonical structure TopologicalSpace X, encoding the empty set, the whole space, arbitrary unions, and finite intersections of open sets; a topological space is therefore a type equipped with an instance of TopologicalSpace X, and the associated notions of open and closed sets are IsOpen and IsClosed.
universe u
recall TopologicalSpace (X : Type u) : Type uText 1.0.35
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.35: for a topological space X and a point x : X, the family 𝓥(x) of neighborhoods of x is formalized by the neighborhood filter nhds x.
universe u
recall nhds {X : Type u} [TopologicalSpace X] (x : X) : Filter XText 1.0.36
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.36: a base of a topology on X is formalized by the canonical predicate TopologicalSpace.IsTopologicalBasis B, expressing that B is a family of open sets whose members locally refine every neighborhood.
universe u
recall TopologicalSpace.IsTopologicalBasis {X : Type u} [TopologicalSpace X] (B : Set (Set X)) :
PropText 1.0.37
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.37: if B is a basis for the topology on X, then every open set is the union of the basis sets contained in it. This is the canonical theorem TopologicalSpace.IsTopologicalBasis.open_eq_sUnion'.
universe u
namespace TopologicalSpace
variable {X : Type u} [TopologicalSpace X]
recall IsTopologicalBasis.open_eq_sUnion'Text 1.0.38
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.38: equivalently, a point lies in interior C exactly when C contains a neighborhood of that point.
open Filter Topology
universe u
theorem mem_interior_iff_exists_mem_nhds_subset {X : Type u} [TopologicalSpace X] {x : X}
{C : Set X} : x ∈ interior C ↔ ∃ V : Set X, V ∈ 𝓝 x ∧ V ⊆ CText 1.0.39
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.39: for a subset C of a topological space, the closure of C is the canonical set closure C, namely the smallest closed set containing C.
universe u
recall closure {X : Type u} [TopologicalSpace X] (C : Set X) : Set XText 1.0.40
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.40: the boundary bdry C of a subset C of a topological space is formalized by the canonical set frontier C.
universe u
recall frontier {X : Type u} [TopologicalSpace X] (C : Set X) : Set XText 1.0.41
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.41: if B₁ and B₂ are bases for the given topologies on X₁ and X₂, then the family of rectangles U ×ˢ V with U ∈ B₁ and V ∈ B₂ is a basis for the product topology on X₁ × X₂. This is the textbook set-builder form of the canonical theorem TopologicalSpace.IsTopologicalBasis.prod.
universe u v
namespace TopologicalSpace
variable {X₁ : Type u} [TopologicalSpace X₁]
variable {X₂ : Type v} [TopologicalSpace X₂]
theorem IsTopologicalBasis.rectangles {B₁ : Set (Set X₁)} {B₂ : Set (Set X₂)}
(h₁ : IsTopologicalBasis B₁) (h₂ : IsTopologicalBasis B₂) :
IsTopologicalBasis {s : Set (X₁ × X₂) | ∃ U ∈ B₁, ∃ V ∈ B₂, s = U ×ˢ V}Text 1.0.42
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.42: a Hausdorff topological space is formalized by the canonical predicate T2Space X, expressing that distinct points admit disjoint neighborhoods.
universe u
recall T2Space {X : Type u} [TopologicalSpace X] : PropText 1.0.43
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.43: in the Hausdorff setting of the text, compactness of a subset C is formalized by the canonical predicate IsCompact C.
universe u
recall IsCompact {X : Type u} [TopologicalSpace X] (C : Set X) : PropText 1.0.44
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.44: a net ξ converges to x exactly when it is eventually contained in every neighborhood of x; in mathlib this convergence is expressed by Tendsto ξ atTop (nhds x).
universe u v
open Filter
variable {A : Type u} [Preorder A] [IsDirectedOrder A] [Nonempty A]
variable {X : Type v} [TopologicalSpace X]
theorem tendsto_atTop_nhds_iff_forall_exists_forall_ge_mem (ξ : A → X) (x : X) :
Tendsto ξ atTop (nhds x) ↔
∀ V ∈ nhds x, ∃ b, ∀ a ≥ b, ξ a ∈ VText 1.0.45
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.45: for a net ξ : A → X, the canonical predicate MapClusterPt x Filter.atTop ξ means that every neighborhood of x is visited arbitrarily far out in the directed index set.
universe u v
variable {A : Type u} [Nonempty A] [Preorder A] [IsDirectedOrder A]
variable {X : Type v} [TopologicalSpace X]
theorem mapClusterPt_atTop_iff_forall_forall_exists_ge_mem_nhds (ξ : A → X) (x : X) :
MapClusterPt x Filter.atTop ξ ↔
∀ V : Set X, V ∈ nhds x → ∀ b : A, ∃ a : A, b ≤ a ∧ ξ a ∈ VText 1.0.46
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.46: A point x is a sequential cluster point of a sequence u if some subsequence of u converges to x.
open Filter
open scoped Topology
universe u
variable {X : Type u} [TopologicalSpace X]
def IsSequentialClusterPt (u : ℕ → X) (x : X) : Prop :=
∃ φ : ℕ → ℕ, StrictMono φ ∧ Tendsto (u ∘ φ) atTop (𝓝 x)Text 1.0.47
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.47: a point x is a cluster point of a net u iff there is a subnet, given by a monotone cofinal reindexing map, whose reindexed net converges to x.
universe u v w
open Filter
theorem mapClusterPt_atTop_iff_exists_subnet_tendsto {X : Type u} [TopologicalSpace X]
{A : Type v} [Nonempty A] [Preorder A] [IsDirectedOrder A] {u : A → X} {x : X} :
MapClusterPt x atTop u ↔
∃ (B : Type (max u v)) (_ : Nonempty B) (_ : Preorder B) (_ : IsDirectedOrder B)
(φ : B → A),
Monotone φ ∧ Tendsto φ atTop atTop ∧ Tendsto (u ∘ φ) atTop (nhds x)Text 1.0.48
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.48: the usual topology on ℝ has as a basis the family of open intervals (a, b) with a < b.
open Set TopologicalSpace
theorem real_isTopologicalBasis_Ioo :
TopologicalSpace.IsTopologicalBasis { s : Set ℝ | ∃ a b, a < b ∧ s = Ioo a b }Text 1.0.49
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.49: the canonical topology on the extended real line EReal has as a basis the family of all embedded real open intervals (a, b) together with the lower rays [-∞, ξ) and the upper rays (ξ, +∞], represented in Lean by Ioo (a : EReal) (b : EReal), Iio (ξ : EReal), and Ioi (ξ : EReal).
open Set
open scoped Topology
namespace EReal
theorem realIntervalRayBasis_isTopologicalBasis :
TopologicalSpace.IsTopologicalBasis realIntervalRayBasisText 1.0.50
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.50 (1): the real line with its usual metric topology is Hausdorff.
theorem real_t2Space : T2Space ℝText 1.0.51
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.51: the extended real line EReal = [-∞, +∞], equipped with its canonical order topology, is compact. The textbook description by real intervals together with rays at ⊥ and ⊤ describes this same topology.
theorem extendedReal_compactSpace : CompactSpace ERealText 1.0.53.1.33
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.53 (1.33): the source’s notion of lower semicontinuity at a point is the canonical predicate LowerSemicontinuousAt; the textbook’s extended-real-valued case is a specialization of this mathlib definition.
open Filter
open scoped Topology
universe u v
recall LowerSemicontinuousAt
{X : Type u} {Y : Type v} [TopologicalSpace X] [Preorder Y] (f : X → Y) (x : X) : PropText 1.0.54
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.54 (1): an extended-real-valued function is lower semicontinuous on the whole space exactly when it is lower semicontinuous at every point.
universe u v
open Filter
open scoped Topology
theorem lowerSemicontinuous_iff_forall_lowerSemicontinuousAt
{X : Type u} [TopologicalSpace X] {f : X → EReal} :
LowerSemicontinuous f ↔ ∀ x, LowerSemicontinuousAt f xText 1.0.55
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.55: the points where an EReal-valued function takes a real value and is continuous are exactly the points in its effective domain at which it is continuous.
universe u
namespace ERealFunction
variable {X : Type u} [TopologicalSpace X]
theorem mem_effectiveDom_inter_continuousAt_iff_exists_real (f : X → EReal) (x : X) :
x ∈ effectiveDom f ∩ {y | ContinuousAt f y} ↔
(∃ r : ℝ, f x = (r : EReal)) ∧ ContinuousAt f xText 1.0.56.1.36
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.56 (1.36): the limit inferior of an extended-real-valued function f at x is the filter liminf of f along the neighborhood filter nhds x.
open Filter
universe u
namespace ERealFunction
variable {X : Type u} [TopologicalSpace X]
noncomputable abbrev liminfAt (f : X → EReal) (x : X) : EReal :=
liminf f (nhds x)Text 1.0.57
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.57: for a topological space X and a subset C ⊆ X, the extended-real indicator ν_C, equal to 0 on C and +∞ on Cᶜ, is lower semicontinuous if and only if C is closed.
universe u
open Set
theorem lowerSemicontinuous_indicator_compl_top_iff_isClosed
{X : Type u} [TopologicalSpace X] (C : Set X) :
LowerSemicontinuous (indicator Cᶜ fun _ : X ↦ (⊤ : EReal)) ↔ IsClosed CText 1.0.58
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.58: for a subset C of a Hausdorff topological space, being sequentially closed is formalized by the canonical predicate IsSeqClosed C, meaning that every convergent sequence in C has its limit in C. The separation assumption is not needed for this definition.
universe u
open Filter
open scoped Topology
recall IsSeqClosedText 1.0.59
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.59: if C is a closed subset of a topological space X, then C is sequentially closed; equivalently, every sequence in C converging to x has limit x ∈ C.
recall IsClosed.isSeqClosedText 1.0.60
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.60: a topological space is sequential exactly when every sequentially closed subset is closed, so closedness and sequential closedness coincide. This is the canonical class SequentialSpace.
recall SequentialSpaceText 1.0.61
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.61: for an extended-real-valued function on a sequential topological space, lower semicontinuity is equivalent to sequential lower semicontinuity, meaning that every convergent sequence satisfies the liminf inequality at its limit.
universe u
open Filter
variable {X : Type u} [TopologicalSpace X] [SequentialSpace X]
theorem lowerSemicontinuous_iff_forall_seq_tendsto_le_liminf (f : X → EReal) :
LowerSemicontinuous f ↔
∀ ⦃x : X⦄ ⦃u : ℕ → X⦄,
Tendsto u atTop (nhds x) → f x ≤ liminf (f ∘ u) atTopText 1.0.62
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.62: a topological space is sequential if and only if every map from it to an arbitrary topological space is continuous exactly when it is sequentially continuous.
universe u
open Filter
variable {X : Type u} [TopologicalSpace X]
theorem sequentialSpace_iff_forall_continuous_iff_seqContinuous :
SequentialSpace X ↔
∀ ⦃Y : Type*⦄ [TopologicalSpace Y] (f : X → Y), Continuous f ↔ SeqContinuous fText 1.0.63
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.63: for a subset C of a metric space X, the diameter is the canonical extended diameter Metric.ediam C, and the distance function to C, with value ∞ when C = ∅, is the canonical extended infimum-edistance map fun x ↦ Metric.infEDist x C.
universe u
recall Metric.ediam {α : Type u} [PseudoEMetricSpace α] (s : Set α) : ENNRealText 1.0.64
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.64: in a metric space, the open ball of center x and positive radius ρ is the canonical set Metric.ball x ρ; the closed ball and the open-ball description of the induced metric topology are recalled by the companion canonical API below.
universe u
recall Metric.ball {α : Type u} [PseudoMetricSpace α] (x : α) (ε : ℝ) : Set αText 1.0.65
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.65: a topological space is metrizable when there exists a metric on the space whose induced topology coincides with the given topology, formalized by the canonical predicate TopologicalSpace.MetrizableSpace.
universe u
recall TopologicalSpace.MetrizableSpace (X : Type u) [TopologicalSpace X] : PropText 1.0.66
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.66: in a metric space, convergence of a sequence to a point is expressed by the canonical filter-theoretic notion Tendsto u atTop (nhds x).
universe u v
open Filter
variable {X : Type u} [MetricSpace X]
recall TendstoText 1.0.67
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.67: a sequence in a metric space is Cauchy when it is formalized by the canonical predicate CauchySeq; the usual metric-space distance criterion and the textbook sequential formulation of completeness are recorded below as companion statements.
universe u v
open Filter
variable {X : Type u} [MetricSpace X]
recall CauchySeq {α : Type u} {β : Type v} [UniformSpace α] [Preorder β] (u : β → α) : PropText 1.0.68
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.68: a subset of a topological space, and hence in particular of a Hausdorff space, is called a G_δ set when it is a countable intersection of open sets, formalized by the canonical predicate IsGδ.
universe u
recall IsGδ {X : Type u} [TopologicalSpace X] (s : Set X) : PropText 1.0.69
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Text 1.0.69: for an operator T : X → X, the textbook fixed point set Fix T is the canonical mathlib set Function.fixedPoints T.
universe u
recall Function.fixedPoints {α : Type u} (T : α → α) : Set αFact 1.1
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Fact 1.1 (Zorn's lemma): if every chain in a preorder has an upper bound, then there exists a maximal element.
universe u
theorem fact_1_1 {α : Type u} [Preorder α]
(h : ∀ c : Set α, IsChain (fun a b : α ↦ a ≤ b) c → BddAbove c) :
∃ m : α, IsMax mRemark 1.3
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Remark 1.3 (1): the textbook ray [0,+∞[ is the closed ray Set.Ici 0.
open Set
theorem positiveReals_eq_Ici : {ξ : ℝ | 0 ≤ ξ} = Ici 0Definition 1.4
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Definition 1.4: an extended-real-valued function is proper when it never attains -∞ and its domain is nonempty.
universe u
namespace ERealFunction
variable {X : Type u}
def IsProper (f : X → EReal) : Prop :=
(∀ x, f x ≠ ⊥) ∧ (dom f).NonemptyLemma 1.6
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Lemma 1.6 (1): the epigraph of the pointwise supremum of a family of extended-real-valued functions is the intersection of the epigraphs of the family members.
open Set
universe u v
namespace ERealFunction
-- Proof sketch: extensionality on pairs `(x, ξ)` reduces the claim to the order fact
-- `iSup_le_iff`, which says `⨆ i, f i x ≤ ξ` iff `∀ i, f i x ≤ ξ`.
theorem epigraph_iSup {X : Type u} {I : Type v} (f : I → X → EReal) :
epigraph (⨆ i, f i) = ⋂ i, epigraph (f i)Definition 1.7
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Definition 1.7 (1): the infimum of an extended-real-valued function over a set is the infimum of its image on that set, namely sInf (f '' C).
open Set
universe u
namespace ERealFunction
variable {X : Type u}
theorem isGLB_sInf_image (f : X → EReal) (C : Set X) :
IsGLB (f '' C) (sInf (f '' C))Definition 1.8
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Definition 1.8: a sequence in the domain of an extended-real-valued function is minimizing when its function values converge to the infimum of the image of the function.
open Filter
universe u
namespace ERealFunction
variable {X : Type u}
def IsMinimizingSequence (f : X → EReal) (x : ℕ → X) : Prop :=
(∀ n : ℕ, x n ∈ dom f) ∧ Tendsto (f ∘ x) atTop (nhds (sInf (Set.range f)))Fact 1.9
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Fact 1.9 in textbook subnet form: a monotone cofinal reindexing preserves the limit of a convergent net.
open Filter
universe u v w
variable {A : Type u} {B : Type v} {X : Type w}
variable [Preorder A] [Preorder B] [TopologicalSpace X]
variable {x : A → X} {k : B → A} {x₀ : X}
theorem subnet_tendsto_same_limit_of_monotone_cofinal
(hx : Tendsto x atTop (nhds x₀)) (hk_mono : Monotone k)
(hk_cofinal : ∀ a₀ : A, ∃ b₀ : B, ∀ b : B, b₀ ≤ b → a₀ ≤ k b) :
Tendsto (x ∘ k) atTop (nhds x₀)Lemma 1.10
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Lemma 1.10: a point belongs to the closure of a subset C exactly when there exists a nonempty directed net with values in C that converges to that point.
universe u
open Filter
theorem mem_closure_iff_exists_net_tendsto {X : Type u} [TopologicalSpace X] {C : Set X} {x : X} :
x ∈ closure C ↔
∃ (A : Type u) (_ : Preorder A) (_ : IsDirectedOrder A) (_ : Nonempty A)
(ξ : A → C), Tendsto (fun a ↦ (ξ a : X)) atTop (nhds x)Fact 1.11
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Fact 1.11: for a subset C of a Hausdorff topological space, compactness, the closed-set finite-intersection property relative to C, the existence of cluster points for all nets in C, and the existence of convergent subnets for all nets in C are equivalent.
open Filter
open scoped Topology
universe u v w
variable {X : Type u} [TopologicalSpace X]
theorem isCompact_tfae [T2Space X] (C : Set X) :
List.TFAE [
IsCompact C,
ClosedSetFiniteIntersectionPropertyIn C,
EveryNetHasClusterPointIn C,
EveryNetHasConvergentSubnetIn C
]Lemma 1.12
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Lemma 1.12: a compact subset of a Hausdorff topological space is closed.
universe u
theorem isClosed_of_isCompact
{X : Type u} [TopologicalSpace X] [T2Space X] {C : Set X} :
IsCompact C → IsClosed CLemma 1.14
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Lemma 1.14: if a net in a compact subset of a Hausdorff space has x as its unique cluster point, then the net converges to x.
universe u v
open Filter
theorem tendsto_of_unique_cluster_point_on_compact {X : Type u} [TopologicalSpace X] [T2Space X]
{A : Type v} [Preorder A] [IsDirectedOrder A] {C : Set X} (hC : IsCompact C) {ξ : A → X}
(hξC : ∀ a, ξ a ∈ C) {x : X} (_hx : MapClusterPt x atTop ξ)
(hunique : ∀ y : X, MapClusterPt y atTop ξ → y = x) :
Tendsto ξ atTop (nhds x)Fact 1.15
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Fact 1.15 (1): the net of tail infima of an extended-real-valued net converges to its limit inferior.
open Filter
universe u
namespace Net
variable {A : Type u} [Nonempty A] [Preorder A] [IsDirectedOrder A]
theorem tendsto_tailInf_liminf (ξ : A → EReal) :
Tendsto (fun a ↦ sInf (ξ '' Set.Ici a)) atTop (nhds (Filter.liminf ξ atTop))Lemma 1.16
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Lemma 1.16: if two extended-real-valued nets have lower limits strictly above -∞, then the sum of their lower limits is bounded above by the lower limit of their pointwise sum.
universe u
open Filter
namespace Net
variable {A : Type u} [Preorder A]
theorem le_liminf_add [IsDirectedOrder A] (ξ η : A → EReal)
(_hξ : (⊥ : EReal) < liminf ξ atTop) (_hη : (⊥ : EReal) < liminf η atTop) :
liminf ξ atTop + liminf η atTop ≤ liminf (ξ + η) atTopDefinition 1.17
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Definition 1.17: continuity of a map f : X → Y at a point x : X is formalized by the canonical predicate ContinuousAt f x; global continuity is formalized by Continuous f.
recall ContinuousAtFact 1.18
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Fact 1.18: the basis criterion for continuity is already the canonical mathlib theorem TopologicalSpace.IsTopologicalBasis.continuous_iff. It states that a map between topological spaces is continuous exactly when the preimage of every basis element of the codomain is open.
universe u v
recall TopologicalSpace.IsTopologicalBasis.continuous_iffFact 1.19
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Fact 1.19: a map T : X → Y is continuous at x exactly when it sends every net converging to x to a net converging to T x.
universe u v w
open Filter
theorem continuousAt_iff_tendsto_nets {X : Type u} {Y : Type v} [TopologicalSpace X]
[TopologicalSpace Y] {T : X → Y} {x : X} :
ContinuousAt T x ↔
∀ {A : Type (max u w)} [Preorder A] [IsDirectedOrder A] (ξ : A → X),
Tendsto ξ atTop (nhds x) → Tendsto (T ∘ ξ) atTop (nhds (T x))Lemma 1.20
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Lemma 1.20: if X and Y are Hausdorff spaces, T : X → Y is continuous, and C ⊆ X is compact, then T(C) is compact. This is the textbook Hausdorff-space specialization of the canonical theorem IsCompact.image.
universe u v
theorem lemma_1_20
{X : Type u} {Y : Type v} [TopologicalSpace X] [TopologicalSpace Y] [T2Space X] [T2Space Y]
{C : Set X} {T : X → Y} (hC : IsCompact C) (hT : Continuous T) :
IsCompact (T '' C)Definition 1.21
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Definition 1.21: for an extended-real-valued function f : X → EReal, lower semicontinuity at a point x is the canonical predicate LowerSemicontinuousAt f x, and lower semicontinuity on X is the canonical predicate LowerSemicontinuous f.
recall LowerSemicontinuousAtLemma 1.23
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Lemma 1.23: the limit inferior of f at x is the minimum of the limit inferiors of f along all nets converging to x.
open Filter ERealFunction
universe u v
variable {X : Type u} [TopologicalSpace X] {x : X}
theorem liminfAt_isLeast_netLiminfValues {X : Type u} [TopologicalSpace X]
(f : X → EReal) (x : X) :
IsLeast (netLiminfValuesAt.{u, v} f x) (liminfAt f x)Lemma 1.24
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Lemma 1.24: an extended-real-valued function on a topological space is lower semicontinuous if and only if each of its real lower level sets is closed.
universe u
namespace ERealFunction
variable {X : Type u}
variable [TopologicalSpace X]
theorem lowerSemicontinuous_iff_isClosed_lowerLevelSet (f : X → EReal) :
LowerSemicontinuous f ↔ ∀ ξ : ℝ, IsClosed (lowerLevelSet f ξ)Lemma 1.26
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Lemma 1.26 (1): the extended-real statement in the text is the EReal specialization of the canonical mathlib theorem lowerSemicontinuous_iSup.
universe u v
variable {X : Type u} [TopologicalSpace X]
recall lowerSemicontinuous_iSupLemma 1.27
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Lemma 1.27: a finite positive weighted sum of lower semicontinuous extended-real-valued functions is lower semicontinuous. This formulation is valid on any topological space, hence in particular on a Hausdorff space.
universe u v
open scoped BigOperators
variable {X : Type u} [TopologicalSpace X]
theorem lowerSemicontinuous_weighted_sum
{ι : Type v} [Finite ι] {f : ι → X → EReal} {α : ι → ℝ}
(hα : ∀ i, 0 < α i) (hf : ∀ i, LowerSemicontinuous (f i)) :
let _ : Fintype ι := Fintype.ofFinite ι
LowerSemicontinuous (fun x ↦ ∑ i, ((α i : EReal) * f i x))Lemma 1.28
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Lemma 1.28: composing a lower semicontinuous extended-real-valued function with a continuous map preserves lower semicontinuity.
universe u v
namespace ERealFunction
variable {X : Type u} {Y : Type v} [TopologicalSpace X] [TopologicalSpace Y]
theorem lowerSemicontinuous_comp {f : Y → EReal} {g : X → Y}
(hf : LowerSemicontinuous f) (hg : Continuous g) :
LowerSemicontinuous (f ∘ g)Theorem 1.29
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Theorem 1.29: a lower semicontinuous extended-real-valued function on a Hausdorff space attains a minimum on a compact set as soon as that compact set meets the domain of the function.
universe u
namespace ERealFunction
theorem lowerSemicontinuous_exists_isMinOn_of_isCompact {X : Type u}
[TopologicalSpace X] [T2Space X] {f : X → EReal} {C : Set X}
(hf : LowerSemicontinuous f) (hC : IsCompact C)
(hdom : (C ∩ { x | f x < ⊤ }).Nonempty) :
∃ x ∈ C, IsMinOn f C xLemma 1.30
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Lemma 1.30: over a nonempty compact second factor, the infimum of a lower semicontinuous extended-real-valued function over the second variable is lower semicontinuous, and each fiber section attains its minimum.
universe u v
theorem lowerSemicontinuous_compactRightInfimum_and_exists_isMinOn
{X : Type u} {Y : Type v} [TopologicalSpace X] [TopologicalSpace Y] [CompactSpace Y]
[Nonempty Y] {φ : X × Y → EReal}
(hφ : LowerSemicontinuous φ) :
LowerSemicontinuous (fun x ↦ sInf (Set.range fun y : Y ↦ φ (x, y))) ∧
∀ x : X, ∃ y : Y, IsMinOn (fun y' : Y ↦ φ (x, y')) Set.univ yDefinition 1.31
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Definition 1.31: the lower semicontinuous envelope of f is the supremum, in the function lattice, of all lower semicontinuous extended-real-valued minorants of f.
universe u
open Set
namespace ERealFunction
variable {X : Type u} [TopologicalSpace X]
noncomputable def lowerSemicontinuousEnvelope (f : X → EReal) : X → EReal :=
sSup (lowerSemicontinuousMinorants f)Lemma 1.32
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Lemma 1.32: the lower semicontinuous envelope is the greatest lower semicontinuous minorant of f.
open Set
universe u
namespace ERealFunction
variable {X : Type u}
variable [TopologicalSpace X]
theorem lowerSemicontinuousHull_isGreatest (f : X → EReal) :
IsGreatest {g : X → EReal | LowerSemicontinuous g ∧ g ≤ f}
(lowerSemicontinuousEnvelope f)Definition 1.33
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Definition 1.33: sequential compactness of a subset C of a topological space is formalized by the canonical predicate IsSeqCompact C. In the Hausdorff setting of the textbook, this is exactly the statement that every sequence in C admits a subsequence, indexed by a strictly increasing map, that converges to a point of C.
universe u
recall IsSeqCompact {X : Type u} [TopologicalSpace X] (C : Set X) : PropLemma 1.34
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Lemma 1.34 (1): a sequentially compact subset of a Hausdorff space is sequentially closed.
universe u
variable {X : Type u} [TopologicalSpace X] [T2Space X]
variable {C : Set X}
theorem IsSeqCompact.isSeqClosed (hC : IsSeqCompact C) :
IsSeqClosed CLemma 1.35
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Lemma 1.35: if a sequence in a sequentially compact subset has a unique sequential cluster point, expressed by the canonical predicate IsSequentialClusterPt, then the whole sequence converges to that point.
open Filter
open scoped Topology
universe u
variable {X : Type u} [TopologicalSpace X]
theorem tendsto_of_unique_sequential_cluster_point {C : Set X} (hC : IsSeqCompact C)
{u : ℕ → X} (huC : ∀ n, u n ∈ C) {x : X}
(hunique : ∀ y : X, IsSequentialClusterPt u y → y = x) :
Tendsto u atTop (nhds x)Lemma 1.36
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Lemma 1.36: for an extended-real-valued function on a topological space, sequential lower semicontinuity, sequential closedness of the real-height epigraph, and sequential closedness of every real lower level set are equivalent.
universe u
open Filter ERealFunction
variable {X : Type u} [TopologicalSpace X]
theorem sequentialLowerSemicontinuous_real_epigraph_seqClosed_lowerLevelSet_seqClosed_tfae
(f : X → EReal) :
List.TFAE [
∀ ⦃u : ℕ → X⦄ ⦃x : X⦄, Tendsto u atTop (nhds x) →
f x ≤ liminf (fun n ↦ f (u n)) atTop,
IsSeqClosed (epigraph f),
∀ ξ : ℝ, IsSeqClosed (lowerLevelSet f ξ)
]Fact 1.38
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Fact 1.38: for a map from a metric space to a topological space, continuity is equivalent to sequential continuity; no Hausdorff assumption on the codomain is needed.
universe u v
variable {X : Type u} [MetricSpace X]
variable {Y : Type v} [TopologicalSpace Y]
theorem continuous_iff_seqContinuous_of_metricSpace {f : X → Y} :
Continuous f ↔ SeqContinuous fFact 1.39
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Fact 1.39: a subset of a metric space is compact if and only if it is sequentially compact.
universe u
variable {X : Type u} [MetricSpace X]
theorem isCompact_iff_isSeqCompact_of_metricSpace (C : Set X) :
IsCompact C ↔ IsSeqCompact CLemma 1.40
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Lemma 1.40: if every intersection C ∩ B[z; n] with a closed ball of integer radius n ≥ 1 centered at z is closed, then C itself is closed.
open Metric
universe u
variable {α : Type u} [MetricSpace α]
theorem isClosed_of_isClosed_inter_closedBall_nat (C : Set α) (z : α)
(hC : ∀ n : ℕ, 1 ≤ n → IsClosed (C ∩ closedBall z n)) :
IsClosed CLemma 1.41
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Lemma 1.41: a compact subset of a metric space is closed and bounded.
universe u
variable {X : Type u} [MetricSpace X] {C : Set X}
theorem isClosed_and_isBounded_of_isCompact (hC : IsCompact C) :
IsClosed C ∧ Bornology.IsBounded CLemma 1.42
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Lemma 1.42: in a metric space, the neighborhood-filter limit inferior of f at x is the minimum of the sequential limit inferiors along sequences converging to x.
open Filter
universe u
variable {X : Type u}
theorem liminfAt_isLeast_sequentialLiminfValues [MetricSpace X] (f : X → EReal)
(x : X) : IsLeast (sequentialLiminfValuesAt f x) (liminf f (nhds x))Lemma 1.43
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Lemma 1.43 (Cantor): in a complete metric space, a bounded antitone sequence of nonempty closed sets whose diameters converge to 0 has intersection equal to a singleton.
universe u
open Set Filter
variable {X : Type u} [MetricSpace X]
variable [CompleteSpace X]
theorem exists_eq_singleton_iInter_of_nonempty_isClosed_antitone_diam_tendsto_zero
(C : ℕ → Set X) (hnonempty : ∀ n, (C n).Nonempty) (hclosed : ∀ n, IsClosed (C n))
(hanti : Antitone C) (hbdd : Bornology.IsBounded (C 0))
(hdiam : Tendsto (Metric.diam ∘ C) atTop (nhds 0)) :
∃ x : X, (⋂ n, C n) = {x}Lemma 1.44
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Lemma 1.44 [Ursescu]: specialized to complete metric spaces through their canonical BaireSpace instance, the corrected Baire-category identities for countable unions of closed sets and countable intersections of open sets hold with the necessary closure operators.
universe u
open Set
variable {X : Type u} [MetricSpace X] [CompleteSpace X]
theorem lemma_1_44 :
(∀ C : ℕ → Set X, (∀ n, IsClosed (C n)) →
closure (⋃ n, interior (C n)) = closure (interior (⋃ n, C n))) ∧
∀ U : ℕ → Set X, (∀ n, IsOpen (U n)) →
interior (closure (⋂ n, U n)) = interior (⋂ n, closure (U n))Corollary 1.45
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Corollary 1.45: in a complete metric space, the intersection of a sequence of dense open subsets is again a dense Gδ subset.
universe u
open Set
variable {X : Type u} [MetricSpace X] [CompleteSpace X]
theorem dense_isGδ_iInter_of_dense_open (C : ℕ → Set X)
(h_open : ∀ n, IsOpen (C n)) (h_dense : ∀ n, Dense (C n)) :
Dense (⋂ n, C n) ∧ IsGδ (⋂ n, C n)Theorem 1.46
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Theorem 1.46 (Ekeland): on a complete metric space, a proper lower semicontinuous extended-real-valued function that is bounded below satisfies Ekeland's variational principle. If y ∈ ERealFunction.dom f and f y ≤ α + inf f(X) with α ≥ 0 and β > 0, then there exists z such that f z + (α / β) d(y, z) ≤ f y, d(y, z) ≤ β, and f z < f x + (α / β) d(x, z) for every x ≠ z.
universe u
open Set
theorem exists_ekeland_variational_point {X : Type u} [MetricSpace X] [CompleteSpace X]
(f : X → EReal) (hf_proper : ERealFunction.IsProper f) (hf_lsc : LowerSemicontinuous f)
(hf_bddBelow : BddBelow (Set.range f)) {α β : ℝ} (hα : 0 ≤ α) (hβ : 0 < β) {y : X}
(hy : y ∈ ERealFunction.dom f) (hy_approx : f y ≤ (α : EReal) + sInf (Set.range f)) :
∃ z : X,
f z + ((α / β) * dist y z : ℝ) ≤ f y ∧
dist y z ≤ β ∧
∀ ⦃x : X⦄, x ≠ z → f z < f x + ((α / β) * dist x z : ℝ)Definition 1.47
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Definition 1.47(1): a map between metric spaces is Lipschitz continuous with constant β when it is formalized by the canonical predicate LipschitzWith β T.
open scoped Topology
universe u v
recall LipschitzWithExample 1.48
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Example 1.48: the textbook estimate (1.67) is the pointwise form of the canonical 1-Lipschitz estimate for x ↦ Metric.infDist x C; the book's nonemptiness hypothesis is unnecessary for this inequality.
universe u
theorem abs_infDist_sub_infDist_le_dist {α : Type u} [PseudoMetricSpace α] {C : Set α} (x y : α) :Theorem 1.49
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Theorem 1.49: (Ostrowski) in a metric space, if C is compact, a sequence u takes values in C, and dist (u n) (u (n + 1)) → 0, then the cluster-point set of u is connected. Under the hypothesis u n ∈ C, every cluster point already lies in C, so this is equivalent to the textbook formulation with C ∩ {x | MapClusterPt x atTop u}.
open Filter
open scoped Topology
universe u
variable {X : Type u} [MetricSpace X]
theorem isConnected_clusterPoints_of_tendsto_dist_succ_eq_zero
{C : Set X} {u : ℕ → X} (hC : IsCompact C) (huC : ∀ n, u n ∈ C)
(hstep : Tendsto (fun n ↦ dist (u n) (u (n + 1))) atTop (𝓝 0)) :
IsConnected {x | MapClusterPt x atTop u}Theorem 1.50
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Theorem 1.50 (Banach-Picard): a contraction on a nonempty complete metric space has a unique fixed point, expressed canonically as fixedPoints T = {x}, and this point satisfies the textbook one-step, geometric, a priori, a posteriori, and initial two-sided bounds for every starting point x₀.
universe u
open Function
variable {X : Type u} [MetricSpace X] [Nonempty X] [CompleteSpace X]
variable {β : NNReal} {T : X → X}
theorem exists_fixedPoint_with_banach_picard_estimates (hT : ContractingWith β T) :
∃ x : X,
fixedPoints T = {x} ∧
(∀ x₀ : X, ∀ n : ℕ, dist (T^[n + 1] x₀) x ≤ β * dist (T^[n] x₀) x) ∧
(∀ x₀ : X, ∀ n : ℕ, dist (T^[n] x₀) x ≤ β ^ n * dist x₀ x) ∧
(∀ x₀ : X, ∀ n : ℕ,
dist (T^[n] x₀) x ≤ dist x₀ (T x₀) * (β : ℝ) ^ n / (1 - β)) ∧
(∀ x₀ : X, ∀ n : ℕ,
dist (T^[n] x₀) x ≤ dist (T^[n] x₀) (T^[n + 1] x₀) / (1 - β)) ∧
∀ x₀ : X,
dist x₀ (T x₀) / (1 + β) ≤ dist x₀ x ∧
dist x₀ x ≤ dist x₀ (T x₀) / (1 - β)Theorem 1.51
Lean contributors (project-level attribution): Yifan Bai, Zichen Wang, Zaiwen Wen.
Theorem 1.51: if a self-map of a complete metric space has iterates whose pairwise distances are bounded by a summable nonnegative sequence, then every orbit converges to the unique fixed point, with the quantitative tail estimate given by the coefficient series.
open Filter Function
universe u
theorem exists_fixed_point_of_summable_iterate_bound {X : Type u} [MetricSpace X]
[CompleteSpace X] {T : X → X} {β : ℕ → NNReal} (hβ : Summable β)
(hiterate : ∀ n : ℕ, ∀ x y : X, dist (T^[n] x) (T^[n] y) ≤ (β n : ℝ) * dist x y) (x₀ : X) :
∃ x : X,
IsFixedPt T x ∧
(∀ ⦃y : X⦄, IsFixedPt T y → y = x) ∧
Tendsto (fun n ↦ T^[n] x₀) atTop (nhds x) ∧
∀ n : ℕ, dist (T^[n] x₀) x ≤ (summable_iterate_bound_tail β n : ℝ) * dist x₀ (T x₀)