teal-sea / zeta-labstate of record · compiled 14 Aug 2026 · revision 9ebdea0 · source

Library · CONTEXT.md

CONTEXT.md — machine-readable index of this repository

16,759 words · 1,359 lines · source

Generated by scripts/make_context.py. Do not edit by hand — regenerate.

This file carries facts extracted from the source: the public API, the document index, the script index, test counts. Judgment — house rules, naming traps, derived conventions, honest-scope policy — lives in AGENTS.md and is written by hand. Read both.

What this repository is

A computational laboratory for the Riemann zeta function: an instrument for building intuition and verified numerics about the Riemann Hypothesis. It is not a proof attempt, and nothing computed here is evidence for RH (docs/08-why-it-is-hard.md). The organising chain:

theta is the heat kernel on a circle
      -> Poisson summation gives theta(1/x) = sqrt(x) theta(x)
      -> the Mellin transform gives xi(s) = xi(1-s)
      -> whose mirror axis is Re(s) = 1/2
      -> the explicit formula rebuilds primes from the zeros
      -> the same heat flow applied to Xi gives de Bruijn-Newman Lambda,
         where RH <=> Lambda = 0 and Lambda >= 0 is a theorem

Package API (zeta/)

zeta/core.py — Foundational special functions for the Riemann zeta laboratory.

1354 lines

Constants: DPS_DEFAULT, DATA_DIR, HEAT_DIFFUSIVITY

zeta/zeros.py — Locating and counting the non-trivial zeros of the Riemann zeta function.

796 lines

Constants: DATA_DIR, THETA_ARGMIN

zeta/explicit.py — zeta.explicit — the explicit formula: primes reconstructed from the zeros.

879 lines

Constants: LI2

zeta/statistics.py — Zero statistics of ζ(s) and the random-matrix (GUE) connection.

1131 lines

zeta/moments.py — External data and finite estimators for the moments programme.

1523 lines

Constants: ODLYZKO_TABLES

zeta/heatflow.py — Heat flow on the Riemann Ξ function and the de Bruijn–Newman constant.

1431 lines

Constants: DEFAULT_DPS, H0_RELATION, PHI_STRIP

zeta/weil.py — The Riemann–Weil explicit formula as a computable object, and Weil positivity.

970 lines

Constants: GAMMA1

zeta/epstein.py — The counterexample battery: Davenport-Heilbronn, gate #3 made computational.

1231 lines

Constants: KAPPA_REF, OFFLINE_ZERO_RE, OFFLINE_ZERO_IM

zeta/li.py — Li's criterion and Jensen polynomials — the real-rootedness lane.

1409 lines

Constants: DATA_DIR, GAMMA1, RADIUS_MAX, ZERO_DPS

zeta/finitefield.py — The blueprint universe: curves over finite fields, where RH is a THEOREM.

1295 lines

zeta/criteria.py — Four equivalence faces of the Riemann Hypothesis, made executable.

1625 lines

Constants: DATA_DIR, MERTENS_PINNED, BD_CONSTANT, ROBIN_THRESHOLD, ROBIN_EXCEPTIONS, ZETA_PRIME_ZEROS_PINNED

zeta/rigor.py — Certified computation: enclosures instead of estimates.

2004 lines

Constants: DATA_DIR, BACKEND, BACKEND_REASON

zeta/inverse.py — Inverse spectral theory: the Wu–Sprung potential, and what it cannot show.

472 lines

Constants: DATA_DIR, TWO_PI

zeta/quasicrystal.py — The zero measure as a crystalline (atomic) Fourier object — and the one

279 lines

Constants: PRIME_POWERS, COMPOSITES

zeta/factorization.py — Gate 4, made into a number: a decision statistic for the Euler product.

306 lines

Constants: DEFAULT_N_MAX, ZERO_THRESHOLD, KAPPA_REF

zeta/detector.py — Detecting off-line zeros without solving for them — the position-sensitive gate.

364 lines

Constants: DEFAULT_WIDTH, DEFAULT_N_MAX, DATA_DIR

zeta/leeyang.py — Newman's Lee–Yang program, made computational — and its battery verdict.

251 lines

Constants: DEFAULT_PROBES

zeta/relations.py — Integer-relation probes on the zero ordinates — the ℚ-independence face.

233 lines

zeta/synthesis.py — The prime signal as additive synthesis, and the power its partials carry.

181 lines

Constants: MEAN_POWER_CLOSED_FORM

zeta/plots.py — Publication-quality matplotlib figures for every part of the zeta laboratory.

1671 lines

zeta/adele.py — The Adele Ring and Ideles as Computational Objects.

213 lines

zeta/detectors.py — Detector strength: how large a violation of RH would have to be to be seen.

179 lines

zeta/spectral_gate.py — Falsifiers for a claimed spectral realisation of the Riemann zeros.

496 lines

Constants: STABILITY_TOLERANCE, TARGET_TOLERANCE, ABLATION_TOLERANCE, PERMUTATION_TOLERANCE, FIRST_ORDINATES, GROWTH_RATIO_TOLERANCE, COUNT_PREDICTION_TOLERANCE

zeta/surrogate.py — Null-model surrogates for the critical-line value distribution.

491 lines

Discovery layer API (ontology/) — the conjecture factory

A domain-agnostic pipeline that generates candidate observations from the laboratory's computed objects, screens them, and logs the whole funnel so the conversion rate per generator can be measured. schema, registry, ledger, funnel, metrics and historical_cases name no quantity the laboratory computes and import nothing from zeta — the seam is enforced by tests. knownness is the documented one-step-less-strict module (it knows general mathematics, not this subject). Everything that names the subject lives in ontology/domains/. Design and honest limits: ontology/README.md. Operator console: scripts/13_discovery_run.py. The ledger it writes (conjectures/) is gitignored: a private notebook of unreviewed leads, and nothing in it is evidence for anything. An empty conjectures/ in a fresh clone is that rule working, not a fault — scripts/ledger_sync.sh shares one ledger across machines through a separate private repo, never this tree.

ontology/schema.py — ontology.schema — the ontology of the discovery funnel.

1833 lines

Constants: SCHEMA_MAJOR, SCHEMA_MINOR, SCHEMA_VERSION, SCHEMA_HISTORY, DEFAULT_DEDUP_DIGITS, MIN_INDEX_SPAN, MIN_WINDOWS, MIN_WINDOW_POINTS, MIN_WITNESSES, MAX_ARGUMENT_CHARS, RELATION_OPS, LIMIT_POINTS, DIRECTIONS, PRECISION_KINDS, KIND_RULES, TERMINAL_STATUSES, REOPENABLE_STATUSES, REQUIRED_SURVIVAL_CHECKS

ontology/registry.py — ontology.registry — the plug-in seam.

499 lines

Constants: SCREEN_COSTS, KNOWN_CHECK

ontology/ledger.py — ontology.ledger — the append-only log the whole funnel is measured from.

389 lines

Constants: LOCKING, LEDGER_ENV_VAR, RUN_RECORD_TYPE, DEFAULT_LEDGER_DIR, DEFAULT_LEDGER_PATH

ontology/funnel.py — ontology.funnel — the pipeline, and the accounting that justifies it.

1117 lines

Constants: FUNNEL_VERSION, STAGES, VERDICT_DISPOSITIONS, FUNNEL_ONLY_DISPOSITIONS, DISPOSITIONS

ontology/metrics.py — ontology.metrics — conversion analytics over the ledger.

1144 lines

Constants: LITERATURE_STATUS_ORDER

ontology/knownness.py — ontology.knownness — the gate that catches the dominant outcome.

1751 lines

Constants: KNOWNNESS_VERSION, FLOAT64_DIGITS, DEFAULT_BASIS, DEFAULT_BASE_DIGITS, DEFAULT_ESCALATED_DIGITS, DEFAULT_GUARD_DIGITS, DEFAULT_MAX_TERMS, DEFAULT_MAXCOEFF, DEFAULT_MIN_SURPLUS_DIGITS, FACT_STATUSES, GENERAL_FACTS, KNOWN_FACTS, NOT_RECOGNISED_OFFLINE, FORBIDDEN_LABEL_WORDS, OFFLINE_BACKEND

ontology/historical_cases.py — ontology.historical_cases — the falsification test for the ontology itself.

745 lines

Constants: HISTORY_VERSION, MODES, IMPOSSIBLE_DISPOSITIONS, KILLING_DISPOSITIONS

ontology/01_f1_geometry.py — Discovery Lab 1: The F1 Geometry Engine

106 lines

ontology/02_acoustic_f1_matrix.py — Discovery Lab 2: The Acoustic Matrix of F1 (The Primordial Instrument)

96 lines

Constants: NOTE_NAMES

ontology/03_inverse_spectral_geometry.py — Discovery Lab 3: Inverse Spectral Geometry

87 lines

ontology/04_transcendental_matrix.py — Discovery Lab 4: The Transcendental Antisymmetric Matrix

69 lines

ontology/05_berry_keating_grid.py — Discovery Lab 5: The Berry-Keating Grid

89 lines

ontology/06_the_polya_hilbert_prototype.py — Discovery Lab 6: The Polya-Hilbert Prototype

79 lines

ontology/07_the_imposter_gauntlet.py — Discovery Lab 7: The Imposter Gauntlet

56 lines

ontology/08_riemann_beats_audio.py — Discovery Lab 8: The Acoustic Interference of the Riemann Zeros

56 lines

ontology/09_hermite_prime_waves.py — Discovery Lab 9: Hermite-Prime Wave Zero Detector

107 lines

ontology/10_geometric_dust_torus.py — Discovery Lab 10: Geometric Dust Torus (Symphony of Polygons)

116 lines

ontology/11_quantum_chaos_gue.py — Discovery Lab 11: Quantum Chaos & The Music of the Primes

87 lines

ontology/13_dirichlet_polya_hilbert.py — Discovery Lab 13: The Dirichlet Polya-Hilbert Operator

118 lines

ontology/14_hunting_ln2.py — Discovery Lab 14: Hunting Down the ln(2) Artifact

84 lines

ontology/15_fixing_the_density.py — Discovery Lab 15: Fixing the Density of States

72 lines

ontology/16_adelic_acoustic_absorber.py — Discovery Lab 16: The Adelic Acoustic Absorber

97 lines

ontology/scout.py — `ontology.scout` — the literature scout: passages, never verdicts.

308 lines

Constants: MAX_HITS_PER_CORPUS, DEFAULT_CORPORA

ontology/scout_online.py — `ontology.scout_online` — the scout's networked half: OEIS and arXiv.

345 lines

Constants: MIN_SEQUENCE_TERMS

ontology/domains/zeta_domain.py — ontology.domains.zeta_domain — the only module that knows what is studied.

3617 lines

Constants: DOMAIN_NAME, DOMAIN_VERSION, DEFAULT_DPS, DEFAULT_SEED, UNCERTAINTY_GUARD, GUARD_DIGITS, ROUTES, MERTENS_GRID, ZERO_HEIGHT_GRID, ZERO_SCAN_HEIGHT, PSLQ_BASIS, FINITE_FIELD_PRIMES, PREDICATE_TURAN, PREDICATE_FUNCTIONAL_EQUATION, PREDICATE_HASSE, RANGE_TOLERANCE, RANGE_RULES, TRIVIALITY_RULES, BATTERY_CLAIMS, ZETA_FACTS, FACT_REGISTRY, DOMAIN

ontology/domains/zeta_history.py — ontology.domains.zeta_history — settled claims, replayed against the funnel.

906 lines

Constants: GENERATOR, GENERATOR_VERSION, SEED, GUARD_DIGITS, GAUSS_WINDOWS, MONTGOMERY_N_ZEROS, MONTGOMERY_R_MAX, MONTGOMERY_BINS, MERTENS_LIMIT, MERTENS_CHECKPOINTS, MERTENS_CONTROLS, LI_N_MAX, LI_DPS, LI_CONTROL_ZERO, COINCIDENCE_DIGITS, COINCIDENCE_BASIS, HONEST_TWIN_DPS, HONEST_TWIN_UNCERTAINTY, HISTORICAL_CASES, REGISTERED

Falsification harness API (harness/) — the referee

The falsification protocol with the subject factored out. Four instrument roles — rivals (share the structure, lack the property), decoys (ablation), surrogates (null control) and lesions (detector power) — bundled into a Battery; a Department is a battery plus a door plus reference claims whose verdicts are known. The admission rule is no department without a battery: one with no rival, with neither decoy nor surrogate, or with no lesion is refused, because it could never fail. protocol.py is domain-agnostic under the same three seam tests as ontology/schema.py; the subject lives only in harness/departments/. tests/test_department_conformance.py is parametrized over the registered departments, so adding one adds its audit. Design: harness/README.md.

harness/protocol.py — `harness.protocol` — four instrument roles, one battery, one department.

923 lines

harness/demo.py — `python -m harness.demo` — the whole architecture, in one run.

174 lines

harness/graveyard.py — `harness.graveyard` — killed results as first-class records.

121 lines

harness/guards.py — `harness.guards` — detection power as a record, not a feeling.

152 lines

harness/independence.py — `harness.independence` — verification independence as declared structure.

228 lines

harness/integrity.py — `harness.integrity` — the referee, refereed.

1560 lines

Constants: PASS, FAIL, UNKNOWN, CALIBRATED, DETECTOR_INADEQUATE, UNMEASURED, CONTAMINATED, HOLLOW, GRADES, SHAM_MODES, AUDIT_BLIND_SPOTS

harness/new_department.py — `python -m harness.new_department <name>` — scaffold a department honestly.

215 lines

harness/preregistration.py — `harness.preregistration` — contamination as a derived fact, not a declaration.

328 lines

Constants: DIGEST_PREFIX, EVIDENCE_VISIBLE_AT_FREEZE, CRITERIA_DRIFT

harness/promotion.py — `harness.promotion` — the integrity grade made enforcing instead of advisory.

772 lines

Constants: ALLOW, BLOCK, POLICY_VERSION, NAIVE_POLICY_VERSION, REQUIRED_GRADE, REQUIRED_CLAIM_STATUS, CHECKS

harness/provenance.py — `harness.provenance` — independence and contamination as declared data.

178 lines

harness/review.py — `harness.review` — the standing adversarial review: two attacks per claim.

200 lines

Constants: WHITEBOX_CHECKLIST, THE_QUESTION

harness/shams.py — `harness.shams` — planted corruptions of batteries, for measuring the audit.

384 lines

harness/departments/compiler_department.py — `harness.departments.compiler_department` — department #3: LLVM IR rewrites.

398 lines

Constants: DEPARTMENT_NAME, DEPARTMENT_VERSION, FULL_DOMAIN, SURROGATE_SEEDS, TARGET, RIVALS, DECOYS, SURROGATES, LESIONS, DETECTORS, BATTERY, REFERENCE_CLAIMS, DEPARTMENT

harness/departments/croniter_department.py — Department #4: cron schedule semantics — the first foreign-domain subject.

534 lines

Constants: PROBES, DEFAULT_RAISE_EXPR, RANGE_EXPECTED, TARGET, RIVALS, LESIONS, DETECTORS, REFERENCE_CLAIMS, BATTERY, DEPARTMENT

harness/departments/finitefield_department.py — `harness.departments.finitefield_department` — department #2.

584 lines

Constants: DEPARTMENT_NAME, DEPARTMENT_VERSION, P, CURVE_A, CURVE_B, N_MAX, RIVAL_TRACES, LESION_TRACES, TARGET, RIVALS, DECOYS, SURROGATES, LESIONS, DETECTORS, BATTERY, REFERENCE_CLAIMS, DEPARTMENT

harness/departments/graveyard_ledger.py — The repository's graveyard — the opening graves, entered from the records.

74 lines

Constants: GRAVES

harness/departments/guard_ledger.py — The repository's guard ledger — the guard offensive's opening entries.

229 lines

Constants: GUARDS

harness/departments/referee_department.py — Department #5: the referee itself — batteries as subjects, audited like one.

689 lines

Constants: DEPARTMENT_NAME, DEPARTMENT_VERSION, SPECIMEN, TARGET, RIVALS, DECOYS, SURROGATE_SEEDS, SURROGATES, LESIONS, DETECTORS, BATTERY, REFERENCE_CLAIMS, DEPARTMENT

harness/departments/review_ledger.py — The repository's standing-review ledger — real claims, real attacks.

85 lines

Constants: CLAIMS, OUTCOMES

harness/departments/stateval_department.py — Department #6: statistical model evaluation — claims about distributions.

716 lines

Constants: DEPARTMENT_NAME, DEPARTMENT_VERSION, N_FEATURES, W_TRUE, NOISE_SCALE, N_ROWS, RIDGE_LAMBDA, FRESH_SEEDS, FRESH_MARGIN, LESION_FRACTIONS, TARGET, RIVALS, SURROGATES, CLEAN_PROTOCOL, LESIONS, GAP_THRESHOLD, DETECTORS, BATTERY, REFERENCE_CLAIMS, DEPARTMENT

harness/departments/zeta_department.py — `harness.departments.zeta_department` — department #1, and the reference wiring.

547 lines

Constants: DEPARTMENT_NAME, DEPARTMENT_VERSION, DPS, EPSTEIN_FORMS, LESION_HEIGHT, LESION_DELTAS, TARGET, RIVALS, DECOYS, SURROGATES, LESIONS, LI_PROJECTION_THRESHOLD, DETECTORS, BATTERY, REFERENCE_CLAIMS, DEPARTMENT, RIGOR_SHARED_LAYERS, RIGOR_SHARED_TAIL, RIGOR_BACKEND_PATHS

Research dossiers API (dossier/) — a probe, not a department

An experiment in representing mathematical research state — intent, definitions, provenance, evidence, failed attempts, proof obligations and verification status — so that an agent can resume rigorous work. One schema, one worked example, one CLI (scripts/50_dossier.py). Two ideas are under test: intent is data (what an object is for, stated before any formula, plus what it is most likely to be confused with), and "verified" is four independent things (numeric agreement, enclosure arithmetic, the published record, a proof kernel) which status.py refuses to collapse — Support.__bool__ raises rather than let a caller write if support:. Registered in no department and given no door, because a dossier has no rivals of its own: see docs/19-research-dossiers.md SS6. Design: dossier/README.md.

dossier/status.py — `dossier.status` — four kinds of support, kept apart on purpose.

227 lines

Constants: AXES

dossier/schema.py — `dossier.schema` — what an AI agent needs in order to resume rigorous work.

342 lines

Constants: SCHEMA_VERSION

dossier/report.py — `dossier.report` — the readable status report.

147 lines

dossier/subjects/hardy_z.py — The Hardy Z dossier — the one worked example.

443 lines

Constants: DOSSIER_NAME, SAMPLE_TS, DEFINITION_AGREEMENT_DEFECT

Documents (docs/)

Runnable demos (scripts/)

Tests (tests/)

1768 test functions across 68 files (the collected count differs where tests are parametrised):

.venv/bin/python -m pytest -q -m 'not slow'   # fast tier
.venv/bin/python -m pytest -q                 # everything

Ground truth for quick assertions

quantityvalue
ζ(2)π²/6 = 1.6449340668482264…
ζ(0), ζ(−1)−1/2, −1/12
γ₁, γ₂, γ₃14.134725141734694, 21.022039638771555, 25.010857580145689
N(100)29 zeros with 0 < γ < 100
Ξ(0)0.4971207781…
λ₁ (Li)1 + γ/2 − log(4π)/2 = 0.0230957089661…
Λ (de Bruijn–Newman)0 ≤ Λ < 0.2; RH ⟺ Λ = 0
θ(1/x) − √x·θ(x), ξ(s) − ξ(1−s)0 to working precision (~1e−30 at dps 30)

Identities are exposed as measured defect functions rather than assumed; mpmath's zetazero / siegelz / grampoint / nzeros and Arb are used as independent oracles against the hand-rolled machinery.