Lean library · module TopologyByExample.Theorems.NovakRecursion
Selection avoiding an involution
The recursion keeps one point per stage. Its initial-segment bound does not require the indexing cardinal to be regular.
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.
variable {X : Type} (κ : Cardinal) (hκ : ℵ₀ ≤ κ)
definition Index
TopologyByExample.NovakRecursion.Index
Stages indexed by the initial ordinal of the prescribed cardinal.
abbrev Index
:= κ.ord.ToType
theorem cardinal_initial
TopologyByExample.NovakRecursion.cardinal_initial
Every proper initial segment is smaller than the indexing cardinal.
theorem cardinal_initial (a : Index κ) : #(Iio a) < κ
include hκ
theorem exists_fresh
TopologyByExample.NovakRecursion.exists_fresh
A stage avoids all previous selected points and their images.
theorem exists_fresh (f : X → X) (C : Index κ → Set X)
(hC : ∀ a, κ ≤ #(C a)) (a : Index κ) (old : ∀ b, b < a → X) :
∃ x ∈ C a, ∀ b (hb : b < a), x ≠ old b hb ∧ x ≠ f (old b hb)
Proof
:= by
let M := range (fun b : Iio a ↦ old b b.property) ∪
range (fun b : Iio a ↦ f (old b b.property))
have hm : #M < κ := (mk_union_le _ _).trans_lt
(add_lt_of_lt hκ (mk_range_le.trans_lt (cardinal_initial κ a))
(mk_range_le.trans_lt (cardinal_initial κ a)))
have hn : ¬C a ⊆ M := fun h ↦ hm.not_ge ((hC a).trans (mk_le_mk_of_subset h))
obtain ⟨x, hx, hxm⟩ := not_subset.mp hn
exact ⟨x, hx, fun b hb ↦
⟨fun he ↦ hxm (Or.inl ⟨⟨b, hb⟩, he.symm⟩),
fun he ↦ hxm (Or.inr ⟨⟨b, hb⟩, he.symm⟩)⟩⟩
definition points
TopologyByExample.NovakRecursion.points
Select one fresh point at every stage.
def points (f : X → X) (C : Index κ → Set X) (hC : ∀ a, κ ≤ #(C a)) : Index κ → X
:=
wellFounded_lt.fix fun a old ↦ (exists_fresh κ hκ f C hC a old).choose
theorem points_spec
TopologyByExample.NovakRecursion.points_spec
The selected point belongs to its prescribed set and avoids earlier points and images.
theorem points_spec (f : X → X) (C : Index κ → Set X)
(hC : ∀ a, κ ≤ #(C a)) (a : Index κ) :
points κ hκ f C hC a ∈ C a ∧
∀ b < a, points κ hκ f C hC a ≠ points κ hκ f C hC b ∧
points κ hκ f C hC a ≠ f (points κ hκ f C hC b)
Proof
:= by
rw [points, WellFounded.fix_eq]
exact (exists_fresh κ hκ f C hC a (fun b _ ↦ points κ hκ f C hC b)).choose_spec
theorem points_injective
TopologyByExample.NovakRecursion.points_injective
All selected points are distinct.
theorem points_injective (f : X → X) (C : Index κ → Set X)
(hC : ∀ a, κ ≤ #(C a)) : Function.Injective (points κ hκ f C hC)
Proof
:= by
intro a b he
rcases lt_trichotomy a b with h | h | h
· exact False.elim (((points_spec κ hκ f C hC b).2 a h).1 he.symm)
· exact h
· exact False.elim (((points_spec κ hκ f C hC a).2 b h).1 he)
theorem disjoint_image
TopologyByExample.NovakRecursion.disjoint_image
For a fixed-point-free involution, the selected range is disjoint from its image.
theorem disjoint_image (f : X → X) (hf : Function.Involutive f)
(hn : ∀ x, f x ≠ x) (C : Index κ → Set X) (hC : ∀ a, κ ≤ #(C a)) :
Disjoint (range (points κ hκ f C hC)) (f '' range (points κ hκ f C hC))
Proof
:= by
apply disjoint_left.mpr
rintro x ⟨a, rfl⟩ ⟨_, ⟨b, rfl⟩, he⟩
rcases lt_trichotomy a b with h | rfl | h
· have he' := congrArg f he
rw [hf] at he'
exact ((points_spec κ hκ f C hC b).2 a h).2 he'
· exact hn _ he
· exact ((points_spec κ hκ f C hC a).2 b h).2 he.symm