New-pair conflicts at the second backward step: exact criterion
ProvedErdos195.new_pair_blockers_iffA tree witness defines a strict total order on : for with , iff the -th binary digit of is exactly when . A finite word of integers is -safe if the sequence "letters of in order, then all remaining integers in -order" has no monotone 4-term arithmetic progression (positions are first occurrences); is tree-safe if it is -safe for some . For an in-order pair of ( before ) call its third term and its fourth term. An open path in is a family of in-order pairs , , , with for and no third term in . Its sink fourth term is a true-sink fourth term of if and every in-order pair of with has (condition C1 for appending ).
Theorem. Let be a finite word, , an integer, , , and , with . Let ( followed by , then ). Call a new-pair conflict a choice of and such that both pairs and are fully open in (third and fourth terms absent from ), they have the same level and the same node , and opposite orientations: the binary digits of and at that level differ. Then:
- a new-pair conflict exists if and only if (i) some with has , and (ii) some with has (and then the common level is exactly );
- if a new-pair conflict exists then is not tree-safe (for any witness).
In the setting of milestones #158–#159 ( the last pair of an open path, its sink, its third term), this characterizes exactly when the pairs created by the first sink step and by the second step collide; note that satisfies (i) as soon as , so the decisive condition is (ii).
import Mathlib import Definitions.Def_Erdos195_tree
namespace Erdos195
theorem new_pair_blockers_iff (T : List ℤ) (a b : ℤ) (hab : a ≠ b) (hbT : b ∈ T)
(hw : 3 * b - 2 * a ∉ T) (ht : 2 * b - a ∉ T) :
((∃ x' x : ℤ, x' ∈ T ∧ x ∈ T ++ [3 * b - 2 * a] ∧
2 * (3 * b - 2 * a) - x' ∉ T ++ [3 * b - 2 * a] ++ [2 * b - a] ∧
3 * (3 * b - 2 * a) - 2 * x' ∉ T ++ [3 * b - 2 * a] ++ [2 * b - a] ∧
2 * (2 * b - a) - x ∉ T ++ [3 * b - 2 * a] ++ [2 * b - a] ∧
3 * (2 * b - a) - 2 * x ∉ T ++ [3 * b - 2 * a] ++ [2 * b - a] ∧
padicValInt 2 ((3 * b - 2 * a) - x') = padicValInt 2 ((2 * b - a) - x) ∧
x' % 2 ^ padicValInt 2 ((2 * b - a) - x) = x % 2 ^ padicValInt 2 ((2 * b - a) - x) ∧
¬ (bitOne (3 * b - 2 * a) (padicValInt 2 ((2 * b - a) - x)) ↔
bitOne (2 * b - a) (padicValInt 2 ((2 * b - a) - x)))) ↔
((∃ x' ∈ T, x' % 2 ^ (padicValInt 2 (b - a) + 1) = a % 2 ^ (padicValInt 2 (b - a) + 1) ∧
2 * (3 * b - 2 * a) - x' ∉ T ++ [3 * b - 2 * a] ++ [2 * b - a] ∧
3 * (3 * b - 2 * a) - 2 * x' ∉ T ++ [3 * b - 2 * a] ++ [2 * b - a]) ∧
(∃ x ∈ T, x % 2 ^ (padicValInt 2 (b - a) + 1) = b % 2 ^ (padicValInt 2 (b - a) + 1) ∧
2 * (2 * b - a) - x ∉ T ++ [3 * b - 2 * a] ++ [2 * b - a] ∧
3 * (2 * b - a) - 2 * x ∉ T ++ [3 * b - 2 * a] ++ [2 * b - a]))) ∧
((∃ x' x : ℤ, x' ∈ T ∧ x ∈ T ++ [3 * b - 2 * a] ∧
2 * (3 * b - 2 * a) - x' ∉ T ++ [3 * b - 2 * a] ++ [2 * b - a] ∧
3 * (3 * b - 2 * a) - 2 * x' ∉ T ++ [3 * b - 2 * a] ++ [2 * b - a] ∧
2 * (2 * b - a) - x ∉ T ++ [3 * b - 2 * a] ++ [2 * b - a] ∧
3 * (2 * b - a) - 2 * x ∉ T ++ [3 * b - 2 * a] ++ [2 * b - a] ∧
padicValInt 2 ((3 * b - 2 * a) - x') = padicValInt 2 ((2 * b - a) - x) ∧
x' % 2 ^ padicValInt 2 ((2 * b - a) - x) = x % 2 ^ padicValInt 2 ((2 * b - a) - x) ∧
¬ (bitOne (3 * b - 2 * a) (padicValInt 2 ((2 * b - a) - x)) ↔
bitOne (2 * b - a) (padicValInt 2 ((2 * b - a) - x)))) →
¬ ∃ θ : ℕ → ℤ → Bool, Safe (treeLt θ) (T ++ [3 * b - 2 * a] ++ [2 * b - a])) := by sorry
end Erdos195