Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Cell patterns and the nogood library for 25 points in the unit square

Definition
CirclePackingConstants_TwentyfiveNogoods

by kylelyk · Nov 27, 2026 · Mathlib 0df444a (Lean v4.33.1)

circle-packingdiscrete-geometry

Divide the unit square [0,1]2[0,1]^2[0,1]2 into the 252525 closed cells

Qc=[i/5,(i+1)/5]×[j/5,(j+1)/5],c=5i+j,0≤i,j≤4.Q_c=[i/5,(i+1)/5]\times[j/5,(j+1)/5],\qquad c=5i+j,\quad 0\le i,j\le 4 .Qc​=[i/5,(i+1)/5]×[j/5,(j+1)/5],c=5i+j,0≤i,j≤4.

A cell has diameter 2/5>1/4\sqrt2/5>1/42​/5>1/4, so a set of points with pairwise distances greater than 1/41/41/4 may have two points in one cell (but not three: the two points then lie in the lower and in the upper half of the cell). This file fixes the vocabulary used to exclude such "double" cells when 252525 points are present.

  1. Cell patterns. A cell pattern is a pair (a,b)(a,b)(a,b) of sets of cells, encoded as 252525-bit masks (bit ccc stands for QcQ_cQc​). It asks for a point pc,0∈Qcp_{c,0}\in Q_cpc,0​∈Qc​ for every c∈ac\in ac∈a and a second point pc,1∈Qcp_{c,1}\in Q_cpc,1​∈Qc​ for every c∈bc\in bc∈b (InCellR, layMask).

  2. Infeasibility. The pattern (a,b)(a,b)(a,b) is infeasible (Infeasible a b) if there is no choice of these points with

∣pc,l−pc′,l′∣2>116for all distinct pairs (c,l)≠(c′,l′).|p_{c,l}-p_{c',l'}|^2>\tfrac1{16}\qquad\text{for all distinct pairs }(c,l)\ne(c',l').∣pc,l​−pc′,l′​∣2>161​for all distinct pairs (c,l)=(c′,l′).
  1. Placement. For k<8k<8k<8 and integers di,djd_i,d_jdi​,dj​, the map trI k di dj sends the cell (i,j)(i,j)(i,j) to its image under the symmetry of the 5×55\times55×5 board coded by kkk (bit 000: i↦4−ii\mapsto 4-ii↦4−i; bit 111: j↦4−jj\mapsto 4-jj↦4−j; bit 222: exchange iii and jjj; applied in this order), followed by the translation by (di,dj)(d_i,d_j)(di​,dj​) cells. PlacedIn x k di dj A B says that the image of the pattern x=(a,b)x=(a,b)x=(a,b) stays on the board and is contained in the pattern (A,B)(A,B)(A,B): cells of aaa go to cells of AAA and cells of bbb to cells of BBB.

  2. The library. nogoods is an explicit list of 158415841584 cell patterns (a,b)(a,b)(a,b) with b⊆ab\subseteq ab⊆a and b≠∅b\ne\emptysetb=∅, each with one to four double cells.

The library is the data of a computer-assisted proof that 252525 points with pairwise distances greater than 1/41/41/4 cannot leave a cell empty: the companion theorems twentyfive_nogood_batch1–twentyfive_nogood_batch6 state that every pattern of the list is infeasible, and twentyfive_nogood_cover states that every distribution of 252525 points over the cells with an empty cell contains a placed pattern of the list. Since infeasibility is preserved by the symmetries of the square, by translations by whole cells and by adding cells, the two facts together exclude an empty cell.

Formalization Note The definition file contains no proofs. The list was found by a counterexample-guided search (a SAT solver proposes a count vector avoiding all patterns found so far; an exact region-elimination procedure refutes a sub-pattern of it, which is then minimized); it is one representative per class under the 888 symmetries and the translations. Distances are measured by sqDist, so "more than 1/41/41/4 apart" reads 1/16<sqDist1/16<\mathrm{sqDist}1/16<sqDist.

Definition code
import Definitions.Def_CirclePackingConstants

/-!
# Nogood patterns for 25 points in the unit square

The unit square is divided into the 25 closed cells of side `1/5`; cell `c = 5 i + j` (`i, j < 5`) is
`[i/5, (i+1)/5] × [j/5, (j+1)/5]`. A *cell pattern* is a pair of 25-bit masks `(a, b)`: the cells of `a`
must contain a point and the cells of `b` a second point. The pattern is *infeasible* if no such points
exist with all pairwise distances greater than `1/4`. Infeasibility is preserved when a pattern is moved by
a symmetry of the square followed by a translation by whole cells (`trI`, `PlacedIn`), and when cells are
added. `nogoods` is a list of 1584 patterns used as a library of forbidden local occupancy patterns.
-/

noncomputable section

namespace CirclePackingConstants
namespace Twentyfive

/-- `P` lies in the closed cell `c = 5 i + j` (`i = c / 5` indexes x, `j = c % 5` indexes y) of side 1/5. -/
def InCellR (P : Point) (c : ℕ) : Prop :=
  ((c / 5 : ℕ) : ℝ) / 5 ≤ P.1 ∧ P.1 ≤ (((c / 5 : ℕ) : ℝ) + 1) / 5 ∧
  ((c % 5 : ℕ) : ℝ) / 5 ≤ P.2 ∧ P.2 ≤ (((c % 5 : ℕ) : ℝ) + 1) / 5

/-- Mask of layer `l`: layer 0 uses `a` (cells with a point), layer 1 uses `b` (cells with a second point). -/
def layMask (a b l : ℕ) : ℕ := if l = 0 then a else b

/-- The cell pattern `(a, b)` (25-bit masks) admits no configuration: a point `p c 0` in every cell of `a`,
a second point `p c 1` in every cell of `b`, all these points pairwise more than 1/4 apart. -/
def Infeasible (a b : ℕ) : Prop :=
  ¬ ∃ p : ℕ → ℕ → Point,
    (∀ c l, c < 25 → l < 2 → (layMask a b l).testBit c = true → InCellR (p c l) c) ∧
    (∀ c l c' l', c < 25 → l < 2 → c' < 25 → l' < 2 → (c, l) ≠ (c', l') →
      (layMask a b l).testBit c = true → (layMask a b l').testBit c' = true →
      (1 : ℝ) / 16 < sqDist (p c l) (p c' l'))

/-- Image of cell `c` under symmetry `k < 8` (bit 0: flip i, bit 1: flip j, bit 2: swap i and j, applied in
this order) followed by the translation `(di, dj)`, as integer coordinates `(i', j')`. -/
def trI (k : ℕ) (di dj : ℤ) (c : ℕ) : ℤ × ℤ :=
  let i : ℤ := if k % 2 = 1 then 4 - (c / 5 : ℕ) else (c / 5 : ℕ)
  let j : ℤ := if (k / 2) % 2 = 1 then 4 - (c % 5 : ℕ) else (c % 5 : ℕ)
  if (k / 4) % 2 = 1 then (j + di, i + dj) else (i + di, j + dj)

/-- Every cell of the mask `m` is carried by `trI k di dj` to a cell of the board that belongs to `M`. -/
def MaskPlacedIn (k : ℕ) (di dj : ℤ) (m M : ℕ) : Prop :=
  ∀ c, c < 25 → m.testBit c = true →
    0 ≤ (trI k di dj c).1 ∧ (trI k di dj c).1 < 5 ∧ 0 ≤ (trI k di dj c).2 ∧ (trI k di dj c).2 < 5 ∧
    M.testBit (5 * (trI k di dj c).1 + (trI k di dj c).2).toNat = true

/-- The image of the pattern `x = (a, b)` under `trI k di dj` lies on the board and is contained in the
pattern `(A, B)`: cells of `a` go to cells of `A`, cells of `b` to cells of `B`. -/
def PlacedIn (x : ℕ × ℕ) (k : ℕ) (di dj : ℤ) (A B : ℕ) : Prop :=
  MaskPlacedIn k di dj x.1 A ∧ MaskPlacedIn k di dj x.2 B

/-- Entries 0 to 197 of the library. -/
def nogoodsPart0 : List (ℕ × ℕ) := [
  (30146559, 16777216), (4980735, 524288), (917503, 524288), (32767, 16384), (909311, 589824), (450559, 294912), (385023, 49152), (13033471, 49152), (352255, 81920),
  (7335935, 524288), (1044479, 131072), (782335, 655360), (782335, 589824), (913407, 589824), (782335, 557056), (913407, 557056), (126975, 81920), (126975, 49152),
  (7778303, 1179648), (20479, 18432), (1038335, 49152), (28671, 17408), (1038335, 17408), (5234687, 512), (1023999, 524800), (1036287, 262656), (511999, 33280),
  (446463, 164352), (1038335, 33280), (4095, 1536), (14335, 1536), (202751, 1536), (26623, 1536), (501759, 1536), (32767, 256), (1036287, 262400),
  (358399, 65792), (497663, 33024), (2047, 1280), (982783, 557056), (917247, 33280), (982783, 33280), (450303, 295424), (1044223, 66048), (1044223, 33280),
  (1011455, 131584), (16127, 2560), (1046271, 33280), (32511, 1536), (13627135, 1536), (5887, 5632), (9983, 9728), (16383, 128), (32511, 640),
  (786303, 655360), (786303, 589824), (917375, 589824), (917375, 327680), (33226623, 17825792), (720767, 688128), (1040255, 147456), (974719, 180224), (515967, 20480),
  (1032063, 524800), (245631, 33280), (835455, 557568), (1040255, 262656), (974719, 164352), (237439, 4608), (1046399, 33280), (16255, 1536), (235391, 132608),
  (255871, 67072), (32208767, 16777472), (16255, 1280), (368511, 263424), (6015, 5376), (1044095, 262656), (104703, 32832), (815871, 16448), (31487, 576),
  (799615, 524864), (237503, 1536), (32255, 32), (105983, 32), (16127, 544), (384767, 544), (105215, 33312), (13529855, 544), (938751, 262688),
  (32639, 544), (1286015, 544), (104319, 66080), (32447, 672), (654591, 557072), (900351, 557072), (965887, 557072), (236799, 131088), (236799, 65552),
  (433407, 294928), (40191, 4112), (519423, 49168), (453887, 180240), (1010943, 81936), (240895, 40976), (3181823, 2129936), (7423, 2064), (134399, 133136),
  (1029375, 557072), (103679, 36880), (7439615, 4227088), (7423, 1040), (947455, 525328), (5375, 5136), (753151, 524304), (15187455, 16), (3587583, 1048592),
  (7519743, 1048592), (48639, 32784), (1039871, 524304), (1170943, 1048592), (56831, 49168), (499199, 262160), (1154559, 1048592), (105983, 32784), (73215, 65552),
  (1043967, 524304), (912895, 65552), (503295, 262160), (241151, 32784), (372223, 32784), (15117823, 32784), (4369919, 4227088), (241151, 8208), (970239, 557072),
  (118271, 81936), (118271, 49168), (183807, 180240), (19967, 18448), (783871, 557072), (1029631, 65552), (505343, 32784), (3257855, 32784), (734719, 589840),
  (513535, 49168), (7837183, 1048592), (7575039, 32784), (3184127, 2129936), (255487, 49168), (912895, 1040), (552447, 525328), (7581183, 1040), (15117823, 1040),
  (4337151, 4195344), (19967, 17424), (7540223, 1049616), (3012095, 1040), (6501887, 1040), (939519, 17424), (7575039, 1040), (15832575, 8389648), (26111, 17424),
  (9727, 9232), (944639, 2064), (737279, 524304), (29573119, 16777232), (30367743, 16), (417791, 131088), (3317759, 1048592), (40959, 32784), (15200255, 16),
  (3600383, 1048592), (16445439, 1048592), (13266943, 4194320), (17805311, 16777232), (1552383, 1048592), (45055, 32784), (2084863, 1048592), (1036287, 262160), (16699391, 1048592),
  (8835071, 32784), (233471, 131088), (3248127, 1048592), (102399, 65552), (102399, 32784), (4095, 2064), (882687, 65552), (1038335, 32784), (16111615, 32784),
  (6547455, 32784), (2047, 1040), (17587199, 16777232), (26096639, 16777232), (807935, 262160), (7339775, 16), (4128511, 1048592), (130815, 32784), (982783, 32784)]

/-- Entries 198 to 395 of the library. -/
def nogoodsPart1 : List (ℕ × ℕ) := [
  (25853695, 16777232), (425727, 131088), (556799, 524304), (32366335, 524304), (16703231, 32784), (581375, 557072), (941823, 524304), (32511, 4112), (1044223, 262160),
  (1044223, 131088), (1044223, 65552), (1044223, 32784), (978687, 163856), (847615, 294928), (585471, 557072), (880383, 327696), (618239, 589840), (61183, 40976),
  (77567, 73744), (16512767, 1048592), (33421055, 1048592), (1046271, 32784), (915199, 294928), (1013503, 65552), (13528831, 1040), (7581439, 1040), (405247, 263184),
  (143103, 132112), (5207807, 1040), (13268735, 8389648), (25851647, 8389648), (554751, 525328), (7452415, 4195344), (931583, 525328), (939775, 525328), (747263, 525328),
  (1009407, 132112), (17590015, 16778256), (812799, 525328), (812799, 263184), (9983, 9232), (7423, 144), (9072383, 8388752), (405247, 144), (239359, 32912),
  (1015167, 16400), (245119, 32784), (3521919, 32784), (966015, 557072), (974207, 163856), (253311, 49168), (1029503, 557072), (234879, 36880), (138623, 132112),
  (257407, 17424), (1013119, 525328), (750975, 656400), (947583, 17424), (883071, 589840), (32848255, 17825808), (130943, 32784), (458623, 32784), (6487935, 32784),
  (98175, 65552), (163711, 131088), (556927, 524304), (1040255, 262160), (13492095, 524304), (32431999, 8388624), (1007487, 524304), (13262719, 655376), (237439, 131088),
  (237439, 65552), (237439, 32784), (171903, 163856), (32639, 4112), (13254527, 528400), (17579903, 16781328), (237439, 4112), (1044351, 32784), (3927935, 32784),
  (241535, 8208), (204671, 2064), (544639, 526352), (32241535, 8388624), (1013631, 65552), (18863999, 17825808), (32495487, 8388624), (16255, 1040), (12967807, 1040),
  (13524863, 1040), (237439, 1040), (520063, 1040), (554879, 525328), (997247, 525328), (513919, 263184), (808831, 525328), (14207, 5136), (202623, 5136),
  (458367, 163856), (523903, 4112), (811519, 80), (945919, 80), (1008383, 65616), (541439, 524368), (930175, 524368), (12671, 4176), (225151, 80),
  (799615, 524368), (17585023, 16777296), (283519, 262224), (29311, 8272), (807551, 524368), (785855, 557072), (3259839, 32784), (3260351, 1048592), (245695, 32784),
  (1040319, 32784), (237503, 2064), (12967871, 1040), (237503, 1040), (900031, 557072), (944831, 10256), (7423, 48), (3249407, 2097200), (1152255, 1048624),
  (464127, 262192), (70911, 65584), (104703, 32816), (231679, 32816), (67839, 65584), (135423, 131120), (4351, 4144), (8447, 8240), (2979327, 48),
  (6501887, 48), (2708991, 16432), (7575039, 48), (6655, 48), (813567, 48), (17328639, 16777264), (18943, 16432), (946687, 48), (4600319, 48),
  (938495, 524336), (414207, 16432), (3248639, 1048624), (418303, 131120), (549375, 524336), (1023, 48), (945919, 48), (5072639, 4194352), (468735, 262192),
  (424703, 48), (2091775, 1048624), (9366271, 32816), (289535, 262192), (15168255, 48), (946943, 48), (930559, 524336), (807679, 524336), (942847, 131120),
  (556415, 524336), (474495, 48), (802175, 524336), (945535, 524336), (11647, 8240), (2192767, 16432), (817535, 524336), (32356735, 32816), (276863, 262192),
  (235903, 32816), (67967, 65584), (946559, 524336), (422271, 16432), (12671, 4144), (540543, 524336), (237439, 48), (225151, 48), (864127, 524336),
  (1013631, 48), (104319, 65584), (256895, 32816), (930687, 524336), (25973631, 8388656), (17585023, 16777264), (136063, 131120), (421503, 8240), (544383, 524336),
  (1154239, 1048624), (7359, 4144), (3247295, 1048624), (101567, 65584), (390335, 327728), (70847, 69680), (622015, 524336), (7585215, 48), (138687, 131120)]

/-- Entries 396 to 593 of the library. -/
def nogoodsPart2 : List (ℕ × ℕ) := [
  (519615, 16432), (15961535, 8388656), (1152447, 4144), (2495, 2096), (487871, 65584), (212927, 48), (802751, 524336), (516031, 48), (8675263, 8388656),
  (20967359, 48), (24899519, 48), (17330111, 16777264), (104383, 65584), (162751, 48), (25967551, 16777264), (17587135, 16777264), (947135, 48), (17593279, 48),
  (5055, 4144), (16063, 8240), (1011391, 262192), (503487, 131120), (489151, 65584), (555711, 524336), (31423, 8240), (10943, 10288), (946879, 4144),
  (6335, 176), (447, 176), (404159, 176), (946879, 176), (1015615, 48), (80351, 65552), (1118687, 1052688), (815071, 1040), (226271, 65552),
  (947167, 16), (12580575, 8388624), (31455, 144), (946911, 80), (287455, 262224), (815455, 524368), (422303, 4112), (930719, 524304), (505071, 40960),
  (245231, 131072), (409071, 8192), (32239, 4096), (33353199, 2129920), (519663, 49152), (16100847, 294912), (16166383, 294912), (3321327, 2129920), (241135, 40960),
  (3255791, 40960), (16166383, 40960), (32239, 2048), (404975, 264192), (404975, 133120), (3257839, 40960), (1037807, 557056), (33412591, 8421376), (16700911, 2129920),
  (497135, 294912), (234991, 36864), (366063, 299008), (892399, 525312), (945647, 525312), (945647, 263168), (4427247, 4195328), (20352495, 18875392), (5615, 5120),
  (917487, 65536), (3276783, 32768), (901103, 557056), (966639, 557056), (385007, 327680), (16367, 4096), (24559, 20480), (126959, 73728), (970735, 180224),
  (16367, 2048), (24559, 18432), (24559, 17408), (1009647, 17408), (507887, 512), (106479, 33280), (241647, 33280), (102383, 66048), (505839, 33280),
  (212463, 256), (343535, 256), (15113711, 8388864), (10919407, 10486016), (400879, 262400), (15117807, 4194560), (15117807, 33024), (970223, 295168), (101871, 65792),
  (101871, 33024), (167407, 164096), (6327791, 4227328), (243183, 33024), (3257839, 33024), (210415, 65792), (15148527, 65792), (3180015, 2130176), (5615, 1280),
  (2543, 2304), (841711, 295168), (982767, 49152), (7532271, 4243456), (454383, 180224), (1011439, 147456), (900847, 557568), (966383, 557568), (978671, 164352),
  (32495, 2560), (1013487, 66048), (14063, 5632), (335343, 262272), (1519, 1152), (7580143, 32896), (9967, 1664), (982895, 49152), (163695, 132096),
  (30301039, 16781312), (966511, 557568), (14191, 5632), (32357231, 16810496), (3259759, 33024), (16170351, 33024), (142703, 132352), (982895, 33024), (15724527, 64),
  (129007, 65600), (25583, 16448), (1007, 576), (997103, 524864), (210671, 66112), (31599, 8256), (12957039, 65856), (437679, 164096), (472495, 65792),
  (23983, 17536), (28079, 17536), (7570543, 2097184), (232687, 131104), (910831, 589856), (16367, 32), (159727, 131104), (104431, 65568), (945135, 131104),
  (27631, 16416), (9199, 8224), (1007, 544), (495, 288), (997103, 524832), (210671, 131616), (932591, 524832), (8943, 8736), (163183, 131104),
  (914799, 589856), (128367, 81952), (917359, 524320), (32623, 8224), (16183151, 1048608), (930671, 524832), (408943, 288), (1154415, 288), (3218799, 1048864),
  (15117679, 2097440), (142703, 131360), (103791, 65824), (113007, 33056), (6764911, 288), (7747951, 1048864), (436591, 164128), (469359, 131360), (16200047, 1048864),
  (15085935, 2097440), (16510383, 4194336), (388527, 327712), (390575, 327712), (357807, 81952), (1046447, 65568), (882607, 589856), (384431, 262432), (801455, 524960),
  (31439, 4608), (25039, 16512), (25231, 8704), (614399, 524296), (1003519, 524296), (36863, 32776), (235519, 32776), (501759, 32776), (2047, 1032)]

/-- Entries 594 to 791 of the library. -/
def nogoodsPart3 : List (ℕ × ℕ) := [
  (807935, 524296), (65279, 32776), (622335, 524296), (687871, 524296), (1007359, 524296), (57087, 49160), (13524735, 16392), (30043903, 4718600), (847615, 49160),
  (44799, 40968), (784127, 557064), (751359, 525320), (812799, 525320), (222975, 17416), (9983, 9224), (31487, 16392), (73471, 520), (36607, 33288),
  (239359, 33288), (1791, 1544), (196479, 32776), (647039, 557064), (237439, 32776), (257919, 32776), (8063, 2056), (219007, 147464), (51071, 49160),
  (16255, 1032), (106367, 1032), (1122175, 1049608), (257919, 1032), (18303, 17416), (753279, 655368), (622207, 589832), (1308287, 17416), (48767, 33288),
  (7807, 4616), (3711, 2568), (15999, 1544), (106111, 1544), (3967, 72), (553599, 524360), (29311, 8264), (65471, 32776), (237503, 32776),
  (643007, 557064), (106431, 1032), (3250047, 2097192), (104319, 65576), (809855, 524328), (4365183, 32808), (937599, 524328), (555647, 524328), (946815, 524328),
  (29311, 16424), (639, 552), (1286079, 40), (1285055, 1048616), (105407, 32808), (936895, 524328), (7536319, 2097192), (913087, 16424), (257727, 8232),
  (31423, 16424), (815807, 16424), (29375, 8232), (102079, 552), (12991, 552), (17215, 16424), (750303, 589832), (156383, 147464), (607, 584),
  (138351, 132104), (408815, 262152), (15599, 8200), (7806191, 1048584), (138479, 131080), (4463855, 4456456), (3311, 2056), (111855, 40968), (2569455, 2105352),
  (12924143, 73736), (12661999, 8462344), (12915951, 4456456), (7407, 1032), (101615, 1032), (3181807, 2098184), (1117423, 1049608), (12979439, 8389640), (12979439, 4195336),
  (4590831, 263176), (134383, 132104), (15021295, 8389640), (6632687, 4195336), (2438383, 263176), (8795375, 8389640), (406767, 263176), (13551, 9224), (7509231, 2098184),
  (136431, 132104), (3387631, 2105352), (12729839, 8388616), (2268655, 32776), (404975, 131080), (101871, 32776), (6467055, 1032), (6434287, 2098184), (13807, 1032),
  (2168303, 1032), (17903, 17416), (7748079, 1048584), (436719, 163848), (469487, 131080), (8595951, 8454152), (14911983, 8421384), (2543, 2056), (16228847, 8388616),
  (10953199, 10485768), (81647, 65544), (30447, 17416), (939759, 17416), (812783, 17416), (949615, 16392), (12991855, 8388616), (408943, 262152), (408943, 4104),
  (408943, 2056), (16069999, 1310728), (15021423, 2359304), (8666479, 8389640), (3321199, 2098184), (12957039, 8389640), (374127, 263176), (111983, 66568), (406895, 263176),
  (406895, 132104), (440687, 163848), (473455, 131080), (12921199, 4456456), (440687, 34824), (556911, 524296), (16239, 4104), (5999, 5128), (23407, 18440),
  (29551, 16392), (239, 72), (277871, 72), (309615, 32840), (12728687, 8388680), (6500719, 4194376), (437679, 294920), (400815, 263176), (15940911, 9437192),
  (15471, 8232), (466031, 262184), (134255, 131112), (373871, 327720), (473199, 262184), (407663, 8232), (15145071, 8388648), (7542895, 1048616), (7673967, 1310760),
  (14125167, 9437224), (6522991, 4194344), (231535, 32808), (15108207, 8421416), (67695, 65576), (3311, 40), (468207, 262184), (6522095, 4194344), (99567, 65576),
  (6489327, 131112), (469231, 262184), (4532463, 4194344), (1149167, 1048616), (35055, 32808), (15081711, 262184), (8431, 8232), (495, 40), (751, 552),
  (19823, 16424), (14923119, 8388648), (1160559, 1048616), (111983, 65576), (3323247, 1048616), (1161583, 1048616), (12794223, 8388648), (6633839, 4194344), (4340079, 4194344),
  (1284463, 1048616), (1481071, 1310760), (104815, 32808), (465263, 262184), (137583, 131112), (3385711, 1048616), (8759663, 8421416), (14854511, 8421416), (6465903, 4227112)]

/-- Entries 792 to 989 of the library. -/
def nogoodsPart4 : List (ℕ × ℕ) := [
  (305519, 294952), (7549295, 4194344), (4600175, 4194344), (405871, 131112), (8663407, 8388648), (4463, 4136), (12984687, 262184), (17462127, 16777256), (916655, 524328),
  (15121583, 2097192), (6634671, 262184), (1088687, 1048616), (7543983, 1048616), (13053103, 262184), (15183023, 8232), (6524079, 4194344), (1150127, 1048616), (2198703, 2097192),
  (15013039, 2359336), (522415, 32808), (14511, 8232), (8624303, 8421416), (202927, 2088), (10415, 10280), (114095, 40), (2276783, 2097192), (10984879, 8388648),
  (6659503, 262184), (14785967, 8388648), (3218863, 1048616), (2170287, 2097192), (12983727, 8388648), (400815, 262184), (14921135, 8388648), (4402607, 4194344), (4599215, 4194344),
  (3575215, 1048616), (1160623, 1048616), (79279, 65576), (113071, 32808), (4536751, 4194344), (12728751, 8388648), (15145391, 8388648), (371119, 294952), (174511, 163880),
  (2566575, 2097192), (207279, 131112), (403887, 262184), (15108527, 8421416), (68015, 65576), (209327, 65576), (653999, 557096), (4603183, 4194344), (146735, 131112),
  (8666415, 8388648), (15149359, 8388648), (25391, 16424), (1554895, 1048584), (3389903, 1048584), (15149519, 8388616), (14891343, 8390664), (1012303, 589832), (8890703, 8388680),
  (24567, 16512), (24503, 17536), (949751, 16400), (11767, 10256), (16375, 1040), (542711, 525328), (491255, 8208), (1527, 1168), (290807, 144),
  (28343, 9360), (887, 304), (1010919, 526336), (31975, 17408), (900327, 525312), (933095, 525312), (400615, 263168), (158951, 148480), (28243175, 18875392),
  (2168039, 5120), (243943, 40960), (16095463, 2359296), (368103, 263168), (488935, 66560), (469479, 10240), (942055, 525312), (8384487, 1024), (13529063, 4195328),
  (8167, 1536), (470503, 65792), (3559, 2304), (3559, 1280), (12007, 10752), (12007, 9728), (2168039, 1152), (25831, 17536), (9447, 9344),
  (432359, 295040), (1416551, 263424), (881895, 589888), (30951, 16448), (5474535, 5242944), (3385831, 32832), (12982631, 262464), (945575, 524544), (13479, 9344),
  (12487783, 9437216), (900327, 524320), (376039, 262176), (933095, 524320), (111847, 65568), (472295, 131104), (981223, 557088), (997607, 524320), (407783, 262176),
  (14567, 8224), (13867239, 9437216), (14915815, 8388640), (14850279, 8421408), (32467175, 16777248), (16230631, 4194336), (1028327, 557088), (16101607, 4227104), (384487, 262176),
  (433639, 262176), (1168871, 1064992), (367079, 294944), (1015143, 524320), (949607, 262176), (474471, 262176), (1043815, 131104), (79207, 73760), (139111, 131616),
  (14859623, 8388896), (12983655, 8388896), (400743, 262432), (138599, 131360), (940903, 262432), (79271, 69664), (913319, 589856), (2170023, 2097312), (912551, 16544),
  (470183, 131232), (234663, 65696), (3582375, 164000), (14100935, 9437312), (1791, 1540), (18303, 17412), (1919, 1540), (15999, 1540), (102015, 1540),
  (112255, 1540), (16063, 1540), (7999, 1540), (913087, 548), (15039, 548), (392767, 548), (2168303, 1028), (14319, 1028), (284655, 263172),
  (6498287, 1028), (542703, 525316), (407919, 8196), (5999, 5124), (523119, 32772), (6511, 260), (13935, 5636), (9839, 9732), (105903, 1028),
  (1121711, 1049604), (464239, 262180), (938863, 524324), (623, 548), (3575215, 1048612), (104879, 32804), (1120687, 1048612), (399791, 262180), (23471, 16420),
  (502447, 33316), (23855, 20516), (14639, 8228), (367055, 294916), (399823, 262148), (6135, 1044), (18423, 1044), (994295, 524308), (6007, 5140),
  (10103, 9236), (541559, 524340), (15287, 52), (4429927, 4227076), (15829095, 9437188), (440423, 34820), (4331623, 4196356), (1149031, 1050628), (17593575, 16778244)]

/-- Entries 990 to 1187 of the library. -/
def nogoodsPart5 : List (ℕ × ℕ) := [
  (816359, 525316), (2569447, 1028), (10826983, 8389636), (2168039, 2098180), (4330727, 4195332), (812263, 17412), (9447, 9220), (407783, 262148), (7510247, 4194308),
  (5413095, 5242884), (1280231, 1179652), (78055, 73732), (7508199, 4227076), (135399, 131076), (30183, 17412), (945127, 524292), (2023, 1540), (5991, 5636),
  (5478567, 5242884), (23463, 18436), (11175, 10244), (3578919, 1048612), (2169895, 4132), (6523943, 4194340), (2329639, 2097188), (1149991, 1048612), (1215527, 1179684),
  (68647, 65572), (70695, 69668), (6521895, 65572), (1146919, 1114148), (1012839, 524324), (2167911, 4132), (1082471, 1048612), (2294887, 131108), (66663, 65572),
  (2151, 36), (7438439, 4227108), (3178599, 2129956), (8764583, 8388644), (2170023, 2097188), (2198695, 2097188), (2296999, 131108), (1152167, 1048612), (882855, 524324),
  (276647, 262180), (3381415, 1048612), (4331687, 4194340), (135335, 131108), (1010087, 524324), (8615, 8228), (7079, 548), (271271, 548), (423, 292),
  (1010343, 524324), (200775, 69636), (71, 68), (4987, 4640), (225275, 48), (489467, 48), (553723, 524336), (4987, 4144), (27627, 544),
  (208891, 40), (4592107, 262216), (29419, 8264), (811755, 16456), (276843, 262216), (204267, 40), (104939, 32808), (240107, 32808), (3377643, 1048616),
  (4587, 4136), (814827, 16424), (14707, 8272), (499, 304), (274915, 262272), (4323, 4160), (10927203, 10485792), (12991587, 262176), (15866979, 9437216),
  (112739, 40992), (6525027, 4227104), (3248227, 36896), (69731, 69664), (408803, 262176), (6397155, 4194336), (2170083, 2097184), (138467, 131104), (13085923, 8388640),
  (4699363, 8224), (1250531, 1114144), (80099, 65568), (407779, 131104), (407779, 8224), (6461667, 4227104), (6461667, 163872), (504035, 294944), (807139, 278560),
  (14913763, 8421408), (2199779, 36896), (4451, 4384), (1150115, 1048736), (2198691, 2097312), (1117347, 1114272), (271039, 50), (319, 50), (25007, 16418),
  (311, 306), (939, 546), (571, 554), (6571, 42), (541099, 524330), (6579, 50), (99, 34), (946339, 524322), (29831331, 16777250),
  (405667, 262178), (4259, 4130), (8355, 8226), (274851, 262178), (23459, 16418), (271267, 546), (419, 290), (404131, 262690), (146559, 8209),
  (199807, 131089), (33919, 32785), (2175, 2065), (17706239, 16777233), (929023, 524305), (1152255, 1048593), (2168063, 2097169), (70911, 65553), (17185023, 16777233),
  (104703, 32785), (2586367, 17), (485119, 65553), (419583, 131089), (125695, 32785), (17326847, 16777233), (17677695, 16777233), (474495, 17), (540031, 524305),
  (482687, 16401), (929151, 524305), (2192767, 16401), (1160575, 1048593), (603519, 589841), (202111, 65553), (2168191, 4113), (3381631, 1048593), (235903, 32785),
  (4331903, 4194321), (137599, 131089), (6527, 4113), (67967, 65553), (483199, 17), (4648831, 17), (4681599, 17), (7722879, 1048593), (136063, 131089),
  (491135, 17), (522879, 32785), (7584383, 1048593), (422527, 4113), (1088703, 1048593), (2137279, 2101265), (72895, 4113), (2198719, 2097169), (36031, 32785),
  (234687, 32785), (6335, 2065), (212415, 17), (220607, 16401), (400831, 262161), (208319, 131089), (1150399, 1048593), (1283519, 1048593), (235967, 32785),
  (2495, 2065), (1291967, 1048593), (15039, 4113), (44351, 32785), (501055, 32785), (40159, 32785), (7391, 1041), (3250399, 1048593), (67807, 65553),
  (2271, 2065), (946399, 524305), (135391, 131089), (4319, 4113), (36319, 32785), (1503, 1041), (14815, 17), (13048287, 17), (793055, 524305)]

/-- Entries 1188 to 1385 of the library. -/
def nogoodsPart6 : List (ℕ × ℕ) := [
  (1162591, 1048593), (236895, 32785), (171359, 163857), (109919, 32785), (15711, 1041), (204127, 1041), (77151, 1041), (145759, 131089), (203103, 4113),
  (895327, 557073), (76127, 65553), (10591, 8209), (159, 145), (932335, 524289), (29768175, 16777217), (946671, 524289), (30171119, 16777217), (7335919, 1),
  (17723375, 16777217), (159727, 131073), (997359, 524289), (7715823, 1048577), (113647, 32769), (908271, 557057), (973807, 557057), (16509935, 1048577), (10218479, 1179649),
  (13295, 513), (882415, 589825), (95983, 81921), (802543, 524801), (30290671, 16777729), (930543, 524801), (357743, 327681), (226671, 147457), (226671, 81921),
  (391535, 294913), (17727343, 16777217), (751471, 589825), (63343, 36865), (916335, 557057), (671599, 524801), (17579887, 16777729), (802671, 524801), (104303, 33281),
  (2927, 2561), (4600687, 4194817), (416111, 262401), (17588079, 16777473), (544623, 524545), (59247, 33025), (938863, 524545), (390575, 294913), (192431, 163841),
  (548783, 526337), (64431, 34817), (73647, 66049), (2199471, 2097665), (36783, 33281), (2991, 2561), (175791, 164353), (9206447, 8389121), (908751, 557057),
  (122319, 49153), (454095, 294913), (24015, 17409), (17722831, 16778241), (996815, 525313), (30370255, 16777217), (3665871, 1048577), (454607, 163841), (552911, 525313),
  (28623, 17409), (818127, 524289), (682959, 655361), (1150927, 1049089), (4047, 1537), (68559, 66049), (17584591, 16777473), (16847, 16641), (114383, 33281),
  (966351, 557569), (16079, 1537), (13459151, 1537), (6863, 2561), (13007, 4609), (556879, 525313), (686927, 655361), (553807, 528385), (16207, 1537),
  (146255, 131585), (17331023, 16777729), (29766479, 16777729), (406351, 131585), (13135, 4609), (17718095, 16777473), (1003919, 589825), (291471, 262657), (17295, 16513),
  (34863, 34825), (33903, 32777), (14882927, 8388617), (1149039, 1048585), (34927, 32777), (2168047, 2097161), (6489327, 4194313), (6489327, 131081), (2169071, 9),
  (8663279, 8388617), (2199791, 32777), (69871, 65545), (8524015, 8388617), (24815, 16393), (270575, 262153), (8431, 8201), (422639, 9), (418543, 131081),
  (4658543, 262153), (14882159, 8388617), (6493551, 2097161), (4396399, 4194313), (202095, 131081), (202095, 65545), (7510383, 1048585), (465263, 262153), (8591727, 8388617),
  (4338031, 4194313), (4463, 4105), (616047, 589833), (422511, 4105), (7543983, 1048585), (68783, 65545), (33967, 32777), (15022255, 8388617), (3250351, 1048585),
  (2332847, 32777), (71855, 65545), (6319, 2057), (10415, 10249), (81199, 65545), (103727, 32777), (1150031, 1048585), (35919, 32777), (3151, 1033),
  (7542863, 1048585), (2168911, 2097161), (6522959, 4194313), (3246159, 1048585), (2197583, 32777), (198735, 131081), (67663, 65545), (2127, 2057), (2202831, 9),
  (1219791, 1048585), (1092815, 1056777), (3249359, 1048585), (2200783, 32777), (6493391, 1033), (6362319, 4195337), (5413071, 1048585), (944335, 524297), (2164943, 2097161),
  (26104015, 16777225), (921807, 524297), (6811343, 9), (549711, 524297), (553551, 528393), (815247, 524297), (28815, 16393), (26161295, 16777225), (25956751, 16777225),
  (790927, 524297), (16783, 16393), (12943, 521), (553743, 524297), (97271, 17), (1162231, 1048593), (285687, 262161), (236535, 32785), (14711, 273),
  (69047, 65809), (114135, 32785), (80343, 65553), (65495, 32785), (8151, 1041), (932823, 524305), (7127, 4113), (11223, 8209), (287639, 262161),
  (12695, 273), (408807, 262145), (6632679, 2359297), (915687, 557057), (391399, 294913), (26179815, 16777217), (440551, 294913), (14989543, 8421377), (473319, 262145)]

/-- Entries 1386 to 1583 of the library. -/
def nogoodsPart7 : List (ℕ × ℕ) := [
  (47335, 40961), (13867239, 9437185), (14915815, 8388609), (6658279, 294913), (14850279, 8421377), (11999463, 9437185), (5744871, 5242881), (15116519, 8421377), (933351, 524289),
  (277991, 262145), (470503, 262145), (208359, 131073), (2502119, 2359297), (95719, 81921), (472551, 262145), (899559, 557057), (309735, 294913), (14891495, 8388609),
  (2308583, 2097153), (408039, 262145), (137703, 131073), (8383463, 1048577), (71655, 66049), (2535, 257), (342375, 327681), (547687, 526337), (23399, 18433),
  (27495, 18433), (866151, 590337), (6658407, 295169), (6723943, 295169), (14850407, 8421633), (14096743, 9437441), (6494567, 4194561), (72039, 65793), (2407, 2305),
  (818343, 526337), (488615, 81921), (14915751, 8421377), (404903, 264193), (4337063, 4196353), (142759, 133121), (7780775, 1050625), (12983719, 8388865), (4332967, 4194561),
  (333223, 327937), (464039, 262273), (8853671, 8388737), (9312423, 8388737), (916679, 557057), (130247, 49153), (441543, 294913), (48327, 40961), (367815, 294913),
  (6724807, 294913), (335047, 327681), (453831, 180225), (801991, 525313), (8658119, 8389633), (269511, 263169), (79047, 66561), (866503, 589825), (342215, 327681),
  (8657095, 8392705), (268487, 266241), (7547079, 1056769), (207047, 10241), (17592519, 16781313), (208327, 132097), (7812551, 1049601), (4666823, 4195329), (3389895, 1048577),
  (2570695, 2097153), (4667847, 4194305), (211399, 131073), (14887367, 8396801), (6599, 2049), (27079, 18433), (272839, 264193), (10695, 10241), (4590023, 4196353),
  (133575, 133121), (29850567, 16777217), (15303, 8193), (158663, 147457), (8135, 1537), (6467015, 2097409), (36295, 33025), (3527, 1281), (8788423, 8388865),
  (268743, 262401), (4336071, 4194561), (18887, 16641), (6359495, 4194561), (68039, 65793), (201159, 65793), (15047, 2561), (9204423, 8389121), (24775, 16513),
  (270535, 262273), (532679, 524417), (8391, 8321), (146759, 132097), (15175, 2561), (113991, 33025), (6724935, 295169), (171335, 164097), (2209095, 2098433),
  (80199, 65793), (12032327, 9437441), (6756679, 2097409), (203079, 65793), (6471, 2305), (4598087, 4196609), (8655175, 8392961), (28807, 16513), (274567, 262273),
  (7741831, 1179777), (270727, 262273), (7, 5), (137723, 131089), (422395, 16401), (422395, 4113), (48123, 32785), (136187, 131089), (7035, 2065),
  (4987, 4113), (14715, 273), (171227, 163857), (376283, 32785), (388571, 49169), (269787, 263185), (28123, 17425), (14811, 8209), (14811, 4113),
  (36059, 32913), (475, 145), (347, 337), (47339, 40969), (367083, 294921), (432619, 294921), (137707, 131081), (813547, 524297), (68075, 65545),
  (4587, 4105), (7019, 4105), (7019, 2057), (818379, 525321), (400587, 263177), (433611, 294921), (204235, 1033), (269771, 263177), (203211, 131081),
  (6603, 2057), (27083, 18441), (5067, 4105), (2200779, 32905), (6347, 137), (270475, 262281), (467, 81), (421987, 147457), (6371, 4097),
  (2275, 2049), (26163683, 16777217), (24803, 16513), (4451, 4353), (2211, 2177), (15637699, 8389633), (2499, 2305), (2329795, 131201), (3267, 1153),
  (2331843, 1153), (2196675, 2098305), (274627, 262273), (211395, 129), (270531, 262209), (8387, 8257), (13187, 4609), (143747, 131329), (4483, 4353),
  (2202755, 32897), (72835, 65665), (2296963, 132225), (3, 3), (69, 69), (143425, 139265), (72129, 65793), (6593, 2305), (350190, 327808),
  (208814, 132608), (422382, 16416), (7173358, 2098184), (422638, 40), (414446, 16424), (6527462, 33024), (145766, 131360), (203110, 131360), (203110, 65824)]

/-- The library of 1584 cell patterns `(a, b)` (forbidden local occupancy patterns, up to the symmetries of
the square and translations by whole cells). -/
def nogoods : List (ℕ × ℕ) :=
  nogoodsPart0 ++ nogoodsPart1 ++ nogoodsPart2 ++ nogoodsPart3 ++ nogoodsPart4 ++ nogoodsPart5 ++ nogoodsPart6 ++ nogoodsPart7

end Twentyfive
end CirclePackingConstants
Source
Original computer-generated decomposition of CirclePackingConstants.twentyfive_missing_cell_halfbox_bound (the occupancy step, §1 of G. Wengerodt, Die dichteste Packung von 25 Kreisen in einem Quadrat, Ann. Univ. Sci. Budapest. Eötvös Sect. Math. 30 (1987) 3–15, https://annalesm.elte.hu/annales30-1987/Annales_1987_T-XXX.pdf). Method after K. J. Nurmela, P. R. J. Östergård, More optimal packings of equal circles in a square, Discrete Comput. Geom. 22 (1999) 439–457, https://doi.org/10.1007/PL00009472, §2.2–2.4 (tile combinations and region elimination), carried out here with exact integer arithmetic. The statement is not quoted from either paper.

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 paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me