Lean library · module TopologyByExample.Theorems.SeqCompactProduct

Products of sequentially compact spaces

Source file

A countable product of sequentially compact spaces is sequentially compact. The proof is the classical diagonal argument: one refines a subsequence once for each coordinate and then takes the diagonal.

Main statements

No separation axioms are needed.

Tags

sequentially compact, product, diagonal argument

This file was written by Claude (Anthropic's AI model) working under the direction of David R. MacIver, who reviews it and is responsible for it.

Imports

theorem exists_strictMono_forall_tendsto

TopologyByExample.exists_strictMono_forall_tendsto

The diagonal argument. Let u n be a sequence in Y n for each n : ℕ, such that for every reindexing ψ : ℕ → ℕ the sequence u n ∘ ψ has a subsequence converging to a point of s n. Then there is a single strictly monotone φ such that every u n ∘ φ converges to a point of s n.

theorem exists_strictMono_forall_tendsto {Y : ℕ → Type*} [∀ n, TopologicalSpace (Y n)]
    {s : ∀ n, Set (Y n)} (u : ∀ n, ℕ → Y n)
    (h : ∀ n (ψ : ℕ → ℕ), ∃ y ∈ s n, ∃ φ : ℕ → ℕ, StrictMono φ ∧
      Tendsto (u n ∘ ψ ∘ φ) atTop (𝓝 y)) :
    ∃ φ : ℕ → ℕ, StrictMono φ ∧ ∀ n, ∃ y ∈ s n, Tendsto (u n ∘ φ) atTop (𝓝 y)
Proof
:= by
  choose y hys φ hφ hφy using h
  -- `Ψ n` is the subsequence after the first `n` refinements: `Ψ (n + 1) = Ψ n ∘ φ n (Ψ n)`.
  obtain ⟨Ψ, hΨ0, hΨ⟩ : ∃ Ψ : ℕ → ℕ → ℕ, Ψ 0 = id ∧ ∀ n, Ψ (n + 1) = Ψ n ∘ φ n (Ψ n) :=
    ⟨fun n ↦ Nat.rec (motive := fun _ ↦ ℕ → ℕ) id (fun n Ψn ↦ Ψn ∘ φ n Ψn) n, rfl, fun _ ↦ rfl⟩
  have hΨmono : ∀ n, StrictMono (Ψ n) := by
    intro n
    induction n with
    | zero => exact hΨ0 ▸ strictMono_id
    | succ n ih => exact hΨ n ▸ ih.comp (hφ n _)
  -- Each later stage is a subsequence of each earlier one, reindexed by a map `≥ id`.
  have hle : ∀ m j, m ≤ j → ∀ i, ∃ k ≥ i, Ψ j i = Ψ m k := by
    intro m j hmj
    induction j, hmj using Nat.le_induction with
    | base => exact fun i ↦ ⟨i, le_rfl, rfl⟩
    | succ j _ ih =>
      intro i
      obtain ⟨k, hk, hjk⟩ := ih (φ j (Ψ j) i)
      exact ⟨k, ((hφ j _).id_le i).trans hk, by rw [hΨ]; exact hjk⟩
  refine ⟨fun j ↦ Ψ j j, strictMono_nat_of_lt_succ fun j ↦ ?_, fun n ↦ ⟨_, hys n (Ψ n), ?_⟩⟩
  · rw [hΨ]
    exact hΨmono j (j.lt_succ_self.trans_le ((hφ j _).id_le _))
  · have hn : Tendsto (u n ∘ Ψ (n + 1)) atTop (𝓝 (y n (Ψ n))) := hΨ n ▸ hφy n (Ψ n)
    refine fun U hU ↦ mem_map.2 ?_
    obtain ⟨K, hK⟩ := eventually_atTop.1 (hn hU)
    filter_upwards [eventually_ge_atTop K, eventually_ge_atTop (n + 1)] with j hKj hnj
    obtain ⟨k, hjk, hk⟩ := hle (n + 1) j hnj j
    rw [mem_preimage, Function.comp_apply, hk]
    exact hK k (hKj.trans hjk)

theorem isSeqCompact_univ_pi

TopologyByExample.isSeqCompact_univ_pi

A countable product of sequentially compact sets is sequentially compact.

theorem isSeqCompact_univ_pi {ι : Type*} [Countable ι] {X : ι → Type*}
    [∀ i, TopologicalSpace (X i)] {s : ∀ i, Set (X i)} (hs : ∀ i, IsSeqCompact (s i)) :
    IsSeqCompact (univ.pi s)
Proof
:= by
  intro x hx
  rcases isEmpty_or_nonempty ι with hι | hι
  · exact ⟨x 0, hx 0, id, strictMono_id, tendsto_pi_nhds.2 fun i ↦ isEmptyElim i⟩
  obtain ⟨e, he⟩ := exists_surjective_nat ι
  obtain ⟨φ, hφ, hφx⟩ := exists_strictMono_forall_tendsto (s := fun n ↦ s (e n))
    (fun n k ↦ x k (e n)) fun n ψ ↦ hs (e n) fun k ↦ hx (ψ k) (e n) trivial
  have : ∀ i, ∃ a ∈ s i, Tendsto (fun k ↦ x (φ k) i) atTop (𝓝 a) := by
    intro i
    obtain ⟨n, rfl⟩ := he i
    exact hφx n
  choose a has ha using this
  exact ⟨a, fun i _ ↦ has i, φ, hφ, tendsto_pi_nhds.2 ha⟩

instance seqCompactSpace_pi

TopologyByExample.seqCompactSpace_pi

A countable product of sequentially compact spaces is sequentially compact.

instance seqCompactSpace_pi {ι : Type*} [Countable ι] {X : ι → Type*}
    [∀ i, TopologicalSpace (X i)] [∀ i, SeqCompactSpace (X i)] :
    SeqCompactSpace (∀ i, X i)
Proof
:=
  ⟨pi_univ (α := X) univ ▸ isSeqCompact_univ_pi fun _ ↦ isSeqCompact_univ⟩

On this site: Theorem: Countable products of sequentially compact spaces are sequentially compact

theorem seqCompactSpace_pi_nat

TopologyByExample.seqCompactSpace_pi_nat

A product ∀ n : ℕ, X n of sequentially compact spaces is sequentially compact.

theorem seqCompactSpace_pi_nat {X : ℕ → Type*} [∀ n, TopologicalSpace (X n)]
    [∀ n, SeqCompactSpace (X n)] : SeqCompactSpace (∀ n, X n)
Proof
:=
  inferInstance

theorem seqCompactSpace_nat_fun

TopologyByExample.seqCompactSpace_nat_fun

The countable power ℕ → X of a sequentially compact space is sequentially compact.

theorem seqCompactSpace_nat_fun {X : Type*} [TopologicalSpace X] [SeqCompactSpace X] :
    SeqCompactSpace (ℕ → X)
Proof
:=
  inferInstance

Binary products

theorem prod

TopologyByExample.IsSeqCompact.prod

A product of two sequentially compact sets is sequentially compact.

theorem IsSeqCompact.prod {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] {s : Set X}
    {t : Set Y} (hs : IsSeqCompact s) (ht : IsSeqCompact t) :
    IsSeqCompact (s ×ˢ t)
Proof
:= by
  intro u hu
  obtain ⟨a, ha, φ, hφ, hua⟩ := hs fun n ↦ (hu n).1
  obtain ⟨b, hb, ψ, hψ, hub⟩ := ht fun n ↦ (hu (φ n)).2
  exact ⟨(a, b), ⟨ha, hb⟩, φ ∘ ψ, hφ.comp hψ,
    (hua.comp hψ.tendsto_atTop).prodMk_nhds hub⟩

instance instSeqCompactSpaceProd

TopologyByExample.instSeqCompactSpaceProd

A product of two sequentially compact spaces is sequentially compact.

instance instSeqCompactSpaceProd {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y]
    [SeqCompactSpace X] [SeqCompactSpace Y] :
    SeqCompactSpace (X × Y)
Proof
:=
  ⟨univ_prod_univ (α := X) (β := Y) ▸ IsSeqCompact.prod isSeqCompact_univ isSeqCompact_univ⟩

On this site: Theorem: A product of two sequentially compact spaces is sequentially compact