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":"index.js","sourceRoot":"","sources":["../../src/composition/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAG9C,iGAAiG;AACjG,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,YAAY,GACb,MAAM,WAAW,CAAC;AACnB,oFAAoF;AACpF,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,iCAAiC,CAAC;AAGzC,OAAO,EACL,YAAY,EACZ,aAAa,EACb,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,uDAAuD;AACvD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEhE,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,sBAAsB,CAAC;AAM9B,OAAO,EACL,qBAAqB,EACrB,0BAA0B,GAC3B,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAOxD,OAAO,EACL,uBAAuB,EACvB,WAAW,EACX,cAAc,GACf,MAAM,sBAAsB,CAAC;AAW9B,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAO7D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/C,6HAA6H;AAC7H,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG1D,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAUnD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AAEjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAG9D,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,0IAA0I;AAC1I,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAChG,sEAAsE","sourcesContent":["/**\n * Composition graph (v0.8.0) — graph-lite `Quantity` / `BridgeEdge` /\n * `composeEdges()` beside the catalog (NOT replacing it; the catalog\n * in `src/bridges/index.ts` stays authoritative).\n *\n * See docs/planning/v0.8.0-Design.md for the design. The catalog edges are\n * projected from `data/bridge-catalog.json` by `./catalog-graph.js`; the\n * pre-registered CT-* composed ids are `REGISTERED_COMPOSITION_IDS` in\n * `./enumerate.js`.\n *\n * @module composition\n */\n\nexport type { Quantity, RegimeAttributes } from './quantity.js';\nexport { regimesDiffer } from './quantity.js';\n\nexport type { BridgeEdge, EdgeConfidence, ValidityDomain } from './edge.js';\n/** Edge evaluation and the errors it throws. An unset coefficient is `CoefficientUnsetError`. */\nexport {\n CoefficientUnsetError,\n CompositionAliasError,\n CompositionDimensionError,\n CompositionJunctionError,\n UndefinedCompositionError,\n evaluateEdge,\n} from './edge.js';\n/** The errors one evaluation throws: the input checks, then the validity domain. */\nexport {\n DomainViolationError,\n DuplicateInputError,\n InputTypeError,\n MissingInputError,\n NonFiniteInputError,\n UnknownInputError,\n} from '../bridges/evaluation-errors.js';\n\nexport type { ComposeOptions, QuantityIdentification } from './compose.js';\nexport {\n composeEdges,\n minConfidence,\n QUANTITY_IDENTIFICATIONS,\n SOURCE_ALIAS_DISPOSITIONS,\n} from './compose.js';\nexport type { AliasDisposition } from './compose.js';\n\nexport { consistencyRatio } from './consistency.js';\n\nexport { M_SUN_KG } from '../core/constants.js';\n/** The catalog graph and the edge for one graph id. */\nexport { catalogEdge, CATALOG_GRAPH } from './catalog-graph.js';\n\nexport {\n CANONICAL_GRAPH,\n canonicalToEdges,\n CANONICAL_CONSTANTS,\n} from './canonical-graph.js';\n\nexport type {\n CompositionCandidate,\n EnumerationReport,\n} from './enumerate.js';\nexport {\n enumerateCompositions,\n REGISTERED_COMPOSITION_IDS,\n} from './enumerate.js';\n\nexport type { UncertaintyResult } from './uncertainty.js';\nexport { propagateUncertainty } from './uncertainty.js';\n\nexport type {\n IdentifiabilityVerdict,\n IdentifiabilityResult,\n IdentifiabilityOptions,\n} from './identifiability.js';\nexport {\n classifyIdentifiability,\n classifyAll,\n forwardClosure,\n} from './identifiability.js';\n\n/** The retrodiction harness's result, prediction, refusal, report and option types. */\nexport type {\n RetrodictionOutcome,\n RetrodictionPrediction,\n RetrodictionResult,\n RetrodictionRefusal,\n RetrodictionReport,\n RetrodictionOptions,\n} from './retrodiction.js';\nexport { retrodict, retrodictNode } from './retrodiction.js';\n\nexport type {\n DerivationExplanation,\n ExplainOptions,\n QuantityExplanation,\n} from './explain.js';\nexport { explainQuantity } from './explain.js';\n/** The result of {@link evaluateRelation}. A value carries a dimension. An unset coefficient carries the formula. */\nexport type { Evaluation } from './evaluate-relation.js';\n/** Evaluate a catalog id or a canonical id. A sourced number is `kind: 'value'`. An unset coefficient is `kind: 'unset'`. */\nexport { evaluateRelation } from './evaluate-relation.js';\n\nexport type { Observable, ComposeSymbolicOptions } from './compose-symbolic.js';\nexport { composeSymbolic, SymbolicCompositionError } from './compose-symbolic.js';\nexport { SymbolicEvalError } from './expr-eval.js';\n\nexport type {\n VizStatus,\n VizJunction,\n VizCluster,\n VizOptions,\n VizModel,\n VizFilterStats,\n} from './graph-viz.js';\nexport { buildVizModel, edgeToJunction } from './graph-viz.js';\nexport { renderDotToSvg, SvgRendererUnavailableError } from './graph-viz-svg.js';\nexport type { DimensionAdjacency } from './dimension-adjacency.js';\nexport { dimensionAdjacency } from './dimension-adjacency.js';\nexport type { UserEquation, EquationLanding } from './user-equation.js';\nexport type { EquationAnalysis, EquationHint } from './user-equation.js';\nexport {\n parseUserEquation,\n suggestQuantities,\n suggestByDimension,\n equationLanding,\n analyzeUserEquation,\n UserEquationError,\n} from './user-equation.js';\n/** The catalog or parameter name a spelling means. Two spellings of one quantity that disagree throw {@link SynonymDisagreementError}. */\nexport { resolveQuantityName, SynonymDisagreementError } from '../dimensional/formula-names.js';\n// formatConnectedSummary stays internal — CLI reaches it via cli-api."]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/composition/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAG9C,iGAAiG;AACjG,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,YAAY,EACZ,cAAc,GACf,MAAM,WAAW,CAAC;AACnB,oFAAoF;AACpF,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,iB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BAAoB,CAAC;AAC5B,0IAA0I;AAC1I,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAChG,sEAAsE","sourcesContent":["/**\n * Composition graph (v0.8.0) — graph-lite `Quantity` / `BridgeEdge` /\n * `composeEdges()` beside the catalog (NOT replacing it; the catalog\n * in `src/bridges/index.ts` stays authoritative).\n *\n * See docs/planning/v0.8.0-Design.md for the design. The catalog edges are\n * projected from `data/bridge-catalog.json` by `./catalog-graph.js`; the\n * pre-registered CT-* composed ids are `REGISTERED_COMPOSITION_IDS` in\n * `./enumerate.js`.\n *\n * @module composition\n */\n\nexport type { Quantity, RegimeAttributes } from './quantity.js';\nexport { regimesDiffer } from './quantity.js';\n\nexport type { BridgeEdge, EdgeConfidence, ValidityDomain } from './edge.js';\n/** Edge evaluation and the errors it throws. An unset coefficient is `CoefficientUnsetError`. */\nexport {\n CoefficientUnsetError,\n CompositionAliasError,\n CompositionDimensionError,\n CompositionJunctionError,\n UndefinedCompositionError,\n evaluateEdge,\n validityDomain,\n} from './edge.js';\n/** The errors one evaluation throws: the input checks, then the validity domain. */\nexport {\n DomainViolationError,\n DuplicateInputError,\n InputTypeError,\n MissingInputError,\n NonFiniteInputError,\n UnknownInputError,\n} from '../bridges/evaluation-errors.js';\n/** A failed validity condition and the inputs it read, as `DomainViolationError.violations` lists them. */\nexport type { DomainInput, DomainViolation } from '../bridges/evaluation-errors.js';\n\nexport type { ComposeOptions, QuantityIdentification } from './compose.js';\nexport {\n composeEdges,\n minConfidence,\n QUANTITY_IDENTIFICATIONS,\n SOURCE_ALIAS_DISPOSITIONS,\n} from './compose.js';\nexport type { AliasDisposition } from './compose.js';\n\nexport { consistencyRatio } from './consistency.js';\n\nexport { M_SUN_KG } from '../core/constants.js';\n/** The catalog graph and the edge for one graph id. */\nexport { catalogEdge, CATALOG_GRAPH } from './catalog-graph.js';\n\nexport {\n CANONICAL_GRAPH,\n canonicalToEdges,\n CANONICAL_CONSTANTS,\n} from './canonical-graph.js';\n\nexport type {\n CompositionCandidate,\n EnumerationReport,\n} from './enumerate.js';\nexport {\n enumerateCompositions,\n REGISTERED_COMPOSITION_IDS,\n} from './enumerate.js';\n\nexport type { UncertaintyResult } from './uncertainty.js';\nexport { propagateUncertainty } from './uncertainty.js';\n\n/** The classifier's verdict, result and option types, and the rank instrument's report. */\nexport type {\n IdentifiabilityVerdict,\n IdentifiabilityResult,\n IdentifiabilityOptions,\n RankIdentifiability,\n} from './identifiability.js';\n/** The forward closure, the per-target classifier, the sweep, and the log-space rank over the monomial edges. */\nexport {\n classifyIdentifiability,\n classifyAll,\n forwardClosure,\n identifiabilityByRank,\n} from './identifiability.js';\n\n/** The retrodiction harness's result, prediction, refusal, report and option types. */\nexport type {\n RetrodictionOutcome,\n RetrodictionPrediction,\n RetrodictionResult,\n RetrodictionRefusal,\n RetrodictionReport,\n RetrodictionOptions,\n} from './retrodiction.js';\nexport { retrodict, retrodictNode } from './retrodiction.js';\n\nexport type {\n DerivationExplanation,\n ExplainOptions,\n QuantityExplanation,\n} from './explain.js';\nexport { explainQuantity } from './explain.js';\n/** The result of {@link evaluateRelation}. A value carries a dimension. An unset coefficient carries the formula. */\nexport type { Evaluation, ExtraOutput } from './evaluate-relation.js';\n/** Evaluate a catalog id or a canonical id. A sourced number is `kind: 'value'`. An unset coefficient is `kind: 'unset'`. */\nexport { evaluateRelation } from './evaluate-relation.js';\n\nexport type { Observable, ComposeSymbolicOptions } from './compose-symbolic.js';\nexport { composeSymbolic, SymbolicCompositionError } from './compose-symbolic.js';\nexport { SymbolicEvalError } from './expr-eval.js';\n\nexport type {\n VizStatus,\n VizJunction,\n VizCluster,\n VizOptions,\n VizModel,\n VizFilterStats,\n} from './graph-viz.js';\nexport { buildVizModel, edgeToJunction } from './graph-viz.js';\nexport { renderDotToSvg, SvgRendererUnavailableError } from './graph-viz-svg.js';\nexport type { DimensionAdjacency } from './dimension-adjacency.js';\nexport { dimensionAdjacency } from './dimension-adjacency.js';\nexport type { UserEquation, EquationLanding } from './user-equation.js';\nexport type { EquationAnalysis, EquationHint } from './user-equation.js';\nexport {\n parseUserEquation,\n suggestQuantities,\n suggestByDimension,\n equationLanding,\n analyzeUserEquation,\n UserEquationError,\n} from './user-equation.js';\n/** The catalog or parameter name a spelling means. Two spellings of one quantity that disagree throw {@link SynonymDisagreementError}. */\nexport { resolveQuantityName, SynonymDisagreementError } from '../dimensional/formula-names.js';\n// formatConnectedSummary stays internal — CLI reaches it via cli-api."]}
@@ -1,21 +1,22 @@
1
1
  /**
2
- * Load the MathTS peer without its console chatter reaching stderr.
2
+ * Load the MathTS dependency without its console chatter reaching stderr.
3
3
  *
4
4
  * MathTS writes with `console.warn`/`console.error` directly (its `warnOnce`,
5
5
  * the factorisation fallbacks, the WASM-integrity notice) and offers no option
6
6
  * to route or silence them: `ImportOptions.silent` is for importing user
7
7
  * functions, not for logging. The only way to keep that text out of a CLI's
8
8
  * stderr is to replace the three process-global sinks for the duration of the
9
- * call, which is what the two helpers here do, and nothing else in `src/` may
9
+ * call, which is what the helper here does, and nothing else in `src/` may
10
10
  * do.
11
11
  *
12
12
  * THE INVARIANT: the replacement is process-global, so a concurrent caller in
13
13
  * the same process (a worker pool thread, a vitest worker sharing a process)
14
14
  * loses its console for the window. The window is therefore confined to the
15
- * peer's ONE-TIME load and first-use smoke in `expr-simplify.ts` and
16
- * `mathts-scalar-symbols.ts`: both cache the loaded module, so the sinks are
17
- * replaced once per process, and never around a per-call parse or simplify.
18
- * Both helpers restore the sinks in `finally`, so a throw inside the window
15
+ * dependency's ONE-TIME load and first-use smoke in `expr-simplify.ts`,
16
+ * `mathts-scalar-symbols.ts` and `algebraic-equivalence.ts`: each caches the
17
+ * loaded function, so the sinks are replaced once per process, and never
18
+ * around a per-call parse or simplify.
19
+ * The helper restores the sinks in `finally`, so a throw inside the window
19
20
  * cannot leave them replaced. `tests/composition/mathts-quiet.test.ts` scans
20
21
  * `src/` for any other reassignment and traps the sinks during a call.
21
22
  *
@@ -23,6 +24,4 @@
23
24
  */
24
25
  /** Run `fn` with the console sinks replaced, restoring them in `finally`. @internal */
25
26
  export declare function quietlySync<T>(fn: () => T): T;
26
- /** The asynchronous form of {@link quietlySync}: the window spans the awaited promise. @internal */
27
- export declare function quietly<T>(fn: () => Promise<T>): Promise<T>;
28
27
  //# sourceMappingURL=mathts-quiet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mathts-quiet.d.ts","sourceRoot":"","sources":["../../src/composition/mathts-quiet.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAsBH,uFAAuF;AACvF,wBAAgB,WAAW,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAO7C;AAED,oGAAoG;AACpG,wBAAsB,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAOjE"}
1
+ {"version":3,"file":"mathts-quiet.d.ts","sourceRoot":"","sources":["../../src/composition/mathts-quiet.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAsBH,uFAAuF;AACvF,wBAAgB,WAAW,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAO7C"}
@@ -1,21 +1,22 @@
1
1
  /**
2
- * Load the MathTS peer without its console chatter reaching stderr.
2
+ * Load the MathTS dependency without its console chatter reaching stderr.
3
3
  *
4
4
  * MathTS writes with `console.warn`/`console.error` directly (its `warnOnce`,
5
5
  * the factorisation fallbacks, the WASM-integrity notice) and offers no option
6
6
  * to route or silence them: `ImportOptions.silent` is for importing user
7
7
  * functions, not for logging. The only way to keep that text out of a CLI's
8
8
  * stderr is to replace the three process-global sinks for the duration of the
9
- * call, which is what the two helpers here do, and nothing else in `src/` may
9
+ * call, which is what the helper here does, and nothing else in `src/` may
10
10
  * do.
11
11
  *
12
12
  * THE INVARIANT: the replacement is process-global, so a concurrent caller in
13
13
  * the same process (a worker pool thread, a vitest worker sharing a process)
14
14
  * loses its console for the window. The window is therefore confined to the
15
- * peer's ONE-TIME load and first-use smoke in `expr-simplify.ts` and
16
- * `mathts-scalar-symbols.ts`: both cache the loaded module, so the sinks are
17
- * replaced once per process, and never around a per-call parse or simplify.
18
- * Both helpers restore the sinks in `finally`, so a throw inside the window
15
+ * dependency's ONE-TIME load and first-use smoke in `expr-simplify.ts`,
16
+ * `mathts-scalar-symbols.ts` and `algebraic-equivalence.ts`: each caches the
17
+ * loaded function, so the sinks are replaced once per process, and never
18
+ * around a per-call parse or simplify.
19
+ * The helper restores the sinks in `finally`, so a throw inside the window
19
20
  * cannot leave them replaced. `tests/composition/mathts-quiet.test.ts` scans
20
21
  * `src/` for any other reassignment and traps the sinks during a call.
21
22
  *
@@ -43,14 +44,4 @@ export function quietlySync(fn) {
43
44
  restore(saved);
44
45
  }
45
46
  }
46
- /** The asynchronous form of {@link quietlySync}: the window spans the awaited promise. @internal */
47
- export async function quietly(fn) {
48
- const saved = silence();
49
- try {
50
- return await fn();
51
- }
52
- finally {
53
- restore(saved);
54
- }
55
- }
56
47
  //# sourceMappingURL=mathts-quiet.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mathts-quiet.js","sourceRoot":"","sources":["../../src/composition/mathts-quiet.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAQH,SAAS,OAAO;IACd,MAAM,KAAK,GAAU,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IAC/F,OAAO,CAAC,IAAI,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;IACxB,OAAO,CAAC,KAAK,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;IACxB,OAAO,CAAC,MAA6B,CAAC,KAAK,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC;IAC1D,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,OAAO,CAAC,KAAY;IAC3B,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IAC1B,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IAC3B,OAAO,CAAC,MAA6B,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;AAC7D,CAAC;AAED,uFAAuF;AACvF,MAAM,UAAU,WAAW,CAAI,EAAW;IACxC,MAAM,KAAK,GAAG,OAAO,EAAE,CAAC;IACxB,IAAI,CAAC;QACH,OAAO,EAAE,EAAE,CAAC;IACd,CAAC;YAAS,CAAC;QACT,OAAO,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;AACH,CAAC;AAED,oGAAoG;AACpG,MAAM,CAAC,KAAK,UAAU,OAAO,CAAI,EAAoB;IACnD,MAAM,KAAK,GAAG,OAAO,EAAE,CAAC;IACxB,IAAI,CAAC;QACH,OAAO,MAAM,EAAE,EAAE,CAAC;IACpB,CAAC;YAAS,CAAC;QACT,OAAO,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;AACH,CAAC","sourcesContent":["/**\n * Load the MathTS peer without its console chatter reaching stderr.\n *\n * MathTS writes with `console.warn`/`console.error` directly (its `warnOnce`,\n * the factorisation fallbacks, the WASM-integrity notice) and offers no option\n * to route or silence them: `ImportOptions.silent` is for importing user\n * functions, not for logging. The only way to keep that text out of a CLI's\n * stderr is to replace the three process-global sinks for the duration of the\n * call, which is what the two helpers here do, and nothing else in `src/` may\n * do.\n *\n * THE INVARIANT: the replacement is process-global, so a concurrent caller in\n * the same process (a worker pool thread, a vitest worker sharing a process)\n * loses its console for the window. The window is therefore confined to the\n * peer's ONE-TIME load and first-use smoke in `expr-simplify.ts` and\n * `mathts-scalar-symbols.ts`: both cache the loaded module, so the sinks are\n * replaced once per process, and never around a per-call parse or simplify.\n * Both helpers restore the sinks in `finally`, so a throw inside the window\n * cannot leave them replaced. `tests/composition/mathts-quiet.test.ts` scans\n * `src/` for any other reassignment and traps the sinks during a call.\n *\n * @module composition/mathts-quiet\n */\n\ntype Sinks = {\n readonly warn: typeof console.warn;\n readonly error: typeof console.error;\n readonly write: typeof process.stderr.write;\n};\n\nfunction silence(): Sinks {\n const saved: Sinks = { warn: console.warn, error: console.error, write: process.stderr.write };\n console.warn = () => {};\n console.error = () => {};\n (process.stderr as { write: unknown }).write = () => true;\n return saved;\n}\n\nfunction restore(saved: Sinks): void {\n console.warn = saved.warn;\n console.error = saved.error;\n (process.stderr as { write: unknown }).write = saved.write;\n}\n\n/** Run `fn` with the console sinks replaced, restoring them in `finally`. @internal */\nexport function quietlySync<T>(fn: () => T): T {\n const saved = silence();\n try {\n return fn();\n } finally {\n restore(saved);\n }\n}\n\n/** The asynchronous form of {@link quietlySync}: the window spans the awaited promise. @internal */\nexport async function quietly<T>(fn: () => Promise<T>): Promise<T> {\n const saved = silence();\n try {\n return await fn();\n } finally {\n restore(saved);\n }\n}\n"]}
1
+ {"version":3,"file":"mathts-quiet.js","sourceRoot":"","sources":["../../src/composition/mathts-quiet.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAQH,SAAS,OAAO;IACd,MAAM,KAAK,GAAU,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IAC/F,OAAO,CAAC,IAAI,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;IACxB,OAAO,CAAC,KAAK,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;IACxB,OAAO,CAAC,MAA6B,CAAC,KAAK,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC;IAC1D,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,OAAO,CAAC,KAAY;IAC3B,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IAC1B,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IAC3B,OAAO,CAAC,MAA6B,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;AAC7D,CAAC;AAED,uFAAuF;AACvF,MAAM,UAAU,WAAW,CAAI,EAAW;IACxC,MAAM,KAAK,GAAG,OAAO,EAAE,CAAC;IACxB,IAAI,CAAC;QACH,OAAO,EAAE,EAAE,CAAC;IACd,CAAC;YAAS,CAAC;QACT,OAAO,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;AACH,CAAC","sourcesContent":["/**\n * Load the MathTS dependency without its console chatter reaching stderr.\n *\n * MathTS writes with `console.warn`/`console.error` directly (its `warnOnce`,\n * the factorisation fallbacks, the WASM-integrity notice) and offers no option\n * to route or silence them: `ImportOptions.silent` is for importing user\n * functions, not for logging. The only way to keep that text out of a CLI's\n * stderr is to replace the three process-global sinks for the duration of the\n * call, which is what the helper here does, and nothing else in `src/` may\n * do.\n *\n * THE INVARIANT: the replacement is process-global, so a concurrent caller in\n * the same process (a worker pool thread, a vitest worker sharing a process)\n * loses its console for the window. The window is therefore confined to the\n * dependency's ONE-TIME load and first-use smoke in `expr-simplify.ts`,\n * `mathts-scalar-symbols.ts` and `algebraic-equivalence.ts`: each caches the\n * loaded function, so the sinks are replaced once per process, and never\n * around a per-call parse or simplify.\n * The helper restores the sinks in `finally`, so a throw inside the window\n * cannot leave them replaced. `tests/composition/mathts-quiet.test.ts` scans\n * `src/` for any other reassignment and traps the sinks during a call.\n *\n * @module composition/mathts-quiet\n */\n\ntype Sinks = {\n readonly warn: typeof console.warn;\n readonly error: typeof console.error;\n readonly write: typeof process.stderr.write;\n};\n\nfunction silence(): Sinks {\n const saved: Sinks = { warn: console.warn, error: console.error, write: process.stderr.write };\n console.warn = () => {};\n console.error = () => {};\n (process.stderr as { write: unknown }).write = () => true;\n return saved;\n}\n\nfunction restore(saved: Sinks): void {\n console.warn = saved.warn;\n console.error = saved.error;\n (process.stderr as { write: unknown }).write = saved.write;\n}\n\n/** Run `fn` with the console sinks replaced, restoring them in `finally`. @internal */\nexport function quietlySync<T>(fn: () => T): T {\n const saved = silence();\n try {\n return fn();\n } finally {\n restore(saved);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"mathts-scalar-symbols.d.ts","sourceRoot":"","sources":["../../src/composition/mathts-scalar-symbols.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD,yEAAyE;AACzE,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC;CACzB;AAED,UAAU,QAAQ;IAChB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC;CACzB;AAeD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAA;CAAE,EACxD,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7B,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,GAC1B,MAAM,CASR;AAsFD;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,QAAQ,GAAG,YAAY,EAAE,CAetE"}
1
+ {"version":3,"file":"mathts-scalar-symbols.d.ts","sourceRoot":"","sources":["../../src/composition/mathts-scalar-symbols.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAKH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD,yEAAyE;AACzE,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC;CACzB;AAED,UAAU,QAAQ;IAChB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC;CACzB;AAeD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAA;CAAE,EACxD,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7B,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,GAC1B,MAAM,CASR;AAsFD;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,QAAQ,GAAG,YAAY,EAAE,CAetE"}
@@ -14,7 +14,8 @@
14
14
  */
15
15
  import { parse as mathtsParse } from '@danielsimonjr/mathts-functions';
16
16
  import { quietlySync } from './mathts-quiet.js';
17
- const isLiteral = (name) => Number.isFinite(Number(name));
17
+ import { isDecimalLiteral } from '../dimensional/ast-leaves.js';
18
+ const isLiteral = isDecimalLiteral;
18
19
  /**
19
20
  * Render one symbol the way `expr-simplify.ts` does: a numeric literal stays
20
21
  * a number, and every other name becomes `gN`. Repeated names share one
@@ -1 +1 @@
1
- {"version":3,"file":"mathts-scalar-symbols.js","sourceRoot":"","sources":["../../src/composition/mathts-scalar-symbols.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AA0BhD,MAAM,SAAS,GAAG,CAAC,IAA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AE,CAAC,SAAS,CAAC,YAAY,KAAK,IAAI,CAAC,EAAE,CAAC;QACjF,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC7E,IAAI,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC;YAAE,SAAS;QAC5D,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACtB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["/**\n * Scalar leaves of an `ExprNode`, read from a MathTS AST.\n *\n * `governingOf` and the free-leaf list in `compose-symbolic.ts` both call\n * {@link scalarSymbolsFromMathTs}. The names come from that node's symbol\n * filter. This module does not walk `ExprNode` to collect them.\n *\n * The rendered text uses the same gensym as `expr-simplify.ts`: a bare `e`\n * is `gN`, never the identifier MathTS reads as Euler's number. Mapped back,\n * the name is the elementary charge. `exp(1)` does not introduce `e`.\n * Tensor and curvature kinds contribute no symbol.\n *\n * @module composition/mathts-scalar-symbols\n */\n\nimport { parse as mathtsParse } from '@danielsimonjr/mathts-functions';\nimport { quietlySync } from './mathts-quiet.js';\nimport type { ExprNode } from '../dimensional/validator.js';\nimport type { Dimension } from '../dimensional/types.js';\n\n/** One scalar leaf and the dimension stored on that symbol. @internal */\nexport interface ScalarSymbol {\n readonly name: string;\n readonly dim: Dimension;\n}\n\ninterface LeafMeta {\n readonly name: string;\n readonly dim: Dimension;\n}\n\n/** The bits of a MathTS node this reader uses. */\ninterface MathNode {\n filter(predicate: (node: MathNode) => boolean): MathNode[];\n readonly isSymbolNode?: boolean;\n readonly name?: string;\n}\n\ninterface MathtsFunctionsModule {\n parse(expr: string): MathNode;\n}\n\nconst isLiteral = (name: string): boolean => Number.isFinite(Number(name));\n\n/**\n * Render one symbol the way `expr-simplify.ts` does: a numeric literal stays\n * a number, and every other name becomes `gN`. Repeated names share one\n * gensym, so MathTS never sees the physics spelling of `e`.\n *\n * @internal\n */\nexport function renderScalarLeaf(\n expr: { readonly name: string; readonly dim: Dimension },\n gensymOf: Map<string, string>,\n meta: Map<string, LeafMeta>,\n): string {\n if (isLiteral(expr.name)) return String(Number(expr.name));\n let g = gensymOf.get(expr.name);\n if (g === undefined) {\n g = `g${gensymOf.size}`;\n gensymOf.set(expr.name, g);\n meta.set(g, { name: expr.name, dim: expr.dim });\n }\n return g;\n}\n\n/**\n * A MathTS expression whose symbol nodes are the scalar leaves.\n * Integral bounds are omitted: the previous leaf list did not include them.\n * A curvature or tensor kind returns null.\n */\nfunction renderSymbolQuery(\n expr: ExprNode,\n gensymOf: Map<string, string>,\n meta: Map<string, LeafMeta>,\n): string | null {\n switch (expr.kind) {\n case 'symbol':\n return renderScalarLeaf(expr, gensymOf, meta);\n case 'op': {\n const parts: string[] = [];\n for (const arg of expr.args) {\n const part = renderSymbolQuery(arg, gensymOf, meta);\n if (part !== null) parts.push(part);\n }\n return joinParts(parts, expr.op);\n }\n case 'transcendental':\n case 'abs':\n case 'dirac-delta':\n return renderSymbolQuery(expr.arg, gensymOf, meta);\n case 'integral':\n return joinParts(\n [\n renderSymbolQuery(expr.over, gensymOf, meta),\n renderSymbolQuery(expr.integrand, gensymOf, meta),\n ].filter((part): part is string => part !== null),\n '+',\n );\n case 'derivative':\n return joinParts(\n [\n renderSymbolQuery(expr.of, gensymOf, meta),\n renderSymbolQuery(expr.wrt, gensymOf, meta),\n ].filter((part): part is string => part !== null),\n '+',\n );\n case 'variational-derivative':\n return joinParts(\n [\n renderSymbolQuery(expr.functional, gensymOf, meta),\n renderSymbolQuery(expr.field, gensymOf, meta),\n renderSymbolQuery(expr.over, gensymOf, meta),\n ].filter((part): part is string => part !== null),\n '+',\n );\n default:\n return null;\n }\n}\n\nfunction joinParts(parts: readonly string[], op: string): string | null {\n if (parts.length === 0) return null;\n if (parts.length === 1) return parts[0] ?? null;\n return `(${parts.map((part) => `(${part})`).join(op)})`;\n}\n\nlet cachedParse: MathtsFunctionsModule['parse'] | undefined;\n\n/**\n * `parse`, bound once. The package is a required dependency and `quadrature.ts`\n * already imports it statically, so this module imports it the same way (a\n * `createRequire` of the ESM package once stood here, which needs Node 22.12 or\n * 20.19 while `engines` says 18; Tom's second round). The first parse runs\n * inside the one console-silencing window this module opens (`mathts-quiet.ts`\n * states the invariant): the peer's WASM-fallback chatter fires lazily on first\n * use, so the smoke parse is that first use, and every later parse runs with the\n * console untouched.\n */\nfunction mathTsParse(): MathtsFunctionsModule['parse'] {\n if (cachedParse !== undefined) return cachedParse;\n const parse = quietlySync(() => {\n const bound = (mathtsParse as MathtsFunctionsModule['parse']).bind(undefined);\n bound('g0');\n return bound;\n });\n cachedParse = parse;\n return cachedParse;\n}\n\n/**\n * Distinct scalar leaves of `expr`, in first-seen order.\n *\n * The MathTS symbol filter supplies the names. A gensym that this renderer\n * did not issue is dropped, so a function callee such as `exp` is not a leaf.\n * Tensor and curvature kinds return an empty list.\n *\n * @internal\n */\nexport function scalarSymbolsFromMathTs(expr: ExprNode): ScalarSymbol[] {\n const gensymOf = new Map<string, string>();\n const meta = new Map<string, LeafMeta>();\n const rendered = renderSymbolQuery(expr, gensymOf, meta);\n if (rendered === null) return [];\n const node = mathTsParse()(rendered);\n const seen = new Set<string>();\n const leaves: ScalarSymbol[] = [];\n for (const symbol of node.filter((candidate) => candidate.isSymbolNode === true)) {\n const issued = symbol.name !== undefined ? meta.get(symbol.name) : undefined;\n if (issued === undefined || seen.has(issued.name)) continue;\n seen.add(issued.name);\n leaves.push(issued);\n }\n return leaves;\n}\n"]}
1
+ {"version":3,"file":"mathts-scalar-symbols.js","sourceRoot":"","sources":["../../src/composition/mathts-scalar-symbols.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,KAA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AM,MAAM,GAAmB,EAAE,CAAC;IAClC,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,YAAY,KAAK,IAAI,CAAC,EAAE,CAAC;QACjF,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC7E,IAAI,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC;YAAE,SAAS;QAC5D,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACtB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["/**\n * Scalar leaves of an `ExprNode`, read from a MathTS AST.\n *\n * `governingOf` and the free-leaf list in `compose-symbolic.ts` both call\n * {@link scalarSymbolsFromMathTs}. The names come from that node's symbol\n * filter. This module does not walk `ExprNode` to collect them.\n *\n * The rendered text uses the same gensym as `expr-simplify.ts`: a bare `e`\n * is `gN`, never the identifier MathTS reads as Euler's number. Mapped back,\n * the name is the elementary charge. `exp(1)` does not introduce `e`.\n * Tensor and curvature kinds contribute no symbol.\n *\n * @module composition/mathts-scalar-symbols\n */\n\nimport { parse as mathtsParse } from '@danielsimonjr/mathts-functions';\nimport { quietlySync } from './mathts-quiet.js';\nimport { isDecimalLiteral } from '../dimensional/ast-leaves.js';\nimport type { ExprNode } from '../dimensional/validator.js';\nimport type { Dimension } from '../dimensional/types.js';\n\n/** One scalar leaf and the dimension stored on that symbol. @internal */\nexport interface ScalarSymbol {\n readonly name: string;\n readonly dim: Dimension;\n}\n\ninterface LeafMeta {\n readonly name: string;\n readonly dim: Dimension;\n}\n\n/** The bits of a MathTS node this reader uses. */\ninterface MathNode {\n filter(predicate: (node: MathNode) => boolean): MathNode[];\n readonly isSymbolNode?: boolean;\n readonly name?: string;\n}\n\ninterface MathtsFunctionsModule {\n parse(expr: string): MathNode;\n}\n\nconst isLiteral = isDecimalLiteral;\n\n/**\n * Render one symbol the way `expr-simplify.ts` does: a numeric literal stays\n * a number, and every other name becomes `gN`. Repeated names share one\n * gensym, so MathTS never sees the physics spelling of `e`.\n *\n * @internal\n */\nexport function renderScalarLeaf(\n expr: { readonly name: string; readonly dim: Dimension },\n gensymOf: Map<string, string>,\n meta: Map<string, LeafMeta>,\n): string {\n if (isLiteral(expr.name)) return String(Number(expr.name));\n let g = gensymOf.get(expr.name);\n if (g === undefined) {\n g = `g${gensymOf.size}`;\n gensymOf.set(expr.name, g);\n meta.set(g, { name: expr.name, dim: expr.dim });\n }\n return g;\n}\n\n/**\n * A MathTS expression whose symbol nodes are the scalar leaves.\n * Integral bounds are omitted: the previous leaf list did not include them.\n * A curvature or tensor kind returns null.\n */\nfunction renderSymbolQuery(\n expr: ExprNode,\n gensymOf: Map<string, string>,\n meta: Map<string, LeafMeta>,\n): string | null {\n switch (expr.kind) {\n case 'symbol':\n return renderScalarLeaf(expr, gensymOf, meta);\n case 'op': {\n const parts: string[] = [];\n for (const arg of expr.args) {\n const part = renderSymbolQuery(arg, gensymOf, meta);\n if (part !== null) parts.push(part);\n }\n return joinParts(parts, expr.op);\n }\n case 'transcendental':\n case 'abs':\n case 'dirac-delta':\n return renderSymbolQuery(expr.arg, gensymOf, meta);\n case 'integral':\n return joinParts(\n [\n renderSymbolQuery(expr.over, gensymOf, meta),\n renderSymbolQuery(expr.integrand, gensymOf, meta),\n ].filter((part): part is string => part !== null),\n '+',\n );\n case 'derivative':\n return joinParts(\n [\n renderSymbolQuery(expr.of, gensymOf, meta),\n renderSymbolQuery(expr.wrt, gensymOf, meta),\n ].filter((part): part is string => part !== null),\n '+',\n );\n case 'variational-derivative':\n return joinParts(\n [\n renderSymbolQuery(expr.functional, gensymOf, meta),\n renderSymbolQuery(expr.field, gensymOf, meta),\n renderSymbolQuery(expr.over, gensymOf, meta),\n ].filter((part): part is string => part !== null),\n '+',\n );\n default:\n return null;\n }\n}\n\nfunction joinParts(parts: readonly string[], op: string): string | null {\n if (parts.length === 0) return null;\n if (parts.length === 1) return parts[0] ?? null;\n return `(${parts.map((part) => `(${part})`).join(op)})`;\n}\n\nlet cachedParse: MathtsFunctionsModule['parse'] | undefined;\n\n/**\n * `parse`, bound once. The package is a required dependency and `quadrature.ts`\n * already imports it statically, so this module imports it the same way (a\n * `createRequire` of the ESM package once stood here, which needs Node 22.12 or\n * 20.19 while `engines` says 18; Tom's second round). The first parse runs\n * inside the one console-silencing window this module opens (`mathts-quiet.ts`\n * states the invariant): the peer's WASM-fallback chatter fires lazily on first\n * use, so the smoke parse is that first use, and every later parse runs with the\n * console untouched.\n */\nfunction mathTsParse(): MathtsFunctionsModule['parse'] {\n if (cachedParse !== undefined) return cachedParse;\n const parse = quietlySync(() => {\n const bound = (mathtsParse as MathtsFunctionsModule['parse']).bind(undefined);\n bound('g0');\n return bound;\n });\n cachedParse = parse;\n return cachedParse;\n}\n\n/**\n * Distinct scalar leaves of `expr`, in first-seen order.\n *\n * The MathTS symbol filter supplies the names. A gensym that this renderer\n * did not issue is dropped, so a function callee such as `exp` is not a leaf.\n * Tensor and curvature kinds return an empty list.\n *\n * @internal\n */\nexport function scalarSymbolsFromMathTs(expr: ExprNode): ScalarSymbol[] {\n const gensymOf = new Map<string, string>();\n const meta = new Map<string, LeafMeta>();\n const rendered = renderSymbolQuery(expr, gensymOf, meta);\n if (rendered === null) return [];\n const node = mathTsParse()(rendered);\n const seen = new Set<string>();\n const leaves: ScalarSymbol[] = [];\n for (const symbol of node.filter((candidate) => candidate.isSymbolNode === true)) {\n const issued = symbol.name !== undefined ? meta.get(symbol.name) : undefined;\n if (issued === undefined || seen.has(issued.name)) continue;\n seen.add(issued.name);\n leaves.push(issued);\n }\n return leaves;\n}\n"]}
@@ -0,0 +1,95 @@
1
+ /**
2
+ * A magnitude for a quantity from its own equation, for the discovery magnitude gate.
3
+ *
4
+ * The gate (`discovery.ts`, `magnitudeGate`) reads a quantity's magnitude from the sourced
5
+ * representative-value table, else from the value the graph fixes with no anchor input (the
6
+ * target of a source-less equation), else from the anchor. A quantity none of those reach (the
7
+ * Hubble distance, c/H0, whose input the table states but the anchor does not reach) made the gate
8
+ * abstain. This module evaluates such a quantity from an edge into it whose every source is
9
+ * valued: a table value, a registered constant, a no-anchor constant, or a value this module
10
+ * already derived, iterated to a fixed point. It is seeded from the table and the constants only,
11
+ * never from the anchor, so a derived magnitude is not anchor-derived.
12
+ *
13
+ * Three guards, each a refusal the caller sees (`DerivedMagnitudes.refusals`):
14
+ * - precision: a derived value carries σ in decades of log10|value|, propagated from its inputs
15
+ * through the edge's log-elasticities, σ = √(Σ (∂log f/∂log xᵢ)² σᵢ²) (σᵢ is the table row's
16
+ * σ, 0 for a constant, the derived σ for a derived input). The gate uses a value only when σ is
17
+ * at most {@link DEFAULT_SIGMA_DECADES}, the table's own "good to about one order". The FRET
18
+ * efficiency from two 5 nm order-of-magnitude scales is exactly 0.5 and carries 3√2 decades: a
19
+ * number with no magnitude information, which this guard refuses.
20
+ * - agreement: two edges that derive one quantity and differ by more than a relative
21
+ * {@link DERIVED_AGREEMENT} give it no value; no edge wins by its place in the list.
22
+ * - the edge's own evaluation (`evaluateEdge`): a domain refusal, an unset coefficient or a
23
+ * non-finite or zero result gives no value.
24
+ *
25
+ * Seeds are SI (the table's unit) and are converted into each quantity's evaluator convention
26
+ * (`conventionScaleToSI`; `planck-mass-energy` and `vacuum-expectation-value` speak GeV), and every
27
+ * result is converted back to SI.
28
+ *
29
+ * INTERNAL — read by `discovery.ts`; surfaced through `upt discover` and `upt ground`.
30
+ *
31
+ * @module composition/own-equation-magnitude
32
+ */
33
+ import type { BridgeEdge } from './edge.js';
34
+ import type { QuantityIdentification } from './compose.js';
35
+ import type { RepresentativeValue } from './representative-values.js';
36
+ /**
37
+ * Relative difference above which two edges deriving one quantity disagree. Two encodings of one
38
+ * equation agree to rounding; a factor that differs (2 against 1) is far above it.
39
+ * @internal
40
+ */
41
+ export declare const DERIVED_AGREEMENT = 1e-9;
42
+ /** A magnitude derived from a quantity's own equation. @internal */
43
+ export interface DerivedMagnitude {
44
+ /** The value in SI (the table's unit), converted back from the evaluator's convention. */
45
+ readonly value: number;
46
+ /** σ in decades of log10|value|, propagated through the edge's log-elasticities. */
47
+ readonly sigmaDecades: number;
48
+ /** The edge that produced it (`identification:<from>` for a registered identification's copy). */
49
+ readonly edge: string;
50
+ /** The names the edge read, sorted. */
51
+ readonly inputs: readonly string[];
52
+ }
53
+ /** Why a quantity reached by an equation has no derived magnitude. @internal */
54
+ export interface DerivedMagnitudeRefusal {
55
+ readonly name: string;
56
+ /**
57
+ * `imprecise`: the propagated σ is above the guard. `disagreeing-edges`: two edges that derive it
58
+ * differ by more than {@link DERIVED_AGREEMENT}. `precision-unknown`: the edge fired at the point
59
+ * but not at the points the elasticity reads, so σ could not be measured.
60
+ */
61
+ readonly reason: 'imprecise' | 'disagreeing-edges' | 'precision-unknown';
62
+ /** The edges involved, sorted. */
63
+ readonly edges: readonly string[];
64
+ /** The propagated σ, for `imprecise`. */
65
+ readonly sigmaDecades?: number;
66
+ /** One sentence for a reader. */
67
+ readonly detail: string;
68
+ }
69
+ /** The magnitudes the graph derives from the table and the constants, and the refusals. @internal */
70
+ export interface DerivedMagnitudes {
71
+ /** Derived magnitudes the gate may use (σ within the guard), by quantity name. */
72
+ readonly values: ReadonlyMap<string, DerivedMagnitude>;
73
+ /** Every quantity an equation reached that has no usable derived magnitude, sorted by name. */
74
+ readonly refusals: readonly DerivedMagnitudeRefusal[];
75
+ }
76
+ /** What the caller supplies: the sourced table and the no-anchor constants. @internal */
77
+ export interface OwnEquationSeeds {
78
+ /** The sourced representative values, in SI. */
79
+ readonly representativeValues: Readonly<Record<string, RepresentativeValue>>;
80
+ /** The values the graph fixes with no anchor input, in the evaluator's convention (`forwardEvaluate(edges, {}, …)`). */
81
+ readonly constantValues: ReadonlyMap<string, number>;
82
+ /** Identifications honoured as copies, as `forwardEvaluate` honours them. */
83
+ readonly identifications: readonly QuantityIdentification[];
84
+ }
85
+ /**
86
+ * The magnitudes `edges` derive from the sourced table and the constants, with the refusals. A
87
+ * quantity the table or a constant states is a seed and is never derived. Each round fires every
88
+ * edge from the values of the round before, so the edge list's order decides nothing; a quantity
89
+ * that two edges value differently is withdrawn with everything derived from it, and the fixed
90
+ * point is recomputed without it. A value is assigned from the first of its agreeing edges by id.
91
+ *
92
+ * @internal
93
+ */
94
+ export declare function deriveOwnEquationMagnitudes(edges: readonly BridgeEdge[], seeds: OwnEquationSeeds, maxSigmaDecades?: number): DerivedMagnitudes;
95
+ //# sourceMappingURL=own-equation-magnitude.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"own-equation-magnitude.d.ts","sourceRoot":"","sources":["../../src/composition/own-equation-magnitude.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAG3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAOtE;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,OAAO,CAAC;AAgBtC,oEAAoE;AACpE,MAAM,WAAW,gBAAgB;IAC/B,0FAA0F;IAC1F,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,oFAAoF;IACpF,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,kGAAkG;IAClG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,uCAAuC;IACvC,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC;AAED,gFAAgF;AAChF,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,mBAAmB,GAAG,mBAAmB,CAAC;IACzE,kCAAkC;IAClC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,yCAAyC;IACzC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,iCAAiC;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,qGAAqG;AACrG,MAAM,WAAW,iBAAiB;IAChC,kFAAkF;IAClF,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACvD,+FAA+F;IAC/F,QAAQ,CAAC,QAAQ,EAAE,SAAS,uBAAuB,EAAE,CAAC;CACvD;AAiBD,yFAAyF;AACzF,MAAM,WAAW,gBAAgB;IAC/B,gDAAgD;IAChD,QAAQ,CAAC,oBAAoB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAC7E,wHAAwH;IACxH,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrD,6EAA6E;IAC7E,QAAQ,CAAC,eAAe,EAAE,SAAS,sBAAsB,EAAE,CAAC;CAC7D;AAkGD;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,SAAS,UAAU,EAAE,EAC5B,KAAK,EAAE,gBAAgB,EACvB,eAAe,GAAE,MAA8B,GAC9C,iBAAiB,CAkFnB"}
@@ -0,0 +1,270 @@
1
+ /**
2
+ * A magnitude for a quantity from its own equation, for the discovery magnitude gate.
3
+ *
4
+ * The gate (`discovery.ts`, `magnitudeGate`) reads a quantity's magnitude from the sourced
5
+ * representative-value table, else from the value the graph fixes with no anchor input (the
6
+ * target of a source-less equation), else from the anchor. A quantity none of those reach (the
7
+ * Hubble distance, c/H0, whose input the table states but the anchor does not reach) made the gate
8
+ * abstain. This module evaluates such a quantity from an edge into it whose every source is
9
+ * valued: a table value, a registered constant, a no-anchor constant, or a value this module
10
+ * already derived, iterated to a fixed point. It is seeded from the table and the constants only,
11
+ * never from the anchor, so a derived magnitude is not anchor-derived.
12
+ *
13
+ * Three guards, each a refusal the caller sees (`DerivedMagnitudes.refusals`):
14
+ * - precision: a derived value carries σ in decades of log10|value|, propagated from its inputs
15
+ * through the edge's log-elasticities, σ = √(Σ (∂log f/∂log xᵢ)² σᵢ²) (σᵢ is the table row's
16
+ * σ, 0 for a constant, the derived σ for a derived input). The gate uses a value only when σ is
17
+ * at most {@link DEFAULT_SIGMA_DECADES}, the table's own "good to about one order". The FRET
18
+ * efficiency from two 5 nm order-of-magnitude scales is exactly 0.5 and carries 3√2 decades: a
19
+ * number with no magnitude information, which this guard refuses.
20
+ * - agreement: two edges that derive one quantity and differ by more than a relative
21
+ * {@link DERIVED_AGREEMENT} give it no value; no edge wins by its place in the list.
22
+ * - the edge's own evaluation (`evaluateEdge`): a domain refusal, an unset coefficient or a
23
+ * non-finite or zero result gives no value.
24
+ *
25
+ * Seeds are SI (the table's unit) and are converted into each quantity's evaluator convention
26
+ * (`conventionScaleToSI`; `planck-mass-energy` and `vacuum-expectation-value` speak GeV), and every
27
+ * result is converted back to SI.
28
+ *
29
+ * INTERNAL — read by `discovery.ts`; surfaced through `upt discover` and `upt ground`.
30
+ *
31
+ * @module composition/own-equation-magnitude
32
+ */
33
+ import { evaluateEdge } from './edge.js';
34
+ import { evaluationInputs, refusesThePoint } from './retrodiction.js';
35
+ import { DEFAULT_SIGMA_DECADES, sigmaDecadesOf } from './representative-values.js';
36
+ import { conventionFactor, conventionScaleToSI } from '../dimensional/unit-convention.js';
37
+ import { CONSTANT_REGISTRY } from '../dimensional/symbolic-constants.js';
38
+ import { centralPartial } from '../numerical/finite-difference.js';
39
+ import { byKey, compareCodepoint } from '../core/compare.js';
40
+ import { formatQuantity } from '../core/format.js';
41
+ /**
42
+ * Relative difference above which two edges deriving one quantity disagree. Two encodings of one
43
+ * equation agree to rounding; a factor that differs (2 against 1) is far above it.
44
+ * @internal
45
+ */
46
+ export const DERIVED_AGREEMENT = 1e-9;
47
+ /**
48
+ * The half-step, in decades of an input, of the central difference that measures a
49
+ * log-elasticity. A power law's elasticity is exact at any step; for another form the truncation
50
+ * error is of order the step squared.
51
+ */
52
+ const ELASTICITY_STEP_DECADES = 1e-3;
53
+ /**
54
+ * Decades by which a propagated σ may exceed the guard and still pass: room for the central
55
+ * difference's rounding, so a power law of elasticity 1 on a one-decade input is not refused for a
56
+ * last-bit excess (the Hubble distance's σ measures exactly 1). Far below any σ the guard refuses.
57
+ */
58
+ const SIGMA_GUARD_SLACK = 1e-9;
59
+ /** The seeds: the table (SI → evaluator unit), then a registered constant that is a graph quantity, then a no-anchor constant. */
60
+ function seedsOf(edges, seeds) {
61
+ const known = new Map();
62
+ for (const [name, rv] of Object.entries(seeds.representativeValues)) {
63
+ if (!(Number.isFinite(rv.value) && rv.value !== 0))
64
+ continue;
65
+ known.set(name, { value: rv.value / conventionScaleToSI(name), sigmaDecades: sigmaDecadesOf(rv) });
66
+ }
67
+ const names = new Set(edges.flatMap((e) => [e.target.name, ...e.sources.map((s) => s.name)]));
68
+ for (const record of CONSTANT_REGISTRY) {
69
+ const name = record.quantity;
70
+ if (name === undefined || !names.has(name) || known.has(name))
71
+ continue;
72
+ known.set(name, { value: record.value / conventionScaleToSI(name), sigmaDecades: 0 });
73
+ }
74
+ for (const [name, value] of seeds.constantValues) {
75
+ if (known.has(name) || !(Number.isFinite(value) && value !== 0))
76
+ continue;
77
+ known.set(name, { value, sigmaDecades: 0 });
78
+ }
79
+ return known;
80
+ }
81
+ /** log10|f| as a function of log10|x_key|, the other inputs held. NaN when the edge refuses. */
82
+ function logResponse(edge, inputs, key) {
83
+ const sign = Math.sign(inputs[key]);
84
+ return (point) => {
85
+ try {
86
+ return Math.log10(Math.abs(evaluateEdge(edge, { ...inputs, [key]: sign * 10 ** point['u'] })));
87
+ }
88
+ catch (err) {
89
+ if (!refusesThePoint(err))
90
+ throw err;
91
+ return Number.NaN;
92
+ }
93
+ };
94
+ }
95
+ /** σ of an edge's value from its inputs' σ, through the log-elasticities; undefined when one is not finite. */
96
+ function propagatedSigma(edge, inputs, known) {
97
+ let sum = 0;
98
+ for (const key of Object.keys(inputs).sort(compareCodepoint)) {
99
+ const sigma = known.get(key)?.sigmaDecades ?? 0;
100
+ if (sigma === 0)
101
+ continue;
102
+ const x = inputs[key];
103
+ if (!(Number.isFinite(x) && x !== 0))
104
+ return undefined;
105
+ const elasticity = centralPartial(logResponse(edge, inputs, key), { u: Math.log10(Math.abs(x)) }, 'u', ELASTICITY_STEP_DECADES);
106
+ if (!Number.isFinite(elasticity))
107
+ return undefined;
108
+ sum += elasticity * elasticity * sigma * sigma;
109
+ }
110
+ return Math.sqrt(sum);
111
+ }
112
+ /** Every edge and identification that fires for an unvalued, unblocked target, from `known` as it stands. */
113
+ function firings(edges, idents, known, skip) {
114
+ const out = new Map();
115
+ const push = (target, f) => {
116
+ const list = out.get(target);
117
+ if (list === undefined)
118
+ out.set(target, [f]);
119
+ else
120
+ list.push(f);
121
+ };
122
+ for (const id of idents) {
123
+ const from = known.get(id.from);
124
+ if (from === undefined || skip(id.to))
125
+ continue;
126
+ const value = from.value * conventionFactor(id.from, id.to);
127
+ if (Number.isFinite(value) && value !== 0) {
128
+ push(id.to, { edge: `identification:${id.from}`, value, sigmaDecades: from.sigmaDecades, inputs: [id.from] });
129
+ }
130
+ }
131
+ const values = new Map([...known].map(([name, k]) => [name, k.value]));
132
+ for (const e of edges) {
133
+ if (skip(e.target.name))
134
+ continue;
135
+ if (!e.sources.every((s) => known.has(s.name)))
136
+ continue;
137
+ const inputs = evaluationInputs(e, values);
138
+ let value;
139
+ try {
140
+ value = evaluateEdge(e, inputs);
141
+ }
142
+ catch (err) {
143
+ if (!refusesThePoint(err))
144
+ throw err;
145
+ continue;
146
+ }
147
+ if (!(Number.isFinite(value) && value !== 0))
148
+ continue;
149
+ push(e.target.name, { edge: e.id, value, sigmaDecades: propagatedSigma(e, inputs, known), inputs: Object.keys(inputs).sort(compareCodepoint) });
150
+ }
151
+ return out;
152
+ }
153
+ /** The firings sorted by edge id; and whether any two differ by more than {@link DERIVED_AGREEMENT}. */
154
+ function agreement(list) {
155
+ const sorted = [...list].sort(byKey((f) => f.edge));
156
+ const agree = sorted.every((f) => Math.abs(f.value - sorted[0].value) <= DERIVED_AGREEMENT * Math.max(Math.abs(f.value), Math.abs(sorted[0].value)));
157
+ return { sorted, agree };
158
+ }
159
+ /**
160
+ * The magnitudes `edges` derive from the sourced table and the constants, with the refusals. A
161
+ * quantity the table or a constant states is a seed and is never derived. Each round fires every
162
+ * edge from the values of the round before, so the edge list's order decides nothing; a quantity
163
+ * that two edges value differently is withdrawn with everything derived from it, and the fixed
164
+ * point is recomputed without it. A value is assigned from the first of its agreeing edges by id.
165
+ *
166
+ * @internal
167
+ */
168
+ export function deriveOwnEquationMagnitudes(edges, seeds, maxSigmaDecades = DEFAULT_SIGMA_DECADES) {
169
+ const seeded = seedsOf(edges, seeds);
170
+ const disagreeing = new Map();
171
+ for (;;) {
172
+ const unmeasured = new Map();
173
+ const known = new Map(seeded);
174
+ const derived = new Map();
175
+ const skip = (name) => known.has(name) || disagreeing.has(name) || unmeasured.has(name);
176
+ for (;;) {
177
+ const round = firings(edges, seeds.identifications, known, skip);
178
+ if (round.size === 0)
179
+ break;
180
+ for (const target of [...round.keys()].sort(compareCodepoint)) {
181
+ const { sorted, agree } = agreement(round.get(target));
182
+ const edgeIds = sorted.map((f) => f.edge);
183
+ if (!agree) {
184
+ disagreeing.set(target, disagreement(target, sorted));
185
+ continue;
186
+ }
187
+ const chosen = sorted[0];
188
+ if (chosen.sigmaDecades === undefined) {
189
+ unmeasured.set(target, {
190
+ name: target,
191
+ reason: 'precision-unknown',
192
+ edges: edgeIds,
193
+ detail: `${chosen.edge} fires at the point but not at the points its log-elasticity reads, so σ was not measured`,
194
+ });
195
+ continue;
196
+ }
197
+ derived.set(target, chosen);
198
+ known.set(target, { value: chosen.value, sigmaDecades: chosen.sigmaDecades });
199
+ }
200
+ }
201
+ // An edge whose sources were valued only after its target was: it must agree with that value.
202
+ const late = [];
203
+ const values = new Map([...known].map(([name, k]) => [name, k.value]));
204
+ for (const [target, chosen] of derived) {
205
+ const all = [chosen];
206
+ for (const e of edges) {
207
+ if (e.target.name !== target || e.id === chosen.edge)
208
+ continue;
209
+ if (!e.sources.every((s) => known.has(s.name)))
210
+ continue;
211
+ try {
212
+ const value = evaluateEdge(e, evaluationInputs(e, values));
213
+ if (Number.isFinite(value) && value !== 0)
214
+ all.push({ edge: e.id, value, sigmaDecades: undefined, inputs: [] });
215
+ }
216
+ catch (err) {
217
+ if (!refusesThePoint(err))
218
+ throw err;
219
+ }
220
+ }
221
+ for (const id of seeds.identifications) {
222
+ if (id.to !== target || `identification:${id.from}` === chosen.edge)
223
+ continue;
224
+ const from = known.get(id.from);
225
+ if (from === undefined)
226
+ continue;
227
+ const value = from.value * conventionFactor(id.from, id.to);
228
+ if (Number.isFinite(value) && value !== 0)
229
+ all.push({ edge: `identification:${id.from}`, value, sigmaDecades: undefined, inputs: [] });
230
+ }
231
+ const { sorted, agree } = agreement(all);
232
+ if (!agree) {
233
+ disagreeing.set(target, disagreement(target, sorted));
234
+ late.push(target);
235
+ }
236
+ }
237
+ if (late.length > 0)
238
+ continue;
239
+ const usable = new Map();
240
+ const refusals = [...disagreeing.values(), ...unmeasured.values()];
241
+ for (const [name, f] of derived) {
242
+ const sigma = f.sigmaDecades;
243
+ if (sigma > maxSigmaDecades + SIGMA_GUARD_SLACK) {
244
+ refusals.push({
245
+ name,
246
+ reason: 'imprecise',
247
+ edges: [f.edge],
248
+ sigmaDecades: sigma,
249
+ detail: `${f.edge} gives ${name} from ${f.inputs.join(', ')} at σ = ${formatQuantity(sigma, 3)} decades, ` +
250
+ `above the ${maxSigmaDecades}-decade precision the gate requires`,
251
+ });
252
+ continue;
253
+ }
254
+ usable.set(name, { value: f.value * conventionScaleToSI(name), sigmaDecades: sigma, edge: f.edge, inputs: f.inputs });
255
+ }
256
+ refusals.sort(byKey((r) => r.name));
257
+ return { values: usable, refusals };
258
+ }
259
+ }
260
+ /** The refusal record of two or more edges that value one quantity differently. */
261
+ function disagreement(name, sorted) {
262
+ return {
263
+ name,
264
+ reason: 'disagreeing-edges',
265
+ edges: sorted.map((f) => f.edge),
266
+ detail: `${sorted.map((f) => `${f.edge} gives ${formatQuantity(f.value, 4)}`).join(', ')}: ` +
267
+ `they differ by more than a relative ${DERIVED_AGREEMENT}, so no edge is taken`,
268
+ };
269
+ }
270
+ //# sourceMappingURL=own-equation-magnitude.js.map