ramanujan-challenge/experiments/ramanujan_28/submission/run_checks.sh
allaun 477e8ddb77 fix(p28): clear all three open replay defects; clean release for submission
F1 run_checks.sh exited 1 on any machine WITH SageMath. set -euo pipefail made
the declared-optional cross-checks fatal, so the script passed without the
optional tooling and failed with it. Optional calls are now guarded by
run_optional(), failures are counted and reported non-fatally, and the script
ends exit 0 with a summary line.

F2 false assertion in p28_lattice_hypotheses_certificate.sage. Component 1 read
216 + 108x + 46x; b2 = (1,2,1,0) contributes 216x, so the true value is
216 + 216x + 46x. The load-bearing identity below it (Bcomb == 4x*Crow) was
always correct, so no mathematics changes.

F3 Sage 10.9 raised 'keys do not match self's parent' at the subs() call: q
lives in the fraction field K while .numerator()/.denominator() return elements
of the underlying polynomial ring. The substitution key is now coerced into the
polynomial parent. This error had been MASKING F2.

Verified after the fixes:
  run_checks.sh exit 0, 48 mandatory PASS (up from 43 -- the previously failing
  certificate now runs to completion), 0 optional failures
  falsifiability intact: 64R-44 -> 64R-43 exits 1, and 236337691420383 -> ...384
  exits 1
  pdflatex x3: 0 errors, 0 warnings, 0 undefined, 17 pages, 0 broken refs

Documentation: states plainly that no base is claimed superior to any other --
the non-injectivity holds for every b >= 2, [0,1] and [1] collide in decimal
exactly as in octal, and both repairs are stated for general b. Base 8 is only
the inherited worked example. Without this a reader could take the radix work
for a claim that base 8 beats base 10 or binary, which is not claimed anywhere.

Housekeeping: removes three Sage preparser .sage.py outputs that an earlier
'git add -A' in this branch had wrongly committed, and adds a .gitignore for
Sage and LaTeX build artifacts. Release zip and PDF rebuilt.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WY6SfRYvm8zFKMX9GcjS8u
2026-07-31 10:40:21 -05:00

82 lines
2.7 KiB
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")"
python3 certificates/p28_rank_ode_bound_verifier.py
python3 certificates/p28_convergence_constants.py
python3 certificates/p28_standalone_equations.py
python3 certificates/p28_dominant_product_algebra.py
python3 - <<'PY'
from pathlib import Path
forbidden = {
Path("solution.tex"): (
"Birkhoff",
"Poincar",
"standard ascension",
"analytic solution normalized at",
),
Path("certificates/p28_kernel_contiguity_certificate.sage"): ("quo_rem",),
Path("certificates/all_four_columns_certificate.sage"): (
"is_irreducible",
"gcd(",
),
}
for path, needles in forbidden.items():
text = path.read_text(encoding="utf-8")
for needle in needles:
if needle in text:
raise SystemExit(f"FAIL: forbidden proof shortcut {needle!r} in {path}")
print("PASS: no forbidden proof shortcuts in the mandatory path")
PY
echo "DIAGNOSTIC (not an all-N proof): finite Padé regression"
python3 certificates/p28_parametric_pade_probe.py
# ---------------------------------------------------------------------------
# OPTIONAL independent cross-checks.
#
# These are declared optional, so a failure here must NOT fail the script: the
# mandatory dependency-free equations above have already passed. Each call is
# guarded explicitly, because `set -e` would otherwise make an optional check
# fatal -- which had the perverse effect of passing on machines WITHOUT the
# optional tooling and failing on machines WITH it.
#
# Failures are reported and counted, and summarised at the end, so that an
# optional regression is visible without being fatal.
# ---------------------------------------------------------------------------
optional_failures=0
run_optional() {
echo "OPTIONAL: $*"
if "$@"; then
return 0
fi
echo "OPTIONAL FAILED (non-fatal): $*" >&2
optional_failures=$((optional_failures + 1))
return 0
}
if command -v wolframscript >/dev/null 2>&1; then
run_optional wolframscript -file certificates/p28_full_closure_certificate.wl
else
echo "OPTIONAL: wolframscript is not installed; mandatory equations already passed."
fi
if command -v sage >/dev/null 2>&1; then
run_optional sage certificates/p28_kernel_contiguity_certificate.sage
run_optional sage certificates/p28_lattice_hypotheses_certificate.sage
run_optional sage certificates/all_four_columns_certificate.sage
else
echo "OPTIONAL: SageMath is not installed; mandatory equations already passed."
fi
echo
if [ "$optional_failures" -eq 0 ]; then
echo "ALL MANDATORY CHECKS PASSED; optional cross-checks passed or were absent."
else
echo "ALL MANDATORY CHECKS PASSED; ${optional_failures} optional cross-check(s) failed (non-fatal)."
fi
exit 0