FormalConjectures/ErdosProblems/602.lean

GitHub source file

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)
  1. def Erdos602.IsMonochromatic A set A ⊆ α is monochromatic under a 2-colouring f : α → Fin 2 if all elements of A receive the same colour line 51 source

    Source documentation

    A set A ⊆ α is monochromatic under a 2-colouring f : α → Fin 2 if all elements of A receive the same colour.

    no axioms what this means

    Statement uses: Fin, OfNat.ofNat, Nat, Set

    Proof uses: Membership.mem, Eq

    3 instances, coercions and auxiliary constants left out.

    def IsMonochromatic {α : Type*} (f : α → Fin 2) (A : Set α) : Prop :=
    …
  2. def Erdos602.HasPropertyB A family (A_i)_{i ∈ I} of subsets of α has Property B if there exists a 2-colouring f : α → Fin 2 such that no A_i is monochromatic line 56 source

    Source documentation

    A family (A_i)_{i ∈ I} of subsets of α has Property B if there exists a 2-colouring f : α → Fin 2 such that no A_i is monochromatic.

    no axioms what this means

    Statement uses: Set

    Proof uses: Exists, Fin, OfNat.ofNat, Nat, Not, Erdos602.IsMonochromatic

    1 instances, coercions and auxiliary constants left out.

    def HasPropertyB {α : Type*} (I : Type*) (A : I → Set α) : Prop :=
    …
  3. theorem Erdos602.erdos_602 Does every almost-disjoint family of countably infinite sets whose pairwise intersections all have size ≠ 1 have Property B? sorry line 78 source

    Source 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 all i ≠ j, the intersection A_i ∩ A_j is finite and |A_i ∩ A_j| ≠ 1. Does there exist a 2-colouring f : α → Fin 2 such that no A_i is 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.HasPropertyB

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous

    4 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

  4. theorem Erdos602.erdos_602.variants.disjoint Trivial case: pairwise disjoint families line 99 source

    Source documentation

    Trivial case: pairwise disjoint families.

    If the A_i are 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_i is infinite, it has (at least) two distinct elements a_i and b_i. We can define a colouring that assigns colour 0 to a_i and colour 1 to b_i for each i (using disjointness, these choices don't conflict), and extend arbitrarily elsewhere. Then no A_i is monochromatic.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Iff, True, Set, Set.Infinite, Ne, Disjoint, Erdos602.HasPropertyB

    Proof 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, dite and 22 more

    32 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

  5. theorem Erdos602.erdos_602.variants.countable_index Countable index set case sorry line 158 source

    Source 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.HasPropertyB

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous

    4 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

  6. theorem Erdos602.erdos_602.variants.single_set Intersections of size ≥ 2 suffice line 173 source

    Source documentation

    Intersections of size ≥ 2 suffice.

    For a single countably infinite set A ⊆ α, there trivially exists a 2-colouring of α that makes A non-monochromatic: since A is 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.IsMonochromatic

    Proof 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_true and 10 more

    14 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

  7. theorem Erdos602.erdos_602.variants.empty_index Empty index set line 206 source

    Source documentation

    Empty index set.

    If the index set I is 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.HasPropertyB

    Proof uses: Exists.intro, Fin, OfNat.ofNat, Nat, Not, Erdos602.IsMonochromatic, PEmpty.elim

    3 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

  8. theorem Erdos602.erdos_602.variants.unique_index Unique index set line 220 source

    Source 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 set A (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.HasPropertyB

    Proof 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_default

    3 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

  9. theorem Erdos602.erdos_602.variants.two_sets Two infinite sets with pairwise intersection of size ≠ 1 line 245 source

    Source documentation

    Two infinite sets with pairwise intersection of size ≠ 1.

    If the family consists of exactly two countably infinite sets A₀ and A₁ with |A₀ ∩ A₁| ≠ 1 (and finite), then Property B holds.

    Proof sketch:

    • If A₀ ∩ A₁ = ∅: the sets are disjoint. Pick distinct a, b ∈ A₀ and distinct c, d ∈ A₁. Colour b and c with 1, everything else with 0. Then A₀ has a (colour 0) and b (colour 1), and A₁ has c (colour 1) and d (colour 0), so neither is monochromatic.
    • If |A₀ ∩ A₁| ≥ 2: the intersection contains two distinct points x and y. Assign x colour 0 and y colour 1. Both A₀ and A₁ contain x and y, 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.HasPropertyB

    Proof 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.intro and 54 more

    28 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

  10. lemma Erdos602.evens_infinite line 334 source
  11. lemma Erdos602.odds_infinite line 340 source
  12. lemma Erdos602.evens_inter_odds_empty line 346 source
  13. example Erdos602.(example at line 353) line 353 source

    Source 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

  14. example Erdos602.(example at line 359) line 359 source

    Source 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

  15. example Erdos602.(example at line 367) line 367 source

    Source 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}]
    …
  16. example Erdos602.(example at line 396) line 396 source

    Source documentation

    The evens/odds family on ℕ has Property B, witnessed by the colouring f(n) = 1 if n ∈ {1, 2}, else f(n) = 0. Concretely: f(0) = 0 ≠ 1 = f(2) shows evens are not monochromatic, and f(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

  17. example Erdos602.(example at line 423) line 423 source

    Source documentation

    The intersection {0, 2, 4, …} ∩ {0, 1, 3, 5, …} = {0} has size 1, showing the hypothesis Set.ncard (A i ∩ A j) ≠ 1 correctly excludes this family. This confirms the boundary condition is faithfully encoded.

    example : Set.ncard ({n : ℕ | Even n} ∩ {n : ℕ | n = 0 ∨ Odd n}) = 1 := by
    …
  18. def Erdos602.disjoint_without_infinite_claim A natural but FALSE relaxation of erdos_602.variants.disjoint: drop the hypothesis that each A i is infinite line 440 source

    Source documentation

    A natural but FALSE relaxation of erdos_602.variants.disjoint: drop the hypothesis that each A i is infinite. The original disjoint variant 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.HasPropertyB

    6 instances, coercions and auxiliary constants left out.

    def disjoint_without_infinite_claim : Prop :=
    …
  19. theorem Erdos602.disjoint_without_infinite_claim.disproof Formal disproof of disjoint_without_infinite_claim line 453 source

    Source documentation

    Formal disproof of disjoint_without_infinite_claim.

    Counterexample: Take α = ℕ, I = Fin 2, with A 0 = {0} and A 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), and f 0 = f 0 trivially. So any colouring makes A 0 monochromatic, meaning HasPropertyB fails.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Not, Erdos602.disjoint_without_infinite_claim

    Proof 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.head and 27 more

    41 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