Single-inversion criterion: U·(b,c)·V (classes mod 4) has a SAFE extension iff 4c−3b ∉ b·V or 5c−4b ∉ U·c
ProvedErdos195.single_inversion_iffA tree witness defines a strict total order on (milestone framework). A finite word of integers is SAFE for if the sequence "letters of in order, then all remaining integers in -order" has no monotone 4-term arithmetic progression. Theorem (single-inversion criterion). Let be odd and even, and let be a duplicate-free word in which every entry of is and every entry of is . Assume and are each SAFE (for some tree witnesses). Put and . Then has a SAFE end-extension (for some tree witness) if and only if
Moreover, when this holds, can be chosen with exactly entries, all new and distinct.
This is GPT 6 Astra's single-inversion repair lemma (astra_fourclass) as a standalone exact criterion. With and : if , (reflections in inherited order); if and , where is a SAFE ordering of the reflection set ending at (milestone #133). The necessity half is the interlocked root obstruction (milestone #135): if and , the pairs and can never close and force opposite root bits. Milestones #122 and #136 are the two positive cases, in the coordinates of the four-class absorption theorem.
import Mathlib import Definitions.Def_Erdos195_tree
namespace Erdos195
theorem single_inversion_iff (U V : List ℤ) (b c : ℤ)
(hbo : b % 2 = 1) (hce : c % 2 = 0)
(hU : ∀ x ∈ U, x % 4 = c % 4) (hV : ∀ x ∈ V, x % 4 = b % 4)
(hnd : (U ++ [b, c] ++ V).Nodup)
(hE : ∃ θ : ℕ → ℤ → Bool, Safe (treeLt θ) (U ++ [c]))
(hO : ∃ θ : ℕ → ℤ → Bool, Safe (treeLt θ) ([b] ++ V)) :
((∃ R : List ℤ, ∃ θ : ℕ → ℤ → Bool, Safe (treeLt θ) (U ++ [b, c] ++ V ++ R)) ↔
(4 * c - 3 * b ∉ [b] ++ V ∨ 5 * c - 4 * b ∉ U ++ [c])) ∧
((4 * c - 3 * b ∉ [b] ++ V ∨ 5 * c - 4 * b ∉ U ++ [c]) →
∃ R : List ℤ, R.length = V.length + 2 ∧ (U ++ [b, c] ++ V ++ R).Nodup ∧
∃ θ : ℕ → ℤ → Bool, Safe (treeLt θ) (U ++ [b, c] ++ V ++ R)) := by sorry
end Erdos195