This repository contains the computational tools for verifying the Riemann Hypothesis Short-Window Certificate with Explicit Constants. The code implements all numerical computations from the research paper, providing reproducible verification of key constants and bounds.
"Riemann zeta – short-window certificate with explicit constants" miruka 2025
Key components:
- C_right constant: Computing -ζ'(2)/ζ(2) via convergent prime series
- C_thin measurement: Thin-strip approximation constants with explicit bounds
- T0 threshold: Critical threshold for window certification
- Horizontal validation: Phase difference bounds on horizontal segments
The short-window method establishes that for T ≥ T₀:
|ΔJ_L - π·ΔI(T;h)| < π/2
where:
- Window height: h = c/log T
- Strip width: δ = κ/log T
- Threshold: log T₀ = (2c/π)(C_right + κ·C_thin*)
This ensures zero counting via the argument principle succeeds window by window.
- Python 3.8 or later
- Windows, macOS, or Linux
- Git (for cloning the repository)
-
Clone the repository
git clone https://github.com/specator-tlca/RH.git cd RH -
Create virtual environment
python -m venv .venv
-
Activate environment
- Windows (PowerShell):
.\.venv\Scripts\Activate.ps1 - Windows (CMD):
.\.venv\Scripts\activate.bat - Linux/macOS:
source .venv/bin/activate
- Windows (PowerShell):
-
Install dependencies
pip install -r requirements.txt
python run_all.pyThis executes the complete verification suite with optimized parameters and displays a summary report.
python src/compute_C_right.py --P 1000000
# High precision computation
python src/compute_C_right.py --P 10000000Options:
--P: Prime cutoff for truncated series (default: 2000000)
Output: Rigorous bounds [lower, upper] containing the true value
# Default parameters (c=0.25, κ=2.0, R0=0.125)
python src/measure_Cthin_star.py
# Optimized parameters (recommended)
python src/measure_Cthin_star.py --c 0.35 --kappa 0.8 --R0 0.10Options:
--c: Window scale parameter--kappa: Strip scale parameter--R0: Disc radius for truncation
Output: C_thin* value, margin analysis, and parameter recommendations
# Using default parameters
python src/threshold_T0.py
# Using optimized parameters
python src/threshold_T0.py --c 0.35 --kappa 0.8 --R0 0.10Output: log T₀, T₀ value, and safety factor relative to T*
python src/validate_horizontals.py --c 0.35 --kappa 0.8Output: Bound verification and margin relative to π/2
Find optimal trade-offs between safety margin and threshold height:
# Analyze current vs optimized parameters
python src/optimize.py --analyze
# Grid search with minimum margin constraint
python src/optimize.py --grid-search --min-margin 30
# Test specific parameter set
python src/optimize.py --test 0.35 0.8 0.10Display summary of latest computation results:
python view_results.pyRH/
├── data/ # Computational results
│ └── C_thin_hat_demo.csv # Thin-strip measurements
├── logs/ # Execution logs with timestamps
│ ├── compute_C_right_*.txt
│ ├── measure_Cthin_star_*.txt
│ ├── threshold_T0_*.txt
│ └── validate_horizontals_*.txt
└── src/ # Source code
├── compute_C_right.py
├── measure_Cthin_star.py
├── threshold_T0.py
├── validate_horizontals.py
└── optimize.py
$ python run_all.py
Running all scripts with optimized parameters...
============================================================
[1/4] Running compute_C_right.py...
[2/4] Running measure_Cthin_star.py...
[3/4] Running threshold_T0.py...
[4/4] Running validate_horizontals.py...
SUMMARY
============================================================
compute_C_right OK
measure_Cthin_star OK
threshold_T0 OK
validate_horizontals OK
Key results:
- C_right in [0.569959993, 0.569979747]
- Margin: 44.5% (Status: OK)
- log T0 = 3.90, T0 = 4.94e+01
- Safety factor: 4.85e+10$ python src/compute_C_right.py --P 10000000
Computing C_right = -ζ'(2)/ζ(2) via convergent prime series...
Using primes up to P = 10000000
Found 664579 primes
Results:
--------
S(P) = 0.5699608571221895
Tail bound: [1.932701e-06, 1.934634e-06]
C_right in [0.569960857, 0.569962790]
Interval width = 1.932701e-06
Verification:
[OK] Theoretical value 0.569961813610 is within bounds$ python src/optimize.py --analyze
Parameter Analysis
==================
Original Optimized
Parameter Value Value
---------- -------- ---------
c 0.250 0.350
κ 2.000 0.800
R0 0.125 0.100
Results Comparison
==================
Metric Original Optimized
---------- -------- ---------
C_thin* 18.667 6.550
Margin -7.0% 44.5%
log T0 6.03 3.90
T0 4.13e+02 4.94e+01
Status FAIL OK
RECOMMENDATION: Use optimized parameters for positive safety margin- c = 0.35 (window scale)
- κ = 0.8 (strip scale)
- R₀ = 0.10 (disc radius)
- c₁ = 2/3 (inner cut)
- T* = 2.4 × 10¹²
- C_right = -ζ'(2)/ζ(2) ≈ 0.569961813610
- C_thin*(1/8) ≤ 56/3 (theoretical)
- C_thin*(0.10) ≤ 6.550 (optimized)
- α*(R₀) ≤ 27/164 + R₀ (boundary growth slope)
- log T₀ ≈ 3.90 (optimized)
- T₀ ≈ 49.4
- Safety factor: T*/T₀ > 10¹⁰
- mpmath: Arbitrary precision arithmetic for rigorous bounds
- numpy: Numerical computations and array operations
- matplotlib: Visualization capabilities (future enhancement)
- Interval arithmetic: All bounds are rigorous with controlled rounding
- Tail bounds: Explicit estimates for series truncation errors
- Parameter validation: Automatic checking of mathematical constraints
-
"Module not found" errors
- Ensure virtual environment is activated
- Run
pip install -r requirements.txtagain
-
PowerShell execution policy (Windows)
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
-
Memory issues for large P
- Start with smaller values (P = 100000)
- Close other applications
- Consider using a machine with more RAM
-
Negative margin warning
- Use optimized parameters:
--c 0.35 --kappa 0.8 --R0 0.10 - Run
python src/optimize.pyto find suitable parameters
- Use optimized parameters:
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes with clear commit messages
- Submit a pull request with description of changes
If you use this code in your research, please cite:
RH - Short-Window Certificate with Explicit Constants
miruka, August 2025
GitHub: https://github.com/specator-tlca/RN