Analysis II (Tao, 2022) -- Chapter 02 -- Section 05

section Chap02section Section05universe u

Definition 2.12: A topological space is a pair (sorry, sorry) : ?m.1 × ?m.2(Unknown identifier `X`X, Unknown identifier `O`O) consisting of a set Unknown identifier `X`X and a collection Unknown identifier `O`O subset 2 ^ sorry : 2^Unknown identifier `X`X such that (1) the empty set and Unknown identifier `X`X are in Unknown identifier `O`O, (2) finite intersections of members of Unknown identifier `O`O are in Unknown identifier `O`O, and (3) arbitrary unions of members of Unknown identifier `O`O are in Unknown identifier `O`O; the members of Unknown identifier `O`O are called open sets and Unknown identifier `O`O is called a topology on Unknown identifier `X`X. In Lean we bundle this as a type equipped with a TopologicalSpace.{u} (X : Type u) : Type uTopologicalSpace structure.

abbrev TopologicalSpacePair : Type (u + 1) := Σ X : Type u, TopologicalSpace X

Definition 2.13: A set Unknown identifier `U`sorry sorry : PropU Unknown identifier `X`X is a neighborhood of Unknown identifier `x`x in a topological space if Unknown identifier `U`U is open and Unknown identifier `x`sorry sorry : Propx Unknown identifier `U`U.

def IsNeighborhood {X : Type u} [TopologicalSpace X] (x : X) (U : Set X) : Prop := IsOpen U x U

Definition 2.14: [Topological convergence] Let (sorry, sorry) : ?m.1 × ?m.2(Unknown identifier `X`X, Unknown identifier `𝓕`𝓕) be a topological space, let failed to synthesize Membership ?m.1 Type Hint: Additional diagnostic information may be available using the `set_option diagnostics true` command.Unknown identifier `m`m , and let be a sequence in Unknown identifier `X`X. For Unknown identifier `x`sorry sorry : Propx Unknown identifier `X`X, the sequence converges to Unknown identifier `x`x iff for every neighborhood Unknown identifier `V`V of Unknown identifier `x`x there exists an integer Unknown identifier `N`sorry sorry : PropN Unknown identifier `m`m such that Unknown identifier `x`sorry ^ {sorry} sorry : Propx^{(Unknown identifier `n`n)} Unknown identifier `V`V for all integers Unknown identifier `n`sorry sorry : Propn Unknown identifier `N`N.

def TopologicalConvergesFrom {X : Type u} [TopologicalSpace X] (m : ) (xseq : X) (x : X) : Prop := V : Set X, IsNeighborhood x V N m, n N, xseq n V

Definition 2.15: [Interior point, exterior point, boundary point] Let (sorry, sorry) : ?m.1 × ?m.2(Unknown identifier `X`X, Unknown identifier `𝓕`𝓕) be a topological space, let Unknown identifier `E`sorry sorry : PropE Unknown identifier `X`X, and let Unknown identifier `x0`sorry sorry : Propx0 Unknown identifier `X`X. (1) Unknown identifier `x0`x0 is an interior point of Unknown identifier `E`E iff there exists a neighborhood Unknown identifier `V`V of Unknown identifier `x0`x0 with Unknown identifier `V`sorry sorry : PropV Unknown identifier `E`E. (2) Unknown identifier `x0`x0 is an exterior point of Unknown identifier `E`E iff there exists a neighborhood Unknown identifier `V`V of Unknown identifier `x0`x0 with Unknown identifier `V`sorry sorry = : PropV Unknown identifier `E`E = . (3) Unknown identifier `x0`x0 is a boundary point of Unknown identifier `E`E iff it is neither interior nor exterior; equivalently, for every neighborhood Unknown identifier `V`V of Unknown identifier `x0`x0, both Unknown identifier `V`sorry sorry : PropV Unknown identifier `E`E and Unknown identifier `V`sorry (sorry \ sorry) : PropV (Unknown identifier `X`X \ Unknown identifier `E`E) .

def IsInteriorPointTopological {X : Type u} [TopologicalSpace X] (E : Set X) (x0 : X) : Prop := V : Set X, IsNeighborhood x0 V V E

A point is an exterior point of Unknown identifier `E`E if some neighborhood of it misses Unknown identifier `E`E.

def IsExteriorPointTopological {X : Type u} [TopologicalSpace X] (E : Set X) (x0 : X) : Prop := V : Set X, IsNeighborhood x0 V V E =

A point is a boundary point of Unknown identifier `E`E if it is neither interior nor exterior.

def IsBoundaryPointTopological {X : Type u} [TopologicalSpace X] (E : Set X) (x0 : X) : Prop := ¬ IsInteriorPointTopological E x0 ¬ IsExteriorPointTopological E x0

A point is adherent to Unknown identifier `E`E if every neighborhood containing an open neighborhood of it meets Unknown identifier `E`E.

def IsAdherentPointTopological {X : Type u} [TopologicalSpace X] (E : Set X) (x0 : X) : Prop := V : Set X, ( U : Set X, IsNeighborhood x0 U U V) (V E).Nonempty

Definition 2.16 (Closure point): Let (sorry, sorry) : ?m.1 × ?m.2(Unknown identifier `X`X, Unknown identifier `𝓕`𝓕) be a topological space and Unknown identifier `E`sorry sorry : PropE Unknown identifier `X`X. (1) A point Unknown identifier `x0`sorry sorry : Propx0 Unknown identifier `X`X is an adherent point of Unknown identifier `E`E iff for every neighborhood Unknown identifier `V`V of Unknown identifier `x0`x0 (i.e., Unknown identifier `V`V contains an open set containing Unknown identifier `x0`x0), one has Unknown identifier `V`sorry sorry : PropV Unknown identifier `E`E . (2) The closure is the set of all adherent points of Unknown identifier `E`E: .

def closureSetTopological {X : Type u} [TopologicalSpace X] (E : Set X) : Set X := {x | IsAdherentPointTopological E x}

Definition 2.17: Let (sorry, sorry) : ?m.1 × ?m.2(Unknown identifier `X`X, Unknown identifier `𝓕`𝓕) be a topological space and Unknown identifier `K`sorry sorry : PropK Unknown identifier `X`X. The set Unknown identifier `K`K is closed iff its complement Unknown identifier `X`sorry \ sorry : ?m.1X \ Unknown identifier `K`K is open (i.e. Unknown identifier `X`sorry \ sorry sorry : PropX \ Unknown identifier `K`K Unknown identifier `𝓕`𝓕).

abbrev IsClosedTopological {X : Type u} [TopologicalSpace X] (K : Set X) : Prop := IsClosed K

Definition 2.18: [Relative topology] Let (sorry, sorry) : ?m.1 × ?m.2(Unknown identifier `X`X, Unknown identifier `𝓕`𝓕) be a topological space and Unknown identifier `Y`sorry sorry : PropY Unknown identifier `X`X. Define ; this collection is the relative (subspace) topology on Unknown identifier `Y`Y, and the pair (sorry, sorry) : ?m.1 × ?m.2(Unknown identifier `Y`Y, Unknown identifier `𝓕_Y`𝓕_Y) is a topological subspace of (sorry, sorry) : ?m.1 × ?m.2(Unknown identifier `X`X, Unknown identifier `𝓕`𝓕).

def relativeTopology {X : Type u} [TopologicalSpace X] (Y : Set X) : Set (Set X) := {U : Set X | V : Set X, IsOpen V U = V Y}

Definition 2.19: (Continuous functions) Let (sorry, sorry) : ?m.1 × ?m.2(Unknown identifier `X`X, Unknown identifier `𝓕_X`𝓕_X) and (sorry, sorry) : ?m.1 × ?m.2(Unknown identifier `Y`Y, Unknown identifier `𝓕_Y`𝓕_Y) be topological spaces and let . For Unknown identifier `x0`sorry sorry : Propx0 Unknown identifier `X`X, the function Unknown identifier `f`f is continuous at Unknown identifier `x0`x0 iff for every neighborhood Unknown identifier `V`V of Unknown identifier `f`f x0 there exists a neighborhood Unknown identifier `U`U of Unknown identifier `x0`x0 such that Unknown identifier `f`sorry '' sorry sorry : Propf '' Unknown identifier `U`U Unknown identifier `V`V. The function Unknown identifier `f`f is continuous iff it is continuous at every point Unknown identifier `x`sorry sorry : Propx Unknown identifier `X`X.

def IsContinuousAtTopological {X Y : Type u} [TopologicalSpace X] [TopologicalSpace Y] (f : X Y) (x0 : X) : Prop := V : Set Y, IsNeighborhood (f x0) V U : Set X, IsNeighborhood x0 U f '' U V

A function is continuous if it is continuous at every point.

def IsContinuousTopological {X Y : Type u} [TopologicalSpace X] [TopologicalSpace Y] (f : X Y) : Prop := x : X, IsContinuousAtTopological f x

Definition 2.20: (1) A topological space is compact if every open cover has a finite subcover. (2) A subset Unknown identifier `Y`sorry sorry : PropY Unknown identifier `X`X is compact if the subspace topology on Unknown identifier `Y`Y is compact; in Lean we use IsCompact sorry : PropIsCompact Unknown identifier `Y`Y, and the space is compact iff IsCompact (Set.univ : Set Unknown identifier `X`X).

abbrev IsCompactTopological {X : Type u} [TopologicalSpace X] (Y : Set X) : Prop := IsCompact Y

A topological space is compact if its underlying set is compact.

abbrev IsCompactSpaceTopological {X : Type u} [TopologicalSpace X] : Prop := IsCompactTopological (Set.univ : Set X)

Definition 2.22 (Hausdorff topological space): A topological space is Hausdorff if for any distinct points there exist neighborhoods Unknown identifier `V`V of Unknown identifier `x`x and Unknown identifier `W`W of Unknown identifier `y`y with Unknown identifier `V`sorry sorry = : PropV Unknown identifier `W`W = .

abbrev IsHausdorffTopological (X : Type u) [TopologicalSpace X] : Prop := T2Space X

Definition 2.23: [Order topology] Let be a totally ordered set. A set Unknown identifier `V`sorry sorry : PropV Unknown identifier `X`X is open if for every Unknown identifier `x`sorry sorry : Propx Unknown identifier `V`V there exists a set Unknown identifier `I`I with failed to synthesize Membership ?m.1 Prop Hint: Additional diagnostic information may be available using the `set_option diagnostics true` command.Unknown identifier `x`x Unknown identifier `I`I Unknown identifier `V`V, where Unknown identifier `I`I is an interval {y | sorry sorry} : Set sorry{y : Unknown identifier `X`X | Unknown identifier `a`a < y y < Unknown identifier `b`b}, a ray {y | sorry} : Set sorry{y : Unknown identifier `X`X | Unknown identifier `a`a < y} or {y | sorry} : Set sorry{y : Unknown identifier `X`X | y < Unknown identifier `b`b}, or the whole space Unknown identifier `X`X; the collection of such open sets defines the order topology on Unknown identifier `X`X.

abbrev orderTopology (X : Type u) [LinearOrder X] : TopologicalSpace X := Preorder.topology X

Definition 2.24 (Cofinite topology): Let Unknown identifier `X`X be a set and define is finite}. The pair (sorry, sorry) : ?m.1 × ?m.2(Unknown identifier `X`X, Unknown identifier `𝓕`𝓕) is called the cofinite topology on Unknown identifier `X`X. In Lean this is the TopologicalSpace.{u} (X : Type u) : Type uTopologicalSpace structure induced by the CofiniteTopology.{u_5} (X : Type u_5) : Type u_5CofiniteTopology type synonym.

abbrev cofiniteTopology (X : Type u) : TopologicalSpace X := (inferInstance : TopologicalSpace (CofiniteTopology X))

A set is cocountable-open if it is empty or its complement is countable.

def IsCocountableOpen (X : Type u) (E : Set X) : Prop := E = (Set.univ \ E).Countable

The whole space is cocountable-open.

lemma cocountable_isOpen_univ (X : Type u) : IsCocountableOpen X (Set.univ : Set X) := by right try 'simp' instead of 'simpa' Note: This linter can be disabled with `set_option linter.unnecessarySimpa false`simpa using (Set.countable_empty : ( : Set X).Countable)

Intersections of cocountable-open sets are cocountable-open.

lemma cocountable_isOpen_inter (X : Type u) (s t : Set X) : IsCocountableOpen X s IsCocountableOpen X t IsCocountableOpen X (s t) := by intro hs ht rcases hs with rfl | hsCount · left simp · rcases ht with rfl | htCount · left simp · right simpa [Set.diff_inter] using hsCount.union htCount

Arbitrary unions of cocountable-open sets are cocountable-open.

lemma cocountable_isOpen_sUnion (X : Type u) (S : Set (Set X)) : ( t S, IsCocountableOpen X t) IsCocountableOpen X (⋃₀ S) := by intro hS by_cases hUnion : (⋃₀ S : Set X) = · left exact hUnion · right have hUnionNonempty : (⋃₀ S : Set X).Nonempty := by by_contra hNonempty apply hUnion refine Set.eq_empty_iff_forall_notMem.mpr ?_ intro x hx exact hNonempty x, hx rcases hUnionNonempty with x, hxUnion rcases Set.mem_sUnion.mp hxUnion with t, htS, hxT have htComplCount : (Set.univ \ t).Countable := by rcases hS t htS with htEmpty | htCount · exfalso rw [htEmpty] at hxT exact hxT · exact htCount have hsubset : Set.univ \ ⋃₀ S Set.univ \ t := by intro y hy rcases hy with hyUniv, hyNotUnion refine hyUniv, ?_ intro hyMemT exact hyNotUnion (Set.mem_sUnion.mpr t, htS, hyMemT) exact Set.Countable.mono hsubset htComplCount

Definition 2.25 (Cocountable topology): Let Unknown identifier `X`X be a set. Define . The pair (sorry, sorry) : ?m.1 × ?m.2(Unknown identifier `X`X, Unknown identifier `𝓕`𝓕) is called the cocountable topology on Unknown identifier `X`X.

def cocountableTopology (X : Type u) : TopologicalSpace X := { IsOpen := IsCocountableOpen X isOpen_univ := cocountable_isOpen_univ X isOpen_inter := cocountable_isOpen_inter X isOpen_sUnion := cocountable_isOpen_sUnion X }

Proposition 2.23: In a metric space, the open ball Metric.ball sorry sorry : Set ?m.1Metric.ball Unknown identifier `x`x Unknown identifier `r`r with Unknown identifier `r`sorry > 0 : Propr > 0 is a neighborhood of Unknown identifier `x`x.

theorem metric_ball_isNeighborhood {X : Type u} [MetricSpace X] (x : X) {r : } (hr : 0 < r) : IsNeighborhood x (Metric.ball x r) := by unfold IsNeighborhood constructor · try 'simp' instead of 'simpa' Note: This linter can be disabled with `set_option linter.unnecessarySimpa false`simpa using (Metric.isOpen_ball : IsOpen (Metric.ball x r)) · simpa using (Metric.mem_ball_self (x := x) hr)

Proposition 2.24: Let (Unknown identifier `x_n`x_n) be a sequence in : Type, viewed in the extended real line EReal : TypeEReal. Then iff . Similarly, iff .

theorem tendsto_ereal_top_iff_liminf_eq_top_and_tendsto_ereal_bot_iff_limsup_eq_bot (x : ) : (Filter.Tendsto (fun n => (x n : EReal)) Filter.atTop (nhds ( : EReal)) Filter.liminf (fun n => (x n : EReal)) Filter.atTop = ( : EReal)) (Filter.Tendsto (fun n => (x n : EReal)) Filter.atTop (nhds ( : EReal)) Filter.limsup (fun n => (x n : EReal)) Filter.atTop = ( : EReal)) := by constructor · constructor · intro h simpa using (Filter.Tendsto.liminf_eq (f := Filter.atTop) (u := fun n => (x n : EReal)) (a := ( : EReal)) h) · intro h refine tendsto_of_le_liminf_of_limsup_le ?_ ?_ · try 'simp' instead of 'simpa' Note: This linter can be disabled with `set_option linter.unnecessarySimpa false`simpa [h] · exact le_top · constructor · intro h simpa using (Filter.Tendsto.limsup_eq (f := Filter.atTop) (u := fun n => (x n : EReal)) (a := ( : EReal)) h) · intro h refine tendsto_of_le_liminf_of_limsup_le ?_ ?_ · exact bot_le · try 'simp' instead of 'simpa' Note: This linter can be disabled with `set_option linter.unnecessarySimpa false`simpa [h]

Proposition 2.25: Let Unknown identifier `X`X be a set and define . Then (sorry, sorry) : ?m.1 × ?m.2(Unknown identifier `X`X, Unknown identifier `𝓕`𝓕) is a topology on Unknown identifier `X`X, i.e. there is a topological structure whose open sets are exactly : ?m.1 and Set.univ.{u} {α : Type u} : Set αSet.univ.

theorem exists_topology_only_empty_univ (X : Type u) : T : TopologicalSpace X, U : Set X, @IsOpen X T U U = U = Set.univ := by refine , ?_ intro U simpa using (TopologicalSpace.isOpen_top_iff (U := U))

Definition 2.26: [First countable topological space] A topological space (sorry, sorry) : ?m.1 × ?m.2(Unknown identifier `X`X, Unknown identifier `F`F) is first countable if for every there exists a countable collection of neighborhoods of Unknown identifier `x`x such that every neighborhood of Unknown identifier `x`x contains at least one Unknown identifier `V_n`V_n. In Lean this is the predicate FirstCountableTopology.{u} (α : Type u) [t : TopologicalSpace α] : PropFirstCountableTopology.

abbrev IsFirstCountableTopological (X : Type u) [TopologicalSpace X] : Prop := FirstCountableTopology X
end Section05end Chap02