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.
Files changed (81) hide show
  1. package/README.md +30 -15
  2. package/bin/upt.mjs +127 -21
  3. package/dist/bridges/equations/_be-helpers.d.ts +1 -66
  4. package/dist/bridges/equations/_be-helpers.d.ts.map +1 -1
  5. package/dist/bridges/equations/_be-helpers.js +7 -83
  6. package/dist/bridges/equations/_be-helpers.js.map +1 -1
  7. package/dist/canonical/entries/l1-gravity-thermo.d.ts.map +1 -1
  8. package/dist/canonical/entries/l1-gravity-thermo.js +42 -5
  9. package/dist/canonical/entries/l1-gravity-thermo.js.map +1 -1
  10. package/dist/canonical/entries/l1-quantum-em.js +1 -1
  11. package/dist/canonical/entries/l1-quantum-em.js.map +1 -1
  12. package/dist/canonical/entries/relativity.d.ts.map +1 -1
  13. package/dist/canonical/entries/relativity.js +76 -2
  14. package/dist/canonical/entries/relativity.js.map +1 -1
  15. package/dist/canonical/normal-form.d.ts +10 -4
  16. package/dist/canonical/normal-form.d.ts.map +1 -1
  17. package/dist/canonical/normal-form.js +32 -2
  18. package/dist/canonical/normal-form.js.map +1 -1
  19. package/dist/canonical/registry.d.ts +7 -0
  20. package/dist/canonical/registry.d.ts.map +1 -1
  21. package/dist/canonical/registry.js +9 -0
  22. package/dist/canonical/registry.js.map +1 -1
  23. package/dist/composition/canonical-graph.d.ts +77 -0
  24. package/dist/composition/canonical-graph.d.ts.map +1 -0
  25. package/dist/composition/canonical-graph.js +155 -0
  26. package/dist/composition/canonical-graph.js.map +1 -0
  27. package/dist/composition/compose.d.ts.map +1 -1
  28. package/dist/composition/compose.js +14 -0
  29. package/dist/composition/compose.js.map +1 -1
  30. package/dist/composition/discovery.d.ts +10 -0
  31. package/dist/composition/discovery.d.ts.map +1 -1
  32. package/dist/composition/discovery.js +50 -7
  33. package/dist/composition/discovery.js.map +1 -1
  34. package/dist/composition/edges/calibration.d.ts.map +1 -1
  35. package/dist/composition/edges/calibration.js +53 -0
  36. package/dist/composition/edges/calibration.js.map +1 -1
  37. package/dist/composition/edges/catalog-full.d.ts.map +1 -1
  38. package/dist/composition/edges/catalog-full.js +33 -1
  39. package/dist/composition/edges/catalog-full.js.map +1 -1
  40. package/dist/composition/index.d.ts +1 -0
  41. package/dist/composition/index.d.ts.map +1 -1
  42. package/dist/composition/index.js +1 -0
  43. package/dist/composition/index.js.map +1 -1
  44. package/dist/composition/proposed-bridges.d.ts +218 -0
  45. package/dist/composition/proposed-bridges.d.ts.map +1 -0
  46. package/dist/composition/proposed-bridges.js +499 -0
  47. package/dist/composition/proposed-bridges.js.map +1 -0
  48. package/dist/composition/representative-values.d.ts +9 -3
  49. package/dist/composition/representative-values.d.ts.map +1 -1
  50. package/dist/composition/representative-values.js +34 -3
  51. package/dist/composition/representative-values.js.map +1 -1
  52. package/dist/composition/retrodiction.d.ts +13 -0
  53. package/dist/composition/retrodiction.d.ts.map +1 -1
  54. package/dist/composition/retrodiction.js +7 -1
  55. package/dist/composition/retrodiction.js.map +1 -1
  56. package/dist/composition/symbolic-constants.d.ts.map +1 -1
  57. package/dist/composition/symbolic-constants.js +1 -0
  58. package/dist/composition/symbolic-constants.js.map +1 -1
  59. package/dist/core/cell.d.ts +1 -23
  60. package/dist/core/cell.d.ts.map +1 -1
  61. package/dist/core/cell.js +0 -31
  62. package/dist/core/cell.js.map +1 -1
  63. package/dist/core/tensor.d.ts +27 -1
  64. package/dist/core/tensor.d.ts.map +1 -1
  65. package/dist/core/tensor.js +35 -0
  66. package/dist/core/tensor.js.map +1 -1
  67. package/dist/index.d.ts +2 -1
  68. package/dist/index.d.ts.map +1 -1
  69. package/dist/index.js +5 -1
  70. package/dist/index.js.map +1 -1
  71. package/dist/numerical/grid-field.d.ts +7 -17
  72. package/dist/numerical/grid-field.d.ts.map +1 -1
  73. package/dist/numerical/input-validation.d.ts +56 -0
  74. package/dist/numerical/input-validation.d.ts.map +1 -0
  75. package/dist/numerical/input-validation.js +75 -0
  76. package/dist/numerical/input-validation.js.map +1 -0
  77. package/dist/numerical/klein-gordon.js +1 -1
  78. package/dist/numerical/klein-gordon.js.map +1 -1
  79. package/dist/numerical/types.d.ts +18 -1
  80. package/dist/numerical/types.d.ts.map +1 -1
  81. 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.7.3 on npm
240
- ([`universal-physics-tensor`](https://www.npmjs.com/package/universal-physics-tensor));
241
- the branch carries unreleased **v0.8.0 → v0.14** milestones (composition graph +
242
- GW170817 / BE-23 data confrontations + catalog adjudication, Part-IX Phase C/D,
243
- the full catalog→graph migration, the bridge-inference + symbolic-composition
244
- tooling, the G-9 geometrized-units adapters, and the v0.14 work — distributional/
245
- variational grammar primitives, the `BridgeEquations` facade, G-9 increment 2's
246
- public adapters, and the `LabeledTensor` axis-order fix + `mergeAxes`/`splitAxis`)
247
- awaiting a single **rollup tag** — see the [CHANGELOG](CHANGELOG.md) `[Unreleased]`
248
- block.
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 | **2620** passing (5 skipped, 1 todo; incl. property-based algebra tests) — gated by CI |
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, and the v0.12–v0.13
265
- inference / symbolic-composition / units work. The formal
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
- catalog graph by shared quantities, the anchored core, the link
78
- hubs, and the isolated tail.
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 m = linkageMap(GRAPH);
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('\nCatalog linkage map — how the equations connect via shared quantities');
334
- console.log(`(${m.componentCount} components over ${GRAPH.length} edges; ${m.compositions} compose into chains)\n`);
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 cands = proposeLinkCandidates(GRAPH);
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('\nLink candidates — cross-cluster quantities sharing a dimension');
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
- function discoverCmd() {
391
- const ranked = rankDiscoveries(GRAPH);
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('\nDiscovery — link candidates VETTED through the inference suite');
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
- console.log(` ${(r.a + ' ≟ ' + r.b).padEnd(52)} ~${r.ordersApart.toFixed(1)} orders apart`);
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;AAM5D;;;;;;;;;;;;;;GAcG;AACH,UAAU,SAAS;IACjB,yDAAyD;IACzD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,QAAQ,CAAC,GAAG,CAAC,EAAE,M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AE,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
- * Compose the adjective phrase that appears in the error message,
30
- * picked to match the existing per-BE-NN prose conventions:
31
- *
32
- * - `min=0, excludeMin=true` → "positive" (i.e., `> 0`)
33
- * - `min=0` → "non-negative" (i.e., `≥ 0`)
34
- * - bounded but not a 0-pin → "in range [a, b]" (closed/open as set)
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;AAiD5E;;;;;;;;GAQG;AACH,SAAS,aAAa,CAAC,IAAe;IACpC,mEAAmE;IACnE,+CAA+C;IAC/C,0EAA0E;IAC1E,uCAAuC;IACvC,yFAAyF;IACzF,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS;QAAE,OAAO,GAAG,IAAI,CAAC,WAAW,GAAG,CAAC;IAElE,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,KAAK,SAAS,CAAC;IACtC,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,KAAK,SAAS,CAAC;IACtC,MAAM,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC;IAClC,MAAM,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC;IAEnC,uEAAuE;IACvE,iDAAiD;IACjD,IAAI,MAAM,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;QAC3D,IAAI,OAAO;YAAE,OAAO,WAAW,CAAC,CAAG,2BAA2B;QAC9D,OAAO,eAAe,CAAC,CAAW,+BAA+B;IACnE,CAAC;IAED,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM;QAAE,OAAO,EAAE,CAAC,CAAG,kBAAkB;IAEvD,MAAM,EAAE,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C9C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AACvC,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;AA+DlE,eAAO,MAAM,iBAAiB,EAAE,SAAS,iBAAiB,EAkFzD,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: 'T', dim: TEMPERATURE },
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: 'm_1', dim: MASS },
29
- { name: 'm_2', dim: MASS },
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: 'T', dim: TEMPERATURE },
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: 'T', dim: TEMPERATURE },
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",