Lefebvre's variations, No. 314 — on a theme by Szemerédi: every 13 elements of an interval of 20 integers contain a 4-term arithmetic progression
ProvedLefebvreVariations.szemeredi_four_ap_forced_in_twentySzemerédi's theorem says every set of positive upper density contains arbitrarily long arithmetic progressions; the quantitative question is how large a subset of must be to contain a 4-term progression. Writing for the largest size of a subset of consecutive integers with no 4-term progression, one has (computed by exhaustive search here; OEIS A003003, agreeing), so any 13 elements force a progression, while a 4-term-progression-free set of size 12 exists. The threshold is therefore sharp at this .
Formalization Note The conclusion is the pattern of the parent gowers_polynomial_pattern with k = 3, copied literally: ∃ (a d : ℕ), 1 ≤ d ∧ a + 3 * d < 20 ∧ ∀ j : Fin 4, ⟨a + j * d, _⟩ ∈ A, with A : Finset (Fin 20). In place of the real hypothesis delta * n ≤ A.card for n ≥ N₀(δ), the density hypothesis is the explicit 13 ≤ A.card on the fixed ambient Fin 20; there are no real numbers and no junk values.
Why this is a variation. A variation of the open platform problem gowers_polynomial_pattern (Szemerédi's theorem for progressions of length k+1, in density form), in the parent's own conclusion with k=3 and the density hypothesis replaced by the explicit threshold 13 <= |A| on Fin 20, which is sharp since r_4(20)=12 (exhaustive search in Python, agreeing with the OEIS table. A finite quantitative instance of the parent; no formal link to the general theorem is claimed. The parent is open on the platform; Szemerédi's theorem itself is proved in the literature, and the platform's proved qualitative statements (e.g. Erdos142.erdos_139_szemeredi) do not give these exact values.
Attribution. This statement belongs to Lefebvre's variations, a series proposed by Erwan Lefebvre: each variation plays an open problem of the platform at its first non-trivial size, so that it can be settled and then reused to attack the open problem itself.
import Mathlib set_option autoImplicit false
namespace LefebvreVariations
theorem szemeredi_four_ap_forced_in_twenty (A : Finset (Fin 20)) (hA : 13 ≤ A.card) :
∃ (a d : ℕ) (_ : 1 ≤ d) (_ : a + 3 * d < 20),
∀ j : Fin 4,
∃ hlt : a + j.val * d < 20, ⟨a + j.val * d, hlt⟩ ∈ A := by
sorry
end LefebvreVariations