Lean library · module TopologyByExample.Theorems.BernsteinRecursion
Paired Bernstein recursion of length continuum
This file was written by Codex (OpenAI's AI model) working under the direction of David R. MacIver, who reviews it and is responsible for it.
definition Index
TopologyByExample.BernsteinRecursion.Index
The initial ordinal of cardinality continuum, represented in the base universe.
abbrev Index
:= continuum.{0}.ord.ToType
theorem cardinal_index
TopologyByExample.BernsteinRecursion.cardinal_index
There are continuum many stages.
theorem cardinal_index : #Index = continuum
Proof
:= Cardinal.mk_ord_toType _
theorem cardinal_initial
TopologyByExample.BernsteinRecursion.cardinal_initial
Every proper initial segment has cardinality strictly below continuum.
theorem cardinal_initial (a : Index) : #(Iio a) < continuum
Proof
:= by
have h : Cardinal.ord #Index = typeLT Index := by
rw [cardinal_index, Ordinal.type_toType]
simpa only [cardinal_index] using Cardinal.mk_Iio_lt a h
variable {X : Type}
theorem exists_outside
TopologyByExample.BernsteinRecursion.exists_outside
A continuum-sized set has a point outside any set smaller than continuum.
theorem exists_outside {C M : Set X} (hC : #C = continuum) (hM : #M < continuum) :
∃ x ∈ C, x ∉ M
Proof
:= by
classical
by_contra hn
have hs : C ⊆ M := by
intro x hx
by_contra hm
exact hn ⟨x, hx, hm⟩
have hle := mk_le_mk_of_subset hs
rw [hC] at hle
exact hM.not_ge hle
theorem exists_pair
TopologyByExample.BernsteinRecursion.exists_pair
One stage selects two fresh points of the prescribed continuum-sized set.
theorem exists_pair (C : Index → Set X) (hC : ∀ a, #(C a) = continuum)
(a : Index) (old : ∀ b, b < a → X × X) :
∃ p : X × X, p.1 ∈ C a ∧ p.2 ∈ C a ∧ p.1 ≠ p.2 ∧
∀ b (hb : b < a), p.1 ≠ (old b hb).1 ∧ p.1 ≠ (old b hb).2 ∧
p.2 ≠ (old b hb).1 ∧ p.2 ≠ (old b hb).2
Proof
:= by
let M : Set X := range (fun b : Iio a ↦ (old b b.property).1) ∪
range (fun b : Iio a ↦ (old b b.property).2)
have hm : #M < continuum := (mk_union_le _ _).trans_lt
(add_lt_of_lt aleph0_lt_continuum.le
(mk_range_le.trans_lt (cardinal_initial a))
(mk_range_le.trans_lt (cardinal_initial a)))
obtain ⟨x, hx, hxm⟩ := exists_outside (hC a) hm
have hm' : #(insert x M : Set X) < continuum := mk_insert_le.trans_lt
(add_one_lt_of_lt aleph0_lt_continuum.le hm)
obtain ⟨y, hy, hym⟩ := exists_outside (hC a) hm'
refine ⟨(x, y), hx, hy, ?_, ?_⟩
· intro he
exact hym (Or.inl he.symm)
· intro b hb
exact ⟨fun he ↦ hxm (Or.inl ⟨⟨b, hb⟩, he.symm⟩),
fun he ↦ hxm (Or.inr ⟨⟨b, hb⟩, he.symm⟩),
fun he ↦ hym (Or.inr (Or.inl ⟨⟨b, hb⟩, he.symm⟩)),
fun he ↦ hym (Or.inr (Or.inr ⟨⟨b, hb⟩, he.symm⟩))⟩
definition pairs
TopologyByExample.BernsteinRecursion.pairs
The paired transfinite recursion for prescribed continuum-sized subsets.
def pairs (C : Index → Set X) (hC : ∀ a, #(C a) = continuum) : Index → X × X
:=
wellFounded_lt.fix fun a old ↦ (exists_pair C hC a old).choose
theorem pairs_spec
TopologyByExample.BernsteinRecursion.pairs_spec
Every chosen pair lies in its prescribed set and avoids both coordinates of earlier pairs.
theorem pairs_spec (C : Index → Set X) (hC : ∀ a, #(C a) = continuum) (a : Index) :
(pairs C hC a).1 ∈ C a ∧ (pairs C hC a).2 ∈ C a ∧
(pairs C hC a).1 ≠ (pairs C hC a).2 ∧
∀ b < a, (pairs C hC a).1 ≠ (pairs C hC b).1 ∧
(pairs C hC a).1 ≠ (pairs C hC b).2 ∧
(pairs C hC a).2 ≠ (pairs C hC b).1 ∧
(pairs C hC a).2 ≠ (pairs C hC b).2
Proof
:= by
rw [pairs, WellFounded.fix_eq]
exact (exists_pair C hC a (fun b _ ↦ pairs C hC b)).choose_spec
theorem first_injective
TopologyByExample.BernsteinRecursion.first_injective
The first coordinate sequence is injective.
theorem first_injective (C : Index → Set X) (hC : ∀ a, #(C a) = continuum) :
Function.Injective (fun a ↦ (pairs C hC a).1)
Proof
:= by
intro a b he
rcases lt_trichotomy a b with h | h | h
· exact False.elim (((pairs_spec C hC b).2.2.2 a h).1 he.symm)
· exact h
· exact False.elim (((pairs_spec C hC a).2.2.2 b h).1 he)
theorem disjoint_ranges
TopologyByExample.BernsteinRecursion.disjoint_ranges
No first-coordinate point equals any second-coordinate point.
theorem disjoint_ranges (C : Index → Set X) (hC : ∀ a, #(C a) = continuum) :
Disjoint (range (fun a ↦ (pairs C hC a).1)) (range (fun a ↦ (pairs C hC a).2))
Proof
:= by
apply disjoint_left.mpr
rintro x ⟨a, rfl⟩ ⟨b, he⟩
rcases lt_trichotomy a b with h | rfl | h
· exact ((pairs_spec C hC b).2.2.2 a h).2.2.1 he
· exact (pairs_spec C hC a).2.2.1 he.symm
· exact ((pairs_spec C hC a).2.2.2 b h).2.1 he.symm