universal-physics-tensor 0.45.2 → 0.47.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 (548) hide show
  1. package/README.md +85 -66
  2. package/bin/upt.mjs +22 -22
  3. package/dist/atlas/applicability.d.ts +108 -0
  4. package/dist/atlas/applicability.d.ts.map +1 -0
  5. package/dist/atlas/applicability.js +301 -0
  6. package/dist/atlas/applicability.js.map +1 -0
  7. package/dist/atlas/association.d.ts +92 -0
  8. package/dist/atlas/association.d.ts.map +1 -0
  9. package/dist/atlas/association.js +112 -0
  10. package/dist/atlas/association.js.map +1 -0
  11. package/dist/atlas/benchmark/backend-shapes.d.ts +47 -0
  12. package/dist/atlas/benchmark/backend-shapes.d.ts.map +1 -0
  13. package/dist/atlas/benchmark/backend-shapes.js +58 -0
  14. package/dist/atlas/benchmark/backend-shapes.js.map +1 -0
  15. package/dist/atlas/benchmark/baselines.d.ts +64 -0
  16. package/dist/atlas/benchmark/baselines.d.ts.map +1 -0
  17. package/dist/atlas/benchmark/baselines.js +112 -0
  18. package/dist/atlas/benchmark/baselines.js.map +1 -0
  19. package/dist/atlas/benchmark/leakage.d.ts +56 -0
  20. package/dist/atlas/benchmark/leakage.d.ts.map +1 -0
  21. package/dist/atlas/benchmark/leakage.js +100 -0
  22. package/dist/atlas/benchmark/leakage.js.map +1 -0
  23. package/dist/atlas/benchmark/loader.d.ts +56 -0
  24. package/dist/atlas/benchmark/loader.d.ts.map +1 -0
  25. package/dist/atlas/benchmark/loader.js +104 -0
  26. package/dist/atlas/benchmark/loader.js.map +1 -0
  27. package/dist/atlas/benchmark/run-atlas.d.ts +72 -0
  28. package/dist/atlas/benchmark/run-atlas.d.ts.map +1 -0
  29. package/dist/atlas/benchmark/run-atlas.js +210 -0
  30. package/dist/atlas/benchmark/run-atlas.js.map +1 -0
  31. package/dist/atlas/benchmark/stats.d.ts +90 -0
  32. package/dist/atlas/benchmark/stats.d.ts.map +1 -0
  33. package/dist/atlas/benchmark/stats.js +159 -0
  34. package/dist/atlas/benchmark/stats.js.map +1 -0
  35. package/dist/atlas/benchmark/study.d.ts +120 -0
  36. package/dist/atlas/benchmark/study.d.ts.map +1 -0
  37. package/dist/atlas/benchmark/study.js +192 -0
  38. package/dist/atlas/benchmark/study.js.map +1 -0
  39. package/dist/atlas/benchmark/types.d.ts +79 -0
  40. package/dist/atlas/benchmark/types.d.ts.map +1 -0
  41. package/dist/atlas/benchmark/types.js +46 -0
  42. package/dist/atlas/benchmark/types.js.map +1 -0
  43. package/dist/atlas/composition-table.d.ts +55 -0
  44. package/dist/atlas/composition-table.d.ts.map +1 -0
  45. package/dist/atlas/composition-table.js +133 -0
  46. package/dist/atlas/composition-table.js.map +1 -0
  47. package/dist/atlas/conventions.d.ts +63 -0
  48. package/dist/atlas/conventions.d.ts.map +1 -0
  49. package/dist/atlas/conventions.js +93 -0
  50. package/dist/atlas/conventions.js.map +1 -0
  51. package/dist/atlas/coverage.d.ts +93 -0
  52. package/dist/atlas/coverage.d.ts.map +1 -0
  53. package/dist/atlas/coverage.js +69 -0
  54. package/dist/atlas/coverage.js.map +1 -0
  55. package/dist/atlas/derivation.d.ts +137 -0
  56. package/dist/atlas/derivation.d.ts.map +1 -0
  57. package/dist/atlas/derivation.js +190 -0
  58. package/dist/atlas/derivation.js.map +1 -0
  59. package/dist/atlas/derive-evidence.d.ts +218 -0
  60. package/dist/atlas/derive-evidence.d.ts.map +1 -0
  61. package/dist/atlas/derive-evidence.js +225 -0
  62. package/dist/atlas/derive-evidence.js.map +1 -0
  63. package/dist/atlas/diffusion/bridges-closure.d.ts +63 -0
  64. package/dist/atlas/diffusion/bridges-closure.d.ts.map +1 -0
  65. package/dist/atlas/diffusion/bridges-closure.js +350 -0
  66. package/dist/atlas/diffusion/bridges-closure.js.map +1 -0
  67. package/dist/atlas/diffusion/bridges.d.ts +36 -0
  68. package/dist/atlas/diffusion/bridges.d.ts.map +1 -0
  69. package/dist/atlas/diffusion/bridges.js +226 -0
  70. package/dist/atlas/diffusion/bridges.js.map +1 -0
  71. package/dist/atlas/diffusion/dimensions.d.ts +21 -0
  72. package/dist/atlas/diffusion/dimensions.d.ts.map +1 -0
  73. package/dist/atlas/diffusion/dimensions.js +21 -0
  74. package/dist/atlas/diffusion/dimensions.js.map +1 -0
  75. package/dist/atlas/diffusion/index.d.ts +16 -0
  76. package/dist/atlas/diffusion/index.d.ts.map +1 -0
  77. package/dist/atlas/diffusion/index.js +23 -0
  78. package/dist/atlas/diffusion/index.js.map +1 -0
  79. package/dist/atlas/diffusion/models.d.ts +24 -0
  80. package/dist/atlas/diffusion/models.d.ts.map +1 -0
  81. package/dist/atlas/diffusion/models.js +139 -0
  82. package/dist/atlas/diffusion/models.js.map +1 -0
  83. package/dist/atlas/diffusion/numerics.d.ts +181 -0
  84. package/dist/atlas/diffusion/numerics.d.ts.map +1 -0
  85. package/dist/atlas/diffusion/numerics.js +251 -0
  86. package/dist/atlas/diffusion/numerics.js.map +1 -0
  87. package/dist/atlas/error-algebra.d.ts +52 -0
  88. package/dist/atlas/error-algebra.d.ts.map +1 -0
  89. package/dist/atlas/error-algebra.js +55 -0
  90. package/dist/atlas/error-algebra.js.map +1 -0
  91. package/dist/atlas/export.d.ts +48 -0
  92. package/dist/atlas/export.d.ts.map +1 -0
  93. package/dist/atlas/export.js +106 -0
  94. package/dist/atlas/export.js.map +1 -0
  95. package/dist/atlas/families.d.ts +14 -0
  96. package/dist/atlas/families.d.ts.map +1 -0
  97. package/dist/atlas/families.js +20 -0
  98. package/dist/atlas/families.js.map +1 -0
  99. package/dist/atlas/index.d.ts +90 -0
  100. package/dist/atlas/index.d.ts.map +1 -0
  101. package/dist/atlas/index.js +69 -0
  102. package/dist/atlas/index.js.map +1 -0
  103. package/dist/atlas/link-prediction.d.ts +71 -0
  104. package/dist/atlas/link-prediction.d.ts.map +1 -0
  105. package/dist/atlas/link-prediction.js +128 -0
  106. package/dist/atlas/link-prediction.js.map +1 -0
  107. package/dist/atlas/model.d.ts +70 -0
  108. package/dist/atlas/model.d.ts.map +1 -0
  109. package/dist/atlas/model.js +26 -0
  110. package/dist/atlas/model.js.map +1 -0
  111. package/dist/atlas/oscillators/bridges-coarse.d.ts +71 -0
  112. package/dist/atlas/oscillators/bridges-coarse.d.ts.map +1 -0
  113. package/dist/atlas/oscillators/bridges-coarse.js +146 -0
  114. package/dist/atlas/oscillators/bridges-coarse.js.map +1 -0
  115. package/dist/atlas/oscillators/bridges-exact.d.ts +70 -0
  116. package/dist/atlas/oscillators/bridges-exact.d.ts.map +1 -0
  117. package/dist/atlas/oscillators/bridges-exact.js +230 -0
  118. package/dist/atlas/oscillators/bridges-exact.js.map +1 -0
  119. package/dist/atlas/oscillators/bridges-limits.d.ts +118 -0
  120. package/dist/atlas/oscillators/bridges-limits.d.ts.map +1 -0
  121. package/dist/atlas/oscillators/bridges-limits.js +345 -0
  122. package/dist/atlas/oscillators/bridges-limits.js.map +1 -0
  123. package/dist/atlas/oscillators/dimensions.d.ts +34 -0
  124. package/dist/atlas/oscillators/dimensions.d.ts.map +1 -0
  125. package/dist/atlas/oscillators/dimensions.js +34 -0
  126. package/dist/atlas/oscillators/dimensions.js.map +1 -0
  127. package/dist/atlas/oscillators/index.d.ts +38 -0
  128. package/dist/atlas/oscillators/index.d.ts.map +1 -0
  129. package/dist/atlas/oscillators/index.js +37 -0
  130. package/dist/atlas/oscillators/index.js.map +1 -0
  131. package/dist/atlas/oscillators/models.d.ts +25 -0
  132. package/dist/atlas/oscillators/models.d.ts.map +1 -0
  133. package/dist/atlas/oscillators/models.js +160 -0
  134. package/dist/atlas/oscillators/models.js.map +1 -0
  135. package/dist/atlas/oscillators/rejections.d.ts +21 -0
  136. package/dist/atlas/oscillators/rejections.d.ts.map +1 -0
  137. package/dist/atlas/oscillators/rejections.js +54 -0
  138. package/dist/atlas/oscillators/rejections.js.map +1 -0
  139. package/dist/atlas/path-bound.d.ts +143 -0
  140. package/dist/atlas/path-bound.d.ts.map +1 -0
  141. package/dist/atlas/path-bound.js +268 -0
  142. package/dist/atlas/path-bound.js.map +1 -0
  143. package/dist/atlas/poster/associations.d.ts +66 -0
  144. package/dist/atlas/poster/associations.d.ts.map +1 -0
  145. package/dist/atlas/poster/associations.js +90 -0
  146. package/dist/atlas/poster/associations.js.map +1 -0
  147. package/dist/atlas/poster/derivations.d.ts +156 -0
  148. package/dist/atlas/poster/derivations.d.ts.map +1 -0
  149. package/dist/atlas/poster/derivations.js +430 -0
  150. package/dist/atlas/poster/derivations.js.map +1 -0
  151. package/dist/atlas/poster/statements.d.ts +198 -0
  152. package/dist/atlas/poster/statements.d.ts.map +1 -0
  153. package/dist/atlas/poster/statements.js +365 -0
  154. package/dist/atlas/poster/statements.js.map +1 -0
  155. package/dist/atlas/public.d.ts +26 -0
  156. package/dist/atlas/public.d.ts.map +1 -0
  157. package/dist/atlas/public.js +21 -0
  158. package/dist/atlas/public.js.map +1 -0
  159. package/dist/atlas/regime.d.ts +171 -0
  160. package/dist/atlas/regime.d.ts.map +1 -0
  161. package/dist/atlas/regime.js +309 -0
  162. package/dist/atlas/regime.js.map +1 -0
  163. package/dist/atlas/serialize.d.ts +50 -0
  164. package/dist/atlas/serialize.d.ts.map +1 -0
  165. package/dist/atlas/serialize.js +180 -0
  166. package/dist/atlas/serialize.js.map +1 -0
  167. package/dist/atlas/statement.d.ts +165 -0
  168. package/dist/atlas/statement.d.ts.map +1 -0
  169. package/dist/atlas/statement.js +176 -0
  170. package/dist/atlas/statement.js.map +1 -0
  171. package/dist/atlas/types.d.ts +325 -0
  172. package/dist/atlas/types.d.ts.map +1 -0
  173. package/dist/atlas/types.js +61 -0
  174. package/dist/atlas/types.js.map +1 -0
  175. package/dist/atlas/waves/bridges-closure.d.ts +39 -0
  176. package/dist/atlas/waves/bridges-closure.d.ts.map +1 -0
  177. package/dist/atlas/waves/bridges-closure.js +226 -0
  178. package/dist/atlas/waves/bridges-closure.js.map +1 -0
  179. package/dist/atlas/waves/bridges.d.ts +49 -0
  180. package/dist/atlas/waves/bridges.d.ts.map +1 -0
  181. package/dist/atlas/waves/bridges.js +266 -0
  182. package/dist/atlas/waves/bridges.js.map +1 -0
  183. package/dist/atlas/waves/index.d.ts +16 -0
  184. package/dist/atlas/waves/index.d.ts.map +1 -0
  185. package/dist/atlas/waves/index.js +23 -0
  186. package/dist/atlas/waves/index.js.map +1 -0
  187. package/dist/atlas/waves/models.d.ts +29 -0
  188. package/dist/atlas/waves/models.d.ts.map +1 -0
  189. package/dist/atlas/waves/models.js +127 -0
  190. package/dist/atlas/waves/models.js.map +1 -0
  191. package/dist/atlas/waves/numerics.d.ts +149 -0
  192. package/dist/atlas/waves/numerics.d.ts.map +1 -0
  193. package/dist/atlas/waves/numerics.js +218 -0
  194. package/dist/atlas/waves/numerics.js.map +1 -0
  195. package/dist/atlas/witness-artifact.d.ts +65 -0
  196. package/dist/atlas/witness-artifact.d.ts.map +1 -0
  197. package/dist/atlas/witness-artifact.js +78 -0
  198. package/dist/atlas/witness-artifact.js.map +1 -0
  199. package/dist/atlas/witness-numeric.d.ts +81 -0
  200. package/dist/atlas/witness-numeric.d.ts.map +1 -0
  201. package/dist/atlas/witness-numeric.js +105 -0
  202. package/dist/atlas/witness-numeric.js.map +1 -0
  203. package/dist/atlas/witness-result.d.ts +77 -0
  204. package/dist/atlas/witness-result.d.ts.map +1 -0
  205. package/dist/atlas/witness-result.js +39 -0
  206. package/dist/atlas/witness-result.js.map +1 -0
  207. package/dist/atlas/witness-specs.d.ts +110 -0
  208. package/dist/atlas/witness-specs.d.ts.map +1 -0
  209. package/dist/atlas/witness-specs.js +372 -0
  210. package/dist/atlas/witness-specs.js.map +1 -0
  211. package/dist/atlas/witness-symbolic.d.ts +79 -0
  212. package/dist/atlas/witness-symbolic.d.ts.map +1 -0
  213. package/dist/atlas/witness-symbolic.js +140 -0
  214. package/dist/atlas/witness-symbolic.js.map +1 -0
  215. package/dist/atlas/witnesses/quantum-support.d.ts +50 -0
  216. package/dist/atlas/witnesses/quantum-support.d.ts.map +1 -0
  217. package/dist/atlas/witnesses/quantum-support.js +48 -0
  218. package/dist/atlas/witnesses/quantum-support.js.map +1 -0
  219. package/dist/bridges/be11-decoherence-confrontation.js.map +1 -1
  220. package/dist/bridges/be21-kss-confrontation.js.map +1 -1
  221. package/dist/bridges/be23-planckian-confrontation.js.map +1 -1
  222. package/dist/bridges/be35-bootstrap-confrontation.js.map +1 -1
  223. package/dist/bridges/be36-gw170817-confrontation.js.map +1 -1
  224. package/dist/bridges/be37-cassini-confrontation.js.map +1 -1
  225. package/dist/bridges/be48-collapse-confrontation.js.map +1 -1
  226. package/dist/bridges/be51-lensing-confrontation.d.ts.map +1 -1
  227. package/dist/bridges/be51-lensing-confrontation.js +5 -3
  228. package/dist/bridges/be51-lensing-confrontation.js.map +1 -1
  229. package/dist/bridges/be52-mercury-confrontation.d.ts.map +1 -1
  230. package/dist/bridges/be52-mercury-confrontation.js +4 -1
  231. package/dist/bridges/be52-mercury-confrontation.js.map +1 -1
  232. package/dist/bridges/be55-quantum-hall-confrontation.js.map +1 -1
  233. package/dist/bridges/be56-casimir-confrontation.js.map +1 -1
  234. package/dist/bridges/be58-johnson-nyquist-confrontation.js.map +1 -1
  235. package/dist/bridges/be59-ac-josephson-confrontation.js.map +1 -1
  236. package/dist/bridges/be60-fractional-qh-confrontation.js.map +1 -1
  237. package/dist/bridges/be61-wiedemann-franz-confrontation.js.map +1 -1
  238. package/dist/bridges/be62-bcs-gap-confrontation.js.map +1 -1
  239. package/dist/bridges/be63-chandrasekhar-mass-confrontation.js.map +1 -1
  240. package/dist/bridges/be64-eddington-luminosity-confrontation.js.map +1 -1
  241. package/dist/bridges/be65-jeans-mass-confrontation.js.map +1 -1
  242. package/dist/bridges/bridge-equations.d.ts +2 -2
  243. package/dist/bridges/bridge-equations.d.ts.map +1 -1
  244. package/dist/bridges/bridge-equations.js +2 -2
  245. package/dist/bridges/bridge-equations.js.map +1 -1
  246. package/dist/bridges/catalog-adapter.d.ts.map +1 -1
  247. package/dist/bridges/catalog-adapter.js.map +1 -1
  248. package/dist/bridges/confrontations.d.ts.map +1 -1
  249. package/dist/bridges/confrontations.js +7 -0
  250. package/dist/bridges/confrontations.js.map +1 -1
  251. package/dist/bridges/equations/_be-helpers.d.ts +2 -2
  252. package/dist/bridges/equations/_be-helpers.js +2 -2
  253. package/dist/bridges/equations/be-20-vacuum-energy.js.map +1 -1
  254. package/dist/bridges/equations/be-35-conformal-bootstrap.d.ts +59 -72
  255. package/dist/bridges/equations/be-35-conformal-bootstrap.d.ts.map +1 -1
  256. package/dist/bridges/equations/be-35-conformal-bootstrap.js +66 -98
  257. package/dist/bridges/equations/be-35-conformal-bootstrap.js.map +1 -1
  258. package/dist/bridges/equations/be-48-grw-localization.d.ts +9 -8
  259. package/dist/bridges/equations/be-48-grw-localization.d.ts.map +1 -1
  260. package/dist/bridges/equations/be-48-grw-localization.js +9 -8
  261. package/dist/bridges/equations/be-48-grw-localization.js.map +1 -1
  262. package/dist/bridges/gravitational-lensing.d.ts +10 -0
  263. package/dist/bridges/gravitational-lensing.d.ts.map +1 -1
  264. package/dist/bridges/gravitational-lensing.js.map +1 -1
  265. package/dist/bridges/index.d.ts +125 -7
  266. package/dist/bridges/index.d.ts.map +1 -1
  267. package/dist/bridges/index.js +483 -20
  268. package/dist/bridges/index.js.map +1 -1
  269. package/dist/bridges/observations/types.d.ts +14 -0
  270. package/dist/bridges/observations/types.d.ts.map +1 -1
  271. package/dist/bridges/observations/types.js.map +1 -1
  272. package/dist/bridges/perihelion-precession.d.ts +10 -0
  273. package/dist/bridges/perihelion-precession.d.ts.map +1 -1
  274. package/dist/bridges/perihelion-precession.js.map +1 -1
  275. package/dist/bridges/rhs-registry.js +2 -2
  276. package/dist/canonical/canonical-equation.d.ts +15 -0
  277. package/dist/canonical/canonical-equation.d.ts.map +1 -1
  278. package/dist/canonical/entries/_l1-build.d.ts +1 -1
  279. package/dist/canonical/entries/_l1-build.d.ts.map +1 -1
  280. package/dist/canonical/entries/atomic.d.ts.map +1 -1
  281. package/dist/canonical/entries/atomic.js +23 -0
  282. package/dist/canonical/entries/atomic.js.map +1 -1
  283. package/dist/canonical/entries/nonmonomial.d.ts.map +1 -1
  284. package/dist/canonical/entries/nonmonomial.js +93 -0
  285. package/dist/canonical/entries/nonmonomial.js.map +1 -1
  286. package/dist/canonical/normal-form.js.map +1 -1
  287. package/dist/canonical/residual.d.ts +28 -0
  288. package/dist/canonical/residual.d.ts.map +1 -0
  289. package/dist/canonical/residual.js +31 -0
  290. package/dist/canonical/residual.js.map +1 -0
  291. package/dist/cli/command.d.ts +8 -0
  292. package/dist/cli/command.d.ts.map +1 -1
  293. package/dist/cli/command.js +10 -0
  294. package/dist/cli/command.js.map +1 -1
  295. package/dist/cli/commands/atlas.d.ts +3 -0
  296. package/dist/cli/commands/atlas.d.ts.map +1 -0
  297. package/dist/cli/commands/atlas.js +158 -0
  298. package/dist/cli/commands/atlas.js.map +1 -0
  299. package/dist/cli/commands/audit.js +3 -3
  300. package/dist/cli/commands/candidates.js +3 -3
  301. package/dist/cli/commands/canonical.js +3 -3
  302. package/dist/cli/commands/confront.d.ts.map +1 -1
  303. package/dist/cli/commands/confront.js +8 -1
  304. package/dist/cli/commands/confront.js.map +1 -1
  305. package/dist/cli/commands/connectors.js +7 -7
  306. package/dist/cli/commands/coverage.js +3 -3
  307. package/dist/cli/commands/derive.d.ts.map +1 -1
  308. package/dist/cli/commands/derive.js +40 -9
  309. package/dist/cli/commands/derive.js.map +1 -1
  310. package/dist/cli/commands/discover.d.ts.map +1 -1
  311. package/dist/cli/commands/discover.js +46 -27
  312. package/dist/cli/commands/discover.js.map +1 -1
  313. package/dist/cli/commands/evaluate.d.ts.map +1 -1
  314. package/dist/cli/commands/evaluate.js +2 -1
  315. package/dist/cli/commands/evaluate.js.map +1 -1
  316. package/dist/cli/commands/explain.d.ts.map +1 -1
  317. package/dist/cli/commands/explain.js +19 -6
  318. package/dist/cli/commands/explain.js.map +1 -1
  319. package/dist/cli/commands/index.d.ts +3 -0
  320. package/dist/cli/commands/index.d.ts.map +1 -1
  321. package/dist/cli/commands/index.js +3 -0
  322. package/dist/cli/commands/index.js.map +1 -1
  323. package/dist/cli/commands/map.d.ts.map +1 -1
  324. package/dist/cli/commands/map.js +187 -36
  325. package/dist/cli/commands/map.js.map +1 -1
  326. package/dist/cli/commands/path.d.ts +3 -0
  327. package/dist/cli/commands/path.d.ts.map +1 -0
  328. package/dist/cli/commands/path.js +228 -0
  329. package/dist/cli/commands/path.js.map +1 -0
  330. package/dist/cli/commands/predict.js +4 -4
  331. package/dist/cli/commands/priority.js +2 -2
  332. package/dist/cli/commands/probe.d.ts.map +1 -1
  333. package/dist/cli/commands/probe.js +59 -2
  334. package/dist/cli/commands/probe.js.map +1 -1
  335. package/dist/cli/commands/recover.d.ts.map +1 -1
  336. package/dist/cli/commands/recover.js +25 -6
  337. package/dist/cli/commands/recover.js.map +1 -1
  338. package/dist/cli/commands/regime.d.ts +41 -0
  339. package/dist/cli/commands/regime.d.ts.map +1 -0
  340. package/dist/cli/commands/regime.js +243 -0
  341. package/dist/cli/commands/regime.js.map +1 -0
  342. package/dist/cli/commands/symbolic.js +5 -5
  343. package/dist/cli/errors.d.ts +13 -1
  344. package/dist/cli/errors.d.ts.map +1 -1
  345. package/dist/cli/errors.js +13 -1
  346. package/dist/cli/errors.js.map +1 -1
  347. package/dist/cli/graphs.d.ts.map +1 -1
  348. package/dist/cli/graphs.js +5 -1
  349. package/dist/cli/graphs.js.map +1 -1
  350. package/dist/cli/main.d.ts.map +1 -1
  351. package/dist/cli/main.js +29 -2
  352. package/dist/cli/main.js.map +1 -1
  353. package/dist/cli/output.d.ts +6 -1
  354. package/dist/cli/output.d.ts.map +1 -1
  355. package/dist/cli/output.js.map +1 -1
  356. package/dist/cli/version.js.map +1 -1
  357. package/dist/cli-api.d.ts +21 -1
  358. package/dist/cli-api.d.ts.map +1 -1
  359. package/dist/cli-api.js +23 -1
  360. package/dist/cli-api.js.map +1 -1
  361. package/dist/composition/axis-audit.js.map +1 -1
  362. package/dist/composition/bridge-prediction.d.ts.map +1 -1
  363. package/dist/composition/bridge-prediction.js +0 -0
  364. package/dist/composition/bridge-prediction.js.map +1 -1
  365. package/dist/composition/canonical-compare.d.ts +65 -0
  366. package/dist/composition/canonical-compare.d.ts.map +1 -0
  367. package/dist/composition/canonical-compare.js +237 -0
  368. package/dist/composition/canonical-compare.js.map +1 -0
  369. package/dist/composition/canonical-graph.d.ts +2 -2
  370. package/dist/composition/canonical-graph.js +2 -2
  371. package/dist/composition/canonical-graph.js.map +1 -1
  372. package/dist/composition/canonical-prefactors.d.ts +32 -0
  373. package/dist/composition/canonical-prefactors.d.ts.map +1 -0
  374. package/dist/composition/canonical-prefactors.js +80 -0
  375. package/dist/composition/canonical-prefactors.js.map +1 -0
  376. package/dist/composition/compose-symbolic.d.ts.map +1 -1
  377. package/dist/composition/compose-symbolic.js.map +1 -1
  378. package/dist/composition/compose.d.ts.map +1 -1
  379. package/dist/composition/compose.js +80 -1
  380. package/dist/composition/compose.js.map +1 -1
  381. package/dist/composition/consequence.js.map +1 -1
  382. package/dist/composition/discovery.d.ts +20 -3
  383. package/dist/composition/discovery.d.ts.map +1 -1
  384. package/dist/composition/discovery.js +30 -4
  385. package/dist/composition/discovery.js.map +1 -1
  386. package/dist/composition/edge.d.ts +64 -0
  387. package/dist/composition/edge.d.ts.map +1 -1
  388. package/dist/composition/edge.js +29 -0
  389. package/dist/composition/edge.js.map +1 -1
  390. package/dist/composition/edges/calibration.d.ts.map +1 -1
  391. package/dist/composition/edges/calibration.js +46 -0
  392. package/dist/composition/edges/calibration.js.map +1 -1
  393. package/dist/composition/edges/catalog-quantum.d.ts.map +1 -1
  394. package/dist/composition/edges/catalog-quantum.js +9 -0
  395. package/dist/composition/edges/catalog-quantum.js.map +1 -1
  396. package/dist/composition/edges/catalog-tranche.d.ts.map +1 -1
  397. package/dist/composition/edges/catalog-tranche.js +18 -0
  398. package/dist/composition/edges/catalog-tranche.js.map +1 -1
  399. package/dist/composition/enumerate.js.map +1 -1
  400. package/dist/composition/explain.d.ts +9 -1
  401. package/dist/composition/explain.d.ts.map +1 -1
  402. package/dist/composition/explain.js +34 -8
  403. package/dist/composition/explain.js.map +1 -1
  404. package/dist/composition/expr-eval.d.ts.map +1 -1
  405. package/dist/composition/expr-eval.js.map +1 -1
  406. package/dist/composition/expr-simplify.d.ts +13 -0
  407. package/dist/composition/expr-simplify.d.ts.map +1 -1
  408. package/dist/composition/expr-simplify.js +25 -0
  409. package/dist/composition/expr-simplify.js.map +1 -1
  410. package/dist/composition/expr-subst.js.map +1 -1
  411. package/dist/composition/graph-viz-svg.d.ts.map +1 -1
  412. package/dist/composition/graph-viz.d.ts +118 -1
  413. package/dist/composition/graph-viz.d.ts.map +1 -1
  414. package/dist/composition/graph-viz.js +189 -6
  415. package/dist/composition/graph-viz.js.map +1 -1
  416. package/dist/composition/grounding.d.ts.map +1 -1
  417. package/dist/composition/grounding.js +6 -1
  418. package/dist/composition/grounding.js.map +1 -1
  419. package/dist/composition/identifiability.js.map +1 -1
  420. package/dist/composition/index.d.ts +4 -2
  421. package/dist/composition/index.d.ts.map +1 -1
  422. package/dist/composition/index.js +2 -1
  423. package/dist/composition/index.js.map +1 -1
  424. package/dist/composition/poster-source.d.ts +153 -0
  425. package/dist/composition/poster-source.d.ts.map +1 -0
  426. package/dist/composition/poster-source.js +183 -0
  427. package/dist/composition/poster-source.js.map +1 -0
  428. package/dist/composition/probe/backend-protocol.d.ts +34 -1
  429. package/dist/composition/probe/backend-protocol.d.ts.map +1 -1
  430. package/dist/composition/probe/backend-protocol.js +9 -2
  431. package/dist/composition/probe/backend-protocol.js.map +1 -1
  432. package/dist/composition/probe/candidate-store.d.ts.map +1 -1
  433. package/dist/composition/probe/corpus.d.ts +12 -0
  434. package/dist/composition/probe/corpus.d.ts.map +1 -1
  435. package/dist/composition/probe/corpus.js +100 -0
  436. package/dist/composition/probe/corpus.js.map +1 -1
  437. package/dist/composition/probe/generator.d.ts +14 -0
  438. package/dist/composition/probe/generator.d.ts.map +1 -1
  439. package/dist/composition/probe/generator.js +24 -2
  440. package/dist/composition/probe/generator.js.map +1 -1
  441. package/dist/composition/probe/limits.js.map +1 -1
  442. package/dist/composition/probe/pipeline.d.ts +5 -0
  443. package/dist/composition/probe/pipeline.d.ts.map +1 -1
  444. package/dist/composition/probe/pipeline.js +20 -3
  445. package/dist/composition/probe/pipeline.js.map +1 -1
  446. package/dist/composition/probe/problem.js.map +1 -1
  447. package/dist/composition/probe/report.d.ts.map +1 -1
  448. package/dist/composition/probe/report.js +2 -0
  449. package/dist/composition/probe/report.js.map +1 -1
  450. package/dist/composition/probe/residual.d.ts.map +1 -1
  451. package/dist/composition/probe/residual.js.map +1 -1
  452. package/dist/composition/probe/search-budget.js.map +1 -1
  453. package/dist/composition/proposed-bridges.d.ts +2 -2
  454. package/dist/composition/proposed-bridges.d.ts.map +1 -1
  455. package/dist/composition/proposed-bridges.js +1 -1
  456. package/dist/composition/proposed-bridges.js.map +1 -1
  457. package/dist/composition/retrodiction.js.map +1 -1
  458. package/dist/composition/uncertainty.d.ts +52 -2
  459. package/dist/composition/uncertainty.d.ts.map +1 -1
  460. package/dist/composition/uncertainty.js +38 -2
  461. package/dist/composition/uncertainty.js.map +1 -1
  462. package/dist/composition/user-equation.d.ts.map +1 -1
  463. package/dist/core/constants.d.ts +13 -0
  464. package/dist/core/constants.d.ts.map +1 -1
  465. package/dist/core/constants.js +13 -0
  466. package/dist/core/constants.js.map +1 -1
  467. package/dist/core/flux-rules.d.ts.map +1 -1
  468. package/dist/core/flux-rules.js.map +1 -1
  469. package/dist/core/labeled-tensor.d.ts.map +1 -1
  470. package/dist/core/regime-registry.d.ts.map +1 -1
  471. package/dist/core/regime-rule-install.js.map +1 -1
  472. package/dist/core/tensor.d.ts.map +1 -1
  473. package/dist/core/tensor.js.map +1 -1
  474. package/dist/core/types.d.ts.map +1 -1
  475. package/dist/diff/bridge-ast-gradient.js.map +1 -1
  476. package/dist/diff/bridge-gradient.d.ts +1 -1
  477. package/dist/diff/bridge-gradient.js +1 -1
  478. package/dist/dimensional/ast-types.d.ts +31 -1
  479. package/dist/dimensional/ast-types.d.ts.map +1 -1
  480. package/dist/dimensional/bridge-check.d.ts +1 -1
  481. package/dist/dimensional/bridge-check.js +1 -1
  482. package/dist/dimensional/buckingham.d.ts.map +1 -1
  483. package/dist/dimensional/connection.d.ts +2 -0
  484. package/dist/dimensional/connection.d.ts.map +1 -1
  485. package/dist/dimensional/connection.js +2 -0
  486. package/dist/dimensional/connection.js.map +1 -1
  487. package/dist/dimensional/curvature-composite.d.ts +5 -3
  488. package/dist/dimensional/curvature-composite.d.ts.map +1 -1
  489. package/dist/dimensional/curvature-composite.js +1 -0
  490. package/dist/dimensional/curvature-composite.js.map +1 -1
  491. package/dist/dimensional/curvature-invariants.d.ts +2 -0
  492. package/dist/dimensional/curvature-invariants.d.ts.map +1 -1
  493. package/dist/dimensional/curvature-invariants.js +2 -0
  494. package/dist/dimensional/curvature-invariants.js.map +1 -1
  495. package/dist/dimensional/dimension-spec.d.ts.map +1 -1
  496. package/dist/dimensional/einstein-equation.d.ts +3 -3
  497. package/dist/dimensional/einstein-equation.js +3 -3
  498. package/dist/dimensional/errors.d.ts.map +1 -1
  499. package/dist/dimensional/metric.d.ts +5 -2
  500. package/dist/dimensional/metric.d.ts.map +1 -1
  501. package/dist/dimensional/metric.js +5 -2
  502. package/dist/dimensional/metric.js.map +1 -1
  503. package/dist/dimensional/tensor-trace.js.map +1 -1
  504. package/dist/dimensional/validator-registry.js.map +1 -1
  505. package/dist/dimensional/validator.d.ts +3 -2
  506. package/dist/dimensional/validator.d.ts.map +1 -1
  507. package/dist/dimensional/validator.js +23 -4
  508. package/dist/dimensional/validator.js.map +1 -1
  509. package/dist/index.d.ts +4 -3
  510. package/dist/index.d.ts.map +1 -1
  511. package/dist/index.js +4 -1
  512. package/dist/index.js.map +1 -1
  513. package/dist/numerical/curvature-lowering-helpers.d.ts.map +1 -1
  514. package/dist/numerical/curvature-lowering-helpers.js +104 -0
  515. package/dist/numerical/curvature-lowering-helpers.js.map +1 -1
  516. package/dist/numerical/errors.d.ts.map +1 -1
  517. package/dist/numerical/errors.js.map +1 -1
  518. package/dist/numerical/float64-engine.d.ts.map +1 -1
  519. package/dist/numerical/float64-engine.js +51 -24
  520. package/dist/numerical/float64-engine.js.map +1 -1
  521. package/dist/numerical/formula-dimension.d.ts.map +1 -1
  522. package/dist/numerical/formula-dimension.js.map +1 -1
  523. package/dist/numerical/formula.d.ts.map +1 -1
  524. package/dist/numerical/formula.js.map +1 -1
  525. package/dist/numerical/geometrized.d.ts.map +1 -1
  526. package/dist/numerical/gl4-integrator.d.ts +3 -3
  527. package/dist/numerical/gl4-integrator.js +3 -3
  528. package/dist/numerical/killing.d.ts +47 -5
  529. package/dist/numerical/killing.d.ts.map +1 -1
  530. package/dist/numerical/killing.js +41 -3
  531. package/dist/numerical/killing.js.map +1 -1
  532. package/dist/numerical/klein-gordon.d.ts +2 -2
  533. package/dist/numerical/klein-gordon.js +2 -2
  534. package/dist/numerical/lowering.d.ts +2 -2
  535. package/dist/numerical/lowering.d.ts.map +1 -1
  536. package/dist/numerical/lowering.js +5 -3
  537. package/dist/numerical/lowering.js.map +1 -1
  538. package/dist/numerical/mathts-engine.d.ts.map +1 -1
  539. package/dist/numerical/mathts-engine.js.map +1 -1
  540. package/dist/numerical/metric-inverse.js.map +1 -1
  541. package/dist/numerical/perihelion-finder.d.ts +15 -13
  542. package/dist/numerical/perihelion-finder.d.ts.map +1 -1
  543. package/dist/numerical/perihelion-finder.js +15 -13
  544. package/dist/numerical/perihelion-finder.js.map +1 -1
  545. package/dist/numerical/weyl-lowering.d.ts.map +1 -1
  546. package/dist/numerical/weyl-lowering.js +90 -40
  547. package/dist/numerical/weyl-lowering.js.map +1 -1
  548. package/package.json +163 -104
@@ -0,0 +1,160 @@
1
+ /**
2
+ * The nine oscillator models of design note §3.
3
+ *
4
+ * Each model's `regime` carries the π-groups `deriveRegimeGroups` produces
5
+ * from its own parameters and dimensionless inputs. `inequalities` is EMPTY
6
+ * on every model: Phase 0 states its inequalities on the BRIDGES (which carry
7
+ * the regime of validity), and the design note fixes no per-model inequality.
8
+ * An invented one would be a fabricated constraint, so none is written.
9
+ *
10
+ * The Phase 3 fields `boundaryData`, `initialData` and `symmetryGroup`
11
+ * (`../model.ts`) are ABSENT on all nine for the same reason `inequalities`
12
+ * is empty: no source records them for these ODE models, and an absent field
13
+ * says "not recorded" where a present empty one would claim "there are none".
14
+ *
15
+ * `canonicalRefs` are restricted to ids that exist in `CANONICAL_EQUATIONS`;
16
+ * `tests/atlas/models.test.ts` resolves every one of them.
17
+ *
18
+ * @module atlas/oscillators/models
19
+ */
20
+ import { ACCELERATION, LENGTH, MASS, VELOCITY, } from '../../dimensional/types.js';
21
+ import { deriveRegimeGroups } from '../regime.js';
22
+ import { CAPACITANCE, CUBIC_STIFFNESS, DAMPING, INDUCTANCE, RESISTANCE, SPRING_CONSTANT, } from './dimensions.js';
23
+ const FAMILY = 'oscillators';
24
+ function model(spec) {
25
+ return {
26
+ ...spec,
27
+ family: FAMILY,
28
+ regime: {
29
+ family: FAMILY,
30
+ inequalities: [],
31
+ groupDefinitions: deriveRegimeGroups(FAMILY, spec.parameters, spec.dimensionlessInputs),
32
+ },
33
+ };
34
+ }
35
+ /** The nine Phase 0 oscillator models, in design-note §3 order. @internal */
36
+ export const ATLAS_MODELS = [
37
+ model({
38
+ id: 'model-spring',
39
+ stateSpace: '(x, x′) ∈ ℝ²',
40
+ dynamics: 'm x″ + k x = 0',
41
+ observables: ['x', 'x′', 'energy'],
42
+ parameters: [
43
+ { name: 'm', dim: MASS },
44
+ { name: 'k', dim: SPRING_CONSTANT },
45
+ ],
46
+ dimensionlessInputs: [],
47
+ canonicalRefs: [
48
+ 'CE-simple-harmonic-frequency',
49
+ 'CE-spring-potential-energy',
50
+ 'CE-oscillator-energy',
51
+ ],
52
+ }),
53
+ model({
54
+ id: 'model-lc',
55
+ stateSpace: '(q, q′) ∈ ℝ²',
56
+ dynamics: 'L q″ + q/C = 0',
57
+ observables: ['q', 'q′', 'energy'],
58
+ parameters: [
59
+ { name: 'L', dim: INDUCTANCE },
60
+ { name: 'C', dim: CAPACITANCE },
61
+ ],
62
+ dimensionlessInputs: [],
63
+ canonicalRefs: ['CE-lc-resonance'],
64
+ }),
65
+ model({
66
+ id: 'model-damped-spring',
67
+ stateSpace: '(x, x′) ∈ ℝ²',
68
+ dynamics: 'm x″ + b x′ + k x = 0',
69
+ observables: ['x', 'x′'],
70
+ parameters: [
71
+ { name: 'm', dim: MASS },
72
+ { name: 'b', dim: DAMPING },
73
+ { name: 'k', dim: SPRING_CONSTANT },
74
+ ],
75
+ dimensionlessInputs: [],
76
+ canonicalRefs: [],
77
+ }),
78
+ model({
79
+ id: 'model-rlc',
80
+ stateSpace: '(q, q′) ∈ ℝ²',
81
+ dynamics: 'L q″ + R q′ + q/C = 0',
82
+ observables: ['q', 'q′'],
83
+ parameters: [
84
+ { name: 'L', dim: INDUCTANCE },
85
+ { name: 'R', dim: RESISTANCE },
86
+ { name: 'C', dim: CAPACITANCE },
87
+ ],
88
+ dimensionlessInputs: [],
89
+ canonicalRefs: [],
90
+ }),
91
+ model({
92
+ id: 'model-pendulum',
93
+ stateSpace: '(θ, θ′) ∈ S¹ × ℝ',
94
+ dynamics: 'θ″ + (g/ℓ) sin θ = 0',
95
+ observables: ['theta', 'theta′', 'period'],
96
+ parameters: [
97
+ { name: 'g', dim: ACCELERATION },
98
+ { name: 'ell', dim: LENGTH },
99
+ ],
100
+ dimensionlessInputs: ['theta0'],
101
+ canonicalRefs: [],
102
+ }),
103
+ model({
104
+ id: 'model-chain',
105
+ stateSpace: '(u_n, u_n′) ∈ ℝ^N × ℝ^N',
106
+ dynamics: 'm u_n″ = κ(u_{n+1} − 2u_n + u_{n−1})',
107
+ observables: ['u_n', 'u_n′', 'dispersion'],
108
+ parameters: [
109
+ { name: 'm', dim: MASS },
110
+ { name: 'kappa', dim: SPRING_CONSTANT },
111
+ { name: 'a', dim: LENGTH },
112
+ ],
113
+ dimensionlessInputs: ['qa'],
114
+ canonicalRefs: [],
115
+ }),
116
+ model({
117
+ id: 'model-wave-1d',
118
+ stateSpace: 'u(x, t), a field on ℝ × ℝ',
119
+ dynamics: 'u_tt = c² u_xx',
120
+ observables: ['u', 'u_t', 'dispersion'],
121
+ parameters: [{ name: 'c', dim: VELOCITY }],
122
+ dimensionlessInputs: [],
123
+ canonicalRefs: ['CE-wave-speed'],
124
+ }),
125
+ model({
126
+ id: 'model-cubic-spring',
127
+ stateSpace: '(x, x′) ∈ ℝ²',
128
+ dynamics: 'm x″ + k x + β x³ = 0',
129
+ observables: ['x', 'x′', 'amplitude-dependent period'],
130
+ parameters: [
131
+ { name: 'm', dim: MASS },
132
+ { name: 'k', dim: SPRING_CONSTANT },
133
+ { name: 'beta', dim: CUBIC_STIFFNESS },
134
+ { name: 'x0', dim: LENGTH },
135
+ ],
136
+ dimensionlessInputs: [],
137
+ canonicalRefs: [],
138
+ }),
139
+ model({
140
+ id: 'model-first-order',
141
+ stateSpace: 'x ∈ ℝ',
142
+ dynamics: 'b x′ + k x = 0',
143
+ observables: ['x'],
144
+ parameters: [
145
+ { name: 'b', dim: DAMPING },
146
+ { name: 'k', dim: SPRING_CONSTANT },
147
+ ],
148
+ dimensionlessInputs: [],
149
+ canonicalRefs: [],
150
+ }),
151
+ ];
152
+ const BY_ID = new Map(ATLAS_MODELS.map((m) => [m.id, m]));
153
+ /** Look up a model by id, throwing on an unknown one. @internal */
154
+ export function getAtlasModel(id) {
155
+ const found = BY_ID.get(id);
156
+ if (found === undefined)
157
+ throw new Error(`unknown atlas model id: ${id}`);
158
+ return found;
159
+ }
160
+ //# sourceMappingURL=models.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/atlas/oscillators/models.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The Phase 0 REJECTION record: a claimed bridge the atlas records as refuted,
3
+ * together with the witness that refutes it.
4
+ *
5
+ * `ax-cubic-spring-lc` claims the cubic (Duffing-type) spring
6
+ * `m x″ + k x + β x³ = 0` is exactly equivalent to the LC circuit
7
+ * `L q″ + q/C = 0`. It is not. The cubic spring's variable set
8
+ * {m, k, β, x0} carries exactly ONE dimensionless group, `β x0² / k`, which
9
+ * measures the nonlinearity and has no counterpart on the LC side: the LC
10
+ * variable set is dimensionally independent and admits no group at all. A
11
+ * surviving group with no image cannot be matched by any change of variables,
12
+ * so no exact equivalence exists.
13
+ *
14
+ * @module atlas/oscillators/rejections
15
+ */
16
+ import type { AtlasRejection } from '../types.js';
17
+ /** The rejected bridges of the oscillator pilot. @internal */
18
+ export declare const ATLAS_REJECTIONS: readonly AtlasRejection[];
19
+ /** Look up a rejection by id, throwing on an unknown one. @internal */
20
+ export declare function getAtlasRejection(id: string): AtlasRejection;
21
+ //# sourceMappingURL=rejections.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rejections.d.ts","sourceRoot":"","sources":["../../../src/atlas/oscillators/rejections.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,8DAA8D;AAC9D,eAAO,MAAM,gBAAgB,EAAE,SAAS,cAAc,EA8BrD,CAAC;AAEF,uEAAuE;AACvE,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,cAAc,CAI5D"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * The Phase 0 REJECTION record: a claimed bridge the atlas records as refuted,
3
+ * together with the witness that refutes it.
4
+ *
5
+ * `ax-cubic-spring-lc` claims the cubic (Duffing-type) spring
6
+ * `m x″ + k x + β x³ = 0` is exactly equivalent to the LC circuit
7
+ * `L q″ + q/C = 0`. It is not. The cubic spring's variable set
8
+ * {m, k, β, x0} carries exactly ONE dimensionless group, `β x0² / k`, which
9
+ * measures the nonlinearity and has no counterpart on the LC side: the LC
10
+ * variable set is dimensionally independent and admits no group at all. A
11
+ * surviving group with no image cannot be matched by any change of variables,
12
+ * so no exact equivalence exists.
13
+ *
14
+ * @module atlas/oscillators/rejections
15
+ */
16
+ /** The rejected bridges of the oscillator pilot. @internal */
17
+ export const ATLAS_REJECTIONS = [
18
+ {
19
+ id: 'ax-cubic-spring-lc',
20
+ claimed: 'exact-equivalence',
21
+ premises: ['model-cubic-spring'],
22
+ conclusion: 'model-lc',
23
+ reason: 'The cubic spring retains one dimensionless group, β x0² / k, that measures ' +
24
+ 'its nonlinearity, and the LC variable set has none (W3). A surviving group ' +
25
+ 'is necessary evidence, not sufficient. The decisive fact is isochrony: the ' +
26
+ 'LC period is the same at every amplitude, the cubic spring period is not ' +
27
+ '(W3b), and a change of variables that rescales time by a constant multiplies ' +
28
+ 'every period by the same factor. So no such change of variables makes the two ' +
29
+ 'models exactly equivalent.',
30
+ survivingGroup: 'β x0² / k',
31
+ witnesses: [
32
+ {
33
+ id: 'W3',
34
+ kind: 'symbolic',
35
+ test: 'tests/atlas/oscillators-coarse.test.ts',
36
+ tolerance: 'exact integer π-group exponents; LC verdict dimensionally-independent',
37
+ },
38
+ {
39
+ id: 'W3b',
40
+ kind: 'numeric',
41
+ test: 'tests/atlas/oscillators-coarse.test.ts',
42
+ tolerance: 'linear period 2π within 1e-6 at A = 0.5, 1, 2; cubic-spring periods spread by more than 10% at β x0²/k = 0.1',
43
+ },
44
+ ],
45
+ },
46
+ ];
47
+ /** Look up a rejection by id, throwing on an unknown one. @internal */
48
+ export function getAtlasRejection(id) {
49
+ const found = ATLAS_REJECTIONS.find((r) => r.id === id);
50
+ if (found === undefined)
51
+ throw new Error(`unknown atlas rejection id: ${id}`);
52
+ return found;
53
+ }
54
+ //# sourceMappingURL=rejections.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rejections.js","sourceRoot":"","sources":["../../../src/atlas/oscillators/rejections.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,8DAA8D;AAC9D,MAAM,CAAC,MAAM,gBAAgB,GAA8B;IACzD;QACE,EAAE,EAAE,oBAAoB;QACxB,OAAO,EAAE,mBAAmB;QAC5B,QAAQ,EAAE,CAAC,oBAAoB,CAAC;QAChC,UAAU,EAAE,UAAU;QACtB,MAAM,EACJ,6EAA6E;YAC7E,6EAA6E;YAC7E,6EAA6E;YAC7E,2EAA2E;YAC3E,+EAA+E;YAC/E,gFAAgF;YAChF,4BAA4B;QAC9B,cAAc,EAAE,WAAW;QAC3B,SAAS,EAAE;YACT;gBACE,EAAE,EAAE,IAAI;gBACR,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,wCAAwC;gBAC9C,SAAS,EAAE,uEAAuE;aACnF;YACD;gBACE,EAAE,EAAE,KAAK;gBACT,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,wCAAwC;gBAC9C,SAAS,EAAE,8GAA8G;aAC1H;SACF;KACF;CACF,CAAC;AAEF,uEAAuE;AACvE,MAAM,UAAU,iBAAiB,CAAC,EAAU;IAC1C,MAAM,KAAK,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IACxD,IAAI,KAAK,KAAK,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,+BAA+B,EAAE,EAAE,CAAC,CAAC;IAC9E,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,143 @@
1
+ /**
2
+ * Routes through an atlas family, and the error bound a route carries.
3
+ *
4
+ * Two functions, and the second is the one that can do damage:
5
+ *
6
+ * - {@link findPath} is pure graph search. It answers "is there a chain of
7
+ * bridges from A to B", and nothing more. A path existing says NOTHING about
8
+ * whether that path supports a claim.
9
+ * - {@link boundPath} answers "what error bound does this chain carry", and its
10
+ * default answer is NO BOUND. `docs/planning/Atlas-Phase-2-Design.md` §3:
11
+ *
12
+ * > A path containing any edge whose relation composes to
13
+ * > `'no-composite-claim'` has NO bound. It must return an explicit no-claim,
14
+ * > never a number. A composed number over an undefined composite would be
15
+ * > the most dangerous output this library could produce: precise-looking and
16
+ * > unfounded.
17
+ *
18
+ * So {@link boundPath} returns a DISCRIMINATED UNION, not a number. A caller
19
+ * cannot read `.bound` off a no-claim, because a no-claim has no `.bound` — the
20
+ * refusal is enforced by the type rather than by a documented convention.
21
+ *
22
+ * ## Norms — why an exact edge does not compose for free
23
+ *
24
+ * `./error-algebra.ts` states the rule this module obeys, and it is narrower
25
+ * than it first reads:
26
+ *
27
+ * > An exact equivalence contributes `IDENTITY_BOUND` **in the norms these
28
+ * > Phase 0 bridges state** — not in every norm.
29
+ *
30
+ * An `exact-equivalence` bridge carries no `bound`, hence states no `norm`. It
31
+ * therefore contributes `IDENTITY_BOUND` in NO norm, and a path that mixes it
32
+ * with a normed bound cannot claim the composite holds in that norm. That is a
33
+ * `'norm-not-stated'` no-claim. The composed NUMBER would be unchanged —
34
+ * composing with the identity is arithmetically a no-op — which is exactly what
35
+ * makes the error invisible without this gate: the danger is not a wrong
36
+ * magnitude, it is a right magnitude attached to the wrong norm.
37
+ *
38
+ * ⚠ **Correction to the S2.2 brief.** The brief states that no field records a
39
+ * norm and that Phase 2 must add `norm?` to `ApproximationBound`. That is
40
+ * out of date: `ApproximationBound.norm` already exists as a MANDATORY
41
+ * `string` (Phase 0, `./types.ts`). No type change was needed, and this module
42
+ * reads the field that is already there.
43
+ *
44
+ * **Uniformity is gated here, at use.** `ApproximationBound.uniformity` may
45
+ * be `null` (or empty — the same state) so a real bound can be recorded
46
+ * before anyone has analysed what the error is uniform in. Composing such a
47
+ * bound would attach a number to an unanalysed claim, so {@link boundPath}
48
+ * returns `'uniformity-unanalysed'` and does not compute one.
49
+ * `propagateUncertainty` does not read the field and does not fold `delta`
50
+ * into `sigma`: it stays a statistical-sigma function.
51
+ *
52
+ * Pure: no I/O, no registry reads.
53
+ *
54
+ * @module atlas/path-bound
55
+ */
56
+ import { IDENTITY_BOUND } from './error-algebra.js';
57
+ import type { BoundPair } from './error-algebra.js';
58
+ import type { AtlasBridge, RelationType } from './types.js';
59
+ /**
60
+ * Shortest chain of bridges from `from` to `to`, or `null` if none exists.
61
+ *
62
+ * Breadth-first, so the result is a shortest path by edge count. Ties are
63
+ * broken by `family.bridges` order, which is the design note's order and is
64
+ * therefore stable across runs.
65
+ *
66
+ * A returned path is a ROUTE, not a warrant: ask {@link boundPath} what the
67
+ * route supports.
68
+ *
69
+ * @throws RangeError if `family` is not a known family, or an endpoint is not
70
+ * one of its models. An unknown endpoint returning `null` would be
71
+ * indistinguishable from a genuinely disconnected pair.
72
+ * @internal
73
+ */
74
+ export declare function findPath(family: string, from: string, to: string): readonly AtlasBridge[] | null;
75
+ /** Why a path supports no bound. @internal */
76
+ export type NoClaimReason =
77
+ /** The relations along the path do not compose to a relation at all. */
78
+ 'no-composite-claim'
79
+ /** An edge on the path states no norm, so the composite holds in none. */
80
+ | 'norm-not-stated'
81
+ /** Two edges state DIFFERENT norms; composing across norms is unsound. */
82
+ | 'norm-mismatch'
83
+ /**
84
+ * A bound on the path has `uniformity === null` or an empty list: what the
85
+ * error is uniform in has not been analysed, so no number is stated.
86
+ */
87
+ | 'uniformity-unanalysed';
88
+ /** A path that DOES carry a bound. @internal */
89
+ export interface PathBoundClaim {
90
+ readonly kind: 'bound';
91
+ readonly bound: BoundPair;
92
+ /** True when the path ended on a step with no Lipschitz constant. */
93
+ readonly terminal: boolean;
94
+ /** The relation the chain asserts, from {@link composeRelation}. */
95
+ readonly relation: RelationType;
96
+ /**
97
+ * The single norm every bound on the path states, or `null` when the path
98
+ * carries no bound at all and the claim is the vacuous `terminal` identity
99
+ * over an empty prefix.
100
+ */
101
+ readonly norm: string | null;
102
+ }
103
+ /** A path that carries NO bound, and the reason. @internal */
104
+ export interface PathNoClaim {
105
+ readonly kind: 'no-claim';
106
+ readonly reason: NoClaimReason;
107
+ /** Human-readable specifics: which edge, which norms. */
108
+ readonly detail: string;
109
+ }
110
+ /** The result of {@link boundPath}: a bound, or an explicit refusal. @internal */
111
+ export type PathBoundResult = PathBoundClaim | PathNoClaim;
112
+ /**
113
+ * The error bound a chain of bridges carries — or an explicit no-claim.
114
+ *
115
+ * Four gates, in this order. Each one is a reason to refuse, and the FIRST
116
+ * reason found is the one reported; none of them is skippable by a caller.
117
+ *
118
+ * 1. **Relation.** `composeRelation` is folded along the path. The moment the
119
+ * running composite is `'no-composite-claim'`, the path has no bound. This
120
+ * is design note §3 constraint 1 and it is checked before any arithmetic,
121
+ * so no number is ever computed for a path that cannot carry one.
122
+ * 2. **Uniformity.** Any bound whose `uniformity` is `null` or empty is not
123
+ * yet analysed. The path returns `'uniformity-unanalysed'` and no Lipschitz
124
+ * arithmetic runs. An edge with no `bound` — an exact equivalence, or an
125
+ * unbounded coarse-graining — does not fail this gate.
126
+ * 3. **Lipschitz.** `composeBoundPath` folds the per-edge pairs. A `null` — an
127
+ * edge that is neither bounded nor exact — is tolerated only as the LAST
128
+ * entry, where it terminates the claim (`terminal: true`); anywhere else it
129
+ * throws `MissingLipschitzError` rather than inventing a constant.
130
+ * 4. **Norm.** Every stated norm on the path must be the SAME norm, and no
131
+ * unnormed exact map may carry a normed claim. An `exact-equivalence`
132
+ * states no norm (it has no `bound`), so a path mixing one with a normed
133
+ * bound is `'norm-not-stated'` — see the module note.
134
+ *
135
+ * @throws RangeError on an empty path. Returning `IDENTITY_BOUND` for "no
136
+ * edges" would be a bound asserted about nothing.
137
+ * @throws MissingLipschitzError via {@link composeBoundPath}; see gate 3.
138
+ * @internal
139
+ */
140
+ export declare function boundPath(bridges: readonly AtlasBridge[]): PathBoundResult;
141
+ /** Re-exported so a caller need not reach into the algebra module. @internal */
142
+ export { IDENTITY_BOUND };
143
+ //# sourceMappingURL=path-bound.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"path-bound.d.ts","sourceRoot":"","sources":["../../src/atlas/path-bound.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAEH,OAAO,EAAoB,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AA+C5D;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,QAAQ,CACtB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,GACT,SAAS,WAAW,EAAE,GAAG,IAAI,CA2C/B;AAED,8CAA8C;AAC9C,MAAM,MAAM,aAAa;AACvB,wEAAwE;AACtE,oBAAoB;AACtB,0EAA0E;GACxE,iBAAiB;AACnB,0EAA0E;GACxE,eAAe;AACjB;;;GAGG;GACD,uBAAuB,CAAC;AAE5B,gDAAgD;AAChD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,qEAAqE;IACrE,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,oEAAoE;IACpE,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,8DAA8D;AAC9D,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,yDAAyD;IACzD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,kFAAkF;AAClF,MAAM,MAAM,eAAe,GAAG,cAAc,GAAG,WAAW,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,GAAG,eAAe,CAkG1E;AAED,gFAAgF;AAChF,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,268 @@
1
+ /**
2
+ * Routes through an atlas family, and the error bound a route carries.
3
+ *
4
+ * Two functions, and the second is the one that can do damage:
5
+ *
6
+ * - {@link findPath} is pure graph search. It answers "is there a chain of
7
+ * bridges from A to B", and nothing more. A path existing says NOTHING about
8
+ * whether that path supports a claim.
9
+ * - {@link boundPath} answers "what error bound does this chain carry", and its
10
+ * default answer is NO BOUND. `docs/planning/Atlas-Phase-2-Design.md` §3:
11
+ *
12
+ * > A path containing any edge whose relation composes to
13
+ * > `'no-composite-claim'` has NO bound. It must return an explicit no-claim,
14
+ * > never a number. A composed number over an undefined composite would be
15
+ * > the most dangerous output this library could produce: precise-looking and
16
+ * > unfounded.
17
+ *
18
+ * So {@link boundPath} returns a DISCRIMINATED UNION, not a number. A caller
19
+ * cannot read `.bound` off a no-claim, because a no-claim has no `.bound` — the
20
+ * refusal is enforced by the type rather than by a documented convention.
21
+ *
22
+ * ## Norms — why an exact edge does not compose for free
23
+ *
24
+ * `./error-algebra.ts` states the rule this module obeys, and it is narrower
25
+ * than it first reads:
26
+ *
27
+ * > An exact equivalence contributes `IDENTITY_BOUND` **in the norms these
28
+ * > Phase 0 bridges state** — not in every norm.
29
+ *
30
+ * An `exact-equivalence` bridge carries no `bound`, hence states no `norm`. It
31
+ * therefore contributes `IDENTITY_BOUND` in NO norm, and a path that mixes it
32
+ * with a normed bound cannot claim the composite holds in that norm. That is a
33
+ * `'norm-not-stated'` no-claim. The composed NUMBER would be unchanged —
34
+ * composing with the identity is arithmetically a no-op — which is exactly what
35
+ * makes the error invisible without this gate: the danger is not a wrong
36
+ * magnitude, it is a right magnitude attached to the wrong norm.
37
+ *
38
+ * ⚠ **Correction to the S2.2 brief.** The brief states that no field records a
39
+ * norm and that Phase 2 must add `norm?` to `ApproximationBound`. That is
40
+ * out of date: `ApproximationBound.norm` already exists as a MANDATORY
41
+ * `string` (Phase 0, `./types.ts`). No type change was needed, and this module
42
+ * reads the field that is already there.
43
+ *
44
+ * **Uniformity is gated here, at use.** `ApproximationBound.uniformity` may
45
+ * be `null` (or empty — the same state) so a real bound can be recorded
46
+ * before anyone has analysed what the error is uniform in. Composing such a
47
+ * bound would attach a number to an unanalysed claim, so {@link boundPath}
48
+ * returns `'uniformity-unanalysed'` and does not compute one.
49
+ * `propagateUncertainty` does not read the field and does not fold `delta`
50
+ * into `sigma`: it stays a statistical-sigma function.
51
+ *
52
+ * Pure: no I/O, no registry reads.
53
+ *
54
+ * @module atlas/path-bound
55
+ */
56
+ import { composeBoundPath, IDENTITY_BOUND } from './error-algebra.js';
57
+ import { composeRelation, NO_COMPOSITE_CLAIM } from './composition-table.js';
58
+ import { ATLAS_FAMILIES } from './families.js';
59
+ /**
60
+ * Families {@link findPath} can search: every registered family. This was the
61
+ * oscillator family alone, which made the diffusion and wave families
62
+ * unsearchable once they existed. A route stays INSIDE one family: a bridge
63
+ * that ends in another family's model is not followed across (stated, not
64
+ * hidden — cross-family routes are out of this function's scope).
65
+ *
66
+ * @internal
67
+ */
68
+ const FAMILIES = Object.fromEntries(ATLAS_FAMILIES.map((f) => [f.family, f]));
69
+ /** Expand a family's bridges into directed edges. Single-premise chains only. */
70
+ function directedEdges(family) {
71
+ const edges = [];
72
+ for (const bridge of family.bridges) {
73
+ // Sprint 2 scope: a multi-premise bridge is a JOIN, not a link in a chain,
74
+ // and is skipped rather than silently reduced to its first premise.
75
+ if (bridge.premises.length !== 1)
76
+ continue;
77
+ const from = bridge.premises[0];
78
+ edges.push({ from, to: bridge.conclusion, bridge });
79
+ if (bridge.relation === 'exact-equivalence') {
80
+ edges.push({ from: bridge.conclusion, to: from, bridge });
81
+ }
82
+ }
83
+ return edges;
84
+ }
85
+ /**
86
+ * Shortest chain of bridges from `from` to `to`, or `null` if none exists.
87
+ *
88
+ * Breadth-first, so the result is a shortest path by edge count. Ties are
89
+ * broken by `family.bridges` order, which is the design note's order and is
90
+ * therefore stable across runs.
91
+ *
92
+ * A returned path is a ROUTE, not a warrant: ask {@link boundPath} what the
93
+ * route supports.
94
+ *
95
+ * @throws RangeError if `family` is not a known family, or an endpoint is not
96
+ * one of its models. An unknown endpoint returning `null` would be
97
+ * indistinguishable from a genuinely disconnected pair.
98
+ * @internal
99
+ */
100
+ export function findPath(family, from, to) {
101
+ const fam = FAMILIES[family];
102
+ if (fam === undefined) {
103
+ throw new RangeError(`findPath: unknown family '${family}'`);
104
+ }
105
+ const models = new Set(fam.models.map((m) => m.id));
106
+ for (const endpoint of [from, to]) {
107
+ if (!models.has(endpoint)) {
108
+ throw new RangeError(`findPath: '${endpoint}' is not a model of family '${family}'`);
109
+ }
110
+ }
111
+ if (from === to)
112
+ return [];
113
+ const outgoing = new Map();
114
+ for (const edge of directedEdges(fam)) {
115
+ const bucket = outgoing.get(edge.from);
116
+ if (bucket === undefined)
117
+ outgoing.set(edge.from, [edge]);
118
+ else
119
+ bucket.push(edge);
120
+ }
121
+ const cameBy = new Map();
122
+ const seen = new Set([from]);
123
+ const queue = [from];
124
+ while (queue.length > 0) {
125
+ const node = queue.shift();
126
+ for (const edge of outgoing.get(node) ?? []) {
127
+ if (seen.has(edge.to))
128
+ continue;
129
+ seen.add(edge.to);
130
+ cameBy.set(edge.to, edge);
131
+ if (edge.to === to) {
132
+ const path = [];
133
+ for (let at = to; at !== from;) {
134
+ const step = cameBy.get(at);
135
+ path.unshift(step.bridge);
136
+ at = step.from;
137
+ }
138
+ return path;
139
+ }
140
+ queue.push(edge.to);
141
+ }
142
+ }
143
+ return null;
144
+ }
145
+ /**
146
+ * The error bound a chain of bridges carries — or an explicit no-claim.
147
+ *
148
+ * Four gates, in this order. Each one is a reason to refuse, and the FIRST
149
+ * reason found is the one reported; none of them is skippable by a caller.
150
+ *
151
+ * 1. **Relation.** `composeRelation` is folded along the path. The moment the
152
+ * running composite is `'no-composite-claim'`, the path has no bound. This
153
+ * is design note §3 constraint 1 and it is checked before any arithmetic,
154
+ * so no number is ever computed for a path that cannot carry one.
155
+ * 2. **Uniformity.** Any bound whose `uniformity` is `null` or empty is not
156
+ * yet analysed. The path returns `'uniformity-unanalysed'` and no Lipschitz
157
+ * arithmetic runs. An edge with no `bound` — an exact equivalence, or an
158
+ * unbounded coarse-graining — does not fail this gate.
159
+ * 3. **Lipschitz.** `composeBoundPath` folds the per-edge pairs. A `null` — an
160
+ * edge that is neither bounded nor exact — is tolerated only as the LAST
161
+ * entry, where it terminates the claim (`terminal: true`); anywhere else it
162
+ * throws `MissingLipschitzError` rather than inventing a constant.
163
+ * 4. **Norm.** Every stated norm on the path must be the SAME norm, and no
164
+ * unnormed exact map may carry a normed claim. An `exact-equivalence`
165
+ * states no norm (it has no `bound`), so a path mixing one with a normed
166
+ * bound is `'norm-not-stated'` — see the module note.
167
+ *
168
+ * @throws RangeError on an empty path. Returning `IDENTITY_BOUND` for "no
169
+ * edges" would be a bound asserted about nothing.
170
+ * @throws MissingLipschitzError via {@link composeBoundPath}; see gate 3.
171
+ * @internal
172
+ */
173
+ export function boundPath(bridges) {
174
+ if (bridges.length === 0) {
175
+ throw new RangeError('boundPath: an empty path composes nothing; there is no bound to state');
176
+ }
177
+ // ── Gate 1: the relation must compose all the way along ───────────────────
178
+ let relation = bridges[0].relation;
179
+ for (let i = 1; i < bridges.length; i++) {
180
+ const next = bridges[i];
181
+ // The loop RETURNS on the first silent cell, so `relation` is always a
182
+ // real `RelationType` here — no re-check is needed, and TypeScript proves
183
+ // it (a guard here is flagged as having no overlap).
184
+ relation = composeRelation(relation, next.relation);
185
+ if (relation === NO_COMPOSITE_CLAIM) {
186
+ return {
187
+ kind: 'no-claim',
188
+ reason: NO_COMPOSITE_CLAIM,
189
+ detail: `'${bridges[i - 1].id}' (${bridges[i - 1].relation}) then '${next.id}' ` +
190
+ `(${next.relation}) composes to no relation, so the path carries no bound`,
191
+ };
192
+ }
193
+ }
194
+ // ── Gate 2: an unanalysed uniformity yields no number ─────────────────────
195
+ // Before any Lipschitz arithmetic. `null` and `[]` are the same state: an
196
+ // empty list is a universal over nothing, and counting it as analysed is
197
+ // the convention-checked empty-object defect. An edge with no bound states
198
+ // no error, so it does not fail this gate.
199
+ for (const bridge of bridges) {
200
+ if (bridge.bound === undefined)
201
+ continue;
202
+ const uniformity = bridge.bound.uniformity;
203
+ if (uniformity === null || uniformity.length === 0) {
204
+ const how = uniformity === null ? 'null' : 'empty';
205
+ return {
206
+ kind: 'no-claim',
207
+ reason: 'uniformity-unanalysed',
208
+ detail: `'${bridge.id}' has uniformity ${how} (not yet analysed), so the path carries no numeric bound`,
209
+ };
210
+ }
211
+ }
212
+ // ── Collect the per-edge pairs the remaining gates read ───────────────────
213
+ // What each edge contributes. The split that matters: an `exact-equivalence`
214
+ // with no `bound` is EXACT — it contributes `IDENTITY_BOUND`, not an unknown
215
+ // constant. Any OTHER relation with no bound has an unknown Lipschitz
216
+ // constant, and `null` is what says so. Conflating the two would either
217
+ // invent a constant for a lossy map or throw on an exact one.
218
+ const pairs = [];
219
+ const norms = new Set();
220
+ const unnormedIdentities = [];
221
+ for (const bridge of bridges) {
222
+ if (bridge.bound !== undefined) {
223
+ pairs.push({ K: bridge.bound.K, delta: bridge.bound.delta });
224
+ norms.add(bridge.bound.norm);
225
+ }
226
+ else if (bridge.relation === 'exact-equivalence') {
227
+ pairs.push(IDENTITY_BOUND);
228
+ unnormedIdentities.push(bridge.id);
229
+ }
230
+ else {
231
+ pairs.push(null);
232
+ }
233
+ }
234
+ // ── Gate 3: an unknown Lipschitz constant, anywhere but last, is fatal ────
235
+ // Delegated to `composeBoundPath`, which throws `MissingLipschitzError`
236
+ // rather than inventing a constant. Run BEFORE the norm gate: an unbounded
237
+ // composite is a harder failure than an unstatable norm, and reporting the
238
+ // softer one would mask it.
239
+ const composed = composeBoundPath(pairs);
240
+ // ── Gate 4: one norm, and no unnormed map carrying a normed claim ─────────
241
+ if (norms.size > 1) {
242
+ return {
243
+ kind: 'no-claim',
244
+ reason: 'norm-mismatch',
245
+ detail: `the path states ${norms.size} different norms (${[...norms].map((n) => `'${n}'`).join(', ')}); ` +
246
+ 'bounds in different norms do not compose',
247
+ };
248
+ }
249
+ if (unnormedIdentities.length > 0 && norms.size > 0) {
250
+ return {
251
+ kind: 'no-claim',
252
+ reason: 'norm-not-stated',
253
+ detail: `${unnormedIdentities.map((id) => `'${id}'`).join(', ')} state no norm, so they ` +
254
+ `contribute IDENTITY_BOUND in no norm; the composite cannot be claimed in ` +
255
+ `'${[...norms][0]}'`,
256
+ };
257
+ }
258
+ return {
259
+ kind: 'bound',
260
+ bound: composed.bound,
261
+ terminal: composed.terminal,
262
+ relation,
263
+ norm: [...norms][0] ?? null,
264
+ };
265
+ }
266
+ /** Re-exported so a caller need not reach into the algebra module. @internal */
267
+ export { IDENTITY_BOUND };
268
+ //# sourceMappingURL=path-bound.js.map