🔬 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.
📜 Standard Definition
The complete, formal mathematical definition of the CMFO system (Axioms 0-10) is frozen as the canonical standard: CMFO Formal Definition (Standard v1.0)
✨ 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-fractal
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:
🧪 Mathematically Verified Claims (Geometric Model)
All claims are backed by executable proofs in the repository, demonstrated in code:
✅ 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 = {1.0.0},
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 🇨🇷
Metadata
Release files for cmfo-fractal 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cmfo_fractal-1.1.0.tar.gz | 46.4 kB | Details |
Release files / cmfo_fractal-1.1.0.tar.gz
| Download URL | cmfo_fractal-1.1.0.tar.gz |
|---|---|
| Size | 46.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
652609e8ea153acb16bf3554995cb48b10822ecdf64b55c42ae9545f29edaa1c
|
|
BLAKE2b-256 checksum How to use checksums |
cf31206ed4506b97c46ca6a8045e0626e664603f46d6ec1985836954cded3200
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 15, 2025.
Transparency log