Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Character-Twisted Reflection in Even-Rank Fibonacci Blocks

License: MIT

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.


Why 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"]
Loading

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.


Repository at a Glance

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

Quick Navigation

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

Contents


Quick Start

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-run

A 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.


Main Structural Result

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.


Abstract

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.


Mathematical Scope

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.


Theoretical Identities Tested in the Official Finite Computation

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.


Verification Pipeline

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"]
Loading

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.


Design Principles

  1. Finite exact-arithmetic testing
    The code tests the implementation and stated identities over a finite range.

  2. Frozen computational core
    The inherited Paper 5 core module is used as an immutable dependency.

  3. Exact arithmetic in mathematical checks
    The mathematical kernels use exact modular and integer arithmetic.

  4. Traceable provenance
    Official run artifacts are associated with manifests, hashes, and documented execution parameters.


Installation

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.txt

Note

After the first tagged archival release, check out the corresponding tag before installation for exact correspondence with the archived source tree.


Usage

Reproduce the official configuration

cd code

python Run_Reflection_Selection_Mechanism.py \
  --N 2000000 \
  --workers 14 \
  --strict \
  --fresh \
  --out-dir ../reproduced-run

Resume an interrupted reproduction

cd code

python Run_Reflection_Selection_Mechanism.py \
  --N 2000000 \
  --workers 14 \
  --strict \
  --resume \
  --out-dir ../reproduced-run

Run the built-in control test

cd code

python Run_Reflection_Selection_Mechanism.py \
  --self-test \
  --self-test-N 3000

Official Run Configuration

Driver          : 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

Selection Predicate

p != 2, 5
alpha(p) is even
alpha(p) != p - 1

Finite Sample

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.


Key Results

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.


Scope Reconciliation (S3.1)

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
Loading

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

Outputs

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

Primary Data Files

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

Primary Report Files

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

Repository Structure

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)

Files of Primary Interest

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

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.


Provenance

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.


Hash Verification

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 Distinctions

Important

These distinctions govern interpretation and citation.

  1. Proofs versus computational tests
    The accompanying manuscript proves the mathematical results independently. This repository supplies finite exact-arithmetic tests and reproducibility materials.

  2. Inherited Paper 5 DOI versus repository DOI
    The DOI 10.5281/zenodo.21431565 identifies only the inherited frozen-core archive. A separate DOI may be assigned to this repository after its first archival release.

  3. Theorem scope versus official finite computational sample
    The manuscript works under the even-rank hypothesis. The official finite computation additionally imposes alpha(p) != p - 1 and the bound p <= 2,000,000.

  4. Scope reconciliation versus rank-divisibility proof
    The equality

    72,906 = 29,358 + 43,548
    

    is a finite-range classification reconciliation only. It does not prove the classical rank-divisibility relation.

  5. 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.


Reproducibility Policy

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 After Archival Release

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

Contributing

  • Report reproducibility discrepancies through the repository issue tracker.
  • The frozen core Fibchar_v1-0-1.py is 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.

License

This project is licensed under the MIT License.


Author

Majid Ghandali
Independent Researcher

ORCID: 0009-0001-1097-1770

About

Reproducibility code for "Character-Twisted Reflection in Even-Rank Fibonacci Blocks" — index-dependent weighted reflection with a surviving midpoint fixed point.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors