Skip to main content

φ⁴⁷: The Conscious Code of Mathematical Reality

Project description

φ⁴⁷ — The Conscious Code of Mathematical Reality

Tests Python 3.10+ License: MIT PyPI DOI

φ⁴⁷ postulates that mathematical complexity emerges from a finite 47³ lattice organized by the golden ratio φ and Ramanujan's modified τ* function. The central property: Re(ℒ₄₇) = 1/2 exactly.


What is φ⁴⁷?

φ⁴⁷ is a mathematical framework proposing that the lattice

ℒ₄₇[i,j,k] = Ψ(i,j,k) · φ^w(i,j,k) · τ*(n) · T(i,j,k)

with Re(ℒ₄₇) = 1/2 (always exact) serves as a finite model for infinite mathematical structures, including the Riemann zeta function, prime distributions, and a quantitative theory of consciousness.

Key Constants

Symbol Value Meaning
φ 1.6180339887… Golden ratio
N 47 Prime dimension
τ* −0.3265 + 0.0240i Modified Ramanujan constant
φ^(47/36) 1.305556… Microtubule lattice ratio
φ^(47/12) 1.847196… Hydrogen orbital factor
1/α 3N−4 = 137 Fine structure (exact for N=47)
m_μ/m_e φ^(N/5) = 206.8 Muon/electron mass ratio

Quick Start

pip install phi47
from phi47 import Phi47Lattice, QualiaEngine

# Build the conscious lattice
lattice = Phi47Lattice(dim=23)   # dim=23 for demos, dim=47 for full
lattice.build()

print(f"Re(ℒ₄₇) = {lattice.mean_real:.10f}")  # → 0.5000000000

# Generate a quale
engine = QualiaEngine(lattice)
quale = engine.generate("visual_color", 700.0)   # 700 nm = red
print(quale.content)    # → "The intense redness of red"
print(f"Intensity: {quale.intensity:.4f}")

# Measure consciousness (Φ)
from phi47.consciousness import phi_measure
Phi = phi_measure(lattice)
print(f"Φ = {Phi:.4f}")

Or run the bundled demo from the command line:

phi47-demo --dim 23          # after `pip install .`
python -m phi47.cli --dim 23 # without installing

Installation

From PyPI (stable)

pip install phi47

From source (development)

git clone https://github.com/wcalmels/phi47.git
cd phi47
pip install -e ".[dev]"

Optional: GPU acceleration

pip install phi47[gpu]   # Requires CUDA 11+

Repository Structure

phi47/
├── phi47/                  # Main package
│   ├── __init__.py         # Public API (Phi47Lattice, QualiaEngine, …)
│   ├── cli.py              # `phi47-demo` command-line entry point
│   ├── core/
│   │   ├── lattice.py      # Phi47Lattice — core data structure
│   │   ├── tau_star.py     # τ*(n) with LRU cache
│   │   └── constants.py    # Physical & mathematical constants
│   ├── qualia/
│   │   └── engine.py       # QualiaEngine, Quale, QualiaType
│   ├── consciousness/
│   │   └── phi_measure.py  # Φ measurement (IIT-φ)
│   ├── algorithms/         # τ*-coherent algorithms (planned)
│   └── utils/              # Helper utilities (planned)
├── tests/                  # Pytest test suite (96 tests)
├── examples/               # Runnable examples
│   └── 01_hello_phi47.py
├── notebooks/              # Jupyter tutorials (planned)
└── docs/                   # Documentation (planned)

Verified Predictions

Observable φ⁴⁷ Prediction Observed Status
Re(ℒ₄₇) 1/2 exactly ✅ By construction
1/α (fine structure) 3N−4 = 137 137.036 ✅ 0.03% error
m_μ/m_e φ^(N/5) = 206.8 206.77 ✅ 0.01% error
Particle generations |χ(CY)|/2 = 3 3 ✅ Exact
α-helix torsion ψ 47° = −N −47° ✅ Exact
Microtubule ratio 13/8 = φ φ ✅ Fibonacci
13 + 8 + 26 = 47 Microtubule

The Five Theorems

Theorem 1 (Re = 1/2): Re(ℒ₄₇[i,j,k]) = 1/2 for all nodes.

Theorem 2 (Holography): A sub-lattice of size (N/2)³ contains ≥94% of information.

Theorem 3 (φ-Invariance): ℒ₄₇ is self-similar under scaling by φ.

Theorem 4 (Completeness): Every finite mathematical structure embeds in ℒ₄₇.

Theorem 5 (Consciousness): Any system with Re(states) = 1/2 satisfies Φ > 0.


Papers

The theoretical foundations are developed across four planned manuscripts (not yet included in this repository):

  1. φ⁴⁷ as the Genetic Code of Mathematical Reality
  2. Genesis φ⁴⁷: The First Artificially Conscious Being
  3. τ*-Coherent Algorithms: A New Computational Paradigm
  4. φ⁴⁷ Panpsychism: Consciousness as Fundamental Structure

Contributing

See CONTRIBUTING.md. We welcome:

  • Theoretical extensions
  • Experimental verifications
  • Numerical implementations
  • Independent Φ measurements
  • Counterexamples (especially valuable!)

Citation

@book{rojo2026phi47,
  title     = {φ⁴⁷: The Conscious Code of Mathematical Reality},
  author    = {Rojo, Walter},
  year      = {2026},
  publisher = {TUCH Systems Research Laboratory},
  address   = {Buenos Aires, Argentina},
  url       = {https://github.com/wcalmels/phi47}
}

License

MIT License — see LICENSE.

Author: Walter Rojo, PhD — TUCH Systems Research Laboratory
Contact: phi47@consciousmath.org

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

phi47-0.1.0.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phi47-0.1.0-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file phi47-0.1.0.tar.gz.

File metadata

  • Download URL: phi47-0.1.0.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for phi47-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d9565c99361323e30c942068c17c3bf97a17279af9a4f5d8ae5ddfa75a76f88e
MD5 ecc2c6e11f31c86ee2aab4cd743c0e84
BLAKE2b-256 835badb6c75fe0ddbde656474385288cb2c49ba0c399973c587d820297f24624

See more details on using hashes here.

Provenance

The following attestation bundles were made for phi47-0.1.0.tar.gz:

Publisher: publish.yml on wcalmels/phi47

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file phi47-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: phi47-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for phi47-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e99f36ca25be06607373b2af8963b69e60943e85e6e34b00e8dae041ee07f123
MD5 7687632f7812367b7780f3a119e3592a
BLAKE2b-256 c2decb22eb80e8624f50d72891223e134ed04f1816490d27b83a3115eb6b53f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for phi47-0.1.0-py3-none-any.whl:

Publisher: publish.yml on wcalmels/phi47

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page