universal-physics-tensor 9.0.0 → 10.0.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 (824) hide show
  1. package/README.md +19 -16
  2. package/data/atlas/atlas.json +55 -44
  3. package/data/atlas/atlas.jsonld +1 -1
  4. package/data/atlas/diffusion.json +19 -18
  5. package/data/atlas/oscillators.json +15 -10
  6. package/data/atlas/waves.json +23 -18
  7. package/data/bridge-catalog.json +886 -1473
  8. package/data/bridge-catalog.schema.json +349 -132
  9. package/data/quantities.json +53 -19
  10. package/data/schemas/atlas-record.v0.json +184 -46
  11. package/data/units.json +33 -4
  12. package/dist/atlas/applicability.d.ts.map +1 -1
  13. package/dist/atlas/applicability.js +14 -3
  14. package/dist/atlas/applicability.js.map +1 -1
  15. package/dist/atlas/association.js.map +1 -1
  16. package/dist/atlas/benchmark/backend-shapes.d.ts.map +1 -1
  17. package/dist/atlas/benchmark/backend-shapes.js +5 -1
  18. package/dist/atlas/benchmark/backend-shapes.js.map +1 -1
  19. package/dist/atlas/benchmark/baselines.d.ts.map +1 -1
  20. package/dist/atlas/benchmark/baselines.js +8 -0
  21. package/dist/atlas/benchmark/baselines.js.map +1 -1
  22. package/dist/atlas/benchmark/hybrid-retrieval.d.ts +3 -2
  23. package/dist/atlas/benchmark/hybrid-retrieval.d.ts.map +1 -1
  24. package/dist/atlas/benchmark/hybrid-retrieval.js +15 -8
  25. package/dist/atlas/benchmark/hybrid-retrieval.js.map +1 -1
  26. package/dist/atlas/benchmark/leakage.js.map +1 -1
  27. package/dist/atlas/benchmark/loader.js.map +1 -1
  28. package/dist/atlas/benchmark/run-atlas.d.ts.map +1 -1
  29. package/dist/atlas/benchmark/run-atlas.js +14 -2
  30. package/dist/atlas/benchmark/run-atlas.js.map +1 -1
  31. package/dist/atlas/benchmark/stats.d.ts +1 -1
  32. package/dist/atlas/benchmark/stats.d.ts.map +1 -1
  33. package/dist/atlas/benchmark/stats.js +1 -1
  34. package/dist/atlas/benchmark/stats.js.map +1 -1
  35. package/dist/atlas/benchmark/study.js.map +1 -1
  36. package/dist/atlas/benchmark/types.js.map +1 -1
  37. package/dist/atlas/bridge-record.d.ts +4 -4
  38. package/dist/atlas/bridge-record.d.ts.map +1 -1
  39. package/dist/atlas/bridge-record.js +6 -6
  40. package/dist/atlas/bridge-record.js.map +1 -1
  41. package/dist/atlas/catalog-formal-ref.js.map +1 -1
  42. package/dist/atlas/chain-pipeline.d.ts +0 -11
  43. package/dist/atlas/chain-pipeline.d.ts.map +1 -1
  44. package/dist/atlas/chain-pipeline.js +5 -16
  45. package/dist/atlas/chain-pipeline.js.map +1 -1
  46. package/dist/atlas/composition-table.js.map +1 -1
  47. package/dist/atlas/conventions.js.map +1 -1
  48. package/dist/atlas/coverage.d.ts +2 -2
  49. package/dist/atlas/coverage.js.map +1 -1
  50. package/dist/atlas/derivation.js.map +1 -1
  51. package/dist/atlas/derive-evidence.d.ts +6 -4
  52. package/dist/atlas/derive-evidence.d.ts.map +1 -1
  53. package/dist/atlas/derive-evidence.js +7 -2
  54. package/dist/atlas/derive-evidence.js.map +1 -1
  55. package/dist/atlas/diffusion/bridges-closure.d.ts.map +1 -1
  56. package/dist/atlas/diffusion/bridges-closure.js +0 -5
  57. package/dist/atlas/diffusion/bridges-closure.js.map +1 -1
  58. package/dist/atlas/diffusion/bridges.d.ts.map +1 -1
  59. package/dist/atlas/diffusion/bridges.js +0 -3
  60. package/dist/atlas/diffusion/bridges.js.map +1 -1
  61. package/dist/atlas/diffusion/dimensions.js.map +1 -1
  62. package/dist/atlas/diffusion/index.d.ts +1 -1
  63. package/dist/atlas/diffusion/index.d.ts.map +1 -1
  64. package/dist/atlas/diffusion/index.js.map +1 -1
  65. package/dist/atlas/diffusion/models.js.map +1 -1
  66. package/dist/atlas/diffusion/numerics.js.map +1 -1
  67. package/dist/atlas/error-algebra.d.ts +6 -0
  68. package/dist/atlas/error-algebra.d.ts.map +1 -1
  69. package/dist/atlas/error-algebra.js +26 -0
  70. package/dist/atlas/error-algebra.js.map +1 -1
  71. package/dist/atlas/export.d.ts +18 -2
  72. package/dist/atlas/export.d.ts.map +1 -1
  73. package/dist/atlas/export.js +9 -3
  74. package/dist/atlas/export.js.map +1 -1
  75. package/dist/atlas/families.d.ts +19 -2
  76. package/dist/atlas/families.d.ts.map +1 -1
  77. package/dist/atlas/families.js +26 -3
  78. package/dist/atlas/families.js.map +1 -1
  79. package/dist/atlas/family.d.ts +27 -0
  80. package/dist/atlas/family.d.ts.map +1 -0
  81. package/dist/atlas/family.js +12 -0
  82. package/dist/atlas/family.js.map +1 -0
  83. package/dist/atlas/index.d.ts +3 -2
  84. package/dist/atlas/index.d.ts.map +1 -1
  85. package/dist/atlas/index.js +2 -1
  86. package/dist/atlas/index.js.map +1 -1
  87. package/dist/atlas/link-prediction.d.ts +1 -1
  88. package/dist/atlas/link-prediction.d.ts.map +1 -1
  89. package/dist/atlas/link-prediction.js.map +1 -1
  90. package/dist/atlas/model.js.map +1 -1
  91. package/dist/atlas/oscillators/bridges-coarse.d.ts.map +1 -1
  92. package/dist/atlas/oscillators/bridges-coarse.js +0 -1
  93. package/dist/atlas/oscillators/bridges-coarse.js.map +1 -1
  94. package/dist/atlas/oscillators/bridges-exact.d.ts.map +1 -1
  95. package/dist/atlas/oscillators/bridges-exact.js +0 -3
  96. package/dist/atlas/oscillators/bridges-exact.js.map +1 -1
  97. package/dist/atlas/oscillators/bridges-limits.d.ts.map +1 -1
  98. package/dist/atlas/oscillators/bridges-limits.js +0 -2
  99. package/dist/atlas/oscillators/bridges-limits.js.map +1 -1
  100. package/dist/atlas/oscillators/dimensions.js.map +1 -1
  101. package/dist/atlas/oscillators/index.d.ts +1 -16
  102. package/dist/atlas/oscillators/index.d.ts.map +1 -1
  103. package/dist/atlas/oscillators/index.js.map +1 -1
  104. package/dist/atlas/oscillators/limit-witnesses.js.map +1 -1
  105. package/dist/atlas/oscillators/models.js.map +1 -1
  106. package/dist/atlas/oscillators/norm-transport-witness.js.map +1 -1
  107. package/dist/atlas/oscillators/norm-transport.js.map +1 -1
  108. package/dist/atlas/oscillators/norms.js.map +1 -1
  109. package/dist/atlas/oscillators/pendulum-motion.js.map +1 -1
  110. package/dist/atlas/oscillators/phase-carriage.js.map +1 -1
  111. package/dist/atlas/oscillators/phase-translation.js.map +1 -1
  112. package/dist/atlas/oscillators/position-translation.js.map +1 -1
  113. package/dist/atlas/oscillators/rejections.js.map +1 -1
  114. package/dist/atlas/path-bound.js.map +1 -1
  115. package/dist/atlas/physjs-entries.generated.js.map +1 -1
  116. package/dist/atlas/physjs-ref.d.ts +79 -45
  117. package/dist/atlas/physjs-ref.d.ts.map +1 -1
  118. package/dist/atlas/physjs-ref.js +143 -62
  119. package/dist/atlas/physjs-ref.js.map +1 -1
  120. package/dist/atlas/physjs-reviewed.d.ts +31 -0
  121. package/dist/atlas/physjs-reviewed.d.ts.map +1 -0
  122. package/dist/atlas/physjs-reviewed.js +194 -0
  123. package/dist/atlas/physjs-reviewed.js.map +1 -0
  124. package/dist/atlas/poster/associations.js.map +1 -1
  125. package/dist/atlas/poster/derivations.js.map +1 -1
  126. package/dist/atlas/poster/statements.js.map +1 -1
  127. package/dist/atlas/proof-target.js.map +1 -1
  128. package/dist/atlas/public.d.ts +2 -1
  129. package/dist/atlas/public.d.ts.map +1 -1
  130. package/dist/atlas/public.js +2 -1
  131. package/dist/atlas/public.js.map +1 -1
  132. package/dist/atlas/regime.js.map +1 -1
  133. package/dist/atlas/serialize.d.ts +18 -12
  134. package/dist/atlas/serialize.d.ts.map +1 -1
  135. package/dist/atlas/serialize.js +28 -18
  136. package/dist/atlas/serialize.js.map +1 -1
  137. package/dist/atlas/statement.js.map +1 -1
  138. package/dist/atlas/translation-registry.js.map +1 -1
  139. package/dist/atlas/translation.js.map +1 -1
  140. package/dist/atlas/types.d.ts +9 -2
  141. package/dist/atlas/types.d.ts.map +1 -1
  142. package/dist/atlas/types.js +1 -1
  143. package/dist/atlas/types.js.map +1 -1
  144. package/dist/atlas/waves/bridges-closure.d.ts.map +1 -1
  145. package/dist/atlas/waves/bridges-closure.js +0 -3
  146. package/dist/atlas/waves/bridges-closure.js.map +1 -1
  147. package/dist/atlas/waves/bridges.d.ts.map +1 -1
  148. package/dist/atlas/waves/bridges.js +0 -4
  149. package/dist/atlas/waves/bridges.js.map +1 -1
  150. package/dist/atlas/waves/index.d.ts +1 -1
  151. package/dist/atlas/waves/index.d.ts.map +1 -1
  152. package/dist/atlas/waves/index.js.map +1 -1
  153. package/dist/atlas/waves/models.js.map +1 -1
  154. package/dist/atlas/waves/numerics.js.map +1 -1
  155. package/dist/atlas/witness-artifact.js.map +1 -1
  156. package/dist/atlas/witness-dominance.d.ts +4 -3
  157. package/dist/atlas/witness-dominance.d.ts.map +1 -1
  158. package/dist/atlas/witness-dominance.js +15 -5
  159. package/dist/atlas/witness-dominance.js.map +1 -1
  160. package/dist/atlas/witness-numeric.d.ts +8 -4
  161. package/dist/atlas/witness-numeric.d.ts.map +1 -1
  162. package/dist/atlas/witness-numeric.js +27 -2
  163. package/dist/atlas/witness-numeric.js.map +1 -1
  164. package/dist/atlas/witness-result.d.ts +7 -1
  165. package/dist/atlas/witness-result.d.ts.map +1 -1
  166. package/dist/atlas/witness-result.js.map +1 -1
  167. package/dist/atlas/witness-specs.js.map +1 -1
  168. package/dist/atlas/witness-symbolic.js.map +1 -1
  169. package/dist/atlas/witnesses/quantum-support.js.map +1 -1
  170. package/dist/bridges/caller-table.d.ts +1 -1
  171. package/dist/bridges/caller-table.d.ts.map +1 -1
  172. package/dist/bridges/caller-table.js.map +1 -1
  173. package/dist/bridges/carrier-sign.d.ts.map +1 -1
  174. package/dist/bridges/carrier-sign.js +8 -3
  175. package/dist/bridges/carrier-sign.js.map +1 -1
  176. package/dist/bridges/catalog-adapter.d.ts +12 -3
  177. package/dist/bridges/catalog-adapter.d.ts.map +1 -1
  178. package/dist/bridges/catalog-adapter.js +17 -9
  179. package/dist/bridges/catalog-adapter.js.map +1 -1
  180. package/dist/bridges/catalog-load.d.ts +12 -2
  181. package/dist/bridges/catalog-load.d.ts.map +1 -1
  182. package/dist/bridges/catalog-load.js +171 -8
  183. package/dist/bridges/catalog-load.js.map +1 -1
  184. package/dist/bridges/catalog-types.d.ts +48 -24
  185. package/dist/bridges/catalog-types.d.ts.map +1 -1
  186. package/dist/bridges/catalog-types.js.map +1 -1
  187. package/dist/bridges/coefficient-statement.js +1 -5
  188. package/dist/bridges/coefficient-statement.js.map +1 -1
  189. package/dist/bridges/confrontation-coverage.js.map +1 -1
  190. package/dist/bridges/confrontations.d.ts +1 -1
  191. package/dist/bridges/confrontations.d.ts.map +1 -1
  192. package/dist/bridges/confrontations.js +1 -1
  193. package/dist/bridges/confrontations.js.map +1 -1
  194. package/dist/bridges/evaluation-errors.d.ts +15 -2
  195. package/dist/bridges/evaluation-errors.d.ts.map +1 -1
  196. package/dist/bridges/evaluation-errors.js +20 -2
  197. package/dist/bridges/evaluation-errors.js.map +1 -1
  198. package/dist/bridges/evaluator-inputs.js.map +1 -1
  199. package/dist/bridges/evaluators.d.ts +17 -2
  200. package/dist/bridges/evaluators.d.ts.map +1 -1
  201. package/dist/bridges/evaluators.js +49 -16
  202. package/dist/bridges/evaluators.js.map +1 -1
  203. package/dist/bridges/expr-parse.d.ts +27 -4
  204. package/dist/bridges/expr-parse.d.ts.map +1 -1
  205. package/dist/bridges/expr-parse.js +90 -10
  206. package/dist/bridges/expr-parse.js.map +1 -1
  207. package/dist/bridges/holds.d.ts +5 -1
  208. package/dist/bridges/holds.d.ts.map +1 -1
  209. package/dist/bridges/holds.js +18 -3
  210. package/dist/bridges/holds.js.map +1 -1
  211. package/dist/bridges/index.d.ts +15 -14
  212. package/dist/bridges/index.d.ts.map +1 -1
  213. package/dist/bridges/index.js +14 -15
  214. package/dist/bridges/index.js.map +1 -1
  215. package/dist/bridges/input-contract.js.map +1 -1
  216. package/dist/bridges/membership.d.ts +5 -3
  217. package/dist/bridges/membership.d.ts.map +1 -1
  218. package/dist/bridges/membership.js +5 -6
  219. package/dist/bridges/membership.js.map +1 -1
  220. package/dist/bridges/notices.js.map +1 -1
  221. package/dist/bridges/observations/types.js.map +1 -1
  222. package/dist/bridges/rejected.d.ts +11 -17
  223. package/dist/bridges/rejected.d.ts.map +1 -1
  224. package/dist/bridges/rejected.js +13 -68
  225. package/dist/bridges/rejected.js.map +1 -1
  226. package/dist/bridges/relation-eval.d.ts +5 -6
  227. package/dist/bridges/relation-eval.d.ts.map +1 -1
  228. package/dist/bridges/relation-eval.js +9 -38
  229. package/dist/bridges/relation-eval.js.map +1 -1
  230. package/dist/bridges/rhs-registry.js.map +1 -1
  231. package/dist/bridges/sensitivity.d.ts +11 -3
  232. package/dist/bridges/sensitivity.d.ts.map +1 -1
  233. package/dist/bridges/sensitivity.js +24 -10
  234. package/dist/bridges/sensitivity.js.map +1 -1
  235. package/dist/bridges/tensor-index.js.map +1 -1
  236. package/dist/bridges/types.d.ts +1 -7
  237. package/dist/bridges/types.d.ts.map +1 -1
  238. package/dist/bridges/types.js +1 -4
  239. package/dist/bridges/types.js.map +1 -1
  240. package/dist/canonical/canonical-equation.js.map +1 -1
  241. package/dist/canonical/dimensional-fields.js.map +1 -1
  242. package/dist/canonical/entries/_l1-build.js.map +1 -1
  243. package/dist/canonical/entries/atomic.js.map +1 -1
  244. package/dist/canonical/entries/condensed-matter.js +4 -4
  245. package/dist/canonical/entries/condensed-matter.js.map +1 -1
  246. package/dist/canonical/entries/dimensional-classics.js +2 -2
  247. package/dist/canonical/entries/dimensional-classics.js.map +1 -1
  248. package/dist/canonical/entries/electromagnetism.js +2 -2
  249. package/dist/canonical/entries/electromagnetism.js.map +1 -1
  250. package/dist/canonical/entries/fluids-waves.js.map +1 -1
  251. package/dist/canonical/entries/mechanics.js.map +1 -1
  252. package/dist/canonical/entries/nonmonomial.d.ts.map +1 -1
  253. package/dist/canonical/entries/nonmonomial.js +29 -22
  254. package/dist/canonical/entries/nonmonomial.js.map +1 -1
  255. package/dist/canonical/entries/relativity.js.map +1 -1
  256. package/dist/canonical/entries/statistical-mechanics.js +5 -5
  257. package/dist/canonical/entries/statistical-mechanics.js.map +1 -1
  258. package/dist/canonical/entries/thermo-nuclear-cosmo.js.map +1 -1
  259. package/dist/canonical/linkage.d.ts +29 -4
  260. package/dist/canonical/linkage.d.ts.map +1 -1
  261. package/dist/canonical/linkage.js +31 -29
  262. package/dist/canonical/linkage.js.map +1 -1
  263. package/dist/canonical/normal-form.d.ts +0 -8
  264. package/dist/canonical/normal-form.d.ts.map +1 -1
  265. package/dist/canonical/normal-form.js +17 -12
  266. package/dist/canonical/normal-form.js.map +1 -1
  267. package/dist/canonical/registry.js.map +1 -1
  268. package/dist/canonical/residual.js.map +1 -1
  269. package/dist/canonical/seed-l-layer.d.ts +7 -1
  270. package/dist/canonical/seed-l-layer.d.ts.map +1 -1
  271. package/dist/canonical/seed-l-layer.js +7 -1
  272. package/dist/canonical/seed-l-layer.js.map +1 -1
  273. package/dist/canonical/structural.d.ts +21 -0
  274. package/dist/canonical/structural.d.ts.map +1 -1
  275. package/dist/canonical/structural.js +24 -4
  276. package/dist/canonical/structural.js.map +1 -1
  277. package/dist/cases/brownian-sphere.js +4 -4
  278. package/dist/cases/brownian-sphere.js.map +1 -1
  279. package/dist/cases/damped-resonator.js +2 -2
  280. package/dist/cases/damped-resonator.js.map +1 -1
  281. package/dist/cases/index.js.map +1 -1
  282. package/dist/cases/kepler-rv.js.map +1 -1
  283. package/dist/cases/lumped-cooling.js +1 -1
  284. package/dist/cases/lumped-cooling.js.map +1 -1
  285. package/dist/cases/quadrature.js.map +1 -1
  286. package/dist/cases/resistor-noise.js +3 -3
  287. package/dist/cases/resistor-noise.js.map +1 -1
  288. package/dist/cases/skin-depth.js.map +1 -1
  289. package/dist/cases/types.js.map +1 -1
  290. package/dist/cli/args.d.ts +7 -2
  291. package/dist/cli/args.d.ts.map +1 -1
  292. package/dist/cli/args.js +18 -2
  293. package/dist/cli/args.js.map +1 -1
  294. package/dist/cli/bindings.d.ts +13 -0
  295. package/dist/cli/bindings.d.ts.map +1 -0
  296. package/dist/cli/bindings.js +32 -0
  297. package/dist/cli/bindings.js.map +1 -0
  298. package/dist/cli/closed-form-range.js.map +1 -1
  299. package/dist/cli/command.js.map +1 -1
  300. package/dist/cli/commands/_atlas-map.d.ts +3 -3
  301. package/dist/cli/commands/_atlas-map.d.ts.map +1 -1
  302. package/dist/cli/commands/_atlas-map.js +43 -18
  303. package/dist/cli/commands/_atlas-map.js.map +1 -1
  304. package/dist/cli/commands/_atlas-route.js.map +1 -1
  305. package/dist/cli/commands/_discovery-opts.d.ts.map +1 -1
  306. package/dist/cli/commands/_discovery-opts.js +42 -7
  307. package/dist/cli/commands/_discovery-opts.js.map +1 -1
  308. package/dist/cli/commands/atlas.d.ts.map +1 -1
  309. package/dist/cli/commands/atlas.js +1 -3
  310. package/dist/cli/commands/atlas.js.map +1 -1
  311. package/dist/cli/commands/audit.d.ts.map +1 -1
  312. package/dist/cli/commands/audit.js +13 -20
  313. package/dist/cli/commands/audit.js.map +1 -1
  314. package/dist/cli/commands/axes.js.map +1 -1
  315. package/dist/cli/commands/candidates.d.ts.map +1 -1
  316. package/dist/cli/commands/candidates.js +16 -8
  317. package/dist/cli/commands/candidates.js.map +1 -1
  318. package/dist/cli/commands/canonical.js.map +1 -1
  319. package/dist/cli/commands/chain.js +1 -1
  320. package/dist/cli/commands/chain.js.map +1 -1
  321. package/dist/cli/commands/confront.d.ts.map +1 -1
  322. package/dist/cli/commands/confront.js +22 -14
  323. package/dist/cli/commands/confront.js.map +1 -1
  324. package/dist/cli/commands/connectors.js.map +1 -1
  325. package/dist/cli/commands/coverage.js.map +1 -1
  326. package/dist/cli/commands/derive.d.ts.map +1 -1
  327. package/dist/cli/commands/derive.js +42 -17
  328. package/dist/cli/commands/derive.js.map +1 -1
  329. package/dist/cli/commands/discover.d.ts.map +1 -1
  330. package/dist/cli/commands/discover.js +15 -9
  331. package/dist/cli/commands/discover.js.map +1 -1
  332. package/dist/cli/commands/eval.d.ts.map +1 -1
  333. package/dist/cli/commands/eval.js +13 -10
  334. package/dist/cli/commands/eval.js.map +1 -1
  335. package/dist/cli/commands/evaluate.d.ts.map +1 -1
  336. package/dist/cli/commands/evaluate.js +53 -31
  337. package/dist/cli/commands/evaluate.js.map +1 -1
  338. package/dist/cli/commands/explain.d.ts.map +1 -1
  339. package/dist/cli/commands/explain.js +14 -7
  340. package/dist/cli/commands/explain.js.map +1 -1
  341. package/dist/cli/commands/frontier.js.map +1 -1
  342. package/dist/cli/commands/ground.d.ts.map +1 -1
  343. package/dist/cli/commands/ground.js +40 -10
  344. package/dist/cli/commands/ground.js.map +1 -1
  345. package/dist/cli/commands/index.js.map +1 -1
  346. package/dist/cli/commands/map.d.ts.map +1 -1
  347. package/dist/cli/commands/map.js +82 -89
  348. package/dist/cli/commands/map.js.map +1 -1
  349. package/dist/cli/commands/metric.d.ts.map +1 -1
  350. package/dist/cli/commands/metric.js +53 -18
  351. package/dist/cli/commands/metric.js.map +1 -1
  352. package/dist/cli/commands/path.js +4 -4
  353. package/dist/cli/commands/path.js.map +1 -1
  354. package/dist/cli/commands/predict.js.map +1 -1
  355. package/dist/cli/commands/priority.js.map +1 -1
  356. package/dist/cli/commands/probe.d.ts.map +1 -1
  357. package/dist/cli/commands/probe.js +50 -26
  358. package/dist/cli/commands/probe.js.map +1 -1
  359. package/dist/cli/commands/recover.js +1 -1
  360. package/dist/cli/commands/recover.js.map +1 -1
  361. package/dist/cli/commands/regime.d.ts +5 -4
  362. package/dist/cli/commands/regime.d.ts.map +1 -1
  363. package/dist/cli/commands/regime.js +24 -26
  364. package/dist/cli/commands/regime.js.map +1 -1
  365. package/dist/cli/commands/retrieve.d.ts.map +1 -1
  366. package/dist/cli/commands/retrieve.js +22 -14
  367. package/dist/cli/commands/retrieve.js.map +1 -1
  368. package/dist/cli/commands/search.d.ts.map +1 -1
  369. package/dist/cli/commands/search.js +8 -4
  370. package/dist/cli/commands/search.js.map +1 -1
  371. package/dist/cli/commands/symbolic.d.ts.map +1 -1
  372. package/dist/cli/commands/symbolic.js +13 -9
  373. package/dist/cli/commands/symbolic.js.map +1 -1
  374. package/dist/cli/commands/testplan.js +1 -1
  375. package/dist/cli/commands/testplan.js.map +1 -1
  376. package/dist/cli/conventions.js.map +1 -1
  377. package/dist/cli/determination.js.map +1 -1
  378. package/dist/cli/errors.js.map +1 -1
  379. package/dist/cli/euler-guard.js.map +1 -1
  380. package/dist/cli/eval-numbers.js.map +1 -1
  381. package/dist/cli/expr-print.d.ts +29 -2
  382. package/dist/cli/expr-print.d.ts.map +1 -1
  383. package/dist/cli/expr-print.js +46 -2
  384. package/dist/cli/expr-print.js.map +1 -1
  385. package/dist/cli/flag-help.js.map +1 -1
  386. package/dist/cli/graphs.js.map +1 -1
  387. package/dist/cli/library-defaults.d.ts +19 -0
  388. package/dist/cli/library-defaults.d.ts.map +1 -0
  389. package/dist/cli/library-defaults.js +22 -0
  390. package/dist/cli/library-defaults.js.map +1 -0
  391. package/dist/cli/main.js +7 -3
  392. package/dist/cli/main.js.map +1 -1
  393. package/dist/cli/map-evidence.js.map +1 -1
  394. package/dist/cli/output.d.ts +3 -6
  395. package/dist/cli/output.d.ts.map +1 -1
  396. package/dist/cli/output.js.map +1 -1
  397. package/dist/cli/published-url.js.map +1 -1
  398. package/dist/cli/record-reach.d.ts +6 -0
  399. package/dist/cli/record-reach.d.ts.map +1 -1
  400. package/dist/cli/record-reach.js +16 -10
  401. package/dist/cli/record-reach.js.map +1 -1
  402. package/dist/cli/record-tables.js +1 -1
  403. package/dist/cli/record-tables.js.map +1 -1
  404. package/dist/cli/record.d.ts.map +1 -1
  405. package/dist/cli/record.js +31 -12
  406. package/dist/cli/record.js.map +1 -1
  407. package/dist/cli/search-index.d.ts +5 -0
  408. package/dist/cli/search-index.d.ts.map +1 -1
  409. package/dist/cli/search-index.js +12 -1
  410. package/dist/cli/search-index.js.map +1 -1
  411. package/dist/cli/statuses.js.map +1 -1
  412. package/dist/cli/top-level-help.js.map +1 -1
  413. package/dist/cli/version.js.map +1 -1
  414. package/dist/cli-api.d.ts +15 -9
  415. package/dist/cli-api.d.ts.map +1 -1
  416. package/dist/cli-api.js +14 -13
  417. package/dist/cli-api.js.map +1 -1
  418. package/dist/composition/adjudication.js.map +1 -1
  419. package/dist/composition/aliases.js.map +1 -1
  420. package/dist/composition/audit-coverage.d.ts +2 -0
  421. package/dist/composition/audit-coverage.d.ts.map +1 -1
  422. package/dist/composition/audit-coverage.js.map +1 -1
  423. package/dist/composition/axes.d.ts +12 -0
  424. package/dist/composition/axes.d.ts.map +1 -1
  425. package/dist/composition/axes.js +18 -6
  426. package/dist/composition/axes.js.map +1 -1
  427. package/dist/composition/axis-audit.js.map +1 -1
  428. package/dist/composition/bridge-analysis.d.ts +0 -18
  429. package/dist/composition/bridge-analysis.d.ts.map +1 -1
  430. package/dist/composition/bridge-analysis.js +57 -47
  431. package/dist/composition/bridge-analysis.js.map +1 -1
  432. package/dist/composition/bridge-prediction.d.ts +5 -1
  433. package/dist/composition/bridge-prediction.d.ts.map +1 -1
  434. package/dist/composition/bridge-prediction.js +12 -16
  435. package/dist/composition/bridge-prediction.js.map +1 -1
  436. package/dist/composition/buckingham-filter.js.map +1 -1
  437. package/dist/composition/canonical-compare.d.ts.map +1 -1
  438. package/dist/composition/canonical-compare.js +12 -2
  439. package/dist/composition/canonical-compare.js.map +1 -1
  440. package/dist/composition/canonical-graph.d.ts +8 -9
  441. package/dist/composition/canonical-graph.d.ts.map +1 -1
  442. package/dist/composition/canonical-graph.js +25 -67
  443. package/dist/composition/canonical-graph.js.map +1 -1
  444. package/dist/composition/canonical-json.js.map +1 -1
  445. package/dist/composition/canonical-prefactors.js.map +1 -1
  446. package/dist/composition/catalog-graph.d.ts.map +1 -1
  447. package/dist/composition/catalog-graph.js +6 -20
  448. package/dist/composition/catalog-graph.js.map +1 -1
  449. package/dist/composition/chain-candidate.d.ts +2 -0
  450. package/dist/composition/chain-candidate.d.ts.map +1 -1
  451. package/dist/composition/chain-candidate.js +2 -0
  452. package/dist/composition/chain-candidate.js.map +1 -1
  453. package/dist/composition/chain-match.js.map +1 -1
  454. package/dist/composition/chain-regime.js.map +1 -1
  455. package/dist/composition/chain-result.js.map +1 -1
  456. package/dist/composition/compose-surface.js.map +1 -1
  457. package/dist/composition/compose-symbolic.js.map +1 -1
  458. package/dist/composition/compose.d.ts.map +1 -1
  459. package/dist/composition/compose.js +153 -36
  460. package/dist/composition/compose.js.map +1 -1
  461. package/dist/composition/composition-recovery.js.map +1 -1
  462. package/dist/composition/consequence.d.ts.map +1 -1
  463. package/dist/composition/consequence.js +15 -6
  464. package/dist/composition/consequence.js.map +1 -1
  465. package/dist/composition/consistency.js.map +1 -1
  466. package/dist/composition/descriptor.d.ts +1 -1
  467. package/dist/composition/descriptor.d.ts.map +1 -1
  468. package/dist/composition/descriptor.js.map +1 -1
  469. package/dist/composition/dimension-adjacency.js.map +1 -1
  470. package/dist/composition/discovery.d.ts +21 -11
  471. package/dist/composition/discovery.d.ts.map +1 -1
  472. package/dist/composition/discovery.js +81 -21
  473. package/dist/composition/discovery.js.map +1 -1
  474. package/dist/composition/edge.d.ts +19 -8
  475. package/dist/composition/edge.d.ts.map +1 -1
  476. package/dist/composition/edge.js +24 -11
  477. package/dist/composition/edge.js.map +1 -1
  478. package/dist/composition/enumerate.d.ts +2 -2
  479. package/dist/composition/enumerate.d.ts.map +1 -1
  480. package/dist/composition/enumerate.js.map +1 -1
  481. package/dist/composition/evaluate-relation.js.map +1 -1
  482. package/dist/composition/explain.d.ts +14 -9
  483. package/dist/composition/explain.d.ts.map +1 -1
  484. package/dist/composition/explain.js +46 -13
  485. package/dist/composition/explain.js.map +1 -1
  486. package/dist/composition/expr-eval.js.map +1 -1
  487. package/dist/composition/expr-simplify.d.ts.map +1 -1
  488. package/dist/composition/expr-simplify.js +9 -39
  489. package/dist/composition/expr-simplify.js.map +1 -1
  490. package/dist/composition/expr-subst.js.map +1 -1
  491. package/dist/composition/formula-shape.d.ts +9 -0
  492. package/dist/composition/formula-shape.d.ts.map +1 -1
  493. package/dist/composition/formula-shape.js +54 -0
  494. package/dist/composition/formula-shape.js.map +1 -1
  495. package/dist/composition/frontier-account.d.ts +3 -2
  496. package/dist/composition/frontier-account.d.ts.map +1 -1
  497. package/dist/composition/frontier-account.js +7 -3
  498. package/dist/composition/frontier-account.js.map +1 -1
  499. package/dist/composition/graph-viz-svg.js.map +1 -1
  500. package/dist/composition/graph-viz.js.map +1 -1
  501. package/dist/composition/grounding.js.map +1 -1
  502. package/dist/composition/identifiability.js.map +1 -1
  503. package/dist/composition/index.d.ts +6 -4
  504. package/dist/composition/index.d.ts.map +1 -1
  505. package/dist/composition/index.js +4 -3
  506. package/dist/composition/index.js.map +1 -1
  507. package/dist/composition/mathts-quiet.d.ts +28 -0
  508. package/dist/composition/mathts-quiet.d.ts.map +1 -0
  509. package/dist/composition/mathts-quiet.js +56 -0
  510. package/dist/composition/mathts-quiet.js.map +1 -0
  511. package/dist/composition/mathts-scalar-symbols.d.ts.map +1 -1
  512. package/dist/composition/mathts-scalar-symbols.js +18 -34
  513. package/dist/composition/mathts-scalar-symbols.js.map +1 -1
  514. package/dist/composition/not-composable-seeds.d.ts +3 -1
  515. package/dist/composition/not-composable-seeds.d.ts.map +1 -1
  516. package/dist/composition/not-composable-seeds.js +2 -0
  517. package/dist/composition/not-composable-seeds.js.map +1 -1
  518. package/dist/composition/probe/backend-protocol.js.map +1 -1
  519. package/dist/composition/probe/candidate-store.js.map +1 -1
  520. package/dist/composition/probe/corpus.js.map +1 -1
  521. package/dist/composition/probe/dataset.js.map +1 -1
  522. package/dist/composition/probe/experiment-design.js.map +1 -1
  523. package/dist/composition/probe/expression-gaps.js.map +1 -1
  524. package/dist/composition/probe/falsify.d.ts +14 -3
  525. package/dist/composition/probe/falsify.d.ts.map +1 -1
  526. package/dist/composition/probe/falsify.js +14 -27
  527. package/dist/composition/probe/falsify.js.map +1 -1
  528. package/dist/composition/probe/fingerprint.js.map +1 -1
  529. package/dist/composition/probe/fit.d.ts +1 -1
  530. package/dist/composition/probe/fit.d.ts.map +1 -1
  531. package/dist/composition/probe/fit.js +2 -1
  532. package/dist/composition/probe/fit.js.map +1 -1
  533. package/dist/composition/probe/frontier.js.map +1 -1
  534. package/dist/composition/probe/generator.js.map +1 -1
  535. package/dist/composition/probe/index.d.ts +4 -2
  536. package/dist/composition/probe/index.d.ts.map +1 -1
  537. package/dist/composition/probe/index.js +4 -2
  538. package/dist/composition/probe/index.js.map +1 -1
  539. package/dist/composition/probe/limits.js.map +1 -1
  540. package/dist/composition/probe/metadata.js.map +1 -1
  541. package/dist/composition/probe/pipeline.d.ts +5 -0
  542. package/dist/composition/probe/pipeline.d.ts.map +1 -1
  543. package/dist/composition/probe/pipeline.js +13 -6
  544. package/dist/composition/probe/pipeline.js.map +1 -1
  545. package/dist/composition/probe/problem.d.ts +8 -0
  546. package/dist/composition/probe/problem.d.ts.map +1 -1
  547. package/dist/composition/probe/problem.js +78 -12
  548. package/dist/composition/probe/problem.js.map +1 -1
  549. package/dist/composition/probe/report.js.map +1 -1
  550. package/dist/composition/probe/residual.js.map +1 -1
  551. package/dist/composition/probe/run-manifest.js +2 -2
  552. package/dist/composition/probe/run-manifest.js.map +1 -1
  553. package/dist/composition/probe/scoring.d.ts +2 -1
  554. package/dist/composition/probe/scoring.d.ts.map +1 -1
  555. package/dist/composition/probe/scoring.js +21 -7
  556. package/dist/composition/probe/scoring.js.map +1 -1
  557. package/dist/composition/probe/search-budget.js.map +1 -1
  558. package/dist/composition/probe/serialize.js.map +1 -1
  559. package/dist/composition/probe/structure.js.map +1 -1
  560. package/dist/composition/probe/study.d.ts +4 -3
  561. package/dist/composition/probe/study.d.ts.map +1 -1
  562. package/dist/composition/probe/study.js +5 -3
  563. package/dist/composition/probe/study.js.map +1 -1
  564. package/dist/composition/probe/types.d.ts +3 -1
  565. package/dist/composition/probe/types.d.ts.map +1 -1
  566. package/dist/composition/probe/types.js +2 -0
  567. package/dist/composition/probe/types.js.map +1 -1
  568. package/dist/composition/proposed-bridges.d.ts +11 -4
  569. package/dist/composition/proposed-bridges.d.ts.map +1 -1
  570. package/dist/composition/proposed-bridges.js +11 -4
  571. package/dist/composition/proposed-bridges.js.map +1 -1
  572. package/dist/composition/quantities.d.ts +0 -4
  573. package/dist/composition/quantities.d.ts.map +1 -1
  574. package/dist/composition/quantities.js +5 -5
  575. package/dist/composition/quantities.js.map +1 -1
  576. package/dist/composition/quantity.d.ts +18 -2
  577. package/dist/composition/quantity.d.ts.map +1 -1
  578. package/dist/composition/quantity.js +35 -6
  579. package/dist/composition/quantity.js.map +1 -1
  580. package/dist/composition/representative-values.js.map +1 -1
  581. package/dist/composition/retrodiction.d.ts +16 -6
  582. package/dist/composition/retrodiction.d.ts.map +1 -1
  583. package/dist/composition/retrodiction.js +34 -9
  584. package/dist/composition/retrodiction.js.map +1 -1
  585. package/dist/composition/uncertainty.js.map +1 -1
  586. package/dist/composition/user-equation.js.map +1 -1
  587. package/dist/core/axes-registry.d.ts +8 -5
  588. package/dist/core/axes-registry.d.ts.map +1 -1
  589. package/dist/core/axes-registry.js.map +1 -1
  590. package/dist/core/cell.js.map +1 -1
  591. package/dist/core/constants.d.ts +8 -8
  592. package/dist/core/constants.d.ts.map +1 -1
  593. package/dist/core/constants.js +8 -10
  594. package/dist/core/constants.js.map +1 -1
  595. package/dist/core/data-file.js.map +1 -1
  596. package/dist/core/flux-rules.js +1 -1
  597. package/dist/core/flux-rules.js.map +1 -1
  598. package/dist/core/json-schema.d.ts +1 -1
  599. package/dist/core/json-schema.d.ts.map +1 -1
  600. package/dist/core/json-schema.js +31 -7
  601. package/dist/core/json-schema.js.map +1 -1
  602. package/dist/core/labeled-tensor.d.ts +6 -1
  603. package/dist/core/labeled-tensor.d.ts.map +1 -1
  604. package/dist/core/labeled-tensor.js +18 -8
  605. package/dist/core/labeled-tensor.js.map +1 -1
  606. package/dist/core/regime-registry.d.ts +6 -2
  607. package/dist/core/regime-registry.d.ts.map +1 -1
  608. package/dist/core/regime-registry.js.map +1 -1
  609. package/dist/core/regime-rule-install.js.map +1 -1
  610. package/dist/core/regimes-builtins.js.map +1 -1
  611. package/dist/core/tensor.d.ts +7 -4
  612. package/dist/core/tensor.d.ts.map +1 -1
  613. package/dist/core/tensor.js +40 -8
  614. package/dist/core/tensor.js.map +1 -1
  615. package/dist/core/types.js.map +1 -1
  616. package/dist/core/universal-index.js.map +1 -1
  617. package/dist/diff/bridge-ast-gradient.d.ts +4 -5
  618. package/dist/diff/bridge-ast-gradient.d.ts.map +1 -1
  619. package/dist/diff/bridge-ast-gradient.js +10 -6
  620. package/dist/diff/bridge-ast-gradient.js.map +1 -1
  621. package/dist/diff/bridge-gradient.d.ts +24 -80
  622. package/dist/diff/bridge-gradient.d.ts.map +1 -1
  623. package/dist/diff/bridge-gradient.js +21 -98
  624. package/dist/diff/bridge-gradient.js.map +1 -1
  625. package/dist/diff/bridge-specs.d.ts +16 -5
  626. package/dist/diff/bridge-specs.d.ts.map +1 -1
  627. package/dist/diff/bridge-specs.js +16 -4
  628. package/dist/diff/bridge-specs.js.map +1 -1
  629. package/dist/dimensional/algebra.js.map +1 -1
  630. package/dist/dimensional/ast-builders.d.ts +5 -4
  631. package/dist/dimensional/ast-builders.d.ts.map +1 -1
  632. package/dist/dimensional/ast-builders.js +6 -5
  633. package/dist/dimensional/ast-builders.js.map +1 -1
  634. package/dist/dimensional/ast-types.js.map +1 -1
  635. package/dist/dimensional/bridge-check.js.map +1 -1
  636. package/dist/dimensional/buckingham.js.map +1 -1
  637. package/dist/dimensional/connection-validators.d.ts +2 -1
  638. package/dist/dimensional/connection-validators.d.ts.map +1 -1
  639. package/dist/dimensional/connection-validators.js.map +1 -1
  640. package/dist/dimensional/connection.js.map +1 -1
  641. package/dist/dimensional/constant-rows.d.ts.map +1 -1
  642. package/dist/dimensional/constant-rows.js +9 -5
  643. package/dist/dimensional/constant-rows.js.map +1 -1
  644. package/dist/dimensional/constants.d.ts +5 -6
  645. package/dist/dimensional/constants.d.ts.map +1 -1
  646. package/dist/dimensional/constants.js +5 -6
  647. package/dist/dimensional/constants.js.map +1 -1
  648. package/dist/dimensional/curvature-composite.js.map +1 -1
  649. package/dist/dimensional/curvature-invariants.js.map +1 -1
  650. package/dist/dimensional/curvature.js.map +1 -1
  651. package/dist/dimensional/dimension-inference.js.map +1 -1
  652. package/dist/dimensional/dimension-spec.d.ts +13 -7
  653. package/dist/dimensional/dimension-spec.d.ts.map +1 -1
  654. package/dist/dimensional/dimension-spec.js +49 -23
  655. package/dist/dimensional/dimension-spec.js.map +1 -1
  656. package/dist/dimensional/einstein-equation.js.map +1 -1
  657. package/dist/dimensional/errors.d.ts +3 -1
  658. package/dist/dimensional/errors.d.ts.map +1 -1
  659. package/dist/dimensional/errors.js +2 -2
  660. package/dist/dimensional/errors.js.map +1 -1
  661. package/dist/dimensional/exact-scale.js.map +1 -1
  662. package/dist/dimensional/field-equation-helpers.js.map +1 -1
  663. package/dist/dimensional/formula-names.js.map +1 -1
  664. package/dist/dimensional/fresh-label.js.map +1 -1
  665. package/dist/dimensional/friedmann-equation.d.ts +3 -3
  666. package/dist/dimensional/friedmann-equation.js +3 -3
  667. package/dist/dimensional/friedmann-equation.js.map +1 -1
  668. package/dist/dimensional/gauge-field.d.ts +2 -3
  669. package/dist/dimensional/gauge-field.d.ts.map +1 -1
  670. package/dist/dimensional/gauge-field.js +0 -1
  671. package/dist/dimensional/gauge-field.js.map +1 -1
  672. package/dist/dimensional/hyphen-names.d.ts.map +1 -1
  673. package/dist/dimensional/hyphen-names.js +8 -0
  674. package/dist/dimensional/hyphen-names.js.map +1 -1
  675. package/dist/dimensional/killing-validators.js.map +1 -1
  676. package/dist/dimensional/klein-gordon-equation.js.map +1 -1
  677. package/dist/dimensional/metric-validators.d.ts +2 -1
  678. package/dist/dimensional/metric-validators.d.ts.map +1 -1
  679. package/dist/dimensional/metric-validators.js.map +1 -1
  680. package/dist/dimensional/metric.js.map +1 -1
  681. package/dist/dimensional/natural-units.js.map +1 -1
  682. package/dist/dimensional/quantity-registry.d.ts +13 -0
  683. package/dist/dimensional/quantity-registry.d.ts.map +1 -1
  684. package/dist/dimensional/quantity-registry.js +14 -6
  685. package/dist/dimensional/quantity-registry.js.map +1 -1
  686. package/dist/dimensional/rg-flow.js.map +1 -1
  687. package/dist/dimensional/stress-energy-validators.js.map +1 -1
  688. package/dist/dimensional/symbolic-constants.d.ts.map +1 -1
  689. package/dist/dimensional/symbolic-constants.js +7 -2
  690. package/dist/dimensional/symbolic-constants.js.map +1 -1
  691. package/dist/dimensional/tensor-trace.js.map +1 -1
  692. package/dist/dimensional/tensor.js.map +1 -1
  693. package/dist/dimensional/types.js.map +1 -1
  694. package/dist/dimensional/unit-convention.d.ts +0 -2
  695. package/dist/dimensional/unit-convention.d.ts.map +1 -1
  696. package/dist/dimensional/unit-convention.js +2 -2
  697. package/dist/dimensional/unit-convention.js.map +1 -1
  698. package/dist/dimensional/unit-data.d.ts.map +1 -1
  699. package/dist/dimensional/unit-data.js +9 -5
  700. package/dist/dimensional/unit-data.js.map +1 -1
  701. package/dist/dimensional/units.d.ts.map +1 -1
  702. package/dist/dimensional/units.js +38 -20
  703. package/dist/dimensional/units.js.map +1 -1
  704. package/dist/dimensional/validator-registry.js.map +1 -1
  705. package/dist/dimensional/validator.d.ts +0 -16
  706. package/dist/dimensional/validator.d.ts.map +1 -1
  707. package/dist/dimensional/validator.js +65 -29
  708. package/dist/dimensional/validator.js.map +1 -1
  709. package/dist/dimensional/weyl-validators.js.map +1 -1
  710. package/dist/index.d.ts +50 -5
  711. package/dist/index.d.ts.map +1 -1
  712. package/dist/index.js +12 -20
  713. package/dist/index.js.map +1 -1
  714. package/dist/numerical/bianchi-residual.js.map +1 -1
  715. package/dist/numerical/binding-value.d.ts +11 -6
  716. package/dist/numerical/binding-value.d.ts.map +1 -1
  717. package/dist/numerical/binding-value.js +126 -122
  718. package/dist/numerical/binding-value.js.map +1 -1
  719. package/dist/numerical/christoffel-flat.js.map +1 -1
  720. package/dist/numerical/connection-lowering-helpers.js.map +1 -1
  721. package/dist/numerical/covariant-eikonal.d.ts.map +1 -1
  722. package/dist/numerical/covariant-eikonal.js +2 -2
  723. package/dist/numerical/covariant-eikonal.js.map +1 -1
  724. package/dist/numerical/curvature-lowering-helpers.d.ts +20 -0
  725. package/dist/numerical/curvature-lowering-helpers.d.ts.map +1 -1
  726. package/dist/numerical/curvature-lowering-helpers.js +6 -3
  727. package/dist/numerical/curvature-lowering-helpers.js.map +1 -1
  728. package/dist/numerical/derivative-lowering.js.map +1 -1
  729. package/dist/numerical/einstein-equation.js.map +1 -1
  730. package/dist/numerical/engine-registry.js.map +1 -1
  731. package/dist/numerical/errors.d.ts +7 -3
  732. package/dist/numerical/errors.d.ts.map +1 -1
  733. package/dist/numerical/errors.js +5 -5
  734. package/dist/numerical/errors.js.map +1 -1
  735. package/dist/numerical/evaluator-uncertainty.d.ts.map +1 -1
  736. package/dist/numerical/evaluator-uncertainty.js +19 -2
  737. package/dist/numerical/evaluator-uncertainty.js.map +1 -1
  738. package/dist/numerical/formula-contract.d.ts +63 -7
  739. package/dist/numerical/formula-contract.d.ts.map +1 -1
  740. package/dist/numerical/formula-contract.js +61 -42
  741. package/dist/numerical/formula-contract.js.map +1 -1
  742. package/dist/numerical/formula-dimension.d.ts +8 -7
  743. package/dist/numerical/formula-dimension.d.ts.map +1 -1
  744. package/dist/numerical/formula-dimension.js +58 -36
  745. package/dist/numerical/formula-dimension.js.map +1 -1
  746. package/dist/numerical/formula-mathts.d.ts.map +1 -1
  747. package/dist/numerical/formula-mathts.js +5 -2
  748. package/dist/numerical/formula-mathts.js.map +1 -1
  749. package/dist/numerical/formula-registry.d.ts +13 -3
  750. package/dist/numerical/formula-registry.d.ts.map +1 -1
  751. package/dist/numerical/formula-registry.js +7 -2
  752. package/dist/numerical/formula-registry.js.map +1 -1
  753. package/dist/numerical/geodesic-integrator.js.map +1 -1
  754. package/dist/numerical/geometrized.js.map +1 -1
  755. package/dist/numerical/gl4-integrator.d.ts +28 -27
  756. package/dist/numerical/gl4-integrator.d.ts.map +1 -1
  757. package/dist/numerical/gl4-integrator.js +41 -42
  758. package/dist/numerical/gl4-integrator.js.map +1 -1
  759. package/dist/numerical/grid-field.js.map +1 -1
  760. package/dist/numerical/index.js.map +1 -1
  761. package/dist/numerical/input-validation.d.ts +3 -6
  762. package/dist/numerical/input-validation.d.ts.map +1 -1
  763. package/dist/numerical/input-validation.js +4 -8
  764. package/dist/numerical/input-validation.js.map +1 -1
  765. package/dist/numerical/killing.d.ts +8 -5
  766. package/dist/numerical/killing.d.ts.map +1 -1
  767. package/dist/numerical/killing.js.map +1 -1
  768. package/dist/numerical/klein-gordon.js.map +1 -1
  769. package/dist/numerical/kretschmann.js.map +1 -1
  770. package/dist/numerical/lowering-utils.js.map +1 -1
  771. package/dist/numerical/lowering.d.ts.map +1 -1
  772. package/dist/numerical/lowering.js +7 -17
  773. package/dist/numerical/lowering.js.map +1 -1
  774. package/dist/numerical/mathts-engine.d.ts.map +1 -1
  775. package/dist/numerical/mathts-engine.js +11 -6
  776. package/dist/numerical/mathts-engine.js.map +1 -1
  777. package/dist/numerical/metric-inverse.js.map +1 -1
  778. package/dist/numerical/null-ic.js.map +1 -1
  779. package/dist/numerical/null-ray-integrator.js +4 -4
  780. package/dist/numerical/null-ray-integrator.js.map +1 -1
  781. package/dist/numerical/painleve-gullstrand-metric.js.map +1 -1
  782. package/dist/numerical/pderiv.d.ts.map +1 -1
  783. package/dist/numerical/pderiv.js +9 -2
  784. package/dist/numerical/pderiv.js.map +1 -1
  785. package/dist/numerical/perihelion-finder.js.map +1 -1
  786. package/dist/numerical/quadrature.d.ts +5 -2
  787. package/dist/numerical/quadrature.d.ts.map +1 -1
  788. package/dist/numerical/quadrature.js +20 -3
  789. package/dist/numerical/quadrature.js.map +1 -1
  790. package/dist/numerical/spacetime-metrics.d.ts +13 -19
  791. package/dist/numerical/spacetime-metrics.d.ts.map +1 -1
  792. package/dist/numerical/spacetime-metrics.js +126 -248
  793. package/dist/numerical/spacetime-metrics.js.map +1 -1
  794. package/dist/numerical/strides.js.map +1 -1
  795. package/dist/numerical/tensor-engine.d.ts +9 -5
  796. package/dist/numerical/tensor-engine.d.ts.map +1 -1
  797. package/dist/numerical/tensor-engine.js.map +1 -1
  798. package/dist/numerical/types.js.map +1 -1
  799. package/dist/numerical/weyl-lowering.js.map +1 -1
  800. package/dist/relations/category.js.map +1 -1
  801. package/dist/relations/composition-table.d.ts +4 -4
  802. package/dist/relations/composition-table.js +4 -4
  803. package/dist/relations/composition-table.js.map +1 -1
  804. package/dist/relations/conventions.js.map +1 -1
  805. package/dist/relations/domain-regimes.js.map +1 -1
  806. package/dist/relations/regime-registration.js.map +1 -1
  807. package/dist/relations/regime-vocabularies.js.map +1 -1
  808. package/dist/relations/regime.d.ts +18 -8
  809. package/dist/relations/regime.d.ts.map +1 -1
  810. package/dist/relations/regime.js +26 -14
  811. package/dist/relations/regime.js.map +1 -1
  812. package/dist/relations/types.d.ts +18 -5
  813. package/dist/relations/types.d.ts.map +1 -1
  814. package/dist/relations/types.js +5 -3
  815. package/dist/relations/types.js.map +1 -1
  816. package/package.json +10 -14
  817. package/dist/bridges/registry.d.ts +0 -60
  818. package/dist/bridges/registry.d.ts.map +0 -1
  819. package/dist/bridges/registry.js +0 -87
  820. package/dist/bridges/registry.js.map +0 -1
  821. package/dist/cli/poster-source.d.ts +0 -154
  822. package/dist/cli/poster-source.d.ts.map +0 -1
  823. package/dist/cli/poster-source.js +0 -184
  824. package/dist/cli/poster-source.js.map +0 -1
@@ -49,6 +49,18 @@ export interface RetrodictionOptions {
49
49
  /** Relative-error tolerance for reference scoring (default 1e-3). */
50
50
  readonly referenceTolerance?: number;
51
51
  }
52
+ /** One refused edge in a retrodiction, with the kind of refusal. @public */
53
+ export interface RetrodictionRefusal {
54
+ readonly edge: string;
55
+ /**
56
+ * `domain`: the validity domain rejected the point. `coefficient-unset`: the edge has no
57
+ * sourced prefactor, whatever the values. `carrier-sign`: the carrier charge and the
58
+ * mobility had opposite signs. `formula`: the relation's formula did not evaluate at the
59
+ * point (a 0/0, say). Four facts, kept apart (AGENTS law 4).
60
+ */
61
+ readonly kind: 'domain' | 'coefficient-unset' | 'carrier-sign' | 'formula';
62
+ readonly reason: string;
63
+ }
52
64
  /** The result of retrodicting one node. @public */
53
65
  export interface RetrodictionResult {
54
66
  readonly target: string;
@@ -59,13 +71,11 @@ export interface RetrodictionResult {
59
71
  readonly relativeSpread: number;
60
72
  readonly tolerance: number;
61
73
  /**
62
- * Derivations that refused the inputs as outside their validity domain.
63
- * A refusal is not an unset coefficient and not a missing input.
74
+ * Edges that refused the supplied values. `kind` keeps the refusals apart (AGENTS law 4):
75
+ * `domain`, `carrier-sign` and `formula` are the point (the edge does not fire there);
76
+ * `coefficient-unset` is the edge's own state (no sourced prefactor), whatever the values.
64
77
  */
65
- readonly refusals?: readonly {
66
- readonly edge: string;
67
- readonly reason: string;
68
- }[];
78
+ readonly refusals?: readonly RetrodictionRefusal[];
69
79
  /** `outcome !== 'inconsistent'` — the falsification gate. */
70
80
  readonly pass: boolean;
71
81
  /** Supplied external value, when scored. */
@@ -1 +1 @@
1
- {"version":3,"file":"retrodiction.d.ts","sourceRoot":"","sources":["../../src/composition/retrodiction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAI5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAqB3D,gDAAgD;AAChD,MAAM,MAAM,mBAAmB,GAC3B,YAAY,GACZ,cAAc,GACd,QAAQ,GACR,eAAe,CAAC;AAEpB,kEAAkE;AAClE,MAAM,WAAW,sBAAsB;IACrC,4CAA4C;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAA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iBAAiB,CAAC,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,uDAAuD;AACvD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,OAAO,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAChD,6DAA6D;IAC7D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,yDAAyD;IACzD,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;CACjC;AAgBD;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,SAAS,UAAU,EAAE,EAC5B,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAC7C,MAAM,EAAE,SAAS,sBAAsB,EAAE,GACxC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CA+CrB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,SAAS,UAAU,EAAE,EAC5B,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAC7C,MAAM,EAAE,MAAM,EACd,IAAI,GAAE,mBAAwB,GAC7B,kBAAkB,CA0EpB;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,SAAS,UAAU,EAAE,EAC5B,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAC7C,IAAI,GAAE,mBAAwB,GAC7B,kBAAkB,CA2BpB"}
@@ -28,10 +28,11 @@
28
28
  *
29
29
  * @module composition/retrodiction
30
30
  */
31
- import { CarrierSignError } from '../bridges/carrier-sign.js';
32
31
  import { CANONICAL_GROUP_PREFACTORS } from './canonical-prefactors.js';
33
- import { evaluateEdge } from './edge.js';
32
+ import { CoefficientUnsetError, evaluateEdge } from './edge.js';
34
33
  import { DomainViolationError } from '../bridges/evaluation-errors.js';
34
+ import { CarrierSignError } from '../bridges/carrier-sign.js';
35
+ import { FormulaError } from '../numerical/formula-contract.js';
35
36
  import { QUANTITY_IDENTIFICATIONS } from './compose.js';
36
37
  import { conventionFactor } from '../dimensional/unit-convention.js';
37
38
  import { classifyAll } from './identifiability.js';
@@ -52,6 +53,22 @@ function evaluationInputs(edge, values) {
52
53
  }
53
54
  return inputs;
54
55
  }
56
+ /** The refusal an evaluator error is, or `undefined` when it is not a refusal at all. */
57
+ function refusalKind(err) {
58
+ if (err instanceof DomainViolationError)
59
+ return 'domain';
60
+ if (err instanceof CoefficientUnsetError)
61
+ return 'coefficient-unset';
62
+ if (err instanceof CarrierSignError)
63
+ return 'carrier-sign';
64
+ if (err instanceof FormulaError)
65
+ return 'formula';
66
+ return undefined;
67
+ }
68
+ /** True when the error says the edge does not fire here (or at all, for an unset coefficient). */
69
+ function refusesThePoint(err) {
70
+ return refusalKind(err) !== undefined;
71
+ }
55
72
  /**
56
73
  * Monotone forward EVALUATION: propagate values from `groundTruth` through
57
74
  * the graph (domain-checked; identifications supply identified names;
@@ -97,8 +114,14 @@ export function forwardEvaluate(edges, groundTruth, idents) {
97
114
  try {
98
115
  v = evaluateEdge(e, inputs);
99
116
  }
100
- catch {
101
- continue; // domain violation or evaluator error: edge does not fire
117
+ catch (err) {
118
+ // The edge refusing this point (a domain miss, opposite carrier signs, a formula
119
+ // that has no finite value there) or an unset coefficient is "the edge does not
120
+ // fire". Anything else (an alias conflict, a TypeError in an evaluator) is a
121
+ // different fact and is not hidden as a non-derivation (9.0.0 audit §4 C6).
122
+ if (!refusesThePoint(err))
123
+ throw err;
124
+ continue;
102
125
  }
103
126
  if (Number.isFinite(v)) {
104
127
  values.set(e.target.name, v);
@@ -134,12 +157,14 @@ export function retrodictNode(edges, groundTruth, target, opts = {}) {
134
157
  v = evaluateEdge(e, inputs);
135
158
  }
136
159
  catch (err) {
137
- // A sign rejection is the answer for this target. Swallowing it would
138
- // report the quantity as unrecoverable. A domain miss still skips.
139
- if (err instanceof CarrierSignError)
160
+ // A refusal of the point or an unset coefficient is a recorded refusal of
161
+ // this edge, under its own kind. Any other error (an alias conflict, a
162
+ // TypeError in an evaluator) is a different fact and propagates instead of
163
+ // reading as "unrecoverable" (§4 C6).
164
+ const kind = refusalKind(err);
165
+ if (kind === undefined)
140
166
  throw err;
141
- if (err instanceof DomainViolationError)
142
- refusals.push({ edge: e.id, reason: err.message });
167
+ refusals.push({ edge: e.id, kind, reason: err.message });
143
168
  continue;
144
169
  }
145
170
  if (Number.isFinite(v))
@@ -1 +1 @@
1
- {"version":3,"file":"retrodiction.js","sourceRoot":"","sources":["../../src/composition/retrodiction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAEvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;;;GAIG;AACH,SAAS,gBAAgB,CAAC,IAAgB,EAAE,MAAmC;IAC7E,MAAM,MAAM,GAA2B,EAAE,CAAC;IAC1C,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,OAAO;QAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAE,CAAC;IACnE,MAAM,KAAK,GAAG,0BAA0B,CAAC,IAAI,CAAC,CAAC,CAAC,E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AC,EAAE,EAAE,CAChC,aAAa,CAAC,KAAK,EAAE,WAAW,EAAE,CAAC,EAAE,IAAI,CAAC,CAC3C,CAAC;IAEF,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,YAAY,CAAC,CAAC,MAAM,CAAC;IAC5E,MAAM,YAAY,GAAG,OAAO,CAAC,MAAM,CACjC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,cAAc,CACpC,CAAC,MAAM,CAAC;IAET,OAAO;QACL,OAAO;QACP,OAAO,EAAE,UAAU,GAAG,YAAY;QAClC,UAAU;QACV,YAAY;QACZ,aAAa,EAAE,YAAY,KAAK,CAAC;KAClC,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Retrodiction harness (Consequence 2 of\n * docs/planning/Bridge-Inference-Epistemics-Note.md, designed in\n * docs/planning/Retrodiction-Harness-Design-Note.md).\n *\n * The framework's own falsification benchmark. Mask a quantity the graph\n * can compute, recompute it from ground-truth inputs via EACH independent\n * derivation, and check the predictions agree. This operationalizes the\n * identifiability classifier's OVER-DETERMINED verdict: the surplus\n * derivations of an over-determined node are PREDICTED to be consistency\n * constraints; the harness evaluates them and checks that numerically.\n *\n * - consistent — ≥2 derivations agree within tolerance.\n * - inconsistent — ≥2 derivations DISAGREE (a falsification: two\n * encodings of one quantity-name are not the same\n * physics).\n * - single — exactly one derivation fired (recovered, no check).\n * - unrecoverable — no derivation fired from the ground truth.\n *\n * \"Mask\" = compute source values over the graph with every edge INTO the\n * target removed (the classifier's target-removed closure — so the node\n * is genuinely hidden, never read back through its own derivation).\n * Forward evaluation honors `QUANTITY_IDENTIFICATIONS` and is\n * domain-checked (an edge that refuses its domain contributes no\n * prediction). The consistency check needs no external truth and is the\n * re-runnable core; an optional `references` map adds external-value\n * scoring. Pass bar pre-registered in the design note (spread ≤ 1e-6).\n *\n * @module composition/retrodiction\n */\n\nimport type { BridgeEdge } from './edge.js';\nimport { CANONICAL_GROUP_PREFACTORS } from './canonical-prefactors.js';\nimport { CoefficientUnsetError, evaluateEdge } from './edge.js';\nimport { DomainViolationError } from '../bridges/evaluation-errors.js';\nimport { CarrierSignError } from '../bridges/carrier-sign.js';\nimport { FormulaError } from '../numerical/formula-contract.js';\nimport type { QuantityIdentification } from './compose.js';\nimport { QUANTITY_IDENTIFICATIONS } from './compose.js';\nimport { conventionFactor } from '../dimensional/unit-convention.js';\nimport { classifyAll } from './identifiability.js';\n\n/**\n * Source values, plus a dimensionless group the edge multiplies when the\n * ground truth names it. The group is not a source: Buckingham cannot see\n * it, and a missing group is the unset coefficient, not a missing input.\n */\nfunction evaluationInputs(edge: BridgeEdge, values: ReadonlyMap<string, number>): Record<string, number> {\n const inputs: Record<string, number> = {};\n for (const s of edge.sources) inputs[s.name] = values.get(s.name)!;\n const group = CANONICAL_GROUP_PREFACTORS.find((g) => g.id === edge.id);\n if (group !== undefined) {\n const g = values.get(group.group);\n if (g !== undefined) inputs[group.group] = g;\n }\n return inputs;\n}\n\n/** Outcome of retrodicting one node. @public */\nexport type RetrodictionOutcome =\n | 'consistent'\n | 'inconsistent'\n | 'single'\n | 'unrecoverable';\n\n/** One derivation's recovered value for a masked node. @public */\nexport interface RetrodictionPrediction {\n /** The edge id that produced this value. */\n readonly edge: string;\n readonly value: number;\n}\n\n/** Options for the harness. @public */\nexport interface RetrodictionOptions {\n /** Identifications honored in forward evaluation (default registered). */\n readonly identifications?: readonly QuantityIdentification[];\n /** Relative-spread tolerance for `consistent` (default 1e-6). */\n readonly tolerance?: number;\n /** External (textbook) values to score recovered nodes against. */\n readonly references?: Readonly<Record<string, number>>;\n /** Relative-error tolerance for reference scoring (default 1e-3). */\n readonly referenceTolerance?: number;\n}\n\n/** One refused edge in a retrodiction, with the kind of refusal. @public */\nexport interface RetrodictionRefusal {\n readonly edge: string;\n /**\n * `domain`: the validity domain rejected the point. `coefficient-unset`: the edge has no\n * sourced prefactor, whatever the values. `carrier-sign`: the carrier charge and the\n * mobility had opposite signs. `formula`: the relation's formula did not evaluate at the\n * point (a 0/0, say). Four facts, kept apart (AGENTS law 4).\n */\n readonly kind: 'domain' | 'coefficient-unset' | 'carrier-sign' | 'formula';\n readonly reason: string;\n}\n\n/** The result of retrodicting one node. @public */\nexport interface RetrodictionResult {\n readonly target: string;\n readonly outcome: RetrodictionOutcome;\n /** Recovered values, one per derivation that fired. */\n readonly predictions: readonly RetrodictionPrediction[];\n /** (max − min)/|mean| across predictions; 0 when fewer than two. */\n readonly relativeSpread: number;\n readonly tolerance: number;\n /**\n * Edges that refused the supplied values. `kind` keeps the refusals apart (AGENTS law 4):\n * `domain`, `carrier-sign` and `formula` are the point (the edge does not fire there);\n * `coefficient-unset` is the edge's own state (no sourced prefactor), whatever the values.\n */\n readonly refusals?: readonly RetrodictionRefusal[];\n /** `outcome !== 'inconsistent'` — the falsification gate. */\n readonly pass: boolean;\n /** Supplied external value, when scored. */\n readonly referenceValue?: number;\n /** |mean(predictions) − reference| / |reference|, when scored. */\n readonly referenceRelError?: number;\n readonly referencePass?: boolean;\n}\n\n/** Aggregate report across the swept nodes. @public */\nexport interface RetrodictionReport {\n readonly results: readonly RetrodictionResult[];\n /** Nodes with ≥2 derivations (consistent + inconsistent). */\n readonly checked: number;\n readonly consistent: number;\n readonly inconsistent: number;\n /** The headline gate: no inconsistent node was found. */\n readonly allConsistent: boolean;\n}\n\n/** The refusal an evaluator error is, or `undefined` when it is not a refusal at all. */\nfunction refusalKind(err: unknown): RetrodictionRefusal['kind'] | undefined {\n if (err instanceof DomainViolationError) return 'domain';\n if (err instanceof CoefficientUnsetError) return 'coefficient-unset';\n if (err instanceof CarrierSignError) return 'carrier-sign';\n if (err instanceof FormulaError) return 'formula';\n return undefined;\n}\n\n/** True when the error says the edge does not fire here (or at all, for an unset coefficient). */\nfunction refusesThePoint(err: unknown): boolean {\n return refusalKind(err) !== undefined;\n}\n\n/**\n * Monotone forward EVALUATION: propagate values from `groundTruth` through\n * the graph (domain-checked; identifications supply identified names;\n * non-finite or domain-refused edges do not fire). Each node is assigned\n * the value of the first edge that fires for it.\n *\n * Exported `@internal` so the discovery magnitude-gate can read a quantity's\n * value AT THE REGISTERED ANCHOR when the static representative-value table\n * has no entry for it (graph-derived quantities like `schwarzschild-radius`).\n *\n * @internal\n */\nexport function forwardEvaluate(\n edges: readonly BridgeEdge[],\n groundTruth: Readonly<Record<string, number>>,\n idents: readonly QuantityIdentification[],\n): Map<string, number> {\n // Finite-seed guard (matches the computed-value guard below and the\n // library-wide finiteness discipline): a NaN/∞ seed would propagate silently\n // through the graph and spoof downstream magnitude/consistency checks.\n for (const [name, v] of Object.entries(groundTruth)) {\n if (!Number.isFinite(v)) {\n throw new TypeError(\n `forwardEvaluate: ground-truth seed '${name}' must be a finite number, got ${v}.`,\n );\n }\n }\n const values = new Map<string, number>(Object.entries(groundTruth));\n let changed = true;\n while (changed) {\n changed = false;\n for (const id of idents) {\n const fromVal = values.get(id.from);\n if (fromVal !== undefined && !values.has(id.to)) {\n const converted = fromVal * conventionFactor(id.from, id.to);\n if (Number.isFinite(converted)) {\n values.set(id.to, converted);\n changed = true;\n }\n }\n }\n for (const e of edges) {\n if (values.has(e.target.name)) continue;\n if (!e.sources.every((s) => values.has(s.name))) continue;\n const inputs = evaluationInputs(e, values);\n let v: number;\n try {\n v = evaluateEdge(e, inputs);\n } catch (err) {\n // The edge refusing this point (a domain miss, opposite carrier signs, a formula\n // that has no finite value there) or an unset coefficient is \"the edge does not\n // fire\". Anything else (an alias conflict, a TypeError in an evaluator) is a\n // different fact and is not hidden as a non-derivation (9.0.0 audit §4 C6).\n if (!refusesThePoint(err)) throw err;\n continue;\n }\n if (Number.isFinite(v)) {\n values.set(e.target.name, v);\n changed = true;\n }\n }\n }\n return values;\n}\n\n/**\n * Retrodict one node: mask it (source values from the target-removed\n * graph), recover it via each incoming edge, and score the spread.\n *\n * @public\n */\nexport function retrodictNode(\n edges: readonly BridgeEdge[],\n groundTruth: Readonly<Record<string, number>>,\n target: string,\n opts: RetrodictionOptions = {},\n): RetrodictionResult {\n const idents = opts.identifications ?? QUANTITY_IDENTIFICATIONS;\n const tolerance = opts.tolerance ?? 1e-6;\n\n // Masked source values: never let the target be assigned (so no\n // derivation reads it back — circular self-support excluded).\n const edgesMinusIntoTarget = edges.filter((e) => e.target.name !== target);\n const values = forwardEvaluate(edgesMinusIntoTarget, groundTruth, idents);\n\n const predictions: RetrodictionPrediction[] = [];\n const refusals: RetrodictionRefusal[] = [];\n for (const e of edges) {\n if (e.target.name !== target) continue;\n if (!e.sources.every((s) => values.has(s.name))) continue;\n const inputs = evaluationInputs(e, values);\n let v: number;\n try {\n v = evaluateEdge(e, inputs);\n } catch (err) {\n // A refusal of the point or an unset coefficient is a recorded refusal of\n // this edge, under its own kind. Any other error (an alias conflict, a\n // TypeError in an evaluator) is a different fact and propagates instead of\n // reading as \"unrecoverable\" (§4 C6).\n const kind = refusalKind(err);\n if (kind === undefined) throw err;\n refusals.push({ edge: e.id, kind, reason: (err as Error).message });\n continue;\n }\n if (Number.isFinite(v)) predictions.push({ edge: e.id, value: v });\n }\n\n let relativeSpread = 0;\n if (predictions.length >= 2) {\n const vals = predictions.map((p) => p.value);\n const max = Math.max(...vals);\n const min = Math.min(...vals);\n // Normalize the (max − min) span by the largest MAGNITUDE, not the mean:\n // opposite-sign predictions (e.g. +6 and −6) cancel in the mean → a ~0\n // denominator → spurious Infinity, even though the true relative spread is\n // finite (12/6 = 2). `maxAbs === 0` only when every value is 0 (max = min),\n // so the span is 0 too.\n const maxAbs = Math.max(...vals.map(Math.abs));\n relativeSpread = maxAbs > 0 ? (max - min) / maxAbs : 0;\n }\n\n let outcome: RetrodictionOutcome;\n if (predictions.length === 0) outcome = 'unrecoverable';\n else if (predictions.length === 1) outcome = 'single';\n else outcome = relativeSpread <= tolerance ? 'consistent' : 'inconsistent';\n\n const result: RetrodictionResult = {\n target,\n outcome,\n predictions,\n relativeSpread,\n tolerance,\n ...(refusals.length > 0 ? { refusals } : {}),\n pass: outcome !== 'inconsistent',\n };\n\n const ref = opts.references?.[target];\n if (ref !== undefined && predictions.length >= 1) {\n const mean =\n predictions.reduce((a, p) => a + p.value, 0) / predictions.length;\n const referenceRelError = Math.abs(mean - ref) / (Math.abs(ref) || 1);\n return {\n ...result,\n referenceValue: ref,\n referenceRelError,\n referencePass: referenceRelError <= (opts.referenceTolerance ?? 1e-3),\n };\n }\n\n return result;\n}\n\n/**\n * Sweep the graph: retrodict every over-determined node (the classifier\n * is the feeder), plus any node with a supplied reference value. Returns\n * the per-node results and the headline `allConsistent` gate.\n *\n * @public\n */\nexport function retrodict(\n edges: readonly BridgeEdge[],\n groundTruth: Readonly<Record<string, number>>,\n opts: RetrodictionOptions = {},\n): RetrodictionReport {\n const idents = opts.identifications ?? QUANTITY_IDENTIFICATIONS;\n const known = Object.keys(groundTruth);\n const classified = classifyAll(edges, known, { identifications: idents });\n\n const overDetermined = classified\n .filter((r) => r.verdict === 'over-determined')\n .map((r) => r.target);\n const refTargets = opts.references ? Object.keys(opts.references) : [];\n const targets = [...new Set([...overDetermined, ...refTargets])].sort();\n\n const results = targets.map((t) =>\n retrodictNode(edges, groundTruth, t, opts),\n );\n\n const consistent = results.filter((r) => r.outcome === 'consistent').length;\n const inconsistent = results.filter(\n (r) => r.outcome === 'inconsistent',\n ).length;\n\n return {\n results,\n checked: consistent + inconsistent,\n consistent,\n inconsistent,\n allConsistent: inconsistent === 0,\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"uncertainty.js","sourceRoot":"","sources":["../../src/composition/uncertainty.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,oBAAoB,IAAI,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAErG,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AA2DzC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,oBAAoB,CAClC,I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,CAAC;IACD,qEAAqE;IACrE,EAAE;IACF,4FAA4F;IAC5F,gGAAgG;IAChG,yFAAyF;IACzF,0FAA0F;IAC1F,0FAA0F;IAC1F,+FAA+F;IAC/F,iCAAiC;IACjC,EAAE;IACF,iGAAiG;IACjG,wEAAwE;IACxE,EAAE;IACF,iGAAiG;IACjG,iGAAiG;IACjG,iGAAiG;IACjG,gGAAgG;IAChG,kGAAkG;IAClG,mBAAmB;IACnB,OAAO;QACL,KAAK;QACL,KAAK;QACL,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,QAAQ;QACR,KAAK;KACN,CAAC;AACJ,CAAC","sourcesContent":["/**\n * First-order uncertainty propagation through composition edges\n * (v0.10.0 T4 — fulfills the improvement plan's G-3 carrier claim:\n * \"edges carry uncertainties, and uncertainty propagates through\n * composition\").\n *\n * σ_out² = Σᵢ (∂f/∂xᵢ · σᵢ)² (independent-input Gaussian,\n * first order)\n *\n * Partials are MathTS central differences with `relativeStep` `1e-6`\n * (`h = 1e-6·max(|xᵢ|, 1e-30)`). Because composed edges ARE `BridgeEdge`s\n * (design D-2 closure), chains need no extra machinery — propagate on\n * the composed edge directly.\n *\n * Scope honesty: independent inputs only (no covariance matrix), first\n * order only (no curvature term). Adequate for the scalar closed-form\n * edges in the graph today; revisit both if correlated observables or\n * strongly nonlinear edges land.\n *\n * @module composition/uncertainty\n */\n\nimport { propagateUncertainty as propagateScalarUncertainty } from '@danielsimonjr/mathts-functions';\nimport type { BridgeEdge } from './edge.js';\nimport { evaluateEdge } from './edge.js';\nimport type { ApproximationBound } from '../relations/types.js';\n\n/**\n * Optional extras for {@link propagateUncertainty}.\n *\n * INTERNAL, not public. Sprint 2's boundary is that nothing new reaches\n * `src/index.ts` before Phase 6. This shipped tagged public, which failed\n * `tests/api/public-tag-vs-index-invariant.test.ts`: a symbol advertised as\n * public but unreachable from the barrel is a promise the package cannot keep.\n *\n * @internal\n */\nexport interface UncertaintyOptions {\n /**\n * An approximation bound for the map the edge stands in for. Its `delta` —\n * the uniform model error in `bound.norm` — is added to the statistical\n * sigma IN QUADRATURE, on the usual independence assumption between input\n * noise and model error.\n *\n * `bound.K` is deliberately NOT used. The Lipschitz constant composes bounds\n * ALONG A PATH (`atlas/error-algebra`); applying it here would rescale a\n * sigma this edge already differentiates directly, double-counting the\n * sensitivity the partials measure.\n *\n * ⚠ The caller is asserting that `bound.norm` is commensurate with the\n * edge's output quantity. Nothing here can check that — no edge records a\n * norm — so supplying a bound whose norm is a RELATIVE error against an\n * absolute-valued edge produces a wrong number silently. Omit `bound` unless\n * the norms genuinely match.\n */\n readonly bound?: ApproximationBound;\n}\n\n/** Result of a propagation. @public */\nexport interface UncertaintyResult {\n /** Central value f(x) (domain-checked). */\n readonly value: number;\n /**\n * Propagated 1σ STATISTICAL standard deviation, from the input sigmas alone.\n *\n * This never includes `bound.delta`. A deterministic bias and a random spread are different\n * things and this field is only the second; see {@link UncertaintyResult.delta}.\n */\n readonly sigma: number;\n /**\n * The DETERMINISTIC model-error bound, present only when `opts.bound` was supplied — the echo of\n * `bound.delta`, surfaced beside `sigma` rather than folded into it.\n *\n * A caller needing a single envelope combines them and owns the coverage factor it chose:\n * `k * sigma + delta`. This function will not choose `k`.\n */\n readonly delta?: number;\n /** Per-input partial derivatives ∂f/∂xᵢ (central difference). */\n readonly partials: Readonly<Record<string, number>>;\n /** Echo of `opts.bound`, present only when one was supplied. */\n readonly bound?: ApproximationBound;\n}\n\n/**\n * Propagate independent 1σ input uncertainties through an edge.\n *\n * `sigmas` keys are source-quantity names; inputs absent from `sigmas`\n * (or with σ = 0) contribute no variance but still get a partial.\n * The central value is domain-checked (`evaluateEdge`); the stencil\n * evaluations use the raw evaluator — a ±h step that exits the\n * validity domain near its boundary would otherwise poison the\n * derivative with a thrown error rather than a number.\n *\n * `opts.bound` is the only way this function's output can differ from its\n * pre-Sprint-2 output: omit it and every field is byte-identical, including\n * the absence of `bound` on the result.\n *\n * @public\n */\nexport function propagateUncertainty(\n edge: BridgeEdge,\n inputs: Record<string, number>,\n sigmas: Record<string, number>,\n opts?: UncertaintyOptions,\n): UncertaintyResult {\n const value = evaluateEdge(edge, inputs);\n\n const point: Record<string, number> = {};\n const usedSigmas: Record<string, number> = {};\n for (const source of edge.sources) {\n const name = source.name;\n const x = inputs[name];\n if (!Number.isFinite(x)) {\n throw new RangeError(\n `propagateUncertainty: input '${name}' is not a finite number`,\n );\n }\n const sigma = sigmas[name] ?? 0;\n if (sigma < 0 || !Number.isFinite(sigma)) {\n throw new RangeError(\n `propagateUncertainty: sigma for '${name}' must be finite and ≥ 0`,\n );\n }\n point[name] = x;\n usedSigmas[name] = sigma;\n }\n\n // The stencil is the raw evaluator. `value` above is domain-checked.\n // `bound.delta` is not an input to this call: it stays a separate field.\n const stat = propagateScalarUncertainty(\n (vals) => edge.evaluate(vals),\n point,\n usedSigmas,\n { relativeStep: 1e-6 },\n );\n const partials = stat.partials;\n const sigma = stat.sigma;\n\n const bound = opts?.bound;\n if (bound === undefined) {\n return { value, sigma, partials };\n }\n if (!Number.isFinite(bound.delta) || bound.delta < 0) {\n throw new RangeError(\n `propagateUncertainty: bound.delta must be finite and ≥ 0, got ${bound.delta}`,\n );\n }\n // THE TWO ARE REPORTED SEPARATELY AND ARE DELIBERATELY NOT COMBINED.\n //\n // This previously returned `sqrt(variance + delta^2)`, justified by \"the usual independence\n // assumption between input noise and model error\". INDEPENDENCE DOES NOT LICENSE QUADRATURE FOR\n // A BIAS. `sigma` is a 1-sigma spread of a zero-mean random variable; `bound.delta` is a\n // DETERMINISTIC worst-case sup-norm offset. Adding them in quadrature treats a systematic\n // displacement as if it averaged out, which UNDERSTATES the envelope — and understates it\n // precisely when the model error is largest relative to the noise, which is when a caller most\n // needs the number to be honest.\n //\n // Raised independently by two reviews that did not see each other (an adversarial physics panel,\n // and Eve E2), which is the strongest signal this project has produced.\n //\n // WHY SEPARATE RATHER THAN ADDED. Collapsing to one number requires choosing a coverage factor —\n // `k*sigma + delta`, with k about 4.47 for 95% by Chebyshev, or k=1 for a 1-sigma semi-interval.\n // That choice belongs to the caller's risk posture, not to this library, and baking one in would\n // repeat the original error in a new costume: a defensible-looking number whose provenance is a\n // convention nobody stated. A caller who needs one value composes it from the two fields and owns\n // the k it picked.\n return {\n value,\n sigma,\n delta: bound.delta,\n partials,\n bound,\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"user-equation.js","sourceRoot":"","sources":["../../src/composition/user-equation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAiB,MAAM,iCAAiC,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAE9E,oFAAoF;AACpF,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IAC1C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAClC,CAAC;CACF;AAeD;;;;;;;;;;;GAWG;AACH,8EAA8E;AAC9E,MAAM,qBAAqB,GAAG,IAAI,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GAAG,cAAc,CAAC;QAC9D,YAAY;QACZ,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;KAC3D,CAAC;AACJ,CAAC","sourcesContent":["/**\n * User-equation injection — turn a free-form `TARGET = EXPR` string into a graph\n * junction (a target quantity + its source quantities), resolve the user's\n * symbols onto the catalog vocabulary, suggest near-misses, and report where the\n * injected junction lands in a built {@link VizModel}.\n *\n * Free-form means no dimensions: source quantities are the RHS's free variables\n * — extracted by the MathTS expression parser via {@link getFormulaParser},\n * which already drops constants like `pi`/`tau`, numbers, and functions —\n * minus the physics {@link CONSTANTS}. Multi-word quantities may be typed with\n * underscores **or** the catalog's own hyphens (`planck-length`): before parse,\n * {@link rewriteCatalogHyphens} rewrites kebab catalog names to underscores so\n * `-` is not read as subtraction (persona finding W2). Resolution still tries\n * the literal form first, then the `_`↔`-` swap.\n *\n * Pure: no file I/O. The injected junction is rendered as an `extraJunction`\n * (status `'user'`) and is never written into the catalog.\n *\n * @module composition/user-equation\n */\n\nimport { getFormulaParser, parsePhysics } from '../numerical/formula-registry.js';\nimport { formulaSymbolDimension } from '../numerical/formula-dimension.js';\nimport { CONSTANT_SPELLINGS } from '../dimensional/dimension-spec.js';\nimport { CONSTANTS } from '../dimensional/symbolic-constants.js';\nimport { formulaNameDimensions } from '../dimensional/formula-names.js';\nimport { naturalNote, naturalPowers, type UnitMode } from '../dimensional/natural-units.js';\nimport { aliasesForTarget, editDistance } from './aliases.js';\nimport { resolveQuantityName } from '../dimensional/formula-names.js';\nimport { CATALOG_GRAPH } from './catalog-graph.js';\nimport type { VizModel, VizJunction } from './graph-viz.js';\nimport type { Dimension } from '../dimensional/types.js';\nimport { DIMENSIONLESS } from '../dimensional/types.js';\nimport { equals } from '../dimensional/algebra.js';\nimport { inferUnknownDimension } from '../dimensional/dimension-inference.js';\n\n/** Thrown when a user equation cannot be parsed into a target + sources. @public */\nexport class UserEquationError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'UserEquationError';\n }\n}\n\n/**\n * A parsed user equation: the target quantity and its source quantities, as\n * written (underscores preserved; constants/numbers/functions removed).\n *\n * @public\n */\nexport interface UserEquation {\n readonly target: string;\n readonly sources: readonly string[];\n /** The original `TARGET = EXPR` text, for the junction label. */\n readonly text: string;\n}\n\n/**\n * Parse `TARGET = EXPR` into `{ target, sources }`. The target is the text left\n * of the first `=`; the sources are the RHS's free variables minus the physics\n * constants.\n *\n * Uses the active formula parser (MathTS when installed, built-in otherwise) to\n * extract the RHS's free variables.\n *\n * @throws {UserEquationError} on a missing `=`, an empty target, an unparseable\n * RHS, or an RHS with no source quantities.\n * @public\n */\n/** Upper bound on user `--equation` text to keep hint computation bounded. */\nconst MAX_USER_EQUATION_LEN = 8192;\n\nimport { rewriteCatalogHyphens } from '../dimensional/hyphen-names.js';\n/** Rewrite a catalog hyphenated name to underscores before the expression parse. */\nexport { rewriteCatalogHyphens };\n\n/** A hyphen-joined run of names, `a-b` or `a-b-c`, not the exponent of `1e-5`. */\nconst HYPHEN_RUN = /(?<![A-Za-z0-9_.])[A-Za-z_][A-Za-z0-9_]*(?:-[A-Za-z0-9_]+)+/g;\n\n/**\n * When the parse read a hyphen-joined run (`thermal-mass`) as a subtraction of\n * its pieces, and the run read as one name is a catalog quantity, tell the user\n * `-` is arithmetic here and to use underscores. Persona finding I2.\n *\n * Decided from the parse, not from an error's text: `variables` are the free\n * variables the formula parser read from `rhs`. The parser has no hyphenated\n * identifier, so a run whose underscored name is not a variable and whose\n * pieces are was parsed as a subtraction.\n *\n * @internal\n */\nexport function hyphenSubtractHint(\n rhs: string,\n variables: readonly string[],\n catalogNames: ReadonlySet<string>,\n): string | null {\n const read = new Set(variables);\n const split = (rhs.match(HYPHEN_RUN) ?? []).filter(\n (run) =>\n !read.has(run.replace(/-/g, '_')) &&\n run.split('-').some((piece) => read.has(piece)) &&\n resolveQuantityName(run, catalogNames) !== null,\n );\n if (split.length === 0) return null;\n const example = split.sort((a, b) => b.length - a.length)[0]!;\n return (\n `'-' is arithmetic here; multi-word catalog names use underscores ` +\n `(${example} → ${example.replace(/-/g, '_')})`\n );\n}\n\n/**\n * Spellings that must not be a bare `e`. Constant aliases come from\n * {@link CONSTANT_SPELLINGS}. `1-eccentricity^2` is the perihelion factor\n * `one_minus_e_sq`.\n */\nfunction rewriteFormulaSpellings(text: string): string {\n let out = text;\n for (const { names } of CONSTANT_SPELLINGS) {\n const canonical = names[0]!;\n for (const alias of names.slice(1)) {\n if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(alias)) continue;\n out = out.replace(new RegExp(`(?<![A-Za-z0-9_])${alias}(?![A-Za-z0-9_])`, 'g'), canonical);\n }\n }\n return out.replace(\n /(?<![A-Za-z0-9_])1\\s*-\\s*eccentricity\\s*(?:\\^|\\*\\*)\\s*2(?![A-Za-z0-9_])/g,\n 'one_minus_e_sq',\n );\n}\n\n/** Options for {@link analyzeUserEquation}. @internal */\nexport interface AnalyzeUserEquationOptions {\n /**\n * Bind a one-letter token that is itself a catalog quantity (`a`, `r`, …).\n * Default false: the match is reported and not applied. The alias `T` →\n * `temperature` is not a one-letter catalog name and still binds.\n */\n readonly bindShortNames?: boolean;\n /** Reconcile a dimension difference by powers of c, ħ, and (geometrized) G. */\n readonly units?: Exclude<UnitMode, 'si'>;\n}\n\nfunction withFormulaNames(catalog: ReadonlyMap<string, Dimension>): Map<string, Dimension> {\n const out = new Map(catalog);\n for (const [name, dim] of formulaNameDimensions()) {\n if (!out.has(name)) out.set(name, dim);\n }\n return out;\n}\n\nexport async function parseUserEquation(\n equation: string,\n catalogNames?: ReadonlySet<string> | Iterable<string>,\n): Promise<UserEquation> {\n if (equation.length > MAX_USER_EQUATION_LEN) {\n throw new UserEquationError(\n `equation exceeds ${MAX_USER_EQUATION_LEN} characters (${equation.length})`,\n );\n }\n // Materialized once: an iterator (`map.keys()`) would be spent by the first use.\n const names = catalogNames === undefined ? undefined : new Set(catalogNames);\n const spelled = rewriteFormulaSpellings(equation);\n const rewritten = names === undefined ? spelled : rewriteCatalogHyphens(spelled, names);\n const eqIdx = rewritten.indexOf('=');\n if (eqIdx < 0) {\n throw new UserEquationError(\n `equation must be \"TARGET = EXPR\" (no \"=\" found in '${equation}')`,\n );\n }\n const target = rewritten.slice(0, eqIdx).trim();\n if (!target) throw new UserEquationError('equation has an empty target (left of \"=\")');\n const rhs = rewritten.slice(eqIdx + 1).trim();\n if (!rhs) throw new UserEquationError('equation has an empty right-hand side');\n\n let variables: readonly string[];\n try {\n const parser = await getFormulaParser();\n ({ variables } = parser.parse(rhs));\n } catch (e) {\n // No parse tree, so no subtraction was read: the hyphen hint needs the parsed variables.\n throw new UserEquationError(`could not parse the right-hand side '${rhs}': ${(e as Error).message}`);\n }\n const sources = variables.filter(\n (v) => !Object.prototype.hasOwnProperty.call(CONSTANTS, v),\n );\n // An all-constant right-hand side (the Planck length) is an equation about a catalog quantity\n // only when its target is one; otherwise it names nothing to check (persona finding W5).\n const targetIsCatalog = names !== undefined && resolveQuantityName(target, names) !== null;\n if (sources.length === 0 && !targetIsCatalog) {\n throw new UserEquationError(\n `no source quantities in '${rhs}' (only constants/numbers?)`,\n );\n }\n return { target, sources, text: rewritten.trim() };\n}\n\n/** Normalize for comparison: lowercase, `_`/`-` unified. */\nconst normalizeForCompare = (s: string): string => s.toLowerCase().replace(/[_-]/g, '-');\n\n/** The shortest name that counts as contained in another for the \"did you mean?\" ranking. */\nconst MIN_CONTAINED = 3;\n\n/**\n * The one \"did you mean?\" ranking, shared by {@link suggestQuantities} and\n * {@link suggestByDimension}: edit distance first, then containment (one name\n * inside the other), then length, then name. Edit distance leads so a one-edit\n * typo beats a substring: `hawkng-temperature` → `hawking-temperature` before\n * `temperature` (persona finding N5). `gate` keeps a candidate only if one name\n * contains the other (the contained one at least three characters long) or the\n * distance is small against the query length; the\n * dimension-based caller passes `false`, because there the dimension is the evidence.\n */\nfunction rankByName(name: string, candidates: Iterable<string>, gate: boolean): string[] {\n const needle = normalizeForCompare(name);\n // Without the gate, short catalog names (`a`, `nu`) are spurious \"matches\" for any typo.\n const maxDist = Math.max(1, Math.ceil(needle.length / 2));\n // A contained name counts only from MIN_CONTAINED characters: every one-letter name occurs inside\n // a long input (`schrodinger-equation` holds a, g, q, r), and that is not nearness (audit I5).\n const within = (outer: string, inner: string): boolean => inner.length >= MIN_CONTAINED && outer.includes(inner);\n return [...candidates]\n .map((cand) => {\n const hay = normalizeForCompare(cand);\n const contains = within(hay, needle) || within(needle, hay) ? 0 : 1;\n return { cand, contains, dist: editDistance(needle, hay) };\n })\n .filter((s) => !gate || s.contains === 0 || s.dist <= maxDist)\n .sort(\n (x, y) =>\n x.dist - y.dist ||\n x.contains - y.contains ||\n x.cand.length - y.cand.length ||\n x.cand.localeCompare(y.cand),\n )\n .map((s) => s.cand);\n}\n\n/**\n * Up to `k` catalog names most similar to `name` — the \"did you mean?\" set for an\n * unmatched user symbol. Ranked by edit distance first, then containment, then\n * length (the shared ranking of `upt map` and `upt explain`).\n *\n * @public\n */\nexport function suggestQuantities(\n name: string,\n catalogNames: Iterable<string>,\n k = 5,\n): string[] {\n return rankByName(name, catalogNames, true).slice(0, k);\n}\n\n/**\n * Catalog quantity names whose dimension equals `dim`, capped at `k` — the\n * dimension-based \"did you mean?\" set once an unknown symbol's dimension has\n * been inferred. With `near` (the unknown symbol) they are ranked by the same\n * edit-distance ranking as {@link suggestQuantities}, so `lenght` lists `length`\n * first (persona finding N2); without it they are sorted by name.\n *\n * @public\n */\nexport function suggestByDimension(\n dim: Dimension,\n catalogDims: ReadonlyMap<string, Dimension>,\n k = 5,\n near?: string,\n): string[] {\n const same = [...catalogDims.entries()].filter(([, d]) => equals(d, dim)).map(([name]) => name);\n return (near === undefined ? same.sort() : rankByName(near, same, false)).slice(0, k);\n}\n\n/**\n * Where the injected user junction landed, computed from a built `VizModel`.\n *\n * @public\n */\nexport interface EquationLanding {\n readonly isolated: boolean;\n /** Junctions in the user equation's connected component (including itself). */\n readonly clusterSize: number;\n /** The component holds a law/established junction (anchored to known physics). */\n readonly anchored: boolean;\n /** User-equation quantities that also appear in a neighbouring junction. */\n readonly sharedQuantities: readonly string[];\n /** Other junction ids in the user equation's component. */\n readonly connectedJunctionIds: readonly string[];\n}\n\n/**\n * Describe where `userJunctionId` sits in `model`: its component, the junctions it\n * connects to, and the quantities that link it to them.\n *\n * @public\n */\nexport function equationLanding(model: VizModel, userJunctionId: string): EquationLanding {\n const cluster = model.clusters.find((c) => c.junctionIds.includes(userJunctionId));\n const self = model.junctions.find((j) => j.id === userJunctionId);\n if (!cluster || !self) {\n return { isolated: true, clusterSize: 1, anchored: false, sharedQuantities: [], connectedJunctionIds: [] };\n }\n const connectedJunctionIds = cluster.junctionIds.filter((id) => id !== userJunctionId);\n const selfQuantities = new Set([...self.sources, self.target]);\n const neighbourQuantities = new Set<string>();\n for (const j of model.junctions) {\n if (j.id === userJunctionId || !cluster.junctionIds.includes(j.id)) continue;\n for (const qn of [...j.sources, j.target]) neighbourQuantities.add(qn);\n }\n const sharedQuantities = [...selfQuantities].filter((qn) => neighbourQuantities.has(qn)).sort();\n return {\n isolated: cluster.size === 1,\n clusterSize: cluster.size,\n anchored: cluster.anchored,\n sharedQuantities,\n connectedJunctionIds,\n };\n}\n\n/**\n * One or two lines summarising `connects to:` (persona findings W3 / I3).\n * Dumping ~100 edge ids next to a correct pendulum equation made shared\n * `length`/`temperature` look like a physics claim. Rank by overlap with the\n * user's shared quantities first, then textbook/law over bridges, then name.\n * When the list is long, state the structural caveat explicitly.\n *\n * @internal\n */\nexport function formatConnectedSummary(\n model: VizModel,\n landing: EquationLanding,\n maxShow = 5,\n): readonly string[] {\n const ids = landing.connectedJunctionIds;\n if (ids.length === 0) return [];\n const shared = new Set(landing.sharedQuantities);\n const byId = new Map(model.junctions.map((j) => [j.id, j]));\n const tier = (id: string): number =>\n id.startsWith('CE-') || id.startsWith('law-') ? 0 : id.startsWith('be-') ? 1 : 2;\n const overlap = (id: string): number => {\n const j = byId.get(id);\n if (!j) return 0;\n let n = 0;\n for (const qn of [...j.sources, j.target]) if (shared.has(qn)) n++;\n return n;\n };\n const ranked = [...ids].sort(\n (a, b) => overlap(b) - overlap(a) || tier(a) - tier(b) || a.localeCompare(b),\n );\n const shown = ranked.slice(0, maxShow);\n const more = ranked.length - shown.length;\n if (more <= 0) {\n return [` nearest equations: ${shown.join(', ')}`];\n }\n return [\n ` nearest equations: ${shown.join(', ')} (+${more} more)`,\n ' (shared-quantity connectivity, not a physics claim)',\n ];\n}\n\n/** A \"did you mean?\" suggestion for an unmatched symbol. */\nexport interface EquationHint {\n readonly name: string;\n readonly suggestions: readonly string[];\n /** True when the suggestions come from the symbol's INFERRED dimension. */\n readonly byDimension: boolean;\n /**\n * Registered constants that carry the symbol's inferred dimension (`sigma` → `sigma_sb`,\n * persona finding L5). Present only when a dimension was inferred and it is not dimensionless.\n */\n readonly constants?: readonly string[];\n}\n\n/** A one-letter user name bound to a catalog quantity (persona finding W6). */\nexport interface ShortBinding {\n readonly name: string;\n readonly quantity: string;\n readonly dim: Dimension;\n /**\n * Present and false when a one-letter catalog name was recognised and not\n * applied. Omitted when the name was bound.\n */\n readonly bound?: false;\n}\n\n/**\n * Full analysis of a user equation against a catalog name→dimension map: the\n * `user` junction (for the graph), the dimensional verdict (RHS dimension vs the\n * target's catalog dimension), and \"did you mean?\" hints (dimension-based when a\n * single unknown's dimension can be inferred, else name-similarity).\n *\n * Physics constants (`hbar`, `c`, `k_B`, …) are supplied to the parser with\n * their real dimensions (from `CONSTANTS`) so the dimensional check is correct.\n *\n * @public\n */\nexport interface EquationAnalysis {\n readonly junction: VizJunction;\n /** Set when the RHS is not dimensionally well-formed (then dims are null). */\n readonly parseError: string | null;\n readonly rhsDimension: Dimension | null;\n readonly targetDimension: Dimension | null;\n /** rhsDimension === targetDimension; null when unknowable or parse failed. */\n readonly consistent: boolean | null;\n readonly hints: readonly EquationHint[];\n /**\n * One-letter names that resolved to a catalog quantity. A one-letter name is the likeliest to\n * mean something else: the catalog's `a` is perihelion's semi-major axis, a length, and the\n * Unruh formula's `a` is an acceleration (persona finding W6).\n */\n readonly shortBindings: readonly ShortBinding[];\n /**\n * RHS names given a dimensionless placeholder because they did not resolve.\n * The reported RHS dimension treats them as dimensionless, so it is not a\n * check of the formula until they are bound.\n */\n readonly placeholders: readonly string[];\n /** Set when `--natural` / `--geometrized` reconciled the two dimensions. */\n readonly naturalNote?: string;\n}\n\n/**\n * Parse + dimensionally analyze a user `TARGET = EXPR` against `catalogDims`\n * (catalog quantity name → dimension). Throws {@link UserEquationError} on a\n * structurally malformed equation; reports a dimensional malformation via\n * `parseError`.\n *\n * @public\n */\nexport async function analyzeUserEquation(\n equation: string,\n catalogDims: ReadonlyMap<string, Dimension>,\n options?: AnalyzeUserEquationOptions,\n): Promise<EquationAnalysis> {\n const dimsIn = withFormulaNames(catalogDims);\n const catalogNames = new Set(dimsIn.keys());\n const bindShort = options?.bindShortNames === true;\n // W2: rewrite catalog kebabs before either parser sees `-` as subtraction.\n const eq = await parseUserEquation(equation, catalogNames);\n const literalShort = (n: string): string | null =>\n n.length === 1 && catalogNames.has(n) ? n : null;\n const resolveCatalog = (n: string): string | null => {\n if (!bindShort && literalShort(n) !== null) return null;\n return resolveQuantityName(n, catalogNames);\n };\n // Evaluate keys are aliases of this target's sources. `R` is reflectance\n // on radiation-pressure and is not a global name.\n const aliasMap = aliasesForTarget(CATALOG_GRAPH, resolveCatalog(eq.target) ?? '');\n const resolve = (n: string): string | null => {\n if (!bindShort && literalShort(n) !== null) return null;\n return resolveQuantityName(n, catalogNames, aliasMap);\n };\n\n // dims for parsePhysics: physics constants carry their REAL dimensions; matched\n // sources their catalog dimension; the (≤1) unmatched source a DIMENSIONLESS\n // placeholder so the RHS still parses.\n const dims: Record<string, Dimension> = {};\n for (const [name, c] of Object.entries(CONSTANTS)) dims[name] = c.dim;\n for (const s of eq.sources) {\n const r = resolve(s);\n dims[s] = r ? (dimsIn.get(r) as Dimension) : (formulaSymbolDimension(s) ?? DIMENSIONLESS);\n }\n // Use the rewritten equation's RHS (eq.text) so planck-length has already\n // become planck_length before dimensional parse.\n const rhsText = eq.text.slice(eq.text.indexOf('=') + 1);\n\n let rhsDimension: Dimension | null = null;\n let exprForInference: import('../dimensional/validator.js').ExprNode | null = null;\n let parseError: string | null = null;\n try {\n const parsed = await parsePhysics(rhsText, dims);\n rhsDimension = parsed.dimension;\n exprForInference = parsed.expr;\n } catch (e) {\n const msg = e instanceof Error ? e.message : String(e);\n // The formula parser already read this right-hand side (parseUserEquation), so its variables are the tree's.\n const { variables } = (await getFormulaParser()).parse(rhsText);\n const hint = hyphenSubtractHint(rhsText, variables, catalogNames);\n parseError = hint ? `${msg}. ${hint}` : msg;\n }\n\n const resolvedTarget = resolve(eq.target);\n const targetDimension = resolvedTarget ? (dimsIn.get(resolvedTarget) as Dimension) : null;\n\n const placeholders = eq.sources.filter((s) => !resolve(s));\n const hints: EquationHint[] = [];\n if (exprForInference) {\n const unmatchedSources = placeholders.filter((s) => bindShort || literalShort(s) === null);\n const totalUnmatched = placeholders.length + (resolvedTarget ? 0 : 1);\n for (const s of unmatchedSources) {\n let byDim: string[] | null = null;\n let constants: string[] = [];\n if (targetDimension && totalUnmatched === 1) {\n const inferred = inferUnknownDimension(exprForInference, s, targetDimension);\n if (inferred) {\n byDim = suggestByDimension(inferred, dimsIn, 5, s);\n if (!equals(inferred, DIMENSIONLESS)) {\n constants = Object.entries(CONSTANTS)\n .filter(([, c]) => equals(c.dim, inferred))\n .map(([name]) => name)\n .sort();\n }\n }\n }\n const withConstants = constants.length > 0 ? { constants } : {};\n hints.push(\n byDim\n ? { name: s, suggestions: byDim, byDimension: true, ...withConstants }\n : { name: s, suggestions: suggestQuantities(s, catalogNames, 5), byDimension: false, ...withConstants },\n );\n }\n if (!resolvedTarget && (bindShort || literalShort(eq.target) === null)) {\n hints.push({ name: eq.target, suggestions: suggestQuantities(eq.target, catalogNames, 5), byDimension: false });\n }\n }\n\n const declined = eq.sources\n .filter((s) => !bindShort && literalShort(s) !== null)\n .map((s) => ({ name: s, quantity: s, dim: dimsIn.get(s) as Dimension, bound: false as const }));\n const declinedTarget =\n !bindShort && literalShort(eq.target) !== null\n ? [{ name: eq.target, quantity: eq.target, dim: dimsIn.get(eq.target) as Dimension, bound: false as const }]\n : [];\n const boundShort = eq.sources\n .filter((s) => s.length === 1 && resolve(s) !== null)\n .map((s) => ({ name: s, quantity: resolve(s)!, dim: dimsIn.get(resolve(s)!) as Dimension }));\n\n let consistent = rhsDimension && targetDimension ? equals(rhsDimension, targetDimension) : null;\n let natural: string | undefined;\n if (\n consistent === false &&\n rhsDimension &&\n targetDimension &&\n options?.units !== undefined &&\n (hints.length === 0)\n ) {\n const powers = naturalPowers(rhsDimension, targetDimension, options.units);\n const note = powers === null ? null : naturalNote(powers, options.units);\n if (note) {\n consistent = true;\n natural = note;\n }\n }\n\n return {\n junction: {\n id: 'user-equation',\n label: eq.text,\n status: 'user',\n sources: eq.sources.map((s) => resolve(s) ?? s),\n target: resolvedTarget ?? eq.target,\n },\n parseError,\n rhsDimension,\n targetDimension,\n consistent,\n hints,\n shortBindings: [...declined, ...boundShort, ...declinedTarget],\n placeholders,\n ...(natural === undefined ? {} : { naturalNote: natural }),\n };\n}\n"]}
@@ -23,16 +23,20 @@
23
23
  */
24
24
  import type { UniversalIndex } from './universal-index.js';
25
25
  import type { PhysicalScale, Force, Symmetry, InformationMeasure } from './types.js';
26
- type ScaleAxes = {
26
+ /** The scale namespace of {@link AxesRegistry}: one index per `PhysicalScale`. @public */
27
+ export type ScaleAxes = {
27
28
  readonly [K in PhysicalScale]: UniversalIndex<'scale'>;
28
29
  };
29
- type ForceAxes = {
30
+ /** The force namespace of {@link AxesRegistry}: one index per `Force`. @public */
31
+ export type ForceAxes = {
30
32
  readonly [K in Force]: UniversalIndex<'force'>;
31
33
  };
32
- type SymmetryAxes = {
34
+ /** The symmetry namespace of {@link AxesRegistry}: one index per `Symmetry`. @public */
35
+ export type SymmetryAxes = {
33
36
  readonly [K in Symmetry]: UniversalIndex<'symmetry'>;
34
37
  };
35
- type InformationAxes = {
38
+ /** The information namespace of {@link AxesRegistry}: one index per `InformationMeasure`. @public */
39
+ export type InformationAxes = {
36
40
  readonly [K in InformationMeasure]: UniversalIndex<'information'>;
37
41
  };
38
42
  /**
@@ -63,5 +67,4 @@ export interface AxesRegistry {
63
67
  * @public
64
68
  */
65
69
  export declare const Axes: AxesRegistry;
66
- export {};
67
70
  //# sourceMappingURL=axes-registry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"axes-registry.d.ts","sourceRoot":"","sources":["../../src/core/axes-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EACV,aAAa,EACb,KAAK,EACL,QAAQ,EACR,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAOpB,KAAK,SAAS,GAAG;IAAE,QAAQ,EAAE,CAAC,IAAI,aAAa,GAAG,cAAc,CAAC,OAAO,CAAC;CAAE,CAAC;AAC5E,KAAK,SAAS,GAAG;IAAE,QAAQ,EAAE,CAAC,IAAI,KAAK,GAAG,cAAc,CAAC,OAAO,CAAC;CAAE,CAAC;AACpE,KAAK,YAAY,GAAG;IAAE,QAAQ,EAAE,CAAC,IAAI,QAAQ,GAAG,cAAc,CAAC,UAAU,CAAC;CAAE,CAAC;AAC7E,KAAK,eAAe,GAAG;IACrB,QAAQ,EAAE,CAAC,IAAI,kBAAkB,GAAG,cAAc,CAAC,aAAa,CAAC;CAClE,CAAC;AAEF;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,WAAW,EAAE,eAAe,CAAC;CACvC;AAoCD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,IAAI,EAAE,YAKjB,CAAC"}
1
+ {"version":3,"file":"axes-registry.d.ts","sourceRoot":"","sources":["../../src/core/axes-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EACV,aAAa,EACb,KAAK,EACL,QAAQ,EACR,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAOpB,0FAA0F;AAC1F,MAAM,MAAM,SAAS,GAAG;IAAE,QAAQ,EAAE,CAAC,IAAI,aAAa,GAAG,cAAc,CAAC,OAAO,CAAC;CAAE,CAAC;AACnF,kFAAkF;AAClF,MAAM,MAAM,SAAS,GAAG;IAAE,QAAQ,EAAE,CAAC,IAAI,KAAK,GAAG,cAAc,CAAC,OAAO,CAAC;CAAE,CAAC;AAC3E,wFAAwF;AACxF,MAAM,MAAM,YAAY,GAAG;IAAE,QAAQ,EAAE,CAAC,IAAI,QAAQ,GAAG,cAAc,CAAC,UAAU,CAAC;CAAE,CAAC;AACpF,qGAAqG;AACrG,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE,CAAC,IAAI,kBAAkB,GAAG,cAAc,CAAC,aAAa,CAAC;CAClE,CAAC;AAEF;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,WAAW,EAAE,eAAe,CAAC;CACvC;AAoCD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,IAAI,EAAE,YAKjB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"axes-registry.js","sourceRoot":"","sources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zC,CAAC,CAAC;AAEH,MAAM,YAAY,GAAiB,MAAM,CAAC,MAAM,CAAC;IAC/C,QAAQ,EAAE,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC;IAC3C,KAAK,EAAE,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC;IACrC,SAAS,EAAE,SAAS,CAAC,UAAU,EAAE,WAAW,CAAC;IAC7C,IAAI,EAAE,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC;IACnC,QAAQ,EAAE,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC;CAC5C,CAAC,CAAC;AAEH,MAAM,eAAe,GAAoB,MAAM,CAAC,MAAM,CAAC;IACrD,UAAU,EAAE,SAAS,CAAC,aAAa,EAAE,YAAY,CAAC;IAClD,OAAO,EAAE,SAAS,CAAC,aAAa,EAAE,SAAS,CAAC;IAC5C,UAAU,EAAE,SAAS,CAAC,aAAa,EAAE,YAAY,CAAC;IAClD,cAAc,EAAE,SAAS,CAAC,aAAa,EAAE,gBAAgB,CAAC;CAC3D,CAAC,CAAC;AAEH;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,IAAI,GAAiB,MAAM,CAAC,MAAM,CAAC;IAC9C,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,YAAY;IACtB,WAAW,EAAE,eAAe;CAC7B,CAAC,CAAC","sourcesContent":["/**\n * `Axes` singleton registry — module-load-stable `UniversalIndex`\n * references for every physics-axis value in `src/core/types.ts`.\n *\n * Phase 1 of v0.7 Proposal 1 (Intelligent Index Layer).\n *\n * Per Decision #4 (`docs/planning/v0.7-Proposal-1-Design.md`),\n * `Axes` is computed exactly once per Node process. Both the outer\n * namespace and each per-axis sub-object are `Object.freeze`d:\n * mutation attempts in strict mode throw `TypeError`. The values\n * inside are full `UniversalIndex<Axis>` objects (with stable\n * `id`s assigned at module load); same-object identity across\n * import sites is the load-bearing guarantee.\n *\n * Census basis: `docs/architecture/archive/v0.7-p1-baseline.md` Task 0.1.\n * - 4 scales × 5 forces × 5 symmetries × 4 information measures\n * = 18 stable references total\n * - dimension/topology axes are integer-valued and NOT enumerable\n * from `TensorConfig` — no `Axes.dimension` or `Axes.topology`\n * sub-namespace ships in v0.7.0\n *\n * @module core/axes-registry\n */\n\nimport { makeIndex } from './universal-index.js';\nimport type { UniversalIndex } from './universal-index.js';\nimport type {\n PhysicalScale,\n Force,\n Symmetry,\n InformationMeasure,\n} from './types.js';\n\n// ---------------------------------------------------------------------------\n// Per-namespace records — typed so consumers get autocompletion for\n// `Axes.scale.<quantum|mesoscopic|classical|cosmological>`, etc.\n// ---------------------------------------------------------------------------\n\n/** The scale namespace of {@link AxesRegistry}: one index per `PhysicalScale`. @public */\nexport type ScaleAxes = { readonly [K in PhysicalScale]: UniversalIndex<'scale'> };\n/** The force namespace of {@link AxesRegistry}: one index per `Force`. @public */\nexport type ForceAxes = { readonly [K in Force]: UniversalIndex<'force'> };\n/** The symmetry namespace of {@link AxesRegistry}: one index per `Symmetry`. @public */\nexport type SymmetryAxes = { readonly [K in Symmetry]: UniversalIndex<'symmetry'> };\n/** The information namespace of {@link AxesRegistry}: one index per `InformationMeasure`. @public */\nexport type InformationAxes = {\n readonly [K in InformationMeasure]: UniversalIndex<'information'>;\n};\n\n/**\n * Outer registry shape. Frozen at module load; per-namespace\n * sub-objects also frozen.\n *\n * @public\n */\nexport interface AxesRegistry {\n readonly scale: ScaleAxes;\n readonly force: ForceAxes;\n readonly symmetry: SymmetryAxes;\n readonly information: InformationAxes;\n}\n\n// ---------------------------------------------------------------------------\n// Registry construction — one makeIndex call per member, frozen\n// ---------------------------------------------------------------------------\n\nconst scaleAxes: ScaleAxes = Object.freeze({\n quantum: makeIndex('scale', 'quantum'),\n mesoscopic: makeIndex('scale', 'mesoscopic'),\n classical: makeIndex('scale', 'classical'),\n cosmological: makeIndex('scale', 'cosmological'),\n});\n\nconst forceAxes: ForceAxes = Object.freeze({\n gravitational: makeIndex('force', 'gravitational'),\n electromagnetic: makeIndex('force', 'electromagnetic'),\n weak: makeIndex('force', 'weak'),\n strong: makeIndex('force', 'strong'),\n emergent: makeIndex('force', 'emergent'),\n});\n\nconst symmetryAxes: SymmetryAxes = Object.freeze({\n poincare: makeIndex('symmetry', 'poincare'),\n gauge: makeIndex('symmetry', 'gauge'),\n conformal: makeIndex('symmetry', 'conformal'),\n susy: makeIndex('symmetry', 'susy'),\n emergent: makeIndex('symmetry', 'emergent'),\n});\n\nconst informationAxes: InformationAxes = Object.freeze({\n vonNeumann: makeIndex('information', 'vonNeumann'),\n shannon: makeIndex('information', 'shannon'),\n kolmogorov: makeIndex('information', 'kolmogorov'),\n quantumDiscord: makeIndex('information', 'quantumDiscord'),\n});\n\n/**\n * The canonical `Axes` registry. Same object across all import\n * sites; entry references stable across all reads.\n *\n * Usage:\n * import { Axes } from 'universal-physics-tensor';\n * const myIdx = Axes.scale.quantum; // UniversalIndex<'scale'>\n *\n * Two `LabeledTensor`s contracting on `Axes.scale.quantum` produce\n * a contraction. Two fresh `makeIndex('scale', 'quantum')` calls are\n * different ids: `contract` throws `IndexNameMismatchError` and names\n * both ids. Use the registry for shared identity (Decision #4).\n *\n * @public\n */\nexport const Axes: AxesRegistry = Object.freeze({\n scale: scaleAxes,\n force: forceAxes,\n symmetry: symmetryAxes,\n information: informationAxes,\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"cell.js","sourceRoot":"","sources":["../../src/core/cell.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AA+GH,8EAA8E;AAC9E,qDAAqD;AACrD,8EAA8E;AAC9E,yEAAyE;AACzE,oEAAoE;AACpE,sEAAsE;AACtE,EAAE;AACF,0EAA0E;AAC1E,wEAAwE;AACxE,uEAAuE;AACvE,yEAAyE;AACzE,yEAAyE;AACzE,yEAAyE;AACzE,qEAAqE;AACrE,yEAAyE;AACzE,sEAAsE;AACtE,yEAAyE;AACzE,qEAAqE;AACrE,iC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;QACZ,QAAQ;QACR,UAAU,EAAE,sBAAsB,CAAC,CAAC,CAAC,UAAU,CAAC;QAChD,KAAK,EAAE,CAAC,CAAC,KAAK;QACd,OAAO,EAAE,CAAC,CAAC,OAAO;QAClB,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACxC,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Typed `Cell` discriminated union for `UniversalTensor`'s cell storage.\n *\n * Three variants — `LawCell`, `BridgeCell`, `EmergenceCell` — each\n * carrying a `kind` discriminator that lets TypeScript narrow to the\n * specific variant at every consumption site. Mirrors the v0.6.1\n * validator-registry's discriminated-union pattern at\n * `src/dimensional/validator-registry.ts`.\n *\n * Design doc: `docs/planning/v0.7-Proposal-3-Design.md`.\n * Review findings: `docs/planning/v0.7-Proposal-3-Review-Findings.md`.\n *\n * Migration relationship to `src/core/types.ts`:\n * - `PhysicalLaw` ↔ `LawCell` (field-shape faithful; `confidence`\n * flips `number` → string-literal union)\n * - `BridgeEquation` ↔ `BridgeCell` (same migration)\n * - `EmergentPhenomenon` ↔ `EmergenceCell` (same migration)\n *\n * The old interfaces are NOT deleted and NOT `@deprecated`-tagged in\n * this sprint (per Eve-R2 + the Phase 0 consumer-import census:\n * 4 in-repo sites still use them). A future v0.7.x sprint migrates\n * those consumers and then adds `@deprecated`.\n *\n * **No `confidenceToStatus` adapter is shipped** (per Eve-R3). The\n * 42-bridge catalog has BOTH a numeric `confidence` AND a curated\n * string `status` field, set independently; an adapter would\n * produce labels that contradict the catalog curation\n * (e.g. `status: 'established'` + `confidence: 0.7` → adapter\n * returns `'speculative'`). Callers must pass the string explicitly\n * at cell-construction sites.\n *\n * @module core/cell\n */\n\nimport type {\n PhysicalScale,\n Force,\n Symmetry,\n InformationMeasure,\n TensorIndices,\n PhysicalLaw,\n BridgeEquation,\n EmergentPhenomenon,\n} from './types.js';\n\n/**\n * Epistemic confidence vocabulary for `Cell` variants. Matches the\n * `'established' | 'speculative' | 'highly-speculative'` portion of\n * `BridgeEquationStatus` from `src/bridges/index.ts:42-46`, minus\n * `'invalid'` — cells in the tensor are by definition active; invalid\n * catalog entries should not be added.\n *\n * @public\n */\nexport type CellConfidence =\n | 'established'\n | 'speculative'\n | 'highly-speculative';\n\n/**\n * Fields common to every `Cell` variant. Each variant extends this\n * with a `kind` discriminator and variant-specific fields. The\n * `equation` field carries LaTeX-formatted mathematical content\n * (matching the existing `PhysicalLaw.equation` / `BridgeEquation.\n * equation` convention).\n *\n * @public\n */\nexport interface CellBase {\n /** Unique identifier within the parent `UniversalTensor`. */\n readonly id: string;\n\n /** Epistemic confidence vocabulary (see `CellConfidence`). */\n readonly confidence: CellConfidence;\n\n /** Mathematical formulation (LaTeX). */\n readonly equation: string;\n}\n\n/**\n * Cell variant representing a known physical law. 1:1 field-shape\n * correspondence with `PhysicalLaw` from `src/core/types.ts:88`,\n * except `confidence` is the string vocabulary (not `number`) and\n * the discriminator `kind: 'law'` is added.\n *\n * @public\n */\nexport interface LawCell extends CellBase {\n readonly kind: 'law';\n readonly name: string;\n readonly scales: ReadonlyArray<PhysicalScale>;\n readonly forces: ReadonlyArray<Force>;\n readonly symmetries: ReadonlyArray<Symmetry>;\n readonly informationMeasures?: ReadonlyArray<InformationMeasure>;\n readonly dimensions?: ReadonlyArray<number>;\n readonly topologies?: ReadonlyArray<number>;\n readonly references?: ReadonlyArray<string>;\n}\n\n/**\n * Cell variant representing a bridge equation between regimes. 1:1\n * field-shape correspondence with `BridgeEquation` from\n * `src/core/types.ts:126`, except `confidence` is the string\n * vocabulary and the discriminator `kind: 'bridge'` is added.\n *\n * @public\n */\nexport interface BridgeCell extends CellBase {\n readonly kind: 'bridge';\n readonly name: string;\n readonly source: TensorIndices;\n readonly target: TensorIndices;\n readonly validated: boolean;\n readonly description: string;\n}\n\n/**\n * Cell variant representing an emergent phenomenon. 1:1 field-shape\n * correspondence with `EmergentPhenomenon` from `src/core/types.ts:155`,\n * except `confidence` is the string vocabulary and the discriminator\n * `kind: 'emergence'` is added. Note: the old interface uses\n * `description` for the mathematical content; `EmergenceCell` carries\n * it as both `equation` (inherited from `CellBase`, mandatory) and\n * `description` (kept for prose-context fidelity, optional).\n *\n * @public\n */\nexport interface EmergenceCell extends CellBase {\n readonly kind: 'emergence';\n readonly name: string;\n readonly order: number;\n readonly indices: ReadonlyArray<TensorIndices>;\n readonly description?: string;\n}\n\n/**\n * The disjoint union of all `Cell` variants. Consumers narrow via\n * `switch (cell.kind)` with an exhaustive `_exhaustive: never` arm.\n *\n * @public\n */\nexport type Cell = LawCell | BridgeCell | EmergenceCell;\n\n// ---------------------------------------------------------------------------\n// Inverse adapters (legacy interface → Cell variant)\n// ---------------------------------------------------------------------------\n// Used by UniversalTensor.populatedCells() (Phase 2 Task 2.1) to resolve\n// stored cell-IDs back to Cell objects. Counterparts to the forward\n// adapters (cellToLaw / cellToBridge / cellToEmergence) at tensor.ts.\n//\n// The numeric `confidence: number` from the legacy interfaces is bucketed\n// back into the string vocabulary via `numberToCellConfidence`. This is\n// the lossy direction Eve-R3 flagged — but in THIS direction, the call\n// site is \"we have a legacy entry that was already in the tensor; bucket\n// its numeric confidence into the closest string label\". Per Decision #6\n// fan-out semantics, this can only happen for entries that round-tripped\n// through `addCell` (where the original string was authoritative) OR\n// entries added via the legacy `addLaw`/`addBridge`/`addEmergence` paths\n// (where the consumer chose a number directly). The bucketing matches\n// the forward `statusToConfidenceNumber` in tensor.ts: 0.95→established,\n// 0.6→speculative, 0.3→highly-speculative; thresholds chosen to make\n// the standard round-trip exact.\n\n/**\n * Inverse of `statusToConfidenceNumber` at tensor.ts:48-58. Buckets a\n * numeric confidence in [0,1] back to the string vocabulary. Used by\n * the inverse adapters below.\n *\n * @internal\n */\nfunction numberToCellConfidence(n: number): CellConfidence {\n if (n >= 0.8) return 'established';\n if (n >= 0.4) return 'speculative';\n return 'highly-speculative';\n}\n\n/**\n * Adapter: `PhysicalLaw` (legacy) → `LawCell`. Used by\n * `UniversalTensor.populatedCells()`.\n *\n * @internal\n */\nexport function lawToCell(law: PhysicalLaw): LawCell {\n return {\n kind: 'law',\n id: law.id,\n name: law.name,\n equation: law.equation,\n confidence: numberToCellConfidence(law.confidence),\n scales: law.scales,\n forces: law.forces,\n symmetries: law.symmetries,\n ...(law.informationMeasures ? { informationMeasures: law.informationMeasures } : {}),\n ...(law.dimensions ? { dimensions: law.dimensions } : {}),\n ...(law.topologies ? { topologies: law.topologies } : {}),\n ...(law.references ? { references: law.references } : {}),\n };\n}\n\n/**\n * Adapter: `BridgeEquation` (legacy) → `BridgeCell`. Used by\n * `UniversalTensor.populatedCells()`.\n *\n * @internal\n */\nexport function bridgeToCell(b: BridgeEquation): BridgeCell {\n return {\n kind: 'bridge',\n id: b.id,\n name: b.name,\n equation: b.equation,\n confidence: numberToCellConfidence(b.confidence),\n source: b.source,\n target: b.target,\n validated: b.validated,\n description: b.description,\n };\n}\n\n/**\n * Adapter: `EmergentPhenomenon` (legacy) → `EmergenceCell`. The\n * legacy `description` field holds the mathematical content (LaTeX);\n * we surface it as `equation` and leave `description` undefined\n * unless the legacy entry had a \"math\\n\\nprose\" split (per the\n * forward `cellToEmergence` adapter convention).\n *\n * @internal\n */\nexport function emergenceToCell(p: EmergentPhenomenon): EmergenceCell {\n // Split convention: if description contains \"\\n\\n\", treat the part\n // before as equation and after as prose; otherwise the whole field\n // is the equation.\n const splitIdx = p.description.indexOf('\\n\\n');\n const equation = splitIdx === -1 ? p.description : p.description.slice(0, splitIdx);\n const description = splitIdx === -1 ? undefined : p.description.slice(splitIdx + 2);\n\n return {\n kind: 'emergence',\n id: p.id,\n name: p.name,\n equation,\n confidence: numberToCellConfidence(p.confidence),\n order: p.order,\n indices: p.indices,\n ...(description ? { description } : {}),\n };\n}\n"]}
@@ -1,11 +1,9 @@
1
1
  /**
2
- * Canonical CODATA 2018 + SI-defined physical constants for UPT (v0.5.1).
2
+ * Canonical CODATA 2018 + SI-defined physical constants for UPT.
3
3
  *
4
- * Single source of truth for fundamental physical constants used across the
5
- * numerical, dimensional, and bridge layers. Replaces the truncated local
6
- * literals (`c_SI = 2.998e8`, etc.) that drifted across `src/numerical/`,
7
- * `src/bridges/`, and `tests/fixtures/` — see audit `PC-1` in
8
- * `docs/architecture/archive/v0.5.1-audit.md`.
4
+ * The one owner of every fundamental physical constant used across the
5
+ * numerical, dimensional, and bridge layers; `tests/core/constants-owner.test.ts`
6
+ * fails on a second copy of any of these decimals elsewhere under `src/`.
9
7
  *
10
8
  * Values use:
11
9
  * • Exact-SI definitions (`C_SI`, `H_SI`, `K_B_SI`, `E_SI`) where the
@@ -27,6 +25,8 @@
27
25
  */
28
26
  /** Speed of light in vacuum (m/s). Exact SI definition since 1983. */
29
27
  export declare const C_SI = 299792458;
28
+ /** Rydberg constant R∞ (infinite nuclear mass), CODATA 2018: 10 973 731.568 160(21) m⁻¹. */
29
+ export declare const R_INF_SI = 10973731.56816;
30
30
  /** Newtonian gravitational constant (m³ kg⁻¹ s⁻²). CODATA 2018. */
31
31
  export declare const G_SI = 6.6743e-11;
32
32
  /** Planck constant (J·s). Exact SI definition since 2019. */
@@ -83,6 +83,8 @@ export declare const VON_KLITZING_SI: number;
83
83
  export declare const JOSEPHSON_CONSTANT_SI: number;
84
84
  /** Lorenz number L = (π²/3) (k_B/e)² (W Ω K⁻²). */
85
85
  export declare const LORENZ_NUMBER_SI: number;
86
+ /** Euler–Mascheroni constant γ. The BCS gap is π k_B T_c / e^γ; the formula name is `euler_gamma`. */
87
+ export declare const EULER_GAMMA = 0.5772156649015329;
86
88
  /** Weak-coupling BCS gap ratio 2Δ(0)/(k_B T_c) = 2π e^{−γ}. */
87
89
  export declare const BCS_GAP_RATIO: number;
88
90
  /** Lane-Emden n=3 dimensionless radius used by the white-dwarf mass. */
@@ -107,8 +109,6 @@ export declare const GM_SUN_SI = 132712440000000000000;
107
109
  * @internal
108
110
  */
109
111
  export declare const M_SUN_IAU_SI: number;
110
- /** Where {@link GM_SUN_SI} comes from. @internal */
111
- export declare const GM_SUN_SOURCE = "IAU 2015 Resolution B3, nominal solar mass parameter (GM)\u2609 = 1.3271244e20 m\u00B3 s\u207B\u00B2";
112
112
  /**
113
113
  * Electron mass (kg), CODATA 2018. Added for the v0.11 namespacing
114
114
  * gate's criterion-3 pin (λ_T of an electron at the Hawking
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/core/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAIH,sEAAsE;AACtE,eAAO,MAAM,IAAI,YAAY,CAAC;AAE9B,mEAAmE;AACnE,eAAO,MAAM,IAAI,aAAc,CAAC;AAEhC,6DAA6D;AAC7D,eAAO,MAAM,IAAI,iBAAiB,CAAC;AAEnC;;;;;GAKG;AACH,eAAO,MAAM,OAAO,QAAuB,CAAC;AAE5C,8HAA8H;AAC9H,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;AAEnD,gEAAgE;AAChE,eAAO,MAAM,MAAM,eAAe,CAAC;AAEnC,6DAA6D;AAC7D,eAAO,MAAM,IAAI,kBAAkB,CAAC;AAEpC,8DAA8D;AAC9D,eAAO,MAAM,KAAK,kBAAkB,CAAC;AAErC,2DAA2D;AAC3D,eAAO,MAAM,OAAO,mBAAmB,CAAC;AAExC,mFAAmF;AACnF,eAAO,MAAM,MAAM,QAA8B,CAAC;AAElD,sEAAsE;AACtE,eAAO,MAAM,WAAW,iBAAiB,CAAC;AAE1C,6CAA6C;AAC7C,eAAO,MAAM,MAAM,cAAc,CAAC;AAElC,+CAA+C;AAC/C,eAAO,MAAM,MAAM,eAAe,CAAC;AAEnC,6CAA6C;AAC7C,eAAO,MAAM,MAAM,eAAe,CAAC;AAWnC;;;;;;;;GAQG;AACH,eAAO,MAAM,KAAK,QAA0C,CAAC;AAE7D;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,YAAW,CAAC;AAEjC,mEAAmE;AACnE,eAAO,MAAM,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mB,CAAC;AAEvC;;;;GAIG;AACH,eAAO,MAAM,WAAW,oBAAoB,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,MAAM,iBAAgB,CAAC;AAEpC;;;GAGG;AACH,eAAO,MAAM,UAAU,QAAgB,CAAC;AAExC;;;;GAIG;AACH,eAAO,MAAM,SAAS,iBAAiB,CAAC;AAExC;;;;;GAKG;AACH,eAAO,MAAM,MAAM,mBAAoB,CAAC"}
@@ -1,11 +1,9 @@
1
1
  /**
2
- * Canonical CODATA 2018 + SI-defined physical constants for UPT (v0.5.1).
2
+ * Canonical CODATA 2018 + SI-defined physical constants for UPT.
3
3
  *
4
- * Single source of truth for fundamental physical constants used across the
5
- * numerical, dimensional, and bridge layers. Replaces the truncated local
6
- * literals (`c_SI = 2.998e8`, etc.) that drifted across `src/numerical/`,
7
- * `src/bridges/`, and `tests/fixtures/` — see audit `PC-1` in
8
- * `docs/architecture/archive/v0.5.1-audit.md`.
4
+ * The one owner of every fundamental physical constant used across the
5
+ * numerical, dimensional, and bridge layers; `tests/core/constants-owner.test.ts`
6
+ * fails on a second copy of any of these decimals elsewhere under `src/`.
9
7
  *
10
8
  * Values use:
11
9
  * • Exact-SI definitions (`C_SI`, `H_SI`, `K_B_SI`, `E_SI`) where the
@@ -28,6 +26,8 @@
28
26
  import { checkedDataFile } from './data-file.js';
29
27
  /** Speed of light in vacuum (m/s). Exact SI definition since 1983. */
30
28
  export const C_SI = 299792458;
29
+ /** Rydberg constant R∞ (infinite nuclear mass), CODATA 2018: 10 973 731.568 160(21) m⁻¹. */
30
+ export const R_INF_SI = 10973731.56816;
31
31
  /** Newtonian gravitational constant (m³ kg⁻¹ s⁻²). CODATA 2018. */
32
32
  export const G_SI = 6.67430e-11;
33
33
  /** Planck constant (J·s). Exact SI definition since 2019. */
@@ -93,8 +93,8 @@ export const VON_KLITZING_SI = H_SI / (E_SI * E_SI);
93
93
  export const JOSEPHSON_CONSTANT_SI = (2 * E_SI) / H_SI;
94
94
  /** Lorenz number L = (π²/3) (k_B/e)² (W Ω K⁻²). */
95
95
  export const LORENZ_NUMBER_SI = (Math.PI ** 2 / 3) * (K_B_SI / E_SI) ** 2;
96
- /** Euler-Mascheroni constant γ. */
97
- const EULER_GAMMA = 0.5772156649015329;
96
+ /** Euler–Mascheroni constant γ. The BCS gap is π k_B T_c / e^γ; the formula name is `euler_gamma`. */
97
+ export const EULER_GAMMA = 0.5772156649015329;
98
98
  /** Weak-coupling BCS gap ratio 2Δ(0)/(k_B T_c) = 2π e^{−γ}. */
99
99
  export const BCS_GAP_RATIO = (2 * Math.PI) / Math.exp(EULER_GAMMA);
100
100
  /** Lane-Emden n=3 dimensionless radius used by the white-dwarf mass. */
@@ -119,8 +119,6 @@ export const GM_SUN_SI = 1.3271244e20;
119
119
  * @internal
120
120
  */
121
121
  export const M_SUN_IAU_SI = GM_SUN_SI / G_SI;
122
- /** Where {@link GM_SUN_SI} comes from. @internal */
123
- export const GM_SUN_SOURCE = 'IAU 2015 Resolution B3, nominal solar mass parameter (GM)☉ = 1.3271244e20 m³ s⁻²';
124
122
  /**
125
123
  * Electron mass (kg), CODATA 2018. Added for the v0.11 namespacing
126
124
  * gate's criterion-3 pin (λ_T of an electron at the Hawking
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/core/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,sEAAsE;AACtE,MAAM,CAAC,MAAM,IAAI,GAAG,SAAS,CAAC;AAE9B,mEAAmE;AACnE,MAAM,CAAC,MAAM,IAAI,GAAG,WAAW,CAAC;AAEhC,6DAA6D;AAC7D,MAAM,CAAC,MAAM,IAAI,GAAG,cAAc,CAAC;AAEnC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC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AAC","sourcesContent":["/**\n * Canonical CODATA 2018 + SI-defined physical constants for UPT.\n *\n * The one owner of every fundamental physical constant used across the\n * numerical, dimensional, and bridge layers; `tests/core/constants-owner.test.ts`\n * fails on a second copy of any of these decimals elsewhere under `src/`.\n *\n * Values use:\n * • Exact-SI definitions (`C_SI`, `H_SI`, `K_B_SI`, `E_SI`) where the\n * 2019 SI redefinition fixed their values exactly.\n * • `HBAR_SI` is the exact quotient `H_SI / (2π)`, not the truncated CODATA display.\n * • CODATA 2018 best estimates for measured constants (`G_SI`, `ALPHA`, Planck units).\n * • Planck 2018 best estimate for `H0_SI`, in SI through the unit table's parsec.\n *\n * This file is the one owner of every value. `PhysicalConstants` in\n * `src/core/types.ts` and the constant registry in\n * `src/dimensional/symbolic-constants.ts` are projections of it, and a test\n * refuses a CODATA literal anywhere else under `src/`. A unit is the unit\n * table's: `H0_SI` reads the parsec from `data/units.json` rather than\n * restating it, so the Hubble rate here and `67.4 km/s/Mpc` read through the\n * unit table are one number.\n *\n * @module core/constants\n * @public\n */\n\nimport { checkedDataFile } from './data-file.js';\n\n/** Speed of light in vacuum (m/s). Exact SI definition since 1983. */\nexport const C_SI = 299792458;\n/** Rydberg constant R∞ (infinite nuclear mass), CODATA 2018: 10 973 731.568 160(21) m⁻¹. */\nexport const R_INF_SI = 10973731.56816;\n\n/** Newtonian gravitational constant (m³ kg⁻¹ s⁻²). CODATA 2018. */\nexport const G_SI = 6.67430e-11;\n\n/** Planck constant (J·s). Exact SI definition since 2019. */\nexport const H_SI = 6.62607015e-34;\n\n/**\n * Reduced Planck constant h/(2π) (J·s). Exact, from the 2019 SI definition of\n * h. The CODATA display `1.054571817e-34` is that quotient truncated; it is\n * smaller by a relative `6.127e-10`. Planck units below stay the published\n * CODATA 2018 values, which were computed from the truncated display.\n */\nexport const HBAR_SI = H_SI / (2 * Math.PI);\n\n/** The CODATA 2018 display value of ħ: {@link HBAR_SI} truncated. Kept so the difference is computed, not typed. @internal */\nexport const HBAR_CODATA_DISPLAY = 1.054571817e-34;\n\n/** Boltzmann constant (J/K). Exact SI definition since 2019. */\nexport const K_B_SI = 1.380649e-23;\n\n/** Elementary charge (C). Exact SI definition since 2019. */\nexport const E_SI = 1.602176634e-19;\n\n/** Fine-structure constant α (dimensionless). CODATA 2018. */\nexport const ALPHA = 7.2973525693e-3;\n\n/** Vacuum permittivity ε₀ (F/m). CODATA 2018. @internal */\nexport const EPS0_SI = 8.8541878128e-12;\n\n/** Vacuum permeability μ₀ = 1/(ε₀ c²) (H/m), from ε₀ and the exact c. @internal */\nexport const MU0_SI = 1 / (EPS0_SI * C_SI * C_SI);\n\n/** Stefan–Boltzmann constant σ (W m⁻² K⁻⁴). CODATA 2018. @internal */\nexport const SIGMA_SB_SI = 5.670374419e-8;\n\n/** Planck mass √(ℏc/G) (kg). CODATA 2018. */\nexport const M_P_SI = 2.176434e-8;\n\n/** Planck length √(ℏG/c³) (m). CODATA 2018. */\nexport const L_P_SI = 1.616255e-35;\n\n/** Planck time √(ℏG/c⁵) (s). CODATA 2018. */\nexport const T_P_SI = 5.391247e-44;\n\n/** The `scale` of the `symbol` row in `data/units.json`, which must be a plain decimal (metres for a length). */\nfunction unitTableDecimal(symbol: string): number {\n const file = checkedDataFile('units.json') as { readonly units: readonly { readonly symbols: readonly string[]; readonly scale: string }[] };\n const scale = file.units.find((row) => row.symbols.includes(symbol))?.scale;\n const value = scale === undefined ? Number.NaN : Number(scale);\n if (!Number.isFinite(value)) throw new Error(`data/units.json: the '${symbol}' row must state a decimal scale (got ${scale ?? 'no row'})`);\n return value;\n}\n\n/**\n * Hubble parameter H₀ (s⁻¹).\n *\n * Planck 2018 TT,TE,EE+lowE+lensing best estimate: 67.4 km/s/Mpc, converted\n * with the parsec of the unit table (`data/units.json`, 648000/π au), so it is\n * the value `convertValue('67.4km/s/Mpc', 'Hz')` reads: one Hubble rate,\n * 2.1842852410855023e-18 s⁻¹. The unit table is the one place the parsec is\n * written; this module reads it rather than restating it.\n */\nexport const H0_SI = 67.4e3 / (1e6 * unitTableDecimal('pc'));\n\n/**\n * Solar mass (kg). IAU 2015 nominal value rounded to the\n * repo-conventional literal (used by the BE-42 docstring, the\n * bridge-gradient tests, and the v0.8.0 calibration edges).\n * @public\n */\nexport const M_SUN_SI = 1.989e30;\n\n/** Solar mass in kilograms. The same value as {@link M_SUN_SI}. */\nexport const M_SUN_KG = M_SUN_SI;\n\n/** von Klitzing constant R_K = h/e² (ohm). */\nexport const VON_KLITZING_SI = H_SI / (E_SI * E_SI);\n\n/** Josephson constant K_J = 2e/h (Hz/V). */\nexport const JOSEPHSON_CONSTANT_SI = (2 * E_SI) / H_SI;\n\n/** Lorenz number L = (π²/3) (k_B/e)² (W Ω K⁻²). */\nexport const LORENZ_NUMBER_SI = (Math.PI ** 2 / 3) * (K_B_SI / E_SI) ** 2;\n\n/** Euler–Mascheroni constant γ. The BCS gap is π k_B T_c / e^γ; the formula name is `euler_gamma`. */\nexport const EULER_GAMMA = 0.5772156649015329;\n\n/** Weak-coupling BCS gap ratio 2Δ(0)/(k_B T_c) = 2π e^{−γ}. */\nexport const BCS_GAP_RATIO = (2 * Math.PI) / Math.exp(EULER_GAMMA);\n\n/** Lane-Emden n=3 dimensionless radius used by the white-dwarf mass. */\nexport const LANE_EMDEN_OMEGA3 = 2.01824;\n\n/** Thomson cross section (m²). */\nexport const THOMSON_CROSS_SECTION_SI = 6.6524587321e-29;\n\n/**\n * Nominal solar gravitational parameter (GM)☉ (m³ s⁻²), IAU 2015 Resolution B3.\n *\n * The product GM☉ is known to about 10 significant digits, while G alone is\n * known to about 5, so a confrontation that needs GM☉ takes this value rather\n * than `G_SI × M_SUN_SI`: that product is 3.0e-4 too high, five times the VLBI\n * 1σ on the solar-limb deflection. A mass that some evaluator requires in kg\n * is `GM_SUN_SI / G_SI`, which reproduces G·M = GM☉ exactly.\n * @public\n */\nexport const GM_SUN_SI = 1.3271244e20;\n\n/**\n * The solar mass (kg) that reproduces {@link GM_SUN_SI} with {@link G_SI}:\n * the double `GM_SUN_SI / G_SI`. The unit `Msun_iau` and the registry name\n * `Msun_iau` both read this one value.\n * @internal\n */\nexport const M_SUN_IAU_SI = GM_SUN_SI / G_SI;\n\n/**\n * Electron mass (kg), CODATA 2018. Added for the v0.11 namespacing\n * gate's criterion-3 pin (λ_T of an electron at the Hawking\n * temperature — see the Adam vet A-5).\n * @public\n */\nexport const M_E_SI = 9.1093837015e-31;\n\n/**\n * Proton mass (kg). CODATA 2018. Shared by the Eddington evaluator and\n * `upt eval` (`m_p`, `m_proton`). Not the Planck mass `M_P_SI`.\n * @internal\n */\nexport const M_PROTON_SI = 1.67262192369e-27;\n\n/**\n * Avogadro constant (mol⁻¹). Exact in the 2019 SI.\n * @internal\n */\nexport const N_A_SI = 6.02214076e23;\n\n/**\n * Faraday constant (C·mol⁻¹), `N_A * e`.\n * @internal\n */\nexport const FARADAY_SI = N_A_SI * E_SI;\n\n/**\n * Wien displacement-law constant b = λ_max·T (m·K). CODATA 2018.\n *\n * @public\n */\nexport const B_WIEN_SI = 2.897771955e-3;\n\n/**\n * Unified atomic mass unit (kg). CODATA 2018 atomic mass constant.\n * One value for the Chandrasekhar evaluator and the symbolic constant `m_u`.\n * Kept off the package barrel: callers use `m_u` in the symbolic registry.\n * @internal\n */\nexport const M_U_SI = 1.66053906660e-27;\n"]}