Documentation

FormalConjectures.ErdosProblems.«872»

Erdős Problem 872 #

This file states Erdős Problem 872 for the primitive-set saturation game on $\{2, \dots, n\}$. The game value L n is defined by a finite minimax recursion: Prolonger moves first and maximizes the final size of the claimed primitive set, while Shortener minimizes it.

The problem statement does not fix the turn order. This file fixes Prolonger to move first, following the convention used in the forum discussion of the problem. The choice is not cosmetic: computational data suggests the Shortener-first value tracks $\pi(n)$ while the Prolonger-first value grows linearly, and the questions below concern the Prolonger-first quantity.

References:

A primitive subset of $\{2, \dots, n\}$ is a set in which no element divides another. The quantified divisibility condition is one-sided because the variables range over all ordered pairs of distinct elements.

Equations
Instances For
    structure Erdos872.GamePos (n : ) :

    A game position consists of the already claimed set and the still unclaimed pool.

    Instances For

      The legal moves from a position: unclaimed elements whose insertion preserves primitiveness.

      Equations
      Instances For

        Membership in legalMoves: a legal move is a pool element whose insertion preserves primitiveness.

        def Erdos872.applyMove {n : } (p : GamePos n) (x : ) :

        Apply a move by claiming x and removing it from the unclaimed pool.

        This function is intentionally total: if x is not legal, it still returns the formal position obtained by inserting and erasing x. The minimax recursion below only calls it for x ∈ legalMoves p.

        Equations
        Instances For

          The empty starting position on $\{2, \dots, n\}$.

          Equations
          Instances For
            def Erdos872.gameValueAux {n : } :
            BoolGamePos n

            Auxiliary finite minimax recursion with an explicit fuel bound.

            At a Prolonger turn (turn = true) the recursion takes the maximum over legal moves; at a Shortener turn (turn = false) it takes the minimum. If there are no legal moves, or the fuel is exhausted, it returns the current final size p.claimed.card. Starting with fuel p.pool.card is sufficient because every played move erases the chosen pool element.

            Equations
            Instances For
              theorem Erdos872.gameValueAux_le {n : } (fuel : ) (turn : Bool) (p : GamePos n) :

              Each move claims exactly one pool element, so the minimax value never exceeds the number of already claimed elements plus the number of still unclaimed elements.

              The minimax value of the primitive-set saturation game from p, with Prolonger to move.

              This is a genuine game-value definition rather than an uninterpreted placeholder. It unfolds the finite game tree up to p.pool.card moves; at each node Prolonger maximizes and Shortener minimizes the eventual terminal cardinality.

              Equations
              Instances For
                def Erdos872.L (n : ) :

                The Erdős primitive-set game length on $\{2, \dots, n\}$.

                Equations
                Instances For
                  theorem Erdos872.erdos_872.parts.i :
                  sorry ε > 0, ∀ᶠ (n : ) in Filter.atTop, (L n) ε * n

                  Erdős Problem 872, part (i) (weak form): there exists a constant $\epsilon > 0$ such that the game length is at least $\epsilon \cdot n$ for all sufficiently large $n$.

                  theorem Erdos872.erdos_872.parts.ii :
                  sorry ε > 0, ∀ᶠ (n : ) in Filter.atTop, (L n) (1 - ε) * n / 2

                  Erdős Problem 872, part (ii) (strong form): for every $\epsilon > 0$, the game length is at least $(1-\epsilon) \cdot n / 2$ for all sufficiently large $n$.

                  Status note: the forum thread (April-May 2026) records Shortener strategies giving $L(n) \leq (23/48 + o(1)) \cdot n$ (described in the thread as accepted as correct, with a Lean formalization in progress) and a claimed $L(n) \leq 0.19 \cdot n$, either of which would answer this question negatively under the Prolonger-first convention. Neither is published, so the statement is recorded here as the original Erdős question.

                  theorem Erdos872.erdos_872.trivial_upper_bound (n : ) (hn : 2 n) :
                  L n n - 1

                  A trivial upper bound: a play can claim at most the $n - 1$ elements of $\{2, \dots, n\}$, so $L(n) \leq n - 1$.

                  Forum-related variant: how small can a maximal primitive subset of $\{2, \dots, n\}$ be? The set of primes in $\{2, \dots, n\}$ is a maximal primitive subset of size $\pi(n)$, and the forum thread asks whether this is the smallest possible for all $n \geq 2$. Equivalently: must every completed play of the saturation game, by both players and regardless of strategy, claim at least $\pi(n)$ elements? (Terminal positions of the game are exactly the maximal primitive subsets.)