Search scripts

What Lean checks

The formalization uses the actual distance graph on the integers. Its unconditional results include the greedy upper bound, periodic-word transport, loop concatenation, integer base change, the four unbounded one-parameter coloring families, the full two-parameter family, and the exceptional chromatic numbers. Theorem A, the Oravcová–Soták clique conclusion, and the primitive triangle-free corollary retain the explicitly named propositions R5, R6, R7, and R8 as hypotheses. Those four real-loneliness classifications are not proved by this closure. All nine new modules passed strict compilation with warnings treated as errors. The exact 28-module project closure passed an all-owned audit of 1239 declarations (1084 theorem declarations and 40 required endpoints) and independent stock-kernel replay. Only propext, Classical.choice, and Quot.sound are permitted. Receipt. Combined package gate remains pending.

These scripts found the certificates in ../certificates.json. They are not needed to check the proof: ../verify.py checks every certificate with the Python standard library. Except for bruteforce_scan.py, they are the original exploration scripts, copied as they were. The only edits replace absolute paths with paths relative to this folder. All of them need python-sat (CaDiCaL 1.5.3), and they write their JSON output to the current directory.

  • dg.py, dg_run.py: for one set DD (python3 dg_run.py 1 3 4 5 9), compute L(D)L(D) and ω(D)\omega(D). Then either find a periodic proper |D||D|-colouring by SAT, or show by SAT that an interval of length 2maxD+2|D|2\max D+2|D| (or longer) has no proper |D||D|-colouring. The intervals they report are not the shortest ones. The shortest ones are 13, 17 and 19, as stated in the proof and checked by verify.py.
  • loops.py, family.py, run_family.py: loop certificates for the one-parameter families A5, A6, W2 and W3. For example, python3 run_family.py A6 7 30 50000 30 takes r=7r=7, loop lengths up to 30 and a conflict budget of 50000. It writes fam_A6.json, containing the state, the loops, the semigroup gap and the direct colourings. Different bounds give different, equally valid certificates. Rerunning the script therefore need not reproduce the exact words in certificates.json.
  • base_loops.py, base2.py, g2.py: loops for a fixed distance set BB (the base of Lemma 6), and the coverage test for the two-parameter family. g2.py expects base_1_2_3_5_7_8.json and base_1_3_4_5_6_9.json from base_loops.py or base2.py. The second base turned out to be unnecessary.
  • build_certs.py: assembles ../certificates.json from out5.txt, …, out8.txt (JSON lines written by dg_run.py, one per listed set), fam_*.json and base_1_2_3_5_7_8.json. It reads the seven- and eight-speed tables from ../../../results/*/sporadic.txt, so it runs only from inside the repository and only after those intermediate files have been regenerated. They are not kept here. It now writes the shortest intervals 13, 17 and 19. An earlier version wrote the first intervals tried by dg_run.py (26, 24 and 38).
  • bruteforce_scan.py and its output bruteforce_scan.txt: an independent check written after the proof. It uses neither R5–R8 nor the certificates. It decides χ(D)≤k\chi(D)\le k or χ(D)=k+1\chi(D)=k+1 for every primitive kk-set D⊂{1,…,Mk}D\subset\{1,\ldots,M_k\}, with (M5,M6,M7,M8)=(80,60,48,42)(M_5,M_6,M_7,M_8)=(80,60,48,42). A set counts as colourable when an explicit periodic colouring is found and checked directly, and as not colourable when SAT finds no colouring of some interval. The non-colourable sets in range are exactly those predicted by Theorem A. With --small the scan also checks the classical characterizations for three and four distances quoted in the proof, with M3=80M_3=80 and M4=50M_4=50. Run it from this folder: python3 bruteforce_scan.py --small > bruteforce_scan.txt (about six minutes on one core).