universal-physics-tensor 0.45.1 → 0.46.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 (473) hide show
  1. package/README.md +28 -27
  2. package/dist/atlas/applicability.d.ts +108 -0
  3. package/dist/atlas/applicability.d.ts.map +1 -0
  4. package/dist/atlas/applicability.js +301 -0
  5. package/dist/atlas/applicability.js.map +1 -0
  6. package/dist/atlas/association.d.ts +92 -0
  7. package/dist/atlas/association.d.ts.map +1 -0
  8. package/dist/atlas/association.js +112 -0
  9. package/dist/atlas/association.js.map +1 -0
  10. package/dist/atlas/benchmark/backend-shapes.d.ts +47 -0
  11. package/dist/atlas/benchmark/backend-shapes.d.ts.map +1 -0
  12. package/dist/atlas/benchmark/backend-shapes.js +58 -0
  13. package/dist/atlas/benchmark/backend-shapes.js.map +1 -0
  14. package/dist/atlas/benchmark/baselines.d.ts +64 -0
  15. package/dist/atlas/benchmark/baselines.d.ts.map +1 -0
  16. package/dist/atlas/benchmark/baselines.js +112 -0
  17. package/dist/atlas/benchmark/baselines.js.map +1 -0
  18. package/dist/atlas/benchmark/leakage.d.ts +56 -0
  19. package/dist/atlas/benchmark/leakage.d.ts.map +1 -0
  20. package/dist/atlas/benchmark/leakage.js +100 -0
  21. package/dist/atlas/benchmark/leakage.js.map +1 -0
  22. package/dist/atlas/benchmark/loader.d.ts +56 -0
  23. package/dist/atlas/benchmark/loader.d.ts.map +1 -0
  24. package/dist/atlas/benchmark/loader.js +104 -0
  25. package/dist/atlas/benchmark/loader.js.map +1 -0
  26. package/dist/atlas/benchmark/run-atlas.d.ts +72 -0
  27. package/dist/atlas/benchmark/run-atlas.d.ts.map +1 -0
  28. package/dist/atlas/benchmark/run-atlas.js +210 -0
  29. package/dist/atlas/benchmark/run-atlas.js.map +1 -0
  30. package/dist/atlas/benchmark/stats.d.ts +90 -0
  31. package/dist/atlas/benchmark/stats.d.ts.map +1 -0
  32. package/dist/atlas/benchmark/stats.js +159 -0
  33. package/dist/atlas/benchmark/stats.js.map +1 -0
  34. package/dist/atlas/benchmark/study.d.ts +120 -0
  35. package/dist/atlas/benchmark/study.d.ts.map +1 -0
  36. package/dist/atlas/benchmark/study.js +192 -0
  37. package/dist/atlas/benchmark/study.js.map +1 -0
  38. package/dist/atlas/benchmark/types.d.ts +79 -0
  39. package/dist/atlas/benchmark/types.d.ts.map +1 -0
  40. package/dist/atlas/benchmark/types.js +46 -0
  41. package/dist/atlas/benchmark/types.js.map +1 -0
  42. package/dist/atlas/composition-table.d.ts +55 -0
  43. package/dist/atlas/composition-table.d.ts.map +1 -0
  44. package/dist/atlas/composition-table.js +133 -0
  45. package/dist/atlas/composition-table.js.map +1 -0
  46. package/dist/atlas/conventions.d.ts +63 -0
  47. package/dist/atlas/conventions.d.ts.map +1 -0
  48. package/dist/atlas/conventions.js +93 -0
  49. package/dist/atlas/conventions.js.map +1 -0
  50. package/dist/atlas/coverage.d.ts +93 -0
  51. package/dist/atlas/coverage.d.ts.map +1 -0
  52. package/dist/atlas/coverage.js +69 -0
  53. package/dist/atlas/coverage.js.map +1 -0
  54. package/dist/atlas/derivation.d.ts +137 -0
  55. package/dist/atlas/derivation.d.ts.map +1 -0
  56. package/dist/atlas/derivation.js +190 -0
  57. package/dist/atlas/derivation.js.map +1 -0
  58. package/dist/atlas/derive-evidence.d.ts +218 -0
  59. package/dist/atlas/derive-evidence.d.ts.map +1 -0
  60. package/dist/atlas/derive-evidence.js +225 -0
  61. package/dist/atlas/derive-evidence.js.map +1 -0
  62. package/dist/atlas/diffusion/bridges-closure.d.ts +63 -0
  63. package/dist/atlas/diffusion/bridges-closure.d.ts.map +1 -0
  64. package/dist/atlas/diffusion/bridges-closure.js +324 -0
  65. package/dist/atlas/diffusion/bridges-closure.js.map +1 -0
  66. package/dist/atlas/diffusion/bridges.d.ts +36 -0
  67. package/dist/atlas/diffusion/bridges.d.ts.map +1 -0
  68. package/dist/atlas/diffusion/bridges.js +226 -0
  69. package/dist/atlas/diffusion/bridges.js.map +1 -0
  70. package/dist/atlas/diffusion/dimensions.d.ts +21 -0
  71. package/dist/atlas/diffusion/dimensions.d.ts.map +1 -0
  72. package/dist/atlas/diffusion/dimensions.js +21 -0
  73. package/dist/atlas/diffusion/dimensions.js.map +1 -0
  74. package/dist/atlas/diffusion/index.d.ts +16 -0
  75. package/dist/atlas/diffusion/index.d.ts.map +1 -0
  76. package/dist/atlas/diffusion/index.js +23 -0
  77. package/dist/atlas/diffusion/index.js.map +1 -0
  78. package/dist/atlas/diffusion/models.d.ts +24 -0
  79. package/dist/atlas/diffusion/models.d.ts.map +1 -0
  80. package/dist/atlas/diffusion/models.js +139 -0
  81. package/dist/atlas/diffusion/models.js.map +1 -0
  82. package/dist/atlas/diffusion/numerics.d.ts +181 -0
  83. package/dist/atlas/diffusion/numerics.d.ts.map +1 -0
  84. package/dist/atlas/diffusion/numerics.js +251 -0
  85. package/dist/atlas/diffusion/numerics.js.map +1 -0
  86. package/dist/atlas/error-algebra.d.ts +52 -0
  87. package/dist/atlas/error-algebra.d.ts.map +1 -0
  88. package/dist/atlas/error-algebra.js +55 -0
  89. package/dist/atlas/error-algebra.js.map +1 -0
  90. package/dist/atlas/export.d.ts +48 -0
  91. package/dist/atlas/export.d.ts.map +1 -0
  92. package/dist/atlas/export.js +106 -0
  93. package/dist/atlas/export.js.map +1 -0
  94. package/dist/atlas/families.d.ts +14 -0
  95. package/dist/atlas/families.d.ts.map +1 -0
  96. package/dist/atlas/families.js +20 -0
  97. package/dist/atlas/families.js.map +1 -0
  98. package/dist/atlas/index.d.ts +90 -0
  99. package/dist/atlas/index.d.ts.map +1 -0
  100. package/dist/atlas/index.js +69 -0
  101. package/dist/atlas/index.js.map +1 -0
  102. package/dist/atlas/link-prediction.d.ts +71 -0
  103. package/dist/atlas/link-prediction.d.ts.map +1 -0
  104. package/dist/atlas/link-prediction.js +128 -0
  105. package/dist/atlas/link-prediction.js.map +1 -0
  106. package/dist/atlas/model.d.ts +70 -0
  107. package/dist/atlas/model.d.ts.map +1 -0
  108. package/dist/atlas/model.js +26 -0
  109. package/dist/atlas/model.js.map +1 -0
  110. package/dist/atlas/oscillators/bridges-coarse.d.ts +71 -0
  111. package/dist/atlas/oscillators/bridges-coarse.d.ts.map +1 -0
  112. package/dist/atlas/oscillators/bridges-coarse.js +146 -0
  113. package/dist/atlas/oscillators/bridges-coarse.js.map +1 -0
  114. package/dist/atlas/oscillators/bridges-exact.d.ts +70 -0
  115. package/dist/atlas/oscillators/bridges-exact.d.ts.map +1 -0
  116. package/dist/atlas/oscillators/bridges-exact.js +227 -0
  117. package/dist/atlas/oscillators/bridges-exact.js.map +1 -0
  118. package/dist/atlas/oscillators/bridges-limits.d.ts +118 -0
  119. package/dist/atlas/oscillators/bridges-limits.d.ts.map +1 -0
  120. package/dist/atlas/oscillators/bridges-limits.js +342 -0
  121. package/dist/atlas/oscillators/bridges-limits.js.map +1 -0
  122. package/dist/atlas/oscillators/dimensions.d.ts +34 -0
  123. package/dist/atlas/oscillators/dimensions.d.ts.map +1 -0
  124. package/dist/atlas/oscillators/dimensions.js +34 -0
  125. package/dist/atlas/oscillators/dimensions.js.map +1 -0
  126. package/dist/atlas/oscillators/index.d.ts +38 -0
  127. package/dist/atlas/oscillators/index.d.ts.map +1 -0
  128. package/dist/atlas/oscillators/index.js +37 -0
  129. package/dist/atlas/oscillators/index.js.map +1 -0
  130. package/dist/atlas/oscillators/models.d.ts +25 -0
  131. package/dist/atlas/oscillators/models.d.ts.map +1 -0
  132. package/dist/atlas/oscillators/models.js +160 -0
  133. package/dist/atlas/oscillators/models.js.map +1 -0
  134. package/dist/atlas/oscillators/rejections.d.ts +21 -0
  135. package/dist/atlas/oscillators/rejections.d.ts.map +1 -0
  136. package/dist/atlas/oscillators/rejections.js +54 -0
  137. package/dist/atlas/oscillators/rejections.js.map +1 -0
  138. package/dist/atlas/path-bound.d.ts +143 -0
  139. package/dist/atlas/path-bound.d.ts.map +1 -0
  140. package/dist/atlas/path-bound.js +268 -0
  141. package/dist/atlas/path-bound.js.map +1 -0
  142. package/dist/atlas/poster/associations.d.ts +66 -0
  143. package/dist/atlas/poster/associations.d.ts.map +1 -0
  144. package/dist/atlas/poster/associations.js +90 -0
  145. package/dist/atlas/poster/associations.js.map +1 -0
  146. package/dist/atlas/poster/derivations.d.ts +156 -0
  147. package/dist/atlas/poster/derivations.d.ts.map +1 -0
  148. package/dist/atlas/poster/derivations.js +430 -0
  149. package/dist/atlas/poster/derivations.js.map +1 -0
  150. package/dist/atlas/poster/statements.d.ts +198 -0
  151. package/dist/atlas/poster/statements.d.ts.map +1 -0
  152. package/dist/atlas/poster/statements.js +365 -0
  153. package/dist/atlas/poster/statements.js.map +1 -0
  154. package/dist/atlas/public.d.ts +26 -0
  155. package/dist/atlas/public.d.ts.map +1 -0
  156. package/dist/atlas/public.js +21 -0
  157. package/dist/atlas/public.js.map +1 -0
  158. package/dist/atlas/regime.d.ts +171 -0
  159. package/dist/atlas/regime.d.ts.map +1 -0
  160. package/dist/atlas/regime.js +309 -0
  161. package/dist/atlas/regime.js.map +1 -0
  162. package/dist/atlas/serialize.d.ts +50 -0
  163. package/dist/atlas/serialize.d.ts.map +1 -0
  164. package/dist/atlas/serialize.js +180 -0
  165. package/dist/atlas/serialize.js.map +1 -0
  166. package/dist/atlas/statement.d.ts +165 -0
  167. package/dist/atlas/statement.d.ts.map +1 -0
  168. package/dist/atlas/statement.js +176 -0
  169. package/dist/atlas/statement.js.map +1 -0
  170. package/dist/atlas/types.d.ts +308 -0
  171. package/dist/atlas/types.d.ts.map +1 -0
  172. package/dist/atlas/types.js +61 -0
  173. package/dist/atlas/types.js.map +1 -0
  174. package/dist/atlas/waves/bridges-closure.d.ts +39 -0
  175. package/dist/atlas/waves/bridges-closure.d.ts.map +1 -0
  176. package/dist/atlas/waves/bridges-closure.js +223 -0
  177. package/dist/atlas/waves/bridges-closure.js.map +1 -0
  178. package/dist/atlas/waves/bridges.d.ts +49 -0
  179. package/dist/atlas/waves/bridges.d.ts.map +1 -0
  180. package/dist/atlas/waves/bridges.js +265 -0
  181. package/dist/atlas/waves/bridges.js.map +1 -0
  182. package/dist/atlas/waves/index.d.ts +16 -0
  183. package/dist/atlas/waves/index.d.ts.map +1 -0
  184. package/dist/atlas/waves/index.js +23 -0
  185. package/dist/atlas/waves/index.js.map +1 -0
  186. package/dist/atlas/waves/models.d.ts +29 -0
  187. package/dist/atlas/waves/models.d.ts.map +1 -0
  188. package/dist/atlas/waves/models.js +127 -0
  189. package/dist/atlas/waves/models.js.map +1 -0
  190. package/dist/atlas/waves/numerics.d.ts +149 -0
  191. package/dist/atlas/waves/numerics.d.ts.map +1 -0
  192. package/dist/atlas/waves/numerics.js +218 -0
  193. package/dist/atlas/waves/numerics.js.map +1 -0
  194. package/dist/atlas/witness-artifact.d.ts +65 -0
  195. package/dist/atlas/witness-artifact.d.ts.map +1 -0
  196. package/dist/atlas/witness-artifact.js +78 -0
  197. package/dist/atlas/witness-artifact.js.map +1 -0
  198. package/dist/atlas/witness-numeric.d.ts +81 -0
  199. package/dist/atlas/witness-numeric.d.ts.map +1 -0
  200. package/dist/atlas/witness-numeric.js +105 -0
  201. package/dist/atlas/witness-numeric.js.map +1 -0
  202. package/dist/atlas/witness-result.d.ts +77 -0
  203. package/dist/atlas/witness-result.d.ts.map +1 -0
  204. package/dist/atlas/witness-result.js +39 -0
  205. package/dist/atlas/witness-result.js.map +1 -0
  206. package/dist/atlas/witness-specs.d.ts +110 -0
  207. package/dist/atlas/witness-specs.d.ts.map +1 -0
  208. package/dist/atlas/witness-specs.js +372 -0
  209. package/dist/atlas/witness-specs.js.map +1 -0
  210. package/dist/atlas/witness-symbolic.d.ts +79 -0
  211. package/dist/atlas/witness-symbolic.d.ts.map +1 -0
  212. package/dist/atlas/witness-symbolic.js +140 -0
  213. package/dist/atlas/witness-symbolic.js.map +1 -0
  214. package/dist/atlas/witnesses/quantum-support.d.ts +50 -0
  215. package/dist/atlas/witnesses/quantum-support.d.ts.map +1 -0
  216. package/dist/atlas/witnesses/quantum-support.js +48 -0
  217. package/dist/atlas/witnesses/quantum-support.js.map +1 -0
  218. package/dist/bridges/be11-decoherence-confrontation.js.map +1 -1
  219. package/dist/bridges/be21-kss-confrontation.js.map +1 -1
  220. package/dist/bridges/be23-planckian-confrontation.js.map +1 -1
  221. package/dist/bridges/be35-bootstrap-confrontation.js.map +1 -1
  222. package/dist/bridges/be36-gw170817-confrontation.js.map +1 -1
  223. package/dist/bridges/be37-cassini-confrontation.js.map +1 -1
  224. package/dist/bridges/be48-collapse-confrontation.js.map +1 -1
  225. package/dist/bridges/be51-lensing-confrontation.js.map +1 -1
  226. package/dist/bridges/be52-mercury-confrontation.js.map +1 -1
  227. package/dist/bridges/be55-quantum-hall-confrontation.js.map +1 -1
  228. package/dist/bridges/be56-casimir-confrontation.js.map +1 -1
  229. package/dist/bridges/be58-johnson-nyquist-confrontation.js.map +1 -1
  230. package/dist/bridges/be59-ac-josephson-confrontation.js.map +1 -1
  231. package/dist/bridges/be60-fractional-qh-confrontation.js.map +1 -1
  232. package/dist/bridges/be61-wiedemann-franz-confrontation.js.map +1 -1
  233. package/dist/bridges/be62-bcs-gap-confrontation.js.map +1 -1
  234. package/dist/bridges/be63-chandrasekhar-mass-confrontation.js.map +1 -1
  235. package/dist/bridges/be64-eddington-luminosity-confrontation.js.map +1 -1
  236. package/dist/bridges/be65-jeans-mass-confrontation.js.map +1 -1
  237. package/dist/bridges/bridge-equations.d.ts +2 -1
  238. package/dist/bridges/bridge-equations.d.ts.map +1 -1
  239. package/dist/bridges/bridge-equations.js +3 -2
  240. package/dist/bridges/bridge-equations.js.map +1 -1
  241. package/dist/bridges/catalog-adapter.d.ts.map +1 -1
  242. package/dist/bridges/catalog-adapter.js.map +1 -1
  243. package/dist/bridges/equations/_be-helpers.d.ts +2 -2
  244. package/dist/bridges/equations/_be-helpers.js +2 -2
  245. package/dist/bridges/equations/be-20-vacuum-energy.js.map +1 -1
  246. package/dist/bridges/equations/be-35-conformal-bootstrap.d.ts +88 -58
  247. package/dist/bridges/equations/be-35-conformal-bootstrap.d.ts.map +1 -1
  248. package/dist/bridges/equations/be-35-conformal-bootstrap.js +102 -62
  249. package/dist/bridges/equations/be-35-conformal-bootstrap.js.map +1 -1
  250. package/dist/bridges/equations/be-48-grw-localization.d.ts +9 -8
  251. package/dist/bridges/equations/be-48-grw-localization.d.ts.map +1 -1
  252. package/dist/bridges/equations/be-48-grw-localization.js +9 -8
  253. package/dist/bridges/equations/be-48-grw-localization.js.map +1 -1
  254. package/dist/bridges/gravitational-lensing.d.ts +10 -0
  255. package/dist/bridges/gravitational-lensing.d.ts.map +1 -1
  256. package/dist/bridges/gravitational-lensing.js.map +1 -1
  257. package/dist/bridges/index.d.ts +125 -7
  258. package/dist/bridges/index.d.ts.map +1 -1
  259. package/dist/bridges/index.js +483 -20
  260. package/dist/bridges/index.js.map +1 -1
  261. package/dist/bridges/perihelion-precession.d.ts +10 -0
  262. package/dist/bridges/perihelion-precession.d.ts.map +1 -1
  263. package/dist/bridges/perihelion-precession.js.map +1 -1
  264. package/dist/bridges/rhs-registry.js +2 -2
  265. package/dist/canonical/canonical-equation.d.ts +15 -0
  266. package/dist/canonical/canonical-equation.d.ts.map +1 -1
  267. package/dist/canonical/entries/_l1-build.d.ts +1 -1
  268. package/dist/canonical/entries/_l1-build.d.ts.map +1 -1
  269. package/dist/canonical/entries/atomic.d.ts.map +1 -1
  270. package/dist/canonical/entries/atomic.js +23 -0
  271. package/dist/canonical/entries/atomic.js.map +1 -1
  272. package/dist/canonical/entries/nonmonomial.d.ts.map +1 -1
  273. package/dist/canonical/entries/nonmonomial.js +93 -0
  274. package/dist/canonical/entries/nonmonomial.js.map +1 -1
  275. package/dist/canonical/normal-form.js.map +1 -1
  276. package/dist/canonical/residual.d.ts +28 -0
  277. package/dist/canonical/residual.d.ts.map +1 -0
  278. package/dist/canonical/residual.js +31 -0
  279. package/dist/canonical/residual.js.map +1 -0
  280. package/dist/cli/command.d.ts +8 -0
  281. package/dist/cli/command.d.ts.map +1 -1
  282. package/dist/cli/command.js +10 -0
  283. package/dist/cli/command.js.map +1 -1
  284. package/dist/cli/commands/atlas.d.ts +3 -0
  285. package/dist/cli/commands/atlas.d.ts.map +1 -0
  286. package/dist/cli/commands/atlas.js +158 -0
  287. package/dist/cli/commands/atlas.js.map +1 -0
  288. package/dist/cli/commands/confront.js.map +1 -1
  289. package/dist/cli/commands/coverage.js +3 -3
  290. package/dist/cli/commands/index.d.ts +3 -0
  291. package/dist/cli/commands/index.d.ts.map +1 -1
  292. package/dist/cli/commands/index.js +3 -0
  293. package/dist/cli/commands/index.js.map +1 -1
  294. package/dist/cli/commands/map.d.ts.map +1 -1
  295. package/dist/cli/commands/map.js +161 -27
  296. package/dist/cli/commands/map.js.map +1 -1
  297. package/dist/cli/commands/path.d.ts +3 -0
  298. package/dist/cli/commands/path.d.ts.map +1 -0
  299. package/dist/cli/commands/path.js +145 -0
  300. package/dist/cli/commands/path.js.map +1 -0
  301. package/dist/cli/commands/recover.d.ts.map +1 -1
  302. package/dist/cli/commands/recover.js +25 -6
  303. package/dist/cli/commands/recover.js.map +1 -1
  304. package/dist/cli/commands/regime.d.ts +14 -0
  305. package/dist/cli/commands/regime.d.ts.map +1 -0
  306. package/dist/cli/commands/regime.js +189 -0
  307. package/dist/cli/commands/regime.js.map +1 -0
  308. package/dist/cli/errors.d.ts.map +1 -1
  309. package/dist/cli/graphs.d.ts.map +1 -1
  310. package/dist/cli/graphs.js +5 -1
  311. package/dist/cli/graphs.js.map +1 -1
  312. package/dist/cli/main.d.ts.map +1 -1
  313. package/dist/cli/main.js +22 -0
  314. package/dist/cli/main.js.map +1 -1
  315. package/dist/cli/output.d.ts +6 -1
  316. package/dist/cli/output.d.ts.map +1 -1
  317. package/dist/cli/output.js.map +1 -1
  318. package/dist/cli/version.js.map +1 -1
  319. package/dist/cli-api.d.ts +16 -0
  320. package/dist/cli-api.d.ts.map +1 -1
  321. package/dist/cli-api.js +18 -0
  322. package/dist/cli-api.js.map +1 -1
  323. package/dist/composition/axis-audit.js.map +1 -1
  324. package/dist/composition/bridge-prediction.d.ts.map +1 -1
  325. package/dist/composition/bridge-prediction.js +0 -0
  326. package/dist/composition/bridge-prediction.js.map +1 -1
  327. package/dist/composition/canonical-graph.d.ts +2 -2
  328. package/dist/composition/canonical-graph.js +2 -2
  329. package/dist/composition/canonical-graph.js.map +1 -1
  330. package/dist/composition/compose-symbolic.d.ts.map +1 -1
  331. package/dist/composition/compose-symbolic.js.map +1 -1
  332. package/dist/composition/compose.d.ts.map +1 -1
  333. package/dist/composition/compose.js +80 -1
  334. package/dist/composition/compose.js.map +1 -1
  335. package/dist/composition/consequence.js.map +1 -1
  336. package/dist/composition/discovery.js.map +1 -1
  337. package/dist/composition/edge.d.ts +64 -0
  338. package/dist/composition/edge.d.ts.map +1 -1
  339. package/dist/composition/edge.js +29 -0
  340. package/dist/composition/edge.js.map +1 -1
  341. package/dist/composition/edges/calibration.d.ts.map +1 -1
  342. package/dist/composition/edges/calibration.js +46 -0
  343. package/dist/composition/edges/calibration.js.map +1 -1
  344. package/dist/composition/edges/catalog-quantum.d.ts.map +1 -1
  345. package/dist/composition/edges/catalog-quantum.js +9 -0
  346. package/dist/composition/edges/catalog-quantum.js.map +1 -1
  347. package/dist/composition/edges/catalog-tranche.d.ts.map +1 -1
  348. package/dist/composition/edges/catalog-tranche.js +18 -0
  349. package/dist/composition/edges/catalog-tranche.js.map +1 -1
  350. package/dist/composition/enumerate.js.map +1 -1
  351. package/dist/composition/explain.js.map +1 -1
  352. package/dist/composition/expr-eval.d.ts.map +1 -1
  353. package/dist/composition/expr-eval.js.map +1 -1
  354. package/dist/composition/expr-simplify.d.ts +13 -0
  355. package/dist/composition/expr-simplify.d.ts.map +1 -1
  356. package/dist/composition/expr-simplify.js +25 -0
  357. package/dist/composition/expr-simplify.js.map +1 -1
  358. package/dist/composition/expr-subst.js.map +1 -1
  359. package/dist/composition/graph-viz-svg.d.ts.map +1 -1
  360. package/dist/composition/graph-viz.d.ts +118 -1
  361. package/dist/composition/graph-viz.d.ts.map +1 -1
  362. package/dist/composition/graph-viz.js +189 -6
  363. package/dist/composition/graph-viz.js.map +1 -1
  364. package/dist/composition/identifiability.js.map +1 -1
  365. package/dist/composition/index.d.ts +4 -2
  366. package/dist/composition/index.d.ts.map +1 -1
  367. package/dist/composition/index.js +2 -1
  368. package/dist/composition/index.js.map +1 -1
  369. package/dist/composition/poster-source.d.ts +153 -0
  370. package/dist/composition/poster-source.d.ts.map +1 -0
  371. package/dist/composition/poster-source.js +183 -0
  372. package/dist/composition/poster-source.js.map +1 -0
  373. package/dist/composition/probe/backend-protocol.d.ts +34 -1
  374. package/dist/composition/probe/backend-protocol.d.ts.map +1 -1
  375. package/dist/composition/probe/backend-protocol.js +9 -2
  376. package/dist/composition/probe/backend-protocol.js.map +1 -1
  377. package/dist/composition/probe/candidate-store.d.ts.map +1 -1
  378. package/dist/composition/probe/limits.js.map +1 -1
  379. package/dist/composition/probe/pipeline.js.map +1 -1
  380. package/dist/composition/probe/problem.js.map +1 -1
  381. package/dist/composition/probe/residual.d.ts.map +1 -1
  382. package/dist/composition/probe/residual.js.map +1 -1
  383. package/dist/composition/probe/search-budget.js.map +1 -1
  384. package/dist/composition/proposed-bridges.d.ts +2 -2
  385. package/dist/composition/proposed-bridges.d.ts.map +1 -1
  386. package/dist/composition/proposed-bridges.js +1 -1
  387. package/dist/composition/proposed-bridges.js.map +1 -1
  388. package/dist/composition/retrodiction.js.map +1 -1
  389. package/dist/composition/uncertainty.d.ts +52 -2
  390. package/dist/composition/uncertainty.d.ts.map +1 -1
  391. package/dist/composition/uncertainty.js +38 -2
  392. package/dist/composition/uncertainty.js.map +1 -1
  393. package/dist/composition/user-equation.d.ts.map +1 -1
  394. package/dist/core/flux-rules.d.ts.map +1 -1
  395. package/dist/core/flux-rules.js.map +1 -1
  396. package/dist/core/labeled-tensor.d.ts.map +1 -1
  397. package/dist/core/regime-registry.d.ts.map +1 -1
  398. package/dist/core/regime-rule-install.js.map +1 -1
  399. package/dist/core/tensor.d.ts.map +1 -1
  400. package/dist/core/tensor.js.map +1 -1
  401. package/dist/core/types.d.ts.map +1 -1
  402. package/dist/diff/bridge-ast-gradient.js.map +1 -1
  403. package/dist/dimensional/ast-types.d.ts +31 -1
  404. package/dist/dimensional/ast-types.d.ts.map +1 -1
  405. package/dist/dimensional/bridge-check.d.ts +1 -1
  406. package/dist/dimensional/bridge-check.js +1 -1
  407. package/dist/dimensional/buckingham.d.ts.map +1 -1
  408. package/dist/dimensional/connection.d.ts +2 -0
  409. package/dist/dimensional/connection.d.ts.map +1 -1
  410. package/dist/dimensional/connection.js +2 -0
  411. package/dist/dimensional/connection.js.map +1 -1
  412. package/dist/dimensional/curvature-composite.d.ts +5 -3
  413. package/dist/dimensional/curvature-composite.d.ts.map +1 -1
  414. package/dist/dimensional/curvature-composite.js +1 -0
  415. package/dist/dimensional/curvature-composite.js.map +1 -1
  416. package/dist/dimensional/curvature-invariants.d.ts +2 -0
  417. package/dist/dimensional/curvature-invariants.d.ts.map +1 -1
  418. package/dist/dimensional/curvature-invariants.js +2 -0
  419. package/dist/dimensional/curvature-invariants.js.map +1 -1
  420. package/dist/dimensional/dimension-spec.d.ts.map +1 -1
  421. package/dist/dimensional/einstein-equation.d.ts +3 -3
  422. package/dist/dimensional/einstein-equation.js +3 -3
  423. package/dist/dimensional/errors.d.ts.map +1 -1
  424. package/dist/dimensional/metric.d.ts +5 -2
  425. package/dist/dimensional/metric.d.ts.map +1 -1
  426. package/dist/dimensional/metric.js +5 -2
  427. package/dist/dimensional/metric.js.map +1 -1
  428. package/dist/dimensional/tensor-trace.js.map +1 -1
  429. package/dist/dimensional/validator-registry.js.map +1 -1
  430. package/dist/dimensional/validator.d.ts +3 -2
  431. package/dist/dimensional/validator.d.ts.map +1 -1
  432. package/dist/dimensional/validator.js +23 -4
  433. package/dist/dimensional/validator.js.map +1 -1
  434. package/dist/index.d.ts +4 -3
  435. package/dist/index.d.ts.map +1 -1
  436. package/dist/index.js +4 -1
  437. package/dist/index.js.map +1 -1
  438. package/dist/numerical/curvature-lowering-helpers.d.ts.map +1 -1
  439. package/dist/numerical/curvature-lowering-helpers.js +142 -1
  440. package/dist/numerical/curvature-lowering-helpers.js.map +1 -1
  441. package/dist/numerical/errors.d.ts.map +1 -1
  442. package/dist/numerical/errors.js.map +1 -1
  443. package/dist/numerical/float64-engine.d.ts.map +1 -1
  444. package/dist/numerical/float64-engine.js +51 -24
  445. package/dist/numerical/float64-engine.js.map +1 -1
  446. package/dist/numerical/formula-dimension.d.ts.map +1 -1
  447. package/dist/numerical/formula-dimension.js.map +1 -1
  448. package/dist/numerical/formula.d.ts.map +1 -1
  449. package/dist/numerical/formula.js.map +1 -1
  450. package/dist/numerical/geometrized.d.ts.map +1 -1
  451. package/dist/numerical/gl4-integrator.d.ts +3 -3
  452. package/dist/numerical/gl4-integrator.js +3 -3
  453. package/dist/numerical/killing.d.ts +47 -5
  454. package/dist/numerical/killing.d.ts.map +1 -1
  455. package/dist/numerical/killing.js +41 -3
  456. package/dist/numerical/killing.js.map +1 -1
  457. package/dist/numerical/klein-gordon.d.ts +2 -2
  458. package/dist/numerical/klein-gordon.js +2 -2
  459. package/dist/numerical/lowering.d.ts +2 -2
  460. package/dist/numerical/lowering.d.ts.map +1 -1
  461. package/dist/numerical/lowering.js +5 -3
  462. package/dist/numerical/lowering.js.map +1 -1
  463. package/dist/numerical/mathts-engine.d.ts.map +1 -1
  464. package/dist/numerical/mathts-engine.js.map +1 -1
  465. package/dist/numerical/metric-inverse.js.map +1 -1
  466. package/dist/numerical/perihelion-finder.d.ts +15 -13
  467. package/dist/numerical/perihelion-finder.d.ts.map +1 -1
  468. package/dist/numerical/perihelion-finder.js +15 -13
  469. package/dist/numerical/perihelion-finder.js.map +1 -1
  470. package/dist/numerical/weyl-lowering.d.ts.map +1 -1
  471. package/dist/numerical/weyl-lowering.js +90 -40
  472. package/dist/numerical/weyl-lowering.js.map +1 -1
  473. package/package.json +121 -104
package/README.md CHANGED
@@ -45,41 +45,41 @@ Think of this as:
45
45
  git clone https://github.com/danielsimonjr/universal-physics-tensor.git
46
46
  cd universal-physics-tensor
47
47
 
48
- # Install dependencies
49
- npm install
48
+ # Install dependencies (Bun is the local/CI package manager; Node ≥ 18 is the runtime)
49
+ bun install
50
50
 
51
51
  # Build the project
52
- npm run build
52
+ bun run build
53
53
 
54
54
  # Run the smoke test
55
55
  node test-example.js
56
56
 
57
57
  # Bridge-inference CLI (no TypeScript needed) — `upt` subcommands:
58
- npm run upt -- explain hawking-temperature mass=1.989e30 # explain a built-in quantity
59
- npm run upt -- priority # triage speculative bridges
60
- npm run upt -- audit # derive the bridges by dimensions
61
- npm run upt -- predict # empty regime cells as link hypotheses
62
- npm run upt -- discover # vet link candidates (merge/unlock/consistency)
63
- npm run upt -- discover --source=canonical # run the funnel on standard physics ALONE (no bridges)
64
- npm run upt -- discover --derive # surface machine-derived identity consequences (--max-orders / --anchor flags available)
65
- npm run upt -- probe scan # experimental expression/residual frontier (Product B; not `upt discover`)
66
- npm run upt -- probe run --problem=tests/fixtures/discovery/pendulum-scaling/public/problem.json
67
- npm run upt -- connectors # which isolated bridges can connect to the core
68
- npm run upt -- coverage # audit each bridge's empirical grounding
69
- npm run upt -- canonical # the standard-physics L-layer registry (answer key)
70
- npm run upt -- recover # validate bridges against standard physics
71
- npm run upt -- symbolic --simplify # compose + fold bridges' SYMBOLIC forms (MathTS simplify)
72
- npm run upt -- confront # run the catalog's committed real-data confrontations (predicted vs observed)
73
- npm run upt -- map --source=both --format=mermaid # VISUAL map of the graph (Mermaid; also --format=dot|svg, --proposed, --out=PATH)
74
- npm run upt -- map --equation "period = 2*pi*sqrt(length/gravity)" # drop YOUR OWN equation onto the map: dimensional check + where it lands
58
+ bun run upt -- explain hawking-temperature mass=1.989e30 # explain a built-in quantity
59
+ bun run upt -- priority # triage speculative bridges
60
+ bun run upt -- audit # derive the bridges by dimensions
61
+ bun run upt -- predict # empty regime cells as link hypotheses
62
+ bun run upt -- discover # vet link candidates (merge/unlock/consistency)
63
+ bun run upt -- discover --source=canonical # run the funnel on standard physics ALONE (no bridges)
64
+ bun run upt -- discover --derive # surface machine-derived identity consequences (--max-orders / --anchor flags available)
65
+ bun run upt -- probe scan # experimental expression/residual frontier (Product B; not `upt discover`)
66
+ bun run upt -- probe run --problem=tests/fixtures/discovery/pendulum-scaling/public/problem.json
67
+ bun run upt -- connectors # which isolated bridges can connect to the core
68
+ bun run upt -- coverage # audit each bridge's empirical grounding
69
+ bun run upt -- canonical # the standard-physics L-layer registry (answer key)
70
+ bun run upt -- recover # validate bridges against standard physics
71
+ bun run upt -- symbolic --simplify # compose + fold bridges' SYMBOLIC forms (MathTS simplify)
72
+ bun run upt -- confront # run the catalog's committed real-data confrontations (predicted vs observed)
73
+ bun run upt -- map --source=both --format=mermaid # VISUAL map of the graph (Mermaid; also --format=dot|svg, --proposed, --out=PATH)
74
+ bun run upt -- map --equation "period = 2*pi*sqrt(length/gravity)" # drop YOUR OWN equation onto the map: dimensional check + where it lands
75
75
  # ...and YOUR OWN equations:
76
- npm run upt -- eval "hbar*c^3/(8*pi*G*M*k_B)" hbar=1.054571817e-34 c=299792458 G=6.6743e-11 M=1.989e30 k_B=1.380649e-23
77
- npm run upt -- derive period:time length:length gravity:acceleration --formula "2*pi*sqrt(length/gravity)"
76
+ bun run upt -- eval "hbar*c^3/(8*pi*G*M*k_B)" hbar=1.054571817e-34 c=299792458 G=6.6743e-11 M=1.989e30 k_B=1.380649e-23
77
+ bun run upt -- derive period:time length:length gravity:acceleration --formula "2*pi*sqrt(length/gravity)"
78
78
  # → period ∝ length^0.5·gravity^-0.5 ; formula dimension: [time] ✓ matches target ;
79
79
  # formula MATCHES, recovered prefactor ≈ 6.2832 (2π)
80
- npm run upt -- help
80
+ bun run upt -- help
81
81
  # Once published, the same commands run via `npx universal-physics-tensor <cmd>`.
82
- # (`npm run explain` and `npm run bridge-priority` remain as aliases.)
82
+ # (`bun run explain` and `bun run bridge-priority` remain as aliases.)
83
83
  ```
84
84
 
85
85
  `eval`/`derive --formula` use the MathTS expression engine
@@ -226,6 +226,7 @@ for how the documents evolved.
226
226
  - **Supplements** - [Part VII: Tensor Algebra](docs/specification/Part-VII-Tensor-Algebra.md) · [Part VIII: Metric Layer](docs/specification/Part-VIII-Metric-Layer.md) · [Part IX: Composition](docs/specification/Part-IX-Composition.md) · [Part X: Curvature & Field Equations](docs/specification/Part-X-Curvature-and-Field-Equations.md) · [Part XI: Proposed Equations](docs/specification/Part-XI-Proposed-Equations.md) (non-normative; machine-derived identity consequences, unadjudicated)
227
227
 
228
228
  ### Planning & Development
229
+ - **[ROADMAP.md](ROADMAP.md)** - Strategic direction: from bridge catalog to a verified, regime-aware physics atlas (phased, with exit criteria)
229
230
  - **[Development Plan](docs/planning/Development-Plan.md)** - Phased implementation roadmap
230
231
  - **[Implementation Plan](docs/planning/Implementation-Plan.md)** - Technical architecture
231
232
  - **[System Requirements](docs/planning/System-Requirements.md)** - Functional requirements
@@ -282,7 +283,7 @@ The current machine-checked state is:
282
283
  | Bridge catalog | **55 entries (BE-11…65)**: 19 established, 33 speculative, 3 highly speculative; the JSON artifact is freshness-tested against the TypeScript registry |
283
284
  | Empirical spine | **19 committed confrontations**, exposed through `upt confront` with rigor/caveat metadata |
284
285
  | Composition layer | **41 bridge edges** plus the canonical L-layer graph; dimensional, symbolic, discovery, consequence, and visualization tooling |
285
- | Canonical reference layer | **103 canonical equations** used as the non-speculative answer-key layer for bridge recovery/linkage |
286
+ | Canonical reference layer | **107 canonical equations** used as the non-speculative answer-key layer for bridge recovery/linkage |
286
287
  | Architecture | Generated dependency graph reports **0 circular dependencies** and a clean unused-analysis report; `npm run docs:deps` is CI freshness-gated |
287
288
  | Quality gates | Build, strict source+test TypeScript checks, full Vitest suite, active-plan audit, package-content smoke test, and nightly long-horizon GL4/Shapiro accuracy tests |
288
289
 
@@ -298,7 +299,7 @@ external evidence/domain review before promotion.
298
299
  - Longer-horizon production ideas are explicitly non-blocking and live in
299
300
  [`docs/planning/Future-Production-Hardening.md`](docs/planning/Future-Production-Hardening.md).
300
301
  - Historical implementation plans are preserved as records; the live code-completion
301
- ledger is [`docs/planning/ACTIVE.md`](docs/planning/ACTIVE.md) and is what
302
+ ledger is [`ACTIVE.md`](ACTIVE.md) and is what
302
303
  `npm run audit:plans` gates.
303
304
 
304
305
  ## Contributing
@@ -334,7 +335,7 @@ This is an **engineer's approach to theoretical physics** — systematic, organi
334
335
 
335
336
  ## License
336
337
 
337
- MIT License - see [LICENSE](LICENSE) for details.
338
+ Code: MIT License - see [LICENSE](LICENSE). Exported atlas data (`data/atlas/`): CC BY 4.0 - see [LICENSE-DATA](LICENSE-DATA).
338
339
 
339
340
  ## Author
340
341
 
@@ -0,0 +1,108 @@
1
+ /**
2
+ * Atlas Phase 4, S4.1 — the applicability checker.
3
+ *
4
+ * Design note: `docs/planning/Atlas-Phase-4-Design.md` §1.
5
+ *
6
+ * **This module answers "what about this bridge is not checked?", and it
7
+ * returns FINDINGS rather than a boolean.** A boolean would have to choose
8
+ * between "unchecked" and "wrong", and those are the two states the module
9
+ * exists to keep apart. Every finding therefore carries a
10
+ * {@link ApplicabilitySeverity}:
11
+ *
12
+ * - `'blocking'` — the data CONTRADICTS ITSELF. A dimensional failure, two
13
+ * records declaring opposite conventions, a literal zero divisor.
14
+ * - `'question'` — the data is SILENT. A divisor nobody guarded, a convention
15
+ * only one side declares, two premise models whose relationship is
16
+ * unrecorded.
17
+ *
18
+ * `src/atlas/conventions.ts` already argues this asymmetry at length for the
19
+ * convention comparison: absence is not disagreement. The same reasoning
20
+ * governs every rule here. Collapsing the two severities would report "four
21
+ * findings" for a record whose only defect is that nobody wrote something
22
+ * down, and would bury a genuine contradiction among them.
23
+ *
24
+ * **Nothing here mutates a record and nothing here is a verdict.** The checker
25
+ * has no authority to promote or reject: it produces the list a reviewer reads.
26
+ * That is the same firewall the rest of the repo keeps — no machine verdict
27
+ * mutates a catalog.
28
+ *
29
+ * @module atlas/applicability
30
+ * @internal
31
+ */
32
+ import type { ExprNode } from '../dimensional/ast-types.js';
33
+ import type { AtlasModel } from './model.js';
34
+ import type { Conventions } from './types.js';
35
+ /** Whether a finding is a contradiction in the data or a silence in it. @internal */
36
+ export type ApplicabilitySeverity = 'blocking' | 'question';
37
+ /**
38
+ * The rule that produced a finding. A closed union so a caller can filter by
39
+ * rule without matching on prose.
40
+ *
41
+ * @internal
42
+ */
43
+ export type ApplicabilityFindingKind = 'dimensional-inconsistency' | 'convention-mismatch' | 'convention-undeclared' | 'division-unguarded' | 'division-by-zero' | 'squaring-adds-solutions' | 'model-incompatibility';
44
+ /** One thing a reviewer must resolve before believing the record. @internal */
45
+ export interface ApplicabilityFinding {
46
+ readonly kind: ApplicabilityFindingKind;
47
+ readonly severity: ApplicabilitySeverity;
48
+ /** Human-readable statement of what is unresolved. */
49
+ readonly detail: string;
50
+ /**
51
+ * Where it was found: an AST path (`'args[1]'`), a convention key, or a
52
+ * model id. Absent when the finding is about the record as a whole.
53
+ */
54
+ readonly where?: string;
55
+ }
56
+ /**
57
+ * What the checker is given. Every field is optional EXCEPT the side
58
+ * conditions, which are required so that "this record states none" is a
59
+ * written choice (`[]`) rather than a forgotten argument — the same reasoning
60
+ * that made `passingWitnessIds` required in `derive-evidence.ts`.
61
+ *
62
+ * @internal
63
+ */
64
+ export interface ApplicabilityInput {
65
+ /** The transformation's AST, when the record encodes one. */
66
+ readonly ast?: ExprNode;
67
+ /** The record's stated side conditions, as free prose. REQUIRED; `[]` is a statement. */
68
+ readonly sideConditions: readonly string[];
69
+ /** The premise records' declared conventions. */
70
+ readonly premiseConventions?: Conventions;
71
+ /** The conclusion record's declared conventions. */
72
+ readonly conclusionConventions?: Conventions;
73
+ /** The premise models (many). */
74
+ readonly premises?: readonly AtlasModel[];
75
+ /** The conclusion model (one). */
76
+ readonly conclusion?: AtlasModel;
77
+ /**
78
+ * Family pairs already bridged, so a genuine cross-family step is not
79
+ * reported as unrecorded. Unordered: `['a','b']` covers `['b','a']`.
80
+ */
81
+ readonly declaredBridges?: readonly (readonly [string, string])[];
82
+ }
83
+ /**
84
+ * Every unresolved question and contradiction the checker can see in a record.
85
+ *
86
+ * An EMPTY result means "no rule fired", which is weaker than "this bridge is
87
+ * valid" and must not be reported as the latter. The rules in hand cover
88
+ * dimensions, declared conventions, division guards, even-power equating and
89
+ * model families; a bridge can be wrong in ways none of them reaches.
90
+ *
91
+ * @param input - the record's checkable parts. `sideConditions` is required.
92
+ * @returns findings in rule order (dimensions, conventions, AST, models);
93
+ * never `null`, never throws on a malformed AST.
94
+ * @internal
95
+ */
96
+ export declare function checkApplicability(input: ApplicabilityInput): readonly ApplicabilityFinding[];
97
+ /**
98
+ * The `'blocking'` subset of {@link checkApplicability}.
99
+ *
100
+ * Offered because the two severities are read by different callers — a report
101
+ * shows both, a gate looks only at contradictions — and filtering on the
102
+ * severity string at every call site is how one of them eventually filters on
103
+ * the wrong one.
104
+ *
105
+ * @internal
106
+ */
107
+ export declare function blockingFindings(findings: readonly ApplicabilityFinding[]): readonly ApplicabilityFinding[];
108
+ //# sourceMappingURL=applicability.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applicability.d.ts","sourceRoot":"","sources":["../../src/atlas/applicability.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAE5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAG9C,qFAAqF;AACrF,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,UAAU,CAAC;AAE5D;;;;;GAKG;AACH,MAAM,MAAM,wBAAwB,GAChC,2BAA2B,GAC3B,qBAAqB,GACrB,uBAAuB,GACvB,oBAAoB,GACpB,kBAAkB,GAClB,yBAAyB,GACzB,uBAAuB,CAAC;AAE5B,+EAA+E;AAC/E,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC;IACxC,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,CAAC;IACzC,sDAAsD;IACtD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,6DAA6D;IAC7D,QAAQ,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC;IACxB,yFAAyF;IACzF,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C,iDAAiD;IACjD,QAAQ,CAAC,kBAAkB,CAAC,EAAE,WAAW,CAAC;IAC1C,oDAAoD;IACpD,QAAQ,CAAC,qBAAqB,CAAC,EAAE,WAAW,CAAC;IAC7C,iCAAiC;IACjC,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IAC1C,kCAAkC;IAClC,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC;IACjC;;;OAGG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC;CACnE;AAoLD;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,kBAAkB,GACxB,SAAS,oBAAoB,EAAE,CAkFjC;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,SAAS,oBAAoB,EAAE,GACxC,SAAS,oBAAoB,EAAE,CAEjC"}
@@ -0,0 +1,301 @@
1
+ /**
2
+ * Atlas Phase 4, S4.1 — the applicability checker.
3
+ *
4
+ * Design note: `docs/planning/Atlas-Phase-4-Design.md` §1.
5
+ *
6
+ * **This module answers "what about this bridge is not checked?", and it
7
+ * returns FINDINGS rather than a boolean.** A boolean would have to choose
8
+ * between "unchecked" and "wrong", and those are the two states the module
9
+ * exists to keep apart. Every finding therefore carries a
10
+ * {@link ApplicabilitySeverity}:
11
+ *
12
+ * - `'blocking'` — the data CONTRADICTS ITSELF. A dimensional failure, two
13
+ * records declaring opposite conventions, a literal zero divisor.
14
+ * - `'question'` — the data is SILENT. A divisor nobody guarded, a convention
15
+ * only one side declares, two premise models whose relationship is
16
+ * unrecorded.
17
+ *
18
+ * `src/atlas/conventions.ts` already argues this asymmetry at length for the
19
+ * convention comparison: absence is not disagreement. The same reasoning
20
+ * governs every rule here. Collapsing the two severities would report "four
21
+ * findings" for a record whose only defect is that nobody wrote something
22
+ * down, and would bury a genuine contradiction among them.
23
+ *
24
+ * **Nothing here mutates a record and nothing here is a verdict.** The checker
25
+ * has no authority to promote or reject: it produces the list a reviewer reads.
26
+ * That is the same firewall the rest of the repo keeps — no machine verdict
27
+ * mutates a catalog.
28
+ *
29
+ * @module atlas/applicability
30
+ * @internal
31
+ */
32
+ import { validate } from '../dimensional/validator.js';
33
+ import { checkConventions, unknownConventionKeys } from './conventions.js';
34
+ /**
35
+ * Non-vanishing markers a side condition may use. Matched case-insensitively
36
+ * against the side-condition prose.
37
+ *
38
+ * ⚠ **Shallow by design, and the asymmetry is the point** (design note §1.3).
39
+ * A side condition is free text and no parser exists for it. The failure mode
40
+ * is a FALSE QUESTION — a genuinely guarded divisor phrased in words this list
41
+ * does not know — never a false clearance, because a divisor absent from the
42
+ * prose cannot match any marker. The check over-asks rather than over-clears.
43
+ */
44
+ const NONVANISHING_MARKERS = [
45
+ '≠ 0',
46
+ '≠0',
47
+ '!= 0',
48
+ '!=0',
49
+ '<> 0',
50
+ '<>0',
51
+ 'nonzero',
52
+ 'non-zero',
53
+ 'non zero',
54
+ '> 0',
55
+ '>0',
56
+ 'positive',
57
+ ];
58
+ /** Free symbol names appearing anywhere in a subtree. */
59
+ function symbolNames(node, into = new Set()) {
60
+ if (node.kind === 'symbol') {
61
+ into.add(node.name);
62
+ return into;
63
+ }
64
+ for (const child of childNodes(node))
65
+ symbolNames(child, into);
66
+ return into;
67
+ }
68
+ /**
69
+ * The `ExprNode` children of a node, for the scalar grammar this checker
70
+ * reasons about. Tensor and curvature node families have no children here and
71
+ * return `[]`: the side-condition and squaring rules are statements about
72
+ * scalar algebra, and silently descending into a tensor node would invite
73
+ * findings whose `where` path means nothing to a reader.
74
+ */
75
+ function childNodes(node) {
76
+ switch (node.kind) {
77
+ case 'op':
78
+ return node.args;
79
+ case 'integral':
80
+ return [node.over, node.integrand, ...(node.lower ? [node.lower] : []),
81
+ ...(node.upper ? [node.upper] : [])];
82
+ case 'derivative':
83
+ return [node.of, node.wrt];
84
+ case 'dirac-delta':
85
+ return [node.arg];
86
+ case 'variational-derivative':
87
+ return [node.functional, node.field, node.over];
88
+ case 'transcendental':
89
+ return [node.arg];
90
+ case 'abs':
91
+ return [node.arg];
92
+ default:
93
+ return [];
94
+ }
95
+ }
96
+ /**
97
+ * The numeric value of a leaf that IS a literal, or `null`.
98
+ *
99
+ * Literals are `symbol` leaves whose `name` parses as a number — the same
100
+ * convention `validator.ts` uses to recognise a literal exponent, so the two
101
+ * cannot disagree about what a literal is.
102
+ */
103
+ function literalValue(node) {
104
+ if (node.kind !== 'symbol')
105
+ return null;
106
+ if (node.name.trim() === '')
107
+ return null;
108
+ const v = Number(node.name);
109
+ return Number.isFinite(v) ? v : null;
110
+ }
111
+ /** Is `name` guarded as non-vanishing by any of the stated side conditions? */
112
+ function isGuarded(name, sideConditions) {
113
+ const needle = name.toLowerCase();
114
+ return sideConditions.some((raw) => {
115
+ const s = raw.toLowerCase();
116
+ if (!s.includes(needle))
117
+ return false;
118
+ return NONVANISHING_MARKERS.some((m) => s.includes(m));
119
+ });
120
+ }
121
+ /** An even, integer literal exponent, or `null` when the exponent is anything else. */
122
+ function evenLiteralExponent(node) {
123
+ if (node.kind !== 'op' || node.op !== '^')
124
+ return null;
125
+ const exp = node.args[1];
126
+ if (exp === undefined)
127
+ return null;
128
+ const v = literalValue(exp);
129
+ if (v === null || !Number.isInteger(v) || v === 0)
130
+ return null;
131
+ return v % 2 === 0 ? v : null;
132
+ }
133
+ /** Walk the AST, applying the side-condition and squaring rules. */
134
+ function checkAst(node, sideConditions, path, out) {
135
+ if (node.kind === 'op' && node.op === '/') {
136
+ const divisor = node.args[1];
137
+ if (divisor !== undefined) {
138
+ const lit = literalValue(divisor);
139
+ if (lit === 0) {
140
+ out.push({
141
+ kind: 'division-by-zero',
142
+ severity: 'blocking',
143
+ detail: 'Division by the literal 0.',
144
+ where: `${path}args[1]`,
145
+ });
146
+ }
147
+ else if (lit === null) {
148
+ // Not a literal: it needs a stated non-vanishing side condition.
149
+ const names = [...symbolNames(divisor)];
150
+ const unguarded = names.filter((n) => !isGuarded(n, sideConditions));
151
+ // Every name guarded ⇒ nothing to ask. A divisor with NO symbols and no
152
+ // literal value (a tensor leaf, say) is reported, because nothing about
153
+ // it can be checked and silence there would read as clearance.
154
+ if (names.length === 0 || unguarded.length > 0) {
155
+ const subject = names.length === 0 ? 'the divisor' : unguarded.join(', ');
156
+ out.push({
157
+ kind: 'division-unguarded',
158
+ severity: 'question',
159
+ detail: `Division whose divisor (${subject}) has no stated non-vanishing side ` +
160
+ 'condition. This is a question, not a defect: the divisor may well be ' +
161
+ 'non-zero and simply unstated.',
162
+ where: `${path}args[1]`,
163
+ });
164
+ }
165
+ }
166
+ }
167
+ }
168
+ // Difference (or sum) of two equal even powers ⇒ the relation was obtained by
169
+ // squaring, which admits the sign-flipped branch. See design note §1.4 for why
170
+ // an isolated even power is NOT reported.
171
+ if (node.kind === 'op' && (node.op === '-' || node.op === '+')) {
172
+ const exps = node.args.map(evenLiteralExponent);
173
+ for (let i = 0; i < exps.length; i += 1) {
174
+ for (let j = i + 1; j < exps.length; j += 1) {
175
+ const a = exps[i];
176
+ if (a !== null && a !== undefined && a === exps[j]) {
177
+ out.push({
178
+ kind: 'squaring-adds-solutions',
179
+ severity: 'question',
180
+ detail: `Two terms raised to the same even power (${a}) are equated. Raising a ` +
181
+ 'relation to an even power admits the sign-flipped branch, so a side ' +
182
+ 'condition fixing the sign is needed for the step to be reversible.',
183
+ where: `${path}args[${i}]`,
184
+ });
185
+ }
186
+ }
187
+ }
188
+ }
189
+ const children = childNodes(node);
190
+ for (let i = 0; i < children.length; i += 1) {
191
+ const child = children[i];
192
+ if (child !== undefined)
193
+ checkAst(child, sideConditions, `${path}args[${i}].`, out);
194
+ }
195
+ }
196
+ /** Is this family pair recorded as already bridged? Unordered. */
197
+ function bridgeDeclared(a, b, declared) {
198
+ return declared.some(([x, y]) => (x === a && y === b) || (x === b && y === a));
199
+ }
200
+ /**
201
+ * Every unresolved question and contradiction the checker can see in a record.
202
+ *
203
+ * An EMPTY result means "no rule fired", which is weaker than "this bridge is
204
+ * valid" and must not be reported as the latter. The rules in hand cover
205
+ * dimensions, declared conventions, division guards, even-power equating and
206
+ * model families; a bridge can be wrong in ways none of them reaches.
207
+ *
208
+ * @param input - the record's checkable parts. `sideConditions` is required.
209
+ * @returns findings in rule order (dimensions, conventions, AST, models);
210
+ * never `null`, never throws on a malformed AST.
211
+ * @internal
212
+ */
213
+ export function checkApplicability(input) {
214
+ const out = [];
215
+ // 1. Dimensions — the existing validator, unchanged.
216
+ if (input.ast !== undefined) {
217
+ const result = validate(input.ast);
218
+ for (const v of result.violations) {
219
+ // A warning-severity violation does not make the record inconsistent;
220
+ // reporting it as blocking would contradict `validate`'s own verdict.
221
+ const severity = (v.severity ?? 'error') === 'error' ? 'blocking' : 'question';
222
+ out.push({
223
+ kind: 'dimensional-inconsistency',
224
+ severity,
225
+ detail: v.note,
226
+ where: v.location === '' ? undefined : v.location,
227
+ });
228
+ }
229
+ if (result.inferredDimension === null && result.violations.length === 0) {
230
+ out.push({
231
+ kind: 'dimensional-inconsistency',
232
+ severity: 'blocking',
233
+ detail: 'No dimension could be inferred for the transformation AST.',
234
+ });
235
+ }
236
+ }
237
+ // 2. Conventions — mismatches block, asymmetric declarations are questions.
238
+ const mismatches = checkConventions(input.premiseConventions, input.conclusionConventions);
239
+ for (const key of mismatches) {
240
+ out.push({
241
+ kind: 'convention-mismatch',
242
+ severity: 'blocking',
243
+ detail: `Premise and conclusion declare different values for '${key}'. Two records ` +
244
+ 'that disagree on a sign or unit choice are not directly comparable.',
245
+ where: key,
246
+ });
247
+ }
248
+ for (const key of unknownConventionKeys(input.premiseConventions, input.conclusionConventions)) {
249
+ out.push({
250
+ kind: 'convention-undeclared',
251
+ severity: 'question',
252
+ detail: `Exactly one side declares '${key}'. Silence is not agreement: the other ` +
253
+ 'record may use the opposite choice and simply never said.',
254
+ where: key,
255
+ });
256
+ }
257
+ // 3. Side conditions over the AST.
258
+ if (input.ast !== undefined)
259
+ checkAst(input.ast, input.sideConditions, '', out);
260
+ // 4. Model compatibility.
261
+ const premises = input.premises ?? [];
262
+ const declared = input.declaredBridges ?? [];
263
+ const conclusionFamily = input.conclusion?.family;
264
+ const families = new Set(premises.map((m) => m.family));
265
+ if (conclusionFamily !== undefined)
266
+ families.add(conclusionFamily);
267
+ const familyList = [...families];
268
+ for (let i = 0; i < familyList.length; i += 1) {
269
+ for (let j = i + 1; j < familyList.length; j += 1) {
270
+ const a = familyList[i];
271
+ const b = familyList[j];
272
+ if (a === undefined || b === undefined)
273
+ continue;
274
+ if (bridgeDeclared(a, b, declared))
275
+ continue;
276
+ out.push({
277
+ kind: 'model-incompatibility',
278
+ severity: 'question',
279
+ detail: `Models span families '${a}' and '${b}' with no declared bridge between ` +
280
+ 'them. An unrecorded cross-family step is exactly what the atlas exists ' +
281
+ 'to make visible.',
282
+ where: `${a}|${b}`,
283
+ });
284
+ }
285
+ }
286
+ return out;
287
+ }
288
+ /**
289
+ * The `'blocking'` subset of {@link checkApplicability}.
290
+ *
291
+ * Offered because the two severities are read by different callers — a report
292
+ * shows both, a gate looks only at contradictions — and filtering on the
293
+ * severity string at every call site is how one of them eventually filters on
294
+ * the wrong one.
295
+ *
296
+ * @internal
297
+ */
298
+ export function blockingFindings(findings) {
299
+ return findings.filter((f) => f.severity === 'blocking');
300
+ }
301
+ //# sourceMappingURL=applicability.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applicability.js","sourceRoot":"","sources":["../../src/atlas/applicability.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAGvD,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AA6D3E;;;;;;;;;GASG;AACH,MAAM,oBAAoB,GAAsB;IAC9C,KAAK;IACL,IAAI;IACJ,MAAM;IACN,KAAK;IACL,MAAM;IACN,KAAK;IACL,SAAS;IACT,UAAU;IACV,UAAU;IACV,KAAK;IACL,IAAI;IACJ,UAAU;CACX,CAAC;AAEF,yDAAyD;AACzD,SAAS,WAAW,CAAC,IAAc,EAAE,IAAI,GAAgB,IAAI,GAAG,EAAE;IAChE,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC3B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,KAAK,MAAM,KAAK,IAAI,UAAU,CAAC,IAAI,CAAC;QAAE,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAC/D,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;GAMG;AACH,SAAS,UAAU,CAAC,IAAc;IAChC,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;QAClB,KAAK,IAAI;YACP,OAAO,IAAI,CAAC,IAAI,CAAC;QACnB,KAAK,UAAU;YACb,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,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,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;YAClD,MAAM,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;YACxB,MAAM,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;YACxB,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,SAAS;gBAAE,SAAS;YACjD,IAAI,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC;gBAAE,SAAS;YAC7C,GAAG,CAAC,IAAI,CAAC;gBACP,IAAI,EAAE,uBAAuB;gBAC7B,QAAQ,EAAE,UAAU;gBACpB,MAAM,EACJ,yBAAyB,CAAC,UAAU,CAAC,oCAAoC;oBACzE,yEAAyE;oBACzE,kBAAkB;gBACpB,KAAK,EAAE,GAAG,CAAC,IAAI,CAAC,EAAE;aACnB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAC9B,QAAyC;IAEzC,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,UAAU,CAAC,CAAC;AAC3D,CAAC"}
@@ -0,0 +1,92 @@
1
+ /**
2
+ * Atlas Phase 1 — the association registry.
3
+ *
4
+ * An `Association` records that two things SHARE something: a constant, a
5
+ * symbol, a structure, or a line of historical influence. That is the whole of
6
+ * its meaning. It asserts **no relation** between the two, makes **no
7
+ * composite claim**, and is explicitly NOT a graph edge — design note §5: *"No
8
+ * `Association` semantics beyond a registry of typed pairs — the registry is a
9
+ * container in Sprint 1, and it makes no composite claims."*
10
+ *
11
+ * The distinction is the point. `CATALOG_GRAPH` edges are claims that one
12
+ * quantity DETERMINES another. An association is the opposite epistemic act:
13
+ * it is where the atlas writes down a resemblance it has already decided is
14
+ * NOT a link, so the resemblance stops being re-surfaced as if it were fresh.
15
+ * An association that also appeared as an edge would be a contradiction, and
16
+ * `tests/atlas/association.test.ts` pins that it never does.
17
+ *
18
+ * **The seed is the `'decoy'` half of the adjudication ledger.** A `decoy`
19
+ * verdict means a physicist looked at `a ≟ b` and found a coincidence with no
20
+ * mechanism — precisely a shared appearance with no relation behind it. Every
21
+ * `'decoy'` row in `ADJUDICATIONS` (`src/composition/adjudication.ts`) gets
22
+ * one entry here, id-linked, with its `grounds` copied VERBATIM as the `note`.
23
+ *
24
+ * **No new physics is added by this module**, and two deliberate choices keep
25
+ * it that way:
26
+ *
27
+ * - `note` is the adjudicator's own prose, never a restatement. Verbatimness
28
+ * is pinned by test against the live ledger, so a re-worded ledger entry
29
+ * fails rather than silently diverging from its copy here.
30
+ * - `kind` is assigned MECHANICALLY, not per pair. Every seed is
31
+ * `'shared-structure'` because every one of them reached the ledger the
32
+ * same way: the identification funnel pairs quantities that share a
33
+ * dimensional signature. Choosing a different `kind` per row would be a
34
+ * fresh physics judgement about each pair, which is exactly the claim this
35
+ * registry exists not to make.
36
+ *
37
+ * **Why the seed is written out rather than derived from `ADJUDICATIONS` at
38
+ * import time.** `src/composition/` may import atlas TYPES only, never the
39
+ * barrel, because a value import in the other direction closes a cycle
40
+ * `docs:deps` reports (`compose.ts` already imports `atlas/composition-table`).
41
+ * An `atlas → composition/adjudication → discovery → …` value import risks the
42
+ * same cycle from the other side. So this module stays a leaf, and the
43
+ * drift protection moves into the test, which is free to import both.
44
+ *
45
+ * @module atlas/association
46
+ */
47
+ /**
48
+ * What two records share. Each value names an observable resemblance, not a
49
+ * relation: none of them implies that either record determines, derives,
50
+ * approximates or restricts the other.
51
+ *
52
+ * @internal
53
+ */
54
+ export type AssociationKind = 'shared-constant' | 'shared-symbol' | 'shared-structure' | 'historical-influence';
55
+ /**
56
+ * One recorded resemblance between two named things.
57
+ *
58
+ * A container, deliberately. It has no `relation`, no `bound`, no `regime` and
59
+ * no `evidence` — the fields that would let it make a claim are absent because
60
+ * it makes none.
61
+ *
62
+ * @internal
63
+ */
64
+ export interface Association {
65
+ /**
66
+ * Stable identity. For a seeded entry this is the `CandidateAdjudication.id`
67
+ * it came from — `candidateId(a, b)`, the two names sorted and joined with
68
+ * `~` — so the association and the verdict that produced it share a key.
69
+ */
70
+ readonly id: string;
71
+ readonly kind: AssociationKind;
72
+ /** The two names, in the order `id` encodes them (sorted, `~`-split). */
73
+ readonly between: readonly [string, string];
74
+ /** Why the resemblance is only a resemblance. Adjudicator's prose, verbatim. */
75
+ readonly note: string;
76
+ /** Repo-relative path of the record this note was copied from. */
77
+ readonly citation: string;
78
+ }
79
+ /**
80
+ * The seeded registry: one entry per `'decoy'` adjudication, in ledger order.
81
+ *
82
+ * Kept in step with `ADJUDICATIONS` by
83
+ * `tests/atlas/association.test.ts`, which re-derives this array from the live
84
+ * ledger and deep-equals it. Adding a `'decoy'` verdict without adding its
85
+ * association here fails that test.
86
+ *
87
+ * @internal
88
+ */
89
+ export declare const ASSOCIATIONS: readonly Association[];
90
+ /** Look up an association by its `candidateId`-shaped key. @internal */
91
+ export declare function associationFor(id: string): Association | undefined;
92
+ //# sourceMappingURL=association.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"association.d.ts","sourceRoot":"","sources":["../../src/atlas/association.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GACvB,iBAAiB,GACjB,eAAe,GACf,kBAAkB,GAClB,sBAAsB,CAAC;AAE3B;;;;;;;;GAQG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,yEAAyE;IACzE,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,gFAAgF;IAChF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,kEAAkE;IAClE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,EAAE,SAAS,WAAW,EAyD9C,CAAC;AAEF,wEAAwE;AACxE,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAElE"}