universal-physics-tensor 0.4.6 → 0.5.1
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.
- package/dist/bridges/equations/be-37-shapiro-delay.d.ts.map +1 -1
- package/dist/bridges/equations/be-37-shapiro-delay.js +7 -9
- package/dist/bridges/equations/be-37-shapiro-delay.js.map +1 -1
- package/dist/bridges/gravitational-lensing.d.ts +13 -2
- package/dist/bridges/gravitational-lensing.d.ts.map +1 -1
- package/dist/bridges/gravitational-lensing.js +17 -6
- package/dist/bridges/gravitational-lensing.js.map +1 -1
- package/dist/bridges/perihelion-precession.d.ts +18 -3
- package/dist/bridges/perihelion-precession.d.ts.map +1 -1
- package/dist/bridges/perihelion-precession.js +22 -8
- package/dist/bridges/perihelion-precession.js.map +1 -1
- package/dist/core/constants.d.ts +50 -0
- package/dist/core/constants.d.ts.map +1 -0
- package/dist/core/constants.js +50 -0
- package/dist/core/constants.js.map +1 -0
- package/dist/dimensional/connection-validators.d.ts +60 -2
- package/dist/dimensional/connection-validators.d.ts.map +1 -1
- package/dist/dimensional/connection-validators.js +76 -2
- package/dist/dimensional/connection-validators.js.map +1 -1
- package/dist/dimensional/curvature.d.ts +361 -0
- package/dist/dimensional/curvature.d.ts.map +1 -0
- package/dist/dimensional/curvature.js +299 -0
- package/dist/dimensional/curvature.js.map +1 -0
- package/dist/dimensional/validator.d.ts +5 -3
- package/dist/dimensional/validator.d.ts.map +1 -1
- package/dist/dimensional/validator.js +58 -1
- package/dist/dimensional/validator.js.map +1 -1
- package/dist/index.d.ts +9 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -1
- package/dist/index.js.map +1 -1
- package/dist/numerical/be37-covariant-eikonal.d.ts +112 -39
- package/dist/numerical/be37-covariant-eikonal.d.ts.map +1 -1
- package/dist/numerical/be37-covariant-eikonal.js +219 -40
- package/dist/numerical/be37-covariant-eikonal.js.map +1 -1
- package/dist/numerical/curvature-lowering-helpers.d.ts +189 -0
- package/dist/numerical/curvature-lowering-helpers.d.ts.map +1 -0
- package/dist/numerical/curvature-lowering-helpers.js +412 -0
- package/dist/numerical/curvature-lowering-helpers.js.map +1 -0
- package/dist/numerical/engine-registry.js +4 -4
- package/dist/numerical/engine-registry.js.map +1 -1
- package/dist/numerical/errors.d.ts +16 -0
- package/dist/numerical/errors.d.ts.map +1 -1
- package/dist/numerical/errors.js +20 -0
- package/dist/numerical/errors.js.map +1 -1
- package/dist/numerical/gl4-integrator.d.ts +213 -0
- package/dist/numerical/gl4-integrator.d.ts.map +1 -0
- package/dist/numerical/gl4-integrator.js +307 -0
- package/dist/numerical/gl4-integrator.js.map +1 -0
- package/dist/numerical/index.d.ts +8 -0
- package/dist/numerical/index.d.ts.map +1 -1
- package/dist/numerical/index.js +4 -0
- package/dist/numerical/index.js.map +1 -1
- package/dist/numerical/lowering.d.ts.map +1 -1
- package/dist/numerical/lowering.js +180 -3
- package/dist/numerical/lowering.js.map +1 -1
- package/dist/numerical/mathts-engine.js +8 -8
- package/dist/numerical/mathts-engine.js.map +1 -1
- package/dist/numerical/metric-inverse.d.ts.map +1 -1
- package/dist/numerical/metric-inverse.js +28 -0
- package/dist/numerical/metric-inverse.js.map +1 -1
- package/dist/numerical/null-ray-integrator.d.ts.map +1 -1
- package/dist/numerical/null-ray-integrator.js +6 -3
- package/dist/numerical/null-ray-integrator.js.map +1 -1
- package/dist/numerical/pderiv.d.ts +27 -3
- package/dist/numerical/pderiv.d.ts.map +1 -1
- package/dist/numerical/pderiv.js +44 -12
- package/dist/numerical/pderiv.js.map +1 -1
- package/dist/numerical/perihelion-finder.d.ts +111 -0
- package/dist/numerical/perihelion-finder.d.ts.map +1 -0
- package/dist/numerical/perihelion-finder.js +288 -0
- package/dist/numerical/perihelion-finder.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"be-37-shapiro-delay.d.ts","sourceRoot":"","sources":["../../../src/bridges/equations/be-37-shapiro-del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C,CAAC;AAE1E;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,EAAE,QAGpC,CAAC;AAEF,6CAA6C;AAC7C,eAAO,MAAM,sBAAsB,EAAE,QAA+B,CAAC;AAIrE,MAAM,WAAW,aAAa;IAC5B,6DAA6D;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAC;IAChB,+EAA+E;IAC/E,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAuBjE;AAID;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,yBAAyB,CASlE;AAiED;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAAoD,CAAC;AAEpF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,QAInC,CAAC;AAEF;;;GAGG;AACH,wBAAgB,6BAA6B,IAAI,yBAAyB,CASzE;AA2CD;;;;;;;;;;;GAWG;AACH,wBAAsB,4BAA4B,IAAI,OAAO,CAAC;IAC5D,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,aAAa,CAAC;CACzB,CAAC,CAmCD"}
|
|
@@ -148,6 +148,7 @@ import { tsym, contract } from '../../dimensional/tensor.js';
|
|
|
148
148
|
import { metric, pderiv } from '../../dimensional/metric.js';
|
|
149
149
|
import { evaluateNumerical } from '../../numerical/index.js';
|
|
150
150
|
import { integrateRK4 } from '../../numerical/null-ray-integrator.js';
|
|
151
|
+
import { C_SI, G_SI } from '../../core/constants.js';
|
|
151
152
|
const sym = (name, dim) => ({ kind: 'symbol', name, dim });
|
|
152
153
|
// --- Symbolic AST ---
|
|
153
154
|
/** Symbol: Newton's gravitational constant G. Dim `[L³ M⁻¹ T⁻²]`. */
|
|
@@ -252,9 +253,7 @@ export function evaluateShapiroDelay(input) {
|
|
|
252
253
|
if (R_near_m > R_far_m) {
|
|
253
254
|
throw new RangeError(`evaluateShapiroDelay: R_near_m (${R_near_m}) must be ≤ R_far_m (${R_far_m}); ratio inside ln must be ≥ 1`);
|
|
254
255
|
}
|
|
255
|
-
|
|
256
|
-
const c_SI = 299792458; // m/s (exact SI definition since 1983)
|
|
257
|
-
return ((2 * G_SI * M_kg) / Math.pow(c_SI, 3)) * Math.log(R_far_m / R_near_m);
|
|
256
|
+
return ((2 * G_SI * M_kg) / Math.pow(C_SI, 3)) * Math.log(R_far_m / R_near_m);
|
|
258
257
|
}
|
|
259
258
|
// --- Self-validation ---
|
|
260
259
|
/**
|
|
@@ -398,20 +397,19 @@ function buildSchwarzschildEikonalInputs(r, G_SI, c_SI, M_kg) {
|
|
|
398
397
|
* evaluateShapiroDelay().
|
|
399
398
|
*/
|
|
400
399
|
export async function evaluateBE37EikonalNumerical() {
|
|
401
|
-
//
|
|
402
|
-
//
|
|
403
|
-
|
|
404
|
-
const c_SI = 299792458; // m/s — exact SI definition
|
|
400
|
+
// v0.5.1 PC-1: canonical constants from src/core/constants.ts — both
|
|
401
|
+
// evaluateShapiroDelay above and this evaluator now read the SAME source
|
|
402
|
+
// of truth, eliminating the prior local-literal duplication.
|
|
405
403
|
const scenario = {
|
|
406
404
|
M_kg: 1.989e30, // solar mass
|
|
407
405
|
R_far_m: 1.5e11, // ~1 AU
|
|
408
406
|
R_near_m: 1.0e9, // inner radius (R_near_m ≤ R_far_m, required)
|
|
409
407
|
};
|
|
410
408
|
const { M_kg, R_far_m, R_near_m } = scenario;
|
|
411
|
-
const k = (2 * G_SI * M_kg) / (
|
|
409
|
+
const k = (2 * G_SI * M_kg) / (C_SI * C_SI * C_SI); // 2GM/c³ [seconds]
|
|
412
410
|
// --- Part (a): lower BE37_EIKONAL_LHS with concrete Schwarzschild g^μν ---
|
|
413
411
|
const rMid = 0.5 * (R_near_m + R_far_m);
|
|
414
|
-
const inputs = buildSchwarzschildEikonalInputs(rMid, G_SI,
|
|
412
|
+
const inputs = buildSchwarzschildEikonalInputs(rMid, G_SI, C_SI, M_kg);
|
|
415
413
|
const eikonal = await evaluateNumerical(BE37_EIKONAL_LHS, inputs);
|
|
416
414
|
const eikonalResidual = eikonal.value;
|
|
417
415
|
// --- Part (b): RK4-integrate the Shapiro delay along the radial null ray.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"be-37-shapiro-delay.js","sourceRoot":"","sources":["../../../src/bridges/equations/be-37-shapiro-delay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8IG;AAQH,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAEL,aAAa,EACb,IAAI,EACJ,IAAI,EACJ,MAAM,GACP,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,gCAAgC,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"be-37-shapiro-delay.js","sourceRoot":"","sources":["../../../src/bridges/equations/be-37-shapiro-delay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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BAAiB,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;IAClE,MAAM,eAAe,GAAG,OAAO,CAAC,KAAe,CAAC;IAEhD,2EAA2E;IAC3E,iDAAiD;IACjD,gFAAgF;IAChF,MAAM,EAAE,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC9B,MAAM,UAAU,GAAG,YAAY,CAC7B,CAAC,MAAM,EAAE,EAAE;QACT,MAAM,CAAC,GAAG,QAAQ,GAAG,MAAM,GAAG,EAAE,CAAC;QACjC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,CAAC,EACD,CAAC,CAAC,CAAC,EACH,CAAC,EAAE,CAAC,EACJ,IAAI,CACL,CAAC;IACF,MAAM,eAAe,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;IACtC,MAAM,eAAe,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IAEvD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,QAAQ,EAAE,CAAC;AACzE,CAAC"}
|
|
@@ -42,8 +42,19 @@ export interface GravitationalLensingResult {
|
|
|
42
42
|
* Evaluate the Eddington 1919 gravitational lensing deflection angle
|
|
43
43
|
* for a point mass M at impact parameter b.
|
|
44
44
|
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
45
|
+
* Closed-form formula: `α = 4 G M / (b c²)`.
|
|
46
|
+
*
|
|
47
|
+
* @param inputs - `{ M_kg, b_m }`:
|
|
48
|
+
* - `M_kg` — lensing (point) mass in **kilograms** (SI). Must be finite;
|
|
49
|
+
* no positivity check (a negative mass yields a negative deflection by
|
|
50
|
+
* the linear formula, which the caller may exploit for symmetry tests).
|
|
51
|
+
* - `b_m` — impact parameter (closest approach distance) in **metres**
|
|
52
|
+
* (SI). Must be strictly positive.
|
|
53
|
+
* @returns `{ alpha_rad, alpha_arcsec, M_kg, b_m }`:
|
|
54
|
+
* - `alpha_rad` — deflection angle in **radians** (dimensionless SI).
|
|
55
|
+
* - `alpha_arcsec` — deflection angle in **arc-seconds**
|
|
56
|
+
* (1 rad = 180/π × 3600 ≈ 206264.806 arcsec).
|
|
57
|
+
* - `M_kg`, `b_m` — input echoes (same units as above).
|
|
47
58
|
* @throws {RangeError} if `b_m ≤ 0`.
|
|
48
59
|
*
|
|
49
60
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gravitational-lensing.d.ts","sourceRoot":"","sources":["../../src/bridges/gravitational-lensing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAOH,MAAM,WAAW,0BAA0B;IACzC,iCAAiC;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,8DAA8D;IAC9D,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,0BAA0B;IACzC,kDAAkD;IAClD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,8DAA8D;IAC9D,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,2CAA2C;IAC3C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,8CAA8C;IAC9C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED
|
|
1
|
+
{"version":3,"file":"gravitational-lensing.d.ts","sourceRoot":"","sources":["../../src/bridges/gravitational-lensing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAOH,MAAM,WAAW,0BAA0B;IACzC,iCAAiC;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,8DAA8D;IAC9D,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,0BAA0B;IACzC,kDAAkD;IAClD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,8DAA8D;IAC9D,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,2CAA2C;IAC3C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,8CAA8C;IAC9C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,0BAA0B,GACjC,0BAA0B,CAU5B"}
|
|
@@ -22,16 +22,27 @@
|
|
|
22
22
|
*
|
|
23
23
|
* @module bridges/gravitational-lensing
|
|
24
24
|
*/
|
|
25
|
-
// Numerical SI constants —
|
|
26
|
-
// src/
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
// Numerical SI constants — canonical CODATA 2018 / exact-SI values from
|
|
26
|
+
// src/core/constants.ts (v0.5.1 PC-1 canonicalization). NOT the dimensional
|
|
27
|
+
// Dimension objects from src/dimensional/constants.ts.
|
|
28
|
+
import { C_SI as c_SI, G_SI } from '../core/constants.js';
|
|
29
29
|
/**
|
|
30
30
|
* Evaluate the Eddington 1919 gravitational lensing deflection angle
|
|
31
31
|
* for a point mass M at impact parameter b.
|
|
32
32
|
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
33
|
+
* Closed-form formula: `α = 4 G M / (b c²)`.
|
|
34
|
+
*
|
|
35
|
+
* @param inputs - `{ M_kg, b_m }`:
|
|
36
|
+
* - `M_kg` — lensing (point) mass in **kilograms** (SI). Must be finite;
|
|
37
|
+
* no positivity check (a negative mass yields a negative deflection by
|
|
38
|
+
* the linear formula, which the caller may exploit for symmetry tests).
|
|
39
|
+
* - `b_m` — impact parameter (closest approach distance) in **metres**
|
|
40
|
+
* (SI). Must be strictly positive.
|
|
41
|
+
* @returns `{ alpha_rad, alpha_arcsec, M_kg, b_m }`:
|
|
42
|
+
* - `alpha_rad` — deflection angle in **radians** (dimensionless SI).
|
|
43
|
+
* - `alpha_arcsec` — deflection angle in **arc-seconds**
|
|
44
|
+
* (1 rad = 180/π × 3600 ≈ 206264.806 arcsec).
|
|
45
|
+
* - `M_kg`, `b_m` — input echoes (same units as above).
|
|
35
46
|
* @throws {RangeError} if `b_m ≤ 0`.
|
|
36
47
|
*
|
|
37
48
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gravitational-lensing.js","sourceRoot":"","sources":["../../src/bridges/gravitational-lensing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,
|
|
1
|
+
{"version":3,"file":"gravitational-lensing.js","sourceRoot":"","sources":["../../src/bridges/gravitational-lensing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,wEAAwE;AACxE,4EAA4E;AAC5E,uDAAuD;AACvD,OAAO,EAAE,IAAI,IAAI,IAAI,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAoB1D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,4BAA4B,CAC1C,MAAkC;IAElC,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC;IAC7B,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC;QACf,MAAM,IAAI,UAAU,CAClB,2DAA2D,GAAG,GAAG,CAClE,CAAC;IACJ,CAAC;IACD,MAAM,SAAS,GAAG,CAAC,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;IAC1D,MAAM,YAAY,GAAG,SAAS,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;IACxD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AAChD,CAAC"}
|
|
@@ -51,9 +51,24 @@ export interface PerihelionPrecessionResult {
|
|
|
51
51
|
* Evaluate the Einstein 1915 GR perihelion precession for a bound elliptical
|
|
52
52
|
* orbit around a central mass M.
|
|
53
53
|
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
* @
|
|
54
|
+
* Closed-form formula: `Δφ = 6π G M / (a (1 − e²) c²)`.
|
|
55
|
+
*
|
|
56
|
+
* @param inputs - `{ M_kg, a_m, e, T_yr }`:
|
|
57
|
+
* - `M_kg` — central gravitating mass in **kilograms** (SI). E.g. solar
|
|
58
|
+
* mass 1.989 × 10³⁰ kg.
|
|
59
|
+
* - `a_m` — orbital semi-major axis in **metres** (SI). Must be strictly
|
|
60
|
+
* positive.
|
|
61
|
+
* - `e` — orbital eccentricity (dimensionless). Must satisfy 0 ≤ e < 1
|
|
62
|
+
* (bound elliptical orbits only; e = 0 gives a circle, e → 1 a
|
|
63
|
+
* parabolic escape limit).
|
|
64
|
+
* - `T_yr` — orbital period in **Julian years** (1 yr = 365.25 d).
|
|
65
|
+
* Used only for the per-century conversion. Must be strictly positive.
|
|
66
|
+
* @returns `{ dphi_rad_per_orbit, dphi_arcsec_per_orbit, dphi_arcsec_per_century, M_kg, a_m, e }`:
|
|
67
|
+
* - `dphi_rad_per_orbit` — GR perihelion advance per orbit in **radians**.
|
|
68
|
+
* - `dphi_arcsec_per_orbit` — same, in **arc-seconds**.
|
|
69
|
+
* - `dphi_arcsec_per_century` — secular advance in **arc-seconds per
|
|
70
|
+
* Julian century** (×100/T_yr).
|
|
71
|
+
* - `M_kg`, `a_m`, `e` — input echoes (same units as above).
|
|
57
72
|
* @throws {RangeError} if `a_m ≤ 0`, `T_yr ≤ 0`, or `e` is outside [0, 1).
|
|
58
73
|
*
|
|
59
74
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"perihelion-precession.d.ts","sourceRoot":"","sources":["../../src/bridges/perihelion-precession.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;
|
|
1
|
+
{"version":3,"file":"perihelion-precession.d.ts","sourceRoot":"","sources":["../../src/bridges/perihelion-precession.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAOH,MAAM,WAAW,0BAA0B;IACzC,+DAA+D;IAC/D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,oEAAoE;IACpE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,6EAA6E;IAC7E,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,oGAAoG;IACpG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,0BAA0B;IACzC,yEAAyE;IACzE,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,sDAAsD;IACtD,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IACvC,wDAAwD;IACxD,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;IACzC,2CAA2C;IAC3C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,6CAA6C;IAC7C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,sCAAsC;IACtC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,0BAA0B,GACjC,0BAA0B,CAqC5B"}
|
|
@@ -23,18 +23,32 @@
|
|
|
23
23
|
*
|
|
24
24
|
* @module bridges/perihelion-precession
|
|
25
25
|
*/
|
|
26
|
-
// Numerical SI constants —
|
|
27
|
-
//
|
|
28
|
-
//
|
|
29
|
-
|
|
30
|
-
const c_SI = 2.998e8; // m s⁻¹ (CODATA 2018)
|
|
26
|
+
// Numerical SI constants — canonical CODATA 2018 / exact-SI values from
|
|
27
|
+
// src/core/constants.ts (v0.5.1 PC-1 canonicalization). NOT the dimensional
|
|
28
|
+
// Dimension objects from src/dimensional/constants.ts.
|
|
29
|
+
import { C_SI as c_SI, G_SI } from '../core/constants.js';
|
|
31
30
|
/**
|
|
32
31
|
* Evaluate the Einstein 1915 GR perihelion precession for a bound elliptical
|
|
33
32
|
* orbit around a central mass M.
|
|
34
33
|
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* @
|
|
34
|
+
* Closed-form formula: `Δφ = 6π G M / (a (1 − e²) c²)`.
|
|
35
|
+
*
|
|
36
|
+
* @param inputs - `{ M_kg, a_m, e, T_yr }`:
|
|
37
|
+
* - `M_kg` — central gravitating mass in **kilograms** (SI). E.g. solar
|
|
38
|
+
* mass 1.989 × 10³⁰ kg.
|
|
39
|
+
* - `a_m` — orbital semi-major axis in **metres** (SI). Must be strictly
|
|
40
|
+
* positive.
|
|
41
|
+
* - `e` — orbital eccentricity (dimensionless). Must satisfy 0 ≤ e < 1
|
|
42
|
+
* (bound elliptical orbits only; e = 0 gives a circle, e → 1 a
|
|
43
|
+
* parabolic escape limit).
|
|
44
|
+
* - `T_yr` — orbital period in **Julian years** (1 yr = 365.25 d).
|
|
45
|
+
* Used only for the per-century conversion. Must be strictly positive.
|
|
46
|
+
* @returns `{ dphi_rad_per_orbit, dphi_arcsec_per_orbit, dphi_arcsec_per_century, M_kg, a_m, e }`:
|
|
47
|
+
* - `dphi_rad_per_orbit` — GR perihelion advance per orbit in **radians**.
|
|
48
|
+
* - `dphi_arcsec_per_orbit` — same, in **arc-seconds**.
|
|
49
|
+
* - `dphi_arcsec_per_century` — secular advance in **arc-seconds per
|
|
50
|
+
* Julian century** (×100/T_yr).
|
|
51
|
+
* - `M_kg`, `a_m`, `e` — input echoes (same units as above).
|
|
38
52
|
* @throws {RangeError} if `a_m ≤ 0`, `T_yr ≤ 0`, or `e` is outside [0, 1).
|
|
39
53
|
*
|
|
40
54
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"perihelion-precession.js","sourceRoot":"","sources":["../../src/bridges/perihelion-precession.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,
|
|
1
|
+
{"version":3,"file":"perihelion-precession.js","sourceRoot":"","sources":["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qBAAqB,GAAG,kBAAkB,CAAC;IAE3E,OAAO;QACL,kBAAkB;QAClB,qBAAqB;QACrB,uBAAuB;QACvB,IAAI;QACJ,GAAG;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical CODATA 2018 + SI-defined physical constants for UPT (v0.5.1).
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for fundamental physical constants used across the
|
|
5
|
+
* numerical, dimensional, and bridge layers. Replaces the truncated local
|
|
6
|
+
* literals (`c_SI = 2.998e8`, etc.) that drifted across `src/numerical/`,
|
|
7
|
+
* `src/bridges/`, and `tests/fixtures/` — see audit `PC-1` in
|
|
8
|
+
* `docs/architecture/v0.5.1-audit.md`.
|
|
9
|
+
*
|
|
10
|
+
* Values use:
|
|
11
|
+
* • Exact-SI definitions (`C_SI`, `H_SI`, `K_B_SI`, `E_SI`) where the
|
|
12
|
+
* 2019 SI redefinition fixed their values exactly.
|
|
13
|
+
* • CODATA 2018 best estimates for measured constants (`G_SI`, `HBAR_SI`,
|
|
14
|
+
* `ALPHA`, Planck units).
|
|
15
|
+
* • Planck 2018 best estimate for `H0_SI`.
|
|
16
|
+
*
|
|
17
|
+
* The `PhysicalConstants` namespace in `src/core/types.ts` is retained for
|
|
18
|
+
* backwards-compat; new code should prefer these flat exports.
|
|
19
|
+
*
|
|
20
|
+
* @module core/constants
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
/** Speed of light in vacuum (m/s). Exact SI definition since 1983. */
|
|
24
|
+
export declare const C_SI = 299792458;
|
|
25
|
+
/** Newtonian gravitational constant (m³ kg⁻¹ s⁻²). CODATA 2018. */
|
|
26
|
+
export declare const G_SI = 6.6743e-11;
|
|
27
|
+
/** Planck constant (J·s). Exact SI definition since 2019. */
|
|
28
|
+
export declare const H_SI = 6.62607015e-34;
|
|
29
|
+
/** Reduced Planck constant h/(2π) (J·s). CODATA 2018. */
|
|
30
|
+
export declare const HBAR_SI = 1.054571817e-34;
|
|
31
|
+
/** Boltzmann constant (J/K). Exact SI definition since 2019. */
|
|
32
|
+
export declare const K_B_SI = 1.380649e-23;
|
|
33
|
+
/** Elementary charge (C). Exact SI definition since 2019. */
|
|
34
|
+
export declare const E_SI = 1.602176634e-19;
|
|
35
|
+
/** Fine-structure constant α (dimensionless). CODATA 2018. */
|
|
36
|
+
export declare const ALPHA = 0.0072973525693;
|
|
37
|
+
/** Planck mass √(ℏc/G) (kg). CODATA 2018. */
|
|
38
|
+
export declare const M_P_SI = 2.176434e-8;
|
|
39
|
+
/** Planck length √(ℏG/c³) (m). CODATA 2018. */
|
|
40
|
+
export declare const L_P_SI = 1.616255e-35;
|
|
41
|
+
/** Planck time √(ℏG/c⁵) (s). CODATA 2018. */
|
|
42
|
+
export declare const T_P_SI = 5.391247e-44;
|
|
43
|
+
/**
|
|
44
|
+
* Hubble parameter H₀ (s⁻¹).
|
|
45
|
+
*
|
|
46
|
+
* Planck 2018 TT,TE,EE+lowE+lensing best estimate: 67.4 km/s/Mpc, converted
|
|
47
|
+
* to SI using 1 Mpc = 3.0857×10²² m.
|
|
48
|
+
*/
|
|
49
|
+
export declare const H0_SI: number;
|
|
50
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/core/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,sEAAsE;AACtE,eAAO,MAAM,IAAI,YAAY,CAAC;AAE9B,mEAAmE;AACnE,eAAO,MAAM,IAAI,aAAc,CAAC;AAEhC,6DAA6D;AAC7D,eAAO,MAAM,IAAI,iBAAiB,CAAC;AAEnC,yDAAyD;AACzD,eAAO,MAAM,OAAO,kBAAkB,CAAC;AAEvC,gEAAgE;AAChE,eAAO,MAAM,MAAM,eAAe,CAAC;AAEnC,6DAA6D;AAC7D,eAAO,MAAM,IAAI,kBAAkB,CAAC;AAEpC,8DAA8D;AAC9D,eAAO,MAAM,KAAK,kBAAkB,CAAC;AAErC,6CAA6C;AAC7C,eAAO,MAAM,MAAM,cAAc,CAAC;AAElC,+CAA+C;AAC/C,eAAO,MAAM,MAAM,eAAe,CAAC;AAEnC,6CAA6C;AAC7C,eAAO,MAAM,MAAM,eAAe,CAAC;AAEnC;;;;;GAKG;AACH,eAAO,MAAM,KAAK,QAAqB,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical CODATA 2018 + SI-defined physical constants for UPT (v0.5.1).
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for fundamental physical constants used across the
|
|
5
|
+
* numerical, dimensional, and bridge layers. Replaces the truncated local
|
|
6
|
+
* literals (`c_SI = 2.998e8`, etc.) that drifted across `src/numerical/`,
|
|
7
|
+
* `src/bridges/`, and `tests/fixtures/` — see audit `PC-1` in
|
|
8
|
+
* `docs/architecture/v0.5.1-audit.md`.
|
|
9
|
+
*
|
|
10
|
+
* Values use:
|
|
11
|
+
* • Exact-SI definitions (`C_SI`, `H_SI`, `K_B_SI`, `E_SI`) where the
|
|
12
|
+
* 2019 SI redefinition fixed their values exactly.
|
|
13
|
+
* • CODATA 2018 best estimates for measured constants (`G_SI`, `HBAR_SI`,
|
|
14
|
+
* `ALPHA`, Planck units).
|
|
15
|
+
* • Planck 2018 best estimate for `H0_SI`.
|
|
16
|
+
*
|
|
17
|
+
* The `PhysicalConstants` namespace in `src/core/types.ts` is retained for
|
|
18
|
+
* backwards-compat; new code should prefer these flat exports.
|
|
19
|
+
*
|
|
20
|
+
* @module core/constants
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
/** Speed of light in vacuum (m/s). Exact SI definition since 1983. */
|
|
24
|
+
export const C_SI = 299792458;
|
|
25
|
+
/** Newtonian gravitational constant (m³ kg⁻¹ s⁻²). CODATA 2018. */
|
|
26
|
+
export const G_SI = 6.67430e-11;
|
|
27
|
+
/** Planck constant (J·s). Exact SI definition since 2019. */
|
|
28
|
+
export const H_SI = 6.62607015e-34;
|
|
29
|
+
/** Reduced Planck constant h/(2π) (J·s). CODATA 2018. */
|
|
30
|
+
export const HBAR_SI = 1.054571817e-34;
|
|
31
|
+
/** Boltzmann constant (J/K). Exact SI definition since 2019. */
|
|
32
|
+
export const K_B_SI = 1.380649e-23;
|
|
33
|
+
/** Elementary charge (C). Exact SI definition since 2019. */
|
|
34
|
+
export const E_SI = 1.602176634e-19;
|
|
35
|
+
/** Fine-structure constant α (dimensionless). CODATA 2018. */
|
|
36
|
+
export const ALPHA = 7.2973525693e-3;
|
|
37
|
+
/** Planck mass √(ℏc/G) (kg). CODATA 2018. */
|
|
38
|
+
export const M_P_SI = 2.176434e-8;
|
|
39
|
+
/** Planck length √(ℏG/c³) (m). CODATA 2018. */
|
|
40
|
+
export const L_P_SI = 1.616255e-35;
|
|
41
|
+
/** Planck time √(ℏG/c⁵) (s). CODATA 2018. */
|
|
42
|
+
export const T_P_SI = 5.391247e-44;
|
|
43
|
+
/**
|
|
44
|
+
* Hubble parameter H₀ (s⁻¹).
|
|
45
|
+
*
|
|
46
|
+
* Planck 2018 TT,TE,EE+lowE+lensing best estimate: 67.4 km/s/Mpc, converted
|
|
47
|
+
* to SI using 1 Mpc = 3.0857×10²² m.
|
|
48
|
+
*/
|
|
49
|
+
export const H0_SI = 67.4e3 / 3.0857e22;
|
|
50
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/core/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,sEAAsE;AACtE,MAAM,CAAC,MAAM,IAAI,GAAG,SAAS,CAAC;AAE9B,mEAAmE;AACnE,MAAM,CAAC,MAAM,IAAI,GAAG,WAAW,CAAC;AAEhC,6DAA6D;AAC7D,MAAM,CAAC,MAAM,IAAI,GAAG,cAAc,CAAC;AAEnC,yDAAyD;AACzD,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC;AAEvC,gEAAgE;AAChE,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAC;AAEnC,6DAA6D;AAC7D,MAAM,CAAC,MAAM,IAAI,GAAG,eAAe,CAAC;AAEpC,8DAA8D;AAC9D,MAAM,CAAC,MAAM,KAAK,GAAG,eAAe,CAAC;AAErC,6CAA6C;AAC7C,MAAM,CAAC,MAAM,MAAM,GAAG,WAAW,CAAC;AAElC,+CAA+C;AAC/C,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAC;AAEnC,6CAA6C;AAC7C,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAC;AAEnC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC"}
|
|
@@ -6,13 +6,21 @@
|
|
|
6
6
|
* validator.ts merges into its InferContext accumulator.
|
|
7
7
|
*
|
|
8
8
|
* Per v0.4.0-Design.md §4 + §7 (docs/specification/Part-IX-Connection-Layer.md
|
|
9
|
-
*
|
|
9
|
+
* — pending).
|
|
10
10
|
*
|
|
11
11
|
* @module dimensional/connection-validators
|
|
12
12
|
*/
|
|
13
13
|
import type { Dimension } from './types.js';
|
|
14
|
-
import type { Role } from './tensor.js';
|
|
14
|
+
import type { Role, TensorSymbolNode } from './tensor.js';
|
|
15
15
|
import type { MetricTensorNode, CovariantIndex, PartialDerivativeChildResult } from './metric-validators.js';
|
|
16
|
+
/**
|
|
17
|
+
* v0.5.0: upper-only index marker (mirror of CovariantIndex). Used by
|
|
18
|
+
* RiemannTensorNode to type-pin the ρ slot at compile time.
|
|
19
|
+
*/
|
|
20
|
+
export interface UpperIndex {
|
|
21
|
+
readonly label: string;
|
|
22
|
+
readonly variance: 'upper';
|
|
23
|
+
}
|
|
16
24
|
/**
|
|
17
25
|
* ExprNode-like — uses `unknown` for `of`/`wrt` because connection-validators.ts
|
|
18
26
|
* MUST NOT import from validator.ts (module cycle). The validator's case arm
|
|
@@ -50,4 +58,54 @@ export interface CovariantDerivativeValidationResult {
|
|
|
50
58
|
* (same structural rule as tensor-partial-derivative).
|
|
51
59
|
*/
|
|
52
60
|
export declare function validateCovariantDerivative(node: CovariantDerivativeNode, validateChild: (child: unknown) => PartialDerivativeChildResult): CovariantDerivativeValidationResult;
|
|
61
|
+
/**
|
|
62
|
+
* v0.5.0 (Task 1c-i): Riemann curvature tensor AST node R^ρ_{σμν}.
|
|
63
|
+
*
|
|
64
|
+
* Index convention per Carroll Ch. 3 §3.4 (Adam+Eve F4/S3):
|
|
65
|
+
* R^ρ_σμν = ∂_μ Γ^ρ_σν − ∂_ν Γ^ρ_σμ + Γ^ρ_λμ Γ^λ_σν − Γ^ρ_λν Γ^λ_σμ
|
|
66
|
+
* (σ in SECOND lower slot of each Γ.)
|
|
67
|
+
*
|
|
68
|
+
* Dimension F8/I3: Riemann is 1/L² (inverse length squared), NOT
|
|
69
|
+
* dimensionless. Carroll Ch. 3 §3.4: R^ρ_σμν has units of (∂Γ) where
|
|
70
|
+
* Γ ~ 1/L and ∂ ~ 1/L → R ~ 1/L².
|
|
71
|
+
*
|
|
72
|
+
* H1 (v0.4.0 pattern): gLower, gInverse, xCoord sub-nodes are present for
|
|
73
|
+
* downstream consumers (numerical lowering at Task 6), but their free
|
|
74
|
+
* indices are NOT propagated — the Riemann formula's contractions consume
|
|
75
|
+
* them internally. Same rule as CovariantDerivativeNode.
|
|
76
|
+
*/
|
|
77
|
+
export interface RiemannTensorNode {
|
|
78
|
+
readonly kind: 'riemann-tensor';
|
|
79
|
+
readonly upperIndex: UpperIndex;
|
|
80
|
+
readonly lowerIndices: readonly [CovariantIndex, CovariantIndex, CovariantIndex];
|
|
81
|
+
readonly gLower: MetricTensorNode;
|
|
82
|
+
readonly gInverse: MetricTensorNode;
|
|
83
|
+
readonly xCoord: TensorSymbolNode;
|
|
84
|
+
}
|
|
85
|
+
export interface RiemannTensorValidationResult {
|
|
86
|
+
readonly dim: Dimension;
|
|
87
|
+
readonly freeIndices: Map<string, {
|
|
88
|
+
upper: number;
|
|
89
|
+
lower: number;
|
|
90
|
+
}>;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Validate a riemann-tensor node.
|
|
94
|
+
*
|
|
95
|
+
* Throws:
|
|
96
|
+
* - PartialDerivativeIndexVarianceError if upperIndex.variance !== 'upper'
|
|
97
|
+
* or any lowerIndices[i].variance !== 'lower'
|
|
98
|
+
* - MetricSignatureError if gLower / gInverse signature is wrong (reuses
|
|
99
|
+
* CovariantDerivativeNode's structural checks)
|
|
100
|
+
* - IndexLabelCollisionError if the 4 free-index labels {ρ, σ, μ, ν} are
|
|
101
|
+
* not pairwise distinct (M9: disjointness only on the riemann node's
|
|
102
|
+
* own free labels; raise/lower aliasing in surrounding algebra remains
|
|
103
|
+
* legal — we do NOT compare against gLower/gInverse/xCoord labels).
|
|
104
|
+
*
|
|
105
|
+
* H1 (v0.4.0 pattern): gLower/gInverse/xCoord are NOT validated via the
|
|
106
|
+
* validateChild callback, so their free indices do not propagate. They are
|
|
107
|
+
* signature-checked here for early structural error reporting; their
|
|
108
|
+
* numerical contents are consumed by Task 6's lowering helper.
|
|
109
|
+
*/
|
|
110
|
+
export declare function validateRiemannTensor(node: RiemannTensorNode): RiemannTensorValidationResult;
|
|
53
111
|
//# sourceMappingURL=connection-validators.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection-validators.d.ts","sourceRoot":"","sources":["../../src/dimensional/connection-validators.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"connection-validators.d.ts","sourceRoot":"","sources":["../../src/dimensional/connection-validators.ts"],"names":[],"mappings":"AAAA;;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AChC,QAAQ,CAAC,YAAY,EAAE,SAAS,CAAC,cAAc,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC;IACjF,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;CACnC;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC;IACxB,QAAQ,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACrE;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,iBAAiB,GACtB,6BAA6B,CAyE/B"}
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
* validator.ts merges into its InferContext accumulator.
|
|
7
7
|
*
|
|
8
8
|
* Per v0.4.0-Design.md §4 + §7 (docs/specification/Part-IX-Connection-Layer.md
|
|
9
|
-
*
|
|
9
|
+
* — pending).
|
|
10
10
|
*
|
|
11
11
|
* @module dimensional/connection-validators
|
|
12
12
|
*/
|
|
13
13
|
import { divide } from './algebra.js';
|
|
14
|
-
import { PartialDerivativeIndexVarianceError, MetricSignatureError, DuplicateCoordinateWarning, } from './errors.js';
|
|
14
|
+
import { PartialDerivativeIndexVarianceError, MetricSignatureError, DuplicateCoordinateWarning, IndexLabelCollisionError, } from './errors.js';
|
|
15
15
|
/**
|
|
16
16
|
* Validate a covariant-derivative node. Pure-function module-cycle-free
|
|
17
17
|
* pattern (matches validatePartialDerivative). Recursion via the
|
|
@@ -80,4 +80,78 @@ export function validateCovariantDerivative(node, validateChild) {
|
|
|
80
80
|
? { dim, freeIndices, role: ofResult.role }
|
|
81
81
|
: { dim, freeIndices };
|
|
82
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* Validate a riemann-tensor node.
|
|
85
|
+
*
|
|
86
|
+
* Throws:
|
|
87
|
+
* - PartialDerivativeIndexVarianceError if upperIndex.variance !== 'upper'
|
|
88
|
+
* or any lowerIndices[i].variance !== 'lower'
|
|
89
|
+
* - MetricSignatureError if gLower / gInverse signature is wrong (reuses
|
|
90
|
+
* CovariantDerivativeNode's structural checks)
|
|
91
|
+
* - IndexLabelCollisionError if the 4 free-index labels {ρ, σ, μ, ν} are
|
|
92
|
+
* not pairwise distinct (M9: disjointness only on the riemann node's
|
|
93
|
+
* own free labels; raise/lower aliasing in surrounding algebra remains
|
|
94
|
+
* legal — we do NOT compare against gLower/gInverse/xCoord labels).
|
|
95
|
+
*
|
|
96
|
+
* H1 (v0.4.0 pattern): gLower/gInverse/xCoord are NOT validated via the
|
|
97
|
+
* validateChild callback, so their free indices do not propagate. They are
|
|
98
|
+
* signature-checked here for early structural error reporting; their
|
|
99
|
+
* numerical contents are consumed by Task 6's lowering helper.
|
|
100
|
+
*/
|
|
101
|
+
export function validateRiemannTensor(node) {
|
|
102
|
+
if (node.upperIndex.variance !== 'upper') {
|
|
103
|
+
throw new PartialDerivativeIndexVarianceError(`riemann-tensor: upperIndex '${node.upperIndex.label}' must be 'upper', ` +
|
|
104
|
+
`got '${node.upperIndex.variance}'`);
|
|
105
|
+
}
|
|
106
|
+
for (let i = 0; i < 3; i++) {
|
|
107
|
+
const idx = node.lowerIndices[i];
|
|
108
|
+
if (idx.variance !== 'lower') {
|
|
109
|
+
throw new PartialDerivativeIndexVarianceError(`riemann-tensor: lowerIndices[${i}] '${idx.label}' must be 'lower', ` +
|
|
110
|
+
`got '${idx.variance}'`);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if (node.gLower.indices[0].variance !== 'lower' ||
|
|
114
|
+
node.gLower.indices[1].variance !== 'lower') {
|
|
115
|
+
throw new MetricSignatureError(node.gLower.name, `riemann-tensor requires gLower to be both-lower (got ` +
|
|
116
|
+
`[${node.gLower.indices[0].variance}, ${node.gLower.indices[1].variance}])`);
|
|
117
|
+
}
|
|
118
|
+
if (node.gInverse.indices[0].variance !== 'upper' ||
|
|
119
|
+
node.gInverse.indices[1].variance !== 'upper') {
|
|
120
|
+
throw new MetricSignatureError(node.gInverse.name, `riemann-tensor requires gInverse to be both-upper (got ` +
|
|
121
|
+
`[${node.gInverse.indices[0].variance}, ${node.gInverse.indices[1].variance}])`);
|
|
122
|
+
}
|
|
123
|
+
// M9: disjointness on the riemann-tensor's own 4 free labels only.
|
|
124
|
+
// Repeated labels across {ρ, σ, μ, ν} would imply an implicit contraction
|
|
125
|
+
// (e.g. R^μ_μνλ = R_νλ), which is the Ricci-tensor node's job — not the
|
|
126
|
+
// bare Riemann node's. We deliberately do NOT compare against gLower /
|
|
127
|
+
// gInverse / xCoord labels: those are H1-suppressed dummies, and legal
|
|
128
|
+
// post-raise/lower algebra may reuse those labels (see plan §M9).
|
|
129
|
+
const labels = [
|
|
130
|
+
node.upperIndex.label,
|
|
131
|
+
node.lowerIndices[0].label,
|
|
132
|
+
node.lowerIndices[1].label,
|
|
133
|
+
node.lowerIndices[2].label,
|
|
134
|
+
];
|
|
135
|
+
const seen = new Set();
|
|
136
|
+
for (const label of labels) {
|
|
137
|
+
if (seen.has(label)) {
|
|
138
|
+
throw new IndexLabelCollisionError(label, 2, ['riemann-tensor']);
|
|
139
|
+
}
|
|
140
|
+
seen.add(label);
|
|
141
|
+
}
|
|
142
|
+
const freeIndices = new Map();
|
|
143
|
+
freeIndices.set(node.upperIndex.label, { upper: 1, lower: 0 });
|
|
144
|
+
for (const idx of node.lowerIndices) {
|
|
145
|
+
freeIndices.set(idx.label, { upper: 0, lower: 1 });
|
|
146
|
+
}
|
|
147
|
+
// F8/I3: Riemann carries inverse-length-squared. Hard-coded — same shape
|
|
148
|
+
// as the dim is structurally fixed for every Riemann tensor regardless of
|
|
149
|
+
// metric dim. (The metric is treated as dimensionless per our convention.)
|
|
150
|
+
const dim = { L: -2, M: 0, T: 0, I: 0, Theta: 0, N: 0, J: 0 };
|
|
151
|
+
// Role intentionally omitted — Riemann is a derived curvature object,
|
|
152
|
+
// not a primary field; downstream tensor-product / equation consumers
|
|
153
|
+
// don't need a role tag here. Mirrors CovariantDerivativeNode's
|
|
154
|
+
// role-on-passthrough-only pattern.
|
|
155
|
+
return { dim, freeIndices };
|
|
156
|
+
}
|
|
83
157
|
//# sourceMappingURL=connection-validators.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection-validators.js","sourceRoot":"","sources":["../../src/dimensional/connection-validators.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAMtC,OAAO,EACL,mCAAmC,EACnC,oBAAoB,EACpB,0BAA0B,
|
|
1
|
+
{"version":3,"file":"connection-validators.js","sourceRoot":"","sources":["../../src/dimensional/connection-validators.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAMtC,OAAO,EACL,mCAAmC,EACnC,oBAAoB,EACpB,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,aAAa,CAAC;AA+BrB;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,2BAA2B,CACzC,IAA6B,EAC7B,aAA+D;IAE/D,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACvC,MAAM,IAAI,mCAAmC,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACrE,CAAC;IACD,IACE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,KAAK,OAAO;QAC3C,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,KAAK,OAAO,EAC3C,CAAC;QACD,MAAM,IAAI,oBAAoB,CAC5B,IAAI,CAAC,MAAM,CAAC,IAAI,EAChB,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