Lean library · module TopologyByExample.Theorems.MathiasSigma
The completely Ramsey sigma-algebra
Countable selective fusion closes the completely Ramsey sets under countable unions, and closes the Ramsey-null ideal under countable unions.
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.
theorem exists_simultaneous_decisions
TopologyByExample.Mathias.exists_simultaneous_decisions
Countably many completely Ramsey partitions can be decided simultaneously at sufficiently long finite extensions of a given stem.
theorem exists_simultaneous_decisions {U : Ultrafilter ℕ} (hU : IsSelective U)
(s : Finset ℕ) (B : ℕ → Set (Set ℕ)) (hB : ∀ n, CompletelyRamsey U (B n))
{A : Set ℕ} (hA : A ∈ U) :
∃ H ∈ U, H ⊆ A ∧ ∀ t : Finset ℕ, (t : Set ℕ) ⊆ H →
∀ n < cut t, cone (s ∪ t) H ⊆ B n ∨ cone (s ∪ t) H ⊆ (B n)ᶜ
Proof
:= by
classical
choose C hC hCA hCB using fun t : Finset ℕ ↦ fun n : ℕ ↦ hB n (s ∪ t) A hA
let D (t : Finset ℕ) : Set ℕ := A ∩ ⋂ n ∈ Finset.range (cut t), C t n
have hD (t : Finset ℕ) : D t ∈ U :=
inter_mem hA ((Filter.biInter_finset_mem _).mpr fun n _ ↦ hC t n)
obtain ⟨H, hH, hHD, hHtail⟩ := hU.fusion D hD
refine ⟨H, hH, hHD.trans inter_subset_left, fun t ht n hn ↦ ?_⟩
have htail : H ∩ Ici (cut (s ∪ t)) ⊆ C t n := by
intro m hm
have hd := hHtail t ht m hm.1 ((Finset.sup_mono Finset.subset_union_right).trans hm.2)
exact mem_iInter₂.mp hd.2 n (Finset.mem_range.mpr hn)
exact (hCB t n).imp ((cone_mono_tail _ htail).trans) ((cone_mono_tail _ htail).trans)
theorem iUnion
TopologyByExample.Mathias.CompletelyRamsey.iUnion
The completely Ramsey sets are closed under countable unions.
theorem CompletelyRamsey.iUnion {U : Ultrafilter ℕ} (hU : IsSelective U)
(hfree : (U : Filter ℕ) ≤ cofinite) {B : ℕ → Set (Set ℕ)}
(hB : ∀ n, CompletelyRamsey U (B n)) : CompletelyRamsey U (⋃ n, B n)
Proof
:= by
classical
intro s A hA
obtain ⟨H, hH, hHA, hdec⟩ := exists_simultaneous_decisions hU s B hB hA
have hlocal (X : Set ℕ) (hX : X ∈ cone s H) (hXB : X ∈ ⋃ n, B n) :
∃ t : Finset ℕ, (t : Set ℕ) ⊆ X \ (s : Set ℕ) ∧ CanForce U (s ∪ t) (⋃ n, B n) := by
obtain ⟨n, hn⟩ := mem_iUnion.mp hXB
obtain ⟨t, htX, hnt, htcone⟩ := exists_long_extension hX n
have htH : (t : Set ℕ) ⊆ H := fun m hm ↦
((hX.2.2 (htX hm).1).resolve_left (htX hm).2).1
have hpos : cone (s ∪ t) H ⊆ B n := (hdec t htH n hnt).resolve_right
(fun hneg ↦ hneg htcone hn)
exact ⟨t, htX, H, hH, hpos.trans (subset_iUnion B n)⟩
rcases canForce_or_compl_of_local hU hfree s (⋃ n, B n) hH hlocal with h | h
· obtain ⟨K, hK, hk⟩ := h
exact ⟨K ∩ A, inter_mem hK hA, inter_subset_right,
Or.inl ((cone_mono _ inter_subset_left).trans hk)⟩
· obtain ⟨K, hK, hk⟩ := h
exact ⟨K ∩ A, inter_mem hK hA, inter_subset_right,
Or.inr ((cone_mono _ inter_subset_left).trans hk)⟩
theorem mono
TopologyByExample.Mathias.RamseyNull.mono
Subsets of Ramsey-null sets are Ramsey-null.
theorem RamseyNull.mono {U : Ultrafilter ℕ} {B C : Set (Set ℕ)} (hB : RamseyNull U B)
(hCB : C ⊆ B) : RamseyNull U C
Proof
:= by
intro s A hA
obtain ⟨H, hH, hHA, hh⟩ := hB s A hA
exact ⟨H, hH, hHA, hh.trans (compl_subset_compl.mpr hCB)⟩
theorem not_canForce
TopologyByExample.Mathias.RamseyNull.not_canForce
A Ramsey-null set cannot contain a cone with a free-ultrafilter tail.
theorem RamseyNull.not_canForce {U : Ultrafilter ℕ} (hfree : (U : Filter ℕ) ≤ cofinite)
{B : Set (Set ℕ)} (hB : RamseyNull U B) (s : Finset ℕ) : ¬CanForce U s B
Proof
:= by
rintro ⟨A, hA, hh⟩
obtain ⟨H, hH, hHA, hneg⟩ := hB s A hA
obtain ⟨X, hX⟩ := cone_nonempty hfree s hH
exact hneg hX (hh (cone_mono _ hHA hX))
theorem iUnion
TopologyByExample.Mathias.RamseyNull.iUnion
Countable unions of Ramsey-null sets are Ramsey-null.
theorem RamseyNull.iUnion {U : Ultrafilter ℕ} (hU : IsSelective U)
(hfree : (U : Filter ℕ) ≤ cofinite) {B : ℕ → Set (Set ℕ)}
(hB : ∀ n, RamseyNull U (B n)) : RamseyNull U (⋃ n, B n)
Proof
:= by
intro s A hA
obtain ⟨H, hH, hHA, hdec⟩ := exists_simultaneous_decisions hU s B
(fun n ↦ (hB n).completelyRamsey) hA
refine ⟨H, hH, hHA, fun X hX hXB ↦ ?_⟩
obtain ⟨n, hn⟩ := mem_iUnion.mp hXB
obtain ⟨t, htX, hnt, htcone⟩ := exists_long_extension hX n
have htH : (t : Set ℕ) ⊆ H := fun m hm ↦
((hX.2.2 (htX hm).1).resolve_left (htX hm).2).1
rcases hdec t htH n hnt with hp | hm
· exact (hB n).not_canForce hfree (s ∪ t) ⟨H, hH, hp⟩
· exact hm htcone hn
theorem ramseyNull_empty
TopologyByExample.Mathias.ramseyNull_empty
The empty set is Ramsey-null.
theorem ramseyNull_empty (U : Ultrafilter ℕ) : RamseyNull U ∅
Proof
:=
fun _ A hA ↦ ⟨A, hA, subset_rfl, by simp⟩
definition measurableSpace
TopologyByExample.Mathias.measurableSpace
The sigma-algebra of completely Ramsey sets associated with a selective free ultrafilter.
@[instance_reducible] def measurableSpace (U : Ultrafilter ℕ) (hU : IsSelective U)
(hfree : (U : Filter ℕ) ≤ cofinite) : MeasurableSpace (Set ℕ)
Definition
where
MeasurableSet' := CompletelyRamsey U
measurableSet_empty := (ramseyNull_empty U).completelyRamsey
measurableSet_compl := fun _ h ↦ h.compl
measurableSet_iUnion := fun _ h ↦ CompletelyRamsey.iUnion hU hfree h
theorem iUnion_countable
TopologyByExample.Mathias.RamseyNull.iUnion_countable
Ramsey-null sets are closed under unions over any countable index type.
theorem RamseyNull.iUnion_countable {U : Ultrafilter ℕ} (hU : IsSelective U)
(hfree : (U : Filter ℕ) ≤ cofinite) {ι : Type*} [Countable ι]
{B : ι → Set (Set ℕ)} (hB : ∀ i, RamseyNull U (B i)) : RamseyNull U (⋃ i, B i)
Proof
:= by
classical
cases isEmpty_or_nonempty ι with
| inl h => simpa using ramseyNull_empty U
| inr h =>
let : Encodable ι := Encodable.ofCountable ι
let f : ℕ → ι := fun n ↦ (Encodable.decode (α := ι) n).getD (Classical.choice h)
have hf : Function.Surjective f := fun i ↦ ⟨Encodable.encode i, by simp [f]⟩
have he : (⋃ i, B i) = ⋃ n, B (f n) := by
ext X
simp only [mem_iUnion]
exact ⟨fun ⟨i, hi⟩ ↦ let ⟨n, hn⟩ := hf i; ⟨n, hn ▸ hi⟩,
fun ⟨n, hn⟩ ↦ ⟨f n, hn⟩⟩
rw [he]
exact RamseyNull.iUnion hU hfree (fun n ↦ hB (f n))
theorem ramseyNull_of_not_canForce
TopologyByExample.Mathias.CompletelyRamsey.ramseyNull_of_not_canForce
A completely Ramsey set is null if no positive colour can be forced at any stem.
theorem CompletelyRamsey.ramseyNull_of_not_canForce {U : Ultrafilter ℕ}
{B : Set (Set ℕ)} (hB : CompletelyRamsey U B) (h : ∀ s, ¬CanForce U s B) :
RamseyNull U B
Proof
:= by
intro s A hA
obtain ⟨H, hH, hHA, hp | hn⟩ := hB s A hA
· exact (h s ⟨H, hH, hp⟩).elim
· exact ⟨H, hH, hHA, hn⟩
theorem of_sdiff_null
TopologyByExample.Mathias.CompletelyRamsey.of_sdiff_null
Removing a Ramsey-null subset from a completely Ramsey set preserves complete Ramseyness.
theorem CompletelyRamsey.of_sdiff_null {U : Ultrafilter ℕ} {B C : Set (Set ℕ)}
(hB : CompletelyRamsey U B) (hCB : C ⊆ B) (hN : RamseyNull U (B \ C)) :
CompletelyRamsey U C
Proof
:= by
intro s A hA
obtain ⟨H, hH, hHA, hh⟩ := hB s A hA
obtain ⟨K, hK, hKH, hk⟩ := hN s H hH
refine ⟨K, hK, hKH.trans hHA, ?_⟩
rcases hh with hp | hn
· left
intro X hX
by_contra hxc
exact hk hX ⟨hp (cone_mono s hKH hX), hxc⟩
· exact Or.inr ((cone_mono s hKH).trans (hn.trans (compl_subset_compl.mpr hCB)))
theorem prefixOpen_compl_cone
TopologyByExample.Mathias.prefixOpen_compl_cone
The complement of a cone is prefix-open on the infinite subsets.
theorem prefixOpen_compl_cone (s : Finset ℕ) (A : Set ℕ) : PrefixOpen (cone s A)ᶜ
Proof
:= by
classical
intro X hX hXi k
have hex : (∃ n ∈ s, n ∉ X) ∨ ∃ n ∈ X, n ∉ (s : Set ℕ) ∪ (A ∩ Ici (cut s)) := by
by_contra! h
exact hX ⟨hXi, h.1, h.2⟩
rcases hex with ⟨n, hns, hnX⟩ | ⟨n, hnX, hnA⟩
· have hbase : X ∈ cone ∅ univ := ⟨hXi, by simp, by
intro n _
exact Or.inr ⟨mem_univ _, Nat.zero_le _⟩⟩
obtain ⟨t, htX, hkt, htcone⟩ := exists_long_extension hbase (max k n)
have hnt : n < cut t := (le_max_right _ _).trans_lt hkt
refine ⟨t, by simpa using htcone, (le_max_left _ _).trans hkt.le, fun Y hY hy ↦ ?_⟩
have hnY : n ∈ Y := hy.2.1 hns
rcases hY.2.2 hnY with hntm | hntm
· exact hnX (htX hntm).1
· exact (not_le_of_gt hnt) hntm.2
· have hbase : X ∈ cone ∅ univ := ⟨hXi, by simp, by
intro n _
exact Or.inr ⟨mem_univ _, Nat.zero_le _⟩⟩
obtain ⟨t, htX, hkt, htcone⟩ := exists_long_extension hbase (max k n)
have htcone : X ∈ cone t univ := by simpa using htcone
have hnt : n < cut t := (le_max_right _ _).trans_lt hkt
have hntm : n ∈ t := (htcone.2.2 hnX).resolve_right (fun h ↦ (not_le_of_gt hnt) h.2)
refine ⟨t, htcone, (le_max_left _ _).trans hkt.le, fun Y hY hy ↦ ?_⟩
exact hnA (hy.2.2 (hY.2.1 hntm))
theorem completelyRamsey_cone
TopologyByExample.Mathias.completelyRamsey_cone
Every individual cone is completely Ramsey for a selective free ultrafilter.
theorem completelyRamsey_cone {U : Ultrafilter ℕ} (hU : IsSelective U)
(hfree : (U : Filter ℕ) ≤ cofinite) (s : Finset ℕ) (A : Set ℕ) :
CompletelyRamsey U (cone s A)
Proof
:= by
simpa only [compl_compl] using ((prefixOpen_compl_cone s A).completelyRamsey hU hfree).compl