Lean library ยท module TopologyByExample.Theorems.AlmostDisjointFamily
Infinite maximal almost-disjoint families on the naturals
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.
structure IsAlmostDisjointFamily
TopologyByExample.IsAlmostDisjointFamily
An almost-disjoint family consists of infinite sets with finite pairwise intersections.
structure IsAlmostDisjointFamily (๐ : Set (Set โ)) : Prop where
/-- Each member is infinite. -/
infinite_members : โ A โ ๐, A.Infinite
/-- Distinct members meet in a finite set. -/
finite_inter : ๐.Pairwise fun A B => (A โฉ B).Finite
structure IsMaximalAlmostDisjointFamily
TopologyByExample.IsMaximalAlmostDisjointFamily
A maximal almost-disjoint family meets every infinite set infinitely in some member.
structure IsMaximalAlmostDisjointFamily (๐ : Set (Set โ)) : Prop
extends IsAlmostDisjointFamily ๐ where
/-- Every infinite set has infinite intersection with a member. -/
meets_infinite : โ B : Set โ, B.Infinite โ โ A โ ๐, (A โฉ B).Infinite
theorem exists_maximal_extension
TopologyByExample.IsAlmostDisjointFamily.exists_maximal_extension
Every almost-disjoint family extends to a maximal almost-disjoint family.
theorem IsAlmostDisjointFamily.exists_maximal_extension {๐ฎ : Set (Set โ)}
(h๐ฎ : IsAlmostDisjointFamily ๐ฎ) :
โ ๐, ๐ฎ โ ๐ โง IsMaximalAlmostDisjointFamily ๐
Proof
:= by
classical
have hbound : โ c โ {๐ | IsAlmostDisjointFamily ๐},
IsChain (ยท โ ยท) c โ c.Nonempty โ
โ ub โ {๐ | IsAlmostDisjointFamily ๐}, โ s โ c, s โ ub := by
intro c hc hchain _
refine โจโโ c, ?_, fun s hs => subset_sUnion_of_mem hsโฉ
constructor
ยท intro A hA
obtain โจs, hs, hAsโฉ := hA
exact (hc hs).infinite_members A hAs
ยท intro A hA B hB hAB
obtain โจs, hs, hAsโฉ := hA
obtain โจt, ht, hBtโฉ := hB
rcases hchain.total hs ht with hst | hts
ยท exact (hc ht).finite_inter (hst hAs) hBt hAB
ยท exact (hc hs).finite_inter hAs (hts hBt) hAB
obtain โจ๐, hsub, hmaxโฉ := zorn_subset_nonempty
{๐ | IsAlmostDisjointFamily ๐} hbound ๐ฎ h๐ฎ
refine โจ๐, hsub, hmax.1, ?_โฉ
intro B hB
by_contra hn
have hfin : โ A โ ๐, (A โฉ B).Finite := by
intro A hA
exact not_infinite.mp (fun hi => hn โจA, hA, hiโฉ)
have hins : IsAlmostDisjointFamily (insert B ๐) := by
constructor
ยท intro A hA
rcases hA with rfl | hA
ยท exact hB
ยท exact hmax.1.infinite_members A hA
ยท intro C hC D hD hCD
rcases hC with rfl | hC <;> rcases hD with rfl | hD
ยท exact (hCD rfl).elim
ยท simpa only [inter_comm] using hfin D hD
ยท exact hfin C hC
ยท exact hmax.1.finite_inter hC hD hCD
have hBA : B โ ๐ := hmax.2 hins (subset_insert B ๐) (mem_insert B ๐)
exact hB (by simpa using hfin B hBA)
On this site: Theorem: Every almost-disjoint family extends to a maximal one
definition natPairColumn
TopologyByExample.natPairColumn
One column of the standard pairing of pairs of naturals with naturals.
def natPairColumn (n : โ) : Set โ
:= range (Nat.pair n)
theorem infinite_natPairColumn
TopologyByExample.infinite_natPairColumn
Every pairing column is infinite.
theorem infinite_natPairColumn (n : โ) : (natPairColumn n).Infinite
Proof
:= by
apply infinite_range_of_injective
intro a b hab
exact (Nat.pair_eq_pair.mp hab).2
theorem disjoint_natPairColumn
TopologyByExample.disjoint_natPairColumn
Distinct pairing columns are disjoint.
theorem disjoint_natPairColumn {m n : โ} (hmn : m โ n) :
Disjoint (natPairColumn m) (natPairColumn n)
Proof
:= by
apply disjoint_left.mpr
rintro x โจa, rflโฉ โจb, hbโฉ
exact hmn (Nat.pair_eq_pair.mp hb).1.symm
theorem infinite_range_natPairColumn
TopologyByExample.infinite_range_natPairColumn
The pairing columns form an infinite family.
theorem infinite_range_natPairColumn : (range natPairColumn).Infinite
Proof
:= by
apply infinite_range_of_injective
intro m n hmn
by_contra hne
have hd := disjoint_natPairColumn hne
have hm : Nat.pair m 0 โ natPairColumn m := mem_range_self 0
exact disjoint_left.mp hd hm (hmn โธ hm)
theorem almostDisjoint_natPairColumns
TopologyByExample.almostDisjoint_natPairColumns
The pairing columns form an almost-disjoint family.
theorem almostDisjoint_natPairColumns : IsAlmostDisjointFamily (range natPairColumn)
Proof
:= by
constructor
ยท rintro A โจn, rflโฉ
exact infinite_natPairColumn n
ยท rintro A โจm, rflโฉ B โจn, rflโฉ hmn
have hd := disjoint_natPairColumn (fun h => hmn (congrArg natPairColumn h))
rw [hd.inter_eq]
exact finite_empty
theorem exists_infinite_maximalAlmostDisjointFamily
TopologyByExample.exists_infinite_maximalAlmostDisjointFamily
There exists an infinite maximal almost-disjoint family on the naturals.
theorem exists_infinite_maximalAlmostDisjointFamily :
โ ๐ : Set (Set โ), ๐.Infinite โง IsMaximalAlmostDisjointFamily ๐
Proof
:= by
obtain โจ๐, hsub, h๐โฉ := almostDisjoint_natPairColumns.exists_maximal_extension
exact โจ๐, infinite_range_natPairColumn.mono hsub, h๐โฉ
On this site: Theorem: There exists an infinite maximal almost-disjoint family