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
@@ -0,0 +1,181 @@
1
+ /**
2
+ * Atlas Phase 4, S4.4 — the numerics behind the diffusion family's witnesses.
3
+ *
4
+ * Each function evaluates one claim at a RESOLUTION, so the numeric witness
5
+ * runner can evaluate it twice and record how the error shrank. None of them
6
+ * asserts an order of convergence; the runner reports the ratio and a reviewer
7
+ * reads it (Phase 4 design note §2.3).
8
+ *
9
+ * @module atlas/diffusion/numerics
10
+ */
11
+ /**
12
+ * The Gaussian solution of `∂c/∂t = D ∂²c/∂x²` from a point source of unit
13
+ * mass, evaluated at `x`: `(4πDt)^{-1/2} exp(−x²/(4Dt))`.
14
+ *
15
+ * @internal
16
+ */
17
+ export declare function diffusionKernel(x: number, t: number, D: number): number;
18
+ /**
19
+ * WD1 — the probability DENSITY at the origin of a symmetric lattice random
20
+ * walk after `steps` steps, under the closure `D = Δx²/(2Δt)` at fixed `D`
21
+ * and `t`.
22
+ *
23
+ * With `Δt = t/steps` and `Δx = √(2DΔt)`, the walker sits at the origin with
24
+ * probability `C(steps, steps/2)/2^steps`. Only every other site is reachable
25
+ * after an even number of steps, so the probability is spread over a cell of
26
+ * width `2Δx`, and the density is that probability divided by `2Δx`.
27
+ * As `steps → ∞` it converges to {@link diffusionKernel}`(0, t, D)`.
28
+ *
29
+ * @param steps - the resolution; rounded up to the next even integer.
30
+ * @internal
31
+ */
32
+ export declare function randomWalkCentralDensity(steps: number, D: number, t: number): number;
33
+ /**
34
+ * WD1b — the random walk's density at lattice site `site` after `steps` steps
35
+ * (same closure and grid as {@link randomWalkCentralDensity}). Exactly zero
36
+ * outside the light cone `|site| > steps` and on sites of the wrong parity.
37
+ *
38
+ * @internal
39
+ */
40
+ export declare function randomWalkDensity(site: number, steps: number, D: number, t: number): number;
41
+ /** Parameters of the WD2 heat-conduction fixture. @internal */
42
+ export interface HeatFixture {
43
+ /** Thermal conductivity κ. */
44
+ readonly kappa: number;
45
+ /** Density ρ. */
46
+ readonly rho: number;
47
+ /** Specific heat capacity c_p. */
48
+ readonly cp: number;
49
+ /** Initial Gaussian width parameter: `T(x, 0) = exp(−x²/(4 s0))`. */
50
+ readonly s0: number;
51
+ /** Final time. */
52
+ readonly tEnd: number;
53
+ /**
54
+ * Half-width of the domain. The edges are held at ZERO, not at the exact
55
+ * solution: the exact solution is the Fick side of the claim, and feeding it
56
+ * to the heat solver would leak the dictionary under test into the side that
57
+ * is supposed to be independent of it. The true edge value is below
58
+ * `exp(−halfWidth²/(4(s0 + D tEnd)))`, far under the tolerance.
59
+ */
60
+ readonly halfWidth: number;
61
+ }
62
+ /**
63
+ * The exact solution of the DIFFUSION equation with coefficient `D` from the
64
+ * WD2 initial condition: `√(s0/(s0 + D t)) · exp(−x²/(4(s0 + D t)))`.
65
+ *
66
+ * @internal
67
+ */
68
+ export declare function gaussianSpread(x: number, t: number, D: number, s0: number): number;
69
+ /**
70
+ * WD2 — the temperature at `x = 0, t = tEnd` from an explicit FTCS solution of
71
+ * the HEAT equation `ρ c_p ∂T/∂t = κ ∂²T/∂x²` on `cells` intervals.
72
+ *
73
+ * The heat equation is solved in its OWN variables: the step uses `κ`, `ρ` and
74
+ * `c_p`, never a pre-combined `D`. Comparing the result against
75
+ * {@link gaussianSpread} with `D = κ/(ρ c_p)` is what tests the dictionary.
76
+ * The mesh ratio `κΔt/(ρ c_p Δx²)` is held at or below 1/4, inside the FTCS
77
+ * stability limit of 1/2, so refinement halves `Δx` and quarters `Δt`.
78
+ *
79
+ * @param cells - the resolution: the number of spatial intervals (made even so
80
+ * `x = 0` is a node).
81
+ * @internal
82
+ */
83
+ export declare function heatFtcsCentre(cells: number, f: HeatFixture): number;
84
+ /** Parameters of the WD3 Wick-rotation fixture. @internal */
85
+ export interface WickFixture {
86
+ readonly hbar: number;
87
+ readonly m: number;
88
+ /** Initial width of the α = 0 Gaussian. */
89
+ readonly s: number;
90
+ /** The point `(x, τ)` the residual is evaluated at. */
91
+ readonly x: number;
92
+ readonly tau: number;
93
+ /** Base finite-difference step; the resolution divides it. */
94
+ readonly h0: number;
95
+ }
96
+ /**
97
+ * WD3 — the finite-difference residual `|∂_τ φ − (ħ/2m) ∂²_x φ|` of the
98
+ * Wick-rotated free kernel `φ(x, τ)` (`witnesses/quantum-support.ts`, W5) at
99
+ * one point, with step `h = h0/resolution` in both variables.
100
+ *
101
+ * The residual measures whether the Wick rotation `t = −iτ` of the free
102
+ * Schrödinger equation really lands on the DIFFUSION equation with
103
+ * `D = ħ/(2m)`. Its exact value is zero; the finite-difference estimate
104
+ * approaches zero as `h` shrinks, and the runner records how fast.
105
+ *
106
+ * @internal
107
+ */
108
+ export declare function wickHeatResidual(resolution: number, f: WickFixture, kernel: (x: number, tau: number, s: number, hbar: number, m: number) => number): number;
109
+ /**
110
+ * WD3b — `∫ φ(x, τ)² dx` of the Wick-rotated free kernel, by the trapezoid
111
+ * rule over `[−halfWidth, halfWidth]`. The Schrödinger norm `∫|ψ|² dx` is
112
+ * conserved; this one DECAYS with τ, which is the unitarity the continuation
113
+ * does not preserve.
114
+ *
115
+ * @internal
116
+ */
117
+ export declare function wickKernelSquaredNorm(tau: number, f: WickFixture, kernel: (x: number, tau: number, s: number, hbar: number, m: number) => number, halfWidth?: number, cells?: number): number;
118
+ /** Parameters of the Langevin (Ornstein–Uhlenbeck) fixture. @internal */
119
+ export interface LangevinFixture {
120
+ /** Particle mass m. */
121
+ readonly m: number;
122
+ /** Friction coefficient γ (force per velocity). */
123
+ readonly gamma: number;
124
+ /** Thermal energy k_B T. */
125
+ readonly kT: number;
126
+ }
127
+ /**
128
+ * WD4 — `⟨x²⟩(t) / (2Dt)` for the Langevin model `m v̇ = −γv + ξ`,
129
+ * `⟨ξ(t)ξ(t′)⟩ = 2γ k_B T δ(t − t′)`, started from x = 0 with a thermalized
130
+ * velocity, at `t = resolution · τ_p` where `τ_p = m/γ`.
131
+ *
132
+ * The second moments are integrated from the LANGEVIN model's own moment
133
+ * equations, `d⟨x²⟩/dt = 2⟨xv⟩`, `d⟨xv⟩/dt = ⟨v²⟩ − (γ/m)⟨xv⟩`, with
134
+ * `⟨v²⟩ = k_B T/m` held at equipartition, by RK4 on a fine fixed grid. The
135
+ * diffusion coefficient `D = k_B T/γ` (Einstein) enters only the DENOMINATOR:
136
+ * the ratio tends to 1 in the diffusive regime `t ≫ τ_p`.
137
+ *
138
+ * @internal
139
+ */
140
+ export declare function langevinMsdRatio(resolution: number, f: LangevinFixture): number;
141
+ /**
142
+ * The slow decay rate of a Fourier mode of the TELEGRAPH equation
143
+ * `τ u_tt + u_t = D u_xx`, divided by the diffusion rate `D q²`:
144
+ * `(1 − √(1 − 4ε)) / (2ε)` with `ε = τ D q²`. Tends to 1 as τ → 0; complex
145
+ * (oscillatory) for `ε > 1/4`, where it returns NaN.
146
+ *
147
+ * @internal
148
+ */
149
+ export declare function telegraphSlowRateRatio(tau: number, D: number, q: number): number;
150
+ /**
151
+ * The oscillation frequency of a telegraph mode in its underdamped range,
152
+ * divided by the undamped wave frequency `c q` with `c² = D/τ`:
153
+ * `√(1 − 1/(4ε))`, `ε = τ D q²`. Tends to 1 as ε grows.
154
+ *
155
+ * @internal
156
+ */
157
+ export declare function telegraphWaveFrequencyRatio(tau: number, D: number, q: number): number;
158
+ /** Parameters of the WD8 steady-state fixture. @internal */
159
+ export interface SteadyStateFixture {
160
+ /** Thermal diffusivity α (= κ/(ρ c_p)). */
161
+ readonly alpha: number;
162
+ /** Rod length ℓ. */
163
+ readonly ell: number;
164
+ /** End temperatures. */
165
+ readonly tLeft: number;
166
+ readonly tRight: number;
167
+ /** Base time; the resolution multiplies it. */
168
+ readonly t0: number;
169
+ readonly cells: number;
170
+ }
171
+ /**
172
+ * WD8 — the largest deviation from the LINEAR steady profile (the Laplace
173
+ * equation's solution) of an FTCS heat solution with fixed end temperatures,
174
+ * started from a profile with a sin(πx/ℓ) bump, at `t = resolution · t0`.
175
+ * Tends to zero as t → ∞: the steady state is the heat equation's attractor.
176
+ * `reference` replaces the linear profile the deviation is measured against.
177
+ *
178
+ * @internal
179
+ */
180
+ export declare function heatSteadyDeviation(resolution: number, f: SteadyStateFixture, reference?: (i: number, cells: number) => number): number;
181
+ //# sourceMappingURL=numerics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"numerics.d.ts","sourceRoot":"","sources":["../../../src/atlas/diffusion/numerics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAEvE;AASD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAMpF;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAM3F;AAED,+DAA+D;AAC/D,MAAM,WAAW,WAAW;IAC1B,8BAA8B;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,iBAAiB;IACjB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,kCAAkC;IAClC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,qEAAqE;IACrE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,kBAAkB;IAClB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;;;OAMG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAGlF;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc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AgB,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC,EAAE,eAAe,GAAG,MAAM,CAmB/E;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAMhF;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAIrF;AAED,4DAA4D;AAC5D,MAAM,WAAW,kBAAkB;IACjC,2CAA2C;IAC3C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,oBAAoB;IACpB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,wBAAwB;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,EAClB,CAAC,EAAE,kBAAkB,EACrB,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,GAC/C,MAAM,CAyBR"}
@@ -0,0 +1,251 @@
1
+ /**
2
+ * Atlas Phase 4, S4.4 — the numerics behind the diffusion family's witnesses.
3
+ *
4
+ * Each function evaluates one claim at a RESOLUTION, so the numeric witness
5
+ * runner can evaluate it twice and record how the error shrank. None of them
6
+ * asserts an order of convergence; the runner reports the ratio and a reviewer
7
+ * reads it (Phase 4 design note §2.3).
8
+ *
9
+ * @module atlas/diffusion/numerics
10
+ */
11
+ /**
12
+ * The Gaussian solution of `∂c/∂t = D ∂²c/∂x²` from a point source of unit
13
+ * mass, evaluated at `x`: `(4πDt)^{-1/2} exp(−x²/(4Dt))`.
14
+ *
15
+ * @internal
16
+ */
17
+ export function diffusionKernel(x, t, D) {
18
+ return Math.exp(-(x * x) / (4 * D * t)) / Math.sqrt(4 * Math.PI * D * t);
19
+ }
20
+ /** `ln C(n, k)` by summing logs — exact enough for the n ≤ 10⁵ used here. */
21
+ function logBinomial(n, k) {
22
+ let s = 0;
23
+ for (let i = 1; i <= k; i++)
24
+ s += Math.log(n - k + i) - Math.log(i);
25
+ return s;
26
+ }
27
+ /**
28
+ * WD1 — the probability DENSITY at the origin of a symmetric lattice random
29
+ * walk after `steps` steps, under the closure `D = Δx²/(2Δt)` at fixed `D`
30
+ * and `t`.
31
+ *
32
+ * With `Δt = t/steps` and `Δx = √(2DΔt)`, the walker sits at the origin with
33
+ * probability `C(steps, steps/2)/2^steps`. Only every other site is reachable
34
+ * after an even number of steps, so the probability is spread over a cell of
35
+ * width `2Δx`, and the density is that probability divided by `2Δx`.
36
+ * As `steps → ∞` it converges to {@link diffusionKernel}`(0, t, D)`.
37
+ *
38
+ * @param steps - the resolution; rounded up to the next even integer.
39
+ * @internal
40
+ */
41
+ export function randomWalkCentralDensity(steps, D, t) {
42
+ const n = 2 * Math.ceil(steps / 2);
43
+ const dt = t / n;
44
+ const dx = Math.sqrt(2 * D * dt);
45
+ const logP = logBinomial(n, n / 2) - n * Math.LN2;
46
+ return Math.exp(logP) / (2 * dx);
47
+ }
48
+ /**
49
+ * WD1b — the random walk's density at lattice site `site` after `steps` steps
50
+ * (same closure and grid as {@link randomWalkCentralDensity}). Exactly zero
51
+ * outside the light cone `|site| > steps` and on sites of the wrong parity.
52
+ *
53
+ * @internal
54
+ */
55
+ export function randomWalkDensity(site, steps, D, t) {
56
+ const n = 2 * Math.ceil(steps / 2);
57
+ if (Math.abs(site) > n || (site + n) % 2 !== 0)
58
+ return 0;
59
+ const dx = Math.sqrt((2 * D * t) / n);
60
+ const k = (n + site) / 2;
61
+ return Math.exp(logBinomial(n, k) - n * Math.LN2) / (2 * dx);
62
+ }
63
+ /**
64
+ * The exact solution of the DIFFUSION equation with coefficient `D` from the
65
+ * WD2 initial condition: `√(s0/(s0 + D t)) · exp(−x²/(4(s0 + D t)))`.
66
+ *
67
+ * @internal
68
+ */
69
+ export function gaussianSpread(x, t, D, s0) {
70
+ const s = s0 + D * t;
71
+ return Math.sqrt(s0 / s) * Math.exp(-(x * x) / (4 * s));
72
+ }
73
+ /**
74
+ * WD2 — the temperature at `x = 0, t = tEnd` from an explicit FTCS solution of
75
+ * the HEAT equation `ρ c_p ∂T/∂t = κ ∂²T/∂x²` on `cells` intervals.
76
+ *
77
+ * The heat equation is solved in its OWN variables: the step uses `κ`, `ρ` and
78
+ * `c_p`, never a pre-combined `D`. Comparing the result against
79
+ * {@link gaussianSpread} with `D = κ/(ρ c_p)` is what tests the dictionary.
80
+ * The mesh ratio `κΔt/(ρ c_p Δx²)` is held at or below 1/4, inside the FTCS
81
+ * stability limit of 1/2, so refinement halves `Δx` and quarters `Δt`.
82
+ *
83
+ * @param cells - the resolution: the number of spatial intervals (made even so
84
+ * `x = 0` is a node).
85
+ * @internal
86
+ */
87
+ export function heatFtcsCentre(cells, f) {
88
+ const nx = 2 * Math.ceil(cells / 2);
89
+ const dx = (2 * f.halfWidth) / nx;
90
+ const capacity = f.rho * f.cp;
91
+ const dtMax = (0.25 * capacity * dx * dx) / f.kappa;
92
+ const steps = Math.ceil(f.tEnd / dtMax);
93
+ const dt = f.tEnd / steps;
94
+ const r = (f.kappa * dt) / (capacity * dx * dx);
95
+ let u = new Float64Array(nx + 1);
96
+ let next = new Float64Array(nx + 1);
97
+ // The initial condition exp(−x²/(4 s0)) involves no diffusivity at all.
98
+ for (let i = 0; i <= nx; i++) {
99
+ const x = -f.halfWidth + i * dx;
100
+ u[i] = Math.exp(-(x * x) / (4 * f.s0));
101
+ }
102
+ u[0] = 0;
103
+ u[nx] = 0;
104
+ for (let n = 1; n <= steps; n++) {
105
+ for (let i = 1; i < nx; i++) {
106
+ next[i] = u[i] + r * (u[i + 1] - 2 * u[i] + u[i - 1]);
107
+ }
108
+ next[0] = 0;
109
+ next[nx] = 0;
110
+ [u, next] = [next, u];
111
+ }
112
+ return u[nx / 2];
113
+ }
114
+ /**
115
+ * WD3 — the finite-difference residual `|∂_τ φ − (ħ/2m) ∂²_x φ|` of the
116
+ * Wick-rotated free kernel `φ(x, τ)` (`witnesses/quantum-support.ts`, W5) at
117
+ * one point, with step `h = h0/resolution` in both variables.
118
+ *
119
+ * The residual measures whether the Wick rotation `t = −iτ` of the free
120
+ * Schrödinger equation really lands on the DIFFUSION equation with
121
+ * `D = ħ/(2m)`. Its exact value is zero; the finite-difference estimate
122
+ * approaches zero as `h` shrinks, and the runner records how fast.
123
+ *
124
+ * @internal
125
+ */
126
+ export function wickHeatResidual(resolution, f, kernel) {
127
+ const h = f.h0 / resolution;
128
+ const phi = (x, tau) => kernel(x, tau, f.s, f.hbar, f.m);
129
+ const dTau = (phi(f.x, f.tau + h) - phi(f.x, f.tau - h)) / (2 * h);
130
+ const dXX = (phi(f.x + h, f.tau) - 2 * phi(f.x, f.tau) + phi(f.x - h, f.tau)) / (h * h);
131
+ return Math.abs(dTau - (f.hbar / (2 * f.m)) * dXX);
132
+ }
133
+ /**
134
+ * WD3b — `∫ φ(x, τ)² dx` of the Wick-rotated free kernel, by the trapezoid
135
+ * rule over `[−halfWidth, halfWidth]`. The Schrödinger norm `∫|ψ|² dx` is
136
+ * conserved; this one DECAYS with τ, which is the unitarity the continuation
137
+ * does not preserve.
138
+ *
139
+ * @internal
140
+ */
141
+ export function wickKernelSquaredNorm(tau, f, kernel, halfWidth = 20, cells = 4000) {
142
+ const dx = (2 * halfWidth) / cells;
143
+ let sum = 0;
144
+ for (let i = 0; i <= cells; i++) {
145
+ const v = kernel(-halfWidth + i * dx, tau, f.s, f.hbar, f.m);
146
+ sum += (i === 0 || i === cells ? 0.5 : 1) * v * v;
147
+ }
148
+ return sum * dx;
149
+ }
150
+ /**
151
+ * WD4 — `⟨x²⟩(t) / (2Dt)` for the Langevin model `m v̇ = −γv + ξ`,
152
+ * `⟨ξ(t)ξ(t′)⟩ = 2γ k_B T δ(t − t′)`, started from x = 0 with a thermalized
153
+ * velocity, at `t = resolution · τ_p` where `τ_p = m/γ`.
154
+ *
155
+ * The second moments are integrated from the LANGEVIN model's own moment
156
+ * equations, `d⟨x²⟩/dt = 2⟨xv⟩`, `d⟨xv⟩/dt = ⟨v²⟩ − (γ/m)⟨xv⟩`, with
157
+ * `⟨v²⟩ = k_B T/m` held at equipartition, by RK4 on a fine fixed grid. The
158
+ * diffusion coefficient `D = k_B T/γ` (Einstein) enters only the DENOMINATOR:
159
+ * the ratio tends to 1 in the diffusive regime `t ≫ τ_p`.
160
+ *
161
+ * @internal
162
+ */
163
+ export function langevinMsdRatio(resolution, f) {
164
+ const tauP = f.m / f.gamma;
165
+ const tEnd = resolution * tauP;
166
+ const v2 = f.kT / f.m;
167
+ const steps = Math.max(2000, Math.ceil(200 * resolution));
168
+ const h = tEnd / steps;
169
+ let x2 = 0;
170
+ let xv = 0;
171
+ const rhs = (xvNow) => [2 * xvNow, v2 - xvNow / tauP];
172
+ for (let n = 0; n < steps; n++) {
173
+ const [a1, b1] = rhs(xv);
174
+ const [a2, b2] = rhs(xv + 0.5 * h * b1);
175
+ const [a3, b3] = rhs(xv + 0.5 * h * b2);
176
+ const [a4, b4] = rhs(xv + h * b3);
177
+ x2 += (h / 6) * (a1 + 2 * a2 + 2 * a3 + a4);
178
+ xv += (h / 6) * (b1 + 2 * b2 + 2 * b3 + b4);
179
+ }
180
+ const D = f.kT / f.gamma;
181
+ return x2 / (2 * D * tEnd);
182
+ }
183
+ /**
184
+ * The slow decay rate of a Fourier mode of the TELEGRAPH equation
185
+ * `τ u_tt + u_t = D u_xx`, divided by the diffusion rate `D q²`:
186
+ * `(1 − √(1 − 4ε)) / (2ε)` with `ε = τ D q²`. Tends to 1 as τ → 0; complex
187
+ * (oscillatory) for `ε > 1/4`, where it returns NaN.
188
+ *
189
+ * @internal
190
+ */
191
+ export function telegraphSlowRateRatio(tau, D, q) {
192
+ const eps = tau * D * q * q;
193
+ if (eps === 0)
194
+ return 1;
195
+ const disc = 1 - 4 * eps;
196
+ if (disc < 0)
197
+ return Number.NaN;
198
+ return (1 - Math.sqrt(disc)) / (2 * eps);
199
+ }
200
+ /**
201
+ * The oscillation frequency of a telegraph mode in its underdamped range,
202
+ * divided by the undamped wave frequency `c q` with `c² = D/τ`:
203
+ * `√(1 − 1/(4ε))`, `ε = τ D q²`. Tends to 1 as ε grows.
204
+ *
205
+ * @internal
206
+ */
207
+ export function telegraphWaveFrequencyRatio(tau, D, q) {
208
+ const eps = tau * D * q * q;
209
+ if (eps <= 0.25)
210
+ return Number.NaN;
211
+ return Math.sqrt(1 - 1 / (4 * eps));
212
+ }
213
+ /**
214
+ * WD8 — the largest deviation from the LINEAR steady profile (the Laplace
215
+ * equation's solution) of an FTCS heat solution with fixed end temperatures,
216
+ * started from a profile with a sin(πx/ℓ) bump, at `t = resolution · t0`.
217
+ * Tends to zero as t → ∞: the steady state is the heat equation's attractor.
218
+ * `reference` replaces the linear profile the deviation is measured against.
219
+ *
220
+ * @internal
221
+ */
222
+ export function heatSteadyDeviation(resolution, f, reference) {
223
+ const nx = f.cells;
224
+ const dx = f.ell / nx;
225
+ const dtMax = (0.25 * dx * dx) / f.alpha;
226
+ const tEnd = resolution * f.t0;
227
+ const steps = Math.ceil(tEnd / dtMax);
228
+ const dt = tEnd / steps;
229
+ const r = (f.alpha * dt) / (dx * dx);
230
+ const linear = (i) => f.tLeft + ((f.tRight - f.tLeft) * i) / nx;
231
+ let u = new Float64Array(nx + 1);
232
+ let next = new Float64Array(nx + 1);
233
+ for (let i = 0; i <= nx; i++)
234
+ u[i] = linear(i) + Math.sin((Math.PI * i) / nx);
235
+ next[0] = f.tLeft;
236
+ next[nx] = f.tRight;
237
+ for (let n = 0; n < steps; n++) {
238
+ for (let i = 1; i < nx; i++)
239
+ next[i] = u[i] + r * (u[i + 1] - 2 * u[i] + u[i - 1]);
240
+ [u, next] = [next, u];
241
+ }
242
+ // The deviation is measured against `reference` when given — the negative
243
+ // control uses a WRONG steady state here — and against the linear Laplace
244
+ // profile otherwise. The solver itself never sees the reference.
245
+ const ref = reference ?? ((i) => linear(i));
246
+ let worst = 0;
247
+ for (let i = 0; i <= nx; i++)
248
+ worst = Math.max(worst, Math.abs(u[i] - ref(i, nx)));
249
+ return worst;
250
+ }
251
+ //# sourceMappingURL=numerics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"numerics.js","sourceRoot":"","sources":["../../../src/atlas/diffusion/numerics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS;IAC7D,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;AAC3E,CAAC;AAED,6EAA6E;AAC7E,SAAS,WAAW,CAAC,CAAS,EAAE,CAAS;IACvC,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;QAAE,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACpE,OAAO,CAAC,CAAC;AACX,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAAa,EAAE,CAAS,EAAE,CAAS;IAC1E,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,IAAI,CA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bound's own norm. Composing an outer
6
+ * map onto an inner one therefore gives
7
+ *
8
+ * (K_o, δ_o) ∘ (K_i, δ_i) = (K_o·K_i, K_o·δ_i + δ_o)
9
+ *
10
+ * which is associative and NOT commutative. `IDENTITY_BOUND` is the two-sided
11
+ * identity, so `(bounds, ∘, IDENTITY_BOUND)` is a monoid.
12
+ *
13
+ * An exact equivalence contributes `IDENTITY_BOUND` **in the norms these
14
+ * Phase 0 bridges state** — not in every norm (design note §9 YELLOW (a)).
15
+ *
16
+ * @module atlas/error-algebra
17
+ */
18
+ /** The `K`/`delta` pair an `ApproximationBound` composes through. @public */
19
+ export interface BoundPair {
20
+ readonly K: number;
21
+ readonly delta: number;
22
+ }
23
+ /** The two-sided identity of {@link composeBounds}: an exact, error-free map. @public */
24
+ export declare const IDENTITY_BOUND: BoundPair;
25
+ /**
26
+ * Compose two bounds, `outer` after `inner`.
27
+ *
28
+ * @public
29
+ */
30
+ export declare function composeBounds(outer: BoundPair, inner: BoundPair): BoundPair;
31
+ /** Result of {@link composeBoundPath}. @public */
32
+ export interface ComposedPath {
33
+ readonly bound: BoundPair;
34
+ /**
35
+ * True when the path ended on a step with no Lipschitz constant: `bound`
36
+ * covers the prefix, and nothing is claimed past the final step.
37
+ */
38
+ readonly terminal: boolean;
39
+ }
40
+ /**
41
+ * Fold a path of bounds in TRAVERSAL order — `[b1, b2]` means b1 then b2, so
42
+ * the composite is `b2 ∘ b1`.
43
+ *
44
+ * A `null` entry is a step whose Lipschitz constant is unknown. It is tolerated
45
+ * only as the LAST entry, where it terminates the claim; anywhere else the
46
+ * composite would be unbounded, and {@link MissingLipschitzError} is thrown
47
+ * rather than a number invented for it.
48
+ *
49
+ * @public
50
+ */
51
+ export declare function composeBoundPath(bounds: readonly (BoundPair | null)[]): ComposedPath;
52
+ //# sourceMappingURL=error-algebra.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-algebra.d.ts","sourceRoot":"","sources":["../../src/atlas/error-algebra.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,6EAA6E;AAC7E,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,yFAAyF;AACzF,eAAO,MAAM,cAAc,EAAE,SAA8B,CAAC;AAE5D;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,GAAG,SAAS,CAE3E;AAED,kDAAkD;AAClD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,CAAC,SAAS,GAAG,IAAI,CAAC,EAAE,GAAG,YAAY,CAgBpF"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * The Phase 0 error algebra: composition of Lipschitz-plus-offset bounds.
3
+ *
4
+ * With `∘` read as OUTER-AFTER-INNER, a bound `(K, δ)` states
5
+ * `|f(x) − f̃(x̃)| ≤ K|x − x̃| + δ` in the bound's own norm. Composing an outer
6
+ * map onto an inner one therefore gives
7
+ *
8
+ * (K_o, δ_o) ∘ (K_i, δ_i) = (K_o·K_i, K_o·δ_i + δ_o)
9
+ *
10
+ * which is associative and NOT commutative. `IDENTITY_BOUND` is the two-sided
11
+ * identity, so `(bounds, ∘, IDENTITY_BOUND)` is a monoid.
12
+ *
13
+ * An exact equivalence contributes `IDENTITY_BOUND` **in the norms these
14
+ * Phase 0 bridges state** — not in every norm (design note §9 YELLOW (a)).
15
+ *
16
+ * @module atlas/error-algebra
17
+ */
18
+ import { MissingLipschitzError } from './types.js';
19
+ /** The two-sided identity of {@link composeBounds}: an exact, error-free map. @public */
20
+ export const IDENTITY_BOUND = { K: 1, delta: 0 };
21
+ /**
22
+ * Compose two bounds, `outer` after `inner`.
23
+ *
24
+ * @public
25
+ */
26
+ export function composeBounds(outer, inner) {
27
+ return { K: outer.K * inner.K, delta: outer.K * inner.delta + outer.delta };
28
+ }
29
+ /**
30
+ * Fold a path of bounds in TRAVERSAL order — `[b1, b2]` means b1 then b2, so
31
+ * the composite is `b2 ∘ b1`.
32
+ *
33
+ * A `null` entry is a step whose Lipschitz constant is unknown. It is tolerated
34
+ * only as the LAST entry, where it terminates the claim; anywhere else the
35
+ * composite would be unbounded, and {@link MissingLipschitzError} is thrown
36
+ * rather than a number invented for it.
37
+ *
38
+ * @public
39
+ */
40
+ export function composeBoundPath(bounds) {
41
+ let acc = IDENTITY_BOUND;
42
+ for (let i = 0; i < bounds.length; i++) {
43
+ const step = bounds[i];
44
+ if (step === null) {
45
+ if (i !== bounds.length - 1) {
46
+ throw new MissingLipschitzError(`bound path has no Lipschitz constant at step ${i} of ${bounds.length}; ` +
47
+ 'an unknown constant is tolerated only as the final step');
48
+ }
49
+ return { bound: acc, terminal: true };
50
+ }
51
+ acc = composeBounds(step, acc);
52
+ }
53
+ return { bound: acc, terminal: false };
54
+ }
55
+ //# sourceMappingURL=error-algebra.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-algebra.js","sourceRoot":"","sources":["../../src/atlas/error-algebra.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAQnD,yFAAyF;AACzF,MAAM,CAAC,MAAM,cAAc,GAAc,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;AAE5D;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,KAAgB,EAAE,KAAgB;IAC9D,OAAO,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC;AAC9E,CAAC;AAYD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAqC;IACpE,IAAI,GAAG,GAAc,cAAc,CAAC;IACpC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACvC,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QACvB,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;YAClB,IAAI,CAAC,KAAK,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC5B,MAAM,IAAI,qBAAqB,CAC7B,gDAAgD,CAAC,OAAO,MAAM,CAAC,MAAM,IAAI;oBACvE,yDAAyD,CAC5D,CAAC;YACJ,CAAC;YACD,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QACxC,CAAC;QACD,GAAG,GAAG,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACjC,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;AACzC,CAAC"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Atlas Phase 6, S6.4 — the versioned export: one combined JSON artifact for
3
+ * every family, and a JSON-LD projection with stable ids, QUDT quantity kinds
4
+ * where they genuinely resolve, and PROV-O-shaped provenance.
5
+ *
6
+ * Design note: `docs/planning/Atlas-Phase-6-Design.md` §2.
7
+ *
8
+ * Pure: no I/O. The QUDT resolution table (`data/atlas/qudt-resolution.json`) is
9
+ * passed IN by the emitter, so this module cannot drift from the table it was
10
+ * given and never reads the tree.
11
+ *
12
+ * ## Why the QUDT table is keyed by (model, parameter), never by name
13
+ *
14
+ * `kappa` is a SPRING CONSTANT in `model-chain` and a THERMAL CONDUCTIVITY in
15
+ * `model-heat`. A name-keyed table would assign one of them the other's
16
+ * quantity kind — a notation collision in the atlas's own data.
17
+ *
18
+ * ## Schema version
19
+ *
20
+ * The combined artifact keeps `schemaVersion: '0'`. Phase 4 added one OPTIONAL
21
+ * field (`formalRef`); an additive optional field is not a breaking change, and
22
+ * the plan bumps to `v1` only on one.
23
+ *
24
+ * @module atlas/export
25
+ * @internal
26
+ */
27
+ import type { AtlasFamily } from './oscillators/index.js';
28
+ /** The QUDT resolution table: `"<model-id>/<parameter>"` → IRI, or null when none resolves. @internal */
29
+ export interface QudtResolution {
30
+ /** When and how the IRIs were checked. */
31
+ readonly probedAt: string;
32
+ readonly method: string;
33
+ readonly entries: Readonly<Record<string, string | null>>;
34
+ }
35
+ /** The stable id namespace. A URN, so no id depends on a host that could move. @internal */
36
+ export declare const ATLAS_ID_PREFIX = "urn:upt:atlas:";
37
+ /** The combined artifact: every family's record under one version stamp. @internal */
38
+ export declare function toCombinedAtlasJson(families: readonly AtlasFamily[], packageVersion: string): unknown;
39
+ /**
40
+ * The JSON-LD projection.
41
+ *
42
+ * @throws Error when a model parameter has NO entry in the resolution table — an
43
+ * unlisted parameter is a gap in the table, and exporting it silently blank
44
+ * would be indistinguishable from a deliberate "no QUDT kind resolves".
45
+ * @internal
46
+ */
47
+ export declare function toAtlasJsonLd(families: readonly AtlasFamily[], packageVersion: string, qudt: QudtResolution): unknown;
48
+ //# sourceMappingURL=export.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/atlas/export.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG1D,yGAAyG;AACzG,MAAM,WAAW,cAAc;IAC7B,0CAA0C;IAC1C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;CAC3D;AAED,4FAA4F;AAC5F,eAAO,MAAM,eAAe,mBAAmB,CAAC;AAKhD,sFAAsF;AACtF,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAYrG;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,SAAS,WAAW,EAAE,EAChC,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAsDT"}