Second backward-closure step is tree-safe at the least sink
ProvedErdos195.second_sink_step_safeA 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. Under the hypotheses of the previous milestone (open path with absent sink fourth term , and uniqueness at ), suppose is -safe and for every true-sink fourth term of . Then (the word followed by and then ) is tree-safe.
This is the preceding milestone combined with milestone #156 (the least sink is never blocked) applied to the word .
import Mathlib import Definitions.Def_Erdos195_tree
namespace Erdos195
theorem second_sink_step_safe (T : List ℤ) (hS : ∃ θ : ℕ → ℤ → Bool, Safe (treeLt θ) T)
(m : ℕ) (a b : ℕ → ℤ) (hm : 0 < m)
(ha : ∀ i < m, a i ∈ T) (hb : ∀ i < m, b i ∈ T)
(hi : ∀ i < m, T.idxOf (a i) < T.idxOf (b i))
(hpath : ∀ i, i + 1 < m → 3 * b i - 2 * a i = 2 * b (i + 1) - a (i + 1))
(ht : ∀ i < m, 2 * b i - a i ∉ T)
(hw : 3 * b (m - 1) - 2 * a (m - 1) ∉ T)
(hU : ∀ x y : ℤ, x ∈ T → y ∈ T → T.idxOf x < T.idxOf y →
2 * y - x = 2 * b (m - 1) - a (m - 1) → 3 * y - 2 * x ∉ T →
3 * y - 2 * x = 3 * b (m - 1) - 2 * a (m - 1))
(θ' : ℕ → ℤ → Bool) (hS' : Safe (treeLt θ') (T ++ [3 * b (m - 1) - 2 * a (m - 1)]))
(hmin : ∀ (n : ℕ) (a' b' : ℕ → ℤ), 0 < n →
(∀ i < n, a' i ∈ T ++ [3 * b (m - 1) - 2 * a (m - 1)]) →
(∀ i < n, b' i ∈ T ++ [3 * b (m - 1) - 2 * a (m - 1)]) →
(∀ i < n, (T ++ [3 * b (m - 1) - 2 * a (m - 1)]).idxOf (a' i) <
(T ++ [3 * b (m - 1) - 2 * a (m - 1)]).idxOf (b' i)) →
(∀ i, i + 1 < n → 3 * b' i - 2 * a' i = 2 * b' (i + 1) - a' (i + 1)) →
(∀ i < n, 2 * b' i - a' i ∉ T ++ [3 * b (m - 1) - 2 * a (m - 1)]) →
3 * b' (n - 1) - 2 * a' (n - 1) ∉ T ++ [3 * b (m - 1) - 2 * a (m - 1)] →
(∀ x y : ℤ, x ∈ T ++ [3 * b (m - 1) - 2 * a (m - 1)] →
y ∈ T ++ [3 * b (m - 1) - 2 * a (m - 1)] →
(T ++ [3 * b (m - 1) - 2 * a (m - 1)]).idxOf x <
(T ++ [3 * b (m - 1) - 2 * a (m - 1)]).idxOf y →
2 * y - x = 3 * b' (n - 1) - 2 * a' (n - 1) →
3 * y - 2 * x ∈ T ++ [3 * b (m - 1) - 2 * a (m - 1)]) →
3 * b' (n - 1) - 2 * a' (n - 1) ≠ 2 * b (m - 1) - a (m - 1) →
treeLt θ' (2 * b (m - 1) - a (m - 1)) (3 * b' (n - 1) - 2 * a' (n - 1))) :
∃ θ'' : ℕ → ℤ → Bool,
Safe (treeLt θ'') (T ++ [3 * b (m - 1) - 2 * a (m - 1)] ++ [2 * b (m - 1) - a (m - 1)]) := by sorry
end Erdos195