Reproducibility code for “Character-Twisted Reflection in Even-Rank Fibonacci Blocks” — index-dependent weighted reflection with a surviving midpoint fixed point.
This repository provides reproducibility materials, exact-arithmetic finite-range tests, provenance records, and frozen computational artifacts supporting the accompanying manuscript.
Majid Ghandali · Independent Researcher · 2026
Reproducibility release status: pending first tagged archival release.
Inherited frozen-core DOI: 10.5281/zenodo.21431565
This DOI identifies the inherited Paper 5 frozen core only; it is not the DOI of this repository.
The accompanying manuscript proves the reflection-selection identities. This repository provides the implementation, exact-arithmetic finite-range tests, official run records, and provenance materials supporting the reported computational results.
graph LR
A["Manuscript<br/>Theorems and proofs"] --> B["Frozen core<br/>Inherited dependency"]
B --> C["Rank-block implementation"]
C --> D["Strict finite computation"]
D --> E["Records, manifests,<br/>and reproducibility artifacts"]
Important
The mathematical results are proved independently in the accompanying manuscript. The computations in this repository test the implementation and the stated identities over a finite range; they do not replace the proofs.
| Item | Value |
|---|---|
| Mathematics | Fibonacci character sums in even-rank blocks |
| Arithmetic | Exact modular and integer arithmetic in mathematical kernels |
| Theoretical proofs | Accompanying manuscript |
| Computational role | Finite-range implementation tests and reproducibility audit |
| Frozen core | Fibchar_v1-0-1.py |
| Official sample size | 72,906 primes |
| Official configuration | 14 workers; strict mode; sharded incremental checkpointing |
The official finite computational predicate is:
p != 2, 5
alpha(p) is even
alpha(p) != p - 1
| Action | Link |
|---|---|
| ▶ Run a reproduction | Quick Start |
| 📊 Inspect official outputs | Outputs |
| 🔒 Verify frozen-core provenance | Frozen Core |
| 🧾 Inspect S3.1 scope reconciliation | Scope Reconciliation |
| 📚 Citation information | Citation After Archival Release |
- Quick Start
- Main Structural Result
- Abstract
- Mathematical Scope
- Theoretical Identities Tested
- Verification Pipeline
- Design Principles
- Installation
- Usage
- Official Run Configuration
- Key Results
- Scope Reconciliation (S3.1)
- Outputs
- Repository Structure
- Frozen Core
- Provenance
- Hash Verification
- Important Distinctions
- Reproducibility Policy
- Citation After Archival Release
- Contributing
- License
- Author
From the repository root:
python -m venv .venv
source .venv/bin/activate
# Windows PowerShell: .venv\Scripts\Activate.ps1
pip install -r code/requirements.txt
cd code
python Run_Reflection_Selection_Mechanism.py \
--N 2000000 \
--workers 14 \
--strict \
--fresh \
--out-dir ../reproduced-runA successful reproduction creates:
reproduced-run/
├── data/
├── reports/
└── provenance/
The official finite sample is selected by:
p != 2, 5
alpha(p) is even
alpha(p) != p - 1
Note
Public clone instructions will be added after the GitHub repository is created and its canonical URL is verified.
Note
Before the first tagged archival release, this command reproduces the current source tree rather than a permanently versioned public release. After the first release is tagged, check out that tag before installation and execution.
Runtime note. On the recorded official configuration—14 workers, strict mode, and sharded incremental checkpointing—the rank-block phase completed in approximately 23 minutes. Runtime varies with hardware, operating system, available memory, storage performance, and process scheduling.
Let p != 2, 5 be a prime with even rank of apparition:
alpha(p) = 2h
Let s_p denote the rank scalar, and define:
epsilon_p(n) = chi_p((-1)^(n+1)) * chi_p(s_p)
Define the selected lower-half index set:
R_p = { n in {1, ..., h-1} : epsilon_p(n) = 1 }
Then the accompanying manuscript proves:
T_alpha(p) = 2 * sum_{n in R_p} chi_p(F_n) + chi_p(F_h)
The formula expresses the rank-block character sum through selected lower-half representatives together with the unique midpoint contribution.
The manuscript also gives an explicit three-regime classification of the index set R_p, depending on p mod 4 and the parity of h.
For complete definitions, hypotheses, proofs, and bibliographic context, consult the accompanying manuscript.
Let p != 2, 5 be a prime, and let alpha(p) denote the rank of apparition of p in the Fibonacci sequence. The accompanying manuscript studies the even-rank setting:
alpha(p) = 2h
where the rank reflection
n -> alpha(p) - n
has a unique midpoint fixed point h.
A weighted character-reflection identity, whose reflection sign is determined by the rank scalar together with the parity of the index, yields a fixed-point-corrected decomposition of the rank-block character sum into selected lower-half pairs and a midpoint term.
This repository provides reproducible finite exact-arithmetic tests of the stated identities over the official finite computational sample of 72,906 primes through 2,000,000 satisfying:
p != 2, 5
alpha(p) is even
alpha(p) != p - 1
The repository contains the implementation, validation pipeline, provenance artifacts, and reproducibility materials used for the reported finite computations.
The manuscript develops its results under the even-rank hypothesis:
p != 2, 5
alpha(p) is even
The official finite computational sample is narrower:
p <= 2,000,000
p != 2, 5
alpha(p) is even
alpha(p) != p - 1
The repository does not introduce new mathematical theorems. It does not attempt to prove:
- the even-rank theorems;
- odd-rank reflection theory;
- results in the previously studied regime
alpha(p) = p - 1.
The frozen core includes inherited functionality required by the implementation, but this repository is concerned only with the finite computations reported for the reflection-selection mechanism.
The repository records finite exact-arithmetic tests of identities proved independently in the accompanying manuscript.
| Manuscript result | Ambient object | Tested identity |
|---|---|---|
| Corollary 3.3 | F_p (field) |
Determinant constraint for the rank scalar |
| Lemma 3.4 | F_p (field) |
Rank-reflection congruence |
| Theorem 4.1 | character values on I_alpha |
Weighted character-reflection identity |
| Theorem 5.4 | Z (integers) |
Fixed-point-corrected rank-block decomposition |
The corresponding identities are:
s_p^2 = (-1)^alpha (in the field F_p)
F_{alpha-n} = (-1)^(n+1) * s_p * F_n (mod p)
f_p(rho_p(n)) = epsilon_p(n) * f_p(n)
T_alpha(p) = 2 * sum_{n in R_p} chi_p(F_n) + chi_p(F_h)
The distinct ambient objects are intentional:
- Corollary 3.3 and Lemma 3.4 are identities in the field
F_p; - Theorem 4.1 is an equality of quadratic-character values on the interior rank block
I_alpha; - Theorem 5.4 is an equality of ordinary integer character sums.
The accompanying manuscript contains the fully typeset mathematical statements, definitions, hypotheses, and proofs.
The computational workflow follows the logical structure of the manuscript. It documents finite exact-arithmetic tests only; it does not replace the mathematical proofs.
graph TD
A["Rank of apparition α(p)"] --> B["Scalar matrix collapse"]
B --> C["Determinant constraint for s_p"]
A --> D["Classical subtraction identity at the rank"]
D --> E["Rank-reflection congruence"]
E --> F["Weighted character-reflection identity"]
F --> G["Even-rank orbit structure and midpoint survival"]
G --> H["Fixed-point-corrected decomposition"]
H --> I["Three-regime sign classification"]
I --> J["Finite exact-arithmetic tests"]
The principal mathematical stages can also be displayed as:
A^alpha = s_p * I_2 (mod p)
s_p^2 = (-1)^alpha (in the field F_p)
F_{alpha-n} = (-1)^(n+1) * s_p * F_n (mod p)
f_p(rho_p(n)) = epsilon_p(n) * f_p(n)
T_alpha(p) = 2 * sum_{n in R_p} chi_p(F_n) + chi_p(F_h)
The official validation records document scalar, midpoint, selected-orbit reconstruction, independent rank-block sum, and strict lower-half pair checks. The manuscript supplies the independent proofs of the underlying identities.
-
Finite exact-arithmetic testing
The code tests the implementation and stated identities over a finite range. -
Frozen computational core
The inherited Paper 5 core module is used as an immutable dependency. -
Exact arithmetic in mathematical checks
The mathematical kernels use exact modular and integer arithmetic. -
Traceable provenance
Official run artifacts are associated with manifests, hashes, and documented execution parameters.
Requirements:
- a Python environment compatible with the pinned dependencies in
code/requirements.txt; - packages listed in
code/requirements.txt.
The recorded official run used Python 3.12.7.
The recorded official run used:
Python 3.12.7
NumPy 1.26.4
pandas 2.1.4
Numba 0.62.1
openpyxl 3.1.5
Install the pinned reproduction environment:
pip install -r code/requirements.txtNote
After the first tagged archival release, check out the corresponding tag before installation for exact correspondence with the archived source tree.
cd code
python Run_Reflection_Selection_Mechanism.py \
--N 2000000 \
--workers 14 \
--strict \
--fresh \
--out-dir ../reproduced-runcd code
python Run_Reflection_Selection_Mechanism.py \
--N 2000000 \
--workers 14 \
--strict \
--resume \
--out-dir ../reproduced-runcd code
python Run_Reflection_Selection_Mechanism.py \
--self-test \
--self-test-N 3000Driver : Run_Reflection_Selection_Mechanism.py
Driver version : v1-0-2
Frozen core : Fibchar_v1-0-1.py
Frozen token : v1-0-1
N_max : 2,000,000
Workers : 14
Strict mode : True
Checkpoint : sharded incremental
Arithmetic : exact arithmetic for mathematical checks
p != 2, 5
alpha(p) is even
alpha(p) != p - 1
The official finite sample contains 72,906 primes satisfying the selection predicate through 2,000,000.
Important
The theorem scope is broader than the official finite computational sample.
Theorem scope: p != 2, 5, and alpha(p) is even.
Official finite computational sample: p <= 2,000,000, p != 2, 5, alpha(p) is even, and alpha(p) != p - 1.
Official finite sample count : 72,906
Validation failures : 0
Observed pair-law mismatches : 0
Rank-block phase time : 1392.0058 s
Checkpoint overhead : 2.7015 s
For every prime in the official finite sample, the following checks passed:
- rank-scalar validation;
- midpoint reflection-sign validation;
- selected-orbit reconstruction;
- independent rank-block sum comparison;
- strict lower-half pair validation.
f_p(alpha - n) = epsilon_p(n) * f_p(n), 1 <= n < h
No pair-law mismatch was observed in this finite computation.
The official finite sample has the following finite-range classification:
72,906 = 29,358 + 43,548
| Class | Count | Criterion |
|---|---|---|
| Inert maximal-rank | 29,358 | Inert; rank equals p + 1 |
| Even non-maximal-rank | 43,548 | Even rank; rank is below the natural maximal-rank bound |
The exact criteria are:
Inert maximal-rank:
(5/p) = -1
alpha(p) = p + 1
Even non-maximal-rank:
alpha(p) is even
alpha(p) < p - (5/p)
pie title Official finite sample: 72,906 primes
"Inert maximal-rank" : 29358
"Even non-maximal-rank" : 43548
Note
This is a finite-range rank-classification reconciliation. It does not prove the classical rank-divisibility relation.
The source-verified reconciliation artifacts are retained within the official run package:
official-run/
├── reports/
│ ├── Reflection_Selection_Scope_Reconciliation_S3_1.json
│ ├── Reflection_Selection_Scope_Reconciliation_S3_1.md
│ └── SHA256_Scope_Reconciliation_S3_1.txt
└── provenance/
└── Scope_Reconciliation_S3_1_Provenance.json
| Directory | Content | Purpose |
|---|---|---|
official-run/data/ |
CSV records and summaries | Numerical evidence and validation records |
official-run/reports/ |
Logs, JSON reports, workbook, and S3.1 reports | Reader-facing inspection and execution documentation |
official-run/provenance/ |
Source, run, and hash manifests | Integrity and provenance information |
| File | Content |
|---|---|
Reflection_Selection_Summary.csv |
One-row official-run summary |
Fibonacci_Reflection_Selection_Prime_Records.csv |
Selected-orbit records for the full official finite sample |
Reflection_Selection_Pair_Validation_Records.csv |
Complete lower-half pair-validation records |
Reflection_Selection_Validation_Report.csv |
PASS/FAIL totals for validation columns |
Reflection_Selection_Regime_Summary.csv |
Statistics by residue/sign regime |
Reflection_Selection_Mechanism_Summary.csv |
Cancellation, reinforcement, and mismatch totals |
Reflection_Selection_Signature_Summary.csv |
Statistics by arithmetic signature |
Reflection_Selection_Backend_Summary.csv |
Rank-analysis backend usage |
Reflection_Selection_Performance_Ledger.csv |
Checkpoint and performance record |
Reflection_Selection_Run_Log.csv |
ANSI-sanitized tabular execution log |
| File | Content |
|---|---|
Reflection_Selection_Summary.json |
Comprehensive official-run summary |
Reflection_Selection_Run_Metadata.json |
Official-run configuration |
Reflection_Selection_Statistics.xlsx |
Reader-facing workbook |
Reflection_Selection_Run_Log.txt |
Raw terminal execution transcript |
Reflection_Selection_Scope_Reconciliation_S3_1.md |
Human-readable S3.1 scope clarification |
Reflection_Selection_Scope_Reconciliation_S3_1.json |
Machine-readable S3.1 scope clarification |
fibonacci-even-rank-reflection-selection/
├── code/
│ ├── Fibchar_v1-0-1.py
│ ├── Reflection_Selection_Adapter.py
│ ├── Reflection_Selection_Certificate.py
│ ├── Reflection_Selection_Selected_Orbits.py
│ ├── Reflection_Selection_Pair_Validator.py
│ ├── Run_Reflection_Selection_Mechanism.py
│ └── requirements.txt
│
├── official-run/
│ ├── data/
│ ├── reports/
│ └── provenance/
│
├── tools/
│ ├── Create_S3_1_Scope_Reconciliation_Artifacts.py
│ └── Finalize_S3_1_Reconciliation_Hash_Closure.py
│
├── README.md
└── LICENSE
Planned release files (not yet present). The following are generated only when the public release tree is frozen and are therefore not part of the current tree:
CITATION.cff (deferred until archival metadata is finalized)
RELEASE_MANIFEST.json (generated at release freeze)
SHA256SUMS.txt (package-level; generated at release freeze)
| File | Role |
|---|---|
code/Run_Reflection_Selection_Mechanism.py |
Main execution driver |
code/Reflection_Selection_Adapter.py |
Frozen-core seam and rank-block analysis |
code/Reflection_Selection_Certificate.py |
Shared exact character certificate |
code/Reflection_Selection_Selected_Orbits.py |
Selected-orbit reconstruction |
code/Reflection_Selection_Pair_Validator.py |
Strict lower-half pair validation |
code/Fibchar_v1-0-1.py |
Immutable frozen core |
The immutable core module Fibchar_v1-0-1.py is inherited from the earlier Fibonacci character-sum implementation associated with the previously studied regime alpha(p) = p - 1.
File : Fibchar_v1-0-1.py
Token : v1-0-1
SHA-256 : a0a523f97e9ed3747ce7856e469a3c641b8de0600d2e8ea966d805c465f03a91
DOI : 10.5281/zenodo.21431565
Important
The DOI above identifies the inherited Paper 5 frozen-core archive only. It does not identify this repository or its official run artifacts.
The official run package includes:
| File | Purpose |
|---|---|
Code_Manifest.json |
Paths and SHA-256 hashes of active source files |
Run_Manifest.txt |
Human-readable execution summary |
SHA256_Manifest.txt |
Hashes of source files and generated artifacts |
Scope_Reconciliation_S3_1_Provenance.json |
Additive provenance record for S3.1 scope reconciliation |
The official numerical records and primary run manifests are retained. The S3.1 reconciliation is an additive, source-verified clarification of the finite computational sample.
The official run package contains its own source and artifact manifests:
official-run/provenance/SHA256_Manifest.txt
official-run/reports/SHA256_Scope_Reconciliation_S3_1.txt
The S3.1 reconciliation hash closure independently verifies:
Reflection_Selection_Scope_Reconciliation_S3_1.json
Reflection_Selection_Scope_Reconciliation_S3_1.md
Scope_Reconciliation_S3_1_Provenance.json
A package-level SHA256SUMS.txt will be generated after the public release tree is frozen.
Important
These distinctions govern interpretation and citation.
-
Proofs versus computational tests
The accompanying manuscript proves the mathematical results independently. This repository supplies finite exact-arithmetic tests and reproducibility materials. -
Inherited Paper 5 DOI versus repository DOI
The DOI10.5281/zenodo.21431565identifies only the inherited frozen-core archive. A separate DOI may be assigned to this repository after its first archival release. -
Theorem scope versus official finite computational sample
The manuscript works under the even-rank hypothesis. The official finite computation additionally imposesalpha(p) != p - 1and the boundp <= 2,000,000. -
Scope reconciliation versus rank-divisibility proof
The equality72,906 = 29,358 + 43,548is a finite-range classification reconciliation only. It does not prove the classical rank-divisibility relation.
-
Completed run versus checkpoint files
The.checkpoint/directory is absent after a successful completed run. This is expected cleanup behavior, not a missing reproducibility artifact.
Every numerical claim reported for the official finite computation can be inspected through the included records, validation reports, logs, manifests, and hashes.
The accompanying manuscript remains the authoritative source for theorem statements, hypotheses, proofs, and mathematical interpretation.
Citation metadata for this repository will be added after the first tagged archival release. Until then, cite the accompanying manuscript using its final public bibliographic metadata when available.
After archival release, this repository should include:
CITATION.cff
archival DOI
release tag
final BibTeX citation
package-level SHA256SUMS.txt
- Report reproducibility discrepancies through the repository issue tracker.
- The frozen core
Fibchar_v1-0-1.pyis immutable and must not be modified. - Pull requests that alter the frozen core, change the official selection predicate, or introduce floating-point arithmetic into mathematical kernels will be declined.
- For substantial changes, open an issue first.
This project is licensed under the MIT License.
Majid Ghandali
Independent Researcher
ORCID: 0009-0001-1097-1770