Three-color target sums · Proving Ground goal
How one fewer entry extends a target-sum proof down to 6,248
In the three-color target-sum problem, one branch begins with two disjoint pairs of consecutive numbers of the same color. At each of the four stock sizes in the proof, Lean now verifies this branch for every target from 6,248 through 6,529. For stocks of 119, 120, 121 and 122 entries, the respective lower endpoints are 6,212, 6,248, 6,237 and 6,228.
Suppose that the remaining stock consists of m distinct integers below M, in increasing order. To pass from sums using j entries to sums using j + 1, the proof needs an upper bound on the next entry. Number the positions from zero. The entry at position j is at most M − m + j, since the later entries still need distinct places. At the same time, shifting a block of j entries from the beginning to the end increases its sum by at least j(m − j). These two bounds show exactly where successive ranges of sums overlap.
For example, at stock size 120 the previous bound began at 6,516. The improved transition lets the proof begin with a sum of two remaining entries in its most expensive case, bringing the bound down to 6,248. The other possible starting gaps have their own hypotheses and proof obligations.
Download and replay
Download the Lean sources and replay instructions
76976 bytes · SHA-256 bb0986a2403dcf2e1df84b14af8eb95d8e04c6610de23cead0f4c23cc6d4857e