op_1481_avoidance_three_twenty_one_dim_one
For every real number $\alpha > 0$ such that $\alpha^2 \in \{1/4, 1/9, 2/15, 3/4\}$, euclidean_avoids_ap 1 3 1 21 α holds: there exists a two-coloring of 1-dimensional Euclidean space containing neither a monochromatic 3-term arithmetic progression with unit spacing of color false nor a monochromatic 21-term arithmetic progression with spacing $\alpha$ of color true.
Statement
theorem op_1481_avoidance_three_twenty_one_dim_one
(α : ℝ) (hα : 0 < α) (h_sq : α ^ 2 ∈ ({1 / 4, 1 / 9, 2 / 15, 3 / 4} : Set ℝ)) :
euclidean_avoids_ap 1 3 1 21 α- Formalizes
- arXiv:2611.12360 (Avoiding short progressions in Euclidean Ramsey theory II), Sec. 3.3
- Verified
- 12 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 2
- euclidean_avoids_apThe Euclidean Ramsey avoidance property euclidean_avoids_ap n r α M β (commonly denoted E^n ↛ (α ℓ_r, β ℓ_M)) asserts that there exists a…
- euclidean_has_mono_apFor a dimension n, a two-coloring c : EuclideanSpace ℝ (Fin n) → Bool, a term count m : ℕ, a spacing α : ℝ, and a color b : Bool,…
- Used by 1
- op_1482_avoidance_three_seventeen_dim_oneThere exists a two-coloring of 1-dimensional Euclidean space containing neither a monochromatic 3-term arithmetic progression with unit…
Read back from the Lean
For any real number α > 0 such that α² ∈ {1/4, 1/9, 2/15, 3/4}, there exists a 2-coloring c : EuclideanSpace ℝ (Fin 1) → Bool that simultaneously avoids:
1. any monochromatic false arithmetic progression of length 3 with step size 1 (that is, there are no x₀, v : EuclideanSpace ℝ (Fin 1) with ‖v‖ = 1 such that c (x₀ + k • v) = false for all k ∈ {0, 1, 2}); and
2. any monochromatic true arithmetic progression of length 21 with step size α (that is, there are no x₀, v : EuclideanSpace ℝ (Fin 1) with ‖v‖ = α such that c (x₀ + k • v) = true for all k ∈ {0, 1, …, 20}).
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
The proof, explained
The theorem is proved by coloring 1-dimensional Euclidean space ℝ¹ according to the parity of the floor function: a point x is colored true if ⌊x 0⌋ is even, and false if it is odd. Shifting by a unit step d = ±1 always flips the parity of the floor, so no two consecutive points can share color false, precluding any 3-term progression of that color. For an arithmetic progression with spacing α ∈ (1/20, 1), consecutive floors can differ by at most 1, so points of constant parity must have strictly identical floors; however, traversing 20 steps spans a distance greater than 1, forcing the floor to change strictly and creating a contradiction. Each of the exceptional values α² ∈ {1/4, 1/9, 2/15, 3/4} satisfies (1/20)² < α² < 1, so α lies within (1/20, 1) and the parity coloring avoids both configurations.
In 1-dimensional Euclidean space, the norm of a vector equals the absolute value of its single coordinate: ‖v‖ = |v 0|.
By definition, the Euclidean norm is the square root of the sum of squared component norms. Since the dimension is 1, the index set Fin 1 is a singleton, reducing the sum to |v 0|², whose square root simplifies to |v 0|.
uses
EuclideanSpace.norm_eq,Real.norm_eq_abs,Real.sqrt_sq_eq_absrw [EuclideanSpace.norm_eq] simp [Real.norm_eq_abs, Real.sqrt_sq_eq_abs]
Two integers have equal boolean parity decisions if and only if they have the same parity as propositions.
A four-way case analysis on whether a and b are even verifies that decide (Even a) = decide (Even b) is logically equivalent to Even a ↔ Even b.
by_cases ha : Even a <;> by_cases hb : Even b <;> simp [ha, hb] at h ⊢
If a real displacement d satisfies |d| < 1, then for every real y, ⌊y + d⌋ ∈ {⌊y⌋ - 1, ⌊y⌋, ⌊y⌋ + 1}.
From |d| < 1, we obtain -1 < d < 1, which implies -1 ≤ ⌊d⌋ ≤ 0. Combining the standard floor addition inequalities ⌊y⌋ + ⌊d⌋ ≤ ⌊y + d⌋ and ⌊y + d⌋ - 1 ≤ ⌊y⌋ + ⌊d⌋ confines the difference ⌊y + d⌋ - ⌊y⌋ to {-1, 0, 1}.
uses
neg_abs_le,le_abs_self,Int.floor_lt,Int.le_floor,Int.le_floor_add,Int.le_floor_add_floorhave hd1 : -1 < d := by linarith [neg_abs_le d] have hd2 : d < 1 := by linarith [le_abs_self d] have hle : ⌊d⌋ ≤ 0 := by have : ⌊d⌋ < (1:ℤ) := by rw [Int.floor_lt]; simpa using hd2 omega have hge : -1 ≤ ⌊d⌋ := by rw [Int.le_floor]; push_cast; linarith have h1 : ⌊y⌋ + ⌊d⌋ ≤ ⌊y + d⌋ := Int.le_floor_add y d have h2 : ⌊y + d⌋ - 1 ≤ ⌊y⌋ + ⌊d⌋ := Int.le_floor_add_floor y d omega
If |d| = 1, then ⌊x + d⌋ and ⌊x⌋ have opposite parities.
The condition |d| = 1 implies d = 1 or d = -1. When d = 1, ⌊x + 1⌋ = ⌊x⌋ + 1, which has opposite parity to ⌊x⌋. When d = -1, ⌊x - 1⌋ = ⌊x⌋ - 1, which likewise reverses parity.
uses
abs_eq,Int.floor_add_one,Int.even_add_one,Int.floor_sub_one,Int.even_subhave hd' : d = 1 ∨ d = -1 := (abs_eq (show (0:ℝ) ≤ 1 by norm_num)).mp hd rcases hd' with rfl | hd' · rw [Int.floor_add_one, Int.even_add_one] tauto · rw [hd'] rw [show x + -1 = x - 1 by ring, Int.floor_sub_one] rw [show Even (⌊x⌋ - 1) ↔ ¬ Even ⌊x⌋ by rw [Int.even_sub]; simp] tauto
Assuming for contradiction that the parities of ⌊x + kd⌋ are identical for all k ∈ {0, ..., 20}, each term a(k) = ⌊x + kd⌋ has the same parity as a(0).
We introduce the contradiction hypothesis that the parity of ⌊x + kd⌋ is constant for all 21 points, define the sequence a(k) = ⌊x + kd⌋, and rephrase the assumption as Even (a k) ↔ Even (a 0) for each k ≤ 20.
intro H set a : ℕ → ℤ := fun k => ⌊x + (k : ℝ) * d⌋ with ha have H' : ∀ k : ℕ, k ≤ 20 → (Even (a k) ↔ Even (a 0)) := by intro k hk have hk21 : k < 21 := by omega have := H ⟨k, hk21⟩ simpa [a] using this
Adjacent terms of the sequence a are equal: a(m + 1) = a(m) for all m < 20.
Because |d| < 1, the step difference a(m + 1) - a(m) must be -1, 0, or 1. However, since a(m + 1) and a(m) share the same parity, their difference must be an even integer. Among {-1, 0, 1}, only 0 is even, forcing a(m + 1) = a(m).
uses
op_1481_avoidance_three_twenty_one_dim_one_floor_add_mem,Int.even_sub.mprhave hstep : ∀ m : ℕ, m < 20 → a (m+1) = a m := by intro m hm have heq : a (m+1) = ⌊x + (m : ℝ) * d + d⌋ := by simp only [a] congr 1 push_cast ring have hdisj : a (m+1) = a m - 1 ∨ a (m+1) = a m ∨ a (m+1) = a m + 1 := by have h := op_1481_avoidance_three_twenty_one_dim_one_floor_add_mem (x + (m : ℝ) * d) d hlt rw [heq] simpa [a] using h have hp : Even (a (m+1)) ↔ Even (a m) := (H' (m+1) (by omega)).trans (H' m (by omega)).symm have hev : Even (a (m+1) - a m) := Int.even_sub.mpr hp rcases hdisj with h | h | h · rw [h] at hev; norm_num at hev · exact h · rw [h] at hev; norm_num at hev
The sequence a is constant on {0, ..., 20}, so in particular a(20) = a(0).
Since every adjacent transition preserves the value, mathematical induction on k ≤ 20 shows that a(k) = a(0) for all k ≤ 20, which gives a(20) = a(0).
uses
le_reflhave hconst : a 20 = a 0 := by suffices hall : ∀ k, k ≤ 20 → a k = a 0 by exact hall 20 (le_refl 20) intro k hk induction k with | zero => rfl | succ m ih => have hm : m < 20 := by omega calc a (m+1) = a m := hstep m hm _ = a 0 := ih (by omega)
In the case d ≥ 0, the condition 20d > 1 implies a(20) > a(0), which contradicts constancy.
When d ≥ 0, |d| = d, so 20d > 1. By the floor bounds, a(20) = ⌊x + 20d⌋ > x + 20d - 1 > x ≥ ⌊x⌋ = a(0), yielding a(20) > a(0). This contradicts the previously established constancy a(20) = a(0).
uses
abs_of_nonneg,Int.lt_floor_add_one,Int.floor_leby_cases hd : 0 ≤ d · have hD : (1:ℝ) < 20 * d := by rw [abs_of_nonneg hd] at hbig; exact hbig have hreal : (a 20 : ℝ) > (a 0 : ℝ) := by have h1 : (a 20 : ℝ) > x + 20 * d - 1 := by have hlt' := Int.lt_floor_add_one (x + (20:ℝ)*d) have hcast : (a 20 : ℝ) = (⌊x + (20:ℝ)*d⌋ : ℝ) := by simp [a] rw [hcast]; linarith have h2 : x + 20 * d - 1 > x := by linarith have h3 : (a 0 : ℝ) ≤ x := by have := Int.floor_le x simpa [a] using this linarith rw [hconst] at hreal; linarith
In the case d < 0, the condition 20d < -1 implies a(20) < a(0), which contradicts constancy.
When d < 0, |d| = -d, so 20d < -1. The floor bounds give a(20) = ⌊x + 20d⌋ ≤ x + 20d < x - 1 < ⌊x⌋ = a(0), giving a(20) < a(0). This also contradicts a(20) = a(0), completing the refutation of constant parity.
uses
abs_of_neg,Int.floor_le,Int.sub_one_lt_floor· have hdneg : d < 0 := by linarith have hD : 20 * d < -1 := by have habs : |d| = -d := abs_of_neg hdneg rw [habs] at hbig; linarith have hreal : (a 20 : ℝ) < (a 0 : ℝ) := by have h1 : (a 20 : ℝ) ≤ x + (20:ℝ)*d := by have := Int.floor_le (x + (20:ℝ)*d) have hcast : (a 20 : ℝ) = (⌊x + (20:ℝ)*d⌋ : ℝ) := by simp [a] rw [hcast]; exact this have h2 : x + 20 * d < x - 1 := by linarith have h3 : x - 1 < (a 0 : ℝ) := by have := Int.sub_one_lt_floor x simpa [a] using this linarith rw [hconst] at hreal; linarith
The floor-parity coloring c(x) = decide(Even ⌊x 0⌋) avoids monochromatic 3-term arithmetic progressions of color false with unit spacing.
Suppose there were such a progression with step vector v satisfying ‖v‖ = 1. In dimension 1, |v 0| = 1, so the unit-step parity lemma guarantees that ⌊x₀ 0 + v 0⌋ and ⌊x₀ 0⌋ have opposite parities. But because both the first and second terms have color false, their parities must agree, reaching a contradiction.
uses
op_1481_avoidance_three_twenty_one_dim_one_norm_eq_abs_coord,op_1481_avoidance_three_twenty_one_dim_one_floor_parity_ne_of_abs_one,op_1481_avoidance_three_twenty_one_dim_one_decide_evenrefine ⟨fun x => decide (Even ⌊x 0⌋), ?_, ?_⟩ · rintro ⟨x₀, v, hv, h⟩ have hcoord : |v 0| = 1 := by have hnorm := op_1481_avoidance_three_twenty_one_dim_one_norm_eq_abs_coord v rw [hv] at hnorm exact hnorm.symm have hpar := op_1481_avoidance_three_twenty_one_dim_one_floor_parity_ne_of_abs_one (x₀ 0) (v 0) hcoord apply hpar have h0 : decide (Even ⌊x₀ 0⌋) = false := by simpa using h 0 have h1' : decide (Even ⌊(x₀ + (1:ℝ) • v) 0⌋) = false := by have hk := h 1 simpa using hk have heq : decide (Even ⌊x₀ 0 + v 0⌋) = decide (Even ⌊x₀ 0⌋) := by have hcoord1 : (x₀ + (1:ℝ) • v) 0 = x₀ 0 + v 0 := by simp rw [← hcoord1, h1', h0] exact op_1481_avoidance_three_twenty_one_dim_one_decide_even _ _ heq
The floor-parity coloring avoids monochromatic 21-term arithmetic progressions of color true with spacing α whenever 1/20 < α < 1.
Suppose there were a monochromatic true 21-term progression with spacing ‖v‖ = α. In dimension 1, |v 0| = α, so |v 0| < 1 and 20|v 0| > 1. By the non-constancy lemma, the parities of the 21 floors cannot all match the initial parity, yet being monochromatic true requires every term to share the parity of the initial term, a contradiction.
uses
op_1481_avoidance_three_twenty_one_dim_one_norm_eq_abs_coord,op_1481_avoidance_three_twenty_one_dim_one_floor_parity_not_const,op_1481_avoidance_three_twenty_one_dim_one_decide_even· rintro ⟨x₀, v, hv, h⟩ have hcoord : |v 0| = α := by have hnorm := op_1481_avoidance_three_twenty_one_dim_one_norm_eq_abs_coord v rw [hv] at hnorm exact hnorm.symm have hlt : |v 0| < 1 := by rw [hcoord]; exact h2 have hbig : 1 < 20 * |v 0| := by rw [hcoord]; linarith apply op_1481_avoidance_three_twenty_one_dim_one_floor_parity_not_const (x₀ 0) (v 0) hlt hbig intro k have hk : decide (Even ⌊(x₀ + (k:ℝ) • v) 0⌋) = true := h k have h0 : decide (Even ⌊x₀ 0⌋) = true := by simpa using h 0 have heq : decide (Even ⌊(x₀ + (k:ℝ) • v) 0⌋) = decide (Even ⌊x₀ 0⌋) := hk.trans h0.symm have hcoordk : (x₀ + (k:ℝ) • v) 0 = x₀ 0 + (k:ℝ) * v 0 := by simp rw [← hcoordk] exact op_1481_avoidance_three_twenty_one_dim_one_decide_even _ _ heqFor every α > 0 such that α² ∈ {1/4, 1/9, 2/15, 3/4}, the avoidance property euclidean_avoids_ap 1 3 1 21 α holds.
For each candidate value of α², since (1/20)² = 1/400 < α² < 1 and α > 0, non-linear arithmetic establishes 1/20 < α and α < 1. Invoking the auxiliary lemma for α in this range completes the proof.
uses
op_1481_avoidance_three_twenty_one_dim_one_auxhave hmem : α ^ 2 = 1/4 ∨ α ^ 2 = 1/9 ∨ α ^ 2 = 2/15 ∨ α ^ 2 = 3/4 := by simpa using h_sq have h1 : (1:ℝ)/20 < α := by rcases hmem with h | h | h | h <;> nlinarith have h2 : α < 1 := by rcases hmem with h | h | h | h <;> nlinarith exact op_1481_avoidance_three_twenty_one_dim_one_aux α h1 h2
abs_eq- For a non-negative real number b, |a| = b if and only if a = b or a = -b.
abs_of_neg- If a < 0, then |a| = -a.
abs_of_nonneg- If a ≥ 0, then |a| = a.
EuclideanSpace.norm_eq- The Euclidean norm of a vector equals the square root of the sum of the squared norms of its components.
Int.even_add_one- An integer n + 1 is even if and only if n is not even.
Int.even_sub- The difference of two integers m - n is even if and only if m and n have the same parity.
Int.even_sub.mpr- If two integers have the same parity, then their difference is even.
Int.floor_add_one- For any real number a, ⌊a + 1⌋ = ⌊a⌋ + 1.
Int.floor_le- For any real number a, ⌊a⌋ ≤ a.
Int.floor_lt- For a real number a and integer z, ⌊a⌋ < z if and only if a < z.
Int.floor_sub_one- For any real number a, ⌊a - 1⌋ = ⌊a⌋ - 1.
Int.le_floor- For an integer z and real number a, z ≤ ⌊a⌋ if and only if z ≤ a.
Int.le_floor_add- For any real numbers a and b, ⌊a⌋ + ⌊b⌋ ≤ ⌊a + b⌋.
Int.le_floor_add_floor- For any real numbers a and b, ⌊a + b⌋ - 1 ≤ ⌊a⌋ + ⌊b⌋.
Int.lt_floor_add_one- For any real number a, a < ⌊a⌋ + 1.
Int.sub_one_lt_floor- For any real number a, a - 1 < ⌊a⌋.
le_abs_self- Any real number is less than or equal to its absolute value: a ≤ |a|.
le_refl- The inequality ≤ is reflexive: a ≤ a for every a.
neg_abs_le- The negation of the absolute value is bounded by the element: -|a| ≤ a.
op_1481_avoidance_three_twenty_one_dim_one_aux- For any real α strictly between 1/20 and 1, the floor-parity coloring avoids monochromatic 3-term APs of spacing 1 colored false and 21-term APs of spacing α colored true.
op_1481_avoidance_three_twenty_one_dim_one_decide_even- Two integers have equal boolean parity checks if and only if they have the same parity.
op_1481_avoidance_three_twenty_one_dim_one_floor_add_mem- If a real displacement satisfies |d| < 1, then ⌊y + d⌋ is either ⌊y⌋ - 1, ⌊y⌋, or ⌊y⌋ + 1.
op_1481_avoidance_three_twenty_one_dim_one_floor_parity_not_const- If a real displacement satisfies |d| < 1 and 20|d| > 1, then the floors ⌊x + kd⌋ for k = 0, ..., 20 cannot all have the same parity as ⌊x⌋.
op_1481_avoidance_three_twenty_one_dim_one_floor_parity_ne_of_abs_one- If |d| = 1, then ⌊x + d⌋ and ⌊x⌋ have opposite parities.
op_1481_avoidance_three_twenty_one_dim_one_norm_eq_abs_coord- In 1-dimensional Euclidean space, the norm of a vector equals the absolute value of its single coordinate.
Real.norm_eq_abs- The norm of a real number is its absolute value.
Real.sqrt_sq_eq_abs- The square root of the square of a real number is its absolute value: √(x²) = |x|.
Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
open scoped RealInnerProductSpace inlemma op_1481_avoidance_three_twenty_one_dim_one_norm_eq_abs_coord (v : EuclideanSpace ℝ (Fin 1)) : ‖v‖ = |v 0| := by rw [EuclideanSpace.norm_eq] simp [Real.norm_eq_abs, Real.sqrt_sq_eq_abs]lemma op_1481_avoidance_three_twenty_one_dim_one_decide_even (a b : ℤ) (h : decide (Even a) = decide (Even b)) : Even a ↔ Even b := by by_cases ha : Even a <;> by_cases hb : Even b <;> simp [ha, hb] at h ⊢lemma op_1481_avoidance_three_twenty_one_dim_one_floor_add_mem (y d : ℝ) (h : |d| < 1) : ⌊y + d⌋ = ⌊y⌋ - 1 ∨ ⌊y + d⌋ = ⌊y⌋ ∨ ⌊y + d⌋ = ⌊y⌋ + 1 := by have hd1 : -1 < d := by linarith [neg_abs_le d] have hd2 : d < 1 := by linarith [le_abs_self d] have hle : ⌊d⌋ ≤ 0 := by have : ⌊d⌋ < (1:ℤ) := by rw [Int.floor_lt]; simpa using hd2 omega have hge : -1 ≤ ⌊d⌋ := by rw [Int.le_floor]; push_cast; linarith have h1 : ⌊y⌋ + ⌊d⌋ ≤ ⌊y + d⌋ := Int.le_floor_add y d have h2 : ⌊y + d⌋ - 1 ≤ ⌊y⌋ + ⌊d⌋ := Int.le_floor_add_floor y d omegalemma op_1481_avoidance_three_twenty_one_dim_one_floor_parity_ne_of_abs_one (x d : ℝ) (hd : |d| = 1) : ¬ (Even ⌊x + d⌋ ↔ Even ⌊x⌋) := by have hd' : d = 1 ∨ d = -1 := (abs_eq (show (0:ℝ) ≤ 1 by norm_num)).mp hd rcases hd' with rfl | hd' · rw [Int.floor_add_one, Int.even_add_one] tauto · rw [hd'] rw [show x + -1 = x - 1 by ring, Int.floor_sub_one] rw [show Even (⌊x⌋ - 1) ↔ ¬ Even ⌊x⌋ by rw [Int.even_sub]; simp] tautolemma op_1481_avoidance_three_twenty_one_dim_one_floor_parity_not_const (x d : ℝ) (hlt : |d| < 1) (hbig : 1 < 20 * |d|) : ¬ (∀ k : Fin 21, Even ⌊x + (k : ℝ) * d⌋ ↔ Even ⌊x⌋) := by intro H set a : ℕ → ℤ := fun k => ⌊x + (k : ℝ) * d⌋ with ha have H' : ∀ k : ℕ, k ≤ 20 → (Even (a k) ↔ Even (a 0)) := by intro k hk have hk21 : k < 21 := by omega have := H ⟨k, hk21⟩ simpa [a] using this have hstep : ∀ m : ℕ, m < 20 → a (m+1) = a m := by intro m hm have heq : a (m+1) = ⌊x + (m : ℝ) * d + d⌋ := by simp only [a] congr 1 push_cast ring have hdisj : a (m+1) = a m - 1 ∨ a (m+1) = a m ∨ a (m+1) = a m + 1 := by have h := op_1481_avoidance_three_twenty_one_dim_one_floor_add_mem (x + (m : ℝ) * d) d hlt rw [heq] simpa [a] using h have hp : Even (a (m+1)) ↔ Even (a m) := (H' (m+1) (by omega)).trans (H' m (by omega)).symm have hev : Even (a (m+1) - a m) := Int.even_sub.mpr hp rcases hdisj with h | h | h · rw [h] at hev; norm_num at hev · exact h · rw [h] at hev; norm_num at hev have hconst : a 20 = a 0 := by suffices hall : ∀ k, k ≤ 20 → a k = a 0 by exact hall 20 (le_refl 20) intro k hk induction k with | zero => rfl | succ m ih => have hm : m < 20 := by omega calc a (m+1) = a m := hstep m hm _ = a 0 := ih (by omega) by_cases hd : 0 ≤ d · have hD : (1:ℝ) < 20 * d := by rw [abs_of_nonneg hd] at hbig; exact hbig have hreal : (a 20 : ℝ) > (a 0 : ℝ) := by have h1 : (a 20 : ℝ) > x + 20 * d - 1 := by have hlt' := Int.lt_floor_add_one (x + (20:ℝ)*d) have hcast : (a 20 : ℝ) = (⌊x + (20:ℝ)*d⌋ : ℝ) := by simp [a] rw [hcast]; linarith have h2 : x + 20 * d - 1 > x := by linarith have h3 : (a 0 : ℝ) ≤ x := by have := Int.floor_le x simpa [a] using this linarith rw [hconst] at hreal; linarith · have hdneg : d < 0 := by linarith have hD : 20 * d < -1 := by have habs : |d| = -d := abs_of_neg hdneg rw [habs] at hbig; linarith have hreal : (a 20 : ℝ) < (a 0 : ℝ) := by have h1 : (a 20 : ℝ) ≤ x + (20:ℝ)*d := by have := Int.floor_le (x + (20:ℝ)*d) have hcast : (a 20 : ℝ) = (⌊x + (20:ℝ)*d⌋ : ℝ) := by simp [a] rw [hcast]; exact this have h2 : x + 20 * d < x - 1 := by linarith have h3 : x - 1 < (a 0 : ℝ) := by have := Int.sub_one_lt_floor x simpa [a] using this linarith rw [hconst] at hreal; linarithlemma op_1481_avoidance_three_twenty_one_dim_one_aux (α : ℝ) (h1 : (1:ℝ)/20 < α) (h2 : α < 1) : euclidean_avoids_ap 1 3 1 21 α := by refine ⟨fun x => decide (Even ⌊x 0⌋), ?_, ?_⟩ · rintro ⟨x₀, v, hv, h⟩ have hcoord : |v 0| = 1 := by have hnorm := op_1481_avoidance_three_twenty_one_dim_one_norm_eq_abs_coord v rw [hv] at hnorm exact hnorm.symm have hpar := op_1481_avoidance_three_twenty_one_dim_one_floor_parity_ne_of_abs_one (x₀ 0) (v 0) hcoord apply hpar have h0 : decide (Even ⌊x₀ 0⌋) = false := by simpa using h 0 have h1' : decide (Even ⌊(x₀ + (1:ℝ) • v) 0⌋) = false := by have hk := h 1 simpa using hk have heq : decide (Even ⌊x₀ 0 + v 0⌋) = decide (Even ⌊x₀ 0⌋) := by have hcoord1 : (x₀ + (1:ℝ) • v) 0 = x₀ 0 + v 0 := by simp rw [← hcoord1, h1', h0] exact op_1481_avoidance_three_twenty_one_dim_one_decide_even _ _ heq · rintro ⟨x₀, v, hv, h⟩ have hcoord : |v 0| = α := by have hnorm := op_1481_avoidance_three_twenty_one_dim_one_norm_eq_abs_coord v rw [hv] at hnorm exact hnorm.symm have hlt : |v 0| < 1 := by rw [hcoord]; exact h2 have hbig : 1 < 20 * |v 0| := by rw [hcoord]; linarith apply op_1481_avoidance_three_twenty_one_dim_one_floor_parity_not_const (x₀ 0) (v 0) hlt hbig intro k have hk : decide (Even ⌊(x₀ + (k:ℝ) • v) 0⌋) = true := h k have h0 : decide (Even ⌊x₀ 0⌋) = true := by simpa using h 0 have heq : decide (Even ⌊(x₀ + (k:ℝ) • v) 0⌋) = decide (Even ⌊x₀ 0⌋) := hk.trans h0.symm have hcoordk : (x₀ + (k:ℝ) • v) 0 = x₀ 0 + (k:ℝ) * v 0 := by simp rw [← hcoordk] exact op_1481_avoidance_three_twenty_one_dim_one_decide_even _ _ heq/-- Avoidance of 21-term arithmetic progressions at the exceptional squared spacings in dimension 1. -/theorem op_1481_avoidance_three_twenty_one_dim_one (α : ℝ) (hα : 0 < α) (h_sq : α ^ 2 ∈ ({1 / 4, 1 / 9, 2 / 15, 3 / 4} : Set ℝ)) : euclidean_avoids_ap 1 3 1 21 α := by have hmem : α ^ 2 = 1/4 ∨ α ^ 2 = 1/9 ∨ α ^ 2 = 2/15 ∨ α ^ 2 = 3/4 := by simpa using h_sq have h1 : (1:ℝ)/20 < α := by rcases hmem with h | h | h | h <;> nlinarith have h2 : α < 1 := by rcases hmem with h | h | h | h <;> nlinarith exact op_1481_avoidance_three_twenty_one_dim_one_aux α h1 h2