universal-physics-tensor 0.7.3 → 0.15.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 +147 -109
- package/bin/upt.mjs +508 -0
- package/dist/bridges/be23-planckian-confrontation.d.ts +162 -0
- package/dist/bridges/be23-planckian-confrontation.d.ts.map +1 -0
- package/dist/bridges/be23-planckian-confrontation.js +196 -0
- package/dist/bridges/be23-planckian-confrontation.js.map +1 -0
- package/dist/bridges/be36-gw170817-confrontation.d.ts +111 -0
- package/dist/bridges/be36-gw170817-confrontation.d.ts.map +1 -0
- package/dist/bridges/be36-gw170817-confrontation.js +100 -0
- package/dist/bridges/be36-gw170817-confrontation.js.map +1 -0
- package/dist/bridges/bridge-equations.d.ts +129 -0
- package/dist/bridges/bridge-equations.d.ts.map +1 -0
- package/dist/bridges/bridge-equations.js +130 -0
- package/dist/bridges/bridge-equations.js.map +1 -0
- package/dist/bridges/catalog-adapter.d.ts +1 -1
- package/dist/bridges/catalog-adapter.js +1 -1
- package/dist/bridges/confrontation-coverage.d.ts +67 -0
- package/dist/bridges/confrontation-coverage.d.ts.map +1 -0
- package/dist/bridges/confrontation-coverage.js +83 -0
- package/dist/bridges/confrontation-coverage.js.map +1 -0
- package/dist/bridges/equations/_be-helpers.d.ts +2 -1
- package/dist/bridges/equations/_be-helpers.d.ts.map +1 -1
- package/dist/bridges/equations/be-12-coherence-length.d.ts +1 -1
- package/dist/bridges/equations/be-13-einstein-trace.d.ts +2 -2
- package/dist/bridges/equations/be-13-einstein-trace.js +1 -1
- package/dist/bridges/equations/be-14-ryu-takayanagi.d.ts +2 -2
- package/dist/bridges/equations/be-15-emergence.d.ts +19 -5
- package/dist/bridges/equations/be-15-emergence.d.ts.map +1 -1
- package/dist/bridges/equations/be-15-emergence.js +18 -4
- package/dist/bridges/equations/be-15-emergence.js.map +1 -1
- package/dist/bridges/equations/be-16-landauer.d.ts +1 -1
- package/dist/bridges/equations/be-17-einstein-cartan.d.ts +1 -1
- package/dist/bridges/equations/be-18-higgs-mass.d.ts +1 -1
- package/dist/bridges/equations/be-19-quantum-bounce.d.ts +1 -1
- package/dist/bridges/equations/be-20-vacuum-energy.d.ts +4 -4
- package/dist/bridges/equations/be-20-vacuum-energy.d.ts.map +1 -1
- package/dist/bridges/equations/be-20-vacuum-energy.js +4 -2
- package/dist/bridges/equations/be-20-vacuum-energy.js.map +1 -1
- package/dist/bridges/equations/be-22-topological-entanglement.d.ts +1 -1
- package/dist/bridges/equations/be-23-syk-planckian.d.ts +1 -1
- package/dist/bridges/equations/be-24-foerster-fret.d.ts +1 -1
- package/dist/bridges/equations/be-25-iit-phi.d.ts +1 -1
- package/dist/bridges/equations/be-25-orch-or.d.ts +13 -1
- package/dist/bridges/equations/be-25-orch-or.d.ts.map +1 -1
- package/dist/bridges/equations/be-25-orch-or.js +12 -0
- package/dist/bridges/equations/be-25-orch-or.js.map +1 -1
- package/dist/bridges/equations/be-26-dna-tunneling.d.ts +2 -2
- package/dist/bridges/equations/be-26-dna-tunneling.js +1 -1
- package/dist/bridges/equations/be-27-effective-temperature.d.ts +1 -1
- package/dist/bridges/equations/be-28-onsager-entropy-production.d.ts +1 -1
- package/dist/bridges/equations/be-29-jarzynski.d.ts +1 -1
- package/dist/bridges/equations/be-30-flm-first-law.d.ts +2 -2
- package/dist/bridges/equations/be-31-causal-set-bd.d.ts +1 -1
- package/dist/bridges/equations/be-32-quantum-reference-frame.d.ts +1 -1
- package/dist/bridges/equations/be-33-hertz-millis.d.ts +1 -1
- package/dist/bridges/equations/be-34-kibble-zurek.d.ts +1 -1
- package/dist/bridges/equations/be-35-conformal-bootstrap.d.ts +1 -1
- package/dist/bridges/equations/be-36-gw-speed-bound.d.ts +12 -5
- package/dist/bridges/equations/be-36-gw-speed-bound.d.ts.map +1 -1
- package/dist/bridges/equations/be-36-gw-speed-bound.js +11 -4
- package/dist/bridges/equations/be-36-gw-speed-bound.js.map +1 -1
- package/dist/bridges/equations/be-38-mond.d.ts +1 -1
- package/dist/bridges/equations/be-39-asymptotic-safety.d.ts +2 -2
- package/dist/bridges/equations/be-40-composite-higgs.d.ts +1 -1
- package/dist/bridges/equations/be-41-swampland.d.ts +1 -1
- package/dist/bridges/equations/be-43-er-epr.d.ts +1 -1
- package/dist/bridges/equations/be-44-soft-hair.d.ts +1 -1
- package/dist/bridges/equations/be-45-tcc.d.ts +1 -1
- package/dist/bridges/equations/be-46-multiverse-measure.d.ts +1 -1
- package/dist/bridges/equations/be-47-bbn-dark-sector.d.ts +1 -1
- package/dist/bridges/equations/be-48-grw-localization.d.ts +1 -1
- package/dist/bridges/equations/be-49-quantum-darwinism.d.ts +1 -1
- package/dist/bridges/equations/be-50-wheeler-feynman.d.ts +1 -1
- package/dist/bridges/index.d.ts +10 -7
- package/dist/bridges/index.d.ts.map +1 -1
- package/dist/bridges/index.js +47 -34
- package/dist/bridges/index.js.map +1 -1
- package/dist/bridges/membership.d.ts +44 -0
- package/dist/bridges/membership.d.ts.map +1 -0
- package/dist/bridges/membership.js +59 -0
- package/dist/bridges/membership.js.map +1 -0
- package/dist/bridges/rejected.d.ts +40 -0
- package/dist/bridges/rejected.d.ts.map +1 -0
- package/dist/bridges/rejected.js +81 -0
- package/dist/bridges/rejected.js.map +1 -0
- package/dist/composition/bridge-analysis.d.ts +189 -0
- package/dist/composition/bridge-analysis.d.ts.map +1 -0
- package/dist/composition/bridge-analysis.js +445 -0
- package/dist/composition/bridge-analysis.js.map +1 -0
- package/dist/composition/bridge-prediction.d.ts +95 -0
- package/dist/composition/bridge-prediction.d.ts.map +1 -0
- package/dist/composition/bridge-prediction.js +0 -0
- package/dist/composition/bridge-prediction.js.map +1 -0
- package/dist/composition/catalog-graph.d.ts +20 -0
- package/dist/composition/catalog-graph.d.ts.map +1 -0
- package/dist/composition/catalog-graph.js +39 -0
- package/dist/composition/catalog-graph.js.map +1 -0
- package/dist/composition/compose-surface.d.ts +12 -0
- package/dist/composition/compose-surface.d.ts.map +1 -0
- package/dist/composition/compose-surface.js +10 -0
- package/dist/composition/compose-surface.js.map +1 -0
- package/dist/composition/compose-symbolic.d.ts +75 -0
- package/dist/composition/compose-symbolic.d.ts.map +1 -0
- package/dist/composition/compose-symbolic.js +157 -0
- package/dist/composition/compose-symbolic.js.map +1 -0
- package/dist/composition/compose.d.ts +110 -0
- package/dist/composition/compose.d.ts.map +1 -0
- package/dist/composition/compose.js +231 -0
- package/dist/composition/compose.js.map +1 -0
- package/dist/composition/consistency.d.ts +24 -0
- package/dist/composition/consistency.d.ts.map +1 -0
- package/dist/composition/consistency.js +26 -0
- package/dist/composition/consistency.js.map +1 -0
- package/dist/composition/discovery.d.ts +104 -0
- package/dist/composition/discovery.d.ts.map +1 -0
- package/dist/composition/discovery.js +165 -0
- package/dist/composition/discovery.js.map +1 -0
- package/dist/composition/edge.d.ts +139 -0
- package/dist/composition/edge.d.ts.map +1 -0
- package/dist/composition/edge.js +72 -0
- package/dist/composition/edge.js.map +1 -0
- package/dist/composition/edges/calibration.d.ts +107 -0
- package/dist/composition/edges/calibration.d.ts.map +1 -0
- package/dist/composition/edges/calibration.js +373 -0
- package/dist/composition/edges/calibration.js.map +1 -0
- package/dist/composition/edges/catalog-full.d.ts +299 -0
- package/dist/composition/edges/catalog-full.d.ts.map +1 -0
- package/dist/composition/edges/catalog-full.js +989 -0
- package/dist/composition/edges/catalog-full.js.map +1 -0
- package/dist/composition/edges/catalog-tranche.d.ts +112 -0
- package/dist/composition/edges/catalog-tranche.d.ts.map +1 -0
- package/dist/composition/edges/catalog-tranche.js +241 -0
- package/dist/composition/edges/catalog-tranche.js.map +1 -0
- package/dist/composition/enumerate.d.ts +67 -0
- package/dist/composition/enumerate.d.ts.map +1 -0
- package/dist/composition/enumerate.js +78 -0
- package/dist/composition/enumerate.js.map +1 -0
- package/dist/composition/explain.d.ts +102 -0
- package/dist/composition/explain.d.ts.map +1 -0
- package/dist/composition/explain.js +244 -0
- package/dist/composition/explain.js.map +1 -0
- package/dist/composition/expr-eval.d.ts +33 -0
- package/dist/composition/expr-eval.d.ts.map +1 -0
- package/dist/composition/expr-eval.js +95 -0
- package/dist/composition/expr-eval.js.map +1 -0
- package/dist/composition/expr-simplify.d.ts +60 -0
- package/dist/composition/expr-simplify.d.ts.map +1 -0
- package/dist/composition/expr-simplify.js +330 -0
- package/dist/composition/expr-simplify.js.map +1 -0
- package/dist/composition/expr-subst.d.ts +29 -0
- package/dist/composition/expr-subst.d.ts.map +1 -0
- package/dist/composition/expr-subst.js +60 -0
- package/dist/composition/expr-subst.js.map +1 -0
- package/dist/composition/identifiability.d.ts +103 -0
- package/dist/composition/identifiability.d.ts.map +1 -0
- package/dist/composition/identifiability.js +148 -0
- package/dist/composition/identifiability.js.map +1 -0
- package/dist/composition/index.d.ts +37 -0
- package/dist/composition/index.d.ts.map +1 -0
- package/dist/composition/index.js +27 -0
- package/dist/composition/index.js.map +1 -0
- package/dist/composition/quantities.d.ts +297 -0
- package/dist/composition/quantities.d.ts.map +1 -0
- package/dist/composition/quantities.js +1017 -0
- package/dist/composition/quantities.js.map +1 -0
- package/dist/composition/quantity.d.ts +59 -0
- package/dist/composition/quantity.d.ts.map +1 -0
- package/dist/composition/quantity.js +36 -0
- package/dist/composition/quantity.js.map +1 -0
- package/dist/composition/retrodiction.d.ts +94 -0
- package/dist/composition/retrodiction.d.ts.map +1 -0
- package/dist/composition/retrodiction.js +171 -0
- package/dist/composition/retrodiction.js.map +1 -0
- package/dist/composition/symbolic-constants.d.ts +33 -0
- package/dist/composition/symbolic-constants.d.ts.map +1 -0
- package/dist/composition/symbolic-constants.js +50 -0
- package/dist/composition/symbolic-constants.js.map +1 -0
- package/dist/composition/uncertainty.d.ts +45 -0
- package/dist/composition/uncertainty.d.ts.map +1 -0
- package/dist/composition/uncertainty.js +59 -0
- package/dist/composition/uncertainty.js.map +1 -0
- package/dist/core/axes-registry.d.ts +1 -1
- package/dist/core/axes-registry.js +1 -1
- package/dist/core/cell.d.ts +0 -8
- package/dist/core/cell.d.ts.map +1 -1
- package/dist/core/cell.js +1 -1
- package/dist/core/cell.js.map +1 -1
- package/dist/core/constants.d.ts +15 -1
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/constants.js +15 -1
- package/dist/core/constants.js.map +1 -1
- package/dist/core/flux-rules.d.ts +10 -13
- package/dist/core/flux-rules.d.ts.map +1 -1
- package/dist/core/flux-rules.js +19 -10
- package/dist/core/flux-rules.js.map +1 -1
- package/dist/core/labeled-tensor.d.ts +80 -1
- package/dist/core/labeled-tensor.d.ts.map +1 -1
- package/dist/core/labeled-tensor.js +263 -17
- package/dist/core/labeled-tensor.js.map +1 -1
- package/dist/core/universal-index.d.ts +1 -1
- package/dist/core/universal-index.js +1 -1
- package/dist/diff/bridge-gradient.d.ts +51 -8
- package/dist/diff/bridge-gradient.d.ts.map +1 -1
- package/dist/diff/bridge-gradient.js +75 -8
- package/dist/diff/bridge-gradient.js.map +1 -1
- package/dist/dimensional/buckingham.d.ts +103 -0
- package/dist/dimensional/buckingham.d.ts.map +1 -0
- package/dist/dimensional/buckingham.js +284 -0
- package/dist/dimensional/buckingham.js.map +1 -0
- package/dist/dimensional/dimension-spec.d.ts +24 -0
- package/dist/dimensional/dimension-spec.d.ts.map +1 -0
- package/dist/dimensional/dimension-spec.js +110 -0
- package/dist/dimensional/dimension-spec.js.map +1 -0
- package/dist/dimensional/field-equation-helpers.d.ts +1 -1
- package/dist/dimensional/field-equation-helpers.js +1 -1
- package/dist/dimensional/friedmann-equation.d.ts +1 -1
- package/dist/dimensional/friedmann-equation.js +1 -1
- package/dist/dimensional/gauge-field.d.ts +1 -1
- package/dist/dimensional/gauge-field.js +1 -1
- package/dist/dimensional/klein-gordon-equation.d.ts +8 -5
- package/dist/dimensional/klein-gordon-equation.d.ts.map +1 -1
- package/dist/dimensional/klein-gordon-equation.js +8 -5
- package/dist/dimensional/klein-gordon-equation.js.map +1 -1
- package/dist/dimensional/tensor-trace.d.ts +1 -1
- package/dist/dimensional/tensor-trace.js +1 -1
- package/dist/dimensional/validator.d.ts +13 -3
- package/dist/dimensional/validator.d.ts.map +1 -1
- package/dist/dimensional/validator.js +129 -42
- package/dist/dimensional/validator.js.map +1 -1
- package/dist/index.d.ts +34 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +64 -3
- package/dist/index.js.map +1 -1
- package/dist/numerical/be37-covariant-eikonal.d.ts.map +1 -1
- package/dist/numerical/be37-covariant-eikonal.js +15 -18
- package/dist/numerical/be37-covariant-eikonal.js.map +1 -1
- package/dist/numerical/curvature-lowering-helpers.d.ts +7 -13
- package/dist/numerical/curvature-lowering-helpers.d.ts.map +1 -1
- package/dist/numerical/curvature-lowering-helpers.js +1 -1
- package/dist/numerical/curvature-lowering-helpers.js.map +1 -1
- package/dist/numerical/derivative-lowering.d.ts +2 -1
- package/dist/numerical/derivative-lowering.d.ts.map +1 -1
- package/dist/numerical/formula-dimension.d.ts +40 -0
- package/dist/numerical/formula-dimension.d.ts.map +1 -0
- package/dist/numerical/formula-dimension.js +199 -0
- package/dist/numerical/formula-dimension.js.map +1 -0
- package/dist/numerical/formula-mathts.d.ts +27 -0
- package/dist/numerical/formula-mathts.d.ts.map +1 -0
- package/dist/numerical/formula-mathts.js +98 -0
- package/dist/numerical/formula-mathts.js.map +1 -0
- package/dist/numerical/formula-registry.d.ts +30 -0
- package/dist/numerical/formula-registry.d.ts.map +1 -0
- package/dist/numerical/formula-registry.js +88 -0
- package/dist/numerical/formula-registry.js.map +1 -0
- package/dist/numerical/formula.d.ts +75 -0
- package/dist/numerical/formula.d.ts.map +1 -0
- package/dist/numerical/formula.js +275 -0
- package/dist/numerical/formula.js.map +1 -0
- package/dist/numerical/geometrized.d.ts +51 -0
- package/dist/numerical/geometrized.d.ts.map +1 -0
- package/dist/numerical/geometrized.js +66 -0
- package/dist/numerical/geometrized.js.map +1 -0
- package/dist/numerical/gl4-integrator.d.ts +8 -6
- package/dist/numerical/gl4-integrator.d.ts.map +1 -1
- package/dist/numerical/gl4-integrator.js +6 -6
- package/dist/numerical/gl4-integrator.js.map +1 -1
- package/dist/numerical/klein-gordon.d.ts +145 -0
- package/dist/numerical/klein-gordon.d.ts.map +1 -0
- package/dist/numerical/klein-gordon.js +145 -0
- package/dist/numerical/klein-gordon.js.map +1 -0
- package/dist/numerical/kretschmann.d.ts +43 -12
- package/dist/numerical/kretschmann.d.ts.map +1 -1
- package/dist/numerical/kretschmann.js +116 -29
- package/dist/numerical/kretschmann.js.map +1 -1
- package/dist/numerical/lowering.d.ts +18 -0
- package/dist/numerical/lowering.d.ts.map +1 -1
- package/dist/numerical/lowering.js +54 -42
- package/dist/numerical/lowering.js.map +1 -1
- package/dist/numerical/null-ic.d.ts +1 -1
- package/dist/numerical/null-ic.d.ts.map +1 -1
- package/dist/numerical/null-ic.js +3 -2
- package/dist/numerical/null-ic.js.map +1 -1
- package/dist/numerical/painleve-gullstrand-metric.d.ts +18 -6
- package/dist/numerical/painleve-gullstrand-metric.d.ts.map +1 -1
- package/dist/numerical/painleve-gullstrand-metric.js +31 -16
- package/dist/numerical/painleve-gullstrand-metric.js.map +1 -1
- package/dist/numerical/perihelion-finder.d.ts +4 -3
- package/dist/numerical/perihelion-finder.d.ts.map +1 -1
- package/dist/numerical/perihelion-finder.js +5 -4
- package/dist/numerical/perihelion-finder.js.map +1 -1
- package/dist/numerical/types.d.ts +6 -3
- package/dist/numerical/types.d.ts.map +1 -1
- package/dist/numerical/weyl-lowering.d.ts +4 -4
- package/dist/numerical/weyl-lowering.d.ts.map +1 -1
- package/dist/numerical/weyl-lowering.js +14 -1
- package/dist/numerical/weyl-lowering.js.map +1 -1
- package/package.json +19 -8
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bridge-analysis — structural triage signals over the composition graph.
|
|
3
|
+
*
|
|
4
|
+
* INTERNAL (deliberately NOT on the public surface — not re-exported from
|
|
5
|
+
* src/index.ts). A meta/analysis layer, like the catalog adjudicator, that
|
|
6
|
+
* combines the dimensional engine with the graph to PRIORITIZE which
|
|
7
|
+
* speculative bridges are closest to being DECIDABLE against established
|
|
8
|
+
* physics — most anchored to the established core and most checkable.
|
|
9
|
+
*
|
|
10
|
+
* ⚠ This is a TRIAGE ranking (review/confrontation priority), NOT a
|
|
11
|
+
* credibility ranking. The dimensional signals are orthogonal to whether a
|
|
12
|
+
* bridge is true (see docs/research/Bridge-Equation-Dimensional-Audit.md:
|
|
13
|
+
* the established Mercury perihelion is "unclosable"; the highly-speculative
|
|
14
|
+
* Hawking-via-r_s derives cleanly). Do not prune, rank, or score the
|
|
15
|
+
* catalog's credibility with this.
|
|
16
|
+
*
|
|
17
|
+
* Three engine signals + one catalog signal:
|
|
18
|
+
* - grounding — does the equation re-derive as a recognized monomial
|
|
19
|
+
* with a CLEAN dimensionless constant (ln2, 1/4π, √2π)?
|
|
20
|
+
* - complexity — free dimensionless parameters (lower = more tractable).
|
|
21
|
+
* - anchoring — graph distance to the established-confidence core.
|
|
22
|
+
* - status / data-confrontation — joined from the catalog (NOT engine).
|
|
23
|
+
*
|
|
24
|
+
* @module composition/bridge-analysis
|
|
25
|
+
*/
|
|
26
|
+
import { buckinghamPi, dimensionallyDetermines } from '../dimensional/buckingham.js';
|
|
27
|
+
import { DIMENSIONLESS } from '../dimensional/types.js';
|
|
28
|
+
import { equals, format } from '../dimensional/algebra.js';
|
|
29
|
+
import { BRIDGE_EQUATIONS } from '../bridges/index.js';
|
|
30
|
+
import { QUANTITY_IDENTIFICATIONS } from './compose.js';
|
|
31
|
+
import { enumerateCompositions } from './enumerate.js';
|
|
32
|
+
const dim = (L = 0, M = 0, T = 0, Theta = 0, I = 0) => ({
|
|
33
|
+
L,
|
|
34
|
+
M,
|
|
35
|
+
T,
|
|
36
|
+
I,
|
|
37
|
+
Theta,
|
|
38
|
+
N: 0,
|
|
39
|
+
J: 0,
|
|
40
|
+
});
|
|
41
|
+
/** ℏ, c, G, k_B, e — the constants the audit/triage may invoke. */
|
|
42
|
+
const FUNDAMENTAL_CONSTANTS = [
|
|
43
|
+
{ name: 'ℏ', dim: dim(2, 1, -1), si: 1.054571817e-34 },
|
|
44
|
+
{ name: 'c', dim: dim(1, 0, -1), si: 299792458 },
|
|
45
|
+
{ name: 'G', dim: dim(3, -1, -2), si: 6.6743e-11 },
|
|
46
|
+
{ name: 'k_B', dim: dim(2, 1, -2, -1), si: 1.380649e-23 },
|
|
47
|
+
{ name: 'e', dim: dim(0, 0, 1, 0, 1), si: 1.602176634e-19 },
|
|
48
|
+
];
|
|
49
|
+
/** Catalog bridge ids with a committed data confrontation (BE-23, BE-36). */
|
|
50
|
+
const DATA_CONFRONTED_BE_IDS = new Set([23, 36]);
|
|
51
|
+
function subsetsBySize(arr) {
|
|
52
|
+
let out = [[]];
|
|
53
|
+
for (const x of arr) {
|
|
54
|
+
const n = out.length;
|
|
55
|
+
for (let i = 0; i < n; i++)
|
|
56
|
+
out.push([...out[i], x]);
|
|
57
|
+
}
|
|
58
|
+
return out.sort((a, b) => a.length - b.length);
|
|
59
|
+
}
|
|
60
|
+
const asVars = (e) => ({
|
|
61
|
+
target: { name: e.target.name, dim: e.target.dim },
|
|
62
|
+
sources: e.sources.map((s) => ({ name: s.name, dim: s.dim })),
|
|
63
|
+
});
|
|
64
|
+
const rankOf = (vars) => (vars.length ? buckinghamPi(vars).rank : 0);
|
|
65
|
+
const inSpan = (t, gov) => gov.length === 0 ? buckinghamPi([t]).rank === 0 : rankOf([t, ...gov]) === rankOf(gov);
|
|
66
|
+
/**
|
|
67
|
+
* Free dimensionless parameters: minimal constant subset that puts the
|
|
68
|
+
* target in span, then the leftover π-group count − 1. 0 = a single
|
|
69
|
+
* dimensionless statement (monomial or decoy); k = monomial × F(k ratios).
|
|
70
|
+
*/
|
|
71
|
+
export function dimensionalFreedom(e) {
|
|
72
|
+
const { target, sources } = asVars(e);
|
|
73
|
+
for (const S of subsetsBySize(FUNDAMENTAL_CONSTANTS)) {
|
|
74
|
+
const gov = [...sources, ...S];
|
|
75
|
+
if (inSpan(target, gov))
|
|
76
|
+
return buckinghamPi([target, ...gov]).piGroupCount - 1;
|
|
77
|
+
}
|
|
78
|
+
return Infinity;
|
|
79
|
+
}
|
|
80
|
+
/** Deterministic, domain-valid input sets with per-source variation. */
|
|
81
|
+
function makeInputs(e) {
|
|
82
|
+
if (e.sources.length === 0)
|
|
83
|
+
return [{}];
|
|
84
|
+
const sets = [];
|
|
85
|
+
for (let j = 0; j < 3; j++) {
|
|
86
|
+
const inp = {};
|
|
87
|
+
e.sources.forEach((s, i) => {
|
|
88
|
+
inp[s.name] = Math.pow(1.6 + i, 1 + 0.27 * j);
|
|
89
|
+
});
|
|
90
|
+
try {
|
|
91
|
+
if (e.domain.predicate(inp) && Number.isFinite(e.evaluate(inp)))
|
|
92
|
+
sets.push(inp);
|
|
93
|
+
}
|
|
94
|
+
catch {
|
|
95
|
+
/* skip */
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return sets;
|
|
99
|
+
}
|
|
100
|
+
/** Recognizable dimensionless prefactors (small rationals, 1/nπ, √, π). */
|
|
101
|
+
const CLEAN_PREFACTORS = [
|
|
102
|
+
1, 2, 3, 4, 0.5, 0.25, Math.log(2),
|
|
103
|
+
1 / (2 * Math.PI), 1 / (4 * Math.PI), 1 / (8 * Math.PI),
|
|
104
|
+
Math.sqrt(2 * Math.PI), Math.sqrt(Math.PI),
|
|
105
|
+
Math.PI, 2 * Math.PI, 4 * Math.PI, 6 * Math.PI,
|
|
106
|
+
];
|
|
107
|
+
const isCleanPrefactor = (p) => CLEAN_PREFACTORS.some((c) => Math.abs(Math.abs(p) - c) < 1e-3 * c);
|
|
108
|
+
/**
|
|
109
|
+
* Attempt to derive a bridge: the first constant-subset that dimensionally
|
|
110
|
+
* closes the target AND reproduces the evaluator up to a constant ratio.
|
|
111
|
+
*/
|
|
112
|
+
export function attemptDerivation(e) {
|
|
113
|
+
const { target, sources } = asVars(e);
|
|
114
|
+
const inputs = makeInputs(e);
|
|
115
|
+
const need = e.sources.length === 0 ? 1 : 2;
|
|
116
|
+
let anyClosure = false;
|
|
117
|
+
for (const S of subsetsBySize(FUNDAMENTAL_CONSTANTS)) {
|
|
118
|
+
const r = dimensionallyDetermines(target, [...sources, ...S]);
|
|
119
|
+
if (!r.determined)
|
|
120
|
+
continue;
|
|
121
|
+
anyClosure = true;
|
|
122
|
+
if (inputs.length < need)
|
|
123
|
+
continue;
|
|
124
|
+
const ratios = inputs.map((i) => {
|
|
125
|
+
let cand = 1;
|
|
126
|
+
for (const s of e.sources)
|
|
127
|
+
cand *= Math.pow(i[s.name], r.monomial[s.name] ?? 0);
|
|
128
|
+
for (const k of S)
|
|
129
|
+
cand *= Math.pow(k.si, r.monomial[k.name] ?? 0);
|
|
130
|
+
return e.evaluate(i) / cand;
|
|
131
|
+
});
|
|
132
|
+
const mean = ratios.reduce((a, b) => a + b, 0) / ratios.length;
|
|
133
|
+
const cv = Math.sqrt(ratios.reduce((a, b) => a + (b - mean) ** 2, 0) / ratios.length) /
|
|
134
|
+
Math.abs(mean);
|
|
135
|
+
if (cv < 1e-9) {
|
|
136
|
+
return {
|
|
137
|
+
status: 'derived',
|
|
138
|
+
subset: S.map((x) => x.name),
|
|
139
|
+
monomial: r.monomial,
|
|
140
|
+
prefactor: mean,
|
|
141
|
+
cleanPrefactor: isCleanPrefactor(mean),
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
if (inputs.length < need)
|
|
146
|
+
return { status: 'no-samples' };
|
|
147
|
+
return { status: anyClosure ? 'decoy' : 'open' };
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Graph distance from a bridge's quantities to the established-confidence
|
|
151
|
+
* core (BFS over quantity co-occurrence). 0 = shares a quantity with an
|
|
152
|
+
* established edge; Infinity = structurally isolated from it.
|
|
153
|
+
*/
|
|
154
|
+
export function anchoringDistance(edges, e) {
|
|
155
|
+
const adj = new Map();
|
|
156
|
+
const link = (a, b) => {
|
|
157
|
+
if (!adj.has(a))
|
|
158
|
+
adj.set(a, new Set());
|
|
159
|
+
adj.get(a).add(b);
|
|
160
|
+
};
|
|
161
|
+
const core = new Set();
|
|
162
|
+
for (const edge of edges) {
|
|
163
|
+
const q = [...edge.sources.map((s) => s.name), edge.target.name];
|
|
164
|
+
for (const a of q)
|
|
165
|
+
for (const b of q)
|
|
166
|
+
if (a !== b)
|
|
167
|
+
link(a, b);
|
|
168
|
+
if (edge.confidence === 'established')
|
|
169
|
+
for (const n of q)
|
|
170
|
+
core.add(n);
|
|
171
|
+
}
|
|
172
|
+
const distOf = new Map();
|
|
173
|
+
const queue = [...core];
|
|
174
|
+
for (const c of core)
|
|
175
|
+
distOf.set(c, 0);
|
|
176
|
+
while (queue.length) {
|
|
177
|
+
const x = queue.shift();
|
|
178
|
+
for (const y of adj.get(x) ?? []) {
|
|
179
|
+
if (!distOf.has(y)) {
|
|
180
|
+
distOf.set(y, distOf.get(x) + 1);
|
|
181
|
+
queue.push(y);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
const qs = [...e.sources.map((s) => s.name), e.target.name];
|
|
186
|
+
return Math.min(...qs.map((n) => (distOf.has(n) ? distOf.get(n) : Infinity)));
|
|
187
|
+
}
|
|
188
|
+
function grounding(e) {
|
|
189
|
+
const d = attemptDerivation(e);
|
|
190
|
+
if (d.status === 'derived')
|
|
191
|
+
return d.cleanPrefactor ? 'grounded' : 'empirical';
|
|
192
|
+
if (d.status === 'decoy')
|
|
193
|
+
return 'decoy';
|
|
194
|
+
return 'open';
|
|
195
|
+
}
|
|
196
|
+
const GROUND_RANK = {
|
|
197
|
+
grounded: 0,
|
|
198
|
+
empirical: 1,
|
|
199
|
+
decoy: 2,
|
|
200
|
+
open: 3,
|
|
201
|
+
};
|
|
202
|
+
/**
|
|
203
|
+
* Triage the non-established bridges by structural decidability against the
|
|
204
|
+
* established core. Returns profiles sorted best-first (Tier, then anchoring,
|
|
205
|
+
* grounding, complexity). NOT a credibility ranking — see module docstring.
|
|
206
|
+
*/
|
|
207
|
+
export function bridgePriority(edges) {
|
|
208
|
+
const statusOf = new Map(BRIDGE_EQUATIONS.map((b) => [b.id, b.status]));
|
|
209
|
+
const entries = [];
|
|
210
|
+
for (const e of edges) {
|
|
211
|
+
if (e.confidence === 'established')
|
|
212
|
+
continue; // already in the core
|
|
213
|
+
const g = grounding(e);
|
|
214
|
+
const complexity = dimensionalFreedom(e);
|
|
215
|
+
const anchoring = anchoringDistance(edges, e);
|
|
216
|
+
const anchored = Number.isFinite(anchoring);
|
|
217
|
+
const tier = anchored && (g === 'grounded' || complexity <= 1)
|
|
218
|
+
? 1
|
|
219
|
+
: anchored || g === 'grounded'
|
|
220
|
+
? 2
|
|
221
|
+
: 3;
|
|
222
|
+
entries.push({
|
|
223
|
+
id: e.id,
|
|
224
|
+
beId: e.beId,
|
|
225
|
+
status: e.beId == null ? 'law' : (statusOf.get(e.beId) ?? 'unknown'),
|
|
226
|
+
grounding: g,
|
|
227
|
+
complexity,
|
|
228
|
+
anchoring,
|
|
229
|
+
hasDataConfrontation: e.beId != null && DATA_CONFRONTED_BE_IDS.has(e.beId),
|
|
230
|
+
tier,
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
entries.sort((a, b) => a.tier - b.tier ||
|
|
234
|
+
a.anchoring - b.anchoring ||
|
|
235
|
+
GROUND_RANK[a.grounding] - GROUND_RANK[b.grounding] ||
|
|
236
|
+
a.complexity - b.complexity ||
|
|
237
|
+
a.id.localeCompare(b.id));
|
|
238
|
+
return entries;
|
|
239
|
+
}
|
|
240
|
+
// ---------------------------------------------------------------------------
|
|
241
|
+
// Catalog linkage map — how the equations connect via shared quantities.
|
|
242
|
+
// ---------------------------------------------------------------------------
|
|
243
|
+
/**
|
|
244
|
+
* Quantity-name canonicalizer honoring `QUANTITY_IDENTIFICATIONS`: maps each
|
|
245
|
+
* name to its identified representative (e.g. hawking-temperature →
|
|
246
|
+
* temperature). The shared linkage substrate for `linkageMap` /
|
|
247
|
+
* `proposeLinkCandidates`. NOTE: `anchoringDistance` deliberately does NOT
|
|
248
|
+
* use this — it links on raw names (its distance-0/∞ contract is pinned).
|
|
249
|
+
*/
|
|
250
|
+
function quantityCanonicalizer() {
|
|
251
|
+
const alias = new Map(QUANTITY_IDENTIFICATIONS.map((id) => [id.from, id.to]));
|
|
252
|
+
return (n) => alias.get(n) ?? n;
|
|
253
|
+
}
|
|
254
|
+
/** An edge's distinct (canonical) quantity names — sources ∪ target. */
|
|
255
|
+
function quantitiesOf(e, canon) {
|
|
256
|
+
return [...new Set([...e.sources.map((s) => canon(s.name)), canon(e.target.name)])];
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Map how the catalog's equations link: connected components of the graph
|
|
260
|
+
* whose nodes are edges and whose links are shared quantities (honoring
|
|
261
|
+
* `QUANTITY_IDENTIFICATIONS`). Reveals the cluster structure — a dominant
|
|
262
|
+
* anchored core hubbed on a few quantities, plus thematic clusters and a
|
|
263
|
+
* long isolated tail. A descriptive structural map, NOT a credibility
|
|
264
|
+
* signal (see bridgePriority's caveat). Internal — not on the public
|
|
265
|
+
* surface (mirrors the rest of bridge-analysis).
|
|
266
|
+
*/
|
|
267
|
+
export function linkageMap(edges) {
|
|
268
|
+
const statusOf = new Map(BRIDGE_EQUATIONS.map((b) => [b.id, b.status]));
|
|
269
|
+
const canon = quantityCanonicalizer();
|
|
270
|
+
// Union-find over edges sharing a (canonical) quantity.
|
|
271
|
+
const parent = edges.map((_, i) => i);
|
|
272
|
+
const find = (x) => (parent[x] === x ? x : (parent[x] = find(parent[x])));
|
|
273
|
+
const union = (a, b) => { parent[find(a)] = find(b); };
|
|
274
|
+
const qToEdges = new Map();
|
|
275
|
+
edges.forEach((e, i) => {
|
|
276
|
+
for (const q of quantitiesOf(e, canon)) {
|
|
277
|
+
if (!qToEdges.has(q))
|
|
278
|
+
qToEdges.set(q, []);
|
|
279
|
+
qToEdges.get(q).push(i);
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
for (const idxs of qToEdges.values()) {
|
|
283
|
+
for (let k = 1; k < idxs.length; k++)
|
|
284
|
+
union(idxs[0], idxs[k]);
|
|
285
|
+
}
|
|
286
|
+
const groups = new Map();
|
|
287
|
+
edges.forEach((_, i) => {
|
|
288
|
+
const r = find(i);
|
|
289
|
+
if (!groups.has(r))
|
|
290
|
+
groups.set(r, []);
|
|
291
|
+
groups.get(r).push(i);
|
|
292
|
+
});
|
|
293
|
+
const clusters = [...groups.values()].map((idxs) => {
|
|
294
|
+
const es = idxs.map((i) => edges[i]);
|
|
295
|
+
const statusMix = {};
|
|
296
|
+
const qcount = {};
|
|
297
|
+
for (const e of es) {
|
|
298
|
+
const s = e.beId == null ? 'law' : (statusOf.get(e.beId) ?? 'unknown');
|
|
299
|
+
statusMix[s] = (statusMix[s] ?? 0) + 1;
|
|
300
|
+
for (const q of quantitiesOf(e, canon))
|
|
301
|
+
qcount[q] = (qcount[q] ?? 0) + 1;
|
|
302
|
+
}
|
|
303
|
+
return {
|
|
304
|
+
edges: es.map((e) => e.id),
|
|
305
|
+
size: es.length,
|
|
306
|
+
anchored: es.some((e) => e.confidence === 'established'),
|
|
307
|
+
statusMix,
|
|
308
|
+
hubs: Object.entries(qcount).filter(([, c]) => c >= 2).map(([q]) => q).sort(),
|
|
309
|
+
};
|
|
310
|
+
});
|
|
311
|
+
clusters.sort((a, b) => b.size - a.size || a.edges[0].localeCompare(b.edges[0]));
|
|
312
|
+
return {
|
|
313
|
+
clusters,
|
|
314
|
+
componentCount: clusters.length,
|
|
315
|
+
isolated: clusters.filter((c) => c.size === 1).flatMap((c) => c.edges).sort(),
|
|
316
|
+
compositions: enumerateCompositions(edges).all.length,
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
function sharedNameToken(a, b) {
|
|
320
|
+
const tb = new Set(b.split('-'));
|
|
321
|
+
for (const t of a.split('-'))
|
|
322
|
+
if (tb.has(t))
|
|
323
|
+
return t;
|
|
324
|
+
return null;
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Propose candidate cross-cluster identifications from the linkage map:
|
|
328
|
+
* every pair of quantities in different clusters that share a
|
|
329
|
+
* non-dimensionless dimension. ⚠ This is a coincidence-heavy REVIEW SURFACE
|
|
330
|
+
* (same dimension is a weak signal — see the dimensional audit's decoy
|
|
331
|
+
* finding), NOT a list of discovered bridges. Ranked: core-touching first,
|
|
332
|
+
* then same-kind. The output's only path is human adjudication
|
|
333
|
+
* (Part-VI §XXVII-B).
|
|
334
|
+
*
|
|
335
|
+
* Internal — not on the public surface.
|
|
336
|
+
*/
|
|
337
|
+
export function proposeLinkCandidates(edges) {
|
|
338
|
+
const m = linkageMap(edges);
|
|
339
|
+
const canon = quantityCanonicalizer();
|
|
340
|
+
const edgeCluster = new Map();
|
|
341
|
+
m.clusters.forEach((c, ci) => c.edges.forEach((id) => edgeCluster.set(id, ci)));
|
|
342
|
+
const qCluster = new Map();
|
|
343
|
+
const qDim = new Map();
|
|
344
|
+
const qAnchored = new Map();
|
|
345
|
+
for (const e of edges) {
|
|
346
|
+
const ci = edgeCluster.get(e.id);
|
|
347
|
+
const anchored = m.clusters[ci].anchored;
|
|
348
|
+
for (const s of [...e.sources, e.target]) {
|
|
349
|
+
const n = canon(s.name);
|
|
350
|
+
qCluster.set(n, ci);
|
|
351
|
+
qDim.set(n, s.dim);
|
|
352
|
+
if (anchored)
|
|
353
|
+
qAnchored.set(n, true);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
const names = [...qDim.keys()];
|
|
357
|
+
const out = [];
|
|
358
|
+
for (let i = 0; i < names.length; i++) {
|
|
359
|
+
for (let j = i + 1; j < names.length; j++) {
|
|
360
|
+
const a = names[i];
|
|
361
|
+
const b = names[j];
|
|
362
|
+
if (qCluster.get(a) === qCluster.get(b))
|
|
363
|
+
continue; // already linked
|
|
364
|
+
const da = qDim.get(a);
|
|
365
|
+
if (equals(da, DIMENSIONLESS))
|
|
366
|
+
continue; // dimensionless = too generic
|
|
367
|
+
if (!equals(da, qDim.get(b)))
|
|
368
|
+
continue;
|
|
369
|
+
const token = sharedNameToken(a, b);
|
|
370
|
+
out.push({
|
|
371
|
+
a,
|
|
372
|
+
b,
|
|
373
|
+
dim: format(da),
|
|
374
|
+
touchesCore: !!(qAnchored.get(a) || qAnchored.get(b)),
|
|
375
|
+
sameKind: token !== null,
|
|
376
|
+
sharedToken: token,
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
out.sort((x, y) => Number(y.touchesCore) - Number(x.touchesCore) ||
|
|
381
|
+
Number(y.sameKind) - Number(x.sameKind) ||
|
|
382
|
+
x.a.localeCompare(y.a) ||
|
|
383
|
+
x.b.localeCompare(y.b));
|
|
384
|
+
return out;
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Of the catalog's isolated bridges, which could connect to the anchored core
|
|
388
|
+
* via a same-dimension quantity identification? This intersects
|
|
389
|
+
* `proposeLinkCandidates` with the linkage map's isolated/anchored partition:
|
|
390
|
+
* a connector is a cross-cluster candidate whose one side sits on an isolated
|
|
391
|
+
* bridge and whose other side touches an anchored cluster. The same-kind
|
|
392
|
+
* subset (shared name token) is the least-implausible set worth a physicist's
|
|
393
|
+
* review — the structural frontier of the catalog (the 20 orphaned bridges).
|
|
394
|
+
*
|
|
395
|
+
* ⚠ Same dimension is a WEAK prior (the dimensional audit's decoy finding):
|
|
396
|
+
* most connectors are coincidences (a Förster radius is not a Schwarzschild
|
|
397
|
+
* radius). A REVIEW SURFACE only — Part-VI §XXVII-B. Internal.
|
|
398
|
+
*/
|
|
399
|
+
export function proposeOrphanConnectors(edges) {
|
|
400
|
+
const m = linkageMap(edges);
|
|
401
|
+
const isolated = new Set(m.isolated);
|
|
402
|
+
const edgeAnchored = new Map();
|
|
403
|
+
m.clusters.forEach((c) => c.edges.forEach((id) => edgeAnchored.set(id, c.anchored)));
|
|
404
|
+
// quantity (raw name) → the edges touching it. Isolated bridges carry no
|
|
405
|
+
// registered identifications, so raw names suffice for the orphan side.
|
|
406
|
+
const qToEdges = new Map();
|
|
407
|
+
for (const e of edges) {
|
|
408
|
+
for (const q of [...e.sources, e.target]) {
|
|
409
|
+
if (!qToEdges.has(q.name))
|
|
410
|
+
qToEdges.set(q.name, []);
|
|
411
|
+
qToEdges.get(q.name).push(e.id);
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
const orphanEdgeOf = (q) => (qToEdges.get(q) ?? []).find((id) => isolated.has(id));
|
|
415
|
+
const anchoredEdgeOf = (q) => (qToEdges.get(q) ?? []).find((id) => edgeAnchored.get(id) === true);
|
|
416
|
+
const connectors = [];
|
|
417
|
+
for (const c of proposeLinkCandidates(edges)) {
|
|
418
|
+
const aOrphan = orphanEdgeOf(c.a);
|
|
419
|
+
const bOrphan = orphanEdgeOf(c.b);
|
|
420
|
+
const aAnchored = anchoredEdgeOf(c.a);
|
|
421
|
+
const bAnchored = anchoredEdgeOf(c.b);
|
|
422
|
+
let conn = null;
|
|
423
|
+
if (aOrphan && bAnchored) {
|
|
424
|
+
conn = { orphanEdge: aOrphan, orphanQuantity: c.a, coreQuantity: c.b, coreEdge: bAnchored, dim: c.dim, sameKind: c.sameKind, sharedToken: c.sharedToken };
|
|
425
|
+
}
|
|
426
|
+
else if (bOrphan && aAnchored) {
|
|
427
|
+
conn = { orphanEdge: bOrphan, orphanQuantity: c.b, coreQuantity: c.a, coreEdge: aAnchored, dim: c.dim, sameKind: c.sameKind, sharedToken: c.sharedToken };
|
|
428
|
+
}
|
|
429
|
+
if (conn)
|
|
430
|
+
connectors.push(conn);
|
|
431
|
+
}
|
|
432
|
+
connectors.sort((x, y) => Number(y.sameKind) - Number(x.sameKind) ||
|
|
433
|
+
x.orphanEdge.localeCompare(y.orphanEdge) ||
|
|
434
|
+
x.orphanQuantity.localeCompare(y.orphanQuantity) ||
|
|
435
|
+
x.coreQuantity.localeCompare(y.coreQuantity));
|
|
436
|
+
const connectedSameKind = new Set(connectors.filter((c) => c.sameKind).map((c) => c.orphanEdge));
|
|
437
|
+
const anyConnector = new Set(connectors.map((c) => c.orphanEdge));
|
|
438
|
+
return {
|
|
439
|
+
connectors,
|
|
440
|
+
sameKindCount: connectors.filter((c) => c.sameKind).length,
|
|
441
|
+
connectedOrphans: [...connectedSameKind].sort(),
|
|
442
|
+
unconnectedOrphans: m.isolated.filter((id) => !anyConnector.has(id)).sort(),
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
//# sourceMappingURL=bridge-analysis.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bridge-analysis.js","sourceRoot":"","sources":["../../src/composition/bridge-analysis.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAErF,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,MAAM,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAa,EAAE,CAAC,CAAC;IACjE,CAAC;IACD,CAAC;IACD,CAAC;IACD,CAAC;IACD,KAAK;IACL,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;CACL,CAAC,CAAC;AASH,mEAAmE;AACnE,MAAM,qBAAqB,GAA6B;IACtD,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,E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C,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,CAAC,CAC/C,CAAC;IAEF,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAC/B,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAC9D,CAAC;IACF,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;IAClE,OAAO;QACL,UAAU;QACV,aAAa,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM;QAC1D,gBAAgB,EAAE,CAAC,GAAG,iBAAiB,CAAC,CAAC,IAAI,EAAE;QAC/C,kBAAkB,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE;KAC5E,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bridge prediction — make the namesake `UniversalTensor` operational
|
|
3
|
+
* (Direction 1).
|
|
4
|
+
*
|
|
5
|
+
* The premise: a bridge connects two physical regimes, so an EMPTY
|
|
6
|
+
* off-diagonal cell between two regimes that ARE individually well
|
|
7
|
+
* connected is a *predicted-but-undiscovered* bridge. This module
|
|
8
|
+
* projects the composition graph (`CATALOG_GRAPH`) onto the
|
|
9
|
+
* (scale × force) regime plane, populates a real `UniversalTensor` from
|
|
10
|
+
* it (the catalog's structure, finally carried by the namesake), and
|
|
11
|
+
* ranks the empty regime-pairs by a triadic-closure score — the classic
|
|
12
|
+
* common-neighbours link-prediction heuristic.
|
|
13
|
+
*
|
|
14
|
+
* ⚠ Each prediction is a STRUCTURAL HYPOTHESIS for physicist review, NOT
|
|
15
|
+
* a discovered bridge. "Two regimes share many bridge-neighbours but are
|
|
16
|
+
* not directly linked" is a weak prior — exactly the review-surface
|
|
17
|
+
* discipline `proposeLinkCandidates` follows. It says WHERE to look, not
|
|
18
|
+
* WHAT the relation is.
|
|
19
|
+
*
|
|
20
|
+
* INTERNAL — not on the public surface (mirrors bridge-analysis.ts);
|
|
21
|
+
* surfaced via `upt predict`.
|
|
22
|
+
*
|
|
23
|
+
* @module composition/bridge-prediction
|
|
24
|
+
*/
|
|
25
|
+
import { UniversalTensor } from '../core/tensor.js';
|
|
26
|
+
import type { PhysicalScale, Force } from '../core/types.js';
|
|
27
|
+
import type { BridgeEdge } from './edge.js';
|
|
28
|
+
import type { Quantity } from './quantity.js';
|
|
29
|
+
/**
|
|
30
|
+
* A regime coordinate on the (scale, force) plane — the two axes that map
|
|
31
|
+
* 1:1 between `RegimeAttributes` and `TensorIndices`. Sparse: a quantity
|
|
32
|
+
* records only what is stated.
|
|
33
|
+
*/
|
|
34
|
+
export interface Regime {
|
|
35
|
+
readonly scale?: PhysicalScale;
|
|
36
|
+
readonly force?: Force;
|
|
37
|
+
}
|
|
38
|
+
/** Canonical string key for a regime (set/Map identity). */
|
|
39
|
+
export declare function regimeKey(r: Regime): string;
|
|
40
|
+
/**
|
|
41
|
+
* Project a quantity onto the regime plane. Returns null when neither a
|
|
42
|
+
* scale nor a force is stated (the quantity is not placeable — an honest
|
|
43
|
+
* limit: only regime-tagged quantities enter the map).
|
|
44
|
+
*/
|
|
45
|
+
export declare function placeQuantity(q: Quantity): Regime | null;
|
|
46
|
+
/**
|
|
47
|
+
* Populate a real `UniversalTensor` from the graph: every complete
|
|
48
|
+
* (scale AND force) regime that appears becomes a diagonal law cell, and
|
|
49
|
+
* every regime-spanning edge becomes off-diagonal bridge cells between its
|
|
50
|
+
* endpoint regimes. The namesake now carries the catalog's structure —
|
|
51
|
+
* `getStats()`, `getBridges()`, `unpopulatedNeighborhoods()` all reflect
|
|
52
|
+
* real data.
|
|
53
|
+
*/
|
|
54
|
+
export declare function buildRegimeTensor(edges: readonly BridgeEdge[]): UniversalTensor;
|
|
55
|
+
/** A predicted-but-absent bridge between two occupied regimes. @hypothesis */
|
|
56
|
+
export interface BridgePrediction {
|
|
57
|
+
/** The two regime keys (sorted) the predicted bridge would connect. */
|
|
58
|
+
readonly regimeA: string;
|
|
59
|
+
readonly regimeB: string;
|
|
60
|
+
/**
|
|
61
|
+
* Triadic-closure score: how many regimes are bridge-neighbours of BOTH
|
|
62
|
+
* endpoints. Higher = more structurally surrounded = stronger prior that
|
|
63
|
+
* a connection is missing. Always ≥1 (zero-overlap pairs are dropped).
|
|
64
|
+
*/
|
|
65
|
+
readonly sharedNeighbors: number;
|
|
66
|
+
/** The shared neighbour regime keys (the structural basis), sorted. */
|
|
67
|
+
readonly via: readonly string[];
|
|
68
|
+
}
|
|
69
|
+
/** The regime-map prediction report. */
|
|
70
|
+
export interface RegimePredictionReport {
|
|
71
|
+
/** Empty regime-pairs ranked by triadic-closure score (desc). */
|
|
72
|
+
readonly predictions: readonly BridgePrediction[];
|
|
73
|
+
/** All occupied regime keys, sorted. */
|
|
74
|
+
readonly occupiedRegimes: readonly string[];
|
|
75
|
+
/** Number of distinct regime-pairs the catalog already bridges. */
|
|
76
|
+
readonly linkedPairCount: number;
|
|
77
|
+
/** Edges with ≥1 placeable endpoint (entered the map). */
|
|
78
|
+
readonly placedEdges: number;
|
|
79
|
+
/** Total edges considered. */
|
|
80
|
+
readonly totalEdges: number;
|
|
81
|
+
/**
|
|
82
|
+
* Unexplored regimes: complete occupied regimes' single-axis-flip
|
|
83
|
+
* neighbours that the catalog never touches — the tensor's own
|
|
84
|
+
* `unpopulatedNeighborhoods()`, surfaced as "regimes adjacent to known
|
|
85
|
+
* ones that no bridge reaches". Sorted.
|
|
86
|
+
*/
|
|
87
|
+
readonly unexploredRegimes: readonly string[];
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Predict missing bridges: rank the empty regime-pairs (occupied but not
|
|
91
|
+
* directly linked) by shared bridge-neighbour count. See module docs for
|
|
92
|
+
* the review-surface caveat.
|
|
93
|
+
*/
|
|
94
|
+
export declare function predictMissingBridges(edges: readonly BridgeEdge[]): RegimePredictionReport;
|
|
95
|
+
//# sourceMappingURL=bridge-prediction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bridge-prediction.d.ts","sourceRoot":"","sources":["../../src/composition/bridge-prediction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,KAAK,EAAiB,MAAM,kBAAkB,CAAC;AAC5E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAgB9C;;;;GAIG;AACH,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;CACxB;AAED,4DAA4D;AAC5D,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAK3C;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,IAAI,CAMxD;AAoBD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,UAAU,EAAE,GAAG,eAAe,CAkD/E;AAED,8EAA8E;AAC9E,MAAM,WAAW,gBAAgB;IAC/B,uEAAuE;IACvE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB;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IAAI,CACd,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACP,CAAC,CAAC,eAAe,GAAG,CAAC,CAAC,eAAe;QACrC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC;QAClC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,CACrC,CAAC;IAEF,qEAAqE;IACrE,MAAM,MAAM,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;IACxC,MAAM,UAAU,GAAG,MAAM;SACtB,wBAAwB,EAAE;SAC1B,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC;SAC/D,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAE/C,OAAO;QACL,WAAW;QACX,eAAe,EAAE,UAAU;QAC3B,eAAe,EAAE,MAAM,CAAC,IAAI;QAC5B,WAAW;QACX,UAAU,EAAE,KAAK,CAAC,MAAM;QACxB,iBAAiB,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,EAAE;KACnD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The full composition graph as a single constant — the 41 `BridgeEdge`s
|
|
3
|
+
* (9 calibration + 6 catalog-tranche + 26 catalog-full).
|
|
4
|
+
*
|
|
5
|
+
* Single source of truth for "the catalog as a graph": the CLI, the
|
|
6
|
+
* analysis functions, and the test suites consume this rather than each
|
|
7
|
+
* hand-rebuilding the edge list (which silently drifts when an edge is
|
|
8
|
+
* added). When the graph grows, this is the one place to update.
|
|
9
|
+
*
|
|
10
|
+
* @module composition/catalog-graph
|
|
11
|
+
*/
|
|
12
|
+
import type { BridgeEdge } from './edge.js';
|
|
13
|
+
/**
|
|
14
|
+
* Every `BridgeEdge` in the composition graph (41 edges). The order is
|
|
15
|
+
* calibration → tranche → catalog-full.
|
|
16
|
+
*
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
export declare const CATALOG_GRAPH: readonly BridgeEdge[];
|
|
20
|
+
//# sourceMappingURL=catalog-graph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-graph.d.ts","sourceRoot":"","sources":["../../src/composition/catalog-graph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAsB5C;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,SAAS,UAAU,EAiB9C,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The full composition graph as a single constant — the 41 `BridgeEdge`s
|
|
3
|
+
* (9 calibration + 6 catalog-tranche + 26 catalog-full).
|
|
4
|
+
*
|
|
5
|
+
* Single source of truth for "the catalog as a graph": the CLI, the
|
|
6
|
+
* analysis functions, and the test suites consume this rather than each
|
|
7
|
+
* hand-rebuilding the edge list (which silently drifts when an edge is
|
|
8
|
+
* added). When the graph grows, this is the one place to update.
|
|
9
|
+
*
|
|
10
|
+
* @module composition/catalog-graph
|
|
11
|
+
*/
|
|
12
|
+
import { be11ZurekEdge, be12Edge, be16Edge, be37Edge, be42Edge, be42ViaRsEdge, be51Edge, be52Edge, lawSchwarzschildRadius, } from './edges/calibration.js';
|
|
13
|
+
import { be14Edge, be19Edge, be21Edge, be48Edge, be53Edge, be54Edge, } from './edges/catalog-tranche.js';
|
|
14
|
+
import { CATALOG_FULL_EDGES } from './edges/catalog-full.js';
|
|
15
|
+
/**
|
|
16
|
+
* Every `BridgeEdge` in the composition graph (41 edges). The order is
|
|
17
|
+
* calibration → tranche → catalog-full.
|
|
18
|
+
*
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export const CATALOG_GRAPH = [
|
|
22
|
+
be11ZurekEdge,
|
|
23
|
+
be12Edge,
|
|
24
|
+
be16Edge,
|
|
25
|
+
be37Edge,
|
|
26
|
+
be42Edge,
|
|
27
|
+
be42ViaRsEdge,
|
|
28
|
+
be51Edge,
|
|
29
|
+
be52Edge,
|
|
30
|
+
lawSchwarzschildRadius,
|
|
31
|
+
be14Edge,
|
|
32
|
+
be19Edge,
|
|
33
|
+
be21Edge,
|
|
34
|
+
be48Edge,
|
|
35
|
+
be53Edge,
|
|
36
|
+
be54Edge,
|
|
37
|
+
...CATALOG_FULL_EDGES,
|
|
38
|
+
];
|
|
39
|
+
//# sourceMappingURL=catalog-graph.js.map
|