Metric Signatures
Relevant source files
The following files were used as context for generating this wiki page:
Metric Signatures represent the foundational mathematical definitions for Clifford algebras, Riemannian geometry, and physics sign conventions within the DeepCausality framework. Consolidated into the deep_causality_metric crate, this module serves as a single source of truth for metric signature logic, providing type-safe enforcement of physics sign conventions across multivector, tensor, topology, and physics modules.
The primary purpose of the metric system is to define how basis vectors square (to +1, -1, or 0), which is critical for geometric product computations in Clifford algebras and for defining spacetime intervals in relativistic physics. By providing a centralized leaf crate with zero external dependencies, the framework ensures consistent metric handling and enables cross-crate integration for complex multi-physics pipelines.
Sources: deep_causality_metric.md:10-35, README.md:160-175
Core Architecture and Data Structures
The system is built around a central Metric enum that explicitly defines Clifford algebra signatures $Cl(p, q, r)$. This represents a multidimensional space where $p$ basis vectors square to +1, $q$ square to -1, and $r$ are degenerate (square to 0).
The Metric Enum
The Metric enum supports several standard configurations used in mathematics and physics:
| Variant | Signature | Description |
|---|---|---|
Euclidean(usize) | $(N, 0, 0)$ | All basis vectors square to +1. |
NonEuclidean(usize) | $(0, N, 0)$ | All basis vectors square to -1. |
Minkowski(usize) | $(1, N-1, 0)$ | West Coast Minkowski ($e_0^2 = +1$). |
PGA(usize) | $(N-1, 0, 1)$ | Projective Geometric Algebra ($e_0^2 = 0$). |
Generic | ${ p, q, r }$ | Explicit generic signature. |
Custom | ${ dim, neg_mask, zero_mask }$ | Arbitrary signature via bitmasks up to 64 dimensions. |
Sources: deep_causality_metric.md:95-120
Lorentzian Metric Trait
The LorentzianMetric trait defines the interface for convention-specific metric wrappers. It allows the system to distinguish between different physics conventions, such as the "mostly plus" or "mostly minus" signatures used in General Relativity and Particle Physics.
The diagram shows the relationship between the LorentzianMetric trait and its concrete implementations for different sign conventions.
Sources: deep_causality_metric.md:144-175
Physics Sign Conventions
DeepCausality provides dedicated newtypes to handle the two primary Minkowski spacetime conventions:
East Coast Convention (-+++)
Also known as the MTW (Misner-Thorne-Wheeler) or "mostly plus" convention. In this signature, the time component $e_0^2 = -1$ and spatial components $e_i^2 = +1$. It is primarily used in General Relativity modules.
Sources: deep_causality_metric.md:180-195
West Coast Convention (+---)
Also known as the Weinberg or "mostly minus" convention. In this signature, the time component $e_0^2 = +1$ and spatial components $e_i^2 = -1$. It is standard for Particle Physics modules.
Sources: deep_causality_metric.md:204-218
Type Aliases and Constants
To simplify development, the system provides domain-specific type aliases:
- RelativityMetric: Alias for
EastCoastMetric. - ParticleMetric: Alias for
WestCoastMetric. - PhysicsMetric: Default metric (typically
RelativityMetric). - MINKOWSKI_4D: Constant for 4D Minkowski spacetime in the default convention.
Sources: deep_causality_metric.md:227-240
Operations and Integration
The metric system supports several core operations required for geometric and causal reasoning.
This flow diagram illustrates the primary operations available for manipulating metric signatures, including tensor products and sign flipping.
Sources: deep_causality_metric.md:247-270
Integration with Other Modules
Metric signatures are integrated into the core architecture of the project:
- Multivector: Used by
CausalMultiVectorto perform geometric product computations based on the specific Clifford signature. - Tensor: Enables Riemannian operations such as raising or lowering indices ($g^{\mu\nu}$ and $g_{\mu\nu}$) and metric traces.
- Topology: Used in
ReggeGeometryto define local metric signatures at simplices within a simplicial complex or manifold. - Physics: Provides standard sign conventions for multi-physics pipelines.
Sources: deep_causality_metric.md:280-350, AGENTS.md:215-220, README.md:140-155
Error Handling
Operations involving metric conversions or validations utilize the MetricError enum to ensure mathematical consistency.
| Error Variant | Description |
|---|---|
SignConventionMismatch | Occurs when an operation expects one convention (e.g., East Coast) but receives another. |
InvalidDimension | Occurs if a dimension is zero or exceeds the 64-dimension bitmask capacity. |
ValidationFailed | General failure during metric integrity checks. |
ConversionError | Failure during conversion between specific metric types or conventions. |
Sources: deep_causality_metric.md:126-138
Summary
Metric Signatures provide the mathematical bedrock for DeepCausality's uniform mathematics approach. By centralizing the logic for Clifford signatures and physics conventions, the system allows different mathematical domains—such as general relativity (tensors) and geometric algebra (multivectors)—to share a consistent definition of space and time. This ensures that causal pipelines can transition seamlessly between different physical and mathematical representations while maintaining rigorous sign convention accuracy.
Sources: deep_causality_metric.md:460-480, README.md:105-120