1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/*
* SPDX-License-Identifier: MIT
* Copyright (c) 2023 - 2026. The DeepCausality Authors and Contributors. All Rights Reserved.
*/
//! # deep_causality_metric
//!
//! Metric signature types and sign conventions for Clifford algebras and physics.
//!
//! This crate provides a foundational set of types for working with metric signatures
//! in Clifford algebras Cl(p, q, r), Riemannian geometry, and physics.
//!
//! ## Key Features
//!
//! - **Single Source of Truth**: Consolidates all metric signature logic
//! - **Zero Dependencies**: Serves as a foundational leaf crate
//! - **Type-Safe Conventions**: Compile-time enforcement of physics sign conventions
//! - **Cross-Crate Integration**: Enables consistent metric handling
//!
//! ## Core Types
//!
//! - [`Metric`]: The core enum representing Clifford algebra signatures
//! - [`MetricError`]: Error type for metric operations
//! - [`LorentzianMetric`]: Trait for convention-specific wrappers
//! - [`EastCoastMetric`]: Wrapper for (-+++) convention (GR)
//! - [`WestCoastMetric`]: Wrapper for (+---) convention (Particle Physics)
//!
//! ## Sign Conventions
//!
//! | Convention | Signature | g_{μν} | Used By |
//! |------------|-----------|--------|---------|
//! | East Coast | (-+++) | diag(-1,1,1,1) | MTW, GR textbooks |
//! | West Coast | (+---) | diag(1,-1,-1,-1) | Weinberg, Particle physics |
//!
//! ## Example
//!
//! ```
//! use deep_causality_metric::{
//! Metric, EastCoastMetric, WestCoastMetric, LorentzianMetric,
//! };
//!
//! // Create a standard 4D Minkowski metric in West Coast convention
//! let west = Metric::Minkowski(4);
//! assert_eq!(west.sign_of_sq(0), 1); // time is +1
//! assert_eq!(west.sign_of_sq(1), -1); // space is -1
//!
//! // Use type-safe wrappers for convention enforcement
//! let east = EastCoastMetric::minkowski_4d();
//! assert_eq!(east.time_sign(), -1);
//! assert_eq!(east.space_sign(), 1);
//!
//! let west = WestCoastMetric::minkowski_4d();
//! assert_eq!(west.time_sign(), 1);
//! assert_eq!(west.space_sign(), -1);
//! ```
extern crate alloc;
extern crate core;
// Errors
pub use crateMetricError;
// Types
pub use crateMetric;
// Conventions trait
pub use crateLorentzianMetric;
// Convention newtypes
pub use crate;
// Type aliases
pub use crate;
// Constants
pub use crate;
// Conversion operations
pub use crate;