Elementary characterisation of progression-freeness
OpenErdos142.apFree_iffFor every and every finite set of natural numbers, the two formulations of progression-freeness agree:
The right-hand side is the source definition: every subset of that is an arithmetic progression of length forces . The left-hand side is the elementary one: there is no first term and common difference with all of in .
The two differ in how they express non-triviality. The source definition demands that the progression, as a set, have exactly elements, which for forces the common difference to be non-zero; the elementary definition imposes directly. The hypothesis cannot be dropped: at the source convention makes every set free of length- progressions, while the elementary predicate does not.
This is the mission's working lemma. Every later milestone is stated in terms of , which is defined through the source predicate, but is proved by manipulating explicit progressions; this equivalence is what licenses that move, and it removes the cardinality side condition in from all downstream reasoning.
import Mathlib import Definitions.Def_Erdos142Basic
namespace Erdos142
theorem apFree_iff (k : ℕ) (hk : 2 ≤ k) (A : Finset ℕ) :
APFree k A ↔ IsAPOfLengthFree (A : Set ℕ) k := by sorry
end Erdos142Read-back
What the Lean code literally says, in plain math · claude-opus-5
Read-back: Erdos142.apFree_iff
The statement
The declaration fixes a natural number , a hypothesis , and a finite set of natural numbers ( is a Finset ℕ, so it is finite by construction and its elements are natural numbers, including possibly ). It asserts a biconditional (an "if and only if", in both directions) between two separate custom predicates defined in the accompanying bundle:
Here denotes the underlying set of naturals obtained by coercing the finite set to a plain set, and denotes the image of under the coercion into the extended natural numbers (which has a top element in addition to all naturals).
No proof is supplied: the body is a sorry placeholder.
Both sides are custom notions, expanded separately below. They are not stated in terms of each other; they are two independently written definitions.
Left-hand side: — the "elementary" side
is defined as the negation of another custom predicate , which reads:
So the left-hand side of the equivalence literally says:
i.e. there is no pair of natural numbers (first term) and (common difference) with strictly positive such that all values are members of .
Points that the quantifiers silently include:
- ranges over all of , so is allowed; ranges over but is constrained by , so is excluded on this side.
- The index condition is over natural numbers , i.e. ; membership is required for every such .
- The condition is stated as membership of the values in ; it does not by itself speak of a -element subset. (Since , the listed values are pairwise distinct, but the definition never says this.)
- The product is in ; no subtraction or division occurs, so there are no truncation or junk-value effects.
- is finite, so for this side is a statement about finitely many candidate pairs only in effect, not by stipulation: and are quantified over all of .
Right-hand side: — the "set/cardinality" side
This side is built from a chain of three definitions, stated in the bundle for an arbitrary additive commutative monoid and here instantiated at .
(1) Progression with prescribed data. For a set , a length , and elements :
where is the cardinality of measured in (equal to when is infinite), is the -fold monoid multiple of (for this is just ), and compares the coerced natural with in . Note this is a conjunction of two conditions: the cardinality must equal and the set must be exactly equal (not merely contained in) the displayed image set.
(2) Progression. For and :
Here is not required to be nonzero, and is unrestricted.
(3) Progression-freeness. For and :
The quantifier ranges over all subsets of (arbitrary sets, not just finite ones, though here is finite so every is finite). The consequent is an inequality in about the length parameter itself — it says nothing about .
Putting the three together, the right-hand side of the equivalence literally asserts:
Points that the quantifiers silently include:
- Because the hypothesis is assumed in the theorem, the consequent is false. Consequently, under that hypothesis, the right-hand side holds exactly when the antecedent is never satisfiable, i.e. when no subset of has exactly elements and is simultaneously equal to the set for some naturals and .
- is permitted in the existential. With the displayed set is (for ), whose cardinality is , so the cardinality clause would fail for ; but the definition itself imposes no positivity on .
- The requirement is a set equality together with an exact cardinality , not a containment.
- The empty subset is included in the range of ; its cardinality is , which equals only when (excluded here by ).
- itself is among the subsets considered.
- is a coerced natural, hence never ; the case allowed by the general definitions does not arise in this statement.
Scope of the claim
- The equivalence is asserted only under the hypothesis ; the statement says nothing about or .
- It is asserted for every finite set , including and singletons.
- The ambient type is fixed to on both sides; the general monoid of the bundle definitions plays no role beyond instantiation.
- The remaining declarations in the bundle — the quantity (defined as the supremum of the cardinalities of subsets satisfying ), and the auxiliary results that is progression-free, that for progression-free , and that — do not appear in this statement.