coordinate-system 7.0.1__tar.gz → 7.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {coordinate_system-7.0.1/coordinate_system.egg-info → coordinate_system-7.0.2}/PKG-INFO +7 -7
- {coordinate_system-7.0.1 → coordinate_system-7.0.2}/README.md +3 -3
- {coordinate_system-7.0.1 → coordinate_system-7.0.2}/coordinate_system/__init__.py +97 -54
- {coordinate_system-7.0.1 → coordinate_system-7.0.2}/coordinate_system/complex_geometric_physics.py +128 -120
- {coordinate_system-7.0.1 → coordinate_system-7.0.2}/coordinate_system/curve_interpolation.py +4 -3
- {coordinate_system-7.0.1 → coordinate_system-7.0.2}/coordinate_system/differential_geometry.py +81 -1
- {coordinate_system-7.0.1 → coordinate_system-7.0.2}/coordinate_system/spectral_geometry.py +1169 -1185
- {coordinate_system-7.0.1 → coordinate_system-7.0.2}/coordinate_system/u3_frame.py +4 -4
- {coordinate_system-7.0.1 → coordinate_system-7.0.2}/coordinate_system/visualization.py +4 -3
- {coordinate_system-7.0.1 → coordinate_system-7.0.2/coordinate_system.egg-info}/PKG-INFO +7 -7
- {coordinate_system-7.0.1 → coordinate_system-7.0.2}/coordinate_system_binding.cpp +4 -3
- {coordinate_system-7.0.1 → coordinate_system-7.0.2}/pmsys_minimal.hpp +274 -276
- {coordinate_system-7.0.1 → coordinate_system-7.0.2}/pyproject.toml +3 -3
- {coordinate_system-7.0.1 → coordinate_system-7.0.2}/setup.py +5 -4
- {coordinate_system-7.0.1 → coordinate_system-7.0.2}/LICENSE +0 -0
- {coordinate_system-7.0.1 → coordinate_system-7.0.2}/MANIFEST.in +0 -0
- {coordinate_system-7.0.1 → coordinate_system-7.0.2}/coordinate_system.egg-info/SOURCES.txt +0 -0
- {coordinate_system-7.0.1 → coordinate_system-7.0.2}/coordinate_system.egg-info/dependency_links.txt +0 -0
- {coordinate_system-7.0.1 → coordinate_system-7.0.2}/coordinate_system.egg-info/not-zip-safe +0 -0
- {coordinate_system-7.0.1 → coordinate_system-7.0.2}/coordinate_system.egg-info/requires.txt +0 -0
- {coordinate_system-7.0.1 → coordinate_system-7.0.2}/coordinate_system.egg-info/top_level.txt +0 -0
- {coordinate_system-7.0.1 → coordinate_system-7.0.2}/setup.cfg +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: coordinate_system
|
|
3
|
-
Version: 7.0.
|
|
3
|
+
Version: 7.0.2
|
|
4
4
|
Summary: High-performance 3D coordinate system library with unified differential geometry, quantum frame algebra, and Christmas Equation (CFUT)
|
|
5
5
|
Home-page: https://github.com/panguojun/Coordinate-System
|
|
6
|
-
Author:
|
|
7
|
-
Author-email:
|
|
6
|
+
Author: Pan Guojun
|
|
7
|
+
Author-email: Pan Guojun <18858146@qq.com>
|
|
8
8
|
License: MIT
|
|
9
9
|
Project-URL: Homepage, https://github.com/panguojun/Coordinate-System
|
|
10
10
|
Project-URL: Documentation, https://github.com/panguojun/Coordinate-System/blob/main/README.md
|
|
11
11
|
Project-URL: Repository, https://github.com/panguojun/Coordinate-System
|
|
12
12
|
Project-URL: Bug Reports, https://github.com/panguojun/Coordinate-System/issues
|
|
13
|
-
Project-URL: DOI, https://
|
|
13
|
+
Project-URL: DOI, https://doi.org/10.5281/zenodo.14435613
|
|
14
14
|
Keywords: 3d,math,vector,quaternion,coordinate-system,geometry,differential-geometry,curvature,spectral-analysis,christmas-equation,cfut,unified-field-theory,complex-frame
|
|
15
15
|
Platform: Windows
|
|
16
16
|
Platform: Linux
|
|
@@ -50,10 +50,10 @@ Requires-Dist: matplotlib>=3.3.0
|
|
|
50
50
|
[](https://pypi.org/project/coordinate-system/)
|
|
51
51
|
[](LICENSE)
|
|
52
52
|
|
|
53
|
-
**
|
|
53
|
+
**Authors:** Pan Guojun
|
|
54
54
|
**Version:** 7.0.1
|
|
55
55
|
**License:** MIT
|
|
56
|
-
**DOI:**
|
|
56
|
+
**DOI:** https://doi.org/10.5281/zenodo.14435613
|
|
57
57
|
|
|
58
58
|
---
|
|
59
59
|
|
|
@@ -253,7 +253,7 @@ S_YM = F_xy.yang_mills_action()
|
|
|
253
253
|
- **EnergyMomentumTensor**: Real-imaginary tensor decomposition
|
|
254
254
|
- **Unified Field Solver**: Einstein tensor, Chern-Simons current, topological energy-momentum
|
|
255
255
|
- **Complete English Translation**: All documentation and code comments in English
|
|
256
|
-
- **DOI
|
|
256
|
+
- **DOI:** https://doi.org/10.5281/zenodo.14435613
|
|
257
257
|
|
|
258
258
|
### v6.0.4 (2025-12-08)
|
|
259
259
|
- `frames.py` → `spectral_geometry.py`
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
[](https://pypi.org/project/coordinate-system/)
|
|
7
7
|
[](LICENSE)
|
|
8
8
|
|
|
9
|
-
**
|
|
9
|
+
**Authors:** Pan Guojun
|
|
10
10
|
**Version:** 7.0.1
|
|
11
11
|
**License:** MIT
|
|
12
|
-
**DOI:**
|
|
12
|
+
**DOI:** https://doi.org/10.5281/zenodo.14435613
|
|
13
13
|
|
|
14
14
|
---
|
|
15
15
|
|
|
@@ -209,7 +209,7 @@ S_YM = F_xy.yang_mills_action()
|
|
|
209
209
|
- **EnergyMomentumTensor**: Real-imaginary tensor decomposition
|
|
210
210
|
- **Unified Field Solver**: Einstein tensor, Chern-Simons current, topological energy-momentum
|
|
211
211
|
- **Complete English Translation**: All documentation and code comments in English
|
|
212
|
-
- **DOI
|
|
212
|
+
- **DOI:** https://doi.org/10.5281/zenodo.14435613
|
|
213
213
|
|
|
214
214
|
### v6.0.4 (2025-12-08)
|
|
215
215
|
- `frames.py` → `spectral_geometry.py`
|
|
@@ -23,13 +23,23 @@ Group Correspondence:
|
|
|
23
23
|
- FourierFrame ∈ GL(1,C) = U(1) × R⁺
|
|
24
24
|
- U3Frame ∈ U(3) = SU(3) × U(1)
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
**Authors:** Pan Guojun
|
|
27
|
+
Version: 7.0.1
|
|
28
|
+
**DOI:** https://doi.org/10.5281/zenodo.14435613
|
|
28
29
|
"""
|
|
29
30
|
|
|
30
31
|
__version__ = '7.0.1'
|
|
31
32
|
|
|
32
|
-
from .coordinate_system import
|
|
33
|
+
from .coordinate_system import (
|
|
34
|
+
vec3,
|
|
35
|
+
vec2,
|
|
36
|
+
cross,
|
|
37
|
+
cross_right,
|
|
38
|
+
set_handedness,
|
|
39
|
+
get_handedness,
|
|
40
|
+
is_left_handed,
|
|
41
|
+
is_right_handed,
|
|
42
|
+
)
|
|
33
43
|
from .coordinate_system import quat
|
|
34
44
|
from .coordinate_system import coord3
|
|
35
45
|
|
|
@@ -41,24 +51,32 @@ from .differential_geometry import (
|
|
|
41
51
|
Torus,
|
|
42
52
|
|
|
43
53
|
# Core classes
|
|
44
|
-
MetricTensor,
|
|
45
|
-
GradientResult,
|
|
46
|
-
IntrinsicGradientOperator,
|
|
47
|
-
IntrinsicGradientCurvatureCalculator,
|
|
48
|
-
|
|
54
|
+
MetricTensor,
|
|
55
|
+
GradientResult,
|
|
56
|
+
IntrinsicGradientOperator,
|
|
57
|
+
IntrinsicGradientCurvatureCalculator,
|
|
58
|
+
LieGroupCurvatureCalculator,
|
|
59
|
+
CurvatureCalculator,
|
|
49
60
|
|
|
50
61
|
# Intrinsic gradient method functions (default)
|
|
51
|
-
compute_gaussian_curvature,
|
|
52
|
-
compute_mean_curvature,
|
|
53
|
-
compute_riemann_curvature,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
+
compute_gaussian_curvature,
|
|
63
|
+
compute_mean_curvature,
|
|
64
|
+
compute_riemann_curvature,
|
|
65
|
+
compute_curvature_tensor,
|
|
66
|
+
compute_all_curvatures,
|
|
67
|
+
compute_intrinsic_gradient,
|
|
68
|
+
|
|
69
|
+
# Intrinsic gradient legacy aliases
|
|
70
|
+
intrinsic_gradient_gaussian_curvature,
|
|
71
|
+
intrinsic_gradient_mean_curvature,
|
|
72
|
+
intrinsic_gradient_principal_curvatures,
|
|
73
|
+
intrinsic_gradient_all_curvatures,
|
|
74
|
+
|
|
75
|
+
# Classical method functions
|
|
76
|
+
gaussian_curvature_classical,
|
|
77
|
+
mean_curvature_classical,
|
|
78
|
+
principal_curvatures_classical,
|
|
79
|
+
all_curvatures_classical,
|
|
62
80
|
|
|
63
81
|
# Backward compatibility aliases
|
|
64
82
|
gaussian_curvature,
|
|
@@ -66,8 +84,9 @@ from .differential_geometry import (
|
|
|
66
84
|
principal_curvatures,
|
|
67
85
|
all_curvatures,
|
|
68
86
|
|
|
69
|
-
# Method comparison
|
|
70
|
-
compare_methods,
|
|
87
|
+
# Method comparison
|
|
88
|
+
compare_methods,
|
|
89
|
+
gaussian_curvature_lie,
|
|
71
90
|
|
|
72
91
|
# Utility functions
|
|
73
92
|
derivative_5pt,
|
|
@@ -115,10 +134,11 @@ from .u3_frame import (
|
|
|
115
134
|
)
|
|
116
135
|
|
|
117
136
|
# Complex Geometric Physics module (Christmas Equation, CFUT)
|
|
118
|
-
from .complex_geometric_physics import (
|
|
119
|
-
# Core classes (U3Frame imported from u3_frame module above)
|
|
120
|
-
|
|
121
|
-
|
|
137
|
+
from .complex_geometric_physics import (
|
|
138
|
+
# Core classes (U3Frame imported from u3_frame module above)
|
|
139
|
+
ComplexFrame,
|
|
140
|
+
EnergyMomentumTensor,
|
|
141
|
+
ChristmasEquation,
|
|
122
142
|
|
|
123
143
|
# Utility functions
|
|
124
144
|
create_flat_spacetime_frame,
|
|
@@ -158,22 +178,28 @@ __all__ = [
|
|
|
158
178
|
# Constants
|
|
159
179
|
'ZERO3', 'UNITX', 'UNITY', 'UNITZ', 'ONE3', 'ONE4', 'ONEC',
|
|
160
180
|
|
|
161
|
-
# Core types
|
|
162
|
-
'vec3', 'vec2', 'quat', 'coord3', 'lerp',
|
|
181
|
+
# Core types
|
|
182
|
+
'vec3', 'vec2', 'quat', 'coord3', 'lerp', 'cross', 'cross_right',
|
|
183
|
+
'set_handedness', 'get_handedness', 'is_left_handed', 'is_right_handed',
|
|
163
184
|
|
|
164
185
|
# Differential geometry - Surface classes
|
|
165
186
|
'Surface', 'Sphere', 'Torus',
|
|
166
187
|
|
|
167
188
|
# Differential geometry - Core classes
|
|
168
189
|
'MetricTensor', 'GradientResult',
|
|
169
|
-
'IntrinsicGradientOperator', 'IntrinsicGradientCurvatureCalculator',
|
|
170
|
-
'
|
|
190
|
+
'IntrinsicGradientOperator', 'IntrinsicGradientCurvatureCalculator',
|
|
191
|
+
'LieGroupCurvatureCalculator',
|
|
192
|
+
'CurvatureCalculator',
|
|
171
193
|
|
|
172
194
|
# Differential geometry - Intrinsic gradient method (default)
|
|
173
|
-
'compute_gaussian_curvature', 'compute_mean_curvature',
|
|
174
|
-
'compute_riemann_curvature', 'compute_all_curvatures',
|
|
175
|
-
'compute_intrinsic_gradient',
|
|
176
|
-
|
|
195
|
+
'compute_gaussian_curvature', 'compute_mean_curvature',
|
|
196
|
+
'compute_riemann_curvature', 'compute_curvature_tensor', 'compute_all_curvatures',
|
|
197
|
+
'compute_intrinsic_gradient',
|
|
198
|
+
|
|
199
|
+
# Differential geometry - Intrinsic gradient legacy aliases
|
|
200
|
+
'intrinsic_gradient_gaussian_curvature', 'intrinsic_gradient_mean_curvature',
|
|
201
|
+
'intrinsic_gradient_principal_curvatures', 'intrinsic_gradient_all_curvatures',
|
|
202
|
+
|
|
177
203
|
# Differential geometry - Classical method
|
|
178
204
|
'gaussian_curvature_classical', 'mean_curvature_classical',
|
|
179
205
|
'principal_curvatures_classical', 'all_curvatures_classical',
|
|
@@ -183,8 +209,8 @@ __all__ = [
|
|
|
183
209
|
'principal_curvatures', 'all_curvatures',
|
|
184
210
|
|
|
185
211
|
# Differential geometry - Comparison and utilities
|
|
186
|
-
'compare_methods',
|
|
187
|
-
'derivative_5pt', 'derivative_2nd_5pt', 'richardson_extrapolation',
|
|
212
|
+
'compare_methods', 'gaussian_curvature_lie',
|
|
213
|
+
'derivative_5pt', 'derivative_2nd_5pt', 'richardson_extrapolation',
|
|
188
214
|
|
|
189
215
|
# Spectral geometry module (FourierFrame, GL(1,C))
|
|
190
216
|
'FourierFrame', 'FourierFrameSpectrum',
|
|
@@ -193,11 +219,17 @@ __all__ = [
|
|
|
193
219
|
'spectral_transform', 'inverse_spectral_transform',
|
|
194
220
|
'HBAR', 'GPU_AVAILABLE',
|
|
195
221
|
|
|
196
|
-
# U(3) Frame module (Gauge theory)
|
|
197
|
-
'U3Frame', 'SU3Component',
|
|
198
|
-
'GaugeConnection', 'FieldStrength',
|
|
199
|
-
'SymmetryBreakingPotential',
|
|
200
|
-
|
|
222
|
+
# U(3) Frame module (Gauge theory)
|
|
223
|
+
'U3Frame', 'SU3Component',
|
|
224
|
+
'GaugeConnection', 'FieldStrength',
|
|
225
|
+
'SymmetryBreakingPotential',
|
|
226
|
+
|
|
227
|
+
# Complex Geometric Physics
|
|
228
|
+
'ComplexFrame', 'EnergyMomentumTensor', 'ChristmasEquation',
|
|
229
|
+
'create_flat_spacetime_frame', 'create_curved_spacetime_frame',
|
|
230
|
+
'create_gauge_field_frame', 'M_PLANCK', 'LAMBDA_TOPO',
|
|
231
|
+
'ALPHA_FS', 'LAMBDA_C', 'ALPHA_PROJECTION',
|
|
232
|
+
|
|
201
233
|
# Visualization
|
|
202
234
|
'CoordinateSystemVisualizer', 'CurveVisualizer', 'ParametricCurve',
|
|
203
235
|
'visualize_coord_system', 'visualize_curve',
|
|
@@ -284,16 +316,26 @@ class CoordTuple(tuple):
|
|
|
284
316
|
return (result.x, result.y, result.z)
|
|
285
317
|
|
|
286
318
|
|
|
287
|
-
# Store original coord3 operators
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
319
|
+
# Store original coord3 operators
|
|
320
|
+
_original_coord3_init = coord3.__init__
|
|
321
|
+
_original_coord3_mul = coord3.__mul__
|
|
322
|
+
_original_coord3_rmul = coord3.__rmul__
|
|
323
|
+
_original_coord3_truediv = getattr(coord3, '__truediv__', None)
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
def _new_coord3_init(self, *args, **kwargs):
|
|
327
|
+
"""Extended coord3 initializer with two-axis convenience."""
|
|
328
|
+
if len(args) == 2 and all(isinstance(arg, vec3) for arg in args):
|
|
329
|
+
ux, uy = args
|
|
330
|
+
uz = ux.cross(uy)
|
|
331
|
+
return _original_coord3_init(self, ux, uy, uz)
|
|
332
|
+
return _original_coord3_init(self, *args, **kwargs)
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
def _new_coord3_mul(self, other):
|
|
336
|
+
"""Enhanced multiplication operator for coord3."""
|
|
337
|
+
if isinstance(other, tuple):
|
|
338
|
+
other = CoordTuple(other)
|
|
297
339
|
return other * self
|
|
298
340
|
return _original_coord3_mul(self, other)
|
|
299
341
|
|
|
@@ -316,7 +358,8 @@ def _new_coord3_truediv(self, other):
|
|
|
316
358
|
raise TypeError(f"unsupported operand type(s) for /: 'coord3' and {type(other).__name__}")
|
|
317
359
|
|
|
318
360
|
|
|
319
|
-
# Apply enhancements to coord3 operators
|
|
320
|
-
coord3.
|
|
321
|
-
coord3.
|
|
322
|
-
coord3.
|
|
361
|
+
# Apply enhancements to coord3 operators
|
|
362
|
+
coord3.__init__ = _new_coord3_init
|
|
363
|
+
coord3.__mul__ = _new_coord3_mul
|
|
364
|
+
coord3.__rmul__ = _new_coord3_rmul
|
|
365
|
+
coord3.__truediv__ = _new_coord3_truediv
|
{coordinate_system-7.0.1 → coordinate_system-7.0.2}/coordinate_system/complex_geometric_physics.py
RENAMED
|
@@ -1,33 +1,34 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Complex Geometric Physics - Unified Framework
|
|
3
|
-
================================================================================
|
|
4
|
-
|
|
5
|
-
Implementation of the "Christmas Equation" and Complex Frame Unified Theory (CFUT)
|
|
6
|
-
|
|
7
|
-
The Christmas Equation (
|
|
8
|
-
M_P
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
- T̂_
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
- Real
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
"""
|
|
2
|
+
Complex Geometric Physics - Unified Framework
|
|
3
|
+
================================================================================
|
|
4
|
+
|
|
5
|
+
Implementation of the "Christmas Equation" and Complex Frame Unified Theory (CFUT).
|
|
6
|
+
|
|
7
|
+
The Christmas Equation (complete complex form):
|
|
8
|
+
(M_P^2 / 2) Ĝ_{μν}[U] + (λ / (32π^2)) ∇̂_{(μ} K̄_{ν)}[U]
|
|
9
|
+
= T̂_{μν}^{(top)}[U] + T̂_{μν}^{(mat)}
|
|
10
|
+
|
|
11
|
+
Where:
|
|
12
|
+
- Ĝ_{μν}: Einstein tensor from complex frame U(x)
|
|
13
|
+
- K̄_μ: Chern-Simons current (topological)
|
|
14
|
+
- T̂_{μν}^{(top)}: Topological energy-momentum tensor
|
|
15
|
+
- T̂_{μν}^{(mat)}: Matter energy-momentum tensor
|
|
16
|
+
|
|
17
|
+
Core Theory:
|
|
18
|
+
- Universe as U(3) complex frame field: U(x) ∈ U(3)
|
|
19
|
+
- Real-imaginary decomposition: U = U^(R) + i U^(I)
|
|
20
|
+
- Real part: geometric properties (metric, curvature, spacetime)
|
|
21
|
+
- Imaginary part: topological properties (phase winding, gauge symmetry)
|
|
22
|
+
|
|
23
|
+
Physical Interpretation:
|
|
24
|
+
- Geometry + Topology = Complex Matter + Topological Force
|
|
25
|
+
- Unifies gravity, gauge fields, dark matter, and topology
|
|
26
|
+
|
|
27
|
+
**Authors:** Pan Guojun
|
|
28
|
+
Date: 2025-01-14
|
|
29
|
+
Version: 7.0.1
|
|
30
|
+
**DOI:** https://doi.org/10.5281/zenodo.14435613
|
|
31
|
+
"""
|
|
31
32
|
|
|
32
33
|
__version__ = '7.0.1'
|
|
33
34
|
|
|
@@ -36,20 +37,20 @@ from typing import Tuple, Optional, Callable, Dict, Any
|
|
|
36
37
|
from dataclasses import dataclass
|
|
37
38
|
import warnings
|
|
38
39
|
|
|
39
|
-
# Physical constants (SI units for precision calculations)
|
|
40
|
-
HBAR_SI = 1.054571817e-34 # Reduced Planck constant [J·s]
|
|
41
|
-
H_PLANCK_SI = 6.62607015e-34 # Planck constant [J·s]
|
|
40
|
+
# Physical constants (SI units for precision calculations)
|
|
41
|
+
HBAR_SI = 1.054571817e-34 # Reduced Planck constant [J·s]
|
|
42
|
+
H_PLANCK_SI = 6.62607015e-34 # Planck constant [J·s]
|
|
42
43
|
C_LIGHT_SI = 2.99792458e8 # Speed of light [m/s]
|
|
43
44
|
E_CHARGE_SI = 1.602176634e-19 # Elementary charge [C]
|
|
44
45
|
EPSILON_0_SI = 8.8541878128e-12 # Vacuum permittivity [F/m]
|
|
45
46
|
M_ELECTRON_SI = 9.1093837015e-31 # Electron mass [kg]
|
|
46
47
|
|
|
47
48
|
# Derived constants
|
|
48
|
-
ALPHA_FS = E_CHARGE_SI**2 / (4 * np.pi * EPSILON_0_SI * HBAR_SI * C_LIGHT_SI) # Fine structure constant ≈ 1/137
|
|
49
|
-
LAMBDA_C = H_PLANCK_SI / (M_ELECTRON_SI * C_LIGHT_SI) # Compton wavelength [m]
|
|
50
|
-
ALPHA_PROJECTION = ALPHA_FS * LAMBDA_C # Projection factor α ≈ 1.77×10⁻¹⁴ m
|
|
51
|
-
|
|
52
|
-
# Physical constants (natural units: ℏ = c = 1)
|
|
49
|
+
ALPHA_FS = E_CHARGE_SI**2 / (4 * np.pi * EPSILON_0_SI * HBAR_SI * C_LIGHT_SI) # Fine structure constant ≈ 1/137
|
|
50
|
+
LAMBDA_C = H_PLANCK_SI / (M_ELECTRON_SI * C_LIGHT_SI) # Compton wavelength [m]
|
|
51
|
+
ALPHA_PROJECTION = ALPHA_FS * LAMBDA_C # Projection factor α ≈ 1.77×10⁻¹⁴ m
|
|
52
|
+
|
|
53
|
+
# Physical constants (natural units: ℏ = c = 1)
|
|
53
54
|
M_PLANCK = 2.435e18 # Planck mass [GeV]
|
|
54
55
|
LAMBDA_TOPO = 0.1008 # Topological coupling constant (from theory)
|
|
55
56
|
HBAR = 1.0 # Reduced Planck constant (natural units)
|
|
@@ -67,30 +68,33 @@ except ImportError:
|
|
|
67
68
|
FieldStrength = None
|
|
68
69
|
warnings.warn("U3Frame not available. Some features will be limited.")
|
|
69
70
|
|
|
71
|
+
# Compatibility alias for older APIs.
|
|
72
|
+
ComplexFrame = U3Frame
|
|
73
|
+
|
|
70
74
|
|
|
71
75
|
# ============================================================
|
|
72
76
|
# Core Data Structures
|
|
73
77
|
# ============================================================
|
|
74
78
|
|
|
75
79
|
@dataclass
|
|
76
|
-
class EnergyMomentumTensor:
|
|
77
|
-
"""
|
|
78
|
-
Energy-momentum tensor T_μν
|
|
79
|
-
|
|
80
|
-
Decomposition:
|
|
81
|
-
T_μν = T_
|
|
82
|
-
- Real part: mass-energy density
|
|
83
|
-
- Imaginary part: charge current
|
|
84
|
-
"""
|
|
85
|
-
real_part: np.ndarray # 4×4 real symmetric tensor
|
|
86
|
-
imag_part: np.ndarray # 4×4 real tensor
|
|
80
|
+
class EnergyMomentumTensor:
|
|
81
|
+
"""
|
|
82
|
+
Energy-momentum tensor T_{μν}
|
|
83
|
+
|
|
84
|
+
Decomposition:
|
|
85
|
+
T_{μν} = T_{μν}^{(R)} + i T_{μν}^{(I)}
|
|
86
|
+
- Real part: mass-energy density
|
|
87
|
+
- Imaginary part: charge current
|
|
88
|
+
"""
|
|
89
|
+
real_part: np.ndarray # 4×4 real symmetric tensor
|
|
90
|
+
imag_part: np.ndarray # 4×4 real tensor
|
|
87
91
|
|
|
88
92
|
def __post_init__(self):
|
|
89
|
-
"""Validate tensor structure"""
|
|
90
|
-
if self.real_part.shape != (4, 4):
|
|
91
|
-
raise ValueError(f"Real part must be 4×4, got {self.real_part.shape}")
|
|
92
|
-
if self.imag_part.shape != (4, 4):
|
|
93
|
-
raise ValueError(f"Imaginary part must be 4×4, got {self.imag_part.shape}")
|
|
93
|
+
"""Validate tensor structure"""
|
|
94
|
+
if self.real_part.shape != (4, 4):
|
|
95
|
+
raise ValueError(f"Real part must be 4×4, got {self.real_part.shape}")
|
|
96
|
+
if self.imag_part.shape != (4, 4):
|
|
97
|
+
raise ValueError(f"Imaginary part must be 4×4, got {self.imag_part.shape}")
|
|
94
98
|
|
|
95
99
|
@property
|
|
96
100
|
def complex_tensor(self) -> np.ndarray:
|
|
@@ -110,46 +114,47 @@ class EnergyMomentumTensor:
|
|
|
110
114
|
# Christmas Equation Implementation
|
|
111
115
|
# ============================================================
|
|
112
116
|
|
|
113
|
-
class ChristmasEquation:
|
|
114
|
-
"""
|
|
115
|
-
The Christmas Equation -
|
|
116
|
-
|
|
117
|
-
Complete form:
|
|
118
|
-
M_P
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
117
|
+
class ChristmasEquation:
|
|
118
|
+
"""
|
|
119
|
+
The Christmas Equation - unified field equation
|
|
120
|
+
|
|
121
|
+
Complete form:
|
|
122
|
+
(M_P^2 / 2) Ĝ_{μν}[U] + (λ / (32π^2)) ∇̂_{(μ} K̄_{ν)}[U]
|
|
123
|
+
= T̂_{μν}^{(top)}[U] + T̂_{μν}^{(mat)}
|
|
124
|
+
|
|
125
|
+
Components:
|
|
126
|
+
- Left side: Geometry + Topology
|
|
127
|
+
- Right side: Topological source + Matter source
|
|
128
|
+
"""
|
|
129
|
+
|
|
130
|
+
def __init__(self,
|
|
131
|
+
planck_mass: float = M_PLANCK,
|
|
132
|
+
topo_coupling: float = LAMBDA_TOPO,
|
|
133
|
+
projection_factor: float = ALPHA_PROJECTION):
|
|
134
|
+
"""
|
|
135
|
+
Initialize Christmas Equation solver.
|
|
136
|
+
|
|
137
|
+
Args:
|
|
138
|
+
planck_mass: Planck mass M_P [GeV]
|
|
139
|
+
topo_coupling: Topological coupling constant λ
|
|
140
|
+
projection_factor: Projection factor α = α_fs × λ_c [m]
|
|
141
|
+
"""
|
|
137
142
|
self.M_P = planck_mass
|
|
138
143
|
self.lambda_topo = topo_coupling
|
|
139
144
|
self.alpha_proj = projection_factor
|
|
140
145
|
|
|
141
|
-
def einstein_tensor(self, frame: U3Frame) -> np.ndarray:
|
|
142
|
-
"""
|
|
143
|
-
Compute Einstein tensor Ĝ_μν from complex frame
|
|
144
|
-
|
|
145
|
-
Ĝ_μν = R_μν - (1/2)g_μν R
|
|
146
|
-
|
|
147
|
-
Args:
|
|
148
|
-
frame: Complex frame field U(x)
|
|
149
|
-
|
|
150
|
-
Returns:
|
|
151
|
-
3×3 Einstein tensor (spatial part)
|
|
152
|
-
"""
|
|
146
|
+
def einstein_tensor(self, frame: U3Frame) -> np.ndarray:
|
|
147
|
+
"""
|
|
148
|
+
Compute Einstein tensor Ĝ_{μν} from complex frame.
|
|
149
|
+
|
|
150
|
+
Ĝ_{μν} = R_{μν} - (1/2) g_{μν} R
|
|
151
|
+
|
|
152
|
+
Args:
|
|
153
|
+
frame: Complex frame field U(x)
|
|
154
|
+
|
|
155
|
+
Returns:
|
|
156
|
+
3×3 Einstein tensor (spatial part)
|
|
157
|
+
"""
|
|
153
158
|
# Extract metric from real part
|
|
154
159
|
g = frame.metric_tensor
|
|
155
160
|
|
|
@@ -166,14 +171,14 @@ class ChristmasEquation:
|
|
|
166
171
|
|
|
167
172
|
return G_tensor
|
|
168
173
|
|
|
169
|
-
def chern_simons_current(self, frame: U3Frame) -> np.ndarray:
|
|
170
|
-
"""
|
|
171
|
-
Compute Chern-Simons current K̄_μ from imaginary part
|
|
172
|
-
|
|
173
|
-
K̄_μ = ε_μνρσ Tr(A^ν F
|
|
174
|
-
|
|
175
|
-
Args:
|
|
176
|
-
frame: Complex frame field U(x)
|
|
174
|
+
def chern_simons_current(self, frame: U3Frame) -> np.ndarray:
|
|
175
|
+
"""
|
|
176
|
+
Compute Chern-Simons current K̄_μ from imaginary part.
|
|
177
|
+
|
|
178
|
+
K̄_μ = ε_{μνρσ} Tr(A^ν F^{ρσ} - (2/3) A^ν A^ρ A^σ)
|
|
179
|
+
|
|
180
|
+
Args:
|
|
181
|
+
frame: Complex frame field U(x)
|
|
177
182
|
|
|
178
183
|
Returns:
|
|
179
184
|
4-vector Chern-Simons current
|
|
@@ -193,9 +198,9 @@ class ChristmasEquation:
|
|
|
193
198
|
|
|
194
199
|
return K_current
|
|
195
200
|
|
|
196
|
-
def topological_energy_momentum(self, frame: U3Frame) -> EnergyMomentumTensor:
|
|
197
|
-
"""
|
|
198
|
-
Compute topological energy-momentum tensor T̂_
|
|
201
|
+
def topological_energy_momentum(self, frame: U3Frame) -> EnergyMomentumTensor:
|
|
202
|
+
"""
|
|
203
|
+
Compute topological energy-momentum tensor T̂_{μν}^{(top)}.
|
|
199
204
|
|
|
200
205
|
From topological defects (instantons, vortices)
|
|
201
206
|
|
|
@@ -222,13 +227,14 @@ class ChristmasEquation:
|
|
|
222
227
|
|
|
223
228
|
return EnergyMomentumTensor(T_real, T_imag)
|
|
224
229
|
|
|
225
|
-
def solve_christmas_equation(self,
|
|
226
|
-
frame: U3Frame,
|
|
227
|
-
matter_tensor: EnergyMomentumTensor) -> Dict[str, Any]:
|
|
228
|
-
"""
|
|
229
|
-
Solve the Christmas Equation
|
|
230
|
-
|
|
231
|
-
M_P
|
|
230
|
+
def solve_christmas_equation(self,
|
|
231
|
+
frame: U3Frame,
|
|
232
|
+
matter_tensor: EnergyMomentumTensor) -> Dict[str, Any]:
|
|
233
|
+
"""
|
|
234
|
+
Solve the Christmas Equation.
|
|
235
|
+
|
|
236
|
+
(M_P^2 / 2) Ĝ_{μν} + (λ / (32π^2)) ∇̂_{(μ} K̄_{ν)}
|
|
237
|
+
= T̂_{μν}^{(top)} + T̂_{μν}^{(mat)}
|
|
232
238
|
|
|
233
239
|
Args:
|
|
234
240
|
frame: Complex frame field U(x)
|
|
@@ -275,8 +281,8 @@ class ChristmasEquation:
|
|
|
275
281
|
"""
|
|
276
282
|
Compute Ricci tensor from frame (simplified)
|
|
277
283
|
|
|
278
|
-
In full implementation, use intrinsic gradient method:
|
|
279
|
-
R_μν = [G_μ, G_ν] where G_μ = ∂_μ log U
|
|
284
|
+
In full implementation, use intrinsic gradient method:
|
|
285
|
+
R_{μν} = [G_μ, G_ν] where G_μ = ∂_μ log U
|
|
280
286
|
|
|
281
287
|
Args:
|
|
282
288
|
frame: Complex frame field
|
|
@@ -295,7 +301,7 @@ class ChristmasEquation:
|
|
|
295
301
|
|
|
296
302
|
def _compute_field_strength(self, frame: U3Frame) -> np.ndarray:
|
|
297
303
|
"""
|
|
298
|
-
Compute field strength tensor F_μν = ∂_μ A_ν - ∂_ν A_μ + [A_μ, A_ν]
|
|
304
|
+
Compute field strength tensor F_{μν} = ∂_μ A_ν - ∂_ν A_μ + [A_μ, A_ν]
|
|
299
305
|
|
|
300
306
|
Args:
|
|
301
307
|
frame: Complex frame field
|
|
@@ -305,14 +311,14 @@ class ChristmasEquation:
|
|
|
305
311
|
"""
|
|
306
312
|
A = frame.gauge_potential
|
|
307
313
|
|
|
308
|
-
# Simplified: F
|
|
314
|
+
# Simplified: F ~= [A, A]
|
|
309
315
|
F = A @ A - A.T @ A.T
|
|
310
316
|
|
|
311
317
|
return F
|
|
312
318
|
|
|
313
319
|
def _compute_topological_charge(self, frame: U3Frame) -> float:
|
|
314
320
|
"""
|
|
315
|
-
Compute topological charge Q = (1/32
|
|
321
|
+
Compute topological charge Q = (1/(32π^2)) ∫ Tr(F ∧ F)
|
|
316
322
|
|
|
317
323
|
Args:
|
|
318
324
|
frame: Complex frame field
|
|
@@ -412,6 +418,7 @@ def create_gauge_field_frame(field_strength: float = 0.1,
|
|
|
412
418
|
# ============================================================
|
|
413
419
|
|
|
414
420
|
__all__ = [
|
|
421
|
+
'ComplexFrame',
|
|
415
422
|
'U3Frame',
|
|
416
423
|
'EnergyMomentumTensor',
|
|
417
424
|
'ChristmasEquation',
|
|
@@ -458,7 +465,7 @@ def demonstrate():
|
|
|
458
465
|
|
|
459
466
|
solver = ChristmasEquation()
|
|
460
467
|
print(f" Planck mass M_P: {solver.M_P:.3e} GeV")
|
|
461
|
-
print(f" Topological coupling λ: {solver.lambda_topo:.4f}")
|
|
468
|
+
print(f" Topological coupling λ: {solver.lambda_topo:.4f}")
|
|
462
469
|
|
|
463
470
|
# 3. Compute geometric quantities
|
|
464
471
|
print("\n3. Geometric Quantities")
|
|
@@ -497,12 +504,13 @@ def demonstrate():
|
|
|
497
504
|
|
|
498
505
|
# 6. Theory summary
|
|
499
506
|
print("\n" + "=" * 80)
|
|
500
|
-
print("Core Theory Summary:")
|
|
501
|
-
print("
|
|
502
|
-
|
|
503
|
-
print("
|
|
504
|
-
print("
|
|
505
|
-
print("
|
|
507
|
+
print("Core Theory Summary:")
|
|
508
|
+
print(" - Christmas Equation: (M_P^2 / 2) Ĝ_{μν} + (λ / (32π^2)) ∇̂_{(μ} K̄_{ν)}"
|
|
509
|
+
" = T̂_{μν}^{(top)} + T̂_{μν}^{(mat)}")
|
|
510
|
+
print(" - U(x) = U^(R)(x) + iU^(I)(x) [Complex frame decomposition]")
|
|
511
|
+
print(" - Real part: Geometry (metric, curvature, spacetime)")
|
|
512
|
+
print(" - Imaginary part: Topology (phase, gauge field, winding)")
|
|
513
|
+
print(" - Unifies: Gravity + Gauge fields + Dark matter + Topology")
|
|
506
514
|
print("=" * 80)
|
|
507
515
|
|
|
508
516
|
|
{coordinate_system-7.0.1 → coordinate_system-7.0.2}/coordinate_system/curve_interpolation.py
RENAMED
|
@@ -12,9 +12,10 @@ Main Features:
|
|
|
12
12
|
- B-spline and frame field hybrid interpolation
|
|
13
13
|
- Curvature distribution analysis
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
Date: 2025-12-01
|
|
17
|
-
|
|
15
|
+
**Authors:** Pan Guojun
|
|
16
|
+
Date: 2025-12-01
|
|
17
|
+
**DOI:** https://doi.org/10.5281/zenodo.14435613
|
|
18
|
+
"""
|
|
18
19
|
|
|
19
20
|
import math
|
|
20
21
|
import numpy as np
|