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
/*
* SPDX-License-Identifier: MIT
* Copyright (c) 2023 - 2026. The DeepCausality Authors and Contributors. All Rights Reserved.
*/
//! Structural iso between [`CausalMultiField<T>`] and its underlying
//! carrier tuple `(CausalTensor<T>, Metric, [T; 3], [usize; 3])`.
//!
//! This is a pack/unpack iso — no algebraic homomorphism is involved.
//! Neither side implements `Group`/`Ring`/`Field`, so no marker
//! subtraits are declared. The base `Iso<S, T>` is satisfied via the
//! [`StandardIso<S, T>`] blanket impl in `deep_causality_num` once
//! bidirectional `From` is in place.
//!
//! ## Why
//!
//! `CausalMultiField<T>` keeps its fields `pub(crate)`, which prevents
//! out-of-crate code from constructing or destructuring an instance.
//! Generic tensor operations that want to work on the underlying carrier
//! ((`CausalTensor<T>` + metric + grid spacing + grid shape)) need a
//! typed bridge. The iso provides exactly that without exposing the
//! internal field layout.
//!
//! ## Layout
//!
//! Lives under `src/extensions/iso_multifield/`, mirroring the
//! `hkt_multifield/` extension that already exists for HKT impls. No
//! feature flag: both `deep_causality_tensor` and `deep_causality_metric`
//! are already deps of multivector; no new transitive dep is
//! introduced.
//!
//! See `openspec/changes/implement-isomorphism/specs/iso-multifield-tensor/spec.md`.
use crateCausalMultiField;
use Metric;
use CausalTensor;
/// Carrier tuple for [`CausalMultiField<T>`].
///
/// Fields in declaration order: tensor data, Clifford metric, grid
/// spacing `[dx, dy, dz]`, grid shape `[Nx, Ny, Nz]`.
pub type MultiFieldCarrier<T> = ;
// =============================================================================
// Forward: CausalMultiField<T> -> MultiFieldCarrier<T>
// =============================================================================
// =============================================================================
// Reverse: MultiFieldCarrier<T> -> CausalMultiField<T>
// =============================================================================
// =============================================================================
// `StandardIso<CausalMultiField<T>, MultiFieldCarrier<T>>` is satisfied
// automatically via the blanket impl in `deep_causality_num`. No manual
// `Iso<S, T>` impl needed; no marker subtraits.
// =============================================================================