DeepCausality Multivector
A dynamic, universal Clifford Algebra implementation for Rust, designed for theoretical physics, causal modeling, and geometric algebra applications.
Features
- Dynamic Metric Signature: Supports arbitrary signatures $Cl(p, q, r)$ at runtime via the
Metricenum.- Euclidean, Non-Euclidean, Minkowski, PGA, and Custom signatures.
- Universal Multivector: A single type
CausalMultiVector<T>can represent scalars, vectors, bivectors, and higher-grade blades. - Comprehensive Operations:
- Geometric Product, Outer Product, Inner Product (Left Contraction).
- Reversion, Squared Magnitude, Inverse, Dual.
- Grade Projection.
- Higher-Kinded Types (HKT): Implements
Functor,Applicative, andMonad(viadeep_causality_haft) for advanced functional patterns.Monad::bindimplements the Tensor Product of algebras.
- Type Aliases & Constructors: Pre-configured aliases for common algebras:
RealMultiVector: Standard real Clifford algebras (Complex, Quaternions, Split-Complex, APS, STA, CGA).ComplexMultiVector: Complex Clifford algebras (Pauli, Octonion Operator).PGA3DMultiVector: 3D Projective Geometric Algebra.DixonAlgebra: $Cl_{\mathbb{C}}(6)$ (Dixon Algebra).
Usage
Add this crate to your Cargo.toml (usually as part of the deep_causality workspace).
Basic Operations
use ;
Using Aliases (e.g., PGA)
use PGA3DMultiVector;
Higher-Kinded Types (HKT)
This crate implements HKT traits from deep_causality_haft.
- Functor: Map a function over coefficients.
- Applicative: Lift values and apply functions.
- Monad: Tensor product of algebras.
use ;
use ;
Supported Algebras
| Algebra | Signature | Constructor / Alias |
|---|---|---|
| Complex Numbers | $Cl(0, 1)$ | RealMultiVector::new_complex_number |
| Quaternions | $Cl(0, 2)$ | RealMultiVector::new_quaternion |
| Split-Complex | $Cl(1, 0)$ | RealMultiVector::new_split_complex |
| Pauli (APS) | $Cl(3, 0)$ | RealMultiVector::new_aps_vector |
| Spacetime (STA) | $Cl(1, 3)$ | RealMultiVector::new_spacetime_vector |
| Conformal (CGA) | $Cl(4, 1)$ | RealMultiVector::new_cga_vector |
| PGA 3D | $Cl(3, 0, 1)$ | PGA3DMultiVector |
| Dixon | $Cl_{\mathbb{C}}(6)$ | DixonAlgebra |
License
This project is licensed under the MIT license.
Security
For details about security, please read the security policy.
Author
- Marvin Hansen.
- Github GPG key ID: 369D5A0B210D39BC
- GPG Fingerprint: 4B18 F7B2 04B9 7A72 967E 663E 369D 5A0B 210D 39BC
Benchmarks
Performance measured on Apple M3 Max.
| Operation | Metric | Time |
|---|---|---|
| Geometric Product | Euclidean 2D | ~119 ns |
| Geometric Product | PGA 3D | ~110 ns |
| Addition | Euclidean 3D | ~57 ns |
| Reversion | PGA 3D | ~56 ns |
To run benchmarks: