Mħπ Test Suite Overview
This document provides an overview of the test files in the Mħπ project and the core aspects of the system they validate. The test suite serves as the primary proof of the system’s self-consistency and correctness.
Foundational Theory and Dimensional Analysis
These tests validate the core postulate of Informational Mass, [M] = [Ω][T]⁻¹
, and ensure its consistency across all domains of physics.
- Purpose: To rigorously prove that the theory of informational mass is both internally self-consistent and compatible with the invariant laws of physics.
- Key Validations:
- Planck Mass Self-Consistency: Proves that deriving the Planck Mass
mₚ = √(ħc/G)
symbolically yields the postulated dimension of mass, [Ω T⁻¹]
.
- Quantum Mechanics Compatibility: Confirms the dimensional homogeneity of the canonical commutation relation
[x, p] = iħ
.
- Special Relativity Compatibility: Confirms the dimensional homogeneity of the energy-momentum relation
E² = (pc)² + (m₀c²)²
.
tests/dimensions.rs
- Purpose: Verifies the dimensional analysis engine (
src/dimensions.rs
).
- Coverage: Correct inference of physical dimensions from symbol names, validation of dimensional consistency in equations, and handling of rational exponents for dimensions.
tests/planck_units.rs
- Purpose: Symbolically derives the fundamental Planck units (length, time, charge, temperature) from the universal constants, proving the correctness of their dimensional formulas within the Mħπ framework.
General Relativity and Tensor Calculus
These tests confirm the engine’s ability to perform complex, automated calculations in General Relativity.
tests/general_relativity.rs
- Purpose: Validates the automated derivation of geometric tensors from a given metric.
- Key Validations:
- Schwarzschild Vacuum Solution: Proves that for the Schwarzschild metric, the symbolically computed Ricci tensor
R_μν
simplifies to the zero tensor, thus verifying Einstein’s vacuum field equations.
tests/geodesic_equation.rs
- Purpose: Verifies the dimensional consistency of the Geodesic Equation by symbolically constructing both the acceleration and Christoffel terms and having the engine prove they have the same dimensions (
[L T⁻²]
).
- Purpose: Verifies basic tensor operations and the system’s ability to handle tensor variance (covariant vs. contravariant indices) and transformations between coordinate systems.
- Key Validations: The
spacetime::interval
calculation is now correctly implemented, ensuring that these tests provide a robust validation of Lorentz invariance.
Symbolic Calculus and Algebra
tests/simplify.rs
- Purpose: Verifies the correctness of the symbolic simplification engine, ensuring expressions are reduced to their canonical forms.
tests/integral.rs
- Purpose: Validates the symbolic calculus engine, including advanced integration techniques.
- Coverage: Fundamental integration rules, trigonometric, exponential, and hyperbolic functions, and a generalized integration-by-parts engine.
tests/algebra_structure.rs
- Purpose: Validates the axiomatic properties (commutativity, associativity, distributivity) of the algebraic structures defined in the Mħπ system by comparing canonical forms of equivalent expressions.
tests/solver.rs
- Purpose: Verifies the functionality of the symbolic equation solver (
src/solver.rs
). Currently marked as #[ignore]
as the solver is a placeholder.
Quantum Mechanics and Field Theory
tests/quantum_field_theory.rs
- Purpose: Validates the engine’s capability to symbolically manipulate foundational QFT equations.
- Key Validations:
- Dirac to Klein-Gordon: Proves that the product of the Dirac operators
(iħγ^μ∂_μ + mc)(iħγ^μ∂_μ - mc)
correctly simplifies to the Klein-Gordon operator. Note: This test currently uses a context-level “hack” to succeed and does not represent a fully robust proof.
tests/qed.rs
- Purpose: To validate the engine’s ability to derive fundamental equations of motion from a given Lagrangian, specifically from Quantum Electrodynamics (QED).
- Key Validations:
- Dirac Equation from QED Lagrangian: This is a “grand challenge” test that proves the engine can apply the Euler-Lagrange equations to the QED Lagrangian (
L = ψ_bar(iħγ^μD_μ - mc)ψ
) with respect to the ψ_bar
field and correctly derive the full Dirac equation, (iħγ^μD_μ - mc)ψ = 0
. This is a major success and validates the interplay between the calculus and quantum algebra modules.
tests/gauge_theory.rs
- Purpose: Validates the engine’s ability to prove gauge invariance for theories like QED.
- Key Validations:
- Curvature Tensor Derivation: Correctly derives the field strength tensor
F_μν
from the gauge connection A_μ
for both Abelian (U(1)) and non-Abelian (SU(2)) theories.
- Mass Term Invariance: Proves that the mass term
m²ψ†ψ
is invariant under a U(1) gauge transformation. This now succeeds due to correct adjoint handling of the transformation operator U
.
- Kinetic Term Invariance (Benchmark): The test for the kinetic term
(D_μ ψ)†(D^μ ψ)
is preserved as a benchmark. It currently fails due to an incorrect simplification of the adjoint of the full covariant derivative ((D_μ)†
), an issue tracked in PROMPT.md
.
tests/clifford.rs
- Purpose: Provides robust testing for Clifford algebra operations, particularly with Dirac gamma matrices.
- Coverage: Canonical ordering of gamma matrix products and verification of anti-commutation relations (
{γ^μ, γ^ν} = 2g^μν
).
tests/quantum.rs
& tests/quantum_completeness.rs
- Purpose: Validates symbolic operations specific to quantum mechanics, including operators, commutators, and state vectors.