FormalConjectures/ErdosProblems/1212.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

10 declarations, 1 contain sorry, 0 declared as axioms

Erdős Problem 1212

References:

This file also records machine-checked cores of verified partial results (2026): a composite-anchor sufficient reduction and an impossibility theorem for periodic certificates; see the corresponding lemmas below.

Imports (1)
  1. def Erdos1212.Valid A vertex of the strengthened problem: a visible lattice point with both coordinates exceeding 1 and at least one coordinate composite line 40 source

    Source documentation

    A vertex of the strengthened problem: a visible lattice point with both coordinates exceeding 1 and at least one coordinate composite.

    standard axioms: propext what this means

    Statement uses: Prod, Nat

    Proof uses: And, LT.lt, OfNat.ofNat, Prod.fst, Prod.snd, Eq, Nat.gcd, Or, Not, Nat.Prime

    2 instances, coercions and auxiliary constants left out.

    def Valid (p : ℕ × ℕ) : Prop :=
    …
  2. theorem Erdos1212.valid_four_three Sanity check for Valid: the vertex $(4, 3)$ is valid — both coordinates exceed $1$, they are coprime, and $4$ is composite line 46 source

    Source documentation

    Sanity check for Valid: the vertex $(4, 3)$ is valid — both coordinates exceed $1$, they are coprime, and $4$ is composite.

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

    Statement uses: Erdos1212.Valid, Prod.mk, Nat, OfNat.ofNat

    Proof uses: And.intro, LT.lt, Prod.fst, And, Prod.snd, Eq, Nat.gcd, Or, Not, Nat.Prime, of_decide_eq_true, id, Bool, Decidable.decide, Bool.true, Eq.refl

    8 instances, coercions and auxiliary constants left out.

    Tactic trace: 2 steps

    Open to load the checked before-and-after goal states.

    theorem valid_four_three : Valid (4, 3) := by
    …

    Mentions: Erdos1212.Valid

  3. def Erdos1212.Adj Two lattice points are adjacent iff they differ by exactly 1 in exactly one coordinate line 50 source

    Source documentation

    Two lattice points are adjacent iff they differ by exactly 1 in exactly one coordinate.

    no axioms what this means

    Statement uses: Prod, Nat

    Proof uses: Or, And, Eq, Prod.fst, Prod.snd, HAdd.hAdd, OfNat.ofNat

    3 instances, coercions and auxiliary constants left out.

    def Adj (p q : ℕ × ℕ) : Prop :=
    …
  4. theorem Erdos1212.erdos_1212 Documented declaration: erdos_1212 sorry line 67 source

    Source documentation

    Let $G$ be the graph with vertex set those pairs $(x,y)\in \mathbb{N}^2$ with $\mathrm{gcd}(x,y)=1$, in which we join two vertices if the differ in only one coordinate, and there by $\pm 1$.

    Is there a path going to infinity on $G$, say $P$, such that for all $(x,y)\in P$ both $\min(x,y)>1$ and at least one of $x$ or $y$ is composite?

    The weaker version (only $\min(x,y) > 1$) was solved by C. Stewart via the prime-pair path $(p_k, p_{k+1}) \to (p_{k+1}, p_{k+2})$, as recounted in [Er80]; the compositeness condition forbids those anchors and the question is open.

    depends on sorry what this means

    Statement uses: Iff, True, Exists, Nat, Prod, And, Function.Injective, Erdos1212.Adj, HAdd.hAdd, OfNat.ofNat, Erdos1212.Valid, Filter.Tendsto, Prod.fst, Prod.snd, Filter.atTop

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

    8 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

    theorem erdos_1212 :
        answer(sorry) ↔ ∃ f : ℕ → ℕ × ℕ, Function.Injective f ∧ (∀ n, Adj (f n) (f (n + 1))) ∧
          (∀ n, Valid (f n)) ∧
          Tendsto (fun n => (f n).1 + (f n).2) atTop atTop := by
    …

    Mentions: Erdos1212.Adj, Erdos1212.Valid

  5. theorem Erdos1212.vertical_leg_valid Core of the composite-anchor reduction: vertical-leg vertices line 79 source

    Source documentation

    Core of the composite-anchor reduction: vertical-leg vertices $(a, s)$ for $b \le s \le c$ are valid vertices of the strengthened problem, given the anchor $a$ is composite and coprime to the whole leg.

    standard axioms: Quot.sound, propext what this means

    Statement uses: Nat, Nat.Composite, LE.le, OfNat.ofNat, Eq, Nat.gcd, Erdos1212.Valid, Prod.mk

    Proof uses: LT.lt, And.left, Not, Nat.Prime, And.intro, Prod.fst, And, Prod.snd, Or, Decidable.byContradiction, Or.inl, And.right

    7 instances, coercions and auxiliary constants left out.

    Tactic trace: 5 steps

    Open to load the checked before-and-after goal states.

    theorem vertical_leg_valid {a b c : ℕ} (ha : a.Composite) (hb : 2 ≤ b)
        (hV : ∀ s, b ≤ s → s ≤ c → Nat.gcd a s = 1) :
        ∀ s, b ≤ s → s ≤ c → Valid (a, s) := by
    …

    Mentions: c, Erdos1212.Valid

  6. theorem Erdos1212.horizontal_leg_valid Core of the composite-anchor reduction: horizontal-leg vertices $(s, c)$ for $a \le s \le b$ are valid, given the anchor $c$ is composite and coprime to the whole leg line 89 source

    Source documentation

    Core of the composite-anchor reduction: horizontal-leg vertices $(s, c)$ for $a \le s \le b$ are valid, given the anchor $c$ is composite and coprime to the whole leg.

    standard axioms: Quot.sound, propext what this means

    Statement uses: Nat, Nat.Composite, LE.le, OfNat.ofNat, Eq, Nat.gcd, Erdos1212.Valid, Prod.mk

    Proof uses: LT.lt, And.left, Not, Nat.Prime, And.intro, Prod.fst, And, Prod.snd, Or, Decidable.byContradiction, Or.inr, And.right

    7 instances, coercions and auxiliary constants left out.

    Tactic trace: 5 steps

    Open to load the checked before-and-after goal states.

    theorem horizontal_leg_valid {a b c : ℕ} (hc : c.Composite) (ha2 : 2 ≤ a)
        (hH : ∀ s, a ≤ s → s ≤ b → Nat.gcd s c = 1) :
        ∀ s, a ≤ s → s ≤ b → Valid (s, c) := by
    …

    Mentions: c, Erdos1212.Valid

  7. theorem Erdos1212.anchor_coprime_of_short_leg Roughness criterion (sufficiency for the anchor conditions): if $a < s$ for all $s$ in the leg and the leg stays below $a + P^-(a)$, then $a$ is coprime to the whole leg line 101 source

    Source documentation

    Roughness criterion (sufficiency for the anchor conditions): if $a < s$ for all $s$ in the leg and the leg stays below $a + P^-(a)$, then $a$ is coprime to the whole leg. Stated via divisibility: no prime factor of $a$ divides any $s$ with $a < s < a + p$ for all prime factors $p$ of $a$.

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

    Statement uses: Nat, LT.lt, Nat.Prime, Dvd.dvd, HAdd.hAdd, Eq, Nat.gcd, OfNat.ofNat

    Proof uses: Decidable.byContradiction, Not, And, Exists, False, Nat.exists_prime_and_dvd, Dvd.dvd.trans, Nat.gcd_dvd_left, Nat.gcd_dvd_right, HMul.hMul, Nat.Prime.pos, Nat.lt_of_mul_lt_mul_left, LE.le, Nat.mul_le_mul_left, Eq.mpr, id, congrArg, Mathlib.Tactic.Ring.of_eq, HPow.hPow, Nat.rawCast and 21 more

    38 instances, coercions and auxiliary constants left out.

    Tactic trace: 21 steps

    Open to load the checked before-and-after goal states.

    theorem anchor_coprime_of_short_leg {a s : ℕ} (hs : a < s)
        (h : ∀ p, p.Prime → p ∣ a → s < a + p) : Nat.gcd a s = 1 := by
    …
  8. theorem Erdos1212.right_neighbor_witness_free Documented declaration: right_neighbor_witness_free line 127 source

    Source documentation

    Isolation lemma, right neighbour (core of the no-periodic-certificate theorem): if every prime in $P$ divides $x$ and none divides $y$, then no prime of $P$ divides either coordinate of $(x+1, y)$.

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

    Statement uses: Finset, Nat, Membership.mem, Nat.Prime, Dvd.dvd, Not, And, HAdd.hAdd, OfNat.ofNat

    Proof uses: And.intro, HSub.hSub, Nat.dvd_sub, Eq.mpr, Eq, id, Eq.mp, Eq.trans, congrArg, add_tsub_cancel_left, LT.lt, Nat.Prime.one_lt, Iff.mp, Nat.dvd_one

    33 instances, coercions and auxiliary constants left out.

    Tactic trace: 8 steps

    Open to load the checked before-and-after goal states.

    theorem right_neighbor_witness_free {P : Finset ℕ} {x y : ℕ} (hP : ∀ p ∈ P, p.Prime)
        (hx : ∀ p ∈ P, p ∣ x) (hy : ∀ p ∈ P, ¬ p ∣ y) :
        ∀ p ∈ P, ¬ p ∣ (x + 1) ∧ ¬ p ∣ y := by
    …
  9. theorem Erdos1212.left_neighbor_witness_free Isolation lemma, left neighbour line 141 source

    Source documentation

    Isolation lemma, left neighbour.

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

    Statement uses: Finset, Nat, Membership.mem, Nat.Prime, LE.le, OfNat.ofNat, Dvd.dvd, Not, And, HSub.hSub

    Proof uses: And.intro, Nat.dvd_sub, Eq, Decidable.byContradiction, Eq.mp, congrArg, LT.lt, Nat.Prime.one_lt, Iff.mp, Nat.dvd_one

    18 instances, coercions and auxiliary constants left out.

    Tactic trace: 10 steps

    Open to load the checked before-and-after goal states.

    theorem left_neighbor_witness_free {P : Finset ℕ} {x y : ℕ} (hP : ∀ p ∈ P, p.Prime)
        (hx1 : 1 ≤ x) (hx : ∀ p ∈ P, p ∣ x) (hy : ∀ p ∈ P, ¬ p ∣ y) :
        ∀ p ∈ P, ¬ p ∣ (x - 1) ∧ ¬ p ∣ y := by
    …
  10. theorem Erdos1212.vertical_neighbor_both_even Isolation lemma, vertical neighbours: both coordinates even line 156 source

    Source documentation

    Isolation lemma, vertical neighbours: both coordinates even.

    standard axioms: Quot.sound, propext what this means

    Statement uses: Nat, Dvd.dvd, OfNat.ofNat, Not, And, HAdd.hAdd, LE.le, HSub.hSub

    Proof uses: And.intro, Decidable.byContradiction

    17 instances, coercions and auxiliary constants left out.

    Tactic trace: 3 steps

    Open to load the checked before-and-after goal states.

    theorem vertical_neighbor_both_even {x y : ℕ} (h2x : 2 ∣ x) (h2y : ¬ 2 ∣ y) :
        (2 ∣ x ∧ 2 ∣ (y + 1)) ∧ (1 ≤ y → 2 ∣ x ∧ 2 ∣ (y - 1)) := by
    …