Professional fractal computation framework based on golden ratio (φ) and 7D geometric manifolds
Project description
🔬 CMFO: Fractal Universal Computation Engine
CMFO is a professional-grade Python framework for deterministic fractal computation based on the golden ratio (φ) and 7-dimensional geometric manifolds. Unlike probabilistic AI/ML or binary logic, CMFO provides analytically reversible, physics-consistent operations for computation, logic, and optimization.
✨ Key Features
🧮 Fractal Algebra
- Fractal Product:
x ⊗_φ y = x^(log_φ(y))- Scale-based multiplication - Fractal Root:
√_φ(x) = x^(1/φ)- Natural hierarchical scaling - Convergent, stable, and mathematically rigorous
🔀 Geometric Logic
- Continuous logic with φ-scaling (not fuzzy logic)
- Operations:
f_and,f_or,f_not,f_xor - Compatible with analog hardware and NPUs
- Reversible and deterministic
⚛️ Physics-Based Operations
- Geometric mass:
m = ħ/(c·L)(Compton relation) - Dimensionally correct and fundamental
- Anchor for all CMFO predictions
🚀 High Performance
- Pure Python with NumPy acceleration
- Optional C++ native extension for 20x+ speedup
- Batch processing for superposition simulations
📦 Installation
pip install cmfo
Requirements:
- Python ≥ 3.9
- NumPy ≥ 1.20
Optional (for native acceleration):
- C++ compiler (Visual Studio on Windows, GCC/Clang on Linux/macOS)
🚀 Quick Start
1. Fractal Algebra
from cmfo import fractal_root, fractal_product, PHI
# Fractal root - natural scaling
x = fractal_root(100.0)
print(f"√_φ(100) = {x:.4f}") # 24.8588
# Convergence to unity
from cmfo import iterated_fractal_root
result = iterated_fractal_root(1000.0, n=50)
print(f"After 50 iterations: {result:.6f}") # ≈ 1.0
# Fractal product
result = fractal_product(2.0, PHI)
print(f"2 ⊗_φ φ = {result:.4f}") # = 2.0 (identity)
2. Geometric Logic
from cmfo import f_and, f_or, f_not, TRUE, FALSE, NEUTRAL
# Continuous logic operations
print(f"TRUE ∧_φ TRUE = {f_and(TRUE, TRUE):.4f}")
print(f"FALSE ∨_φ TRUE = {f_or(FALSE, TRUE):.4f}")
print(f"¬_φ NEUTRAL = {f_not(NEUTRAL):.4f}")
# Intermediate values (not binary!)
a, b = 0.7, 0.3
result = f_and(a, b)
print(f"f_and(0.7, 0.3) = {result:.4f}") # Geometric conjunction
3. Physics Operations
from cmfo import geometric_mass, compton_wavelength
# Electron Compton wavelength
L_e = 2.4263102367e-12 # meters
m_e = geometric_mass(L_e)
print(f"Electron mass: {m_e:.4e} kg") # ≈ 9.109e-31 kg
# Inverse relation
lambda_c = compton_wavelength(m_e)
print(f"Compton wavelength: {lambda_c:.4e} m") # Recovers L_e
4. Legacy 7D Tensor Operations
from cmfo import T7Tensor, T7Matrix
# Create 7D state
state = T7Tensor([1.0, 0.5, -0.5, 0.0, 0.0, 0.0, 0.0])
# Deterministic evolution
matrix = T7Matrix()
final_state = matrix.evolve_state(state.v, steps=100)
print(f"Final state norm: {np.linalg.norm(final_state):.4f}")
📚 Core Modules
Constants (cmfo.constants)
PHI = 1.618033988749895 # Golden ratio
PHI_INV = 0.618033988749895 # φ⁻¹
HBAR = 1.054571817e-34 # Reduced Planck constant [J·s]
C = 299792458.0 # Speed of light [m/s]
M_PLANCK # Planck mass [kg]
Algebra (cmfo.algebra)
fractal_product(x, y)- Fractal multiplicationfractal_root(x)- Fractal root (√_φ)iterated_fractal_root(x, n)- n applications of √_φ
Logic (cmfo.logic)
f_and(a, b)- Geometric ANDf_or(a, b)- Geometric ORf_not(x)- Geometric NOTf_xor(a, b)- Geometric XOR- Constants:
TRUE,FALSE,NEUTRAL
Physics (cmfo.physics)
geometric_mass(L)- Mass from length (Compton)compton_wavelength(m)- Wavelength from mass
🎯 Use Cases
✅ What CMFO is Good For:
- Hierarchical optimization - Natural multi-scale problems
- Deterministic logic - When you need reproducibility
- Geometric computation - Scale-invariant operations
- Physics simulations - Compton-scale calculations
- Analog/NPU hardware - Continuous operations
❌ What CMFO is NOT:
- Not a replacement for NumPy/SciPy (it's complementary)
- Not for standard ML/AI (use PyTorch/TensorFlow)
- Not for cryptography (experimental, not audited)
- Not for production-critical systems (v0.x = experimental)
📖 Documentation
Full documentation: https://github.com/1JONMONTERV/CMFO-COMPUTACION-FRACTAL-
Key resources:
🧪 Verified Claims
All claims are backed by executable proofs in the repository:
✅ Physics: Particle masses derived from Planck mass with α⁵ correction
✅ Logic: Reversible Boolean gates via unitary rotations
✅ Mining: O(1) geometric inversion (vs brute force)
✅ Superposition: 10k concurrent fractal timelines (20x speedup)
Run verification:
git clone https://github.com/1JONMONTERV/CMFO-COMPUTACION-FRACTAL-.git
cd CMFO-COMPUTACION-FRACTAL-
python experiments/run_all_proofs.py
🔬 Scientific Rigor
CMFO is NOT vaporware. Every operation is:
- ✅ Mathematically defined
- ✅ Dimensionally correct
- ✅ Reproducibly tested
- ✅ Performance benchmarked
Test coverage: 43 tests, 100% passing
CI/CD: Automated testing on Ubuntu/Windows/macOS, Python 3.9-3.12
🛠️ Development
Running Tests
pip install pytest
pytest tests/ -v
Building from Source
git clone https://github.com/1JONMONTERV/CMFO-COMPUTACION-FRACTAL-.git
cd CMFO-COMPUTACION-FRACTAL-/bindings/python
pip install -e .
📄 License
Apache 2.0 for academic and personal use.
For commercial, corporate, or governmental use, please contact:
- Author: Jonathan Montero Viquez
- Email: jmvlavacar@hotmail.com
- Location: San José, Costa Rica
🙏 Citation
If you use CMFO in your research, please cite:
@software{cmfo2024,
title = {CMFO: Fractal Universal Computation Engine},
author = {Montero Viquez, Jonathan},
year = {2024},
version = {0.1.4},
url = {https://github.com/1JONMONTERV/CMFO-COMPUTACION-FRACTAL-}
}
🚀 Roadmap
- v0.1.x - ✅ Core algebra, logic, physics (CURRENT)
- v0.2.x - GPU/CUDA acceleration
- v0.3.x - NPU/neuromorphic hardware support
- v1.0.0 - Stable API, production-ready
Made with precision in San José, Costa Rica 🇨🇷
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
File details
Details for the file cmfo_fractal-0.1.4.tar.gz.
File metadata
- Download URL: cmfo_fractal-0.1.4.tar.gz
- Upload date:
- Size: 29.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5832930882f3181429585be5ab8cecc9588940cd6db60e35858e83b022b8d4c4
|
|
| MD5 |
d2d2e88648f6f4f5200c2e6e66fcdcb6
|
|
| BLAKE2b-256 |
4ba381a78709b1e53184593315c23aa088620e5db5717c145459b99fb77cc55d
|
Provenance
The following attestation bundles were made for cmfo_fractal-0.1.4.tar.gz:
Publisher:
publish-pypi.yml on 1JONMONTERV/CMFO-COMPUTACION-FRACTAL-
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cmfo_fractal-0.1.4.tar.gz -
Subject digest:
5832930882f3181429585be5ab8cecc9588940cd6db60e35858e83b022b8d4c4 - Sigstore transparency entry: 763989801
- Sigstore integration time:
-
Permalink:
1JONMONTERV/CMFO-COMPUTACION-FRACTAL-@814f7bb8cf1522ac289e9ed604028df3fe23aa75 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/1JONMONTERV
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@814f7bb8cf1522ac289e9ed604028df3fe23aa75 -
Trigger Event:
push
-
Statement type: