From 12cc37f27afef1ec9870a4adb99253130307f47c Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Sat, 21 Nov 2026 22:00:46 +0800 Subject: [PATCH 1/6] math(rh): introduce standalone Init-only dyadic source-window certificates --- MathCan.lean | 1 + MathCan/RHWindowExponents.lean | 99 ++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 MathCan/RHWindowExponents.lean diff --git a/MathCan.lean b/MathCan.lean index 881ddac4..398cb7be 100644 --- a/MathCan.lean +++ b/MathCan.lean @@ -147,3 +147,4 @@ import MathCan.NOR43AuthenticatedRoot import MathCan.NOR44SessionOrdering import MathCan.NOR45AuthorizedProgram import MathCan.NOR46ExactIntegerTrace +import MathCan.RHWindowExponents diff --git a/MathCan/RHWindowExponents.lean b/MathCan/RHWindowExponents.lean new file mode 100644 index 00000000..bba122da --- /dev/null +++ b/MathCan/RHWindowExponents.lean @@ -0,0 +1,99 @@ +import Init + +/-! +RHD-01: dyadic window-exponent feasibility in the Alpoge/Claude RH archive. + +Lean 4.35 plus Init, with no Mathlib. This tests exact integer log2 +scale inequalities at two dyadic examples. They are narrower claims than +the original Real-valued SizeWindows, SizesAt and PlacesAt theorems. + +Published source pin: +f150e02623b1e2bbe1f1da8eab5ffee5e930a6a3 +-/ + +namespace MathCan.RHWindowExponents + +structure DyadicLogPoint where + L : Nat + den : Nat + deltaLog : Nat + nLog : Nat + nTLog : Nat + nT2Log : Nat + mLog : Nat + kLog : Nat + deriving Repr + +/-- Cleared-denominator log2 inequalities corresponding to the +pinned source's rank, size, depth and sample-count windows. -/ +def sourceExponentChecks (w : DyadicLogPoint) : Prop := + 52 < w.den ∧ + w.deltaLog + 32 = w.L ∧ + 8 * w.den * w.L + 31 * w.L ≤ 4 * w.den * w.nLog ∧ + 4 * w.den * w.nLog ≤ 8 * w.den * w.L + 33 * w.L ∧ + w.deltaLog * (2 * w.den - 1) ≤ 4 * w.den * w.mLog ∧ + 4 * w.den * w.mLog ≤ w.deltaLog * (2 * w.den + 1) ∧ + 18 * w.den * w.L + 39 * w.L ≤ 4 * w.den * w.kLog ∧ + 4 * w.den * w.kLog ≤ 18 * w.den * w.L + 41 * w.L ∧ + 8 * w.den * w.nLog ≤ 8 * w.den * w.nTLog + w.L + 8 * w.den ∧ + 8 * w.den * w.nTLog + w.L ≤ 8 * w.den * w.nLog + 8 * w.den ∧ + w.den * w.nLog ≤ w.den * w.nT2Log + w.L ∧ + w.nTLog ≤ w.nLog ∧ + w.nT2Log ≤ w.nLog ∧ + w.den * w.L ≤ 2 * w.den * w.mLog + 2 * w.L ∧ + 2 * w.den * w.mLog ≤ w.den * w.L + w.L ∧ + w.L + w.mLog ≤ w.kLog ∧ + 2 * w.den * w.kLog + 2 * w.L ≤ + 4 * w.den * w.nLog + w.den * w.L + +def epsilon64 : DyadicLogPoint where + L := 16384 + den := 64 + deltaLog := 16352 + nLog := 34816 + nTLog := 34783 + nT2Log := 34560 + mLog := 8176 + kLog := 76288 + +def epsilon128 : DyadicLogPoint where + L := 32768 + den := 128 + deltaLog := 32736 + nLog := 67584 + nTLog := 67551 + nT2Log := 67328 + mLog := 16368 + kLog := 150016 + +theorem epsilon64_source_exponent_certificate : + sourceExponentChecks epsilon64 := by + decide + +theorem epsilon128_source_exponent_certificate : + sourceExponentChecks epsilon128 := by + decide + +/-- Logarithmic core of the necessary group-order bound from a +sampling-depth lower bound and a rank-dependent upper bound on k. -/ +theorem group_log_floor_of_depth_and_k_window + (L nLog mLog kLog : Nat) + (hLower : L + mLog ≤ kLog) + (hUpper : kLog ≤ 2 * nLog + mLog) : + L ≤ 2 * nLog := by + omega + +/-- A source-family rank lower bound implies at least quadratic rank +growth on the level of binary exponents. -/ +theorem quadratic_rank_of_source_family + (L nLog margin : Nat) + (h : 2 * L + margin ≤ nLog) : + 2 * L ≤ nLog := by + omega + +#print axioms epsilon64_source_exponent_certificate +#print axioms epsilon128_source_exponent_certificate +#print axioms group_log_floor_of_depth_and_k_window +#print axioms quadratic_rank_of_source_family + +end MathCan.RHWindowExponents From dc81af92c967cdb99304c17fcad461325a17ba39 Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Sat, 21 Nov 2026 22:01:16 +0800 Subject: [PATCH 2/6] math(rh): port exact rational window and cost feasibility experiments --- research/rh_proof_distillation/__init__.py | 1 + .../rh_joint_scalar_envelope.py | 145 +++++++++ .../rh_window_feasibility.py | 286 ++++++++++++++++++ tests/test_rh_proof_distillation.py | 62 ++++ 4 files changed, 494 insertions(+) create mode 100644 research/rh_proof_distillation/__init__.py create mode 100644 research/rh_proof_distillation/rh_joint_scalar_envelope.py create mode 100644 research/rh_proof_distillation/rh_window_feasibility.py create mode 100644 tests/test_rh_proof_distillation.py diff --git a/research/rh_proof_distillation/__init__.py b/research/rh_proof_distillation/__init__.py new file mode 100644 index 00000000..896b10bd --- /dev/null +++ b/research/rh_proof_distillation/__init__.py @@ -0,0 +1 @@ +"""MathCan RH proof-distillation mathematics and exact arithmetic source checks.""" diff --git a/research/rh_proof_distillation/rh_joint_scalar_envelope.py b/research/rh_proof_distillation/rh_joint_scalar_envelope.py new file mode 100644 index 00000000..b966414e --- /dev/null +++ b/research/rh_proof_distillation/rh_joint_scalar_envelope.py @@ -0,0 +1,145 @@ +"""Source-pinned sufficient scalar certificates for LargeX and SmallCosts. + +All checks use integer/Fraction inequalities. For exponential/logarithmic +conditions we verify explicit sufficient inequalities using standard analytic +facts log(2) <= 1, log(x+1) <= 1+log2(x) for x a power of 2, and monotonicity +of exp. These facts are explained in the report, not proved in this module. + +This is a scalar envelope, not an actual Scale/D7/FamP construction. +""" +from __future__ import annotations + +import argparse +from dataclasses import replace +from fractions import Fraction +import json +from pathlib import Path + +from research.rh_proof_distillation.rh_window_feasibility import ( + WindowParams, binary_exponent, evaluate, evaluate_scale, scale_witness, source_pin, +) + + +def enlarged_scale(level: int) -> WindowParams: + """x far beyond the large-x thresholds for epsilon=1/64 or 1/128.""" + if type(level) is not int or level not in (6, 7): + raise ValueError("level must be 6 or 7") + inv = 1 << level + eps = Fraction(1, inv) + L = 256 * inv + q = L // inv + n_exp = 2 * L + 8 * q + m_exp = (L - q // 8) // 2 + k_exp = 9 * L // 2 + 10 * q + nT_exp = n_exp - q // 8 - 1 + nT2_exp = n_exp - q + return WindowParams( + x_log2=L, epsilon=eps, + n=1 << n_exp, nT=1 << nT_exp, nT2=1 << nT2_exp, + m=1 << m_exp, k=Fraction(1 << k_exp), + ) + + +def bounds(p: WindowParams) -> dict: + """Exact arithmetic for sufficient, rather than evaluated transcendental, gates.""" + L = p.x_log2 + eps = p.epsilon + x = p.x + # The original proof uses f = 2*n in smallCosts. Here these are + # independent scalar choices; not claimed to be Scale.b/Scale.theta. + f = 2 * p.n + eta = Fraction(1) + b = Fraction(12 * f) * x * (x + 1) + theta = Fraction(1, 4 * f) / (x * (x + 1)) + revised = replace(p, b=b) + size = evaluate(revised) + scale = evaluate_scale(revised) + checks = { + "large_x_at_least_3": 3 <= x, + # Since log(8) < 3 and log(x)=L*log(2) <= L: + "sufficient_8x5_le_exp_xeps8": 3 + 5 * L <= p.power(eps / 8), + # Since log(48) < 6: + "sufficient_48x5_le_exp_xeps4": 6 + 5 * L <= p.power(eps / 4), + "large_x_power_two": 2 <= p.power(3 * eps / 4), + "large_x_power_26": 26 <= p.power(3 * eps / 8), + # With Cd=CL=0, moveCost = 3*log(x+1) and + # log(x+1) <= (L+1)*log(2) <= L+1. + "sufficient_move_cost": 3 * (L + 1) <= p.power(Fraction(1, 2) + eps), + "eta_positive": 0 < eta, + "eta_log_condition": 1 <= p.power(eps / 4), # log(1)=0 + "theta_positive": 0 < theta, + "small_cost_theta": 2 * f * (x + 1) * theta <= 1 / x, + "small_cost_b": 6 * f * (x + 1) * (eta + 1) <= b / x, + } + return { + "epsilon": str(eps), "x_log2": L, + "log2_n": binary_exponent(p.n), + "log2_k": binary_exponent(p.k.numerator), + "f_relation": "f=2n", + "parameter_choices": { + "eta": 1, "c": 1, "Cd": 0, "CL": 0, + "b_formula": "12*f*x*(x+1)", + "theta_formula": "1/(4*f*x*(x+1))", + "b_bits": b.numerator.bit_length(), + "theta_denominator_bits": theta.denominator.bit_length(), + }, + "sufficient_gate_inequalities": checks, + "all_sufficient_gates_pass": all(checks.values()), + "sizewindows_scalar_passes": size["passes"], + "sizewindows_scalar_total": size["total"], + "source_scale_passes": scale["passes"], + "source_scale_total": scale["total"], + "all_scale_and_sizewindow": size["all_pass"] and scale["all_scale_checks_pass"], + "full_scale_structure_proved": False, + "full_analytic_or_geometric_witness_proved": False, + } + + +def campaign() -> dict: + cases = [bounds(enlarged_scale(j)) for j in (6, 7)] + if not all(c["all_sufficient_gates_pass"] and c["all_scale_and_sizewindow"] for c in cases): + raise AssertionError("a sufficient scalar gate failed") + early = scale_witness(6) + precondition = 3 + 5 * early.x_log2 <= early.power(early.epsilon / 8) + if precondition: + raise AssertionError("short-scale negative control unexpectedly sufficient") + return { + "schema_version": 1, + "kind": "source_regime_exact_scalar_sufficient_conditions", + "method": "exact integers/Fractions, plus cited elementary log-exp inequalities", + "cases": cases, + "negative_control": { + "epsilon": "1/64", "x_log2": early.x_log2, + "short_scale_passes_sufficient_8x5_exp_test": precondition, + "interpretation": "failure of this sufficient test does not alone refute LargeX", + }, + "logical_bridge": [ + "log(2) <= 1", + "for x=2^L and x>=1, log(x+1) <= L+1", + "log(8*x^5) <= 3+5*L and log(48*x^5) <= 6+5*L", + "exp is strictly increasing", + ], + "scope": "Scalar gates for chosen free parameters only; actual Scale.b, Scale.theta, adm5, adm6, adm7 and geometric family data are not constructed", + } + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--source-root", type=Path, required=True) + parser.add_argument("--output", type=Path, required=True) + args = parser.parse_args() + result = campaign() + result["source_identity"] = source_pin(args.source_root.resolve()) + args.output.parent.mkdir(parents=True, exist_ok=True) + args.output.write_text(json.dumps(result, sort_keys=True, indent=2) + "\n") + print(json.dumps({ + "cases": len(result["cases"]), "all_gates_pass": all(c["all_sufficient_gates_pass"] for c in result["cases"]), + "all_sizewindows_and_scale": all(c["all_scale_and_sizewindow"] for c in result["cases"]), + "proof_term_data": False, + "source_commit": result["source_identity"]["source_commit"], + "full_geometric_witness": False, + }, sort_keys=True)) + + +if __name__ == "__main__": + main() diff --git a/research/rh_proof_distillation/rh_window_feasibility.py b/research/rh_proof_distillation/rh_window_feasibility.py new file mode 100644 index 00000000..d0f1d4d3 --- /dev/null +++ b/research/rh_proof_distillation/rh_window_feasibility.py @@ -0,0 +1,286 @@ +"""Exact dyadic feasibility of the pinned Lean SizeWindows *scalar* predicate. + +Checks 16 conjuncts with fractions. No real-valued floating-point approximations, +arithmetic character data, GPsi bound or geometric witness are manufactured. +""" +from __future__ import annotations + +import argparse +from dataclasses import dataclass, replace +from fractions import Fraction +import hashlib +import json +from pathlib import Path +import subprocess + +def git_blob_sha(raw: bytes) -> str: + """Git's exact content-blob SHA-1, matching source-manifest provenance.""" + return hashlib.sha1(b"blob " + str(len(raw)).encode() + b"\x00" + raw).hexdigest() + + +PIN = "f150e02623b1e2bbe1f1da8eab5ffee5e930a6a3" +PREDICATE_FILE = "src/Formalism/SizeWindowBrackets/GrowthBoundGivesRiemannHypothesis.lean" +PREDICATE_BLOB = "a3ece4b4aea97a95ba2977fa9e8d437e72677774" +SCALE_FILE = "src/Formalism/SharpRestriction/GlobalSchurBounds/ZetaZeroFreeRegion.lean" +SCALE_BLOB = "7746e5a5affe67117d4ba907dbcd2788f539db6e" +WINDOWS_FILE = "src/Formalism/SharpRestriction/GlobalSchurBounds/RamificationTwoAndConjugationAtQAndD.lean" +WINDOWS_BLOB = "1c1495ef81c77fa96f3c1a70106c1da9e24c0c5d" +CLAUSES = ( + "x_min", "eps_positive", "C_nonnegative", "n_positive", + "b_positive", "aE_nonnegative", "aE_cap", "nT_floor", + "nT2_floor", "nT2_cap", "m_floor", "m_cap", + "k_floor", "k_cap", "Err_cap", "eventual_x", +) + + +@dataclass(frozen=True) +class WindowParams: + x_log2: int + epsilon: Fraction + n: int + nT: int + nT2: int + m: int + k: Fraction + b: Fraction = Fraction(1) + C: Fraction = Fraction(0) + aE: Fraction = Fraction(0) + Err: Fraction = Fraction(0) + + @property + def x(self) -> Fraction: + if not 0 < self.x_log2 <= 32768: + raise ValueError("invalid x_log2") + return Fraction(1 << self.x_log2) + + def power(self, exponent: Fraction) -> Fraction: + """Exact x^a where x=2^e and e*a is an integer.""" + e = self.x_log2 * exponent + if e.denominator != 1: + raise ValueError(f"requested power has fractional binary exponent {e}") + if abs(e.numerator) > 32768: + raise ValueError("power exceeds bit-budget guard") + return Fraction(1 << e.numerator) if e.numerator >= 0 else Fraction(1, 1 << -e.numerator) + + +def dyadic_witness(level: int) -> WindowParams: + """For epsilon=2^-level, use x=2^(16/epsilon) and n=sqrt(x).""" + if type(level) is not int or not 1 <= level <= 7: + raise ValueError("dyadic epsilon level must be 1..7") + inv = 1 << level + xp, np = 16 * inv, 8 * inv + n = 1 << np + m = 1 << (np - 16) + return WindowParams(x_log2=xp, epsilon=Fraction(1, inv), n=n, + nT=n // 8, nT2=m, m=m, k=Fraction((1 << xp) * m)) + + +def evaluate(p: WindowParams) -> dict: + if p.epsilon <= 0 or p.n <= 0 or p.nT < 0 or p.nT2 < 0 or p.m < 0 or p.k == 0: + raise ValueError("invalid input scalars") + x, eps = p.x, p.epsilon + n, nt, nt2, m = (Fraction(k) for k in (p.n, p.nT, p.nT2, p.m)) + b, k, C, aE, Err = p.b, p.k, p.C, p.aE, p.Err + bracket = nt * aE * (1 + m ** 2 / k) + m * ( + (2 * n) * m * b * p.power(eps) + + nt2 * k * b * p.power(eps) / (n * (n * p.power(-eps)))) + values = { + "x_min": 3 <= x, + "eps_positive": 0 < eps, + "C_nonnegative": 0 <= C, + "n_positive": 0 < n, + "b_positive": 0 < b, + "aE_nonnegative": 0 <= aE, + "aE_cap": aE <= 2 * x * b, + "nT_floor": p.power(-eps / 8) * n / 2 <= nt, + "nT2_floor": p.power(-eps) <= nt2 / n, + "nT2_cap": nt2 <= n, + "m_floor": p.power(Fraction(1, 2) - eps) <= m, + "m_cap": m <= p.power(Fraction(1, 2) + eps / 2), + "k_floor": x * m <= k, + "k_cap": k <= n ** 2 * p.power(Fraction(1, 2) - eps), + "Err_cap": Err <= p.power(C * eps) * bracket, + "eventual_x": 26 <= p.power(3 * eps / 8), + } + assert tuple(values) == CLAUSES + return {"exact_arithmetic": True, "predicate": "SizeWindows", + "scope": "scalar conjuncts only", + "x_log2": p.x_log2, "epsilon": str(eps), + "n_bits": p.n.bit_length(), "nT_bits": p.nT.bit_length(), + "nT2_bits": p.nT2.bit_length(), "m_bits": p.m.bit_length(), + "k_bits": p.k.numerator.bit_length(), "checks": values, + "total": len(values), "passes": sum(values.values()), "all_pass": all(values.values())} + + +def source_pin(root: Path) -> dict: + head = subprocess.check_output(["git", "-C", str(root), "rev-parse", "HEAD"], text=True).strip() + if head != PIN: + raise ValueError(f"source pin mismatch: {head}") + raw = (root / PREDICATE_FILE).read_bytes() + if git_blob_sha(raw) != PREDICATE_BLOB: + raise ValueError("pinned SizeWindows source blob has changed") + body = raw.decode("utf-8") + i = body.index("def SizeWindows ") + j = body.index("\ndef GrowthSizeBound ", i) + statement = body[i:j] + for phrase in ("26 ≤ x ^ (3 * ε / 8)", "x * m ≤ k", + "nT2 ≤ n", "Err ≤ x ^ (C * ε)", "x ^ (-(ε / 8)) * n / 2 ≤ nT"): + if phrase not in statement: + raise ValueError(f"pinned predicate wording no longer matches: {phrase}") + scales = (root / SCALE_FILE).read_bytes() + if git_blob_sha(scales) != SCALE_BLOB: + raise ValueError("pinned SizesAt/PlacesAt source blob differs") + scale_text = scales.decode("utf-8") + for phrase in ("def SizesAt ", "def PlacesAt ", "2 + 8 * s.eps - δ", + "s.delta1 * D.R.n / 2", "s.x ^ (-s.eps)"): + if phrase not in scale_text: + raise ValueError("pinned family scale changed: " + phrase) + windows = (root / WINDOWS_FILE).read_bytes() + if git_blob_sha(windows) != WINDOWS_BLOB: + raise ValueError("pinned family windows source blob differs") + if "s.x * s.delta1 = s.x ^ (1 - s.eps / 8)" not in windows.decode("utf-8"): + raise ValueError("pinned delta1 scale identity missing") + return {"source_commit": PIN, "source_file": PREDICATE_FILE, + "family_scale_file": SCALE_FILE, "family_scale_blob": SCALE_BLOB, + "windows_file": WINDOWS_FILE, "windows_blob": WINDOWS_BLOB, + "git_blob": PREDICATE_BLOB, + "predicate_sha256": hashlib.sha256(statement.encode()).hexdigest(), + "original_unlicensed_source_redistributed": False} + + + + +def scale_witness(level: int) -> WindowParams: + """Central, exact dyadic SizesAt/PlacesAt scales in epsilon < 1/52.""" + if type(level) is not int or level not in (6, 7): + raise ValueError("source-regime epsilon level must be 6 or 7") + inv = 1 << level + xp = 16 * inv + ne = 2 * xp + 128 + me = xp // 2 - 1 + ke = 9 * xp // 2 + 160 + return WindowParams( + x_log2=xp, epsilon=Fraction(1, inv), n=1 << ne, + nT=1 << (ne - 3), nT2=1 << (ne - 16), + m=1 << me, k=Fraction(1 << ke), + ) + + +def binary_exponent(value: int) -> int: + if type(value) is not int or value <= 0 or value & (value - 1): + raise ValueError("positive integer power of two required") + return value.bit_length() - 1 + + +def evaluate_scale(p: WindowParams) -> dict: + """Check six SizesAt, three PlacesAt and caps by rational log2 exponents. + + Assumes the original windows theorem identity x * delta1 = x^(1-eps/8). + """ + xl, eps = Fraction(p.x_log2), p.epsilon + delta = eps / 4 + nlog, ntlog, nt2log, mlog = ( + Fraction(binary_exponent(value)) + for value in (p.n, p.nT, p.nT2, p.m) + ) + if p.k.denominator != 1: + raise ValueError("integer k required for exact power-of-two certificate") + klog = Fraction(binary_exponent(p.k.numerator)) + xdelta = xl * (1 - eps / 8) + checks = { + "epsilon_below_1_52": 0 < eps < Fraction(1, 52), + "SizesAt_n_lower": xl * (2 + 8 * eps - delta) <= nlog, + "SizesAt_n_upper": nlog <= xl * (2 + 8 * eps + delta), + "SizesAt_m_lower": xdelta * (Fraction(1, 2) - delta) <= mlog, + "SizesAt_m_upper": mlog <= xdelta * (Fraction(1, 2) + delta), + "SizesAt_k_lower": xl * (Fraction(9, 2) + 10 * eps - delta) <= klog, + "SizesAt_k_upper": klog <= xl * (Fraction(9, 2) + 10 * eps + delta), + "PlacesAt_TT_lower": nlog - xl * eps / 8 - 1 <= ntlog, + "PlacesAt_TT_upper": ntlog <= nlog - xl * eps / 8 + 1, + "PlacesAt_T2_lower": -xl * eps <= nt2log - nlog, + "finite_TT_cap": ntlog <= nlog, + "finite_T2_cap": nt2log <= nlog, + } + scalar = evaluate(p) + return { + "epsilon": str(eps), + "x_log2": p.x_log2, + "delta": str(delta), + "power_of_two_logs": { + "n": int(nlog), "nT": int(ntlog), "nT2": int(nt2log), + "m": int(mlog), "k": int(klog), + }, + "source_predicates": ["SizesAt", "PlacesAt", "SizeWindows"], + "checks": checks, + "passes": sum(checks.values()), + "total": len(checks), + "all_scale_checks_pass": all(checks.values()), + "sizewindows_passes": scalar["passes"], + "sizewindows_total": scalar["total"], + "sizewindows_pass": scalar["all_pass"], + "full_geometric_witness": False, + } + + +def campaign(levels=range(1, 6)) -> dict: + examples = [] + for level in levels: + witness = dyadic_witness(level) + result = evaluate(witness) + if not result["all_pass"]: + raise AssertionError(f"exact candidate failed at epsilon level {level}") + examples.append({"level": level, **result}) + if not examples: + raise ValueError("at least one level is required") + valid = dyadic_witness(1) + near = evaluate(replace(valid, n=valid.n - 1)) + if near["all_pass"] or near["checks"]["k_cap"]: + raise AssertionError("n-1 negative control did not fail k bound") + smaller = WindowParams(x_log2=16, epsilon=Fraction(1, 2), n=256, nT=64, + nT2=1, m=1, k=Fraction(65536)) + early = evaluate(smaller) + if early["all_pass"] or early["checks"]["eventual_x"]: + raise AssertionError("small x negative control did not fail eventual threshold") + source_cases = [evaluate_scale(scale_witness(j)) for j in (6, 7)] + if not all(c["all_scale_checks_pass"] and c["sizewindows_pass"] for c in source_cases): + raise AssertionError("source-regime scale witness failed an exact inequality") + weak = evaluate_scale(dyadic_witness(6)) + if weak["checks"]["SizesAt_n_lower"]: + raise AssertionError("weak scalar witness meets strong family rank bound") + return { + "source_regime_examples": source_cases, + "weak_sizewindows_witness_fails_strong_SizesAt_n_lower": True, + "schema_version": 1, + "method": "Fraction arithmetic on dyadic integer powers, no floats", + "predicate": "Formalism.LFunctionChainParameters.ThickSetMeanBounds.SizeWindows", + "clauses": list(CLAUSES), + "positive_examples": examples, + "negative_controls": [{"mutation": "n=n-1", **near}, + {"mutation": "x=2^16, epsilon=1/2", **early}], + "mathematical_scope": "Scalar SizeWindows satisfiability only. No HostFacts, GPsi, ThinScales, SmallCosts, ChainTied, or geometric construction provided.", + } + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--source-root", type=Path, required=True) + parser.add_argument("--output", type=Path, required=True) + parser.add_argument("--levels", type=int, default=5) + args = parser.parse_args() + if not 1 <= args.levels <= 7: + parser.error("--levels must be 1..7") + result = campaign(range(1, args.levels + 1)) + result["source_identity"] = source_pin(args.source_root.resolve()) + args.output.parent.mkdir(parents=True, exist_ok=True) + args.output.write_text(json.dumps(result, sort_keys=True, indent=2) + "\n") + print(json.dumps({"source_commit": PIN, "feasible_cases": len(result["positive_examples"]), + "clause_count": len(CLAUSES), + "negative_controls": len(result["negative_controls"]), + "all_positive_pass": all(x["all_pass"] for x in result["positive_examples"]), + "exact_arithmetic": True, + "strong_source_regime_examples": len(result["source_regime_examples"]), + "full_geometric_witness": False}, sort_keys=True)) + + +if __name__ == "__main__": + main() diff --git a/tests/test_rh_proof_distillation.py b/tests/test_rh_proof_distillation.py new file mode 100644 index 00000000..9772c71f --- /dev/null +++ b/tests/test_rh_proof_distillation.py @@ -0,0 +1,62 @@ +"""Exact source-inspired RH scalar checks; no mathematical black-box assumptions.""" +import unittest +from dataclasses import replace + +from research.rh_proof_distillation.rh_window_feasibility import ( + CLAUSES, WindowParams, campaign as window_campaign, dyadic_witness, + evaluate, evaluate_scale, scale_witness, +) +from research.rh_proof_distillation.rh_joint_scalar_envelope import ( + campaign as joint_campaign, bounds, enlarged_scale, +) + + +class RHSourceWindowTests(unittest.TestCase): + def test_sixteen_pinned_scalar_windows(self): + receipt = window_campaign() + self.assertEqual(len(CLAUSES), 16) + self.assertEqual(len(receipt["positive_examples"]), 5) + self.assertTrue(all(p["passes"] == 16 and p["all_pass"] for p in receipt["positive_examples"])) + + def test_sizewindows_negative_controls(self): + valid = dyadic_witness(1) + near = evaluate(replace(valid, n=valid.n - 1)) + self.assertFalse(near["checks"]["k_cap"]) + self.assertFalse(near["all_pass"]) + self.assertFalse(window_campaign()["negative_controls"][1]["checks"]["eventual_x"]) + + def test_stronger_original_source_regime(self): + for level in (6, 7): + result = evaluate_scale(scale_witness(level)) + self.assertEqual((result["passes"], result["total"]), (12, 12)) + self.assertEqual(result["sizewindows_passes"], 16) + self.assertTrue(result["all_scale_checks_pass"]) + self.assertTrue(result["sizewindows_pass"]) + self.assertFalse(evaluate_scale(dyadic_witness(6))["checks"]["SizesAt_n_lower"]) + + def test_large_x_sufficient_and_cost_window(self): + receipt = joint_campaign() + self.assertEqual(len(receipt["cases"]), 2) + self.assertFalse(receipt["negative_control"]["short_scale_passes_sufficient_8x5_exp_test"]) + for example in receipt["cases"]: + self.assertTrue(example["all_sufficient_gates_pass"]) + self.assertTrue(example["all_scale_and_sizewindow"]) + self.assertFalse(example["full_scale_structure_proved"]) + self.assertFalse(example["full_analytic_or_geometric_witness_proved"]) + + def test_large_x_independent_case(self): + a = bounds(enlarged_scale(6)) + self.assertEqual(a["x_log2"], 16384) + self.assertEqual(a["sizewindows_scalar_passes"], 16) + self.assertEqual(a["source_scale_passes"], 12) + + def test_bounded_exact_power_guard(self): + from fractions import Fraction + p = dyadic_witness(1) + self.assertEqual(p.power(Fraction(3, 16)), 64) + with self.assertRaises(ValueError): + p.power(Fraction(1, 7)) + + +if __name__ == "__main__": + unittest.main() From 23f637f4c63ea2c1aa35dbcb64c243cac3b67691 Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Sat, 21 Nov 2026 22:01:47 +0800 Subject: [PATCH 3/6] ci(rh): test MathCan native Lean certificates and original source pins --- .github/workflows/rh-window-distillation.yml | 79 ++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 .github/workflows/rh-window-distillation.yml diff --git a/.github/workflows/rh-window-distillation.yml b/.github/workflows/rh-window-distillation.yml new file mode 100644 index 00000000..bd59a5df --- /dev/null +++ b/.github/workflows/rh-window-distillation.yml @@ -0,0 +1,79 @@ +name: RHD-01 MathCan RH window mathematics + +on: + push: + paths: + - 'MathCan/RHWindowExponents.lean' + - 'MathCan.lean' + - 'research/rh_proof_distillation/**' + - 'tests/test_rh_proof_distillation.py' + - '.github/workflows/rh-window-distillation.yml' + pull_request: + paths: + - 'MathCan/RHWindowExponents.lean' + - 'MathCan.lean' + - 'research/rh_proof_distillation/**' + - 'tests/test_rh_proof_distillation.py' + - '.github/workflows/rh-window-distillation.yml' + workflow_dispatch: + +permissions: + contents: read + +jobs: + exact-rational-oracles: + runs-on: ubuntu-latest + timeout-minutes: 25 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + - name: Execute exact numeric witness and falsification checks + run: python -m unittest tests.test_rh_proof_distillation -v + - uses: actions/checkout@v4 + with: + repository: leanprover-community/riemann-hypothesis + ref: f150e02623b1e2bbe1f1da8eab5ffee5e930a6a3 + path: upstream + persist-credentials: false + sparse-checkout-cone-mode: false + sparse-checkout: | + src/Formalism/SizeWindowBrackets/GrowthBoundGivesRiemannHypothesis.lean + src/Formalism/SharpRestriction/GlobalSchurBounds/ZetaZeroFreeRegion.lean + src/Formalism/SharpRestriction/GlobalSchurBounds/RamificationTwoAndConjugationAtQAndD.lean + - name: Verify pinned original source of window predicates + run: | + python - <<'PY' + from pathlib import Path + from research.rh_proof_distillation.rh_window_feasibility import source_pin + print(source_pin(Path("upstream"))) + PY + + native-lean-kernel: + runs-on: ubuntu-latest + timeout-minutes: 45 + steps: + - uses: actions/checkout@v4 + - uses: leanprover/lean-action@v1 + with: + auto-config: false + build: true + build-args: MathCan + test: false + lint: false + use-mathlib-cache: false + - name: Kernel check source-scale integers and axiom inventory + run: | + set -euo pipefail + lake env lean MathCan/RHWindowExponents.lean | tee rh-window-axioms.txt + if grep -Eq 'sorryAx|ofReduceBool|^error:|admit' rh-window-axioms.txt; then + exit 1 + fi + shell: bash + - uses: actions/upload-artifact@v4 + if: always() + with: + name: rh-window-lean-axioms + path: rh-window-axioms.txt + if-no-files-found: ignore From f33b30651dfea7480f43a93d5fa32b49f813b06c Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Sat, 21 Nov 2026 22:02:38 +0800 Subject: [PATCH 4/6] docs(rh): move proof mathematics, source evidence and receipts into MathCan --- README.md | 5 + .../CHCORE_MATH_REVIEW.md | 122 ++++++++++++++++++ .../COMPILED_ANALYTIC_RESULTS.md | 80 ++++++++++++ .../JOINT_SCALAR_ENVELOPE.md | 51 ++++++++ research/rh_proof_distillation/PROVENANCE.md | 24 ++++ research/rh_proof_distillation/RESEARCH.md | 89 +++++++++++++ .../SMALL_COSTS_GATES.md | 28 ++++ .../SOURCE_REGIME_SCALE.md | 42 ++++++ .../rh_proof_distillation/UPPER_BRIDGE.md | 54 ++++++++ .../WITNESS_FEASIBILITY.md | 32 +++++ .../chcore_compiled_direct_refs.json | 50 +++++++ .../compiled_analytic_direct_refs.json | 86 ++++++++++++ .../core_gm_proof_map.md | 27 ++++ .../core_gm_sources.json | 62 +++++++++ .../joint_scalar_envelope_receipt.json | 57 ++++++++ 15 files changed, 809 insertions(+) create mode 100644 research/rh_proof_distillation/CHCORE_MATH_REVIEW.md create mode 100644 research/rh_proof_distillation/COMPILED_ANALYTIC_RESULTS.md create mode 100644 research/rh_proof_distillation/JOINT_SCALAR_ENVELOPE.md create mode 100644 research/rh_proof_distillation/PROVENANCE.md create mode 100644 research/rh_proof_distillation/RESEARCH.md create mode 100644 research/rh_proof_distillation/SMALL_COSTS_GATES.md create mode 100644 research/rh_proof_distillation/SOURCE_REGIME_SCALE.md create mode 100644 research/rh_proof_distillation/UPPER_BRIDGE.md create mode 100644 research/rh_proof_distillation/WITNESS_FEASIBILITY.md create mode 100644 research/rh_proof_distillation/chcore_compiled_direct_refs.json create mode 100644 research/rh_proof_distillation/compiled_analytic_direct_refs.json create mode 100644 research/rh_proof_distillation/core_gm_proof_map.md create mode 100644 research/rh_proof_distillation/core_gm_sources.json create mode 100644 research/rh_proof_distillation/joint_scalar_envelope_receipt.json diff --git a/README.md b/README.md index 57a01765..67a00101 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # MathCan +## Riemann Hypothesis proof distillation + +The [RH-01 mathematical research program](research/rh_proof_distillation/RESEARCH.md) now lives in MathCan. It contains independent finite exponent certificates in [MathCan/RHWindowExponents.lean](MathCan/RHWindowExponents.lean), exact numeric witness and negative-control oracles, original-source dependency notes, and pinned verification receipts. The companion [EvalMath PR #60](https://github.com/MoralityLabAI/EvalMath/pull/60) owns the scored Lean reconstruction benchmark and the original compiled-module extraction runner. + + Computational and formal investigations of integer exponent notation, rare prime patterns, finite-field polynomial primes, infinite sequences, observable-state quotients, market mechanisms, and geometric invariants. ## Mathematics imported as research questions from the *verse* corpora diff --git a/research/rh_proof_distillation/CHCORE_MATH_REVIEW.md b/research/rh_proof_distillation/CHCORE_MATH_REVIEW.md new file mode 100644 index 00000000..5daf4b2c --- /dev/null +++ b/research/rh_proof_distillation/CHCORE_MATH_REVIEW.md @@ -0,0 +1,122 @@ +# RH-CHCORE-02: what the analytic size-bound lemma needs + +Evidence: published Lean source at pinned `leanprover-community/riemann-hypothesis` commit +`f150e02623b1e2bbe1f1da8eab5ffee5e930a6a3` and the +[ChCore compiled-expression run](https://github.com/MoralityLabAI/EvalMath/actions/runs/44899211767). +This is a conditional mathematical analysis and gym development note. + +## The precise role of `proposition_size_bound` + +The source declaration +[`proposition_size_bound`](https://github.com/leanprover-community/riemann-hypothesis/blob/f150e02623b1e2bbe1f1da8eab5ffee5e930a6a3/src/Formalism/SizeWindowBrackets/ChainSlopeWindows/LipschitzWeightAndMinimum.lean#L507) +has type `Formalism.LFunctionChainParameters.ThickSetMeanBounds.GrowthSizeBound`, +defined [here](https://github.com/leanprover-community/riemann-hypothesis/blob/f150e02623b1e2bbe1f1da8eab5ffee5e930a6a3/src/Formalism/SizeWindowBrackets/GrowthBoundGivesRiemannHypothesis.lean#L119). +Its statement takes the `SizeWindows C ε x n nT nT2 m b k aE Err` proposition +and a character-balance inequality as premises, and concludes + +`Gx ≤ x ^ (1/2 + (C + 3) * ε)`. + +The size-window premises include `x ≥ 3`, `ε > 0`, `C ≥ 0`, `n > 0`, +`b > 0`, and the following scale constraints: + +```text +x^(-ε/8) * n / 2 ≤ nT +x^(-ε) ≤ nT2 / n, nT2 ≤ n +x^(1/2-ε) ≤ m ≤ x^(1/2+ε/2) +x*m ≤ k ≤ n²*x^(1/2-ε) +26 ≤ x^(3ε/8) +``` + +Here `n`, `nT`, `nT2` and `m` are natural numbers, usually instantiated +with a group cardinality, two finite-set cardinalities and a sampling count. +The source also imposes constraints on `aE` and an explicit upper bound +on the error `Err`; the displayed subset alone does not imply the +growth estimate. + +## Exact exponent bookkeeping + +Let `X = x^(1/2+ε)`, `P = x^(Cε)`, `Y = x^(1/2+13ε/8)`, +`Q = nT*m*b` and `δ = nT2/n`. The original proof obtains + +```text +Err ≤ 10 * P * Y * Q +Q * (δ/2) * (Gx - 4X) ≤ Err + 2Q/x +``` + +Strict positivity of `Q` permits cancellation. With `x ≥ 3`, +`P*Y ≥ 1` and `x^ε * δ ≥ 1`, the proof derives + +```text +δ * (Gx - 4X) ≤ 22 * P * Y +Gx - 4X ≤ 22 * P * Y * x^ε +Gx ≤ 26 * x^(1/2 + (C+21/8)ε) +``` + +The final `26 ≤ x^(3ε/8)` premise absorbs the coefficient: + +```text +26*x^(1/2 + (C+21/8)ε) ≤ x^(1/2 + (C+3)ε). +``` + +The compiled proof value directly contains `SZ.T1` through `SZ.T4` +and `SZ.rp`; these are the registered next-level obligations for proof +reconstruction. Source-verified locations for the defining declarations +were obtained in [the source locator CI](https://github.com/MoralityLabAI/EvalMath/actions/runs/44899731801). + +## Necessary feasibility constraints + +Since `x > 0`, its real power `x^(1/2-ε)` is strictly positive. +The three inequalities + +```text +x^(1/2-ε) ≤ m +x*m ≤ k +k ≤ n²*x^(1/2-ε) +``` + +imply `x ≤ n²`. The group order must therefore satisfy +`n ≥ sqrt(x)` whenever the full size-window assumptions hold. +This is a mathematical consequence of the displayed assumptions, +rather than a claim about whether the upstream construction +successfully supplies the required group. + +The lower bounds on `nT`, `nT2/n`, and `m`, together with `x>0` +and `n>0`, also enforce `nT>0`, `nT2>0`, and `m>0`. +Tasks `RH-D-012` and `RH-D-013` formalize these necessities +as standalone Lean propositions. + +## Four explicit error-term inequalities + +The four named `SZ` lemmas in +[`LipschitzWeightAndMinimum.lean`](https://github.com/leanprover-community/riemann-hypothesis/blob/f150e02623b1e2bbe1f1da8eab5ffee5e930a6a3/src/Formalism/SizeWindowBrackets/ChainSlopeWindows/LipschitzWeightAndMinimum.lean#L25-L130) +bound each contribution in the `SizeWindows` error expression. +With `Y=x^(1/2+13ε/8)` and `Q=nT*m*b`, their estimates are: + +| Source lemma | Contribution | Upper bound | +| --- | --- | ---: | +| `SZ.T1` | `nT*aE` | `2YQ` | +| `SZ.T2` | `nT*aE*m²/k` | `2YQ` | +| `SZ.T3` | `m*(2n*m*b*x^ε)` | `4YQ` | +| `SZ.T4` | `m*(nT2*k*b*x^ε / (n²*x^(-ε)))` | `2YQ` | + +The sum is `10YQ`, which becomes `10*x^(Cε)*YQ` after +multiplication by the error-window factor. This is the exact source +of the coefficient 10 in `hErr'`. The subsequent bound 22 arises +after dividing by the positive `Q` and absorbing `2Q/x`. + +These lemmas isolate a valuable reconstruction curriculum. +`T1` and `T2` are scalar inequalities. `T3` uses the lower bound +on `nT` and upper bound on `m`; `T4` uses the upper bounds +on `nT2` and `k`. Their separate hypotheses make them natural +targets for compact reasoner tests and counterexample checks. +## Where the research difficulty remains + +`proposition_size_bound` is a conditional analytic estimate with explicit +window constraints. The nontrivial global argument must construct +compatible algebraic, geometric and character data that satisfy those +constraints at the scales required by the final theorem. +That is the important feasibility and proof-navigation target for +Data Goblin and future compact Lean reasoners. + +The source has no redistribution license; this note records only concise +mathematical formulae, source identifiers and interpretation. diff --git a/research/rh_proof_distillation/COMPILED_ANALYTIC_RESULTS.md b/research/rh_proof_distillation/COMPILED_ANALYTIC_RESULTS.md new file mode 100644 index 00000000..d5e41995 --- /dev/null +++ b/research/rh_proof_distillation/COMPILED_ANALYTIC_RESULTS.md @@ -0,0 +1,80 @@ +# RH analytic proof references extracted from the original compiled Lean artifacts + +**Source pin:** `leanprover-community/riemann-hypothesis` commit +`f150e02623b1e2bbe1f1da8eab5ffee5e930a6a3`. + +**Execution:** [successful compiled-reference workflow](https://github.com/MoralityLabAI/EvalMath/actions/runs/44897842450); +[raw graph artifact](https://github.com/MoralityLabAI/EvalMath/actions/runs/44897842450/artifacts/14704960346). +Raw JSON SHA-256: `b193e16ce3d824008b5b17217a282c174cd45c0cbefa53d9bf3c2f0852570093`. + +Lean v4.33.1 loaded **143** selected project modules after the +community's original published cache manifest and each selected archive +passed SHA-256 verification. The six source anchors also matched the +pinned source. The workflow imported the *actual upstream compiled* +theorem constants and read both type and proof expressions. + +## Verified theorem-value references + +| Root | Direct proof-value constants | Expanded nodes | Scope | +| --- | ---: | ---: | --- | +| `Deduction.zeroFree_of_rpow_window` | 30 | 22 | Depth-2 limited; node budget not exhausted | +| `UpperTheory.Comparison₂.core_gm` | 424 | 120 | Node budget exhausted at 120 of 403 queued | + +From the **actual elaborated proof of `core_gm`**, six key +named mathematical theorem constants are directly referenced: +`Deduction.ch_core`, `Deduction.ch_top`, +`UpperTheory.Comparison₂.charsA`, +`UpperTheory.Comparison₂.gmA_eq`, +`UpperTheory.Comparison₂.sigA_le`, and +`UpperTheory.Comparison₂.hostFactsS`. +Other directly used theorems include +`Formalism.LFunctionChainParameters.LErr.large_x_eventually` +and autogenerated proof fields of the error-window predicates. + +At the next observed hop, `ch_core` references +`Deduction.CharacterBalanceMoves.core`, +`Formalism.LFunctionChainParameters.ThickSetMeanBounds.proposition_size_bound`, +and `derivative_integral_all` in the same namespace. +`ch_top` references `Deduction.ch_top_main_eq`, +`Formalism.LFunctionChainParameters.WeightedSlopeBounds.each_unit_bound_statement`, +and `Formalism.LFunctionChainParameters.LChain.errX5at_le`. + +The **Landau window proof** directly references `Deduction.lemmaL` +and `Deduction.windowHyp_of_rpow`. The compiled `lemmaL` +proof then refers to `Deduction.landau_window`, +`Deduction.windowHypU_of_windowHyp`, and +`Deduction.charFamily_LFunction_ne_zero_of_one_le_re`. + +The compact machine-readable record is +[compiled_analytic_direct_refs.json](compiled_analytic_direct_refs.json). +It preserves the module counts, cache identities, direct theorem references, +root cardinalities and truncation indicators. The full 1.4 MB expression +graph remains in the workflow artifact. + +## Limits + +The graph proves **syntactic occurrence of constants in Lean's original +compiled proof expressions**. It does not establish their minimal +mathematical necessity. The analytic excerpt is far smaller than the +66,168-module Galois-row import closure and the 175,184-module full +`Main` closure. + +The `core_gm` two-hop expansion was truncated by its 120-node limit. +The direct root references above were captured in full; deeper nodes +need a wider bounded probe. The separate mathematical validity of +the global argument is outside this targeted extraction. + +## Reproduction + +Run `rh-compiled-slice.yml` on the PR. For a standalone replay: + +```sh +python -m spiral_ln.rh_selective_olean \ + --source-root /path/to/pinned/riemann-hypothesis \ + --anchors analytic_window weighted_bound \ + --max-modules 200 --max-depth 2 --max-nodes 120 \ + --output analytic-proof-refs.json +``` + +Published artifacts are intentionally downloaded to an ephemeral checkout +and left out of the EvalMath source tree. diff --git a/research/rh_proof_distillation/JOINT_SCALAR_ENVELOPE.md b/research/rh_proof_distillation/JOINT_SCALAR_ENVELOPE.md new file mode 100644 index 00000000..39ff1d40 --- /dev/null +++ b/research/rh_proof_distillation/JOINT_SCALAR_ENVELOPE.md @@ -0,0 +1,51 @@ +# Exact sufficient scalar conditions for LargeX and SmallCosts + +Source pin: f150e02623b1e2bbe1f1da8eab5ffee5e930a6a3. +Original LargeX and smallCosts proofs occur in +Formalism/SharpRestriction/GlobalSchurBounds/RamificationTwoAndConjugationAtQAndD.lean. + +The first two source-regime witnesses chose log2(x)=16/epsilon. +At these scales x^(epsilon/8)=4, so the sufficient logarithmic +criterion for 8*x^5 <= exp(x^(epsilon/8)) fails. + +Increase to log2(x)=256/epsilon, with epsilon=1/64 and 1/128. +Choose binary exponents of the other parameters at the central +SizesAt scales: + + L = log2(x), q = epsilon*L = 256 + log2(n) = 2L+8q + log2(m) = (L-q/8)/2 + log2(k) = 9L/2+10q + log2(nT) = log2(n)-q/8-1 + log2(nT2) = log2(n)-q + +To test scalar SmallCosts choose f=2n, eta=1, +b=12*f*x*(x+1), theta=1/(4*f*x*(x+1)), Cd=CL=0, c=1. +Under these choices the two rational cost inequalities hold directly. + +LargeX includes 8*x^5 <= exp(x^(epsilon/8)) and +48*x^5 <= exp(x^(epsilon/4)). Since x=2^L and log(2)<=1, +log(8*x^5)<=3+5L and log(48*x^5)<=6+5L. +Monotonicity of exp makes the integer inequalities +3+5L <= x^(epsilon/8) and 6+5L <= x^(epsilon/4) +sufficient. The checker verifies them with exact integer arithmetic. + +For Cd=CL=0, moveCost=3 log(x+1). Since x>=1 and x=2^L, +log(x+1)<=L+1, so it suffices that +3(L+1)<=x^(1/2+epsilon). The source's two other power +thresholds are checked with exact dyadic exponents. + +Both examples also pass the six SizesAt and three PlacesAt bounds, +the finite-set cardinality caps, and all sixteen SizeWindows scalar +conditions after substituting the new b. + +These conditions are an exact arithmetic certificate with documented +elementary calculus implications. The Python tests do not formally +prove the general logarithm and exponential comparison facts in Lean. +These free scalar choices are not asserted to be the actual +Scale.b or Scale.theta, nor do they construct any arithmetic +character estimates, adm5/6/7, or the eventual family witness. + +## Verified CI receipt + +The exact source-attested [workflow run](https://github.com/MoralityLabAI/EvalMath/actions/runs/44903295524) passed 12 CPU-only tests and emitted the complete [JSON artifact](https://github.com/MoralityLabAI/EvalMath/actions/runs/44903295524/artifacts/14706404309). The archived JSON SHA-256 is `8b28912df718694c1e3978fc8520d270ed3f1b5a845d5ad2430735598c40249d`. The repo retains a [compact machine-readable verification receipt](joint_scalar_envelope_receipt.json) with the same source identities, scale exponents, pass counts and limitations. diff --git a/research/rh_proof_distillation/PROVENANCE.md b/research/rh_proof_distillation/PROVENANCE.md new file mode 100644 index 00000000..93d7d98e --- /dev/null +++ b/research/rh_proof_distillation/PROVENANCE.md @@ -0,0 +1,24 @@ +# MathCan RH source ledger + +Upstream: leanprover-community/riemann-hypothesis +pinned commit f150e02623b1e2bbe1f1da8eab5ffee5e930a6a3. +Prior experimental home: MoralityLabAI/EvalMath PR #60. + +All files in this directory labeled as compiled references were +derived from the original published Lean cache and SHA-pinned +in the EvalMath CI receipts. The source notes were moved from +the EvalMath research branch at its 2026-11-21 version. + +The exact numerical scalar oracles are executable in MathCan. +MathCan's separate native Lean file proves integer arithmetic +certificates without the original Mathlib dependency. +Full source-level RH proof bodies remain in the original +leanprover-community repository; no such bodies are vendored here. + +Core source files: +- src/Formalism/SizeWindowBrackets/GrowthBoundGivesRiemannHypothesis.lean +- src/Formalism/SizeWindowBrackets/ChainSlopeWindows/LipschitzWeightAndMinimum.lean +- src/Formalism/SharpRestriction/GlobalSchurBounds/ZetaZeroFreeRegion.lean +- src/Formalism/SharpRestriction/GlobalSchurBounds/RamificationTwoAndConjugationAtQAndD.lean +- src/Development/AutomorphicArithmetic/DedekindLFunctions/LandauTheorems/ChCore.lean +- src/Development/AutomorphicArithmetic/PrimitiveCosets/CoreGm.lean diff --git a/research/rh_proof_distillation/RESEARCH.md b/research/rh_proof_distillation/RESEARCH.md new file mode 100644 index 00000000..da0bb7f0 --- /dev/null +++ b/research/rh_proof_distillation/RESEARCH.md @@ -0,0 +1,89 @@ +# RH-01: Analytic window and proof-dependency mathematics + +**Research status:** conditional lemmas and finite arithmetic certificates +derived from an externally published claimed proof. The ultimate RH/GRH +result is subject to ongoing independent mathematical examination. + +Original upstream Lean repository: +https://github.com/leanprover-community/riemann-hypothesis +pinned to commit f150e02623b1e2bbe1f1da8eab5ffee5e930a6a3. + +## What we are trying to settle + +The analytic half-plane exclusion uses a Landau window lemma: +a smoothed von Mangoldt sum must have an exponent approaching 1/2. +The source proof of core_gm supplies a bound + + Gm(x) <= x^(1/2 + (eD + eL + 7)*epsilon). + +The error exponent is assembled from character balance and size-window +inequalities in the original Lean proof. The upstream compiled proof +terms identify ch_core, ch_top, charsA, gmA_eq, sigA_le and hostFactsS. + +Within ch_core, the CharacterBalanceMoves.core lemma feeds the +size-bound proposition; the latter calls SZ.T1, SZ.T2, SZ.T3, SZ.T4 +with coefficients 2, 2, 4, 2 in the normalized error budget. +Those conditional calculations are documented in CHCORE_MATH_REVIEW.md. + +The source's SizeWindows predicate has 16 scalar conditions. It gives +n^2 >= x for the cardinality n of an auxiliary finite group. +The family-level SizesAt predicate imposes + + x^(2+31*epsilon/4) <= n <= x^(2+33*epsilon/4) + +when delta=epsilon/4. This is a much stronger size requirement. +An exact numerical certificate checks that the scalar inequalities +are jointly feasible for two epsilon values. This demonstrates +finite numerical compatibility of selected necessary hypotheses. + +The original smallCosts proof uses an exponentially large b and +exponentially small theta, with positive f. This costs substantial +scale in the other inequalities, making the simultaneous admissibility +proof a primary mathematical object for further study. + +## Highest-value upstream interfaces + +- SizesAt and PlacesAt: finite group, sampling depth and character-set sizes. +- adm5: uniform smoothed character-sum control over y >= X'/3. +- adm6: specified nontrivial character sums and logarithmic derivative estimates. +- adm7: existence of weights, positive eta and TOPineq. +- proposition_eleven_two_at_scale and proposition_eleven_two_along_family: + transport those hypotheses into the required pointwise prime-sum estimate. + +The first two constraints are modeled by exact finite arithmetic. +The analytic and geometric witness constructions remain unverified +by our independent MathCan development. + +## Formal-math assets and evidence + +- MathCan/RHWindowExponents.lean: Init-only proof of log-scale arithmetic + certificates for epsilon=1/64 and 1/128. This is a separate theorem + about finite integers, not an import of the original Mathlib claim. +- rh_window_feasibility.py and rh_joint_scalar_envelope.py: exact + fraction and dyadic checks, with nearby failing controls. +- chcore_compiled_direct_refs.json and compiled_analytic_direct_refs.json: + receipts obtained from the original published Lean compiled artifacts. + Source and cache pins were verified in the originating EvalMath CI. + +EvalMath PR #60 retains the proof-term graph extraction and scored +reconstruction tasks: https://github.com/MoralityLabAI/EvalMath/pull/60 + +## Verification boundaries + +1. Direct source callsite evidence is labeled source-only. +2. Published Lean cache references identify constants occurring inside + proof expressions. They are not proof minimization or a new proof. +3. MathCan native Lean certificates are checked against Lean 4.35 Init. +4. Exact-fraction scalar examples are finite checks. The logarithmic + and exponential comparisons used as sufficient bounds are cited + mathematical facts rather than separate Lean formalizations here. +5. Global RH and the complete family/geometric construction are outside + the independent results currently established in MathCan. + +## Next formal work + +Inspect the consistency and eventual quantifiers of the full family +hypotheses, especially the interaction of high b and low theta with +the upper-bound constraints on aE and Err. Formalize the exponent +identities that propagate through windows and smallCosts in a Lean +library with matching proof obligations. Keep original source pins. diff --git a/research/rh_proof_distillation/SMALL_COSTS_GATES.md b/research/rh_proof_distillation/SMALL_COSTS_GATES.md new file mode 100644 index 00000000..f64fe67d --- /dev/null +++ b/research/rh_proof_distillation/SMALL_COSTS_GATES.md @@ -0,0 +1,28 @@ +# SmallCosts: two simultaneous scale constraints + +The original [SmallCosts definition](https://github.com/leanprover-community/riemann-hypothesis/blob/f150e02623b1e2bbe1f1da8eab5ffee5e930a6a3/src/Formalism/SizeWindowBrackets/GrowthBoundGivesRiemannHypothesis.lean) +requires, among its conjuncts: + +```text +2*f*(x+1)*theta <= 1/x +6*f*(x+1)*(eta+1) <= b/x +``` + +With x>0, f>0 and eta>=0, these imply the necessary bounds: + +```text +theta <= 1/(2*f*x*(x+1)) +b >= 6*f*x*(x+1) +``` + +`f` is instantiated by `fPl H = (PhiSet (H := H)).card`, a +positive finite cardinality in the source construction. + +This creates a high-b and low-theta requirement as x grows. +The exact dyadic SizeWindows witnesses in this gym use b=1; +they are deliberately limited to that predicate and do not +establish satisfaction of SmallCosts, ThinScales, or the full +`GrowthInequalityDataExists` conjunction. + +Tasks RH-D-014 and RH-D-015 formalize the two implications +as independent verified Lean reconstruction targets. diff --git a/research/rh_proof_distillation/SOURCE_REGIME_SCALE.md b/research/rh_proof_distillation/SOURCE_REGIME_SCALE.md new file mode 100644 index 00000000..5514307c --- /dev/null +++ b/research/rh_proof_distillation/SOURCE_REGIME_SCALE.md @@ -0,0 +1,42 @@ +# Small-epsilon family scale certificates from original SizesAt and PlacesAt + +Exact pinned upstream source at commit f150e02623b1e2bbe1f1da8eab5ffee5e930a6a3: + +- Formalism/SharpRestriction/GlobalSchurBounds/ZetaZeroFreeRegion.lean, + Git blob 7746e5a5affe67117d4ba907dbcd2788f539db6e, defines + SizesAt and PlacesAt. +- Formalism/SharpRestriction/GlobalSchurBounds/RamificationTwoAndConjugationAtQAndD.lean, + Git blob 1c1495ef81c77fa96f3c1a70106c1da9e24c0c5d, proves + the identity x*delta1 = x^(1-epsilon/8) inside theorem windows. + +To match the actual family theorem, epsilon must be positive and below 1/52. +Take epsilon=2^-j, j=6 or7, and let L=log2(x)=16/epsilon. +Define the integer cardinalities and parameters by their binary logs: + + log2(n) = 2L+128 + log2(nT) = 2L+125 + log2(nT2) = 2L+112 + log2(m) = L/2-1 + log2(k) = 9L/2+160 + +with b=1, C=aE=Err=0 for the scalar-only test. + +The exact-rational checker verifies the six SizesAt inequalities, +the three PlacesAt inequalities, both finite-set cardinality caps +and 0= x^(2+31epsilon/4). + +The test establishes arithmetic consistency of finitely many scalar +inequalities for two specific choices of epsilon. The original family +theorems quantify over every sufficiently small positive epsilon, +arbitrarily large x, and actual groups, character sums and geometric +witnesses. b=1 also does not satisfy SmallCosts in the intended +large-x regime. No part of this certificate proves RH. diff --git a/research/rh_proof_distillation/UPPER_BRIDGE.md b/research/rh_proof_distillation/UPPER_BRIDGE.md new file mode 100644 index 00000000..fc480d59 --- /dev/null +++ b/research/rh_proof_distillation/UPPER_BRIDGE.md @@ -0,0 +1,54 @@ +# Upper bridge: theta integrals, covolumes and the character-window theorem + +Provenance: Lean community mirror at commit `f150e02623b1e2bbe1f1da8eab5ffee5e930a6a3`. +This note describes **direct source observations**; the complete compiled proof-term graph is still pending. + +## The conjunction that finishes the character theorem + +In `ThetaCorrespondence/ThetaPairLifts/ThirdPlaceSeries/EveryCharacterOfLiteratureOfVWin.lean`, +the declaration `UpperTheory.LiteratureTheorems.every_character_of_literature_of_vWin` +calls `UpperTheory.Lit.every_character_of_theta_integrals_local_matching`. +It supplies a covolume estimate from `SelfIntersectionVolumeEstimates.topCovolSlim2_use_alt_alt`, +theta-integral compatibility from `theta_integrals_agree_and_local_matching_of_literature`, +and a local Langlands hypothesis from `local_langlands_gl_recT_exists_of_literature`. +Additional published arithmetic and geometric input assumptions occur in the same expression. +That theorem takes `OpenLiteratureStatements` and `UpperTheory.Top.VWin` as premises. + +## How VWin and Galois representations enter + +`AutomorphicVarieties/ModularityArgument/ThresholdArguments/DenseThresholdCases/VwinOfRow.lean` +defines `UpperTheory.One.vwin_of_row`, applying `automorphic_window_of_inputs` +to an `OpenImageCondition.mk` built from a Galois row parameter +and the `BaseChangeIdentities.baseChangeN` input. + +`Foundations/GaloisRepresentations/IntegralStructures/RowSrc.lean` +provides `galoisLocalGlobalStrong_recParameter` by applying +`galoisRepresentations_of_thetaLift` to `tLiftK`. + +`CharacterBoxes/MainConclusion.lean` then calls +`every_character_of_literature_of_vWin` using the row parameter and `vwin_of_row`. +Thus a specific, source-observed junction combines theta matching, +local Langlands, a geometric covolume statement and an automorphic window. + +## How this relates to the character-sum bound + +The other source strand starts from `ChainTied` in +`Formalism/SharpRestriction/GlobalSchurBounds/TieGlobal.lean`, +which contains `TiePts`, `TieGlobal`, `TieLocal` and `TieArith` witnesses +along with size, cost and error-window bounds. +`level_gm_le_on_family_scales` transports these into the family-level +prime-sum inequality via `tiedCore_of_chainTied` and `core_gm`. + +The entire path by which the arithmetic-geometric constructions supply +the `ChainTied` conditions needs a theorem-level proof-expression trace. +The upper-bridge audit identifies the named interfaces that such a trace +must inspect and records their upstream Git blob hashes. + +CI stages this investigation in `rh-pinned-source.yml` using a sparse +source checkout. No upstream Lean proof artifacts are executed. + +## An explicit duplicate premise in the literature interface + +The pinned file defines `OpenLiteratureStatements : Prop` with exactly three fields: `caraianiLocalGlobalDual : UpperTheory.One.M.Row`, `localLanglandsExists : UpperTheory.Zero.LLC.RecTExists`, and `galoisRepOfPolarizedPairLit : UpperTheory.One.M.Row`. The two Galois-row fields share a proposition, so this interface is equivalent to the conjunction of one row witness with the local-Langlands existence witness. That structural equivalence is modeled by proxy task `RH-D-007`. The upstream code provides these witnesses through the Galois row and `recTExists`; this observation does not discharge any hidden arithmetic or geometric proof obligations. + +Task `RH-D-008` models the existential-index projection performed by `tiedCore_of_chainTied`, with geometric assertions left as explicit parameters. Both are independent miniature Lean tasks, never the upstream proofs themselves. diff --git a/research/rh_proof_distillation/WITNESS_FEASIBILITY.md b/research/rh_proof_distillation/WITNESS_FEASIBILITY.md new file mode 100644 index 00000000..a86b6377 --- /dev/null +++ b/research/rh_proof_distillation/WITNESS_FEASIBILITY.md @@ -0,0 +1,32 @@ +# RH SizeWindows: exact scalar feasibility and witness-source lineage + +The [workflow](../../.github/workflows/rh-witness-lineage.yml) checks the original +source at pin `f150e02623b1e2bbe1f1da8eab5ffee5e930a6a3`, including the +`SizeWindows` declaration Git blob and all six existing proof anchors. + +For epsilon=2^-j and integer j≥1, the checker constructs the following +dyadic scalar inputs: + +```text +x = 2^(16/epsilon), n = sqrt(x), nT = n/8, +nT2 = m = x^(1/2-epsilon), k = x*m, +b = 1, C = aE = Err = 0. +``` + +Each required x^exponent is evaluated with exact fractions, and the +large-x threshold simplifies to 26 ≤ 64. All 16 scalar conditions +are tested at j=1,..,5, along with two nearby negative controls: +reducing the group size by one, and reducing x below the threshold. + +**This does not construct `GrowthInequalityDataExists` or `ChainTied`.** +In particular, choosing Err=0 satisfies its scalar *upper* bound +without supplying an estimate on topExcess; b=1 does not claim +to satisfy the separate `SmallCosts` predicate. The arithmetic and +geometric witnesses remain substantive research obligations. + +The full-source index records the declarations and usage sites +of `SizeWindows`, `SmallCosts`, `GrowthInequalityDataExists`, +`ChainTied`, `CoreAtH`, and related predicates by exact source Git blob. +These are textual source-navigation results, tagged `proof_term_data=false`. + +Upstream source is used temporarily in CI and not redistributed into EvalMath. diff --git a/research/rh_proof_distillation/chcore_compiled_direct_refs.json b/research/rh_proof_distillation/chcore_compiled_direct_refs.json new file mode 100644 index 00000000..e9f7c12e --- /dev/null +++ b/research/rh_proof_distillation/chcore_compiled_direct_refs.json @@ -0,0 +1,50 @@ +{ + "schema": 1, + "source_repository": "leanprover-community/riemann-hypothesis", + "source_commit": "f150e02623b1e2bbe1f1da8eab5ffee5e930a6a3", + "source_file": "src/Development/AutomorphicArithmetic/DedekindLFunctions/LandauTheorems/ChCore.lean", + "source_blob": "878f5077bc382426c7da988e5a375b85deeaa7de", + "cache_manifest_sha256": "292caa386a620d935cfc736b56fcceaab9fe7073086693b62e899c1ee4725f04", + "run_url": "https://github.com/MoralityLabAI/EvalMath/actions/runs/44899211767", + "artifact_url": "https://github.com/MoralityLabAI/EvalMath/actions/runs/44899211767/artifacts/14705705959", + "artifact_graph_json_sha256": "b80615a2d3f05d6862cb57c0d410b7e950b0ebfa29d35aa000c9e121b6aed9ba", + "module_count": 55, + "cache_artifacts_sha256_verified": 55, + "proof_term_data": true, + "method": "Lean 4.33.1 elaborated theorem Expr.getUsedConstants for types and values", + "roots": [ + { + "id": "balance_core", + "constant": "Deduction.CharacterBalanceMoves.core", + "type_ref_count": 72, + "value_ref_count": 368, + "expanded_nodes": 26, + "depth_limited": true, + "truncated": false, + "observed_math_value_refs": [ + "Deduction.CharacterBalanceMoves.sum_Th", + "Deduction.CharacterBalanceMoves.th_le", + "Deduction.ch_balance", + "Formalism.LFunctionChainParameters.ThickSetMeanBounds.lipschitz_weight_all" + ] + }, + { + "id": "size_bound", + "constant": "Formalism.LFunctionChainParameters.ThickSetMeanBounds.proposition_size_bound", + "type_ref_count": 1, + "type_constant": "Formalism.LFunctionChainParameters.ThickSetMeanBounds.GrowthSizeBound", + "value_ref_count": 337, + "expanded_nodes": 13, + "depth_limited": true, + "truncated": false, + "observed_math_value_refs": [ + "Formalism.LFunctionChainParameters.ThickSetMeanBounds.SZ.T1", + "Formalism.LFunctionChainParameters.ThickSetMeanBounds.SZ.T2", + "Formalism.LFunctionChainParameters.ThickSetMeanBounds.SZ.T3", + "Formalism.LFunctionChainParameters.ThickSetMeanBounds.SZ.T4", + "Formalism.LFunctionChainParameters.ThickSetMeanBounds.SZ.rp" + ] + } + ], + "caveat": "Original compiled-cache expression references, not a minimal necessary proof dependency graph or independent clean compilation." +} diff --git a/research/rh_proof_distillation/compiled_analytic_direct_refs.json b/research/rh_proof_distillation/compiled_analytic_direct_refs.json new file mode 100644 index 00000000..ad54a35b --- /dev/null +++ b/research/rh_proof_distillation/compiled_analytic_direct_refs.json @@ -0,0 +1,86 @@ +{ + "schema_version": 1, + "kind": "published_compiled_Lean_expression_direct_refs", + "scope": "two analytic theorem roots only; bounded breadth-first reference expansion", + "source_commit": "f150e02623b1e2bbe1f1da8eab5ffee5e930a6a3", + "evalmath_source_commit": "8939b7fc40a31ad0ab39da352580d33dc6194c3a", + "run_url": "https://github.com/MoralityLabAI/EvalMath/actions/runs/44897842450", + "raw_artifact_url": "https://github.com/MoralityLabAI/EvalMath/actions/runs/44897842450/artifacts/14704960346", + "raw_json_sha256": "b193e16ce3d824008b5b17217a282c174cd45c0cbefa53d9bf3c2f0852570093", + "source_anchors_matched": 6, + "selected_cache_modules": 143, + "selected_cache_artifact_sha256s_verified": 143, + "published_manifest_sha256": "292caa386a620d935cfc736b56fcceaab9fe7073086693b62e899c1ee4725f04", + "proof_term_data": true, + "roots": [ + { + "id": "analytic_window", + "lean_constant": "Deduction.zeroFree_of_rpow_window", + "import_closure_modules": 30, + "direct_type_refs": 29, + "direct_value_refs": 30, + "visited_nodes": 22, + "emitted_edges": 2139, + "truncated": false, + "depth_limited": true, + "observed_direct_theorem_value_refs": [ + "Deduction.lemmaL", + "Deduction.windowHyp_of_rpow" + ], + "verified_second_hop_references": { + "Deduction.lemmaL": [ + "Deduction.landau_window", + "Deduction.windowHypU_of_windowHyp", + "Deduction.charFamily_LFunction_ne_zero_of_one_le_re" + ], + "Deduction.windowHyp_of_rpow": [ + "Deduction.windowHyp_of_rpow_eventually" + ] + } + }, + { + "id": "weighted_bound", + "lean_constant": "UpperTheory.Comparison₂.core_gm", + "import_closure_modules": 115, + "direct_type_refs": 40, + "direct_value_refs": 424, + "visited_nodes": 120, + "emitted_edges": 5621, + "queued_nodes": 403, + "truncated": true, + "depth_limited": true, + "observed_direct_theorem_value_refs": [ + "Deduction.ch_core", + "Formalism.LFunctionChainParameters.LErr.large_x_eventually", + "Formalism.LFunctionChainParameters.LErr.ErrWindows._proof_1", + "Formalism.LFunctionChainParameters.LErr.ErrWindows0._proof_1", + "Formalism.LFunctionChainParameters.LErr.CErr._proof_1", + "Formalism.LFunctionChainParameters.LErr.KBig._proof_1", + "UpperTheory.Comparison₂.hostFactsS", + "UpperTheory.Comparison₂.charsA", + "Deduction.ch_top", + "UpperTheory.Comparison₂.sigA_le", + "UpperTheory.Comparison₂.gmA_eq" + ], + "verified_second_hop_references": { + "Deduction.ch_core": [ + "Formalism.LFunctionChainParameters.ThickSetMeanBounds.derivative_integral_all", + "Deduction.CharacterBalanceMoves.core", + "Formalism.LFunctionChainParameters.ThickSetMeanBounds.proposition_size_bound" + ], + "Deduction.ch_top": [ + "Deduction.ch_top_main_eq", + "Formalism.LFunctionChainParameters.WeightedSlopeBounds.each_unit_bound_statement", + "Formalism.LFunctionChainParameters.LChain.errX5at_le" + ] + } + } + ], + "caveats": [ + "Observed direct value references are not mathematically necessary lemmas.", + "Theorem-ref lists cover project theorems classified among visited nodes; root value_refs also include definitions, lemmas and Mathlib tactics.", + "The core_gm graph reached its max_nodes=120 limit and is incomplete at depth two.", + "The Landau graph reached depth 2 with depth_limited=true.", + "Published cache is SHA-verified but not independently rebuilt by this run." + ] +} diff --git a/research/rh_proof_distillation/core_gm_proof_map.md b/research/rh_proof_distillation/core_gm_proof_map.md new file mode 100644 index 00000000..fc82e1ba --- /dev/null +++ b/research/rh_proof_distillation/core_gm_proof_map.md @@ -0,0 +1,27 @@ +# Tracing the core_gm exponent and its proof obligations + +Source pin: [CoreGm.lean](https://github.com/leanprover-community/riemann-hypothesis/blob/f150e02623b1e2bbe1f1da8eab5ffee5e930a6a3/src/Development/AutomorphicArithmetic/PrimitiveCosets/CoreGm.lean). This note records direct source call sites; the separate Lean probe produces proof-term evidence only when run against the compiled upstream checkout. + +The source theorem concludes `Λ.Gm x ≤ x ^ (1/2 + (eD + eL + 7) * eps)`, assuming `EAtH` and `CoreAtH` witnesses. The `CoreAtH` predicate explicitly includes `C.eDiv ≤ eD`, `C.eLoss ≤ eL`, `ErrWindows`, `BNBoundsU`, `SizeData₂`, `ThinScales`, `CostWindows`, and other requirements. These must be discharged by the arithmetic and geometric construction. + +The proof applies `Deduction.ch_core` with `C = max (eD + eL) 0 + 3`. Since `ch_core` returns a principal exponent `(C + 3) eps`, nonnegativity of `eD + eL` makes that `(eD + eL + 6) eps`. The `Deduction.ch_top` gap estimate feeds the character-balance theorem, with an error factor `x ^ (CErr C * eps)`. Here `CErr` is bounded using the `eDiv` and `eLoss` controls. `charsA` supplies the character hypotheses, while `gmA_eq` converts the weighted character sum into `Λ.Gm`. + +The remaining correction is bounded by `sigA_le` as `4 * Λ.o * x ^ (1/2 + eps)`. For sufficiently large `x`, `x ^ eps` dominates `1 + 4 * Λ.o`. One last multiplicative power of `x ^ eps` absorbs that correction and changes the principal exponent from `+6` to `+7`. Exercises RH-D-005 and RH-D-006 test the algebraic bookkeeping independently of the large number-theory constructions. + +The downstream source chain can be seen in [WindowInequalityOfArtinInputs.lean](https://github.com/leanprover-community/riemann-hypothesis/blob/f150e02623b1e2bbe1f1da8eab5ffee5e930a6a3/src/Development/AutomorphicArithmetic/PrimitiveCosets/WindowInequalityOfArtinInputs.lean), which applies `core_gm` to a family of `CoreAtH` witnesses. [LevelGmLeOnFamilyScales.lean](https://github.com/leanprover-community/riemann-hypothesis/blob/f150e02623b1e2bbe1f1da8eab5ffee5e930a6a3/src/Development/AutomorphicArithmetic/PrimitiveCosets/LevelGmLeOnFamilyScales.lean) supplies the `ChainTied` to family-core reduction. + +## Reproduction + +First validate a tiny original theorem-dependency witness in EvalMath: + +```sh +python -m spiral_ln.rh_dependency smoke --lean-cwd lean --output /tmp/rh-dependency-smoke.json +``` + +To inspect the upstream proof terms, use a complete checkout pinned to the manifest's mirror commit and compiled with that repository's Lean 4.33.1 toolchain. The source checker verifies the six anchor blobs before running: + +```sh +python -m spiral_ln.rh_dependency upstream --source-root /path/to/riemann-hypothesis --anchors weighted_bound --max-depth 2 --max-nodes 120 --output /tmp/rh-core-gm-deps.json +``` + +The direct expression graph remains bounded and can omit mathematical dependencies hidden behind definitions or rewriting. Proof reduction and human examination are separate later tasks. diff --git a/research/rh_proof_distillation/core_gm_sources.json b/research/rh_proof_distillation/core_gm_sources.json new file mode 100644 index 00000000..225a06a5 --- /dev/null +++ b/research/rh_proof_distillation/core_gm_sources.json @@ -0,0 +1,62 @@ +{ + "schema_version": 1, + "mode": "manually_verified_source_calls", + "source_repository": "leanprover-community/riemann-hypothesis", + "source_commit": "f150e02623b1e2bbe1f1da8eab5ffee5e930a6a3", + "caller": "UpperTheory.Comparison₂.core_gm", + "caller_file": "src/Development/AutomorphicArithmetic/PrimitiveCosets/CoreGm.lean", + "caller_blob": "3ba7a590e84c5993882ea6c5dcf9fdbed5f07d4d", + "status": "source-inspected, term dependency not executed against upstream", + "edges": [ + { + "callee": "Deduction.ch_core", + "role": "character-balance bound with exponent C + 3", + "source": "DedekindLFunctions/LandauTheorems/ChCore.lean", + "blob": "878f5077bc382426c7da988e5a375b85deeaa7de" + }, + { + "callee": "Deduction.ch_top", + "role": "gap estimate via size and error windows", + "source": "DedekindLFunctions/LandauTheorems/ChTop.lean", + "blob": "ce06a34a9e0b1b332e10d3b7efb04a06e9ab77f5" + }, + { + "callee": "UpperTheory.Comparison₂.charsA", + "role": "translate character hypotheses", + "source": "PrimitiveCosets/charsA.lean", + "blob": "7d6a3faa3f6dcc1923a65473d848d8da0601e7a2" + }, + { + "callee": "UpperTheory.Comparison₂.gmA_eq", + "role": "identify GmA with Level.Gm", + "source": "PrimitiveCosets/GmAEq.lean", + "blob": "2f1a763f43d65eea1f6e61018c8b70c02d2dfa03" + }, + { + "callee": "UpperTheory.Comparison₂.sigA_le", + "role": "bound excluded-character contribution", + "source": "PrimitiveCosets/SigALe.lean", + "blob": "e9c80e2017ec149ac559bc20c184b9264b9ec0c2" + }, + { + "callee": "UpperTheory.Comparison₂.hostFactsS", + "role": "supply the HostFactsS assumption", + "source": "PrimitiveCosets/hostFactsS.lean", + "blob": "440a45819936cf0cb7fb8e81156e94b25288459c" + } + ], + "downstream": [ + { + "theorem": "UpperTheory.Comparison₂.windowInequality_of_artinInputs", + "source": "PrimitiveCosets/WindowInequalityOfArtinInputs.lean", + "blob": "c349e34925ac26b8bc76bd36e9b91562f86d6b8d", + "relation": "calls core_gm" + }, + { + "theorem": "UpperTheory.Comparison₂.level_gm_le_on_family_scales", + "source": "PrimitiveCosets/LevelGmLeOnFamilyScales.lean", + "blob": "de994949e6fd2d7238cfcb1c19d361ccdfe904fc", + "relation": "calls windowInequality_of_artinInputs" + } + ] +} diff --git a/research/rh_proof_distillation/joint_scalar_envelope_receipt.json b/research/rh_proof_distillation/joint_scalar_envelope_receipt.json new file mode 100644 index 00000000..6cc776d6 --- /dev/null +++ b/research/rh_proof_distillation/joint_scalar_envelope_receipt.json @@ -0,0 +1,57 @@ +{ + "schema_version": 1, + "kind": "pinned_original_source_scalar_joint_feasibility", + "proof_term_data": false, + "source_commit": "f150e02623b1e2bbe1f1da8eab5ffee5e930a6a3", + "evalmath_commit_under_test": "5ccbe666d2565ad42f47b5748359fd17f903d81e", + "workflow_run": "https://github.com/MoralityLabAI/EvalMath/actions/runs/44903295524", + "workflow_artifact": "https://github.com/MoralityLabAI/EvalMath/actions/runs/44903295524/artifacts/14706404309", + "archived_json_sha256": "8b28912df718694c1e3978fc8520d270ed3f1b5a845d5ad2430735598c40249d", + "zip_sha256": "ea433bec65b2f0e4d9e484857ed2108db5e9c13191c408cd6f50d9c91c1c72cf", + "source_blobs": { + "SizeWindows": "a3ece4b4aea97a95ba2977fa9e8d437e72677774", + "SizesAt_PlacesAt": "7746e5a5affe67117d4ba907dbcd2788f539db6e", + "windows_LargeX_smallCosts": "1c1495ef81c77fa96f3c1a70106c1da9e24c0c5d" + }, + "cases": [ + { + "epsilon": "1/64", + "x_log2": 16384, + "n_log2": 34816, + "k_log2": 76288, + "b_bits": 67589, + "theta_denominator_bits": 67588, + "SizesAt_PlacesAt_and_caps": "12/12", + "SizeWindows": "16/16", + "largeX_and_smallCosts_sufficient_tests": "11/11" + }, + { + "epsilon": "1/128", + "x_log2": 32768, + "n_log2": 67584, + "k_log2": 150016, + "b_bits": 133125, + "theta_denominator_bits": 133124, + "SizesAt_PlacesAt_and_caps": "12/12", + "SizeWindows": "16/16", + "largeX_and_smallCosts_sufficient_tests": "11/11" + } + ], + "negative_control": { + "epsilon": "1/64", + "x_log2": 1024, + "finding": "The shorter scale fails the sufficient 8*x^5 exponential comparison; this does not by itself refute LargeX" + }, + "proof_assumptions": [ + "For x=2^L, log(x+1) <= L+1 and log(2) <= 1", + "Monotonicity of exp converts the rational-exponent comparisons into sufficient LargeX bounds", + "Parameter values are chosen freely, not via the original structured Scale object", + "Source predicates are matched by pinned Git blobs; original unlicensed proof bodies are not redistributed" + ], + "limitations": [ + "The numerical checks are exact, but generic logarithmic lemmas were used as mathematical facts rather than independently formalized in Lean", + "Only two epsilon values were tested, with single x values each", + "These checks do not construct the original Scale, D7, FamP, adm5, adm6, adm7, GPsi, or theta/Galois data", + "The overall claimed RH proof has not been independently reconstructed here" + ] +} From 947089874a46f5a7cb12882a78435a98237a8654 Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Sat, 21 Nov 2026 22:04:18 +0800 Subject: [PATCH 5/6] fix(rh): elaborate finite Init arithmetic certificates after unfolding --- MathCan/RHWindowExponents.lean | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MathCan/RHWindowExponents.lean b/MathCan/RHWindowExponents.lean index bba122da..b3e43c06 100644 --- a/MathCan/RHWindowExponents.lean +++ b/MathCan/RHWindowExponents.lean @@ -68,10 +68,12 @@ def epsilon128 : DyadicLogPoint where theorem epsilon64_source_exponent_certificate : sourceExponentChecks epsilon64 := by + unfold sourceExponentChecks epsilon64 decide theorem epsilon128_source_exponent_certificate : sourceExponentChecks epsilon128 := by + unfold sourceExponentChecks epsilon128 decide /-- Logarithmic core of the necessary group-order bound from a From 5273f78cb21cd0bcfe08ad4d586b73d5f3e11498 Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Sat, 21 Nov 2026 22:06:36 +0800 Subject: [PATCH 6/6] math(rh): prove source error coefficients; archive native rational receipts --- .github/workflows/rh-window-distillation.yml | 16 ++++++++++++++++ MathCan/RHWindowExponents.lean | 20 ++++++++++++++++++++ research/rh_proof_distillation/RESEARCH.md | 4 ++++ 3 files changed, 40 insertions(+) diff --git a/.github/workflows/rh-window-distillation.yml b/.github/workflows/rh-window-distillation.yml index bd59a5df..13243136 100644 --- a/.github/workflows/rh-window-distillation.yml +++ b/.github/workflows/rh-window-distillation.yml @@ -50,6 +50,22 @@ jobs: print(source_pin(Path("upstream"))) PY + - name: Export exact numerical mathematical receipts + run: | + mkdir -p rh-mathcan-receipts + python -m research.rh_proof_distillation.rh_window_feasibility \ + --source-root upstream \ + --output rh-mathcan-receipts/window-feasibility.json + python -m research.rh_proof_distillation.rh_joint_scalar_envelope \ + --source-root upstream \ + --output rh-mathcan-receipts/joint-scalar-envelope.json + - uses: actions/upload-artifact@v4 + if: always() + with: + name: rh-mathcan-exact-receipts + path: rh-mathcan-receipts/ + if-no-files-found: ignore + native-lean-kernel: runs-on: ubuntu-latest timeout-minutes: 45 diff --git a/MathCan/RHWindowExponents.lean b/MathCan/RHWindowExponents.lean index b3e43c06..6ba6305e 100644 --- a/MathCan/RHWindowExponents.lean +++ b/MathCan/RHWindowExponents.lean @@ -93,6 +93,26 @@ theorem quadratic_rank_of_source_family 2 * L ≤ nLog := by omega +/-- The four separate SZ error contributions combine to coefficient ten. +Every bound remains an explicit premise in this independent proof. -/ +theorem four_window_error_terms + (Q a b c d : Nat) + (h1 : a ≤ 2 * Q) (h2 : b ≤ 2 * Q) + (h3 : c ≤ 4 * Q) (h4 : d ≤ 2 * Q) : + a + b + c + d ≤ 10 * Q := by + omega + +/-- The additive 4X correction and 22Z principal error can be +absorbed into 26Z once X is bounded by Z. -/ +theorem normalized_character_error_26 + (G X Z : Nat) (hX : X ≤ Z) + (hG : G ≤ 4 * X + 22 * Z) : + G ≤ 26 * Z := by + omega + +#print axioms four_window_error_terms +#print axioms normalized_character_error_26 + #print axioms epsilon64_source_exponent_certificate #print axioms epsilon128_source_exponent_certificate #print axioms group_log_floor_of_depth_and_k_window diff --git a/research/rh_proof_distillation/RESEARCH.md b/research/rh_proof_distillation/RESEARCH.md index da0bb7f0..13f6b56c 100644 --- a/research/rh_proof_distillation/RESEARCH.md +++ b/research/rh_proof_distillation/RESEARCH.md @@ -87,3 +87,7 @@ hypotheses, especially the interaction of high b and low theta with the upper-bound constraints on aE and Err. Formalize the exponent identities that propagate through windows and smallCosts in a Lean library with matching proof obligations. Keep original source pins. + +## Native Lean error-budget lemmas + +The `MathCan/RHWindowExponents.lean` module additionally proves two conditional Nat arithmetic lemmas: aggregation of four upper error coefficients 2+2+4+2=10, and the final correction coefficient 4+22=26 when the smaller term is bounded by the main term. Their inputs remain explicit, so these do not replace the original real-variable analytic hypotheses.