Three-color target sums · Proving Ground goal
A three-color subset sum for the prime 6,577
Every three-coloring of the integers from 1 through 6,576 contains distinct integers of one color that sum to 6,577.
The proof can change which pairs it starts with. Suppose three same-color pairs have entries three apart, with lower entries a, b and c. The first pair can supply the two entries needed to correct the residue modulo three. The next two pairs then supply the starting entries, at a total cost of 2a + 3 + b + c. Whenever that cost is at most 844, the remaining argument goes through.
Thirty configurations need a separate calculation. Nineteen use two correction entries with the same residue, and eleven use both nonzero residues. For each configuration Lean checks the actual values the correction entries can take. Including them in the subset sums either makes 6,577 directly or proves that enough large integers are unavailable to the later steps.
For a different case, any 26 of the 28 odd numbers from 329 through 383 make every odd sum from 5,933 through 6,171. The same color has enough even numbers at most 236 to fill the difference. In the case that uses a lower bound of 120 sites, counting unused entries above 359 supplies the final endpoint bound.
The complete archive reconstructs 1,531 Lean modules. The theorem is TargetSums.target_6577.
Unpack the loader and run python3 fetch.py. It assembles and verifies the archive. Unpack that archive and run python3 rebuild.py with Lean 4.36.0. The loader also accepts the segment downloads placed beside it. Part 1, Part 2.
Download and replay
Download the verified proof archive loader
1188 bytes · SHA-256 245a18da96259aea1fc280be8f0c1014be2f10e824107378c280b6ab75eb682c