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/rhd03-main-proof.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: RHD-03 actual Main source and literature interface

on:
push:
paths:
- 'MathCan/RHMainLogic.lean'
- 'MathCan.lean'
- 'research/rh_proof_distillation/main_character_dependency_audit.py'
- 'tests/test_rhd03_main_source.py'
- 'research/rh_proof_distillation/MAIN_PROOF_SOURCE.md'
- '.github/workflows/rhd03-main-proof.yml'
pull_request:
paths:
- 'MathCan/RHMainLogic.lean'
- 'MathCan.lean'
- 'research/rh_proof_distillation/main_character_dependency_audit.py'
- 'tests/test_rhd03_main_source.py'
- 'research/rh_proof_distillation/MAIN_PROOF_SOURCE.md'
- '.github/workflows/rhd03-main-proof.yml'
workflow_dispatch:

permissions:
contents: read

jobs:
main-source-audit:
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: actions/checkout@v4
with:
path: mathcan
persist-credentials: false
- 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/Main.lean
src/Supplements/Kernels/MainTheorems.lean
src/Development/AutomorphicArithmetic/CharacterBoxes/MainConclusion.lean
src/Development/AutomorphicArithmetic/Foundations/GaloisRepresentations/IntegralStructures/RowSrc.lean
src/Development/AutomorphicArithmetic/AutomorphicVarieties/ModularityArgument/ThresholdArguments/DenseThresholdCases/VwinOfRow.lean
src/Development/AutomorphicArithmetic/ThetaCorrespondence/ThetaPairLifts/ThirdPlaceSeries/EveryCharacterOfLiteratureOfVWin.lean
src/Formalism/GammaFactorNonvanishing/CritLine.lean
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Run source-census mutation tests
working-directory: mathcan
run: python -m unittest tests.test_rhd03_main_source -v
- name: Pinned Main route and 195-wrapper source call graph
working-directory: mathcan
run: |
mkdir -p rhd03
python -m research.rh_proof_distillation.main_character_dependency_audit \
--source-root ../upstream \
--output rhd03/main-actual-source-graph.json
- uses: actions/upload-artifact@v4
if: always()
with:
name: rhd03-pinned-main-source-graph
path: mathcan/rhd03/
if-no-files-found: ignore

lean-source-logic:
runs-on: ubuntu-latest
timeout-minutes: 40
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: Axiom inventory for independent source-interface proofs
shell: bash
run: |
set -euo pipefail
lake env lean MathCan/RHMainLogic.lean | tee rhd03-axioms.txt
if grep -Eq 'sorryAx|ofReduceBool|^error:|admit' rhd03-axioms.txt; then
exit 1
fi
- uses: actions/upload-artifact@v4
if: always()
with:
name: rhd03-source-interface-axioms
path: rhd03-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 @@ -149,3 +149,4 @@ import MathCan.NOR45AuthorizedProgram
import MathCan.NOR46ExactIntegerTrace
import MathCan.RHWindowExponents
import MathCan.RHFamilyWitnesses
import MathCan.RHMainLogic
64 changes: 64 additions & 0 deletions MathCan/RHMainLogic.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import Init

/-!
# RHD-03: direct logical interface of the Main -> EveryCharacter -> RH route.

The published source's OpenLiteratureStatements has two fields of the
same Row proposition, and a third RecTExists field. We formalize its
exact propositional structure in Init without importing original
Mathlib proofs or identifying the mathematical Row and RecTExists types
with these abstract parameters.
-/

namespace MathCan.RHMainLogic

/-- Two copies of Row and one RecTExists proof, matching the source
interface's three fields at the level of propositions. -/
structure OpenLiteratureProxy (Row RecTExists : Prop) : Prop where
caraianiLocalGlobalDual : Row
localLanglandsExists : RecTExists
galoisRepOfPolarizedPairLit : Row

/-- The duplicated Row interface is equivalent to exactly one Row
proposition together with the RecTExists proposition. -/
theorem open_literature_is_row_and_recT
(Row RecTExists : Prop) :
OpenLiteratureProxy Row RecTExists ↔ Row ∧ RecTExists := by
constructor
· intro h
exact ⟨h.caraianiLocalGlobalDual, h.localLanglandsExists⟩
· rintro ⟨hRow, hRec⟩
exact ⟨hRow, hRec, hRow⟩

/-- Constructing a second Row field from the first is proof duplication
in the interface; both fields have precisely the same proposition. -/
theorem row_proof_reused
{Row RecTExists : Prop} (hRow : Row) (hRec : RecTExists) :
OpenLiteratureProxy Row RecTExists :=
⟨hRow, hRec, hRow⟩

/-- Purely structural abstract form of the source's final route.
The substantive published results remain explicit arguments. -/
theorem final_rh_route_from_supplied_mathematical_bridges
{Row RecTExists VWin EveryCharacter RH : Prop}
(hRow : Row) (hRec : RecTExists)
(windowOfRow : Row → VWin)
(everyCharacterOfLiterature : OpenLiteratureProxy Row RecTExists → VWin → EveryCharacter)
(rhOfEvery : EveryCharacter → RH) : RH :=
rhOfEvery (everyCharacterOfLiterature
(row_proof_reused hRow hRec) (windowOfRow hRow))

/-- A formal literature theorem whose proof is supplied independently
can be presented with an unused O parameter. This explains the
distinction between lexical O usage and semantic dependence. -/
theorem independent_theorem_with_literature_parameter
{Row RecTExists P : Prop}
(p : P) (O : OpenLiteratureProxy Row RecTExists) : P :=
p

#print axioms open_literature_is_row_and_recT
#print axioms row_proof_reused
#print axioms final_rh_route_from_supplied_mathematical_bridges
#print axioms independent_theorem_with_literature_parameter

end MathCan.RHMainLogic
76 changes: 76 additions & 0 deletions research/rh_proof_distillation/MAIN_PROOF_SOURCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# RHD-03 | Actual Main proof route and OpenLiteratureStatements

Source pin: `leanprover-community/riemann-hypothesis` commit
`f150e02623b1e2bbe1f1da8eab5ffee5e930a6a3`. This is a
source-text dependency audit; mathematical and kernel verification of
the full claimed RH proof remain separate.

## Which RH route is used by Main?

The original [`src/Main.lean`](https://github.com/leanprover-community/riemann-hypothesis/blob/f150e02623b1e2bbe1f1da8eab5ffee5e930a6a3/src/Main.lean)
states `riemannHypothesis := rhOfAll`. The theorem
`rhOfAll` in `src/Supplements/Kernels/MainTheorems.lean` calls
`Formalism.VW.rh_of_every allChi`. Here `allChi` is supplied by
`UpperTheory.FinalTheorems.everyCharacter`.

The final-character theorem in
`src/Development/AutomorphicArithmetic/CharacterBoxes/MainConclusion.lean`
constructs `everyCharacter_of_row` from an integral Galois row
and an automorphic window. The literature theorem applies
`every_character_of_theta_integrals_local_matching`, a
`topCovolSlim2_use_alt_alt` covolume bound, and
`local_langlands_gl_recT_exists_of_literature`.

This identifies the direct theorem route relevant to the actual
statement in Main. The conditional family theorem `rh_of` in the
`ZetaZeroFreeRegion` formalism is a separate source route. The
source audit does not establish whether it is present among the
original Main proof's transitive imported artifacts.

## The published OpenLiteratureStatements interface

The source defines three fields:

- `caraianiLocalGlobalDual : UpperTheory.One.M.Row`
- `localLanglandsExists : UpperTheory.Zero.LLC.RecTExists`
- `galoisRepOfPolarizedPairLit : UpperTheory.One.M.Row`

At the proposition level this is equivalent to a single `Row`
witness and a `RecTExists` witness. The result is proved in
`MathCan/RHMainLogic.lean` under Lean 4.35 with Init.

## Wrapper census from source bodies

The pinned literature source contains 195 theorem wrappers taking
an explicit `O : OpenLiteratureStatements` parameter. A lexical
source scan finds no occurrence of the identifier `O` in 152 of
their displayed theorem-value bodies; 43 do mention `O`.
Four wrapper bodies directly select one of the three O fields
(two the same Row type, one local Langlands field).

A graph of *named wrapper-to-wrapper calls in the source bodies*
has 311 observed edges and visits all 195 wrappers when traversed
from `every_character_of_literature_of_vWin`. These are
source-text observations under the pinned Git blob identity.

The unused-parameter count does not establish that the theorem is
mathematically vacuous or that a Lean proof is invalid. A wrapper can
have an explicitly present but unused parameter because its conclusion
has been established elsewhere. For full kernel semantics we would
need to inspect the elaborated proof terms, their axioms and the
construction of the imported theorem constants.

## Where further mathematical effort belongs

Directly audit `galoisRepresentations_of_thetaLift tLiftK`,
`automorphic_window_of_inputs`, the local Langlands witness, and
the covolume bound that feeds the final every-character theorem.
Preserve the distinction between independently established input
lemmas, copied proof parameters, imported compiled artifacts, and
unverified mathematical premises.

## Reproduced source graph

The [pinned CI run](https://github.com/patrickdugan/MathCan/actions/runs/44915161411) passed four source-audit mutation tests and four native Init Lean proofs. The uploaded [original JSON graph](https://github.com/patrickdugan/MathCan/actions/runs/44915161411/artifacts/14711581539) is SHA-256 `b00378b34fa738fd2eecd176dfb3fc9977ab02ad84e3eaacf56f8ada4804994f` (unzipped JSON bytes). The [compact receipt](main_source_census_receipt.json) retains the verified node/edge counts and four direct parameter-field consumers.

Direct `O` projections are found only in `literature_automorphy`, `carU_local_global_of_literature`, `pair_u_of_literature`, and `local_langlands_recT_exists_of_literature`. This statement concerns the 195 wrapper theorem values within the exact archived source file. Indirect dependencies through other wrapper constants and external imported theorems require separate examination.
Loading
Loading