Lean library · module TopologyByExample.Theorems.MathiasDecision
Pure decisions for open partitions
Selective fusion stabilizes every decision that is available at a finite stem. If a stem remains undecided, its undecided one-point extensions form an ultrafilter member. A second fusion then handles open partitions.
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 CanForce
TopologyByExample.Mathias.CanForce
A set can be forced at a stem if one ultrafilter tail makes the cone homogeneous in that set.
def CanForce (U : Ultrafilter ℕ) (s : Finset ℕ) (B : Set (Set ℕ)) : Prop
:=
∃ A ∈ U, cone s A ⊆ B
definition Undecided
TopologyByExample.Mathias.Undecided
A stem is undecided if neither colour can be forced there.
def Undecided (U : Ultrafilter ℕ) (s : Finset ℕ) (B : Set (Set ℕ)) : Prop
:=
¬CanForce U s B ∧ ¬CanForce U s Bᶜ
theorem exists_stabilizing_tail
TopologyByExample.Mathias.exists_stabilizing_tail
Available decisions at all extensions of a fixed stem can be realized by one tail.
theorem exists_stabilizing_tail {U : Ultrafilter ℕ} (hU : IsSelective U)
(hfree : (U : Filter ℕ) ≤ cofinite) (s : Finset ℕ) (B : Set (Set ℕ))
{A : Set ℕ} (hA : A ∈ U) :
∃ T ∈ U, T ⊆ A ∩ Ici (cut s) ∧ ∀ t : Finset ℕ, (t : Set ℕ) ⊆ T →
(CanForce U (s ∪ t) B → cone (s ∪ t) T ⊆ B) ∧
(CanForce U (s ∪ t) Bᶜ → cone (s ∪ t) T ⊆ Bᶜ)
Proof
:= by
classical
have hchoose (D : Set (Set ℕ)) (t : Finset ℕ) :
∃ C ∈ U, CanForce U (s ∪ t) D → cone (s ∪ t) C ⊆ D := by
by_cases h : CanForce U (s ∪ t) D
· obtain ⟨C, hC, hc⟩ := h
exact ⟨C, hC, fun _ ↦ hc⟩
· exact ⟨univ, univ_mem, fun hc ↦ (h hc).elim⟩
choose P hP hp using hchoose B
choose N hN hn using hchoose Bᶜ
obtain ⟨H, hH, _, hHA⟩ := hU.fusion (fun t ↦ P t ∩ N t)
(fun t ↦ inter_mem (hP t) (hN t))
let T := H ∩ (A ∩ Ici (cut s))
have hT : T ∈ U := inter_mem hH (tail_mem hfree hA _)
refine ⟨T, hT, inter_subset_right, fun t ht ↦ ?_⟩
have htail : T ∩ Ici (cut (s ∪ t)) ⊆ P t ∩ N t := by
intro m hm
apply hHA t (ht.trans inter_subset_left) m hm.1.1
exact (Finset.sup_mono Finset.subset_union_right).trans hm.2
exact ⟨fun h ↦ (cone_mono_tail (s ∪ t) (htail.trans inter_subset_left)).trans
(hp t h),
fun h ↦ (cone_mono_tail (s ∪ t) (htail.trans inter_subset_right)).trans (hn t h)⟩
theorem notMem_forceable_extensions
TopologyByExample.Mathias.notMem_forceable_extensions
If a colour cannot be forced at a stem, its forceable immediate extensions cannot form an ultrafilter member once available decisions have been stabilized.
theorem notMem_forceable_extensions {U : Ultrafilter ℕ} {s t : Finset ℕ}
{B : Set (Set ℕ)} {T : Set ℕ} (ht : (t : Set ℕ) ⊆ T)
(hstab : ∀ v : Finset ℕ, (v : Set ℕ) ⊆ T →
CanForce U (s ∪ v) B → cone (s ∪ v) T ⊆ B)
(hno : ¬CanForce U (s ∪ t) B) :
{n | n ∈ T ∧ cut (s ∪ t) ≤ n ∧ CanForce U (s ∪ insert n t) B} ∉ U
Proof
:= by
classical
intro hD
apply hno
refine ⟨_, hD, fun X hX ↦ ?_⟩
obtain ⟨n, hn, _, hnext⟩ := exists_next_of_mem_cone hX
have hnt : (↑(insert n t) : Set ℕ) ⊆ T := by
simpa only [Finset.coe_insert, insert_subset_iff] using And.intro hn.1 ht
have hnextT : X ∈ cone (insert n (s ∪ t)) T :=
cone_mono (insert n (s ∪ t))
(A := {n | n ∈ T ∧ cut (s ∪ t) ≤ n ∧ CanForce U (s ∪ insert n t) B})
(fun _ h ↦ h.1) hnext
have he : insert n (s ∪ t) = s ∪ insert n t := by ext; simp
rw [he] at hnextT
exact hstab _ hnt hn.2.2 hnextT
theorem undecided_extensions_mem
TopologyByExample.Mathias.undecided_extensions_mem
At an undecided stem, undecided immediate extensions form an ultrafilter member.
theorem undecided_extensions_mem {U : Ultrafilter ℕ} (hfree : (U : Filter ℕ) ≤ cofinite)
{s t : Finset ℕ} {B : Set (Set ℕ)} {T : Set ℕ} (hT : T ∈ U)
(ht : (t : Set ℕ) ⊆ T)
(hstab : ∀ v : Finset ℕ, (v : Set ℕ) ⊆ T →
(CanForce U (s ∪ v) B → cone (s ∪ v) T ⊆ B) ∧
(CanForce U (s ∪ v) Bᶜ → cone (s ∪ v) T ⊆ Bᶜ))
(hno : Undecided U (s ∪ t) B) :
{n | n ∈ T ∧ cut (s ∪ t) ≤ n ∧ Undecided U (s ∪ insert n t) B} ∈ U
Proof
:= by
have hp := Ultrafilter.compl_mem_iff_notMem.mpr
(notMem_forceable_extensions ht (fun v hv ↦ (hstab v hv).1) hno.1)
have hn := Ultrafilter.compl_mem_iff_notMem.mpr
(notMem_forceable_extensions ht (fun v hv ↦ (hstab v hv).2) hno.2)
filter_upwards [tail_mem hfree hT (cut (s ∪ t)), hp, hn] with n hnt hnp hnn
exact ⟨hnt.1, hnt.2, fun h ↦ hnp ⟨hnt.1, hnt.2, h⟩,
fun h ↦ hnn ⟨hnt.1, hnt.2, h⟩⟩
theorem exists_all_undecided
TopologyByExample.Mathias.exists_all_undecided
If no decision is possible at the initial stem, a selective tail keeps every finite extension undecided.
theorem exists_all_undecided {U : Ultrafilter ℕ} (hU : IsSelective U)
(hfree : (U : Filter ℕ) ≤ cofinite) (s : Finset ℕ) (B : Set (Set ℕ))
{T : Set ℕ} (hT : T ∈ U)
(hstab : ∀ v : Finset ℕ, (v : Set ℕ) ⊆ T →
(CanForce U (s ∪ v) B → cone (s ∪ v) T ⊆ B) ∧
(CanForce U (s ∪ v) Bᶜ → cone (s ∪ v) T ⊆ Bᶜ))
(hno : Undecided U s B) :
∃ H ∈ U, H ⊆ T ∧ ∀ t : Finset ℕ, (t : Set ℕ) ⊆ H →
Undecided U (s ∪ t) B
Proof
:= by
classical
let E (t : Finset ℕ) : Set ℕ :=
if (t : Set ℕ) ⊆ T ∧ Undecided U (s ∪ t) B then
{n | n ∈ T ∧ cut (s ∪ t) ≤ n ∧ Undecided U (s ∪ insert n t) B}
else T
have hE (t : Finset ℕ) : E t ∈ U := by
dsimp [E]
split_ifs with h
· exact undecided_extensions_mem hfree hT h.1 hstab h.2
· exact hT
obtain ⟨H, hH, _, hHE⟩ := hU.fusion E hE
refine ⟨H ∩ T, inter_mem hH hT, inter_subset_right, fun t ↦ ?_⟩
induction t using Finset.induction_on_max with
| empty => simpa only [Finset.union_empty] using (fun _ ↦ hno)
| insert n t hmax ih =>
intro hnt
have hn : n ∈ H ∩ T := hnt (Finset.mem_insert_self _ _)
have ht : (t : Set ℕ) ⊆ H ∩ T := fun k hk ↦ hnt (Finset.mem_insert_of_mem hk)
have htu := ih ht
have hcut : cut t ≤ n := Finset.sup_le fun k hk ↦ Nat.succ_le_of_lt (hmax k hk)
have hnE := hHE t (ht.trans inter_subset_left) n hn.1 hcut
have he : (t : Set ℕ) ⊆ T ∧ Undecided U (s ∪ t) B :=
⟨ht.trans inter_subset_right, htu⟩
simp only [E, ite_eq_left he] at hnE
exact hnE.2.2
definition PrefixOpen
TopologyByExample.Mathias.PrefixOpen
A prefix-open family has arbitrarily long finite initial segments which already determine membership of every infinite extension.
def PrefixOpen (B : Set (Set ℕ)) : Prop
:=
∀ X ∈ B, X.Infinite → ∀ k : ℕ, ∃ t : Finset ℕ,
X ∈ cone t univ ∧ k ≤ cut t ∧ cone t univ ⊆ B
theorem canForce_or_compl_of_local
TopologyByExample.Mathias.canForce_or_compl_of_local
A pure decision exists if every positive member of a cone has a finite extension at which the positive colour can be forced.
theorem canForce_or_compl_of_local {U : Ultrafilter ℕ} (hU : IsSelective U)
(hfree : (U : Filter ℕ) ≤ cofinite) (s : Finset ℕ) (B : Set (Set ℕ))
{A : Set ℕ} (hA : A ∈ U)
(hlocal : ∀ X ∈ cone s A, X ∈ B → ∃ t : Finset ℕ,
(t : Set ℕ) ⊆ X \ (s : Set ℕ) ∧ CanForce U (s ∪ t) B) :
CanForce U s B ∨ CanForce U s Bᶜ
Proof
:= by
classical
by_contra! hno
obtain ⟨T, hT, hTA, hstab⟩ := exists_stabilizing_tail hU hfree s B hA
obtain ⟨H, hH, hHT, hHu⟩ := exists_all_undecided hU hfree s B hT hstab hno
have hnot : ¬cone s H ⊆ Bᶜ := fun h ↦ hno.2 ⟨H, hH, h⟩
obtain ⟨X, hX, hXB⟩ := Set.not_subset.mp hnot
have hXB : X ∈ B := not_not.mp hXB
obtain ⟨t, htX, htB⟩ := hlocal X (cone_mono s
(hHT.trans (hTA.trans inter_subset_left)) hX) hXB
have htH : (t : Set ℕ) ⊆ H := by
intro n hn
exact ((hX.2.2 (htX hn).1).resolve_left (htX hn).2).1
exact (hHu t htH).1 htB
theorem completelyRamsey
TopologyByExample.Mathias.PrefixOpen.completelyRamsey
Prefix-open partitions have pure decisions for selective free ultrafilters.
theorem PrefixOpen.completelyRamsey {U : Ultrafilter ℕ} (hU : IsSelective U)
(hfree : (U : Filter ℕ) ≤ cofinite) {B : Set (Set ℕ)} (hB : PrefixOpen B) :
CompletelyRamsey U B
Proof
:= by
classical
intro s A hA
obtain ⟨T, hT, hTA, hstab⟩ := exists_stabilizing_tail hU hfree s B hA
have hdec : CanForce U s B ∨ CanForce U s Bᶜ := by
by_contra! hno
obtain ⟨H, hH, _, hHu⟩ := exists_all_undecided hU hfree s B hT hstab hno
have hnot : ¬cone s H ⊆ Bᶜ := fun h ↦ hno.2 ⟨H, hH, h⟩
obtain ⟨X, hX, hXB⟩ := Set.not_subset.mp hnot
have hXB : X ∈ B := not_not.mp hXB
obtain ⟨t, htX, hst, htB⟩ := hB X hXB hX.1 (cut s)
have hstsub : s ⊆ t := by
intro n hn
rcases htX.2.2 (hX.2.1 hn) with hnt | hnt
· exact hnt
· exact False.elim (not_le_of_gt ((lt_cut_of_mem hn).trans_le hst) hnt.2)
have htsH : (↑(t \ s) : Set ℕ) ⊆ H := by
intro n hn
have hh := Finset.mem_sdiff.mp hn
exact ((hX.2.2 (htX.2.1 hh.1)).resolve_left hh.2).1
have htu := hHu (t \ s) htsH
have he : s ∪ (t \ s) = t := Finset.union_sdiff_of_subset hstsub
rw [he] at htu
exact htu.1 ⟨univ, univ_mem, htB⟩
refine ⟨T, hT, hTA.trans inter_subset_left, ?_⟩
have hs := hstab ∅ (by simp)
simp only [Finset.union_empty] at hs
exact hdec.imp hs.1 hs.2