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
55 changes: 55 additions & 0 deletions .github/workflows/rhd02-family-source.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: RHD-02 source pin family quantifier audit

on:
pull_request:
paths:
- 'research/rh_proof_distillation/family_quantifier_source_audit.py'
- 'tests/test_rhd02_family_source.py'
- '.github/workflows/rhd02-family-source.yml'
push:
paths:
- 'research/rh_proof_distillation/family_quantifier_source_audit.py'
- 'tests/test_rhd02_family_source.py'
- '.github/workflows/rhd02-family-source.yml'
workflow_dispatch:

permissions:
contents: read

jobs:
source-quantifier-gates:
runs-on: ubuntu-latest
timeout-minutes: 20
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/Formalism/SharpRestriction/GlobalSchurBounds/ZetaZeroFreeRegion.lean
src/Formalism/SharpRestriction/GlobalSchurBounds/RamificationTwoAndConjugationAtQAndD.lean
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Mutation tests for source quantifier shapes
working-directory: mathcan
run: python -m unittest tests.test_rhd02_family_source -v
- name: Verify pinned source bytes and quantifier ordering
working-directory: mathcan
run: |
mkdir -p rhd02
python -m research.rh_proof_distillation.family_quantifier_source_audit \
--upstream ../upstream --output rhd02/family-quantifier-source-audit.json
- uses: actions/upload-artifact@v4
if: always()
with:
name: rhd02-family-quantifier-source-receipt
path: mathcan/rhd02/
if-no-files-found: ignore
48 changes: 48 additions & 0 deletions .github/workflows/rhd02-family-witnesses.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: RHD-02 family witness quantifier proofs

on:
push:
paths:
- 'MathCan/RHFamilyWitnesses.lean'
- 'MathCan.lean'
- 'research/rh_proof_distillation/FAMILY_WITNESS_QUANTIFIERS.md'
- '.github/workflows/rhd02-family-witnesses.yml'
pull_request:
paths:
- 'MathCan/RHFamilyWitnesses.lean'
- 'MathCan.lean'
- 'research/rh_proof_distillation/FAMILY_WITNESS_QUANTIFIERS.md'
- '.github/workflows/rhd02-family-witnesses.yml'
workflow_dispatch:

permissions:
contents: read

jobs:
family-quantifier-kernel:
runs-on: ubuntu-latest
timeout-minutes: 35
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: Audit the independent witness quantifier proofs and axioms
shell: bash
run: |
set -euo pipefail
lake env lean MathCan/RHFamilyWitnesses.lean | tee rh-family-witness-axioms.txt
if grep -Eq 'sorryAx|ofReduceBool|^error:|admit' rh-family-witness-axioms.txt; then
exit 1
fi
- uses: actions/upload-artifact@v4
if: always()
with:
name: rh-family-witness-axioms
path: rh-family-witness-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 @@ -148,3 +148,4 @@ import MathCan.NOR44SessionOrdering
import MathCan.NOR45AuthorizedProgram
import MathCan.NOR46ExactIntegerTrace
import MathCan.RHWindowExponents
import MathCan.RHFamilyWitnesses
246 changes: 246 additions & 0 deletions MathCan/RHFamilyWitnesses.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,246 @@
import Init

/-!
# RHD-02: family-witness quantifiers and cardinality floors

Pure logical and integer-arithmetic consequences of the hypothesis shape
in the Alpoge/Claude Dirichlet-GRH/RH Lean source.

Source:
leanprover-community/riemann-hypothesis
commit f150e02623b1e2bbe1f1da8eab5ffee5e930a6a3
Formalism/SharpRestriction/GlobalSchurBounds/ZetaZeroFreeRegion.lean
Formalism/SharpRestriction/GlobalSchurBounds/RamificationTwoAndConjugationAtQAndD.lean

No construction of D7, Scale, Gc, theta, adm5, adm6, or adm7 is asserted.
Time is abstracted to Nat so MathCan can use Lean 4.35 + Init.
-/

namespace MathCan.RHFamilyWitnesses

universe u

/-- A property holds uniformly for every member of the dependent family
after a *single* eventual threshold. -/
def EventuallyAll {Ix : Nat → Type u}
(P : (n : Nat) → Ix n → Prop) : Prop :=
∃ cutoff : Nat, ∀ n : Nat, cutoff ≤ n → ∀ i : Ix n, P n i

/-- There is a valid family index at each sufficiently large scale.
The index is allowed to vary with the scale. -/
def EventuallyExists {Ix : Nat → Type u}
(P : (n : Nat) → Ix n → Prop) : Prop :=
∃ cutoff : Nat, ∀ n : Nat, cutoff ≤ n → ∃ i : Ix n, P n i

/-- Uniform adm5, adm6 and size bounds can be combined with an eventual
adm7-selected index. This is the quantified combinatorial step in
proposition_eleven_two_along_family, abstracting away the analytic details. -/
theorem synchronized_family_witnesses
{Ix : Nat → Type u}
(P5 P6 PSize PTop : (n : Nat) → Ix n → Prop)
(h5 : EventuallyAll P5)
(h6 : EventuallyAll P6)
(hS : EventuallyAll PSize)
(hT : EventuallyExists PTop) :
EventuallyExists (fun n i => P5 n i ∧ P6 n i ∧
PSize n i ∧ PTop n i) := by
obtain ⟨b5, h5'⟩ := h5
obtain ⟨b6, h6'⟩ := h6
obtain ⟨bS, hS'⟩ := hS
obtain ⟨bT, hT'⟩ := hT
refine ⟨b5 + b6 + bS + bT, ?_⟩
intro n hn
have hn5 : b5 ≤ n := by omega
have hn6 : b6 ≤ n := by omega
have hnS : bS ≤ n := by omega
have hnT : bT ≤ n := by omega
obtain ⟨i, hTi⟩ := hT' n hnT
exact ⟨i, h5' n hn5 i, h6' n hn6 i, hS' n hnS i, hTi⟩


/-- An AllLargeC-style constant is chosen once (for a fixed epsilon),
before universally quantifying over later scales and family indices. -/
def EventuallyUniformConstant {Ix : Nat → Type u}
(P : Nat → (n : Nat) → Ix n → Prop) : Prop :=
∃ c cutoff : Nat, 0 < c ∧
∀ n : Nat, cutoff ≤ n → ∀ i : Ix n, P c n i

/-- An AllLargeAt-style existential has a single fixed coefficient,
while the suitable index itself may vary with scale. -/
def EventuallySelectedWithConstant {Ix : Nat → Type u}
(P : Nat → (n : Nat) → Ix n → Prop) : Prop :=
∃ C cutoff : Nat, 0 < C ∧
∀ n : Nat, cutoff ≤ n → ∃ i : Ix n, P C n i

/-- Source-faithful specialization of two uniform character-sum
coefficients to the same eventually selected adm7 index. Both positive
constants are fixed before n, as required by AllLargeC. -/
theorem uniform_character_constants_on_selected_index
{Ix : Nat → Type u}
(P5 P6 PTop : Nat → (n : Nat) → Ix n → Prop)
(PSize : (n : Nat) → Ix n → Prop)
(h5 : EventuallyUniformConstant P5)
(h6 : EventuallyUniformConstant P6)
(hS : EventuallyAll PSize)
(hT : EventuallySelectedWithConstant PTop) :
∃ c5 c6 C : Nat, 0 < c5 ∧ 0 < c6 ∧ 0 < C ∧
EventuallyExists (fun n i =>
P5 c5 n i ∧ P6 c6 n i ∧ PSize n i ∧ PTop C n i) := by
obtain ⟨c5, b5, hc5, h5'⟩ := h5
obtain ⟨c6, b6, hc6, h6'⟩ := h6
obtain ⟨bS, hS'⟩ := hS
obtain ⟨C, bT, hC, hT'⟩ := hT
refine ⟨c5, c6, C, hc5, hc6, hC, ?_⟩
exact synchronized_family_witnesses
(fun n i => P5 c5 n i)
(fun n i => P6 c6 n i)
PSize
(fun n i => PTop C n i)
⟨b5, h5'⟩ ⟨b6, h6'⟩ ⟨bS, hS'⟩ ⟨bT, hT'⟩


/-- A TOPF-like coefficient is chosen before epsilon. The universal
character bounds may choose distinct constants *after* epsilon.
This distinction survives eventual synchronization of the selected
index and the uniform-for-indices hypotheses. -/
theorem coefficient_fixed_across_epsilon
{Ix : Nat → Nat → Type u}
(P5 P6 PTop : Nat → (eps : Nat) → (n : Nat) → Ix eps n → Prop)
(PSize : (eps : Nat) → (n : Nat) → Ix eps n → Prop)
(h5 : ∀ eps : Nat, ∃ c5 : Nat, 0 < c5 ∧
EventuallyAll (fun n i => P5 c5 eps n i))
(h6 : ∀ eps : Nat, ∃ c6 : Nat, 0 < c6 ∧
EventuallyAll (fun n i => P6 c6 eps n i))
(hS : ∀ eps : Nat, EventuallyAll (PSize eps))
(hT : ∃ C : Nat, 0 < C ∧
∀ eps : Nat, EventuallyExists (fun n i => PTop C eps n i)) :
∃ C : Nat, 0 < C ∧
∀ eps : Nat, ∃ c5 c6 : Nat, 0 < c5 ∧ 0 < c6 ∧
EventuallyExists (fun n i =>
P5 c5 eps n i ∧ P6 c6 eps n i ∧
PSize eps n i ∧ PTop C eps n i) := by
obtain ⟨C, hC, hT'⟩ := hT
refine ⟨C, hC, ?_⟩
intro eps
obtain ⟨c5, hc5, h5'⟩ := h5 eps
obtain ⟨c6, hc6, h6'⟩ := h6 eps
refine ⟨c5, c6, hc5, hc6, ?_⟩
exact synchronized_family_witnesses
(fun n i => P5 c5 eps n i)
(fun n i => P6 c6 eps n i)
(PSize eps)
(fun n i => PTop C eps n i)
h5' h6' (hS eps) (hT' eps)

/-- At each sufficiently large scale, an adm7-like witness makes the
family index type inhabited. This rules out a globally empty family
whenever eventual existence has been established. -/
theorem eventual_selected_index_forces_nonempty
{Ix : Nat → Type u} (P : (n : Nat) → Ix n → Prop)
(h : EventuallyExists P) :
∃ cutoff : Nat, ∀ n : Nat, cutoff ≤ n → Nonempty (Ix n) := by
obtain ⟨cutoff, hcutoff⟩ := h
refine ⟨cutoff, ?_⟩
intro n hn
obtain ⟨i, _⟩ := hcutoff n hn
exact ⟨i⟩

/-- A universal bound alone is vacuous when its family has no indices. -/
theorem empty_index_family_satisfies_every_eventual_universal :
EventuallyAll (Ix := fun _ => Empty) (fun _ _ => False) := by
refine ⟨0, ?_⟩
intro n hn i
exact Empty.elim i

/-- The existential part of TOPF excludes that empty-index situation. -/
theorem empty_index_family_fails_eventual_existence :
¬ EventuallyExists (Ix := fun _ => Empty) (fun _ _ => True) := by
intro h
obtain ⟨cutoff, hcutoff⟩ := h
obtain ⟨i, _⟩ := hcutoff cutoff (Nat.le_refl cutoff)
exact Empty.elim i


/-- Availability of a family index at even stages. The original FamCore
only requires nonempty indices on an unbounded window set, so the
distinction between cofinal and eventual existence is material. -/
def intermittentAvailable (n : Nat) : Prop := n % 2 = 0

/-- An unbounded collection of nonempty stages need not contain every
sufficiently large stage. This is the exact logical gap between the
FamCore.Win_unb/Ix_win shape and the stronger TOPF existence requirement. -/
theorem cofinal_stages_do_not_force_eventual_availability :
(∀ cutoff : Nat, ∃ n : Nat,
cutoff ≤ n ∧ intermittentAvailable n) ∧
¬ (∃ cutoff : Nat, ∀ n : Nat,
cutoff ≤ n → intermittentAvailable n) := by
constructor
· intro cutoff
refine ⟨2 * cutoff, ?_, ?_⟩
· omega
· unfold intermittentAvailable
omega
· rintro ⟨cutoff, h⟩
have hodd := h (2 * cutoff + 1) (by omega)
unfold intermittentAvailable at hodd
omega

/-- There can be an appropriate family index for every scale while
no single index remains appropriate at every scale. -/
def alternatingIndexValid (n index : Nat) : Prop := index = n % 2

theorem selected_index_may_depend_on_scale :
∀ n : Nat, ∃ i : Nat, alternatingIndexValid n i := by
intro n
exact ⟨n % 2, rfl⟩

theorem alternating_selection_has_no_fixed_index :
¬ ∃ i : Nat, ∀ n : Nat, alternatingIndexValid n i := by
rintro ⟨i, h⟩
have h0 : i = 0 := by simpa [alternatingIndexValid] using h 0
have h1 : i = 1 := by simpa [alternatingIndexValid] using h 1
omega

/-- Scale-wise constants cannot in general be replaced by one
uniform constant that works at all scales. This records a critical
quantifier-order distinction in the upstream AllLargeC predicate. -/
theorem scale_dependent_constants_are_weaker_than_uniform :
(∀ n : Nat, ∃ C : Nat, n ≤ C) ∧
¬ (∃ C : Nat, ∀ n : Nat, n ≤ C) := by
constructor
· intro n
exact ⟨n, Nat.le_refl n⟩
· rintro ⟨C, h⟩
have hc := h (C + 1)
omega

/-- Source SizesAt n >= x^(2+31eps/4), combined with
PlacesAt TT >= n*x^(-eps/8)/2 and T2 >= n*x^(-eps),
forces very large selected subsets.

Write L=log₂x and q=eps*L, with all logarithms integral.
The premises are the denominator-cleared source inequalities.
The conclusions are lower bounds on 2-adic logarithms of
TT and T2 cardinalities, before any analytic witness is constructed. -/
theorem character_subsets_inherit_quadratic_scale
(L q nLog nTLog nT2Log : Nat)
(hRank : 8 * L + 31 * q ≤ 4 * nLog)
(hTT : 8 * nLog ≤ 8 * nTLog + q + 8)
(hT2 : nLog ≤ nT2Log + q) :
16 * L + 61 * q ≤ 8 * nTLog + 8 ∧
8 * L + 27 * q ≤ 4 * nT2Log := by
omega

#print axioms uniform_character_constants_on_selected_index
#print axioms coefficient_fixed_across_epsilon
#print axioms cofinal_stages_do_not_force_eventual_availability
#print axioms synchronized_family_witnesses
#print axioms eventual_selected_index_forces_nonempty
#print axioms empty_index_family_satisfies_every_eventual_universal
#print axioms empty_index_family_fails_eventual_existence
#print axioms selected_index_may_depend_on_scale
#print axioms alternating_selection_has_no_fixed_index
#print axioms scale_dependent_constants_are_weaker_than_uniform
#print axioms character_subsets_inherit_quadratic_scale

end MathCan.RHFamilyWitnesses
Loading
Loading