This document formalizes the algebraic structures in the MPP system, providing a rigorous mathematical foundation for symbolic operations.
The MPP system defines several algebraic structures:
Commutative Ring: The basic operations (Add, Mul, Pow) form a commutative ring when applied to symbolic expressions that don’t involve quantum or tensor operations.
Non-commutative Algebra: Quantum mechanical operations form a non-commutative algebra, where the order of operations matters (e.g., AB ≠ BA for operators A and B).
Tensor Algebra: Tensor operations form a graded algebra with specific transformation properties under coordinate changes.
A commutative ring is an algebraic structure consisting of a set equipped with two binary operations (addition and multiplication) that satisfy certain axioms.
In MPP, the commutative ring consists of symbolic expressions that don’t involve quantum or tensor operations, with the operations of addition and multiplication.
For symbolic expressions a, b, c in the commutative domain:
The following expressions belong to the commutative ring:
Pi
, Planck
, Const(42)
, Rational(3, 4)
Var("x")
Add(Const(1), Const(2))
, Mul(Pi, Var("r"))
, Pow(Var("r"), Const(2))
Derive(Var("x"), "x")
, Integral(Var("x"), "x")
A non-commutative algebra is an algebraic structure where the multiplication operation is not commutative, meaning that the order of operands matters.
In MPP, the non-commutative algebra consists of quantum mechanical operations, where operators don’t generally commute.
For quantum operators A, B, C:
The following expressions belong to the non-commutative algebra:
Ket(Var("psi"))
, Bra(Var("phi"))
BraKet(Var("psi"), Var("phi"))
DensityMatrix(Var("psi"))
In quantum mechanics, operators often satisfy specific commutation relations. For example, the position and momentum operators satisfy:
[x, p] = i * ħ
where [x, p] = x * p - p * x is the commutator.
MPP supports these commutation relations through the simplifier, which recognizes and applies them during simplification.
A tensor algebra is a graded algebra that provides a framework for working with tensors of different ranks.
In MPP, the tensor algebra consists of tensor operations, including 4-vectors, tensors of arbitrary rank, and contractions.
For tensors T, S of appropriate ranks:
The following expressions belong to the tensor algebra:
Four([t, x, y, z])
Tensor([components], rank)
Contract(tensor, i, j)
The metric tensor g_μν plays a special role in tensor algebra, as it defines the inner product between vectors and allows raising and lowering indices.
In MPP, the metric tensor is used for contractions and for computing invariants like the spacetime interval.
MPP carefully separates the different algebraic domains to ensure that operations are applied correctly:
The simplifier respects these domain separations, applying the appropriate rules based on the domain of the expression.
The simplifier applies different rules based on the algebraic domain of the expression:
Simplify inner products: ⟨ψ | ψ⟩ = 1 for normalized states |
The algebraic structures are implemented in the algebra_structure.rs
module, which provides functions to:
The implementation ensures that the algebraic properties are preserved throughout all operations, maintaining the mathematical rigor of the system.
Future extensions to the algebraic structures include:
These extensions will further enhance the expressive power of MPP, allowing it to model more complex physical systems.