Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Fixed-witness one-letter absorption criterion for tree-safe words

Proved
Erdos195.conditional_absorption_iff

by Ethan Cheung Wang · Oct 23, 2026 · Mathlib 0df444a (Lean v4.33.1)

arithmetic-progressionscombinatoricserdos-problems

A tree witness is a function θ(k,r)∈{0,1}\theta(k,r)\in\{0,1\}θ(k,r)∈{0,1} on the nodes (k,r)(k,r)(k,r), 0≤r<2k0\le r<2^k0≤r<2k, of the binary tree of residues. For distinct integers x,yx,yx,y with k=ν2(y−x)k=\nu_2(y-x)k=ν2​(y−x), put x≺θyx\prec_\theta yx≺θ​y iff bitk(x)=θ(k, x mod 2k)\mathrm{bit}_k(x)=\theta(k,\,x\bmod 2^k)bitk​(x)=θ(k,xmod2k) (two's-complement digits). A finite word QQQ of integers is θ\thetaθ-safe if the sequence "the letters of QQQ in order, then all remaining integers in ≺θ\prec_\theta≺θ​-order" contains no monotone 444-term arithmetic progression; it is tree-safe if it is θ\thetaθ-safe for some θ\thetaθ. An in-order pair (a,b)(a,b)(a,b) of QQQ (aaa occurs before bbb) is open if 2b−a∉Q2b-a\notin Q2b−a∈/Q and 3b−2a∉Q3b-2a\notin Q3b−2a∈/Q; an open pair lies at the node N(a,b)=(k, a mod 2k)N(a,b)=(k,\,a\bmod 2^k)N(a,b)=(k,amod2k), k=ν2(b−a)k=\nu_2(b-a)k=ν2​(b−a), and θ\thetaθ-safety requires θ(N(a,b))=bitk(b)\theta(N(a,b))=\mathrm{bit}_k(b)θ(N(a,b))=bitk​(b) there. Let RRR be a θ\thetaθ-safe word and t∉Rt\notin Rt∈/R. Then R⋅tR\cdot tR⋅t is θ\thetaθ-safe (for the same θ\thetaθ) if and only if

(i) t=2b−a for an in-order pair (a,b) of R  ⟹  3b−2a∈R,(ii) x∈R, x≺θt  ⟹  2t−x∈R or 3t−2x∈R.\text{(i) } t=2b-a \text{ for an in-order pair } (a,b) \text{ of } R \implies 3b-2a\in R,\qquad \text{(ii) } x\in R,\ x\prec_\theta t \implies 2t-x\in R \text{ or } 3t-2x\in R.(i) t=2b−a for an in-order pair (a,b) of R⟹3b−2a∈R,(ii) x∈R, x≺θ​t⟹2t−x∈R or 3t−2x∈R.

In particular (Astra's conditional absorption) if ttt is not a third term of any in-order 333-AP of RRR and every letter x≺θtx\prec_\theta tx≺θ​t of RRR already has 2t−x2t-x2t−x or 3t−2x3t-2x3t−2x in RRR, then ttt can be appended without changing the witness. This is the fixed-witness one-letter extension criterion; it contains bottom insertion (all letters ≻θt\succ_\theta t≻θ​t) as the special case where (ii) is vacuous (Erdős Problem 195).

Formalization note: treeLt θ is from Definitions.Def_Erdos195_tree; Safe, bitOne are from Definitions.Def_Erdos195_defs. Positions in a word are List.idxOf; P ++ [c] appends c.

Preamble
import Mathlib
import Definitions.Def_Erdos195_tree
Formal statement
namespace Erdos195

theorem conditional_absorption_iff (θ : ℕ → ℤ → Bool) (R : List ℤ) (t : ℤ)
    (hR : Safe (treeLt θ) R) (ht : t ∉ R) :
    Safe (treeLt θ) (R ++ [t]) ↔
      (∀ a b : ℤ, a ∈ R → b ∈ R → R.idxOf a < R.idxOf b → t = 2 * b - a → 3 * b - 2 * a ∈ R) ∧
      (∀ x ∈ R, treeLt θ x t → 2 * t - x ∈ R ∨ 3 * t - 2 * x ∈ R) := by sorry

end Erdos195
Source
Erdős Problem 195 (https://www.erdosproblems.com/195); statements from GPT 6 Astra (Oct 23 2026 'tree11' answer, checked and sharpened), Lean-verified by Grok Bot for Ethan Cheung

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me