universal-physics-tensor 10.0.0 → 12.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 (835) hide show
  1. package/README.md +39 -36
  2. package/bin/upt.mjs +13 -1
  3. package/data/applied-cases.json +1892 -0
  4. package/data/applied-cases.schema.json +194 -0
  5. package/data/atlas/atlas.json +25 -25
  6. package/data/atlas/atlas.jsonld +1 -1
  7. package/data/atlas/diffusion.json +6 -6
  8. package/data/atlas/oscillators.json +7 -7
  9. package/data/atlas/waves.json +14 -14
  10. package/data/atlas/witness-results.json +11 -11
  11. package/data/bridge-catalog.json +389 -230
  12. package/data/bridge-catalog.schema.json +45 -7
  13. package/data/units.json +6 -25
  14. package/dist/atlas/applicability.d.ts.map +1 -1
  15. package/dist/atlas/applicability.js +21 -15
  16. package/dist/atlas/applicability.js.map +1 -1
  17. package/dist/atlas/benchmark/hybrid-retrieval.d.ts +9 -1
  18. package/dist/atlas/benchmark/hybrid-retrieval.d.ts.map +1 -1
  19. package/dist/atlas/benchmark/hybrid-retrieval.js +15 -13
  20. package/dist/atlas/benchmark/hybrid-retrieval.js.map +1 -1
  21. package/dist/atlas/benchmark/loader.js +2 -2
  22. package/dist/atlas/benchmark/loader.js.map +1 -1
  23. package/dist/atlas/benchmark/stats.d.ts +2 -2
  24. package/dist/atlas/benchmark/stats.d.ts.map +1 -1
  25. package/dist/atlas/benchmark/stats.js +9 -15
  26. package/dist/atlas/benchmark/stats.js.map +1 -1
  27. package/dist/atlas/catalog-formal-ref.d.ts +26 -3
  28. package/dist/atlas/catalog-formal-ref.d.ts.map +1 -1
  29. package/dist/atlas/catalog-formal-ref.js +52 -5
  30. package/dist/atlas/catalog-formal-ref.js.map +1 -1
  31. package/dist/atlas/chain-pipeline.d.ts.map +1 -1
  32. package/dist/atlas/chain-pipeline.js +7 -8
  33. package/dist/atlas/chain-pipeline.js.map +1 -1
  34. package/dist/atlas/diffusion/bridges-closure.d.ts +0 -4
  35. package/dist/atlas/diffusion/bridges-closure.d.ts.map +1 -1
  36. package/dist/atlas/diffusion/bridges-closure.js +8 -12
  37. package/dist/atlas/diffusion/bridges-closure.js.map +1 -1
  38. package/dist/atlas/diffusion/bridges.d.ts.map +1 -1
  39. package/dist/atlas/diffusion/bridges.js +27 -39
  40. package/dist/atlas/diffusion/bridges.js.map +1 -1
  41. package/dist/atlas/diffusion/dimensions.d.ts +6 -14
  42. package/dist/atlas/diffusion/dimensions.d.ts.map +1 -1
  43. package/dist/atlas/diffusion/dimensions.js +8 -16
  44. package/dist/atlas/diffusion/dimensions.js.map +1 -1
  45. package/dist/atlas/diffusion/models.d.ts +3 -3
  46. package/dist/atlas/diffusion/models.d.ts.map +1 -1
  47. package/dist/atlas/diffusion/models.js +5 -10
  48. package/dist/atlas/diffusion/models.js.map +1 -1
  49. package/dist/atlas/diffusion/numerics.d.ts +16 -4
  50. package/dist/atlas/diffusion/numerics.d.ts.map +1 -1
  51. package/dist/atlas/diffusion/numerics.js +38 -24
  52. package/dist/atlas/diffusion/numerics.js.map +1 -1
  53. package/dist/atlas/link-prediction.d.ts +106 -3
  54. package/dist/atlas/link-prediction.d.ts.map +1 -1
  55. package/dist/atlas/link-prediction.js +212 -66
  56. package/dist/atlas/link-prediction.js.map +1 -1
  57. package/dist/atlas/oscillators/bridges-coarse.d.ts.map +1 -1
  58. package/dist/atlas/oscillators/bridges-coarse.js +7 -11
  59. package/dist/atlas/oscillators/bridges-coarse.js.map +1 -1
  60. package/dist/atlas/oscillators/bridges-exact.d.ts.map +1 -1
  61. package/dist/atlas/oscillators/bridges-exact.js +6 -7
  62. package/dist/atlas/oscillators/bridges-exact.js.map +1 -1
  63. package/dist/atlas/oscillators/bridges-limits.d.ts +3 -16
  64. package/dist/atlas/oscillators/bridges-limits.d.ts.map +1 -1
  65. package/dist/atlas/oscillators/bridges-limits.js +23 -34
  66. package/dist/atlas/oscillators/bridges-limits.js.map +1 -1
  67. package/dist/atlas/oscillators/dimensions.d.ts +9 -21
  68. package/dist/atlas/oscillators/dimensions.d.ts.map +1 -1
  69. package/dist/atlas/oscillators/dimensions.js +9 -21
  70. package/dist/atlas/oscillators/dimensions.js.map +1 -1
  71. package/dist/atlas/oscillators/limit-witnesses.d.ts +2 -2
  72. package/dist/atlas/oscillators/limit-witnesses.d.ts.map +1 -1
  73. package/dist/atlas/oscillators/limit-witnesses.js +17 -15
  74. package/dist/atlas/oscillators/limit-witnesses.js.map +1 -1
  75. package/dist/atlas/oscillators/models.d.ts.map +1 -1
  76. package/dist/atlas/oscillators/models.js +2 -6
  77. package/dist/atlas/oscillators/models.js.map +1 -1
  78. package/dist/atlas/oscillators/pendulum-motion.d.ts +29 -6
  79. package/dist/atlas/oscillators/pendulum-motion.d.ts.map +1 -1
  80. package/dist/atlas/oscillators/pendulum-motion.js +60 -40
  81. package/dist/atlas/oscillators/pendulum-motion.js.map +1 -1
  82. package/dist/atlas/oscillators/phase-translation.d.ts +0 -11
  83. package/dist/atlas/oscillators/phase-translation.d.ts.map +1 -1
  84. package/dist/atlas/oscillators/phase-translation.js +3 -4
  85. package/dist/atlas/oscillators/phase-translation.js.map +1 -1
  86. package/dist/atlas/oscillators/position-translation.d.ts +68 -7
  87. package/dist/atlas/oscillators/position-translation.d.ts.map +1 -1
  88. package/dist/atlas/oscillators/position-translation.js +123 -12
  89. package/dist/atlas/oscillators/position-translation.js.map +1 -1
  90. package/dist/atlas/oscillators/rejections.d.ts +0 -2
  91. package/dist/atlas/oscillators/rejections.d.ts.map +1 -1
  92. package/dist/atlas/oscillators/rejections.js +0 -7
  93. package/dist/atlas/oscillators/rejections.js.map +1 -1
  94. package/dist/atlas/physjs-entries.generated.d.ts +35 -25
  95. package/dist/atlas/physjs-entries.generated.d.ts.map +1 -1
  96. package/dist/atlas/physjs-entries.generated.js +37 -25
  97. package/dist/atlas/physjs-entries.generated.js.map +1 -1
  98. package/dist/atlas/physjs-ref.d.ts +34 -31
  99. package/dist/atlas/physjs-ref.d.ts.map +1 -1
  100. package/dist/atlas/physjs-ref.js +55 -53
  101. package/dist/atlas/physjs-ref.js.map +1 -1
  102. package/dist/atlas/physjs-reviewed.d.ts +1 -1
  103. package/dist/atlas/physjs-reviewed.js +15 -15
  104. package/dist/atlas/physjs-reviewed.js.map +1 -1
  105. package/dist/atlas/poster/statements.d.ts +0 -19
  106. package/dist/atlas/poster/statements.d.ts.map +1 -1
  107. package/dist/atlas/poster/statements.js +1 -1
  108. package/dist/atlas/poster/statements.js.map +1 -1
  109. package/dist/atlas/proof-target.d.ts +1 -1
  110. package/dist/atlas/proof-target.js +1 -1
  111. package/dist/atlas/proof-target.js.map +1 -1
  112. package/dist/atlas/regime.d.ts +1 -1
  113. package/dist/atlas/regime.d.ts.map +1 -1
  114. package/dist/atlas/regime.js +1 -1
  115. package/dist/atlas/regime.js.map +1 -1
  116. package/dist/atlas/text-overlap.d.ts +23 -0
  117. package/dist/atlas/text-overlap.d.ts.map +1 -0
  118. package/dist/atlas/text-overlap.js +41 -0
  119. package/dist/atlas/text-overlap.js.map +1 -0
  120. package/dist/atlas/waves/bridges-closure.d.ts.map +1 -1
  121. package/dist/atlas/waves/bridges-closure.js +2 -6
  122. package/dist/atlas/waves/bridges-closure.js.map +1 -1
  123. package/dist/atlas/waves/bridges.d.ts.map +1 -1
  124. package/dist/atlas/waves/bridges.js +32 -48
  125. package/dist/atlas/waves/bridges.js.map +1 -1
  126. package/dist/atlas/waves/models.d.ts +5 -6
  127. package/dist/atlas/waves/models.d.ts.map +1 -1
  128. package/dist/atlas/waves/models.js +7 -13
  129. package/dist/atlas/waves/models.js.map +1 -1
  130. package/dist/atlas/waves/numerics.d.ts.map +1 -1
  131. package/dist/atlas/waves/numerics.js +10 -3
  132. package/dist/atlas/waves/numerics.js.map +1 -1
  133. package/dist/atlas/witness-numeric.d.ts +30 -0
  134. package/dist/atlas/witness-numeric.d.ts.map +1 -1
  135. package/dist/atlas/witness-numeric.js +53 -0
  136. package/dist/atlas/witness-numeric.js.map +1 -1
  137. package/dist/atlas/witness-specs.d.ts.map +1 -1
  138. package/dist/atlas/witness-specs.js +19 -0
  139. package/dist/atlas/witness-specs.js.map +1 -1
  140. package/dist/atlas/witness-symbolic.d.ts +75 -3
  141. package/dist/atlas/witness-symbolic.d.ts.map +1 -1
  142. package/dist/atlas/witness-symbolic.js +116 -10
  143. package/dist/atlas/witness-symbolic.js.map +1 -1
  144. package/dist/bridges/catalog-load.d.ts.map +1 -1
  145. package/dist/bridges/catalog-load.js +13 -8
  146. package/dist/bridges/catalog-load.js.map +1 -1
  147. package/dist/bridges/catalog-types.d.ts +26 -2
  148. package/dist/bridges/catalog-types.d.ts.map +1 -1
  149. package/dist/bridges/catalog-types.js +11 -1
  150. package/dist/bridges/catalog-types.js.map +1 -1
  151. package/dist/bridges/evaluation-errors.d.ts +31 -1
  152. package/dist/bridges/evaluation-errors.d.ts.map +1 -1
  153. package/dist/bridges/evaluation-errors.js +20 -2
  154. package/dist/bridges/evaluation-errors.js.map +1 -1
  155. package/dist/bridges/evaluator-inputs.d.ts.map +1 -1
  156. package/dist/bridges/evaluator-inputs.js +7 -5
  157. package/dist/bridges/evaluator-inputs.js.map +1 -1
  158. package/dist/bridges/evaluators.d.ts.map +1 -1
  159. package/dist/bridges/evaluators.js +27 -12
  160. package/dist/bridges/evaluators.js.map +1 -1
  161. package/dist/bridges/expr-parse.d.ts +11 -0
  162. package/dist/bridges/expr-parse.d.ts.map +1 -1
  163. package/dist/bridges/expr-parse.js +14 -5
  164. package/dist/bridges/expr-parse.js.map +1 -1
  165. package/dist/bridges/holds.d.ts +35 -3
  166. package/dist/bridges/holds.d.ts.map +1 -1
  167. package/dist/bridges/holds.js +117 -23
  168. package/dist/bridges/holds.js.map +1 -1
  169. package/dist/bridges/notices.d.ts.map +1 -1
  170. package/dist/bridges/notices.js +5 -5
  171. package/dist/bridges/notices.js.map +1 -1
  172. package/dist/bridges/relation-eval.d.ts +4 -4
  173. package/dist/bridges/relation-eval.d.ts.map +1 -1
  174. package/dist/bridges/relation-eval.js +15 -16
  175. package/dist/bridges/relation-eval.js.map +1 -1
  176. package/dist/bridges/sensitivity.d.ts.map +1 -1
  177. package/dist/bridges/sensitivity.js +3 -3
  178. package/dist/bridges/sensitivity.js.map +1 -1
  179. package/dist/bridges/validity.d.ts +33 -0
  180. package/dist/bridges/validity.d.ts.map +1 -0
  181. package/dist/bridges/validity.js +67 -0
  182. package/dist/bridges/validity.js.map +1 -0
  183. package/dist/canonical/entries/atomic.js +1 -3
  184. package/dist/canonical/entries/atomic.js.map +1 -1
  185. package/dist/canonical/entries/condensed-matter.d.ts.map +1 -1
  186. package/dist/canonical/entries/condensed-matter.js +4 -5
  187. package/dist/canonical/entries/condensed-matter.js.map +1 -1
  188. package/dist/canonical/entries/dimensional-classics.d.ts.map +1 -1
  189. package/dist/canonical/entries/dimensional-classics.js +3 -4
  190. package/dist/canonical/entries/dimensional-classics.js.map +1 -1
  191. package/dist/canonical/entries/electromagnetism.d.ts.map +1 -1
  192. package/dist/canonical/entries/electromagnetism.js +4 -10
  193. package/dist/canonical/entries/electromagnetism.js.map +1 -1
  194. package/dist/canonical/entries/fluids-waves.d.ts.map +1 -1
  195. package/dist/canonical/entries/fluids-waves.js +3 -7
  196. package/dist/canonical/entries/fluids-waves.js.map +1 -1
  197. package/dist/canonical/entries/mechanics.d.ts.map +1 -1
  198. package/dist/canonical/entries/mechanics.js +4 -6
  199. package/dist/canonical/entries/mechanics.js.map +1 -1
  200. package/dist/canonical/entries/nonmonomial.d.ts.map +1 -1
  201. package/dist/canonical/entries/nonmonomial.js +9 -17
  202. package/dist/canonical/entries/nonmonomial.js.map +1 -1
  203. package/dist/canonical/entries/relativity.d.ts.map +1 -1
  204. package/dist/canonical/entries/relativity.js +6 -6
  205. package/dist/canonical/entries/relativity.js.map +1 -1
  206. package/dist/canonical/entries/thermo-nuclear-cosmo.d.ts.map +1 -1
  207. package/dist/canonical/entries/thermo-nuclear-cosmo.js +6 -10
  208. package/dist/canonical/entries/thermo-nuclear-cosmo.js.map +1 -1
  209. package/dist/canonical/fixed-points.d.ts +94 -0
  210. package/dist/canonical/fixed-points.d.ts.map +1 -0
  211. package/dist/canonical/fixed-points.js +81 -0
  212. package/dist/canonical/fixed-points.js.map +1 -0
  213. package/dist/canonical/linkage.d.ts.map +1 -1
  214. package/dist/canonical/linkage.js +25 -44
  215. package/dist/canonical/linkage.js.map +1 -1
  216. package/dist/canonical/normal-form.d.ts.map +1 -1
  217. package/dist/canonical/normal-form.js +5 -11
  218. package/dist/canonical/normal-form.js.map +1 -1
  219. package/dist/canonical/structural.d.ts +21 -21
  220. package/dist/canonical/structural.d.ts.map +1 -1
  221. package/dist/canonical/structural.js +40 -19
  222. package/dist/canonical/structural.js.map +1 -1
  223. package/dist/cases/catalog-checks.d.ts +10 -0
  224. package/dist/cases/catalog-checks.d.ts.map +1 -0
  225. package/dist/cases/catalog-checks.js +241 -0
  226. package/dist/cases/catalog-checks.js.map +1 -0
  227. package/dist/cases/catalog.d.ts +83 -0
  228. package/dist/cases/catalog.d.ts.map +1 -0
  229. package/dist/cases/catalog.js +118 -0
  230. package/dist/cases/catalog.js.map +1 -0
  231. package/dist/cases/engine.d.ts +13 -0
  232. package/dist/cases/engine.d.ts.map +1 -0
  233. package/dist/cases/engine.js +179 -0
  234. package/dist/cases/engine.js.map +1 -0
  235. package/dist/cases/index.d.ts.map +1 -1
  236. package/dist/cases/index.js +5 -7
  237. package/dist/cases/index.js.map +1 -1
  238. package/dist/cases/methods.d.ts +215 -0
  239. package/dist/cases/methods.d.ts.map +1 -0
  240. package/dist/cases/methods.js +743 -0
  241. package/dist/cases/methods.js.map +1 -0
  242. package/dist/cases/quadrature.d.ts +7 -9
  243. package/dist/cases/quadrature.d.ts.map +1 -1
  244. package/dist/cases/quadrature.js +28 -32
  245. package/dist/cases/quadrature.js.map +1 -1
  246. package/dist/cases/types.d.ts +12 -0
  247. package/dist/cases/types.d.ts.map +1 -1
  248. package/dist/cases/types.js.map +1 -1
  249. package/dist/cli/args.d.ts +25 -1
  250. package/dist/cli/args.d.ts.map +1 -1
  251. package/dist/cli/args.js +30 -8
  252. package/dist/cli/args.js.map +1 -1
  253. package/dist/cli/bindings.d.ts.map +1 -1
  254. package/dist/cli/bindings.js +5 -4
  255. package/dist/cli/bindings.js.map +1 -1
  256. package/dist/cli/command.d.ts +11 -1
  257. package/dist/cli/command.d.ts.map +1 -1
  258. package/dist/cli/command.js.map +1 -1
  259. package/dist/cli/commands/_atlas-map.d.ts +0 -9
  260. package/dist/cli/commands/_atlas-map.d.ts.map +1 -1
  261. package/dist/cli/commands/_atlas-map.js +8 -18
  262. package/dist/cli/commands/_atlas-map.js.map +1 -1
  263. package/dist/cli/commands/_atlas-route.d.ts.map +1 -1
  264. package/dist/cli/commands/_atlas-route.js +6 -2
  265. package/dist/cli/commands/_atlas-route.js.map +1 -1
  266. package/dist/cli/commands/_discovery-opts.d.ts +1 -0
  267. package/dist/cli/commands/_discovery-opts.d.ts.map +1 -1
  268. package/dist/cli/commands/_discovery-opts.js +9 -9
  269. package/dist/cli/commands/_discovery-opts.js.map +1 -1
  270. package/dist/cli/commands/atlas.d.ts.map +1 -1
  271. package/dist/cli/commands/atlas.js +8 -5
  272. package/dist/cli/commands/atlas.js.map +1 -1
  273. package/dist/cli/commands/audit.d.ts.map +1 -1
  274. package/dist/cli/commands/audit.js +8 -1
  275. package/dist/cli/commands/audit.js.map +1 -1
  276. package/dist/cli/commands/axes.d.ts.map +1 -1
  277. package/dist/cli/commands/axes.js +20 -1
  278. package/dist/cli/commands/axes.js.map +1 -1
  279. package/dist/cli/commands/confront.d.ts.map +1 -1
  280. package/dist/cli/commands/confront.js +8 -14
  281. package/dist/cli/commands/confront.js.map +1 -1
  282. package/dist/cli/commands/derive.d.ts.map +1 -1
  283. package/dist/cli/commands/derive.js +22 -22
  284. package/dist/cli/commands/derive.js.map +1 -1
  285. package/dist/cli/commands/discover.d.ts.map +1 -1
  286. package/dist/cli/commands/discover.js +122 -73
  287. package/dist/cli/commands/discover.js.map +1 -1
  288. package/dist/cli/commands/eval.d.ts.map +1 -1
  289. package/dist/cli/commands/eval.js +1 -0
  290. package/dist/cli/commands/eval.js.map +1 -1
  291. package/dist/cli/commands/evaluate.d.ts.map +1 -1
  292. package/dist/cli/commands/evaluate.js +67 -39
  293. package/dist/cli/commands/evaluate.js.map +1 -1
  294. package/dist/cli/commands/explain.d.ts.map +1 -1
  295. package/dist/cli/commands/explain.js +24 -3
  296. package/dist/cli/commands/explain.js.map +1 -1
  297. package/dist/cli/commands/ground.d.ts.map +1 -1
  298. package/dist/cli/commands/ground.js +7 -1
  299. package/dist/cli/commands/ground.js.map +1 -1
  300. package/dist/cli/commands/map.d.ts.map +1 -1
  301. package/dist/cli/commands/map.js +84 -11
  302. package/dist/cli/commands/map.js.map +1 -1
  303. package/dist/cli/commands/metric.d.ts.map +1 -1
  304. package/dist/cli/commands/metric.js +12 -9
  305. package/dist/cli/commands/metric.js.map +1 -1
  306. package/dist/cli/commands/path.d.ts +10 -0
  307. package/dist/cli/commands/path.d.ts.map +1 -1
  308. package/dist/cli/commands/path.js +25 -3
  309. package/dist/cli/commands/path.js.map +1 -1
  310. package/dist/cli/commands/probe.d.ts.map +1 -1
  311. package/dist/cli/commands/probe.js +59 -16
  312. package/dist/cli/commands/probe.js.map +1 -1
  313. package/dist/cli/commands/regime.d.ts.map +1 -1
  314. package/dist/cli/commands/regime.js +1 -0
  315. package/dist/cli/commands/regime.js.map +1 -1
  316. package/dist/cli/commands/retrieve.d.ts.map +1 -1
  317. package/dist/cli/commands/retrieve.js +1 -0
  318. package/dist/cli/commands/retrieve.js.map +1 -1
  319. package/dist/cli/commands/search.d.ts.map +1 -1
  320. package/dist/cli/commands/search.js +1 -0
  321. package/dist/cli/commands/search.js.map +1 -1
  322. package/dist/cli/commands/symbolic.d.ts.map +1 -1
  323. package/dist/cli/commands/symbolic.js +19 -28
  324. package/dist/cli/commands/symbolic.js.map +1 -1
  325. package/dist/cli/commands/testplan.d.ts.map +1 -1
  326. package/dist/cli/commands/testplan.js +4 -2
  327. package/dist/cli/commands/testplan.js.map +1 -1
  328. package/dist/cli/determination.d.ts +1 -0
  329. package/dist/cli/determination.d.ts.map +1 -1
  330. package/dist/cli/determination.js.map +1 -1
  331. package/dist/cli/expr-print.d.ts +0 -2
  332. package/dist/cli/expr-print.d.ts.map +1 -1
  333. package/dist/cli/expr-print.js +7 -31
  334. package/dist/cli/expr-print.js.map +1 -1
  335. package/dist/cli/flag-help.d.ts +1 -0
  336. package/dist/cli/flag-help.d.ts.map +1 -1
  337. package/dist/cli/flag-help.js +1 -0
  338. package/dist/cli/flag-help.js.map +1 -1
  339. package/dist/cli/graphs.d.ts +2 -0
  340. package/dist/cli/graphs.d.ts.map +1 -1
  341. package/dist/cli/graphs.js +1 -0
  342. package/dist/cli/graphs.js.map +1 -1
  343. package/dist/cli/main.d.ts +8 -0
  344. package/dist/cli/main.d.ts.map +1 -1
  345. package/dist/cli/main.js +19 -3
  346. package/dist/cli/main.js.map +1 -1
  347. package/dist/cli/numeric-flag.d.ts +12 -0
  348. package/dist/cli/numeric-flag.d.ts.map +1 -0
  349. package/dist/cli/numeric-flag.js +44 -0
  350. package/dist/cli/numeric-flag.js.map +1 -0
  351. package/dist/cli/output.d.ts +28 -0
  352. package/dist/cli/output.d.ts.map +1 -1
  353. package/dist/cli/output.js +23 -0
  354. package/dist/cli/output.js.map +1 -1
  355. package/dist/cli/record-reach.js +2 -2
  356. package/dist/cli/record-reach.js.map +1 -1
  357. package/dist/cli/record-tables.d.ts.map +1 -1
  358. package/dist/cli/record-tables.js +6 -5
  359. package/dist/cli/record-tables.js.map +1 -1
  360. package/dist/cli/record.d.ts +1 -5
  361. package/dist/cli/record.d.ts.map +1 -1
  362. package/dist/cli/record.js +9 -8
  363. package/dist/cli/record.js.map +1 -1
  364. package/dist/cli/search-index.d.ts.map +1 -1
  365. package/dist/cli/search-index.js +7 -6
  366. package/dist/cli/search-index.js.map +1 -1
  367. package/dist/cli/statuses.d.ts +0 -2
  368. package/dist/cli/statuses.d.ts.map +1 -1
  369. package/dist/cli/statuses.js +12 -9
  370. package/dist/cli/statuses.js.map +1 -1
  371. package/dist/cli/stored-results.d.ts +7 -0
  372. package/dist/cli/stored-results.d.ts.map +1 -0
  373. package/dist/cli/stored-results.js +23 -0
  374. package/dist/cli/stored-results.js.map +1 -0
  375. package/dist/cli/version.d.ts +1 -0
  376. package/dist/cli/version.d.ts.map +1 -1
  377. package/dist/cli/version.js +8 -5
  378. package/dist/cli/version.js.map +1 -1
  379. package/dist/cli-api.d.ts +36 -5
  380. package/dist/cli-api.d.ts.map +1 -1
  381. package/dist/cli-api.js +30 -4
  382. package/dist/cli-api.js.map +1 -1
  383. package/dist/composition/algebraic-equivalence.d.ts +43 -0
  384. package/dist/composition/algebraic-equivalence.d.ts.map +1 -0
  385. package/dist/composition/algebraic-equivalence.js +115 -0
  386. package/dist/composition/algebraic-equivalence.js.map +1 -0
  387. package/dist/composition/axes.d.ts +0 -6
  388. package/dist/composition/axes.d.ts.map +1 -1
  389. package/dist/composition/axes.js +6 -6
  390. package/dist/composition/axes.js.map +1 -1
  391. package/dist/composition/axis-audit.d.ts +47 -20
  392. package/dist/composition/axis-audit.d.ts.map +1 -1
  393. package/dist/composition/axis-audit.js +82 -9
  394. package/dist/composition/axis-audit.js.map +1 -1
  395. package/dist/composition/bridge-analysis.d.ts +17 -0
  396. package/dist/composition/bridge-analysis.d.ts.map +1 -1
  397. package/dist/composition/bridge-analysis.js +102 -55
  398. package/dist/composition/bridge-analysis.js.map +1 -1
  399. package/dist/composition/canonical-compare.d.ts +40 -0
  400. package/dist/composition/canonical-compare.d.ts.map +1 -1
  401. package/dist/composition/canonical-compare.js +122 -24
  402. package/dist/composition/canonical-compare.js.map +1 -1
  403. package/dist/composition/canonical-graph.d.ts +3 -3
  404. package/dist/composition/canonical-graph.d.ts.map +1 -1
  405. package/dist/composition/canonical-graph.js +11 -38
  406. package/dist/composition/canonical-graph.js.map +1 -1
  407. package/dist/composition/canonical-json.js +2 -2
  408. package/dist/composition/canonical-json.js.map +1 -1
  409. package/dist/composition/catalog-graph.d.ts.map +1 -1
  410. package/dist/composition/catalog-graph.js +2 -5
  411. package/dist/composition/catalog-graph.js.map +1 -1
  412. package/dist/composition/chain-candidate.d.ts +8 -0
  413. package/dist/composition/chain-candidate.d.ts.map +1 -1
  414. package/dist/composition/chain-candidate.js +9 -2
  415. package/dist/composition/chain-candidate.js.map +1 -1
  416. package/dist/composition/chain-match.d.ts +6 -3
  417. package/dist/composition/chain-match.d.ts.map +1 -1
  418. package/dist/composition/chain-match.js +4 -1
  419. package/dist/composition/chain-match.js.map +1 -1
  420. package/dist/composition/chain-result.d.ts.map +1 -1
  421. package/dist/composition/chain-result.js +2 -14
  422. package/dist/composition/chain-result.js.map +1 -1
  423. package/dist/composition/compose-symbolic.d.ts.map +1 -1
  424. package/dist/composition/compose-symbolic.js +3 -2
  425. package/dist/composition/compose-symbolic.js.map +1 -1
  426. package/dist/composition/compose.d.ts.map +1 -1
  427. package/dist/composition/compose.js +13 -5
  428. package/dist/composition/compose.js.map +1 -1
  429. package/dist/composition/composition-recovery.d.ts.map +1 -1
  430. package/dist/composition/composition-recovery.js +4 -7
  431. package/dist/composition/composition-recovery.js.map +1 -1
  432. package/dist/composition/consequence.d.ts +15 -5
  433. package/dist/composition/consequence.d.ts.map +1 -1
  434. package/dist/composition/consequence.js +6 -4
  435. package/dist/composition/consequence.js.map +1 -1
  436. package/dist/composition/discovery.d.ts +129 -9
  437. package/dist/composition/discovery.d.ts.map +1 -1
  438. package/dist/composition/discovery.js +171 -67
  439. package/dist/composition/discovery.js.map +1 -1
  440. package/dist/composition/edge.d.ts +21 -2
  441. package/dist/composition/edge.d.ts.map +1 -1
  442. package/dist/composition/edge.js +23 -1
  443. package/dist/composition/edge.js.map +1 -1
  444. package/dist/composition/enumerate.d.ts.map +1 -1
  445. package/dist/composition/enumerate.js +18 -3
  446. package/dist/composition/enumerate.js.map +1 -1
  447. package/dist/composition/evaluate-relation.d.ts +35 -11
  448. package/dist/composition/evaluate-relation.d.ts.map +1 -1
  449. package/dist/composition/evaluate-relation.js +60 -39
  450. package/dist/composition/evaluate-relation.js.map +1 -1
  451. package/dist/composition/explain.d.ts +3 -12
  452. package/dist/composition/explain.d.ts.map +1 -1
  453. package/dist/composition/explain.js +7 -20
  454. package/dist/composition/explain.js.map +1 -1
  455. package/dist/composition/expr-eval.d.ts +1 -1
  456. package/dist/composition/expr-eval.d.ts.map +1 -1
  457. package/dist/composition/expr-eval.js +6 -15
  458. package/dist/composition/expr-eval.js.map +1 -1
  459. package/dist/composition/expr-simplify.d.ts +26 -14
  460. package/dist/composition/expr-simplify.d.ts.map +1 -1
  461. package/dist/composition/expr-simplify.js +64 -72
  462. package/dist/composition/expr-simplify.js.map +1 -1
  463. package/dist/composition/formula-shape.d.ts +23 -4
  464. package/dist/composition/formula-shape.d.ts.map +1 -1
  465. package/dist/composition/formula-shape.js +57 -17
  466. package/dist/composition/formula-shape.js.map +1 -1
  467. package/dist/composition/graph-structure.d.ts +98 -0
  468. package/dist/composition/graph-structure.d.ts.map +1 -0
  469. package/dist/composition/graph-structure.js +167 -0
  470. package/dist/composition/graph-structure.js.map +1 -0
  471. package/dist/composition/graph-viz-svg.d.ts.map +1 -1
  472. package/dist/composition/graph-viz-svg.js +1 -1
  473. package/dist/composition/graph-viz-svg.js.map +1 -1
  474. package/dist/composition/graph-viz.d.ts.map +1 -1
  475. package/dist/composition/graph-viz.js +8 -37
  476. package/dist/composition/graph-viz.js.map +1 -1
  477. package/dist/composition/grounding.d.ts.map +1 -1
  478. package/dist/composition/grounding.js +19 -7
  479. package/dist/composition/grounding.js.map +1 -1
  480. package/dist/composition/identifiability.d.ts +91 -4
  481. package/dist/composition/identifiability.d.ts.map +1 -1
  482. package/dist/composition/identifiability.js +363 -6
  483. package/dist/composition/identifiability.js.map +1 -1
  484. package/dist/composition/index.d.ts +8 -4
  485. package/dist/composition/index.d.ts.map +1 -1
  486. package/dist/composition/index.js +3 -2
  487. package/dist/composition/index.js.map +1 -1
  488. package/dist/composition/mathts-quiet.d.ts +7 -8
  489. package/dist/composition/mathts-quiet.d.ts.map +1 -1
  490. package/dist/composition/mathts-quiet.js +7 -16
  491. package/dist/composition/mathts-quiet.js.map +1 -1
  492. package/dist/composition/mathts-scalar-symbols.d.ts.map +1 -1
  493. package/dist/composition/mathts-scalar-symbols.js +2 -1
  494. package/dist/composition/mathts-scalar-symbols.js.map +1 -1
  495. package/dist/composition/own-equation-magnitude.d.ts +95 -0
  496. package/dist/composition/own-equation-magnitude.d.ts.map +1 -0
  497. package/dist/composition/own-equation-magnitude.js +270 -0
  498. package/dist/composition/own-equation-magnitude.js.map +1 -0
  499. package/dist/composition/probe/backend-protocol.d.ts +3 -0
  500. package/dist/composition/probe/backend-protocol.d.ts.map +1 -1
  501. package/dist/composition/probe/backend-protocol.js.map +1 -1
  502. package/dist/composition/probe/candidate-store.d.ts +1 -0
  503. package/dist/composition/probe/candidate-store.d.ts.map +1 -1
  504. package/dist/composition/probe/candidate-store.js +1 -0
  505. package/dist/composition/probe/candidate-store.js.map +1 -1
  506. package/dist/composition/probe/corpus.d.ts +8 -4
  507. package/dist/composition/probe/corpus.d.ts.map +1 -1
  508. package/dist/composition/probe/corpus.js +23 -12
  509. package/dist/composition/probe/corpus.js.map +1 -1
  510. package/dist/composition/probe/dataset.d.ts +18 -0
  511. package/dist/composition/probe/dataset.d.ts.map +1 -1
  512. package/dist/composition/probe/dataset.js +95 -50
  513. package/dist/composition/probe/dataset.js.map +1 -1
  514. package/dist/composition/probe/experiment-design.d.ts +7 -1
  515. package/dist/composition/probe/experiment-design.d.ts.map +1 -1
  516. package/dist/composition/probe/experiment-design.js +44 -24
  517. package/dist/composition/probe/experiment-design.js.map +1 -1
  518. package/dist/composition/probe/falsify.d.ts +2 -0
  519. package/dist/composition/probe/falsify.d.ts.map +1 -1
  520. package/dist/composition/probe/falsify.js +2 -0
  521. package/dist/composition/probe/falsify.js.map +1 -1
  522. package/dist/composition/probe/fit.d.ts +7 -0
  523. package/dist/composition/probe/fit.d.ts.map +1 -1
  524. package/dist/composition/probe/fit.js +46 -22
  525. package/dist/composition/probe/fit.js.map +1 -1
  526. package/dist/composition/probe/frontier.d.ts.map +1 -1
  527. package/dist/composition/probe/frontier.js +33 -15
  528. package/dist/composition/probe/frontier.js.map +1 -1
  529. package/dist/composition/probe/generator.d.ts +30 -1
  530. package/dist/composition/probe/generator.d.ts.map +1 -1
  531. package/dist/composition/probe/generator.js +58 -36
  532. package/dist/composition/probe/generator.js.map +1 -1
  533. package/dist/composition/probe/index.d.ts +14 -0
  534. package/dist/composition/probe/index.d.ts.map +1 -1
  535. package/dist/composition/probe/index.js +6 -0
  536. package/dist/composition/probe/index.js.map +1 -1
  537. package/dist/composition/probe/limits.d.ts +25 -1
  538. package/dist/composition/probe/limits.d.ts.map +1 -1
  539. package/dist/composition/probe/limits.js +53 -11
  540. package/dist/composition/probe/limits.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 +73 -24
  544. package/dist/composition/probe/pipeline.js.map +1 -1
  545. package/dist/composition/probe/power-law.d.ts +121 -0
  546. package/dist/composition/probe/power-law.d.ts.map +1 -0
  547. package/dist/composition/probe/power-law.js +251 -0
  548. package/dist/composition/probe/power-law.js.map +1 -0
  549. package/dist/composition/probe/problem.d.ts +8 -4
  550. package/dist/composition/probe/problem.d.ts.map +1 -1
  551. package/dist/composition/probe/problem.js +177 -49
  552. package/dist/composition/probe/problem.js.map +1 -1
  553. package/dist/composition/probe/report.js +1 -1
  554. package/dist/composition/probe/report.js.map +1 -1
  555. package/dist/composition/probe/residual.d.ts +7 -1
  556. package/dist/composition/probe/residual.d.ts.map +1 -1
  557. package/dist/composition/probe/residual.js +10 -7
  558. package/dist/composition/probe/residual.js.map +1 -1
  559. package/dist/composition/probe/run-manifest.d.ts +1 -0
  560. package/dist/composition/probe/run-manifest.d.ts.map +1 -1
  561. package/dist/composition/probe/run-manifest.js.map +1 -1
  562. package/dist/composition/probe/scalar-search.d.ts +50 -0
  563. package/dist/composition/probe/scalar-search.d.ts.map +1 -0
  564. package/dist/composition/probe/scalar-search.js +169 -0
  565. package/dist/composition/probe/scalar-search.js.map +1 -0
  566. package/dist/composition/probe/scoring.d.ts +1 -0
  567. package/dist/composition/probe/scoring.d.ts.map +1 -1
  568. package/dist/composition/probe/scoring.js.map +1 -1
  569. package/dist/composition/probe/structure.d.ts +82 -17
  570. package/dist/composition/probe/structure.d.ts.map +1 -1
  571. package/dist/composition/probe/structure.js +129 -55
  572. package/dist/composition/probe/structure.js.map +1 -1
  573. package/dist/composition/probe/study.d.ts +31 -9
  574. package/dist/composition/probe/study.d.ts.map +1 -1
  575. package/dist/composition/probe/study.js +235 -184
  576. package/dist/composition/probe/study.js.map +1 -1
  577. package/dist/composition/probe/t-tail.d.ts +16 -0
  578. package/dist/composition/probe/t-tail.d.ts.map +1 -0
  579. package/dist/composition/probe/t-tail.js +29 -0
  580. package/dist/composition/probe/t-tail.js.map +1 -0
  581. package/dist/composition/probe/types.d.ts +3 -0
  582. package/dist/composition/probe/types.d.ts.map +1 -1
  583. package/dist/composition/probe/types.js.map +1 -1
  584. package/dist/composition/proposed-bridges.d.ts +52 -12
  585. package/dist/composition/proposed-bridges.d.ts.map +1 -1
  586. package/dist/composition/proposed-bridges.js +107 -60
  587. package/dist/composition/proposed-bridges.js.map +1 -1
  588. package/dist/composition/quantity-clusters.d.ts +48 -0
  589. package/dist/composition/quantity-clusters.d.ts.map +1 -0
  590. package/dist/composition/quantity-clusters.js +98 -0
  591. package/dist/composition/quantity-clusters.js.map +1 -0
  592. package/dist/composition/rational-exponent.d.ts +40 -0
  593. package/dist/composition/rational-exponent.d.ts.map +1 -0
  594. package/dist/composition/rational-exponent.js +65 -0
  595. package/dist/composition/rational-exponent.js.map +1 -0
  596. package/dist/composition/representative-values.d.ts +22 -0
  597. package/dist/composition/representative-values.d.ts.map +1 -1
  598. package/dist/composition/representative-values.js +29 -0
  599. package/dist/composition/representative-values.js.map +1 -1
  600. package/dist/composition/retrodiction.d.ts +15 -0
  601. package/dist/composition/retrodiction.d.ts.map +1 -1
  602. package/dist/composition/retrodiction.js +12 -4
  603. package/dist/composition/retrodiction.js.map +1 -1
  604. package/dist/composition/user-equation.d.ts +1 -0
  605. package/dist/composition/user-equation.d.ts.map +1 -1
  606. package/dist/composition/user-equation.js +3 -2
  607. package/dist/composition/user-equation.js.map +1 -1
  608. package/dist/core/assignment.d.ts +19 -0
  609. package/dist/core/assignment.d.ts.map +1 -0
  610. package/dist/core/assignment.js +19 -0
  611. package/dist/core/assignment.js.map +1 -0
  612. package/dist/core/compare.d.ts +32 -0
  613. package/dist/core/compare.d.ts.map +1 -0
  614. package/dist/core/compare.js +46 -0
  615. package/dist/core/compare.js.map +1 -0
  616. package/dist/core/constants.d.ts +42 -41
  617. package/dist/core/constants.d.ts.map +1 -1
  618. package/dist/core/constants.js +71 -51
  619. package/dist/core/constants.js.map +1 -1
  620. package/dist/core/data-file.d.ts +7 -0
  621. package/dist/core/data-file.d.ts.map +1 -1
  622. package/dist/core/data-file.js +17 -0
  623. package/dist/core/data-file.js.map +1 -1
  624. package/dist/core/format.d.ts +36 -0
  625. package/dist/core/format.d.ts.map +1 -0
  626. package/dist/core/format.js +39 -0
  627. package/dist/core/format.js.map +1 -0
  628. package/dist/core/hash.d.ts +14 -0
  629. package/dist/core/hash.d.ts.map +1 -0
  630. package/dist/core/hash.js +17 -0
  631. package/dist/core/hash.js.map +1 -0
  632. package/dist/core/json-schema.d.ts +2 -0
  633. package/dist/core/json-schema.d.ts.map +1 -1
  634. package/dist/core/json-schema.js +14 -13
  635. package/dist/core/json-schema.js.map +1 -1
  636. package/dist/core/labeled-tensor.d.ts.map +1 -1
  637. package/dist/core/labeled-tensor.js +0 -8
  638. package/dist/core/labeled-tensor.js.map +1 -1
  639. package/dist/core/mathts-read.d.ts +25 -0
  640. package/dist/core/mathts-read.d.ts.map +1 -0
  641. package/dist/core/mathts-read.js +51 -0
  642. package/dist/core/mathts-read.js.map +1 -0
  643. package/dist/core/tensor.d.ts.map +1 -1
  644. package/dist/core/tensor.js +24 -0
  645. package/dist/core/tensor.js.map +1 -1
  646. package/dist/core/types.d.ts +5 -5
  647. package/dist/diff/bridge-ast-gradient.d.ts +27 -23
  648. package/dist/diff/bridge-ast-gradient.d.ts.map +1 -1
  649. package/dist/diff/bridge-ast-gradient.js +75 -173
  650. package/dist/diff/bridge-ast-gradient.js.map +1 -1
  651. package/dist/diff/bridge-gradient.d.ts +19 -6
  652. package/dist/diff/bridge-gradient.d.ts.map +1 -1
  653. package/dist/diff/bridge-gradient.js +19 -11
  654. package/dist/diff/bridge-gradient.js.map +1 -1
  655. package/dist/diff/bridge-specs.d.ts.map +1 -1
  656. package/dist/diff/bridge-specs.js +3 -0
  657. package/dist/diff/bridge-specs.js.map +1 -1
  658. package/dist/dimensional/algebra.d.ts +18 -0
  659. package/dist/dimensional/algebra.d.ts.map +1 -1
  660. package/dist/dimensional/algebra.js +41 -1
  661. package/dist/dimensional/algebra.js.map +1 -1
  662. package/dist/dimensional/ast-builders.d.ts +7 -0
  663. package/dist/dimensional/ast-builders.d.ts.map +1 -1
  664. package/dist/dimensional/ast-builders.js +11 -0
  665. package/dist/dimensional/ast-builders.js.map +1 -1
  666. package/dist/dimensional/ast-leaves.d.ts +81 -0
  667. package/dist/dimensional/ast-leaves.d.ts.map +1 -0
  668. package/dist/dimensional/ast-leaves.js +146 -0
  669. package/dist/dimensional/ast-leaves.js.map +1 -0
  670. package/dist/dimensional/ast-types.d.ts +15 -0
  671. package/dist/dimensional/ast-types.d.ts.map +1 -1
  672. package/dist/dimensional/ast-types.js.map +1 -1
  673. package/dist/dimensional/buckingham.d.ts.map +1 -1
  674. package/dist/dimensional/buckingham.js +15 -27
  675. package/dist/dimensional/buckingham.js.map +1 -1
  676. package/dist/dimensional/constant-rows.js +9 -9
  677. package/dist/dimensional/constant-rows.js.map +1 -1
  678. package/dist/dimensional/curvature-composite.d.ts +1 -1
  679. package/dist/dimensional/curvature-composite.js.map +1 -1
  680. package/dist/dimensional/dimension-inference.d.ts.map +1 -1
  681. package/dist/dimensional/dimension-inference.js +1 -2
  682. package/dist/dimensional/dimension-inference.js.map +1 -1
  683. package/dist/dimensional/errors.d.ts +1 -1
  684. package/dist/dimensional/errors.d.ts.map +1 -1
  685. package/dist/dimensional/errors.js +1 -15
  686. package/dist/dimensional/errors.js.map +1 -1
  687. package/dist/dimensional/exact-scale.d.ts +24 -11
  688. package/dist/dimensional/exact-scale.d.ts.map +1 -1
  689. package/dist/dimensional/exact-scale.js +122 -130
  690. package/dist/dimensional/exact-scale.js.map +1 -1
  691. package/dist/dimensional/gauge-field.d.ts.map +1 -1
  692. package/dist/dimensional/gauge-field.js +2 -2
  693. package/dist/dimensional/gauge-field.js.map +1 -1
  694. package/dist/dimensional/hyphen-names.d.ts +12 -2
  695. package/dist/dimensional/hyphen-names.d.ts.map +1 -1
  696. package/dist/dimensional/hyphen-names.js +44 -19
  697. package/dist/dimensional/hyphen-names.js.map +1 -1
  698. package/dist/dimensional/mathts-unit-delegation.d.ts +29 -0
  699. package/dist/dimensional/mathts-unit-delegation.d.ts.map +1 -0
  700. package/dist/dimensional/mathts-unit-delegation.js +187 -0
  701. package/dist/dimensional/mathts-unit-delegation.js.map +1 -0
  702. package/dist/dimensional/mathts-unit-wrapper.d.ts +33 -0
  703. package/dist/dimensional/mathts-unit-wrapper.d.ts.map +1 -0
  704. package/dist/dimensional/mathts-unit-wrapper.js +190 -0
  705. package/dist/dimensional/mathts-unit-wrapper.js.map +1 -0
  706. package/dist/dimensional/metric.d.ts.map +1 -1
  707. package/dist/dimensional/metric.js +0 -1
  708. package/dist/dimensional/metric.js.map +1 -1
  709. package/dist/dimensional/scalar-lowering.d.ts +21 -0
  710. package/dist/dimensional/scalar-lowering.d.ts.map +1 -0
  711. package/dist/dimensional/scalar-lowering.js +45 -0
  712. package/dist/dimensional/scalar-lowering.js.map +1 -0
  713. package/dist/dimensional/symbolic-constants.d.ts +9 -0
  714. package/dist/dimensional/symbolic-constants.d.ts.map +1 -1
  715. package/dist/dimensional/symbolic-constants.js +13 -1
  716. package/dist/dimensional/symbolic-constants.js.map +1 -1
  717. package/dist/dimensional/types.d.ts +36 -0
  718. package/dist/dimensional/types.d.ts.map +1 -1
  719. package/dist/dimensional/types.js +45 -7
  720. package/dist/dimensional/types.js.map +1 -1
  721. package/dist/dimensional/unit-data.d.ts +5 -1
  722. package/dist/dimensional/unit-data.d.ts.map +1 -1
  723. package/dist/dimensional/unit-data.js +30 -6
  724. package/dist/dimensional/unit-data.js.map +1 -1
  725. package/dist/dimensional/units.d.ts +2 -0
  726. package/dist/dimensional/units.d.ts.map +1 -1
  727. package/dist/dimensional/units.js +59 -3
  728. package/dist/dimensional/units.js.map +1 -1
  729. package/dist/dimensional/validator.d.ts +2 -0
  730. package/dist/dimensional/validator.d.ts.map +1 -1
  731. package/dist/dimensional/validator.js.map +1 -1
  732. package/dist/index.d.ts +9 -3
  733. package/dist/index.d.ts.map +1 -1
  734. package/dist/index.js +10 -4
  735. package/dist/index.js.map +1 -1
  736. package/dist/numerical/christoffel-flat.d.ts.map +1 -1
  737. package/dist/numerical/christoffel-flat.js +3 -2
  738. package/dist/numerical/christoffel-flat.js.map +1 -1
  739. package/dist/numerical/connection-lowering-helpers.d.ts +3 -1
  740. package/dist/numerical/connection-lowering-helpers.d.ts.map +1 -1
  741. package/dist/numerical/connection-lowering-helpers.js +11 -15
  742. package/dist/numerical/connection-lowering-helpers.js.map +1 -1
  743. package/dist/numerical/covariant-eikonal.d.ts.map +1 -1
  744. package/dist/numerical/covariant-eikonal.js +34 -11
  745. package/dist/numerical/covariant-eikonal.js.map +1 -1
  746. package/dist/numerical/curvature-lowering-helpers.js +3 -2
  747. package/dist/numerical/curvature-lowering-helpers.js.map +1 -1
  748. package/dist/numerical/errors.d.ts.map +1 -1
  749. package/dist/numerical/errors.js +0 -3
  750. package/dist/numerical/errors.js.map +1 -1
  751. package/dist/numerical/finite-difference.d.ts +22 -0
  752. package/dist/numerical/finite-difference.d.ts.map +1 -0
  753. package/dist/numerical/finite-difference.js +27 -0
  754. package/dist/numerical/finite-difference.js.map +1 -0
  755. package/dist/numerical/geodesic-integrator.d.ts.map +1 -1
  756. package/dist/numerical/geodesic-integrator.js +22 -14
  757. package/dist/numerical/geodesic-integrator.js.map +1 -1
  758. package/dist/numerical/geometrized.d.ts.map +1 -1
  759. package/dist/numerical/geometrized.js +0 -1
  760. package/dist/numerical/geometrized.js.map +1 -1
  761. package/dist/numerical/mathts-engine.d.ts.map +1 -1
  762. package/dist/numerical/mathts-engine.js +10 -24
  763. package/dist/numerical/mathts-engine.js.map +1 -1
  764. package/dist/numerical/metric-inverse.d.ts.map +1 -1
  765. package/dist/numerical/metric-inverse.js +83 -46
  766. package/dist/numerical/metric-inverse.js.map +1 -1
  767. package/dist/numerical/null-ray-integrator.d.ts +2 -1
  768. package/dist/numerical/null-ray-integrator.d.ts.map +1 -1
  769. package/dist/numerical/null-ray-integrator.js +12 -12
  770. package/dist/numerical/null-ray-integrator.js.map +1 -1
  771. package/dist/numerical/painleve-gullstrand-metric.js +2 -2
  772. package/dist/numerical/painleve-gullstrand-metric.js.map +1 -1
  773. package/dist/numerical/pderiv.d.ts.map +1 -1
  774. package/dist/numerical/pderiv.js +2 -6
  775. package/dist/numerical/pderiv.js.map +1 -1
  776. package/dist/numerical/perihelion-finder.d.ts +0 -36
  777. package/dist/numerical/perihelion-finder.d.ts.map +1 -1
  778. package/dist/numerical/perihelion-finder.js +41 -87
  779. package/dist/numerical/perihelion-finder.js.map +1 -1
  780. package/dist/numerical/quadrature.d.ts.map +1 -1
  781. package/dist/numerical/quadrature.js +11 -13
  782. package/dist/numerical/quadrature.js.map +1 -1
  783. package/dist/numerical/rk4-trajectory.d.ts +10 -0
  784. package/dist/numerical/rk4-trajectory.d.ts.map +1 -0
  785. package/dist/numerical/rk4-trajectory.js +37 -0
  786. package/dist/numerical/rk4-trajectory.js.map +1 -0
  787. package/dist/numerical/schwarzschild.d.ts +14 -0
  788. package/dist/numerical/schwarzschild.d.ts.map +1 -0
  789. package/dist/numerical/schwarzschild.js +17 -0
  790. package/dist/numerical/schwarzschild.js.map +1 -0
  791. package/dist/numerical/spacetime-metrics.d.ts +12 -0
  792. package/dist/numerical/spacetime-metrics.d.ts.map +1 -1
  793. package/dist/numerical/spacetime-metrics.js +72 -56
  794. package/dist/numerical/spacetime-metrics.js.map +1 -1
  795. package/dist/numerical/statistics.d.ts +24 -0
  796. package/dist/numerical/statistics.d.ts.map +1 -0
  797. package/dist/numerical/statistics.js +52 -0
  798. package/dist/numerical/statistics.js.map +1 -0
  799. package/dist/numerical/strides.d.ts +3 -2
  800. package/dist/numerical/strides.d.ts.map +1 -1
  801. package/dist/numerical/strides.js +3 -10
  802. package/dist/numerical/strides.js.map +1 -1
  803. package/dist/numerical/tensor-engine.d.ts +21 -0
  804. package/dist/numerical/tensor-engine.d.ts.map +1 -1
  805. package/dist/numerical/tensor-engine.js +12 -0
  806. package/dist/numerical/tensor-engine.js.map +1 -1
  807. package/dist/relations/regime.d.ts +10 -0
  808. package/dist/relations/regime.d.ts.map +1 -1
  809. package/dist/relations/regime.js +18 -1
  810. package/dist/relations/regime.js.map +1 -1
  811. package/package.json +9 -12
  812. package/dist/cases/brownian-sphere.d.ts +0 -68
  813. package/dist/cases/brownian-sphere.d.ts.map +0 -1
  814. package/dist/cases/brownian-sphere.js +0 -354
  815. package/dist/cases/brownian-sphere.js.map +0 -1
  816. package/dist/cases/damped-resonator.d.ts +0 -23
  817. package/dist/cases/damped-resonator.d.ts.map +0 -1
  818. package/dist/cases/damped-resonator.js +0 -224
  819. package/dist/cases/damped-resonator.js.map +0 -1
  820. package/dist/cases/kepler-rv.d.ts +0 -13
  821. package/dist/cases/kepler-rv.d.ts.map +0 -1
  822. package/dist/cases/kepler-rv.js +0 -172
  823. package/dist/cases/kepler-rv.js.map +0 -1
  824. package/dist/cases/lumped-cooling.d.ts +0 -46
  825. package/dist/cases/lumped-cooling.d.ts.map +0 -1
  826. package/dist/cases/lumped-cooling.js +0 -261
  827. package/dist/cases/lumped-cooling.js.map +0 -1
  828. package/dist/cases/resistor-noise.d.ts +0 -14
  829. package/dist/cases/resistor-noise.d.ts.map +0 -1
  830. package/dist/cases/resistor-noise.js +0 -215
  831. package/dist/cases/resistor-noise.js.map +0 -1
  832. package/dist/cases/skin-depth.d.ts +0 -21
  833. package/dist/cases/skin-depth.d.ts.map +0 -1
  834. package/dist/cases/skin-depth.js +0 -174
  835. package/dist/cases/skin-depth.js.map +0 -1
@@ -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,CAA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AU,KAAK,KAAK;QACpB,YAAY;QACZ,eAAe;QACf,OAAO,EAAE,KAAK,KAAK,SAAS;QAC5B,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,EACpB,CAAC;QACD,MAAM,MAAM,GAAG,aAAa,CAAC,YAAY,EAAE,eAAe,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QAC3E,MAAM,IAAI,GAAG,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QACzE,IAAI,IAAI,EAAE,CAAC;YACT,UAAU,GAAG,IAAI,CAAC;YAClB,OAAO,GAAG,IAAI,CAAC;QACjB,CAAC;IACH,CAAC;IAED,OAAO;QACL,QAAQ,EAAE;YACR,EAAE,EAAE,eAAe;YACnB,KAAK,EAAE,EAAE,CAAC,IAAI;YACd,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YAC/C,MAAM,EAAE,cAAc,IAAI,EAAE,CAAC,MAAM;SACpC;QACD,UAAU;QACV,YAAY;QACZ,eAAe;QACf,UAAU;QACV,KAAK;QACL,aAAa,EAAE,CAAC,GAAG,QAAQ,EAAE,GAAG,UAAU,EAAE,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"]}
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,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AACvF,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,M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;QACpB,YAAY;QACZ,eAAe;QACf,OAAO,EAAE,KAAK,KAAK,SAAS;QAC5B,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,EACpB,CAAC;QACD,MAAM,MAAM,GAAG,aAAa,CAAC,YAAY,EAAE,eAAe,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QAC3E,MAAM,IAAI,GAAG,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QACzE,IAAI,IAAI,EAAE,CAAC;YACT,UAAU,GAAG,IAAI,CAAC;YAClB,OAAO,GAAG,IAAI,CAAC;QACjB,CAAC;IACH,CAAC;IAED,OAAO;QACL,QAAQ,EAAE;YACR,EAAE,EAAE,eAAe;YACnB,KAAK,EAAE,EAAE,CAAC,IAAI;YACd,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YAC/C,MAAM,EAAE,cAAc,IAAI,EAAE,CAAC,MAAM;SACpC;QACD,UAAU;QACV,YAAY;QACZ,eAAe;QACf,UAAU;QACV,KAAK;QACL,aAAa,EAAE,CAAC,GAAG,QAAQ,EAAE,GAAG,UAAU,EAAE,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, isRegisteredConstant } 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\n/** Parse a `TARGET = EXPR` equation into its target and source quantities. A malformed equation throws. */\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((v) => !isRegisteredConstant(v));\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"]}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * One split of a `name=value` token.
3
+ *
4
+ * Every reader of such tokens (the CLI bindings, an evaluator's `key=value`
5
+ * arguments, a metric's parameters, a discovery anchor) splits on the first
6
+ * `=` and refuses a token with no `=` or an empty name. The split is here,
7
+ * once; what a null means (usage error, unit error, metric refusal) and what
8
+ * an empty value means stay with the caller.
9
+ *
10
+ * @module core/assignment
11
+ */
12
+ /** A `name=value` token split on its first `=`. `raw` may be empty (`mass=`). @internal */
13
+ export interface SplitAssignment {
14
+ readonly name: string;
15
+ readonly raw: string;
16
+ }
17
+ /** `token` split on its first `=`, or null when it has no `=` or an empty name. @internal */
18
+ export declare function splitAssignment(token: string): SplitAssignment | null;
19
+ //# sourceMappingURL=assignment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assignment.d.ts","sourceRoot":"","sources":["../../src/core/assignment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,2FAA2F;AAC3F,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED,6FAA6F;AAC7F,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAIrE"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * One split of a `name=value` token.
3
+ *
4
+ * Every reader of such tokens (the CLI bindings, an evaluator's `key=value`
5
+ * arguments, a metric's parameters, a discovery anchor) splits on the first
6
+ * `=` and refuses a token with no `=` or an empty name. The split is here,
7
+ * once; what a null means (usage error, unit error, metric refusal) and what
8
+ * an empty value means stay with the caller.
9
+ *
10
+ * @module core/assignment
11
+ */
12
+ /** `token` split on its first `=`, or null when it has no `=` or an empty name. @internal */
13
+ export function splitAssignment(token) {
14
+ const eq = token.indexOf('=');
15
+ if (eq <= 0)
16
+ return null;
17
+ return { name: token.slice(0, eq), raw: token.slice(eq + 1) };
18
+ }
19
+ //# sourceMappingURL=assignment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assignment.js","sourceRoot":"","sources":["../../src/core/assignment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAQH,6FAA6F;AAC7F,MAAM,UAAU,eAAe,CAAC,KAAa;IAC3C,MAAM,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC9B,IAAI,EAAE,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACzB,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC;AAChE,CAAC","sourcesContent":["/**\n * One split of a `name=value` token.\n *\n * Every reader of such tokens (the CLI bindings, an evaluator's `key=value`\n * arguments, a metric's parameters, a discovery anchor) splits on the first\n * `=` and refuses a token with no `=` or an empty name. The split is here,\n * once; what a null means (usage error, unit error, metric refusal) and what\n * an empty value means stay with the caller.\n *\n * @module core/assignment\n */\n\n/** A `name=value` token split on its first `=`. `raw` may be empty (`mass=`). @internal */\nexport interface SplitAssignment {\n readonly name: string;\n readonly raw: string;\n}\n\n/** `token` split on its first `=`, or null when it has no `=` or an empty name. @internal */\nexport function splitAssignment(token: string): SplitAssignment | null {\n const eq = token.indexOf('=');\n if (eq <= 0) return null;\n return { name: token.slice(0, eq), raw: token.slice(eq + 1) };\n}\n"]}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Numeric and string comparisons the layers above share.
3
+ *
4
+ * Two quotients state how far a value is from a reference; three predicates
5
+ * decide agreement in the product form `|a − b| ≤ tol · scale`, which is the
6
+ * form the sites that migrated here used, so a verdict at a tolerance
7
+ * boundary does not move by an ulp. The codepoint order is the sort that
8
+ * `a < b ? -1 : a > b ? 1 : 0` spelled at ten sites; it is not
9
+ * `localeCompare`, and a sort that used `localeCompare` keeps it.
10
+ *
11
+ * @module core/compare
12
+ */
13
+ /** `|value − ref| / max(|ref|, floor)`: the relative difference against a reference, with a floor for a reference near zero. @internal */
14
+ export declare function relDiff(value: number, ref: number, floor?: number): number;
15
+ /** `|a − b| / max(|a|, |b|, floor)`: the relative difference of two values neither of which is the reference. @internal */
16
+ export declare function symmetricRelDiff(a: number, b: number, floor?: number): number;
17
+ /** `|value − ref| ≤ tol · max(|ref|, floor)`: agreement relative to the reference. @internal */
18
+ export declare function withinRel(value: number, ref: number, tol: number, floor?: number): boolean;
19
+ /**
20
+ * `|value − ref| ≤ tol · max(1, |ref|)`: relative far from one, absolute near
21
+ * zero. The form a stored number written to a few significant digits is
22
+ * checked against the computed one with.
23
+ * @internal
24
+ */
25
+ export declare function withinMixed(value: number, ref: number, tol: number): boolean;
26
+ /** `|a − b| ≤ tol · max(|a|, |b|, floor)`: agreement of two values neither of which is the reference. @internal */
27
+ export declare function withinSymmetric(a: number, b: number, tol: number, floor?: number): boolean;
28
+ /** The UTF-16 code-unit order of two strings: −1, 0 or 1. Not `localeCompare`. @internal */
29
+ export declare function compareCodepoint(a: string, b: string): number;
30
+ /** A comparator over records, by a string key in codepoint order. @internal */
31
+ export declare function byKey<T>(key: (item: T) => string): (a: T, b: T) => number;
32
+ //# sourceMappingURL=compare.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compare.d.ts","sourceRoot":"","sources":["../../src/core/compare.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,0IAA0I;AAC1I,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,SAAI,GAAG,MAAM,CAErE;AAED,2HAA2H;AAC3H,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,SAAI,GAAG,MAAM,CAExE;AAED,gGAAgG;AAChG,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,SAAI,GAAG,OAAO,CAErF;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAE5E;AAED,mHAAmH;AACnH,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,SAAI,GAAG,OAAO,CAErF;AAED,4FAA4F;AAC5F,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED,+EAA+E;AAC/E,wBAAgB,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,MAAM,CAEzE"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Numeric and string comparisons the layers above share.
3
+ *
4
+ * Two quotients state how far a value is from a reference; three predicates
5
+ * decide agreement in the product form `|a − b| ≤ tol · scale`, which is the
6
+ * form the sites that migrated here used, so a verdict at a tolerance
7
+ * boundary does not move by an ulp. The codepoint order is the sort that
8
+ * `a < b ? -1 : a > b ? 1 : 0` spelled at ten sites; it is not
9
+ * `localeCompare`, and a sort that used `localeCompare` keeps it.
10
+ *
11
+ * @module core/compare
12
+ */
13
+ /** `|value − ref| / max(|ref|, floor)`: the relative difference against a reference, with a floor for a reference near zero. @internal */
14
+ export function relDiff(value, ref, floor = 0) {
15
+ return Math.abs(value - ref) / Math.max(Math.abs(ref), floor);
16
+ }
17
+ /** `|a − b| / max(|a|, |b|, floor)`: the relative difference of two values neither of which is the reference. @internal */
18
+ export function symmetricRelDiff(a, b, floor = 0) {
19
+ return Math.abs(a - b) / Math.max(Math.abs(a), Math.abs(b), floor);
20
+ }
21
+ /** `|value − ref| ≤ tol · max(|ref|, floor)`: agreement relative to the reference. @internal */
22
+ export function withinRel(value, ref, tol, floor = 0) {
23
+ return Math.abs(value - ref) <= tol * Math.max(Math.abs(ref), floor);
24
+ }
25
+ /**
26
+ * `|value − ref| ≤ tol · max(1, |ref|)`: relative far from one, absolute near
27
+ * zero. The form a stored number written to a few significant digits is
28
+ * checked against the computed one with.
29
+ * @internal
30
+ */
31
+ export function withinMixed(value, ref, tol) {
32
+ return Math.abs(value - ref) <= tol * Math.max(1, Math.abs(ref));
33
+ }
34
+ /** `|a − b| ≤ tol · max(|a|, |b|, floor)`: agreement of two values neither of which is the reference. @internal */
35
+ export function withinSymmetric(a, b, tol, floor = 1) {
36
+ return Math.abs(a - b) <= tol * Math.max(Math.abs(a), Math.abs(b), floor);
37
+ }
38
+ /** The UTF-16 code-unit order of two strings: −1, 0 or 1. Not `localeCompare`. @internal */
39
+ export function compareCodepoint(a, b) {
40
+ return a < b ? -1 : a > b ? 1 : 0;
41
+ }
42
+ /** A comparator over records, by a string key in codepoint order. @internal */
43
+ export function byKey(key) {
44
+ return (a, b) => compareCodepoint(key(a), key(b));
45
+ }
46
+ //# sourceMappingURL=compare.js.map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,CAAS,EAAE,GAAW,EAAE,KAAK,GAAG,CAAC;IAC1E,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AAC5E,CAAC;AAED,4FAA4F;AAC5F,MAAM,UAAU,gBAAgB,CAAC,CAAS,EAAE,CAAS;IACnD,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACpC,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,KAAK,CAAI,GAAwB;IAC/C,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACpD,CAAC","sourcesContent":["/**\n * Numeric and string comparisons the layers above share.\n *\n * Two quotients state how far a value is from a reference; three predicates\n * decide agreement in the product form `|a − b| ≤ tol · scale`, which is the\n * form the sites that migrated here used, so a verdict at a tolerance\n * boundary does not move by an ulp. The codepoint order is the sort that\n * `a < b ? -1 : a > b ? 1 : 0` spelled at ten sites; it is not\n * `localeCompare`, and a sort that used `localeCompare` keeps it.\n *\n * @module core/compare\n */\n\n/** `|value − ref| / max(|ref|, floor)`: the relative difference against a reference, with a floor for a reference near zero. @internal */\nexport function relDiff(value: number, ref: number, floor = 0): number {\n return Math.abs(value - ref) / Math.max(Math.abs(ref), floor);\n}\n\n/** `|a − b| / max(|a|, |b|, floor)`: the relative difference of two values neither of which is the reference. @internal */\nexport function symmetricRelDiff(a: number, b: number, floor = 0): number {\n return Math.abs(a - b) / Math.max(Math.abs(a), Math.abs(b), floor);\n}\n\n/** `|value − ref| ≤ tol · max(|ref|, floor)`: agreement relative to the reference. @internal */\nexport function withinRel(value: number, ref: number, tol: number, floor = 0): boolean {\n return Math.abs(value - ref) <= tol * Math.max(Math.abs(ref), floor);\n}\n\n/**\n * `|value − ref| ≤ tol · max(1, |ref|)`: relative far from one, absolute near\n * zero. The form a stored number written to a few significant digits is\n * checked against the computed one with.\n * @internal\n */\nexport function withinMixed(value: number, ref: number, tol: number): boolean {\n return Math.abs(value - ref) <= tol * Math.max(1, Math.abs(ref));\n}\n\n/** `|a − b| ≤ tol · max(|a|, |b|, floor)`: agreement of two values neither of which is the reference. @internal */\nexport function withinSymmetric(a: number, b: number, tol: number, floor = 1): boolean {\n return Math.abs(a - b) <= tol * Math.max(Math.abs(a), Math.abs(b), floor);\n}\n\n/** The UTF-16 code-unit order of two strings: −1, 0 or 1. Not `localeCompare`. @internal */\nexport function compareCodepoint(a: string, b: string): number {\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\n/** A comparator over records, by a string key in codepoint order. @internal */\nexport function byKey<T>(key: (item: T) => string): (a: T, b: T) => number {\n return (a, b) => compareCodepoint(key(a), key(b));\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Canonical CODATA 2018 + SI-defined physical constants for UPT.
2
+ * Canonical CODATA 2022 + SI-defined physical constants for UPT.
3
3
  *
4
4
  * The one owner of every fundamental physical constant used across the
5
5
  * numerical, dimensional, and bridge layers; `tests/core/constants-owner.test.ts`
@@ -9,63 +9,64 @@
9
9
  * • Exact-SI definitions (`C_SI`, `H_SI`, `K_B_SI`, `E_SI`) where the
10
10
  * 2019 SI redefinition fixed their values exactly.
11
11
  * • `HBAR_SI` is the exact quotient `H_SI / (2π)`, not the truncated CODATA display.
12
- * • CODATA 2018 best estimates for measured constants (`G_SI`, `ALPHA`, Planck units).
13
- * • Planck 2018 best estimate for `H0_SI`, in SI through the unit table's parsec.
12
+ * • CODATA 2022 best estimates for measured constants (`G_SI`, `ALPHA`, Planck units).
13
+ * • Planck 2018 best estimate for `H0_SI`, in SI through MathTS
14
+ * `Unit.exactScale('km/s/Mpc')` — the same exact-scale path the unit
15
+ * reader delegates to. This module cannot import `convertValue`
16
+ * (`dimensional/` is tier 1; `core/` is tier 0).
14
17
  *
15
18
  * This file is the one owner of every value. `PhysicalConstants` in
16
19
  * `src/core/types.ts` and the constant registry in
17
20
  * `src/dimensional/symbolic-constants.ts` are projections of it, and a test
18
- * refuses a CODATA literal anywhere else under `src/`. A unit is the unit
19
- * table's: `H0_SI` reads the parsec from `data/units.json` rather than
20
- * restating it, so the Hubble rate here and `67.4 km/s/Mpc` read through the
21
- * unit table are one number.
21
+ * refuses a CODATA literal anywhere else under `src/`.
22
22
  *
23
23
  * @module core/constants
24
24
  * @public
25
25
  */
26
26
  /** Speed of light in vacuum (m/s). Exact SI definition since 1983. */
27
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
- /** Newtonian gravitational constant (m³ kg⁻¹ s⁻²). CODATA 2018. */
31
- export declare const G_SI = 6.6743e-11;
28
+ /** Rydberg constant R∞ (infinite nuclear mass), CODATA 2022 (m⁻¹), read from MathTS. */
29
+ export declare const R_INF_SI: number;
30
+ /** Newtonian gravitational constant (m³ kg⁻¹ s⁻²). CODATA 2022. */
31
+ export declare const G_SI: number;
32
32
  /** Planck constant (J·s). Exact SI definition since 2019. */
33
33
  export declare const H_SI = 6.62607015e-34;
34
34
  /**
35
35
  * Reduced Planck constant h/(2π) (J·s). Exact, from the 2019 SI definition of
36
36
  * h. The CODATA display `1.054571817e-34` is that quotient truncated; it is
37
- * smaller by a relative `6.127e-10`. Planck units below stay the published
38
- * CODATA 2018 values, which were computed from the truncated display.
37
+ * smaller by a relative `6.127e-10`. The Planck units below are
38
+ * MathTS's CODATA 2022 values, not recomputed here from {@link HBAR_SI}.
39
39
  */
40
40
  export declare const HBAR_SI: number;
41
- /** The CODATA 2018 display value of ħ: {@link HBAR_SI} truncated. Kept so the difference is computed, not typed. @internal */
41
+ /** The CODATA display value of ħ: {@link HBAR_SI} truncated. Kept so the difference is computed, not typed. @internal */
42
42
  export declare const HBAR_CODATA_DISPLAY = 1.054571817e-34;
43
43
  /** Boltzmann constant (J/K). Exact SI definition since 2019. */
44
44
  export declare const K_B_SI = 1.380649e-23;
45
45
  /** Elementary charge (C). Exact SI definition since 2019. */
46
46
  export declare const E_SI = 1.602176634e-19;
47
- /** Fine-structure constant α (dimensionless). CODATA 2018. */
48
- export declare const ALPHA = 0.0072973525693;
49
- /** Vacuum permittivity ε₀ (F/m). CODATA 2018. @internal */
50
- export declare const EPS0_SI = 8.8541878128e-12;
47
+ /** Fine-structure constant α (dimensionless). CODATA 2022. */
48
+ export declare const ALPHA: number;
49
+ /** Vacuum permittivity ε₀ (F/m). CODATA 2022. @internal */
50
+ export declare const EPS0_SI: number;
51
51
  /** Vacuum permeability μ₀ = 1/(ε₀ c²) (H/m), from ε₀ and the exact c. @internal */
52
52
  export declare const MU0_SI: number;
53
- /** Stefan–Boltzmann constant σ (W m⁻² K⁻⁴). CODATA 2018. @internal */
54
- export declare const SIGMA_SB_SI = 5.670374419e-8;
55
- /** Planck mass √(ℏc/G) (kg). CODATA 2018. */
56
- export declare const M_P_SI = 2.176434e-8;
57
- /** Planck length √(ℏG/c³) (m). CODATA 2018. */
58
- export declare const L_P_SI = 1.616255e-35;
59
- /** Planck time √(ℏG/c⁵) (s). CODATA 2018. */
60
- export declare const T_P_SI = 5.391247e-44;
53
+ /** Stefan–Boltzmann constant σ (W m⁻² K⁻⁴). CODATA 2022. @internal */
54
+ export declare const SIGMA_SB_SI: number;
55
+ /** Planck mass √(ℏc/G) (kg). CODATA 2022. */
56
+ export declare const M_P_SI: number;
57
+ /** Planck length √(ℏG/c³) (m). CODATA 2022. */
58
+ export declare const L_P_SI: number;
59
+ /** Planck time √(ℏG/c⁵) (s). CODATA 2022. */
60
+ export declare const T_P_SI: number;
61
61
  /**
62
62
  * Hubble parameter H₀ (s⁻¹).
63
63
  *
64
- * Planck 2018 TT,TE,EE+lowE+lensing best estimate: 67.4 km/s/Mpc, converted
65
- * with the parsec of the unit table (`data/units.json`, 648000/π au), so it is
66
- * the value `convertValue('67.4km/s/Mpc', 'Hz')` reads: one Hubble rate,
67
- * 2.1842852410855023e-18 s⁻¹. The unit table is the one place the parsec is
68
- * written; this module reads it rather than restating it.
64
+ * Planck 2018 TT,TE,EE+lowE+lensing best estimate: 67.4 km/s/Mpc. The
65
+ * conversion to Hz is `Unit.exactScale('km/s/Mpc')` rounded once — the same
66
+ * exact-scale path `convertValue('67.4km/s/Mpc', 'Hz')` delegates to. Calling
67
+ * `convertValue` from this file is a layer-order violation (`core/` cannot
68
+ * import `dimensional/units.ts`).
69
+ * @public
69
70
  */
70
71
  export declare const H0_SI: number;
71
72
  /**
@@ -90,7 +91,7 @@ export declare const BCS_GAP_RATIO: number;
90
91
  /** Lane-Emden n=3 dimensionless radius used by the white-dwarf mass. */
91
92
  export declare const LANE_EMDEN_OMEGA3 = 2.01824;
92
93
  /** Thomson cross section (m²). */
93
- export declare const THOMSON_CROSS_SECTION_SI = 6.6524587321e-29;
94
+ export declare const THOMSON_CROSS_SECTION_SI: number;
94
95
  /**
95
96
  * Nominal solar gravitational parameter (GM)☉ (m³ s⁻²), IAU 2015 Resolution B3.
96
97
  *
@@ -110,18 +111,18 @@ export declare const GM_SUN_SI = 132712440000000000000;
110
111
  */
111
112
  export declare const M_SUN_IAU_SI: number;
112
113
  /**
113
- * Electron mass (kg), CODATA 2018. Added for the v0.11 namespacing
114
+ * Electron mass (kg), CODATA 2022. Added for the v0.11 namespacing
114
115
  * gate's criterion-3 pin (λ_T of an electron at the Hawking
115
116
  * temperature — see the Adam vet A-5).
116
117
  * @public
117
118
  */
118
- export declare const M_E_SI = 9.1093837015e-31;
119
+ export declare const M_E_SI: number;
119
120
  /**
120
- * Proton mass (kg). CODATA 2018. Shared by the Eddington evaluator and
121
+ * Proton mass (kg). CODATA 2022. Shared by the Eddington evaluator and
121
122
  * `upt eval` (`m_p`, `m_proton`). Not the Planck mass `M_P_SI`.
122
- * @internal
123
+ * @public
123
124
  */
124
- export declare const M_PROTON_SI = 1.67262192369e-27;
125
+ export declare const M_PROTON_SI: number;
125
126
  /**
126
127
  * Avogadro constant (mol⁻¹). Exact in the 2019 SI.
127
128
  * @internal
@@ -133,16 +134,16 @@ export declare const N_A_SI = 6.02214076e+23;
133
134
  */
134
135
  export declare const FARADAY_SI: number;
135
136
  /**
136
- * Wien displacement-law constant b = λ_max·T (m·K). CODATA 2018.
137
+ * Wien displacement-law constant b = λ_max·T (m·K). CODATA 2022.
137
138
  *
138
139
  * @public
139
140
  */
140
- export declare const B_WIEN_SI = 0.002897771955;
141
+ export declare const B_WIEN_SI: number;
141
142
  /**
142
- * Unified atomic mass unit (kg). CODATA 2018 atomic mass constant.
143
+ * Unified atomic mass unit (kg). CODATA 2022 atomic mass constant.
143
144
  * One value for the Chandrasekhar evaluator and the symbolic constant `m_u`.
144
145
  * Kept off the package barrel: callers use `m_u` in the symbolic registry.
145
146
  * @internal
146
147
  */
147
- export declare const M_U_SI = 1.6605390666e-27;
148
+ export declare const M_U_SI: number;
148
149
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/core/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,sEAAsE;AACtE,eAAO,MAAM,IAAI,YAAY,CAAC;AAC9B,4FAA4F;AAC5F,eAAO,MAAM,QAAQ,iBAAiB,CAAC;AAEvC,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;AA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