#!/usr/bin/env python3 """Exact arithmetic supporting two modest research-audit refinements. Python standard library only. These checks are not a proof of Erdős #1052, a qualifying material, a novelty determination, or experimental validation. """ from fractions import Fraction as Q from itertools import product import json # Restricted five-extra-prime branch only. The supplied argument establishes # n <= 5738^(2^2869 - 1), with 2^a <= n. Since 5738^2 < 2^25: # a < (25/2)(2^2869 - 1) < 25*2^2868 < 32*2^2868 = 2^2873. # This checks the elementary numerical step, NOT all inherited hypotheses. assert 5738**2 == 32924644 < 33554432 == 2**25 assert 25 < 32 # A, NaAlO2, MgAl2O4, Al2O3, MgO, Al, O2. # E in eV per stated formula unit (Al per atom; O2 per molecule). coeff = [Q(-49, 195), Q(49, 39), Q(2, 5), Q(27, 10), Q(4, 39), Q(1, 3), Q(1, 4)] phases = [ dict(Na=5, Mg=2, Al=31, O=51), dict(Na=1, Al=1, O=2), dict(Mg=1, Al=2, O=4), dict(Al=2, O=3), dict(Mg=1, O=1), dict(Al=1), dict(O=2), ] atoms = [sum(phase.values()) for phase in phases] assert atoms == [89, 4, 7, 5, 2, 1, 2] for element in ("Na", "Mg", "Al", "O"): assert sum(c * phase.get(element, 0) for c, phase in zip(coeff, phases)) == 0 assert sum(map(abs, coeff)) == Q(4129, 780) per_atom_factor = sum(abs(c) * n for c, n in zip(coeff, atoms)) assert per_atom_factor == Q(8722, 195) # Triangle inequality is the general proof. A linear function attains its # extrema on a box at corners; enumerate all 128 corners of one exact box. delta = [Q(n, 1000) for n in atoms] # hypothetical 1 meV/atom, not measured epsilon = sum(abs(c) * d for c, d in zip(coeff, delta)) corners = [sum(c * d * s for c, d, s in zip(coeff, delta, signs)) for signs in product((-1, 1), repeat=7)] assert max(corners) == epsilon and min(corners) == -epsilon # Robust rejection is strict: Bhat + epsilon < 4 V. # Equality or a larger upper bound is inconclusive, never qualification. assert Q(3) + epsilon < 4 assert not Q(4) + epsilon < 4 print(json.dumps({ "status": "PASS", "scope": "Exact numerical refinements under the linked proof assumptions", "restricted_exponent_bound": "a < 25 * 2^2868", "squared_component_constant": 5738**2, "squared_upper_constant": 2**25, "common_per_formula_error_factor": str(sum(map(abs, coeff))), "common_per_atom_error_factor": str(per_atom_factor), "hypothetical_error_box_corners_checked": len(corners), "hypothetical_1_meV_per_atom_voltage_error": str(epsilon), "measured_energy_errors": False, "novelty_established": False, "open_problem_solved": False, }, indent=2))