universal-physics-tensor 0.21.0 → 0.22.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 (65) hide show
  1. package/bin/upt.mjs +75 -4
  2. package/dist/canonical/canonical-equation.d.ts +79 -0
  3. package/dist/canonical/canonical-equation.d.ts.map +1 -0
  4. package/dist/canonical/canonical-equation.js +2 -0
  5. package/dist/canonical/canonical-equation.js.map +1 -0
  6. package/dist/canonical/dimensional-fields.d.ts +7 -0
  7. package/dist/canonical/dimensional-fields.d.ts.map +1 -0
  8. package/dist/canonical/dimensional-fields.js +31 -0
  9. package/dist/canonical/dimensional-fields.js.map +1 -0
  10. package/dist/canonical/entries/_l1-build.d.ts +22 -0
  11. package/dist/canonical/entries/_l1-build.d.ts.map +1 -0
  12. package/dist/canonical/entries/_l1-build.js +26 -0
  13. package/dist/canonical/entries/_l1-build.js.map +1 -0
  14. package/dist/canonical/entries/dimensional-classics.d.ts +11 -0
  15. package/dist/canonical/entries/dimensional-classics.d.ts.map +1 -0
  16. package/dist/canonical/entries/dimensional-classics.js +194 -0
  17. package/dist/canonical/entries/dimensional-classics.js.map +1 -0
  18. package/dist/canonical/entries/l1-gravity-thermo.d.ts +12 -0
  19. package/dist/canonical/entries/l1-gravity-thermo.d.ts.map +1 -0
  20. package/dist/canonical/entries/l1-gravity-thermo.js +128 -0
  21. package/dist/canonical/entries/l1-gravity-thermo.js.map +1 -0
  22. package/dist/canonical/entries/l1-quantum-em.d.ts +10 -0
  23. package/dist/canonical/entries/l1-quantum-em.d.ts.map +1 -0
  24. package/dist/canonical/entries/l1-quantum-em.js +141 -0
  25. package/dist/canonical/entries/l1-quantum-em.js.map +1 -0
  26. package/dist/canonical/entries/relativity.d.ts +14 -0
  27. package/dist/canonical/entries/relativity.d.ts.map +1 -0
  28. package/dist/canonical/entries/relativity.js +114 -0
  29. package/dist/canonical/entries/relativity.js.map +1 -0
  30. package/dist/canonical/linkage.d.ts +27 -0
  31. package/dist/canonical/linkage.d.ts.map +1 -0
  32. package/dist/canonical/linkage.js +139 -0
  33. package/dist/canonical/linkage.js.map +1 -0
  34. package/dist/canonical/normal-form.d.ts +25 -0
  35. package/dist/canonical/normal-form.d.ts.map +1 -0
  36. package/dist/canonical/normal-form.js +107 -0
  37. package/dist/canonical/normal-form.js.map +1 -0
  38. package/dist/canonical/registry.d.ts +26 -0
  39. package/dist/canonical/registry.d.ts.map +1 -0
  40. package/dist/canonical/registry.js +46 -0
  41. package/dist/canonical/registry.js.map +1 -0
  42. package/dist/canonical/seed-l-layer.d.ts +20 -0
  43. package/dist/canonical/seed-l-layer.d.ts.map +1 -0
  44. package/dist/canonical/seed-l-layer.js +39 -0
  45. package/dist/canonical/seed-l-layer.js.map +1 -0
  46. package/dist/composition/discovery.d.ts +40 -6
  47. package/dist/composition/discovery.d.ts.map +1 -1
  48. package/dist/composition/discovery.js +56 -7
  49. package/dist/composition/discovery.js.map +1 -1
  50. package/dist/composition/representative-values.d.ts +46 -0
  51. package/dist/composition/representative-values.d.ts.map +1 -0
  52. package/dist/composition/representative-values.js +69 -0
  53. package/dist/composition/representative-values.js.map +1 -0
  54. package/dist/composition/symbolic-constants.d.ts.map +1 -1
  55. package/dist/composition/symbolic-constants.js +15 -1
  56. package/dist/composition/symbolic-constants.js.map +1 -1
  57. package/dist/core/constants.d.ts +6 -0
  58. package/dist/core/constants.d.ts.map +1 -1
  59. package/dist/core/constants.js +6 -0
  60. package/dist/core/constants.js.map +1 -1
  61. package/dist/index.d.ts +7 -1
  62. package/dist/index.d.ts.map +1 -1
  63. package/dist/index.js +15 -1
  64. package/dist/index.js.map +1 -1
  65. package/package.json +1 -1
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Normalized structural form of a scalar `ExprNode`, **up to dimensionless
3
+ * multiplicative factors** — the hash the F4 circularity guard uses to decide
4
+ * whether a bridge's RHS and a canonical equation encode the same relation.
5
+ *
6
+ * Two expressions hash equal when they differ only by:
7
+ * - dimensionless multiplicative constants (numeric literals, ln2, 4π, …),
8
+ * - product nesting (`(a·b)·c` vs `a·b·c`),
9
+ * - commutative reordering of `*` / `+` operands.
10
+ *
11
+ * They hash DIFFERENT when an exponent differs (T⁴ ≠ T) or the non-dimensionless
12
+ * factor set differs. Sums keep every term; `^` keeps its exponent; `/` keeps the
13
+ * numerator/denominator split.
14
+ *
15
+ * @module canonical/normal-form
16
+ */
17
+ import type { ExprNode } from '../dimensional/validator.js';
18
+ /**
19
+ * The normalized structural form of `node`. Equal strings ⇒ same relation up to
20
+ * dimensionless multiplicative factors.
21
+ */
22
+ export declare function normalForm(node: ExprNode): string;
23
+ /** Whether two scalar ASTs are the same relation up to dimensionless factors. */
24
+ export declare function structurallyEqual(a: ExprNode, b: ExprNode): boolean;
25
+ //# sourceMappingURL=normal-form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normal-form.d.ts","sourceRoot":"","sources":["../../src/canonical/normal-form.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAgD5D;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAsDjD;AAED,iFAAiF;AACjF,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,GAAG,OAAO,CAEnE"}
@@ -0,0 +1,107 @@
1
+ const isDimensionless = (d) => d.L === 0 &&
2
+ d.M === 0 &&
3
+ d.T === 0 &&
4
+ d.I === 0 &&
5
+ d.Theta === 0 &&
6
+ d.N === 0 &&
7
+ d.J === 0;
8
+ /** Token for a node that carries no structural content (a dimensionless factor). */
9
+ const UNIT = '1';
10
+ /**
11
+ * Full structural serialization that NEVER drops dimensionless factors — used
12
+ * for `^` exponents, which are structural (T⁴ ≠ T) and must not be treated
13
+ * "up to dimensionless factors". Commutative operands are still sorted so the
14
+ * exponent comparison is robust to reordering.
15
+ */
16
+ function rawForm(node) {
17
+ switch (node.kind) {
18
+ case 'symbol':
19
+ return `s:${node.name}`;
20
+ case 'op': {
21
+ const parts = node.args.map(rawForm);
22
+ if (node.op === '*' || node.op === '+')
23
+ parts.sort();
24
+ return `${node.op}(${parts.join(',')})`;
25
+ }
26
+ case 'transcendental':
27
+ return `${node.fn}[${rawForm(node.arg)}]`;
28
+ case 'abs':
29
+ return `abs[${rawForm(node.arg)}]`;
30
+ default:
31
+ return `${node.kind}:${JSON.stringify(node)}`;
32
+ }
33
+ }
34
+ /** Collect the factors of a (possibly nested) `*` product. */
35
+ function flattenProduct(node, out) {
36
+ if (node.kind === 'op' && node.op === '*') {
37
+ for (const a of node.args)
38
+ flattenProduct(a, out);
39
+ }
40
+ else {
41
+ out.push(node);
42
+ }
43
+ }
44
+ /**
45
+ * The normalized structural form of `node`. Equal strings ⇒ same relation up to
46
+ * dimensionless multiplicative factors.
47
+ */
48
+ export function normalForm(node) {
49
+ switch (node.kind) {
50
+ case 'symbol':
51
+ // A dimensionless symbol is a factor with no structural content.
52
+ return isDimensionless(node.dim) ? UNIT : `sym:${node.name}`;
53
+ case 'op': {
54
+ switch (node.op) {
55
+ case '*': {
56
+ const factors = [];
57
+ flattenProduct(node, factors);
58
+ const kept = factors
59
+ .map(normalForm)
60
+ .filter((f) => f !== UNIT) // drop dimensionless factors
61
+ .sort();
62
+ if (kept.length === 0)
63
+ return UNIT;
64
+ if (kept.length === 1)
65
+ return kept[0];
66
+ return `*(${kept.join(',')})`;
67
+ }
68
+ case '/': {
69
+ const num = normalForm(node.args[0]);
70
+ const den = normalForm(node.args[1]);
71
+ if (den === UNIT)
72
+ return num; // ÷ dimensionless ⇒ the numerator
73
+ return `/(${num},${den})`;
74
+ }
75
+ case '^': {
76
+ // The exponent is structural (T⁴ ≠ T) and must NOT be reduced
77
+ // "up to dimensionless factors" — serialize it with rawForm so a
78
+ // dimensionless exponent is never dropped (symmetric for direct
79
+ // symbols and op sub-expressions alike).
80
+ const base = normalForm(node.args[0]);
81
+ return `^(${base},${rawForm(node.args[1])})`;
82
+ }
83
+ case '+':
84
+ case '-': {
85
+ const parts = node.args.map(normalForm);
86
+ if (node.op === '+')
87
+ parts.sort();
88
+ return `${node.op}(${parts.join(',')})`;
89
+ }
90
+ default:
91
+ return `op:${JSON.stringify(node)}`;
92
+ }
93
+ }
94
+ case 'transcendental':
95
+ return `${node.fn}(${normalForm(node.arg)})`;
96
+ case 'abs':
97
+ return `abs(${normalForm(node.arg)})`;
98
+ default:
99
+ // integral / derivative / tensor arms: compare structurally by kind+shape.
100
+ return `${node.kind}:${JSON.stringify(node)}`;
101
+ }
102
+ }
103
+ /** Whether two scalar ASTs are the same relation up to dimensionless factors. */
104
+ export function structurallyEqual(a, b) {
105
+ return normalForm(a) === normalForm(b);
106
+ }
107
+ //# sourceMappingURL=normal-form.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normal-form.js","sourceRoot":"","sources":["../../src/canonical/normal-form.ts"],"names":[],"mappings":"AAmBA,MAAM,eAAe,GAAG,CAAC,CAAY,EAAW,EAAE,CAChD,CAAC,CAAC,CAAC,KAAK,CAAC;IACT,CAAC,CAAC,CAAC,KAAK,CAAC;IACT,CAAC,CAAC,CAAC,KAAK,CAAC;IACT,CAAC,CAAC,CAAC,KAAK,CAAC;IACT,CAAC,CAAC,KAAK,KAAK,CAAC;IACb,CAAC,CAAC,CAAC,KAAK,CAAC;IACT,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAEZ,oFAAoF;AACpF,MAAM,IAAI,GAAG,GAAG,CAAC;AAEjB;;;;;GAKG;AACH,SAAS,OAAO,CAAC,IAAc;IAC7B,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;QAClB,KAAK,QAAQ;YACX,OAAO,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC;QAC1B,KAAK,IAAI,CAAC,CAAC,CAAC;YACV,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAA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AK,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;oBACxC,IAAI,IAAI,CAAC,EAAE,KAAK,GAAG;wBAAE,KAAK,CAAC,IAAI,EAAE,CAAC;oBAClC,OAAO,GAAG,IAAI,CAAC,EAAE,IAAI,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;gBAC1C,CAAC;gBACD;oBACE,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;YACxC,CAAC;QACH,CAAC;QAED,KAAK,gBAAgB;YACnB,OAAO,GAAG,IAAI,CAAC,EAAE,IAAI,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;QAE/C,KAAK,KAAK;YACR,OAAO,OAAO,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;QAExC;YACE,2EAA2E;YAC3E,OAAO,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;IAClD,CAAC;AACH,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,iBAAiB,CAAC,CAAW,EAAE,CAAW;IACxD,OAAO,UAAU,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC;AACzC,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * The canonical-equation registry — the queryable index of the L-layer.
3
+ * Seeded incrementally by `entries/*` modules (Tasks 2,4,5,9); this file owns
4
+ * the assembled array, the id map, and the accessors.
5
+ *
6
+ * @module canonical/registry
7
+ */
8
+ import type { CanonicalEquation, CanonicalDomain } from './canonical-equation.js';
9
+ /** Every canonical equation in the registry. */
10
+ export declare const CANONICAL_EQUATIONS: readonly CanonicalEquation[];
11
+ /** Id → entry. */
12
+ export declare const CANONICAL_BY_ID: Readonly<Record<string, CanonicalEquation>>;
13
+ /** The entry with id `id`, or `undefined`. */
14
+ export declare function canonicalById(id: string): CanonicalEquation | undefined;
15
+ /** Every entry in `domain`. */
16
+ export declare function canonicalByDomain(domain: CanonicalDomain): readonly CanonicalEquation[];
17
+ /** Catalog bridge ids (string form) that at least one canonical entry names as
18
+ * a `partnerBridges` / `restatesBridge` correspondence. */
19
+ export declare function partneredBridgeIds(): Set<string>;
20
+ /**
21
+ * Catalog bridges with NO canonical correspondence partner yet — the explicit,
22
+ * logged coverage gap (review finding F2). Sorted by numeric id. The count is
23
+ * pinned by a test so shrinking it (adding a partner) is a deliberate act.
24
+ */
25
+ export declare function bridgesWithoutCanonicalPartner(): string[];
26
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/canonical/registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAOlF,gDAAgD;AAChD,eAAO,MAAM,mBAAmB,EAAE,SAAS,iBAAiB,EAK3D,CAAC;AAEF,kBAAkB;AAClB,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CACT,CAAC;AAEhE,8CAA8C;AAC9C,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS,CAEvE;AAED,+BAA+B;AAC/B,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,eAAe,GACtB,SAAS,iBAAiB,EAAE,CAE9B;AAED;4DAC4D;AAC5D,wBAAgB,kBAAkB,IAAI,GAAG,CAAC,MAAM,CAAC,CAOhD;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,IAAI,MAAM,EAAE,CAKzD"}
@@ -0,0 +1,46 @@
1
+ import { BRIDGE_EQUATIONS } from '../bridges/index.js';
2
+ import { DIMENSIONAL_CLASSICS } from './entries/dimensional-classics.js';
3
+ import { L1_GRAVITY_THERMO } from './entries/l1-gravity-thermo.js';
4
+ import { L1_QUANTUM_EM } from './entries/l1-quantum-em.js';
5
+ import { RELATIVITY } from './entries/relativity.js';
6
+ /** Every canonical equation in the registry. */
7
+ export const CANONICAL_EQUATIONS = [
8
+ ...DIMENSIONAL_CLASSICS,
9
+ ...L1_GRAVITY_THERMO,
10
+ ...L1_QUANTUM_EM,
11
+ ...RELATIVITY,
12
+ ];
13
+ /** Id → entry. */
14
+ export const CANONICAL_BY_ID = Object.fromEntries(CANONICAL_EQUATIONS.map((e) => [e.id, e]));
15
+ /** The entry with id `id`, or `undefined`. */
16
+ export function canonicalById(id) {
17
+ return CANONICAL_BY_ID[id];
18
+ }
19
+ /** Every entry in `domain`. */
20
+ export function canonicalByDomain(domain) {
21
+ return CANONICAL_EQUATIONS.filter((e) => e.domain === domain);
22
+ }
23
+ /** Catalog bridge ids (string form) that at least one canonical entry names as
24
+ * a `partnerBridges` / `restatesBridge` correspondence. */
25
+ export function partneredBridgeIds() {
26
+ const ids = new Set();
27
+ for (const e of CANONICAL_EQUATIONS) {
28
+ for (const b of e.partnerBridges)
29
+ ids.add(b);
30
+ if (e.restatesBridge)
31
+ ids.add(e.restatesBridge);
32
+ }
33
+ return ids;
34
+ }
35
+ /**
36
+ * Catalog bridges with NO canonical correspondence partner yet — the explicit,
37
+ * logged coverage gap (review finding F2). Sorted by numeric id. The count is
38
+ * pinned by a test so shrinking it (adding a partner) is a deliberate act.
39
+ */
40
+ export function bridgesWithoutCanonicalPartner() {
41
+ const partnered = partneredBridgeIds();
42
+ return BRIDGE_EQUATIONS.map((b) => String(b.id))
43
+ .filter((id) => !partnered.has(id))
44
+ .sort((a, b) => Number(a) - Number(b));
45
+ }
46
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/canonical/registry.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAA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G,kBAAkB,EAAE,CAAC;IACvC,OAAO,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;SAC7C,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;SAClC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Seed the canonical-equation registry into the tensor's L-layer (Π = L + B + E)
3
+ * via the existing `addLaw` path. `canonicalToLaw` maps a registry entry onto the
4
+ * `PhysicalLaw` shape; `seedCanonicalLaws` adds them all and returns the count.
5
+ *
6
+ * @module canonical/seed-l-layer
7
+ */
8
+ import type { CanonicalEquation } from './canonical-equation.js';
9
+ import type { PhysicalLaw, TensorConfig } from '../core/types.js';
10
+ import { UniversalTensor } from '../core/tensor.js';
11
+ /** A `TensorConfig` whose axes cover every regime the canonical registry uses,
12
+ * so `seedCanonicalLaws` never trips axis-membership validation. */
13
+ export declare const CANONICAL_TENSOR_CONFIG: TensorConfig;
14
+ /** Map a canonical entry onto the `PhysicalLaw` shape the L-layer consumes.
15
+ * Canonical laws are ground truth → `confidence: 1`. Regime axes map to the
16
+ * law's single-valued axis arrays (empty when the regime leaves an axis open). */
17
+ export declare function canonicalToLaw(ce: CanonicalEquation): PhysicalLaw;
18
+ /** Seed every canonical equation into `t`'s L-layer. Returns the count added. */
19
+ export declare function seedCanonicalLaws(t: UniversalTensor): number;
20
+ //# sourceMappingURL=seed-l-layer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seed-l-layer.d.ts","sourceRoot":"","sources":["../../src/canonical/seed-l-layer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD;qEACqE;AACrE,eAAO,MAAM,uBAAuB,EAAE,YAMrC,CAAC;AAEF;;mFAEmF;AACnF,wBAAgB,cAAc,CAAC,EAAE,EAAE,iBAAiB,GAAG,WAAW,CAejE;AAED,iFAAiF;AACjF,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,eAAe,GAAG,MAAM,CAM5D"}
@@ -0,0 +1,39 @@
1
+ import { CANONICAL_EQUATIONS } from './registry.js';
2
+ /** A `TensorConfig` whose axes cover every regime the canonical registry uses,
3
+ * so `seedCanonicalLaws` never trips axis-membership validation. */
4
+ export const CANONICAL_TENSOR_CONFIG = {
5
+ rank: 6,
6
+ scales: ['quantum', 'mesoscopic', 'classical', 'cosmological'],
7
+ forces: ['gravitational', 'electromagnetic', 'weak', 'strong', 'emergent'],
8
+ symmetries: ['poincare', 'gauge', 'conformal', 'susy', 'emergent'],
9
+ informationMeasures: ['vonNeumann', 'shannon', 'kolmogorov', 'quantumDiscord'],
10
+ };
11
+ /** Map a canonical entry onto the `PhysicalLaw` shape the L-layer consumes.
12
+ * Canonical laws are ground truth → `confidence: 1`. Regime axes map to the
13
+ * law's single-valued axis arrays (empty when the regime leaves an axis open). */
14
+ export function canonicalToLaw(ce) {
15
+ const r = ce.regime;
16
+ return {
17
+ id: ce.id,
18
+ name: ce.name,
19
+ equation: ce.formula_latex,
20
+ scales: r.scale ? [r.scale] : [],
21
+ forces: r.force ? [r.force] : [],
22
+ symmetries: r.symmetry ? [r.symmetry] : [],
23
+ confidence: 1,
24
+ informationMeasures: r.information ? [r.information] : undefined,
25
+ dimensions: r.dimension !== undefined ? [r.dimension] : undefined,
26
+ topologies: r.topology !== undefined ? [r.topology] : undefined,
27
+ references: [...ce.references],
28
+ };
29
+ }
30
+ /** Seed every canonical equation into `t`'s L-layer. Returns the count added. */
31
+ export function seedCanonicalLaws(t) {
32
+ let added = 0;
33
+ for (const ce of CANONICAL_EQUATIONS) {
34
+ if (t.addLaw(canonicalToLaw(ce)))
35
+ added++;
36
+ }
37
+ return added;
38
+ }
39
+ //# sourceMappingURL=seed-l-layer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seed-l-layer.js","sourceRoot":"","sources":["../../src/canonical/seed-l-layer.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpD;qEACqE;AACrE,MAAM,CAAC,MAAM,uBAAuB,GAAiB;IACnD,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,CAAC,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,CAAC;IAC9D,MAAM,EAAE,CAAC,eAAe,EAAE,iBAAiB,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,CAAC;IAC1E,UAAU,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,CAAC;IAClE,mBAAmB,EAAE,CAAC,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,gBAAgB,CAAC;CAC/E,CAAC;AAEF;;mFAEmF;AACnF,MAAM,UAAU,cAAc,CAAC,EAAqB;IAClD,MAAM,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IACpB,OAAO;QACL,EAAE,EAAE,EAAE,CAAC,EAAE;QACT,IAAI,EAAE,EAAE,CAAC,IAAI;QACb,QAAQ,EAAE,EAAE,CAAC,aAAa;QAC1B,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;QAChC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;QAChC,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE;QAC1C,UAAU,EAAE,CAAC;QACb,mBAAmB,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS;QAChE,UAAU,EAAE,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS;QACjE,UAAU,EAAE,CAAC,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS;QAC/D,UAAU,EAAE,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC;KAC/B,CAAC;AACJ,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,iBAAiB,CAAC,CAAkB;IAClD,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,KAAK,MAAM,EAAE,IAAI,mBAAmB,EAAE,CAAC;QACrC,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;YAAE,KAAK,EAAE,CAAC;IAC5C,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -35,6 +35,7 @@
35
35
  import type { BridgeEdge } from './edge.js';
36
36
  import type { QuantityIdentification } from './compose.js';
37
37
  import type { LinkCandidate } from './bridge-analysis.js';
38
+ import type { RepresentativeValue } from './representative-values.js';
38
39
  /** A candidate after vetting against the inference suite. @hypothesis */
39
40
  export interface VettedCandidate {
40
41
  readonly a: string;
@@ -65,15 +66,35 @@ export interface VettedCandidate {
65
66
  * falsification, when `numericallyConsistent` is false). Sorted. */
66
67
  readonly inconsistentNodes: readonly string[];
67
68
  /**
68
- * - `contradictory` — breaks numerical consistency (a falsification).
69
- * - `promising` — consistent AND connects disconnected physics AND
70
- * unlocks ≥1 quantity. Worth physicist review.
71
- * - `inert` — consistent but structurally/numerically idle (a
72
- * dimensional coincidence with no consequence).
69
+ * Orders of magnitude between the representative values of a and b
70
+ * (`|log10|va| − log10|vb||`), or `null` when either has no representative
71
+ * value (the gate abstained — see `magnitudeChecked`).
73
72
  */
74
- readonly verdict: 'promising' | 'inert' | 'contradictory';
73
+ readonly ordersApart: number | null;
74
+ /** Both endpoints had a representative value, so the magnitude gate ran. */
75
+ readonly magnitudeChecked: boolean;
76
+ /**
77
+ * - `magnitude-clash` — representative values differ by more than the
78
+ * threshold N orders (an independent falsification the
79
+ * single-anchor graph cannot make). Checked first.
80
+ * - `contradictory` — breaks numerical consistency (a graph falsification).
81
+ * - `promising` — consistent AND connects disconnected physics AND
82
+ * unlocks ≥1 quantity. Worth physicist review.
83
+ * - `inert` — consistent but structurally/numerically idle (a
84
+ * dimensional coincidence with no consequence).
85
+ */
86
+ readonly verdict: 'promising' | 'inert' | 'contradictory' | 'magnitude-clash';
75
87
  /** Composite ranking score (higher = more worth review). */
76
88
  readonly score: number;
89
+ /**
90
+ * Standard-physics domains whose canonical equation has a TARGET of this
91
+ * candidate's dimension (Sub-project C). Informational context — an empty
92
+ * list means no canonical equation targets this dimension.
93
+ */
94
+ readonly canonicalKinds: readonly string[];
95
+ /** At least one endpoint name is a quantity a canonical equation uses
96
+ * (weak name-based prior; informational). */
97
+ readonly touchesCanonical: boolean;
77
98
  }
78
99
  /** Options for the discovery loop. @internal */
79
100
  export interface DiscoveryOptions {
@@ -84,6 +105,19 @@ export interface DiscoveryOptions {
84
105
  readonly groundTruth?: Readonly<Record<string, number>>;
85
106
  /** Extra identifications honored as the baseline (default registered). */
86
107
  readonly identifications?: readonly QuantityIdentification[];
108
+ /**
109
+ * Max orders of magnitude two identified quantities may differ before the
110
+ * identification is falsified as a `magnitude-clash`. Default 3 — generous
111
+ * enough for O(1) dimensionless prefactors and unit-convention slack, strict
112
+ * enough to kill the scale-clash decoys.
113
+ */
114
+ readonly maxOrdersOfMagnitude?: number;
115
+ /**
116
+ * Sourced order-of-magnitude values for the gate (default
117
+ * `REPRESENTATIVE_VALUES`). Injectable for testing and so the future
118
+ * canonical-equation registry can supply them centrally.
119
+ */
120
+ readonly representativeValues?: Readonly<Record<string, RepresentativeValue>>;
87
121
  }
88
122
  /**
89
123
  * Vet one link candidate by hypothesizing the identification a≡b and
@@ -1 +1 @@
1
- {"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../src/composition/discovery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAK3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAG1D,yEAAyE;AACzE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,+CAA+C;IAC/C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,6DAA6D;IAC7D,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,yDAAyD;IACzD,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACnC;;;OAGG;IACH,QAAQ,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9C;;;;OAIG;IACH,QAAQ,CAAC,qBAAqB,EAAE,OAAO,CAAC;IACxC;yEACqE;IACrE,QAAQ,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9C;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,GAAG,eAAe,CAAC;IAC1D,4DAA4D;IAC5D,QAAQ,CAAC,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,GAC1B,eAAe,CA2FjB;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,SAAS,UAAU,EAAE,EAC5B,IAAI,GAAE,gBAAqB,GAC1B,eAAe,EAAE,CAiBnB"}
@@ -37,6 +37,31 @@ import { forwardClosure } from './identifiability.js';
37
37
  import { retrodict } from './retrodiction.js';
38
38
  import { proposeLinkCandidates } from './bridge-analysis.js';
39
39
  import { M_SUN_KG } from './edges/calibration.js';
40
+ import { REPRESENTATIVE_VALUES } from './representative-values.js';
41
+ import { CANONICAL_EQUATIONS } from '../canonical/registry.js';
42
+ import { format } from '../dimensional/algebra.js';
43
+ // ── canonical-kind indexes (Sub-project C) ──────────────────────────────────
44
+ // Discovery quantity names and canonical variable names are different
45
+ // namespaces; the alignable axis is the DIMENSION. These are informational
46
+ // annotations on each candidate (no verdict/score effect): they give the
47
+ // physicist standard-physics context, not a hard filter (the registry is small).
48
+ const CANONICAL_KINDS_BY_DIM = (() => {
49
+ const m = new Map();
50
+ for (const ce of CANONICAL_EQUATIONS) {
51
+ const key = format(ce.dimensional.target.dim);
52
+ (m.get(key) ?? m.set(key, new Set()).get(key)).add(ce.domain);
53
+ }
54
+ return new Map([...m].map(([k, v]) => [k, [...v].sort()]));
55
+ })();
56
+ const CANONICAL_QUANTITY_NAMES = (() => {
57
+ const s = new Set();
58
+ for (const ce of CANONICAL_EQUATIONS) {
59
+ s.add(ce.dimensional.target.name);
60
+ for (const g of ce.dimensional.governing)
61
+ s.add(g.name);
62
+ }
63
+ return s;
64
+ })();
40
65
  /** Union-find over quantity names; merges each edge's endpoints and every
41
66
  * identification's from↔to. Returns name → component-root. */
42
67
  function quantityComponents(edges, idents) {
@@ -81,6 +106,18 @@ export function vetLinkCandidate(edges, candidate, opts = {}) {
81
106
  const baseIdents = opts.identifications ?? QUANTITY_IDENTIFICATIONS;
82
107
  const groundTruth = opts.groundTruth ?? ANCHOR_DEFAULT;
83
108
  const anchor = Object.keys(groundTruth);
109
+ const repVals = opts.representativeValues ?? REPRESENTATIVE_VALUES;
110
+ const maxOrders = opts.maxOrdersOfMagnitude ?? 3;
111
+ // Magnitude gate: an INDEPENDENT falsifier the single-anchor graph can't make.
112
+ // Only fires when both endpoints have a representative value; abstains (and
113
+ // never false-rejects) otherwise.
114
+ const va = repVals[candidate.a];
115
+ const vb = repVals[candidate.b];
116
+ const magnitudeChecked = va !== undefined && vb !== undefined;
117
+ const ordersApart = magnitudeChecked
118
+ ? Math.abs(Math.log10(Math.abs(va.value)) - Math.log10(Math.abs(vb.value)))
119
+ : null;
120
+ const magnitudeClash = ordersApart !== null && ordersApart > maxOrders;
84
121
  // The hypothesized identification, added in both directions so a≡b is a
85
122
  // full merge (identifications are directional in the engine).
86
123
  const rationale = `HYPOTHESIS (unadjudicated): ${candidate.a} ≡ ${candidate.b} — same dimension ${candidate.dim}`;
@@ -107,25 +144,32 @@ export function vetLinkCandidate(edges, candidate, opts = {}) {
107
144
  .filter((r) => r.outcome === 'inconsistent')
108
145
  .map((r) => r.target)
109
146
  .sort();
147
+ // Verdict precedence: a magnitude clash is the most decisive, most
148
+ // interpretable falsification, so it is checked before the graph contradiction.
110
149
  let verdict;
111
- if (!numericallyConsistent)
150
+ if (magnitudeClash)
151
+ verdict = 'magnitude-clash';
152
+ else if (!numericallyConsistent)
112
153
  verdict = 'contradictory';
113
154
  else if (mergesComponents && unlocksFromAnchor.length > 0)
114
155
  verdict = 'promising';
115
156
  else
116
157
  verdict = 'inert';
117
- // Score: contradictory sinks to the bottom; otherwise reward structural
158
+ // Score: both falsifications sink to the bottom; otherwise reward structural
118
159
  // merges, unlocks, and the proposer's weak priors.
119
160
  let score = 0;
120
- if (numericallyConsistent) {
161
+ if (magnitudeClash || !numericallyConsistent) {
162
+ score = -1;
163
+ }
164
+ else {
121
165
  score += mergesComponents ? 4 : 0;
122
166
  score += Math.min(unlocksFromAnchor.length, 4);
123
167
  score += candidate.touchesCore ? 1 : 0;
124
168
  score += candidate.sameKind ? 1 : 0;
125
169
  }
126
- else {
127
- score = -1;
128
- }
170
+ const canonicalKinds = CANONICAL_KINDS_BY_DIM.get(candidate.dim) ?? [];
171
+ const touchesCanonical = CANONICAL_QUANTITY_NAMES.has(candidate.a) ||
172
+ CANONICAL_QUANTITY_NAMES.has(candidate.b);
129
173
  return {
130
174
  a: candidate.a,
131
175
  b: candidate.b,
@@ -136,8 +180,12 @@ export function vetLinkCandidate(edges, candidate, opts = {}) {
136
180
  unlocksFromAnchor,
137
181
  numericallyConsistent,
138
182
  inconsistentNodes,
183
+ ordersApart,
184
+ magnitudeChecked,
139
185
  verdict,
140
186
  score,
187
+ canonicalKinds,
188
+ touchesCanonical,
141
189
  };
142
190
  }
143
191
  /**
@@ -152,7 +200,8 @@ export function rankDiscoveries(edges, opts = {}) {
152
200
  const VERDICT_RANK = {
153
201
  promising: 0,
154
202
  inert: 1,
155
- contradictory: 2,
203
+ 'magnitude-clash': 2,
204
+ contradictory: 3,
156
205
  };
157
206
  const candidates = proposeLinkCandidates(edges);
158
207
  const vetted = candidates.map((c) => vetLinkCandidate(edges, c, opts));
@@ -1 +1 @@
1
- {"version":3,"file":"discovery.js","sourceRoot":"","sources":["../../src/composition/discovery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAIH,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAsDlD;+DAC+D;AAC/D,SAAS,kBAAkB,CACzB,KAA4B,EAC5B,MAAyC;IAEzC,MAAM,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAC;IACzC,MAAM,IAAI,GAAG,CAAC,CAAS,EAAU,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AAQ,EAAE,SAAS,CAAC,QAAQ;QAC5B,gBAAgB;QAChB,iBAAiB;QACjB,qBAAqB;QACrB,iBAAiB;QACjB,WAAW;QACX,gBAAgB;QAChB,OAAO;QACP,KAAK;QACL,cAAc;QACd,gBAAgB;KACjB,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAC7B,KAA4B,EAC5B,OAAyB,EAAE;IAE3B,MAAM,YAAY,GAA+C;QAC/D,SAAS,EAAE,CAAC;QACZ,KAAK,EAAE,CAAC;QACR,iBAAiB,EAAE,CAAC;QACpB,aAAa,EAAE,CAAC;KACjB,CAAC;IACF,MAAM,UAAU,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;IAChD,MAAM,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;IACvE,MAAM,CAAC,IAAI,CACT,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACP,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC;QACjD,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK;QACjB,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;QACtB,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CACzB,CAAC;IACF,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Order-of-magnitude representative values for the discovery falsifier.
3
+ *
4
+ * The discovery loop (`discovery.ts`) vets a hypothesised identification a≡b,
5
+ * but its numeric check (`retrodict`) runs from a single anchor and cannot
6
+ * evaluate the quantities a dimensional coincidence "unlocks" — so it never
7
+ * contradicts them, and they surface as `promising` (e.g.
8
+ * `landauer-erasure-energy ≟ planck-mass-energy`, ~30 orders apart). The graph
9
+ * structurally CANNOT supply the magnitudes that would falsify these.
10
+ *
11
+ * This table injects that missing ground truth: a sourced, order-of-magnitude
12
+ * value for quantities that have a WELL-DEFINED physical scale. Generic
13
+ * quantities (`mass`, `energy`, `length`, …) are deliberately ABSENT — they
14
+ * have no single representative scale, and a value for them would mis-fire.
15
+ * When a value is absent the gate abstains; it never false-rejects on unknowns.
16
+ *
17
+ * Values are order-of-magnitude estimates (good to ~1 order), each carrying its
18
+ * provenance. Nothing here is fabricated; coarse by design. When the canonical-
19
+ * equation registry lands it can supply these centrally and this table folds in.
20
+ *
21
+ * INTERNAL — surfaced via `upt discover`.
22
+ *
23
+ * @module composition/representative-values
24
+ */
25
+ /** A sourced order-of-magnitude value for one quantity. @internal */
26
+ export interface RepresentativeValue {
27
+ /** Order-of-magnitude value in the quantity's SI unit (good to ~1 order). */
28
+ readonly value: number;
29
+ /** Provenance — how the estimate is obtained (a citation or a one-liner). */
30
+ readonly source: string;
31
+ }
32
+ /**
33
+ * Scale-specific quantities only. Keyed by the canonical quantity name used in
34
+ * the composition graph. Generic quantities are intentionally omitted.
35
+ *
36
+ * @internal
37
+ */
38
+ export declare const REPRESENTATIVE_VALUES: Readonly<Record<string, RepresentativeValue>>;
39
+ /**
40
+ * The sourced order-of-magnitude value for `name`, or `undefined` when the
41
+ * quantity has no well-defined representative scale (the gate then abstains).
42
+ *
43
+ * @internal
44
+ */
45
+ export declare function representativeValue(name: string): RepresentativeValue | undefined;
46
+ //# sourceMappingURL=representative-values.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"representative-values.d.ts","sourceRoot":"","sources":["../../src/composition/representative-values.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,qEAAqE;AACrE,MAAM,WAAW,mBAAmB;IAClC,6EAA6E;IAC7E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,6EAA6E;IAC7E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAC1C,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAiCpC,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,GACX,mBAAmB,GAAG,SAAS,CAEjC"}