FormalConjectures/ErdosProblems/602.lean
Explanation legend Lean4 Domain Explanation Language (L4DEL)
L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.
- L4DEL
- Lean4 Domain Explanation Language
Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.
Project sources: Pinned project documentation, Formal Conjectures paper, arXiv v1
19 declarations, 2 contain sorry, 0 declared as axioms
Erdős Problem 602
Reference: erdosproblems.com/602
Imports (1)
- def
Erdos602.IsMonochromaticA setA ⊆ αis monochromatic under a 2-colouringf : α → Fin 2if all elements ofAreceive the same colour line 51 sourceSource documentation
A set
A ⊆ αis monochromatic under a 2-colouringf : α → Fin 2if all elements ofAreceive the same colour.no axioms what this means
Statement uses:
Fin,OfNat.ofNat,Nat,SetProof uses:
Membership.mem,Eq3 instances, coercions and auxiliary constants left out.
def IsMonochromatic {α : Type*} (f : α → Fin 2) (A : Set α) : Prop := … - def
Erdos602.HasPropertyBA family(A_i)_{i ∈ I}of subsets ofαhas Property B if there exists a 2-colouringf : α → Fin 2such that noA_iis monochromatic line 56 sourceSource documentation
A family
(A_i)_{i ∈ I}of subsets ofαhas Property B if there exists a 2-colouringf : α → Fin 2such that noA_iis monochromatic.no axioms what this means
Statement uses:
SetProof uses:
Exists,Fin,OfNat.ofNat,Nat,Not, Erdos602.IsMonochromatic1 instances, coercions and auxiliary constants left out.
def HasPropertyB {α : Type*} (I : Type*) (A : I → Set α) : Prop := … - theorem
Erdos602.erdos_602Does every almost-disjoint family of countably infinite sets whose pairwise intersections all have size ≠ 1 have Property B? sorry line 78 sourceSource documentation
Does every almost-disjoint family of countably infinite sets whose pairwise intersections all have size ≠ 1 have Property B?
Formally: let
αbe any type, let(A_i)_{i ∈ I}be a family of countably infinite subsets ofαsuch that for alli ≠ j, the intersectionA_i ∩ A_jis finite and|A_i ∩ A_j| ≠ 1. Does there exist a 2-colouringf : α → Fin 2such that noA_iis monochromatic?This is an open question about Property B for almost-disjoint families with a forbidden intersection size of 1.
Note: This generalises the formulation in which the ground set is
ℕ. Since every countably infinite set is in bijection withℕ, the two formulations are equivalent, but working over an arbitrary ground type makes the statement apply immediately to, e.g., almost-disjoint families of countable subsets of an uncountable space.depends on sorry what this means
Statement uses:
Iff,True,Set,And,Set.Countable,Set.Infinite,Ne,Set.Finite,Inter.inter,Nat,Set.ncard,OfNat.ofNat, Erdos602.HasPropertyBProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous4 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem erdos_602 : answer(sorry) ↔ ∀ {α : Type*} {I : Type*} (A : I → Set α), (∀ i, (A i).Countable ∧ (A i).Infinite) → (∀ i j, i ≠ j → (A i ∩ A j).Finite) → (∀ i j, i ≠ j → Set.ncard (A i ∩ A j) ≠ 1) → HasPropertyB I A := by …Mentions: Erdos602.HasPropertyB
- theorem
Erdos602.erdos_602.variants.disjointTrivial case: pairwise disjoint families line 99 sourceSource documentation
Trivial case: pairwise disjoint families.
If the
A_iare pairwise disjoint (all intersections are empty, which in particular satisfies|A_i ∩ A_j| ≠ 1), then Property B holds trivially.Proof sketch: Since each
A_iis infinite, it has (at least) two distinct elementsa_iandb_i. We can define a colouring that assigns colour 0 toa_iand colour 1 tob_ifor eachi(using disjointness, these choices don't conflict), and extend arbitrarily elsewhere. Then noA_iis monochromatic.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Iff,True,Set,Set.Infinite,Ne,Disjoint, Erdos602.HasPropertyBProof uses:
id,Eq.mpr,Eq,true_iff,Exists,And,Membership.mem,Set.Nonempty,Set.Infinite.nonempty,SDiff.sdiff,Singleton.singleton,Set.Infinite.sdiff,Set.finite_singleton,Not,Exists.intro,And.intro,Eq.mp,congrArg,Eq.symm,diteand 22 more32 instances, coercions and auxiliary constants left out.
Tactic trace: 41 steps
Open to load the checked before-and-after goal states.
theorem erdos_602.variants.disjoint : answer(True) ↔ ∀ {α : Type*} {I : Type*} (A : I → Set α), (∀ i, (A i).Infinite) → (∀ i j, i ≠ j → Disjoint (A i) (A j)) → HasPropertyB I A := by …Mentions: Erdos602.HasPropertyB
- theorem
Erdos602.erdos_602.variants.countable_indexCountable index set case sorry line 158 sourceSource documentation
Countable index set case.
If the index set is countable, the answer is yes, and the intersection condition is unnecessary. This is Bernstein's Lemma: every countable system of infinite sets has Property B.
depends on sorry what this means
Statement uses:
Iff,True,Nat,Set,And,Set.Countable,Set.Infinite,Ne,Set.Finite,Inter.inter,Set.ncard,OfNat.ofNat, Erdos602.HasPropertyBProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous4 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem erdos_602.variants.countable_index : answer(True) ↔ ∀ {α : Type*} (A : ℕ → Set α), (∀ i, (A i).Countable ∧ (A i).Infinite) → (∀ i j, i ≠ j → (A i ∩ A j).Finite) → (∀ i j, i ≠ j → Set.ncard (A i ∩ A j) ≠ 1) → HasPropertyB ℕ A := by …Mentions: Erdos602.HasPropertyB
- theorem
Erdos602.erdos_602.variants.single_setIntersections of size ≥ 2 suffice line 173 sourceSource documentation
Intersections of size ≥ 2 suffice.
For a single countably infinite set
A ⊆ α, there trivially exists a 2-colouring ofαthat makesAnon-monochromatic: sinceAis infinite, it has two distinct elements, so any colouring that assigns them different colours works.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Set,Set.Infinite,Exists,Fin,OfNat.ofNat,Nat,Not, Erdos602.IsMonochromaticProof uses:
Membership.mem,Set.Nonempty,Set.Infinite.nonempty,SDiff.sdiff,Singleton.singleton,Set.Infinite.sdiff,Set.finite_singleton,Eq,And,Eq.mp,Eq.trans,congrArg,Exists.intro,ite,Classical.propDecidable,Eq.mpr,id,absurd,Ne.symm,of_eq_trueand 10 more14 instances, coercions and auxiliary constants left out.
Tactic trace: 20 steps
Open to load the checked before-and-after goal states.
theorem erdos_602.variants.single_set {α : Type*} (A : Set α) (hA : A.Infinite) : ∃ f : α → Fin 2, ¬IsMonochromatic f A := by …Mentions: Erdos602.IsMonochromatic
- theorem
Erdos602.erdos_602.variants.empty_indexEmpty index set line 206 sourceSource documentation
Empty index set.
If the index set
Iis empty (has no elements), then Property B holds vacuously: any 2-colouring works, since there are no sets to be made non-monochromatic.standard axioms: propext what this means
Statement uses:
PEmpty,Set,Set.Infinite, Erdos602.HasPropertyBProof uses:
Exists.intro,Fin,OfNat.ofNat,Nat,Not, Erdos602.IsMonochromatic,PEmpty.elim3 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
theorem erdos_602.variants.empty_index {α : Type*} : ∀ (A : PEmpty → Set α), (∀ i, (A i).Infinite) → HasPropertyB PEmpty A := by …Mentions: Erdos602.HasPropertyB
- theorem
Erdos602.erdos_602.variants.unique_indexUnique index set line 220 sourceSource documentation
Unique index set.
If the index set has exactly one element (i.e.,
[Unique I]), then Property B holds: any 2-colouring that makes the single setA (default : I)non-monochromatic works. This follows from the single-set case.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Unique,Set,Set.Infinite, Erdos602.HasPropertyBProof uses:
Fin,OfNat.ofNat,Nat,Not, Erdos602.IsMonochromatic,Inhabited.default,Exists, Erdos602.erdos_602.variants.single_set,Exists.intro,Eq.mpr,id,Eq,congrArg,Unique.eq_default3 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
theorem erdos_602.variants.unique_index {α : Type*} (I : Type*) [Unique I] (A : I → Set α) (hInfinite : ∀ i, (A i).Infinite) : HasPropertyB I A := by …Mentions: Erdos602.HasPropertyB
- theorem
Erdos602.erdos_602.variants.two_setsTwo infinite sets with pairwise intersection of size ≠ 1 line 245 sourceSource documentation
Two infinite sets with pairwise intersection of size ≠ 1.
If the family consists of exactly two countably infinite sets
A₀andA₁with|A₀ ∩ A₁| ≠ 1(and finite), then Property B holds.Proof sketch:
- If
A₀ ∩ A₁ = ∅: the sets are disjoint. Pick distincta, b ∈ A₀and distinctc, d ∈ A₁. Colourbandcwith 1, everything else with 0. ThenA₀hasa(colour 0) andb(colour 1), andA₁hasc(colour 1) andd(colour 0), so neither is monochromatic. - If
|A₀ ∩ A₁| ≥ 2: the intersection contains two distinct pointsxandy. Assignxcolour 0 andycolour 1. BothA₀andA₁containxandy, so neither is monochromatic.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Iff,True,Fin,OfNat.ofNat,Nat,Set,Set.Infinite,Set.Finite,Inter.inter,Ne,Set.ncard, Erdos602.HasPropertyBProof uses:
id,Eq.mpr,Eq,true_iff,dite,EmptyCollection.emptyCollection,Membership.mem,Set.Nonempty,Set.Infinite.nonempty,SDiff.sdiff,Singleton.singleton,Set.Infinite.sdiff,Set.finite_singleton,Not,And.intro,Eq.mp,congrArg,Eq.rec,Eq.symm,Exists.introand 54 more28 instances, coercions and auxiliary constants left out.
Tactic trace: 73 steps
Open to load the checked before-and-after goal states.
theorem erdos_602.variants.two_sets : answer(True) ↔ ∀ {α : Type*} (A : Fin 2 → Set α), (∀ i, (A i).Infinite) → (A 0 ∩ A 1).Finite → Set.ncard (A 0 ∩ A 1) ≠ 1 → HasPropertyB (Fin 2) A := by …Mentions: Erdos602.HasPropertyB
- If
- lemma
Erdos602.evens_infiniteline 334 source - lemma
Erdos602.odds_infiniteline 340 source - lemma
Erdos602.evens_inter_odds_emptyline 346 source - example
Erdos602.(example at line 353)line 353 sourceSource documentation
The empty family vacuously has Property B, exercising
erdos_602.variants.empty_index.example : HasPropertyB PEmpty (fun (_ : PEmpty) => (Set.univ : Set ℕ)) := …
Mentions: Erdos602.HasPropertyB
- example
Erdos602.(example at line 359)line 359 sourceSource documentation
Any infinite set, viewed as a singleton family, has Property B, exercising
erdos_602.variants.unique_index.example (A : Set ℕ) (hA : A.Infinite) : HasPropertyB Unit (fun _ => A) := …Mentions: Erdos602.HasPropertyB
- example
Erdos602.(example at line 367)line 367 sourceSource documentation
The evens/odds family on ℕ satisfies all three hypotheses of the main theorem: countably infinite sets, pairwise finite (in fact empty) intersection, and intersection size ≠ 1 (it equals 0). This shows the hypotheses are non-vacuous.
example : let A : Fin 2 → Set ℕ := ![{n | Even n}, {n | Odd n}] … - example
Erdos602.(example at line 396)line 396 sourceSource documentation
The evens/odds family on ℕ has Property B, witnessed by the colouring
f(n) = 1ifn ∈ {1, 2}, elsef(n) = 0. Concretely:f(0) = 0 ≠ 1 = f(2)shows evens are not monochromatic, andf(1) = 1 ≠ 0 = f(3)shows odds are not monochromatic.example : HasPropertyB (Fin 2) (![{n : ℕ | Even n}, {n | Odd n}] : Fin 2 → Set ℕ) := by …Mentions: Erdos602.HasPropertyB
- example
Erdos602.(example at line 423)line 423 sourceSource documentation
The intersection
{0, 2, 4, …} ∩ {0, 1, 3, 5, …} = {0}has size 1, showing the hypothesisSet.ncard (A i ∩ A j) ≠ 1correctly excludes this family. This confirms the boundary condition is faithfully encoded.example : Set.ncard ({n : ℕ | Even n} ∩ {n : ℕ | n = 0 ∨ Odd n}) = 1 := by … - def
Erdos602.disjoint_without_infinite_claimA natural but FALSE relaxation oferdos_602.variants.disjoint: drop the hypothesis that eachA iis infinite line 440 sourceSource documentation
A natural but FALSE relaxation of
erdos_602.variants.disjoint: drop the hypothesis that eachA iis infinite. The originaldisjointvariant requires(∀ i, (A i).Infinite). Without it, the claim is false.standard axioms: Classical.choice, Quot.sound, propext what this means
Proof uses:
Set,Ne,Disjoint, Erdos602.HasPropertyB6 instances, coercions and auxiliary constants left out.
def disjoint_without_infinite_claim : Prop := …
- theorem
Erdos602.disjoint_without_infinite_claim.disproofFormal disproof ofdisjoint_without_infinite_claimline 453 sourceSource documentation
Formal disproof of
disjoint_without_infinite_claim.Counterexample: Take
α = ℕ,I = Fin 2, withA 0 = {0}andA 1 = {1}. These are pairwise disjoint, satisfying the only hypothesis. But singleton sets are vacuously monochromatic under any colouring: the only pair(x, y) ∈ {0} × {0}is(0, 0), andf 0 = f 0trivially. So any colouring makesA 0monochromatic, meaningHasPropertyBfails.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Not, Erdos602.disjoint_without_infinite_claimProof uses: Erdos602.HasPropertyB,
Nat,Fin,OfNat.ofNat,ite,Set,Eq,Singleton.singleton,Ne,List,List.Mem,List.finRange,HEq,Membership.mem,Finset,Fintype.elems,Fintype.complete,Disjoint,List.cons,List.Mem.headand 27 more41 instances, coercions and auxiliary constants left out.
Tactic trace: 12 steps
Open to load the checked before-and-after goal states.
theorem disjoint_without_infinite_claim.disproof : ¬ disjoint_without_infinite_claim := by …Mentions: Erdos602.disjoint_without_infinite_claim