🧠 MPP — Mulein-Planck-Pi
MPP is a symbolic mathematics and physics computation engine grounded in the fundamental constants of nature. It rejects conventional numeric representations in favor of a pure symbolic system built from first principles, primarily the Planck length (P) and π.
MPP offers an expressive, TeX-inspired language for symbolic reasoning and is designed for theorists, researchers, and engineers who wish to model physical and mathematical systems with absolute symbolic purity.
Repository link
🧬 “Nature doesn’t calculate in decimals—it thinks in π and ħ.”
💫 Vision
MPP represents a paradigm shift in symbolic mathematics - a system that thinks in terms of fundamental physical constants rather than human-convenient approximations. With its comprehensive calculus and advanced Clifford algebra capabilities, MPP enables direct symbolic manipulation of physical laws, quantum mechanical operators, and relativistic spacetime in their most natural form: as exact relationships between universal constants.
The recent calculus and Clifford algebra enhancements position MPP to tackle complex physics problems involving integration, differentiation, and non-commutative operator algebra while maintaining perfect symbolic precision - something no other system can achieve at this level of physical foundation.
🔭 Why MPP for Researchers?
MPP is fundamentally different from existing computational algebra systems like Mathematica or SymPy. It is built on a philosophy of zero numeric leakage and constructivist mathematics, where every expression is derived from universal constants.
Core Philosophy
- Universal Constants Only: All mathematics is expressed in terms of fundamental physical constants, with no reliance on base-10 or floating-point arithmetic.
- Symbolic Purity: The system never “falls back” to numeric approximations. Every calculation maintains symbolic integrity, preventing the precision loss and artifacts common in other systems.
- True AST Engine: MPP uses a proper Abstract Syntax Tree (AST), separating symbolic form from semantic meaning. Core operations like
Add
and Mul
are n-ary, simplifying associative transformations and canonical ordering. This allows for powerful and flexible expression manipulation, pattern matching, and rewrite rules.
- Human-Agnostic Modeling: By avoiding meters, seconds, and other human-centric units, MPP encourages modeling physical phenomena in a more universal, fundamental framework based on Planck units.
- Inferred Dimensional Analysis: The engine tracks physical dimensions throughout all calculations, inferring them from variable names (e.g.,
c
implies velocity, ℏ
implies action) and supporting rational exponents to ensure consistency even with fractional powers.
- Flexible Domain Inference: The engine is not restricted by a rigid type system. It intelligently infers the algebraic domain (e.g., quantum, tensor, commutative) of an expression from its symbolic notation, applying appropriate simplification and transformation rules.
What Only MPP Can Do
Because of its unique design, MPP enables analyses that are difficult or impossible in other systems:
- Symbolically compute the area of a circle as
\pi \cdot r^2
, where r
is always reducible to a multiple of a Constant
, never a float.
- Express and manipulate 4D spacetime intervals in pure, symbolic Planck units.
- Represent quantum mechanical operators and their commutation relations symbolically, including complex Clifford algebra expressions with Dirac gamma matrices. The algebra engine recognizes their non-commutative nature from the notation itself and simplifies them to canonical forms (e.g.,
γ¹γ⁰ → -γ⁰γ¹
, γ⁰γ⁰ → 1
).
- Flexibly interpret symbols based on physical context (e.g.,
p
as momentum, P
as pressure), with the dimensional analysis engine adapting accordingly.
- Integrate complex expressions like
x*ln(x)
symbolically using integration by parts, maintaining exact symbolic representation throughout.
- Compute partial derivatives of multivariate functions with proper application of chain rule, product rule, and power rule in symbolic form.
- Handle trigonometric, exponential, and hyperbolic function integration with correct antiderivatives (e.g.,
∫tan(x)dx = -ln(cos(x))
).
- Symbolically derive the Klein-Gordon operator from the product of Dirac operators (
(iħγ^μ∂_μ + mc)(iħγ^μ∂_μ - mc)
), demonstrating a foundational capability in quantum field theory through robust Clifford algebra simplification and term cancellation.
✨ Key Capabilities
- ⚛️ Quantum Mechanics & Operator Algebra: Canonical operators (
x̂
, p̂
, a
, a†
), commutators, anti-commutators, Dirac notation, and advanced Clifford algebra with Dirac gamma matrices (γμ) featuring canonical ordering and simplification.
- 🔭 Relativity & Tensor Calculus: Native support for 4-vectors and metric tensors. The primary next focus is the implementation of full tensor transformation laws and advanced tensor calculus for general relativity (see
PROMPT.md
for details).
- 📊 Statistical and Quantum Field Theory (QFT): Frameworks for path integrals, field operators, partition functions, and ensemble averages. Demonstrated ability to symbolically derive QFT equations like the Klein-Gordon operator.
- 📐 Calculus & Geometry: Comprehensive symbolic integration and differentiation, including trigonometric, exponential, logarithmic, and hyperbolic functions, partial derivatives, integration by parts, and advanced techniques like substitution and partial fractions. Geometric calculations use π and radius in Planck units.
- 📘 TeX-Like DSL (MPP-TeX): A robust and elegant syntax inspired by TeX, supporting operator precedence, associativity, implicit multiplication, and comprehensive error handling for writing complex symbolic expressions.
- 📏 Physical Dimensions & Unit Safety: Symbolic type-checking of dimensional compatibility across all calculations, with dimensions inferred from symbol names and supporting rational exponents.
📚 Documentation
- docs/MPP-Algebra.md: Formalizes the algebraic structures within the MPP system, including Commutative Rings, Non-commutative Algebra, and Tensor Algebra. It details their axioms, examples, how domains are separated, simplification rules, implementation notes, and potential future extensions like Lie and Clifford algebras.
- docs/MPP-Constants-Hierarchy.md: Provides a visual and descriptive hierarchy of physical constants used in MPP, distinguishing between primitive and derived constants. It includes key identities (e.g.,
c = P / τ
, Δ = P / c
), dimensional analysis for each constant, and discusses natural units systems (like ℏ=c=1).
- docs/MPP-Cosmology.md: Details the cosmological constants (e.g., Λ, H, Ω) and fundamental equations (e.g., Friedmann equations) implemented in the MPP system. It covers the ΛCDM model, equations of state for various cosmological components, and how these are represented symbolically with dimensional consistency.
- docs/MPP-Physics.md: Outlines the physical extensions to the MPP symbolic system. It covers core physical constants, their relationships, natural units, and specific modules for Spacetime (four-vectors, Minkowski metric, Lorentz transformations), Quantum Mechanics (Dirac notation, operators, commutation relations), Tensor calculus (including variance and metric tensor), and Dimensional Analysis. It also mentions MPP-TeX extensions for physics.
- docs/MPP-Spec.md: Defines the core specifications of the Mulein-Planck-Pi (MPP) system, emphasizing its foundation on symbolic expressions derived from π and Planck length (P), avoidance of numerical bases, and the structure of its symbolic expression tree. It also lists key source code modules.
- docs/MPP-Symbolic-Closure.md: Explains the MPP system’s guarantee that all mathematical expressions remain in symbolic form throughout operations, unless explicit numeric evaluation is requested. It details the principles, implementation mechanisms (like the
SymbolicExpr
enum and simplification rules), and verification methods (unit and property-based tests).
- docs/MPP-Tests.md: Provides an overview of all test suites in the MPP project. It describes the purpose and coverage of each test file, categorized into areas like core symbolic/algebraic tests, constants and units tests, physics domain tests (calculus, spacetime, quantum, tensor, cosmology), and parser tests.
- docs/MPP-TeX.md: Describes MPP-TeX, the TeX-inspired symbolic math language used by the MPP system. It covers its syntax, recognized tokens and constants, supported mathematical and physical operations (including quantum mechanics and tensor notation), utility commands, parser implementation details (using
nom
), error handling, and a formal EBNF grammar with operator precedence.
- docs/MPP-Units.md: Details the MPP unit system, which expresses all physical quantities in terms of fundamental constants, primarily Planck units. It lists the foundational constants, explains how SI and Imperial units are represented symbolically within this framework, and touches upon the dimensional analysis
🚀 Getting Started
1. Set up the Project
First, clone the repository to your local machine:
git clone https://github.com/Digital-Defiance/MPP.git
cd MPP
2. Run the REPL
MPP includes an interactive Read-Eval-Print Loop (REPL) for quick experiments. Run it with:
You can then enter expressions using MPP-TeX syntax.
3. Run Tests
The project includes a comprehensive test suite covering the symbolic engine, dimensional analysis, and physics modules. To run all tests, use:
The suite includes over 120 tests, ensuring the correctness and stability of the engine.
🧰 How to Use MPP
Using the MPP-TeX Parser
You can parse any string containing MPP-TeX into a symbolic expression tree. This is the primary way to interact with the engine.
Example:
\let r := \P
\let A := \pi \cdot r^2
\derive{A}{r}
The custom parser handles a wide range of mathematical and physical notation, including derivatives, integrals, quantum operators, and tensors. For full details, see the MPP-TeX Language Documentation (Note: The live link in the original README might be a placeholder; linking to the local doc path).
Using MPP as a Library
To use mpp
in your own Rust project, add it as a dependency in your Cargo.toml
:
[dependencies]
mpp = { git = "https://github.com/Digital-Defiance/MPP.git" }
You can then use the parser and simplifier in your code:
// main.rs
use mpp::tex_parser::parse_tex;
use mpp::simplify::simplify;
fn main() {
// 1. Define an expression in MPP-TeX
let input = "\\derive{\\pi \\cdot r^2}{r}";
// 2. Parse the TeX string into a symbolic expression
let parsed_expr = parse_tex(input).expect("Failed to parse");
println!("Parsed: {}", parsed_expr);
// 3. Simplify the expression
let simplified_expr = simplify(parsed_expr);
println!("Simplified: {}", simplified_expr);
// Expected output: 2 \cdot \pi \cdot r
}
🤝 Contributing
We welcome contributions from researchers, developers, and enthusiasts. The project’s goals are ambitious, and there are many opportunities to get involved.
Contribution Ideas
The project’s future direction is outlined in the PROMPT.md
file, particularly the “Next Focus” section. Key areas for development include:
- Advanced Tensor Calculus for General Relativity: Implementing tensor transformation laws, covariant derivatives, Christoffel symbols, and curvature tensors (see
PROMPT.md
for details). This is the primary current focus.
- Comprehensive Quantum Operator Algebra: Further developing the operator algebra framework for quantum mechanics beyond the current Clifford algebra enhancements.
- Quantum Field Theory and Statistical Mechanics: Expanding support for QFT and statistical mechanics modeling.
How to Contribute
- Fork the repository on GitHub.
- Create a new branch for your feature or bug fix:
git checkout -b feature/my-new-feature
.
- Make your changes. Ensure you add relevant tests for any new functionality.
- Run the test suite to ensure your changes don’t break existing code:
cargo test
.
- Submit a pull request with a clear description of your changes.
📦 VS Code Syntax Highlighting
The repository includes a VS Code extension for MPP-TeX syntax highlighting. To install it:
# Navigate to the extension directory
cd mpptex-syntax
# Package the extension (requires vsce: npm install -g @vscode/vsce)
vsce package
# Install it from the command line
code --install-extension mpptex-syntax-*.vsix
📜 License
Apache 2.0 © 2025 Jessica Mulein
🧰 Designed For
- 🧠 Theoretical physicists modeling symbolic operator systems, especially in QFT and relativity.
- 🧮 Mathematicians exploring algebraic structures, non-commutative algebras, and constructivist mathematics.
- 👩💻 Software engineers building symbolic DSLs, interpreters, and computer algebra systems.
- ⚗️ Quantum engineers simulating algebraic and operator behaviors in QFT and quantum