universal-physics-tensor 0.22.0 → 0.24.0
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/README.md +30 -15
- package/bin/upt.mjs +127 -21
- package/dist/bridges/equations/_be-helpers.d.ts +1 -66
- package/dist/bridges/equations/_be-helpers.d.ts.map +1 -1
- package/dist/bridges/equations/_be-helpers.js +7 -83
- package/dist/bridges/equations/_be-helpers.js.map +1 -1
- package/dist/canonical/entries/l1-gravity-thermo.d.ts.map +1 -1
- package/dist/canonical/entries/l1-gravity-thermo.js +42 -5
- package/dist/canonical/entries/l1-gravity-thermo.js.map +1 -1
- package/dist/canonical/entries/l1-quantum-em.js +1 -1
- package/dist/canonical/entries/l1-quantum-em.js.map +1 -1
- package/dist/canonical/entries/relativity.d.ts.map +1 -1
- package/dist/canonical/entries/relativity.js +76 -2
- package/dist/canonical/entries/relativity.js.map +1 -1
- package/dist/canonical/normal-form.d.ts +10 -4
- package/dist/canonical/normal-form.d.ts.map +1 -1
- package/dist/canonical/normal-form.js +32 -2
- package/dist/canonical/normal-form.js.map +1 -1
- package/dist/canonical/registry.d.ts +7 -0
- package/dist/canonical/registry.d.ts.map +1 -1
- package/dist/canonical/registry.js +9 -0
- package/dist/canonical/registry.js.map +1 -1
- package/dist/composition/canonical-graph.d.ts +77 -0
- package/dist/composition/canonical-graph.d.ts.map +1 -0
- package/dist/composition/canonical-graph.js +155 -0
- package/dist/composition/canonical-graph.js.map +1 -0
- package/dist/composition/compose.d.ts.map +1 -1
- package/dist/composition/compose.js +14 -0
- package/dist/composition/compose.js.map +1 -1
- package/dist/composition/discovery.d.ts +10 -0
- package/dist/composition/discovery.d.ts.map +1 -1
- package/dist/composition/discovery.js +50 -7
- package/dist/composition/discovery.js.map +1 -1
- package/dist/composition/edges/calibration.d.ts.map +1 -1
- package/dist/composition/edges/calibration.js +53 -0
- package/dist/composition/edges/calibration.js.map +1 -1
- package/dist/composition/edges/catalog-full.d.ts.map +1 -1
- package/dist/composition/edges/catalog-full.js +33 -1
- package/dist/composition/edges/catalog-full.js.map +1 -1
- package/dist/composition/index.d.ts +1 -0
- package/dist/composition/index.d.ts.map +1 -1
- package/dist/composition/index.js +1 -0
- package/dist/composition/index.js.map +1 -1
- package/dist/composition/proposed-bridges.d.ts +218 -0
- package/dist/composition/proposed-bridges.d.ts.map +1 -0
- package/dist/composition/proposed-bridges.js +499 -0
- package/dist/composition/proposed-bridges.js.map +1 -0
- package/dist/composition/representative-values.d.ts +9 -3
- package/dist/composition/representative-values.d.ts.map +1 -1
- package/dist/composition/representative-values.js +34 -3
- package/dist/composition/representative-values.js.map +1 -1
- package/dist/composition/retrodiction.d.ts +13 -0
- package/dist/composition/retrodiction.d.ts.map +1 -1
- package/dist/composition/retrodiction.js +7 -1
- package/dist/composition/retrodiction.js.map +1 -1
- package/dist/composition/symbolic-constants.d.ts.map +1 -1
- package/dist/composition/symbolic-constants.js +1 -0
- package/dist/composition/symbolic-constants.js.map +1 -1
- package/dist/core/cell.d.ts +1 -23
- package/dist/core/cell.d.ts.map +1 -1
- package/dist/core/cell.js +0 -31
- package/dist/core/cell.js.map +1 -1
- package/dist/core/tensor.d.ts +27 -1
- package/dist/core/tensor.d.ts.map +1 -1
- package/dist/core/tensor.js +35 -0
- package/dist/core/tensor.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/numerical/grid-field.d.ts +7 -17
- package/dist/numerical/grid-field.d.ts.map +1 -1
- package/dist/numerical/input-validation.d.ts +56 -0
- package/dist/numerical/input-validation.d.ts.map +1 -0
- package/dist/numerical/input-validation.js +75 -0
- package/dist/numerical/input-validation.js.map +1 -0
- package/dist/numerical/klein-gordon.js +1 -1
- package/dist/numerical/klein-gordon.js.map +1 -1
- package/dist/numerical/types.d.ts +18 -1
- package/dist/numerical/types.d.ts.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -60,8 +60,12 @@ npm run upt -- priority # triage speculative
|
|
|
60
60
|
npm run upt -- audit # derive the bridges by dimensions
|
|
61
61
|
npm run upt -- predict # empty regime cells as link hypotheses
|
|
62
62
|
npm run upt -- discover # vet link candidates (merge/unlock/consistency)
|
|
63
|
+
npm run upt -- discover --source=canonical # run the funnel on standard physics ALONE (no bridges)
|
|
64
|
+
npm run upt -- discover --derive # surface machine-derived identity consequences (unreleased; --max-orders / --anchor flags available)
|
|
63
65
|
npm run upt -- connectors # which isolated bridges can connect to the core
|
|
64
66
|
npm run upt -- coverage # audit each bridge's empirical grounding
|
|
67
|
+
npm run upt -- canonical # the standard-physics L-layer registry (answer key)
|
|
68
|
+
npm run upt -- recover # validate bridges against standard physics
|
|
65
69
|
npm run upt -- symbolic --simplify # compose + fold bridges' SYMBOLIC forms (MathTS simplify)
|
|
66
70
|
# ...and YOUR OWN equations:
|
|
67
71
|
npm run upt -- eval "hbar*c^3/(8*pi*G*M*k_B)" hbar=1.054571817e-34 c=299792458 G=6.6743e-11 M=1.989e30 k_B=1.380649e-23
|
|
@@ -79,6 +83,10 @@ and a built-in, dependency-free parser otherwise — transparently, via a
|
|
|
79
83
|
`FormulaParser` registry (add `--debug` to see which is active). UPT keeps
|
|
80
84
|
**zero hard dependencies**; the MathTS packages are optional.
|
|
81
85
|
|
|
86
|
+
See [`cli/README.md`](cli/README.md) for the full CLI reference — every command
|
|
87
|
+
and alias, the `--source=catalog|canonical|both` flag, input syntax, exit codes,
|
|
88
|
+
and troubleshooting.
|
|
89
|
+
|
|
82
90
|
## Installation
|
|
83
91
|
|
|
84
92
|
```bash
|
|
@@ -209,7 +217,7 @@ for how the documents evolved.
|
|
|
209
217
|
- **[Part IV: Validation & Implications](docs/specification/Part-IV.md)** - Experimental pathways, philosophical implications, applications
|
|
210
218
|
- **[Part V: Advanced Mathematics & Protocols](docs/specification/Part-V.md)** - Category theory extensions, validation protocols, algorithmic analysis
|
|
211
219
|
- **[Part VI: Deployment & Governance](docs/specification/Part-VI.md)** - Implementation strategies, applications, governance frameworks
|
|
212
|
-
- **Supplements** - [Part VII: Tensor Algebra](docs/specification/Part-VII-Tensor-Algebra.md) · [Part VIII: Metric Layer](docs/specification/Part-VIII-Metric-Layer.md) · [Part IX: Composition](docs/specification/Part-IX-Composition.md) · [Part X: Curvature & Field Equations](docs/specification/Part-X-Curvature-and-Field-Equations.md)
|
|
220
|
+
- **Supplements** - [Part VII: Tensor Algebra](docs/specification/Part-VII-Tensor-Algebra.md) · [Part VIII: Metric Layer](docs/specification/Part-VIII-Metric-Layer.md) · [Part IX: Composition](docs/specification/Part-IX-Composition.md) · [Part X: Curvature & Field Equations](docs/specification/Part-X-Curvature-and-Field-Equations.md) · [Part XI: Proposed Equations](docs/specification/Part-XI-Proposed-Equations.md) (non-normative; machine-derived identity consequences, unadjudicated)
|
|
213
221
|
|
|
214
222
|
### Planning & Development
|
|
215
223
|
- **[Development Plan](docs/planning/Development-Plan.md)** - Phased implementation roadmap
|
|
@@ -236,33 +244,40 @@ delivered a measured **5-6× RK4 geodesic-integrator speedup** (see [CHANGELOG](
|
|
|
236
244
|
|
|
237
245
|
## Development Status
|
|
238
246
|
|
|
239
|
-
**Current version:** v0.
|
|
240
|
-
([`universal-physics-tensor`](https://www.npmjs.com/package/universal-physics-tensor)
|
|
241
|
-
|
|
242
|
-
GW170817 / BE-23 data confrontations + catalog adjudication, Part-IX
|
|
243
|
-
the full catalog→graph migration, the bridge-inference +
|
|
244
|
-
tooling, the G-9 geometrized-units adapters,
|
|
245
|
-
variational grammar primitives, the
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
247
|
+
**Current version:** v0.24.0 on npm
|
|
248
|
+
([`universal-physics-tensor`](https://www.npmjs.com/package/universal-physics-tensor),
|
|
249
|
+
published 2026-06-19) — building on the **v0.8.0 → v0.23.0** rollup arc (composition
|
|
250
|
+
graph + GW170817 / BE-23 data confrontations + catalog adjudication, Part-IX
|
|
251
|
+
Phase C/D, the full catalog→graph migration, the bridge-inference +
|
|
252
|
+
symbolic-composition tooling, the G-9 geometrized-units adapters, the
|
|
253
|
+
distributional/variational grammar primitives, the AST bridge-gradient path, and
|
|
254
|
+
the **canonical-equation L-layer** with bridge↔canonical linkage). v0.24.0 adds
|
|
255
|
+
the **identity-consequence surfacer** (`upt discover --derive` → machine-derived
|
|
256
|
+
candidate relations, held out of the catalog pending §XXVII-B review; see
|
|
257
|
+
[Part-XI](docs/specification/Part-XI-Proposed-Equations.md)), **canonical-only
|
|
258
|
+
discovery** (`--source=catalog|canonical|both`), canonical-graph quality fixes
|
|
259
|
+
(magnitude-gate sourcing, variable-name unification, the declared
|
|
260
|
+
compton↔de-Broglie link), and architecture refactors (the `tensor↔cell` runtime
|
|
261
|
+
cycle removed; the `numerical→bridges` upward dependency dropped).
|
|
249
262
|
|
|
250
263
|
| Metric | Value |
|
|
251
264
|
|---|---|
|
|
252
265
|
| Bridge catalog | **44** (IDs 11-54) — 8 established · 33 speculative · 3 highly-speculative · 0 invalid; membership-adjudicated **36 bridges · 5 not-a-bridge · 3 contested**; **41-edge composition graph** (full migration, 131 centralized quantity nodes) with a bridge-inference suite — **identifiability classifier**, **retrodiction harness**, **Buckingham-π enumerator**, unified by an **`explainQuantity`** entry point, plus (v0.12) the candidate-vetting **discovery loop**, regime-prediction map, empirical-coverage audit, and **symbolic composition** (the Observable contract + MathTS simplification) |
|
|
253
|
-
| Test suite | **
|
|
266
|
+
| Test suite | **2841** passing (4 skipped, 1 todo; incl. property-based algebra tests) across 277 files — gated by CI |
|
|
254
267
|
| `tsc --noEmit` | clean (src + strict `tsc -p tsconfig.tests.json`) |
|
|
255
268
|
| GR validation anchors | BE-52 Mercury perihelion relErr 1.8×10⁻⁷ · BE-37 Shapiro delay relErr ~2×10⁻⁸ |
|
|
256
269
|
| First derived relation | E_min(M) = ℏc³ln2/(8πGM) from BE-42 ∘ BE-16, relErr ≤ 10⁻¹² (pre-registered CT-1) |
|
|
257
270
|
| First data confrontation | GW170817 → BE-36: recomputed bounds +6.5×10⁻¹⁶ / −3.1×10⁻¹⁵ vs published +7×10⁻¹⁶ / −3×10⁻¹⁵ |
|
|
258
|
-
| Core capability | Dimensional AST validator (23 node kinds; valence-homogeneity + symbolic-exponent grammar, v0.13; distributional/variational primitives, v0.14) · curvature + Einstein-field-equation layers · GL4 symplectic geodesic integrator · composition graph (`composeEdges` + symbolic `composeSymbolic`) · geometrized-units adapters (G-9 increment 1, v0.13) |
|
|
271
|
+
| Core capability | Dimensional AST validator (23 node kinds; valence-homogeneity + symbolic-exponent grammar, v0.13; distributional/variational primitives, v0.14) · curvature + Einstein-field-equation layers · GL4 symplectic geodesic integrator · composition graph (`composeEdges` + symbolic `composeSymbolic`) · geometrized-units adapters (G-9 increment 1, v0.13) · canonical-equation **L-layer** + bridge↔canonical linkage / F4 guard (v0.22) · **identity-consequence surfacer** (`upt discover --derive`, unreleased) |
|
|
259
272
|
|
|
260
273
|
Release history lives in the **[CHANGELOG](CHANGELOG.md)** — from the v0.1.0
|
|
261
274
|
catalog-closure milestone (40/40 AST encodings via the Wave A→Z encoding arc,
|
|
262
275
|
with cross-LLM validation of the highest-stakes reformulations) through the
|
|
263
276
|
GR-foundations releases (v0.4.x–v0.6.0), the v0.7.x intelligent-index / gradient
|
|
264
|
-
series, the v0.8–v0.11 composition + catalog→graph arc,
|
|
265
|
-
inference / symbolic-composition / units work
|
|
277
|
+
series, the v0.8–v0.11 composition + catalog→graph arc, the v0.12–v0.13
|
|
278
|
+
inference / symbolic-composition / units work, and the v0.14–v0.23
|
|
279
|
+
distributional/variational grammar, AST bridge-gradient path, canonical-equation
|
|
280
|
+
L-layer, bridge↔canonical linkage, and identity-consequence surfacer arc. The formal
|
|
266
281
|
spec's own revision ledger is at
|
|
267
282
|
[docs/specification/CHANGELOG.md](docs/specification/CHANGELOG.md).
|
|
268
283
|
|
package/bin/upt.mjs
CHANGED
|
@@ -20,7 +20,7 @@ const here = dirname(fileURLToPath(import.meta.url));
|
|
|
20
20
|
const dist = (...p) => pathToFileURL(join(here, '..', 'dist', ...p)).href;
|
|
21
21
|
|
|
22
22
|
let api, analysis, formulaReg, dimSpecMod, prediction, discovery, coverage, simplifyMod;
|
|
23
|
-
let canonicalReg, linkageMod;
|
|
23
|
+
let canonicalReg, linkageMod, proposedMod;
|
|
24
24
|
try {
|
|
25
25
|
api = await import(dist('index.js'));
|
|
26
26
|
analysis = await import(dist('composition', 'bridge-analysis.js'));
|
|
@@ -32,13 +32,14 @@ try {
|
|
|
32
32
|
simplifyMod = await import(dist('composition', 'expr-simplify.js'));
|
|
33
33
|
canonicalReg = await import(dist('canonical', 'registry.js'));
|
|
34
34
|
linkageMod = await import(dist('canonical', 'linkage.js'));
|
|
35
|
+
proposedMod = await import(dist('composition', 'proposed-bridges.js'));
|
|
35
36
|
} catch (err) {
|
|
36
37
|
console.error('Could not load the built package. Run `npm run build` first.');
|
|
37
38
|
console.error(String(err.message || err));
|
|
38
39
|
process.exit(1);
|
|
39
40
|
}
|
|
40
41
|
|
|
41
|
-
const { explainQuantity, CATALOG_GRAPH, M_SUN_KG, composeSymbolic,
|
|
42
|
+
const { explainQuantity, CATALOG_GRAPH, CANONICAL_GRAPH, M_SUN_KG, composeSymbolic,
|
|
42
43
|
be42Edge, be16Edge, lawSchwarzschildRadius, be42ViaRsEdge, format } = api;
|
|
43
44
|
const { bridgePriority, attemptDerivation, dimensionalFreedom, dimensionallyDetermines, buckinghamPi, linkageMap, proposeLinkCandidates, proposeOrphanConnectors } = { ...analysis, ...api };
|
|
44
45
|
const { getFormulaParser, getFormulaParserKind, getFormulaDimensionChecker } = formulaReg;
|
|
@@ -49,9 +50,31 @@ const { auditCoverage } = coverage;
|
|
|
49
50
|
const { simplifyObservable } = simplifyMod;
|
|
50
51
|
const { CANONICAL_EQUATIONS, bridgesWithoutCanonicalPartner } = canonicalReg;
|
|
51
52
|
const { scanLinkages } = linkageMod;
|
|
53
|
+
const { deriveProposedBridges } = proposedMod;
|
|
52
54
|
|
|
53
55
|
const GRAPH = CATALOG_GRAPH;
|
|
54
56
|
|
|
57
|
+
// `--source=catalog|canonical|both` selects which graph the analysis commands
|
|
58
|
+
// (`discover` / `candidates` / `map`) run over. `catalog` (default) is the
|
|
59
|
+
// 44-bridge catalog; `canonical` is the standard-physics L-layer ALONE, with
|
|
60
|
+
// the speculative bridges excluded; `both` is the bridges plus the canonical
|
|
61
|
+
// established-physics backbone.
|
|
62
|
+
function resolveGraph(args) {
|
|
63
|
+
const flag = (args || []).find((a) => a.startsWith('--source='));
|
|
64
|
+
const src = flag ? flag.slice('--source='.length) : 'catalog';
|
|
65
|
+
switch (src) {
|
|
66
|
+
case 'catalog':
|
|
67
|
+
return { graph: CATALOG_GRAPH, label: 'catalog (44-bridge)' };
|
|
68
|
+
case 'canonical':
|
|
69
|
+
return { graph: CANONICAL_GRAPH, label: 'canonical (standard-physics L-layer, bridges excluded)' };
|
|
70
|
+
case 'both':
|
|
71
|
+
return { graph: [...CATALOG_GRAPH, ...CANONICAL_GRAPH], label: 'catalog + canonical' };
|
|
72
|
+
default:
|
|
73
|
+
console.error(`upt: unknown --source='${src}' (expected: catalog | canonical | both)`);
|
|
74
|
+
process.exit(1);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
55
78
|
// ── help ────────────────────────────────────────────────────────────────
|
|
56
79
|
function help() {
|
|
57
80
|
console.log(`upt — Universal Physics Tensor bridge-inference CLI
|
|
@@ -72,12 +95,12 @@ Usage:
|
|
|
72
95
|
re-derive as a recognized monomial (with the prefactor recovered),
|
|
73
96
|
which are decoys, which are dimensionally open.
|
|
74
97
|
|
|
75
|
-
upt map
|
|
98
|
+
upt map [--source=catalog|canonical|both]
|
|
76
99
|
Map how the equations LINK: connected components (clusters) of the
|
|
77
|
-
|
|
78
|
-
|
|
100
|
+
graph by shared quantities, the anchored core, the link hubs, and
|
|
101
|
+
the isolated tail.
|
|
79
102
|
|
|
80
|
-
upt candidates
|
|
103
|
+
upt candidates [--source=catalog|canonical|both]
|
|
81
104
|
Propose candidate cross-cluster links (quantities of the same
|
|
82
105
|
dimension in different clusters) for PHYSICIST REVIEW — a
|
|
83
106
|
coincidence-heavy surface, not discovered bridges.
|
|
@@ -88,11 +111,22 @@ Usage:
|
|
|
88
111
|
(triadic closure). Makes the namesake tensor operational. Review
|
|
89
112
|
surface, not discovered bridges.
|
|
90
113
|
|
|
91
|
-
upt discover
|
|
114
|
+
upt discover [--source=catalog|canonical|both]
|
|
92
115
|
VET the link candidates through the inference suite: hypothesise
|
|
93
116
|
each identification a≡b and test whether it merges disconnected
|
|
94
117
|
physics, unlocks quantities, and stays numerically consistent.
|
|
95
118
|
Ranks promising / inert / contradictory.
|
|
119
|
+
--source=canonical runs the funnel on the standard-physics L-layer
|
|
120
|
+
ALONE (bridges excluded) — new candidates from established physics,
|
|
121
|
+
and a self-consistency check (expect 0 contradictory).
|
|
122
|
+
--derive emits, for each 'promising' identification, the ONE algebraic
|
|
123
|
+
relation it implies (monomial elimination) as an UNADJUDICATED, math-only
|
|
124
|
+
proposal — NOT a bridge (Part-VI §XXVII-B). Pairs with --source=canonical.
|
|
125
|
+
--max-orders=N tunes the magnitude-clash threshold (default 3); looser N
|
|
126
|
+
keeps more candidates 'promising', tighter N falsifies more as clashes.
|
|
127
|
+
--anchor=k=v[,k2=v2] overrides the numeric anchor (default mass=M_sun)
|
|
128
|
+
for the consistency/closure check. Both reshape the candidate pool that
|
|
129
|
+
--derive consumes.
|
|
96
130
|
|
|
97
131
|
upt connectors
|
|
98
132
|
Of the 20 ISOLATED bridges, which could connect to the anchored
|
|
@@ -327,11 +361,12 @@ async function derive(args) {
|
|
|
327
361
|
}
|
|
328
362
|
|
|
329
363
|
// ── map (how the equations link) ──────────────────────────────────────────
|
|
330
|
-
function mapCmd() {
|
|
331
|
-
const
|
|
364
|
+
function mapCmd(args) {
|
|
365
|
+
const { graph, label } = resolveGraph(args);
|
|
366
|
+
const m = linkageMap(graph);
|
|
332
367
|
const mix = (s) => Object.entries(s).map(([k, v]) => `${v} ${k}`).join(', ');
|
|
333
|
-
console.log(
|
|
334
|
-
console.log(`(${m.componentCount} components over ${
|
|
368
|
+
console.log(`\nLinkage map — how the equations connect via shared quantities [source: ${label}]`);
|
|
369
|
+
console.log(`(${m.componentCount} components over ${graph.length} edges; ${m.compositions} compose into chains)\n`);
|
|
335
370
|
for (const c of m.clusters.filter((x) => x.size > 1)) {
|
|
336
371
|
console.log(` ● cluster of ${c.size}${c.anchored ? ' [ANCHORED to known physics]' : ''}`);
|
|
337
372
|
console.log(` edges: ${c.edges.join(', ')}`);
|
|
@@ -344,11 +379,12 @@ function mapCmd() {
|
|
|
344
379
|
}
|
|
345
380
|
|
|
346
381
|
// ── candidates (map-proposed links for review) ────────────────────────────
|
|
347
|
-
function candidatesCmd() {
|
|
348
|
-
const
|
|
382
|
+
function candidatesCmd(args) {
|
|
383
|
+
const { graph, label } = resolveGraph(args);
|
|
384
|
+
const cands = proposeLinkCandidates(graph);
|
|
349
385
|
const core = cands.filter((c) => c.touchesCore);
|
|
350
386
|
const ck = cands.filter((c) => c.touchesCore && c.sameKind);
|
|
351
|
-
console.log(
|
|
387
|
+
console.log(`\nLink candidates — cross-cluster quantities sharing a dimension [source: ${label}]`);
|
|
352
388
|
console.log('⚠ a coincidence-heavy REVIEW SURFACE, NOT discovered bridges. Same dimension is a');
|
|
353
389
|
console.log(' weak signal; each needs a physicist to accept or (far more often) reject.\n');
|
|
354
390
|
console.log(` funnel: ${cands.length} total → ${core.length} touch the anchored core → ${ck.length} also same-kind\n`);
|
|
@@ -387,12 +423,45 @@ function predictCmd() {
|
|
|
387
423
|
}
|
|
388
424
|
|
|
389
425
|
// ── discover (vet link candidates through the inference suite) ─────────────
|
|
390
|
-
|
|
391
|
-
|
|
426
|
+
// Parse the discovery knobs (DiscoveryOptions) from CLI flags:
|
|
427
|
+
// --max-orders=N magnitude-clash threshold (default 3)
|
|
428
|
+
// --anchor=k=v[,k2=v2] numeric anchor for the consistency/closure check
|
|
429
|
+
// (default mass=M_sun); repeatable
|
|
430
|
+
function parseDiscoveryOpts(args) {
|
|
431
|
+
const a = args || [];
|
|
432
|
+
const opts = {};
|
|
433
|
+
const mo = a.find((x) => x.startsWith('--max-orders='));
|
|
434
|
+
if (mo) {
|
|
435
|
+
const n = Number(mo.slice('--max-orders='.length));
|
|
436
|
+
if (Number.isFinite(n)) opts.maxOrdersOfMagnitude = n;
|
|
437
|
+
}
|
|
438
|
+
const gt = {};
|
|
439
|
+
for (const x of a.filter((x) => x.startsWith('--anchor='))) {
|
|
440
|
+
for (const pair of x.slice('--anchor='.length).split(',')) {
|
|
441
|
+
const [k, v] = pair.split('=');
|
|
442
|
+
const val = Number(v);
|
|
443
|
+
if (k && Number.isFinite(val)) gt[k] = val;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
if (Object.keys(gt).length) opts.groundTruth = gt;
|
|
447
|
+
return opts;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
function discoverCmd(args) {
|
|
451
|
+
const { graph, label } = resolveGraph(args);
|
|
452
|
+
const opts = parseDiscoveryOpts(args);
|
|
453
|
+
const ranked = rankDiscoveries(graph, opts);
|
|
454
|
+
if (Object.keys(opts).length) {
|
|
455
|
+
const bits = [];
|
|
456
|
+
if (opts.maxOrdersOfMagnitude !== undefined) bits.push(`max-orders=${opts.maxOrdersOfMagnitude}`);
|
|
457
|
+
if (opts.groundTruth) bits.push(`anchor={${Object.entries(opts.groundTruth).map(([k, v]) => `${k}=${v}`).join(', ')}}`);
|
|
458
|
+
console.log(` [discovery options: ${bits.join('; ')}]`);
|
|
459
|
+
}
|
|
460
|
+
if ((args || []).includes('--derive')) return deriveCmd(ranked, label);
|
|
392
461
|
const by = (v) => ranked.filter((r) => r.verdict === v);
|
|
393
462
|
const promising = by('promising'), inert = by('inert'), contra = by('contradictory');
|
|
394
463
|
const clash = by('magnitude-clash');
|
|
395
|
-
console.log(
|
|
464
|
+
console.log(`\nDiscovery — link candidates VETTED through the inference suite [source: ${label}]`);
|
|
396
465
|
console.log('⚠ a REVIEW SURFACE: `promising` means "worth a physicist\'s minute", not "true".');
|
|
397
466
|
console.log(' Each candidate hypothesises an identification a≡b and tests its consequences.\n');
|
|
398
467
|
console.log(` funnel: ${ranked.length} candidates → ${promising.length} promising ` +
|
|
@@ -410,7 +479,15 @@ function discoverCmd() {
|
|
|
410
479
|
if (clash.length) {
|
|
411
480
|
console.log(`\n MAGNITUDE-CLASH (representative values differ by > N orders — a falsifier):`);
|
|
412
481
|
for (const r of clash) {
|
|
413
|
-
|
|
482
|
+
const basis = r.magnitudeUsedAnchor ? ' (anchor-derived)' : '';
|
|
483
|
+
console.log(` ${(r.a + ' ≟ ' + r.b).padEnd(52)} ~${r.ordersApart.toFixed(1)} orders apart${basis}`);
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
const subsumed = inert.filter((r) => r.subsuming);
|
|
487
|
+
if (subsumed.length) {
|
|
488
|
+
console.log(`\n SUBSUMING (generic ≟ specialization — tautological, barred from promising):`);
|
|
489
|
+
for (const r of subsumed) {
|
|
490
|
+
console.log(` ${(r.a + ' ≟ ' + r.b).padEnd(52)} [${r.dim}]`);
|
|
414
491
|
}
|
|
415
492
|
}
|
|
416
493
|
if (contra.length) {
|
|
@@ -422,6 +499,35 @@ function discoverCmd() {
|
|
|
422
499
|
console.log('\n (magnitude gate abstains where a representative value is unknown; weak priors on dimension.)');
|
|
423
500
|
}
|
|
424
501
|
|
|
502
|
+
// ── discover --derive (identity-consequence proposals) ────────────────────
|
|
503
|
+
function deriveCmd(ranked, label) {
|
|
504
|
+
const proposals = deriveProposedBridges(ranked);
|
|
505
|
+
console.log(`\nDerived identity-consequence PROPOSALS — UNADJUDICATED, math-only [source: ${label}]`);
|
|
506
|
+
console.log('⚠ Each is the ALGEBRAIC CONSEQUENCE of an unadjudicated identification — NOT a new');
|
|
507
|
+
console.log(' relation and NOT a bridge. No mechanism asserted. Promotion to the catalog needs');
|
|
508
|
+
console.log(' adversarial + literature review (Part-VI §XXVII-B). The enumerator proposes; humans dispose.\n');
|
|
509
|
+
if (!proposals.length) {
|
|
510
|
+
console.log(' no admissible proposal (need two fully-quantitative, monomial canonical targets).');
|
|
511
|
+
return;
|
|
512
|
+
}
|
|
513
|
+
for (const p of proposals) {
|
|
514
|
+
let approx = '';
|
|
515
|
+
try {
|
|
516
|
+
const vals = Object.fromEntries((p.governing || []).map((g) => [g.name, 300]));
|
|
517
|
+
const at = (p.governing || []).map((g) => `${g.name}=300`).join(', ');
|
|
518
|
+
approx = ` ≈ ${p.evaluate(vals).toExponential(2)}${at ? ` (${at})` : ''}`;
|
|
519
|
+
} catch { approx = ''; }
|
|
520
|
+
console.log(` ${p.id}`);
|
|
521
|
+
console.log(` ${p.formulaLatex} ${p.dimensionalSignature}${approx}`);
|
|
522
|
+
console.log(` from: ${p.derivedFrom.identification.a} ≟ ${p.derivedFrom.identification.b}` +
|
|
523
|
+
` (${p.derivedFrom.sourceEquationIds[0]} = ${p.derivedFrom.sourceEquationIds[1]}); solved for ${p.derivedFrom.solvedFor}`);
|
|
524
|
+
if (p.alsoDerivableFrom && p.alsoDerivableFrom.length) {
|
|
525
|
+
console.log(` also derivable from: ${p.alsoDerivableFrom.join('; ')}`);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
console.log('');
|
|
529
|
+
}
|
|
530
|
+
|
|
425
531
|
// ── coverage (empirical-spine audit) ──────────────────────────────────────
|
|
426
532
|
function coverageCmd() {
|
|
427
533
|
const r = auditCoverage();
|
|
@@ -556,10 +662,10 @@ switch (cmd) {
|
|
|
556
662
|
case 'explain': explain(rest[0], rest.slice(1)); break;
|
|
557
663
|
case 'priority': case 'prioritize': case 'triage': priority(); break;
|
|
558
664
|
case 'audit': audit(); break;
|
|
559
|
-
case 'map': case 'linkage': mapCmd(); break;
|
|
560
|
-
case 'candidates': case 'propose': candidatesCmd(); break;
|
|
665
|
+
case 'map': case 'linkage': mapCmd(rest); break;
|
|
666
|
+
case 'candidates': case 'propose': candidatesCmd(rest); break;
|
|
561
667
|
case 'predict': case 'predictions': predictCmd(); break;
|
|
562
|
-
case 'discover': case 'discovery': discoverCmd(); break;
|
|
668
|
+
case 'discover': case 'discovery': discoverCmd(rest); break;
|
|
563
669
|
case 'connectors': case 'orphans': connectorsCmd(); break;
|
|
564
670
|
case 'coverage': case 'grounding': coverageCmd(); break;
|
|
565
671
|
case 'canonical': case 'laws': canonicalCmd(); break;
|
|
@@ -26,71 +26,7 @@
|
|
|
26
26
|
*/
|
|
27
27
|
import type { ExprNode, DimensionValidationReport } from '../../dimensional/validator.js';
|
|
28
28
|
import type { Dimension } from '../../dimensional/types.js';
|
|
29
|
-
|
|
30
|
-
* Declarative spec for a single field of an evaluator's `input` record.
|
|
31
|
-
*
|
|
32
|
-
* The default behaviour (no `min`/`max`) only verifies finiteness
|
|
33
|
-
* (`Number.isFinite`). The bound predicates compose with `Number.isFinite`
|
|
34
|
-
* so the resulting error always reads "finite ⟨adj⟩ number" — drop-in
|
|
35
|
-
* compatible with the existing BE-NN per-evaluator message format
|
|
36
|
-
* `"<evaluator>: <field> must be a finite <adjective> number, got <v>"`.
|
|
37
|
-
*
|
|
38
|
-
* The intentional simplicity: no closed-form domain constraints (e.g.,
|
|
39
|
-
* `R_near ≤ R_far`). Anything beyond per-field range checks stays inline
|
|
40
|
-
* in the evaluator (honesty policy — see commit message).
|
|
41
|
-
*
|
|
42
|
-
* @internal
|
|
43
|
-
*/
|
|
44
|
-
interface FieldSpec {
|
|
45
|
-
/** Field name on the `input` record (e.g., `'M_kg'`). */
|
|
46
|
-
readonly name: string;
|
|
47
|
-
/** Inclusive lower bound (default `-Infinity`). */
|
|
48
|
-
readonly min?: number;
|
|
49
|
-
/** Inclusive upper bound (default `Infinity`). */
|
|
50
|
-
readonly max?: number;
|
|
51
|
-
/** Strict `>` instead of `≥` at the lower bound. */
|
|
52
|
-
readonly excludeMin?: boolean;
|
|
53
|
-
/** Strict `<` instead of `≤` at the upper bound. */
|
|
54
|
-
readonly excludeMax?: boolean;
|
|
55
|
-
/** Explicit override — when `min === 0` and you want to permit zero. */
|
|
56
|
-
readonly allowZero?: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Optional domain-specific noun phrase (e.g., 'probability', 'angle').
|
|
59
|
-
* When set, replaces the auto-generated "in range [a, b]" prose:
|
|
60
|
-
* "<evaluator>: <field> must be a finite <description> number, got <v>"
|
|
61
|
-
*
|
|
62
|
-
* v0.7.1 Phase 4 Task 4.4 — Eve E4 fix. Restores the pre-extraction
|
|
63
|
-
* BE-25-iit-phi "probability" domain noun without reverting the
|
|
64
|
-
* helper-based migration.
|
|
65
|
-
*
|
|
66
|
-
* @internal
|
|
67
|
-
*/
|
|
68
|
-
readonly description?: string;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Validate every field of `input` named by `fieldSpecs`. Throws a
|
|
72
|
-
* `RangeError` on the first violation with a message that contains
|
|
73
|
-
* the keywords (`"finite"`, plus `"positive"` / `"non-negative"` /
|
|
74
|
-
* `"in range"`) the existing per-BE-NN tests pattern-match against.
|
|
75
|
-
*
|
|
76
|
-
* The error message format matches the pre-extraction convention:
|
|
77
|
-
*
|
|
78
|
-
* `<evaluatorName>: <fieldName> must be a finite <range> number, got <value>`
|
|
79
|
-
*
|
|
80
|
-
* Sample existing prose this preserves:
|
|
81
|
-
*
|
|
82
|
-
* `evaluateShapiroDelay: M_kg must be a finite positive number, got -1`
|
|
83
|
-
* `evaluateLandauerEnergy: temperature_K must be a finite non-negative number, got -1`
|
|
84
|
-
* `evaluateQuantumBounce: Lambda_Tinv2 must be finite, got NaN`
|
|
85
|
-
*
|
|
86
|
-
* @param input - The evaluator's input record.
|
|
87
|
-
* @param fieldSpecs - The per-field range specs to enforce.
|
|
88
|
-
* @param evaluatorName - The calling function's name (e.g.,
|
|
89
|
-
* `'evaluateShapiroDelay'`), used as the error-message prefix.
|
|
90
|
-
*
|
|
91
|
-
* @internal
|
|
92
|
-
*/
|
|
93
|
-
export declare function validateFiniteInputs<T extends object>(input: T, fieldSpecs: ReadonlyArray<FieldSpec>, evaluatorName: string): void;
|
|
29
|
+
export { validateFiniteInputs, type FieldSpec } from '../../numerical/input-validation.js';
|
|
94
30
|
/**
|
|
95
31
|
* Run `validateEquation(lhs, rhs)` + `validate(lhs)` + `validate(rhs)`
|
|
96
32
|
* and pack the result into the canonical `DimensionValidationReport`
|
|
@@ -142,5 +78,4 @@ export declare function validateBEDimensions(lhs: ExprNode, rhs: ExprNode, _equa
|
|
|
142
78
|
* @internal
|
|
143
79
|
*/
|
|
144
80
|
export declare function sym(name: string, dim: Dimension): ExprNode;
|
|
145
|
-
export {};
|
|
146
81
|
//# sourceMappingURL=_be-helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_be-helpers.d.ts","sourceRoot":"","sources":["../../../src/bridges/equations/_be-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAE1F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"_be-helpers.d.ts","sourceRoot":"","sources":["../../../src/bridges/equations/_be-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAE1F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAQ5D,OAAO,EAAE,oBAAoB,EAAE,KAAK,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAM3F;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,QAAQ,EACb,GAAG,EAAE,QAAQ,EACb,cAAc,EAAE,MAAM,GACrB,yBAAyB,CAS3B;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,GAAG,QAAQ,CAE1D"}
|
|
@@ -25,89 +25,13 @@
|
|
|
25
25
|
* @module bridges/equations/_be-helpers
|
|
26
26
|
*/
|
|
27
27
|
import { validate, validateEquation } from '../../dimensional/validator.js';
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
* - unbounded → "" (just "finite")
|
|
36
|
-
*/
|
|
37
|
-
function describeRange(spec) {
|
|
38
|
-
// Caller-supplied domain noun (e.g., 'probability') takes priority
|
|
39
|
-
// over the auto-generated range prose. Yields:
|
|
40
|
-
// "<evaluator>: <field> must be a finite <description> number, got <v>"
|
|
41
|
-
// E.g., for BE-25 IIT p_cond / p_marg:
|
|
42
|
-
// "evaluateIntrinsicInformation: p_cond must be a finite probability number, got -0.1"
|
|
43
|
-
if (spec.description !== undefined)
|
|
44
|
-
return `${spec.description} `;
|
|
45
|
-
const hasMin = spec.min !== undefined;
|
|
46
|
-
const hasMax = spec.max !== undefined;
|
|
47
|
-
const lowOpen = !!spec.excludeMin;
|
|
48
|
-
const highOpen = !!spec.excludeMax;
|
|
49
|
-
// The two ubiquitous zero-pinned shapes — keep these phrasings exactly
|
|
50
|
-
// as the existing 42 BE-NN evaluators emit them.
|
|
51
|
-
if (hasMin && !hasMax && spec.min === 0 && !spec.allowZero) {
|
|
52
|
-
if (lowOpen)
|
|
53
|
-
return 'positive '; // "finite positive number"
|
|
54
|
-
return 'non-negative '; // "finite non-negative number"
|
|
55
|
-
}
|
|
56
|
-
if (!hasMin && !hasMax)
|
|
57
|
-
return ''; // "finite number"
|
|
58
|
-
const lo = hasMin ? spec.min : -Infinity;
|
|
59
|
-
const hi = hasMax ? spec.max : Infinity;
|
|
60
|
-
const lb = lowOpen ? '(' : '[';
|
|
61
|
-
const rb = highOpen ? ')' : ']';
|
|
62
|
-
return `in range ${lb}${lo}, ${hi}${rb} `;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Validate every field of `input` named by `fieldSpecs`. Throws a
|
|
66
|
-
* `RangeError` on the first violation with a message that contains
|
|
67
|
-
* the keywords (`"finite"`, plus `"positive"` / `"non-negative"` /
|
|
68
|
-
* `"in range"`) the existing per-BE-NN tests pattern-match against.
|
|
69
|
-
*
|
|
70
|
-
* The error message format matches the pre-extraction convention:
|
|
71
|
-
*
|
|
72
|
-
* `<evaluatorName>: <fieldName> must be a finite <range> number, got <value>`
|
|
73
|
-
*
|
|
74
|
-
* Sample existing prose this preserves:
|
|
75
|
-
*
|
|
76
|
-
* `evaluateShapiroDelay: M_kg must be a finite positive number, got -1`
|
|
77
|
-
* `evaluateLandauerEnergy: temperature_K must be a finite non-negative number, got -1`
|
|
78
|
-
* `evaluateQuantumBounce: Lambda_Tinv2 must be finite, got NaN`
|
|
79
|
-
*
|
|
80
|
-
* @param input - The evaluator's input record.
|
|
81
|
-
* @param fieldSpecs - The per-field range specs to enforce.
|
|
82
|
-
* @param evaluatorName - The calling function's name (e.g.,
|
|
83
|
-
* `'evaluateShapiroDelay'`), used as the error-message prefix.
|
|
84
|
-
*
|
|
85
|
-
* @internal
|
|
86
|
-
*/
|
|
87
|
-
export function validateFiniteInputs(input, fieldSpecs, evaluatorName) {
|
|
88
|
-
for (const spec of fieldSpecs) {
|
|
89
|
-
const raw = input[spec.name];
|
|
90
|
-
const value = raw;
|
|
91
|
-
if (typeof value !== 'number' || !Number.isFinite(value)) {
|
|
92
|
-
const range = describeRange(spec);
|
|
93
|
-
throw new RangeError(`${evaluatorName}: ${spec.name} must be a finite ${range}number, got ${String(value)}`);
|
|
94
|
-
}
|
|
95
|
-
if (spec.min !== undefined) {
|
|
96
|
-
const violatesMin = spec.excludeMin ? value <= spec.min : value < spec.min;
|
|
97
|
-
if (violatesMin) {
|
|
98
|
-
const range = describeRange(spec);
|
|
99
|
-
throw new RangeError(`${evaluatorName}: ${spec.name} must be a finite ${range}number, got ${value}`);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
if (spec.max !== undefined) {
|
|
103
|
-
const violatesMax = spec.excludeMax ? value >= spec.max : value > spec.max;
|
|
104
|
-
if (violatesMax) {
|
|
105
|
-
const range = describeRange(spec);
|
|
106
|
-
throw new RangeError(`${evaluatorName}: ${spec.name} must be a finite ${range}number, got ${value}`);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
28
|
+
// ---------------------------------------------------------------------------
|
|
29
|
+
// Helper 1 — Runtime input validation (S-1)
|
|
30
|
+
// ---------------------------------------------------------------------------
|
|
31
|
+
// `validateFiniteInputs` (+ `FieldSpec`) moved to the dependency-free leaf
|
|
32
|
+
// `numerical/input-validation.ts` so the numerical layer no longer imports
|
|
33
|
+
// upward from `bridges`. Re-exported here so every BE-NN evaluator is unchanged.
|
|
34
|
+
export { validateFiniteInputs } from '../../numerical/input-validation.js';
|
|
111
35
|
// ---------------------------------------------------------------------------
|
|
112
36
|
// Helper 2 — Per-bridge dimensional self-check (S-2)
|
|
113
37
|
// ---------------------------------------------------------------------------
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_be-helpers.js","sourceRoot":"","sources":["../../../src/bridges/equations/_be-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAGH,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"_be-helpers.js","sourceRoot":"","sources":["../../../src/bridges/equations/_be-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAGH,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAG5E,8EAA8E;AAC9E,4CAA4C;AAC5C,8EAA8E;AAC9E,2EAA2E;AAC3E,2EAA2E;AAC3E,iFAAiF;AACjF,OAAO,EAAE,oBAAoB,EAAkB,MAAM,qCAAqC,CAAC;AAE3F,8EAA8E;AAC9E,qDAAqD;AACrD,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,oBAAoB,CAClC,GAAa,EACb,GAAa,EACb,cAAsB;IAEtB,MAAM,EAAE,GAAG,gBAAgB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACtC,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC3B,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC3B,OAAO;QACL,EAAE,EAAE,EAAE,CAAC,EAAE;QACT,MAAM,EAAE,IAAI,CAAC,iBAAiB;QAC9B,MAAM,EAAE,IAAI,CAAC,iBAAiB;KAC/B,CAAC;AACJ,CAAC;AAED,8EAA8E;AAC9E,uDAAuD;AACvD,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,GAAc;IAC9C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AACvC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"l1-gravity-thermo.d.ts","sourceRoot":"","sources":["../../../src/canonical/entries/l1-gravity-thermo.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"l1-gravity-thermo.d.ts","sourceRoot":"","sources":["../../../src/canonical/entries/l1-gravity-thermo.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAyElE,eAAO,MAAM,iBAAiB,EAAE,SAAS,iBAAiB,EA8GzD,CAAC"}
|
|
@@ -19,27 +19,36 @@ const BH_GOV = [
|
|
|
19
19
|
const LANDAUER_TARGET = { name: 'erasure-energy', dim: ENERGY };
|
|
20
20
|
const LANDAUER_GOV = [
|
|
21
21
|
{ name: 'k_B', dim: ENTROPY },
|
|
22
|
-
{ name: '
|
|
22
|
+
{ name: 'temperature', dim: TEMPERATURE },
|
|
23
|
+
];
|
|
24
|
+
// ── Jarzynski equality ΔF = −k_B T ln⟨exp(−W/k_B T)⟩ (the dimensionless ──
|
|
25
|
+
// log of the work-ensemble average is the leading factor; dimensionally
|
|
26
|
+
// ΔF = k_B·T, the same monomial as Landauer). The canonical L-layer partner
|
|
27
|
+
// for BE-29 — see docs/research/BE-29-Landauer-Recovery.md.
|
|
28
|
+
const JARZYNSKI_TARGET = { name: 'free-energy-difference', dim: ENERGY };
|
|
29
|
+
const JARZYNSKI_GOV = [
|
|
30
|
+
{ name: 'k_B', dim: ENTROPY },
|
|
31
|
+
{ name: 'temperature', dim: TEMPERATURE },
|
|
23
32
|
];
|
|
24
33
|
// ── Newton's law of gravitation F = G m₁ m₂ / r² (free mass-ratio group) ──
|
|
25
34
|
const NEWTON_TARGET = { name: 'gravitational-force', dim: FORCE };
|
|
26
35
|
const NEWTON_GOV = [
|
|
27
36
|
{ name: 'G', dim: GRAV },
|
|
28
|
-
{ name: '
|
|
29
|
-
{ name: '
|
|
37
|
+
{ name: 'mass', dim: MASS },
|
|
38
|
+
{ name: 'secondary-mass', dim: MASS },
|
|
30
39
|
{ name: 'r', dim: LENGTH },
|
|
31
40
|
];
|
|
32
41
|
// ── Stefan–Boltzmann law j = σ T⁴ (radiative FLUX) ────────────────────────
|
|
33
42
|
const SB_TARGET = { name: 'radiative-flux', dim: SB_FLUX };
|
|
34
43
|
const SB_GOV = [
|
|
35
44
|
{ name: 'sigma_sb', dim: SIGMA_SB },
|
|
36
|
-
{ name: '
|
|
45
|
+
{ name: 'temperature', dim: TEMPERATURE },
|
|
37
46
|
];
|
|
38
47
|
// ── Ideal gas law P = N k_B T / V (N is a dimensionless count) ────────────
|
|
39
48
|
const GAS_TARGET = { name: 'pressure', dim: PRESSURE };
|
|
40
49
|
const GAS_GOV = [
|
|
41
50
|
{ name: 'k_B', dim: ENTROPY },
|
|
42
|
-
{ name: '
|
|
51
|
+
{ name: 'temperature', dim: TEMPERATURE },
|
|
43
52
|
{ name: 'V', dim: VOLUME },
|
|
44
53
|
];
|
|
45
54
|
export const L1_GRAVITY_THERMO = [
|
|
@@ -81,6 +90,34 @@ export const L1_GRAVITY_THERMO = [
|
|
|
81
90
|
partnerBridges: ['16'],
|
|
82
91
|
restatesBridge: '16',
|
|
83
92
|
}),
|
|
93
|
+
l1(JARZYNSKI_TARGET, JARZYNSKI_GOV, {
|
|
94
|
+
id: 'CE-jarzynski',
|
|
95
|
+
name: 'Jarzynski free-energy equality',
|
|
96
|
+
domain: 'statistical',
|
|
97
|
+
formula_latex: '\\Delta F = -k_B T \\ln \\langle \\exp(-W/(k_B T)) \\rangle',
|
|
98
|
+
// The leading dimensionless factor is the ensemble functional
|
|
99
|
+
// ln⟨exp(−βW)⟩, not a universal constant, so the strongest honest claim
|
|
100
|
+
// is the algebraic form up to that factor.
|
|
101
|
+
epistemicStatus: 'scalar-up-to-constant',
|
|
102
|
+
// Mirrors BE29_JARZYNSKI_RHS: −1 · k_B · T · ln⟨exp(−βW)⟩, the log encoded
|
|
103
|
+
// as a dimensionless stub (the AST has no ln primitive). Structurally this
|
|
104
|
+
// is the k_B·T·(dimensionless) thermodynamic form — the same one Landauer
|
|
105
|
+
// shares, which is exactly why BE-29 "recovers" CE-landauer.
|
|
106
|
+
scalarAst: op('*', [
|
|
107
|
+
sym('-1', DIMENSIONLESS),
|
|
108
|
+
sym('k_B', ENTROPY),
|
|
109
|
+
sym('T', TEMPERATURE),
|
|
110
|
+
sym('ln_avg_exp_minus_betaW', DIMENSIONLESS),
|
|
111
|
+
]),
|
|
112
|
+
regime: { scale: 'mesoscopic' },
|
|
113
|
+
assumptions: ['isothermal', 'arbitrary work protocol between two equilibria'],
|
|
114
|
+
references: ['Jarzynski 1997 PRL 78:2690'],
|
|
115
|
+
// 29 = BE-29 (Jarzynski equality) — this canonical entry IS that bridge's
|
|
116
|
+
// own relation, so it is a declared restatement (NOT a discovery). Its
|
|
117
|
+
// structural match to CE-landauer stays a `recovers` form-coincidence.
|
|
118
|
+
partnerBridges: ['29'],
|
|
119
|
+
restatesBridge: '29',
|
|
120
|
+
}),
|
|
84
121
|
l1(NEWTON_TARGET, NEWTON_GOV, {
|
|
85
122
|
id: 'CE-newton-gravitation',
|
|
86
123
|
name: "Newton's law of gravitation",
|