Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 95 additions & 0 deletions .github/workflows/rh-window-distillation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
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

- 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
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
1 change: 1 addition & 0 deletions MathCan.lean
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,4 @@ import MathCan.NOR43AuthenticatedRoot
import MathCan.NOR44SessionOrdering
import MathCan.NOR45AuthorizedProgram
import MathCan.NOR46ExactIntegerTrace
import MathCan.RHWindowExponents
121 changes: 121 additions & 0 deletions MathCan/RHWindowExponents.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
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
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
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

/-- 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
#print axioms quadratic_rank_of_source_family

end MathCan.RHWindowExponents
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
122 changes: 122 additions & 0 deletions research/rh_proof_distillation/CHCORE_MATH_REVIEW.md
Original file line number Diff line number Diff line change
@@ -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.
Loading
Loading