{ "title": "Ancillary files for Improved bounds on H_m for 2 <= m <= 5", "packaging_notes": [ "Adapted for Hexagon accepted ancillary extensions. Mathematical manuscript and compiled figure are unchanged.", "NPZ arrays were converted to JSON preserving dtypes, shapes and every numerical bit; reproduce.py and the figure script now use trial_io.py.", "The one-integer-per-line tuple files are unchanged in content and renamed to .csv (single-column CSV without header). check_tuple.py reads them directly.", "The figure generator is now anc/fig/make_fig_h.py; its inputs and output paths have been updated.", "C source files cannot be uploaded under the stated Hexagon rules and are omitted. They remain in the original hm_bounds_source_and_ancillary.zip supplied by Avi Eisenberg. Instructions below referring to these files require that original bundle.", "In particular, this ZIP alone does not reproduce the C-based construction of the m=4 tuple or the FLINT interception check. Included logs report the original runs; no certificate computations have been rerun for this packaging change." ], "omitted_c_files": [ { "path": "anc/tuples/verify.c", "sha256": "76bfa4a22f16f75ca5e3a16367804d81bbbcebd87a2749e81716c529fed137a2" }, { "path": "anc/tuples/adm_wit.c", "sha256": "50475435b5079b6660a370c3b9f5cda43dbfb821896b932a5428fba9f92e890a" }, { "path": "anc/tuples/greedy.c", "sha256": "07c1b914131919e0452a4b2098cfc15d0cc457ef849f29ad40097f45bd7e0c39" }, { "path": "anc/certify/flint_polymul_shim.c", "sha256": "e92e06359ed05db2d6a18d72ad9b4a9fd7e19c4a3b60f858b1e563582c849771" } ], "instructions": "# Ancillary files for \"Improved bounds on H_m for 2 <= m <= 5\"\n\n## Names used in the code\n\n| paper | code |\n|---|---|\n| gamma (c = gamma/log k) | `theta` |\n| beta (T = beta/log k) | `beta` |\n| psi, psi_j | `h` |\n| lattice spacing eta (2^-18 or 2^-19) | `delta` (trial files), `DELTA` (hcert.py), `Delta` (results.json) |\n| cell endpoints s_j | `E[j] * delta` (`E` = integer edges, `E[0] = 0`, `E[-1] = 1/delta`) |\n| delta = 1e-4 of the equidistribution estimate | `DELTA` in reproduce.py, `delta` argument of rc_loss_rig*.py |\n| omega = 0.012466 | `OMEGA` / `omega` |\n| the slack 1e-4 (in kappa and added to the b's) | `eta` in rc_loss_rig*.py |\n| strip half-width 1/2 | `eta0` in fcore.py |\n| Chernoff parameter zeta | `lam` |\n| v_l, v_{l+1} | `wl`, `wn` |\n| k - 1 | `K` (rc_loss_rig*.py), `b` (as a number) |\n| E X_1 | `mu` |\n\nThe m = 2 trial file also contains a key `eps_cells` (= 0), which is not used.\n\n## certify/ (Sections 4-5 and Table 2)\n\n* `reproduce.py` re-runs the four certificates of Table 2 from the saved profiles in `trials/` and prints one\n JSON line per case: `Q_lower` (rigorous lower bound for Q(F_psi)), `rc_loss` (rigorous upper bound for the\n restriction loss of Lemma 4.2), `target` = m/(1/4 + omega) with omega = 0.012466 and delta = 1e-4, and\n `net` = Q_lower - rc_loss - target (net > 0 certifies M_k^R > m/rho). Also `max_cdf_width` (largest\n C_n^+(y) - C_n^-(y) used) and `Xi1`. Usage: `python3 reproduce.py [m ...]` (default 2 3 4 5); about 5, 10,\n 11 and 10 minutes for m = 2, 3, 4, 5 on one core.\n* `results.json`: our output of `reproduce.py` (the same lines as `../logs/reproduce.log`).\n* `trials/A_m{m}_k{k}.json`: the exact inputs of each certificate (see the table above).\n* `fcore.py`: rigorous two-sided bounds for C_n(y) = P(S_n <= y) by Fourier inversion (Lemma 5.1 and the\n three bullets after it). `phi.py`: the characteristic function in Arb. `fcert.py`: constants of the\n trial function (m2, E X, F_X, f_X, G).\n* `hcert.py`: the lower bound for Q(F_psi) (Section 5.2).\n* `rc_loss_rig2.py` / `rc_loss_rig.py`: the restriction loss, first / second inequality of Lemma 4.3, with the\n probability bounds (4.2). `rc_loss_rig2` is used for m = 2, `rc_loss_rig` for m >= 3.\n* `sincos_check.py`: compares numpy's binary64 sin and cos with Arb on 10^5 arguments. The floating-point\n summation in `fcore.bounds` assumes errors of at most four units in the last place; the largest error found\n was 0.514 (`../logs/sincos_check.log`).\n* `hopt_lat.py`, `gexp.py`: the floating-point optimiser that produced the profiles (not needed for the proof).\n* `flint_polymul_shim.c`: an LD_PRELOAD library that counts calls to FLINT's polynomial multiplication\n routines. FLINT 3.6.0 as released computes some products of integer polynomials with coefficients of mixed\n signs incorrectly in its FFT code (OpenAI's repository https://github.com/openai/PrimeGaps186 uses a corrected\n build and contains a regression test, which fails for the release). Under this shim, complete runs of\n `reproduce.py` make no calls to these routines (`../logs/flint_polymul_calls.log`), so the certificates are\n not affected.\n\nRequirements: Python 3 with numpy, scipy and python-flint (we used python-flint 0.9.0 with FLINT 3.6.0,\nnumpy 2.5.3, scipy 1.18.1, Python 3.13).\n\n## tuples/ (Section 6 and Table 3)\n\n* `admissible_2355_20370.csv`: the 2355-tuple of diameter 20,370 from the database\n https://math.mit.edu/~primegaps/ (one integer per line).\n* `admissible_111300_1380156.csv`: output of `./greedy 111300 -558707 1396768 300 out.txt`\n (the greedy sieve on the even integers of [-558707, 838061] with z = 300).\n* The 5,129,500-tuple (47 MB) is the output of `./greedy 5129500 -38025000 84500000 10000 out.txt`\n (interval [-38025000, 46475000], z = 10^4; 25-70 CPU-minutes). Its SHA-256 is\n `d5bea7eae6d6f95919b89465744059b9a37591aee048e41e9e7aba48000be542`.\n* The 234,360,000-tuple consists of the first k primes greater than k. `python3 zhang.py 234360000` (segmented\n sieve) prints pi(k) = 12868673, first = 234360017, last = 5274442853, diameter = 5040082836.\n `primepi_check.py` checks these values independently (prime counting by the Lucy_Hedgehog method and a\n deterministic Miller-Rabin test; it shares no code with `zhang.py`).\n* Admissibility checkers (check every prime p <= k): `verify.c` (counts residues for small p, probes for an\n empty class for large p) and `adm_wit.c` (finds, for every prime p <= k, a residue class mod p and checks\n directly that no element of the tuple lies in it). `check_tuple.py` is a slower numpy checker.\n\nBuild: `gcc -O2 -o greedy greedy.c -lm`, `gcc -O2 -o verify verify.c`, `gcc -O2 -o adm_wit adm_wit.c -lm`.\n\n## logs/\n\n* `reproduce.log`: output of `certify/reproduce.py` for m = 2, 3, 4, 5 with the code in `certify/`.\n* `admissibility.log`: SHA-256 of each tuple file and the output of `verify` and `adm_wit` on it (m = 2, 3, 4).\n* `zhang_m5.log`, `primepi_check_m5.log`: the two computations for m = 5.\n* `sincos_check.log`: output of `certify/sincos_check.py`.\n* `flint_polymul_calls.log`: the FLINT regression test and the call counts of `certify/flint_polymul_shim.c` during\n complete runs of `certify/reproduce.py`.\n" }