Lean library · module TopologyByExample.Theorems.FiniteSupportKernel

A finite-support kernel lemma

Source file

An uncountable family of finite supports has a finite kernel from which petals can be chosen outside any prescribed countable set.

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.

Imports

theorem finiteSupportKernel_bounded

TopologyByExample.finiteSupportKernel_bounded

A bounded-size uncountable family has a kernel whose petals avoid any countable set.

theorem finiteSupportKernel_bounded {ι α : Type*} (A : Set ι) (hA : ¬A.Countable)
    (f : ι → Finset α) (n : ℕ) (hn : ∀ i ∈ A, (f i).card ≤ n) :
    ∃ r : Finset α, ∀ (B : Set ι), B.Countable → ∀ (C : Set α), C.Countable →
      ∃ i ∈ A, i ∉ B ∧ r ⊆ f i ∧ ∀ x ∈ f i, x ∈ C → x ∈ r
Proof
:= by
  classical
  induction n generalizing A f with
  | zero =>
      refine ⟨∅, fun B hB C _ ↦ ?_⟩
      obtain ⟨i, hi, hiB⟩ : ∃ i ∈ A, i ∉ B := by
        by_contra! h
        exact hA (hB.mono h)
      have he : f i = ∅ := Finset.card_eq_zero.mp (Nat.eq_zero_of_le_zero (hn i hi))
      exact ⟨i, hi, hiB, Finset.empty_subset _, by simp [he]⟩
  | succ n ih =>
      by_cases hex : ∃ a : α, ¬{i ∈ A | a ∈ f i}.Countable
      · obtain ⟨a, ha⟩ := hex
        obtain ⟨r, hr⟩ := ih {i ∈ A | a ∈ f i} ha (fun i ↦ (f i).erase a) (by
          intro i hi
          have he := Finset.card_erase_add_one hi.2
          have hb := hn i hi.1
          omega)
        refine ⟨insert a r, fun B hB C hC ↦ ?_⟩
        obtain ⟨i, hi, hiB, hri, hCi⟩ := hr B hB C hC
        refine ⟨i, hi.1, hiB, ?_, ?_⟩
        · exact Finset.insert_subset hi.2 (hri.trans (Finset.erase_subset _ _))
        · intro x hx hxC
          by_cases hxa : x = a
          · simp [hxa]
          · exact Finset.mem_insert_of_mem (hCi x (Finset.mem_erase.mpr ⟨hxa, hx⟩) hxC)
      · push Not at hex
        refine ⟨∅, fun B hB C hC ↦ ?_⟩
        have hbad : (B ∪ ⋃ a ∈ C, {i ∈ A | a ∈ f i}).Countable :=
          hB.union (hC.biUnion fun a _ ↦ hex a)
        obtain ⟨i, hi, hiB⟩ : ∃ i ∈ A, i ∉ B ∪ ⋃ a ∈ C, {i ∈ A | a ∈ f i} := by
          by_contra! h
          exact hA (hbad.mono h)
        refine ⟨i, hi, fun hb ↦ hiB (Or.inl hb), Finset.empty_subset _, ?_⟩
        intro x hx hxC
        exact (hiB (Or.inr (mem_iUnion.mpr ⟨x, mem_iUnion.mpr ⟨hxC, hi, hx⟩⟩))).elim

theorem finiteSupportKernel

TopologyByExample.finiteSupportKernel

Every uncountable family of finite supports has a countably avoidable kernel.

theorem finiteSupportKernel {ι α : Type*} (A : Set ι) (hA : ¬A.Countable)
    (f : ι → Finset α) :
    ∃ r : Finset α, ∀ (B : Set ι), B.Countable → ∀ (C : Set α), C.Countable →
      ∃ i ∈ A, i ∉ B ∧ r ⊆ f i ∧ ∀ x ∈ f i, x ∈ C → x ∈ r
Proof
:= by
  classical
  have hex : ∃ n, ¬{i ∈ A | (f i).card ≤ n}.Countable := by
    by_contra! h
    apply hA
    have he : A = ⋃ n : ℕ, {i ∈ A | (f i).card ≤ n} := by
      ext i
      simp only [mem_iUnion, mem_ofPred_eq]
      exact ⟨fun hi ↦ ⟨(f i).card, hi, le_rfl⟩, fun ⟨_, hi, _⟩ ↦ hi⟩
    rw [he]
    exact countable_iUnion h
  obtain ⟨n, hn⟩ := hex
  obtain ⟨r, hr⟩ := finiteSupportKernel_bounded _ hn f n (fun _ hi ↦ hi.2)
  exact ⟨r, fun B hB C hC ↦ by
    obtain ⟨i, hi, h⟩ := hr B hB C hC
    exact ⟨i, hi.1, h⟩⟩

On this site: Theorem: A finite kernel for an uncountable family of finite sets