Remove c unit squares from a k × k grid. For small c the rest still needs a square of side k; for larger c, tilting lets them squeeze into a smaller one. Write c*(k) for the largest c with s(k² − c) = k. Every bound on this page is an explicit packing of k² − c squares in a square of side less than k, for every k in a range, checked by the Lean kernel.
Status. All theorems below are proved in Lean 4 with Mathlib, from the plain definition of a packing, using only the standard axioms (propext, Classical.choice, Quot.sound). Two of them are, as far as we know, new bounds; the others formalize results of Kevin Fang and Sungjoon Ryu, one of them on a wider range than its source. Not peer reviewed; the novelty check covers the jlevy/squares register and Ryu's preprint only.
Each line is a Lean theorem ∀ k ≥ k₀, ∃ s < k, Packs (k·k − c) s, which gives c*(k) ≤ c − 1. Highlighted rows are new mathematics of ours; every Lean proof on this page is ours. The packings page shows where each one passes k² − k.
| bound | for | Lean theorem · mathematics |
|---|---|---|
| c*(n) ≤ n − 2 | n ≥ 15 | FangFinal.theorem1 Kevin Fang, after Arslanov–Mustafin–Shangitbayev |
| + p + 2q more squares | 16p + 21q ≤ n − 15 | FangFinal.theorem2 Fang |
| c*(k) ≤ 8⌈√(k − 4)⌉ − 1 | k ≥ 6 | RyuBound.packs_sub_8sqrt Ryu, Theorem 1.4 |
| c*(k) ≤ 4⌈√(2k − 7)⌉ − 1 | k ≥ 7 | RyuLayers.packs_sub_4sqrt2_layers ours: axis-filled band ends (new) |
| c*(k) < 18.9 k2/5 + 35.7 k1/5 + 122 | k ≥ 3·10⁵ | RyuStairBound.packs_stair_k25 ours: Ryu's staircase ends, our count (new) |
| c*(k) < 20.668 k2/5 + 0.623 | k ≥ 8·10⁶ | RyuStairBound.packs_ryu_thm12 Ryu, Theorem 1.2 (proved there for k ≥ 1.6·10⁷; the wider range is ours) |
Which is smallest where: Fang's for 15 ≤ k ≤ 39; 4⌈√(2k − 7)⌉ − 1 from 40 to about 7.4·10⁵ (it is below Ryu's 8⌈√(k − 4)⌉ − 1 at every k ≥ 7); then the two-term k2/5 bound, which is below Ryu's Theorem 1.2 bound for every k ≥ 6.7·10⁶. At small k the record packings of the register are better than any of these formulas, and Ryu's tuned certificates are better at the three k where he computed them; his k3/8 bounds (not formalized here) take over for very large k.
| k | Fang | 8√ (Ryu) | 4⌈√(2k−7)⌉ − 1 | two-term k2/5 | Ryu Thm 1.2 |
|---|---|---|---|---|---|
| 100 | 90 | 79 | 55 | ||
| 10⁴ | 9 048 | 799 | 567 | ||
| 10⁵ | 90 476 | 2 535 | 1 791 | ||
| 10⁶ | 904 762 | 7 999 | 5 659 | 5 435 | |
| 10⁷ | 25 303 | 17 891 | 12 943 | 13 041 | |
| 10⁸ | 79 999 | 56 571 | 31 497 | 32 757 |
Entries are the resulting bounds on c*(k). Lower bounds are far smaller: c*(k) ≥ 3 for k ≥ 6, and Ryu's preprint claims c*(k) → ∞ (at least logarithmically).
All the square-root and k2/5 bounds use Ryu's L-shaped packing (after Erdős and Graham): an axis-parallel grid of (k − b)² squares, and two bands of rows of b squares each, tilted just enough that a row is a little narrower than b. The whole fits in side k − b + w < k. Each row is tilted, so successive rows are spaced slightly more than 1 apart, which costs about 2L/b along a band of length L: about 4k/b in all. The rest of the loss is at the four band ends, the triangles under the first row and over the last.
Each end wastes about b. Total ≈ 4b + 4k/b, best at b ≈ √k: Ryu's 8√k.
About b/2 axis-parallel squares fit under the first row and over the last. Total ≈ 2b + 4k/b, best at b ≈ √(2k): 4√2·√k ≈ 5.66√k. With b = ⌈√(2k − 7)⌉ the four ends hold exactly 2b squares.
Columns at one tilt, axis layers under them that follow the rising ceiling, and short rows at the wall (Ryu's §6, after Bui). End cost O(b2/3); with b ≈ k3/5 the exponent is 2/5.
For the axis-filled ends, a search over every b and every axis layering of this construction finds nothing better than 4⌈√(2k − 7)⌉ − 1 for 7 ≤ k ≤ 3·10⁵. Better packings at small k exist but come from search (de Winter's, for example), not from a formula.
certificates/k2-minus-c/verify.sh # Ryu-line theorems, a few minutes
certificates/k2-minus-c/verify.sh --fang # also Fang's 18 pieces, ~20 min, ≤ 8 GB per job
Files: lean/Sqpack/RyuBand, RyuBound, RyuFill, RyuEnds, RyuLayers, RyuStair, RyuStairCount, RyuStairEnd, RyuStairBound, FangGlue, FangTheorem, FangFinal. Numerical companions in search/ryu/.