universal-physics-tensor 0.47.1 → 1.0.1

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 (591) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +396 -383
  3. package/bin/upt.mjs +7 -1
  4. package/dist/atlas/benchmark/hybrid-retrieval.d.ts +108 -0
  5. package/dist/atlas/benchmark/hybrid-retrieval.d.ts.map +1 -0
  6. package/dist/atlas/benchmark/hybrid-retrieval.js +241 -0
  7. package/dist/atlas/benchmark/hybrid-retrieval.js.map +1 -0
  8. package/dist/atlas/catalog-formal-ref.d.ts +24 -0
  9. package/dist/atlas/catalog-formal-ref.d.ts.map +1 -0
  10. package/dist/atlas/catalog-formal-ref.js +36 -0
  11. package/dist/atlas/catalog-formal-ref.js.map +1 -0
  12. package/dist/atlas/composition-table.d.ts +11 -46
  13. package/dist/atlas/composition-table.d.ts.map +1 -1
  14. package/dist/atlas/composition-table.js +7 -124
  15. package/dist/atlas/composition-table.js.map +1 -1
  16. package/dist/atlas/conventions.d.ts +4 -58
  17. package/dist/atlas/conventions.d.ts.map +1 -1
  18. package/dist/atlas/conventions.js +3 -88
  19. package/dist/atlas/conventions.js.map +1 -1
  20. package/dist/atlas/derive-evidence.d.ts +50 -3
  21. package/dist/atlas/derive-evidence.d.ts.map +1 -1
  22. package/dist/atlas/derive-evidence.js +73 -4
  23. package/dist/atlas/derive-evidence.js.map +1 -1
  24. package/dist/atlas/diffusion/bridges-closure.d.ts.map +1 -1
  25. package/dist/atlas/diffusion/bridges-closure.js +5 -1
  26. package/dist/atlas/diffusion/bridges-closure.js.map +1 -1
  27. package/dist/atlas/index.d.ts +9 -7
  28. package/dist/atlas/index.d.ts.map +1 -1
  29. package/dist/atlas/index.js +6 -5
  30. package/dist/atlas/index.js.map +1 -1
  31. package/dist/atlas/oscillators/bridges-exact.d.ts.map +1 -1
  32. package/dist/atlas/oscillators/bridges-exact.js +6 -0
  33. package/dist/atlas/oscillators/bridges-exact.js.map +1 -1
  34. package/dist/atlas/oscillators/bridges-limits.d.ts +2 -0
  35. package/dist/atlas/oscillators/bridges-limits.d.ts.map +1 -1
  36. package/dist/atlas/oscillators/bridges-limits.js +11 -19
  37. package/dist/atlas/oscillators/bridges-limits.js.map +1 -1
  38. package/dist/atlas/oscillators/limit-witnesses.d.ts +93 -0
  39. package/dist/atlas/oscillators/limit-witnesses.d.ts.map +1 -0
  40. package/dist/atlas/oscillators/limit-witnesses.js +152 -0
  41. package/dist/atlas/oscillators/limit-witnesses.js.map +1 -0
  42. package/dist/atlas/oscillators/models.d.ts +2 -1
  43. package/dist/atlas/oscillators/models.d.ts.map +1 -1
  44. package/dist/atlas/oscillators/models.js +4 -3
  45. package/dist/atlas/oscillators/models.js.map +1 -1
  46. package/dist/atlas/oscillators/norm-transport-witness.d.ts +37 -0
  47. package/dist/atlas/oscillators/norm-transport-witness.d.ts.map +1 -0
  48. package/dist/atlas/oscillators/norm-transport-witness.js +58 -0
  49. package/dist/atlas/oscillators/norm-transport-witness.js.map +1 -0
  50. package/dist/atlas/oscillators/norm-transport.d.ts +44 -0
  51. package/dist/atlas/oscillators/norm-transport.d.ts.map +1 -0
  52. package/dist/atlas/oscillators/norm-transport.js +66 -0
  53. package/dist/atlas/oscillators/norm-transport.js.map +1 -0
  54. package/dist/atlas/oscillators/norms.d.ts +11 -0
  55. package/dist/atlas/oscillators/norms.d.ts.map +1 -0
  56. package/dist/atlas/oscillators/norms.js +11 -0
  57. package/dist/atlas/oscillators/norms.js.map +1 -0
  58. package/dist/atlas/oscillators/pendulum-motion.d.ts +38 -0
  59. package/dist/atlas/oscillators/pendulum-motion.d.ts.map +1 -0
  60. package/dist/atlas/oscillators/pendulum-motion.js +122 -0
  61. package/dist/atlas/oscillators/pendulum-motion.js.map +1 -0
  62. package/dist/atlas/oscillators/phase-carriage.d.ts +38 -0
  63. package/dist/atlas/oscillators/phase-carriage.d.ts.map +1 -0
  64. package/dist/atlas/oscillators/phase-carriage.js +96 -0
  65. package/dist/atlas/oscillators/phase-carriage.js.map +1 -0
  66. package/dist/atlas/oscillators/phase-translation.d.ts +46 -0
  67. package/dist/atlas/oscillators/phase-translation.d.ts.map +1 -0
  68. package/dist/atlas/oscillators/phase-translation.js +178 -0
  69. package/dist/atlas/oscillators/phase-translation.js.map +1 -0
  70. package/dist/atlas/oscillators/position-translation.d.ts +59 -0
  71. package/dist/atlas/oscillators/position-translation.d.ts.map +1 -0
  72. package/dist/atlas/oscillators/position-translation.js +254 -0
  73. package/dist/atlas/oscillators/position-translation.js.map +1 -0
  74. package/dist/atlas/path-bound.d.ts +126 -9
  75. package/dist/atlas/path-bound.d.ts.map +1 -1
  76. package/dist/atlas/path-bound.js +372 -23
  77. package/dist/atlas/path-bound.js.map +1 -1
  78. package/dist/atlas/physjs-ref.d.ts +112 -0
  79. package/dist/atlas/physjs-ref.d.ts.map +1 -0
  80. package/dist/atlas/physjs-ref.js +842 -0
  81. package/dist/atlas/physjs-ref.js.map +1 -0
  82. package/dist/atlas/regime.d.ts +12 -136
  83. package/dist/atlas/regime.d.ts.map +1 -1
  84. package/dist/atlas/regime.js +8 -254
  85. package/dist/atlas/regime.js.map +1 -1
  86. package/dist/atlas/serialize.d.ts.map +1 -1
  87. package/dist/atlas/serialize.js +25 -0
  88. package/dist/atlas/serialize.js.map +1 -1
  89. package/dist/atlas/translation-registry.d.ts +22 -0
  90. package/dist/atlas/translation-registry.d.ts.map +1 -0
  91. package/dist/atlas/translation-registry.js +31 -0
  92. package/dist/atlas/translation-registry.js.map +1 -0
  93. package/dist/atlas/translation.d.ts +116 -0
  94. package/dist/atlas/translation.d.ts.map +1 -0
  95. package/dist/atlas/translation.js +34 -0
  96. package/dist/atlas/translation.js.map +1 -0
  97. package/dist/atlas/types.d.ts +74 -240
  98. package/dist/atlas/types.d.ts.map +1 -1
  99. package/dist/atlas/types.js +5 -37
  100. package/dist/atlas/types.js.map +1 -1
  101. package/dist/atlas/waves/bridges-closure.d.ts.map +1 -1
  102. package/dist/atlas/waves/bridges-closure.js +4 -0
  103. package/dist/atlas/waves/bridges-closure.js.map +1 -1
  104. package/dist/atlas/waves/bridges.d.ts.map +1 -1
  105. package/dist/atlas/waves/bridges.js +3 -0
  106. package/dist/atlas/waves/bridges.js.map +1 -1
  107. package/dist/atlas/waves/models.js +1 -1
  108. package/dist/atlas/waves/models.js.map +1 -1
  109. package/dist/atlas/witness-dominance.d.ts +50 -0
  110. package/dist/atlas/witness-dominance.d.ts.map +1 -0
  111. package/dist/atlas/witness-dominance.js +86 -0
  112. package/dist/atlas/witness-dominance.js.map +1 -0
  113. package/dist/atlas/witness-specs.d.ts +30 -0
  114. package/dist/atlas/witness-specs.d.ts.map +1 -1
  115. package/dist/atlas/witness-specs.js +107 -0
  116. package/dist/atlas/witness-specs.js.map +1 -1
  117. package/dist/bridges/be53-yang-mills-confrontation.d.ts +81 -0
  118. package/dist/bridges/be53-yang-mills-confrontation.d.ts.map +1 -0
  119. package/dist/bridges/be53-yang-mills-confrontation.js +110 -0
  120. package/dist/bridges/be53-yang-mills-confrontation.js.map +1 -0
  121. package/dist/bridges/confrontations.d.ts +1 -1
  122. package/dist/bridges/confrontations.d.ts.map +1 -1
  123. package/dist/bridges/confrontations.js +291 -3
  124. package/dist/bridges/confrontations.js.map +1 -1
  125. package/dist/bridges/equations/be-13-einstein-trace.d.ts +2 -3
  126. package/dist/bridges/equations/be-13-einstein-trace.d.ts.map +1 -1
  127. package/dist/bridges/equations/be-13-einstein-trace.js +2 -3
  128. package/dist/bridges/equations/be-13-einstein-trace.js.map +1 -1
  129. package/dist/bridges/equations/be-38-mond.d.ts +7 -5
  130. package/dist/bridges/equations/be-38-mond.d.ts.map +1 -1
  131. package/dist/bridges/equations/be-38-mond.js +7 -5
  132. package/dist/bridges/equations/be-38-mond.js.map +1 -1
  133. package/dist/bridges/equations/be-53-yang-mills-beta.d.ts +21 -0
  134. package/dist/bridges/equations/be-53-yang-mills-beta.d.ts.map +1 -1
  135. package/dist/bridges/equations/be-53-yang-mills-beta.js +12 -0
  136. package/dist/bridges/equations/be-53-yang-mills-beta.js.map +1 -1
  137. package/dist/bridges/evaluator-inputs.d.ts +21 -0
  138. package/dist/bridges/evaluator-inputs.d.ts.map +1 -0
  139. package/dist/bridges/evaluator-inputs.js +75 -0
  140. package/dist/bridges/evaluator-inputs.js.map +1 -0
  141. package/dist/bridges/evaluators.d.ts +38 -0
  142. package/dist/bridges/evaluators.d.ts.map +1 -1
  143. package/dist/bridges/evaluators.js +41 -15
  144. package/dist/bridges/evaluators.js.map +1 -1
  145. package/dist/bridges/gravitational-lensing.d.ts +1 -1
  146. package/dist/bridges/gravitational-lensing.js +1 -1
  147. package/dist/bridges/index.d.ts +1 -1
  148. package/dist/bridges/index.d.ts.map +1 -1
  149. package/dist/bridges/index.js +13 -13
  150. package/dist/bridges/index.js.map +1 -1
  151. package/dist/bridges/observations/types.d.ts +110 -2
  152. package/dist/bridges/observations/types.d.ts.map +1 -1
  153. package/dist/bridges/observations/types.js +29 -0
  154. package/dist/bridges/observations/types.js.map +1 -1
  155. package/dist/bridges/perihelion-precession.d.ts +1 -1
  156. package/dist/bridges/perihelion-precession.js +1 -1
  157. package/dist/canonical/canonical-equation.d.ts +1 -1
  158. package/dist/canonical/canonical-equation.d.ts.map +1 -1
  159. package/dist/canonical/entries/atomic.d.ts.map +1 -1
  160. package/dist/canonical/entries/atomic.js +32 -10
  161. package/dist/canonical/entries/atomic.js.map +1 -1
  162. package/dist/canonical/entries/dimensional-classics.js +2 -2
  163. package/dist/canonical/entries/dimensional-classics.js.map +1 -1
  164. package/dist/canonical/entries/mechanics.d.ts.map +1 -1
  165. package/dist/canonical/entries/mechanics.js +10 -6
  166. package/dist/canonical/entries/mechanics.js.map +1 -1
  167. package/dist/canonical/entries/relativity.d.ts.map +1 -1
  168. package/dist/canonical/entries/relativity.js +41 -8
  169. package/dist/canonical/entries/relativity.js.map +1 -1
  170. package/dist/canonical/entries/thermo-nuclear-cosmo.js +5 -5
  171. package/dist/canonical/entries/thermo-nuclear-cosmo.js.map +1 -1
  172. package/dist/canonical/linkage.d.ts.map +1 -1
  173. package/dist/canonical/linkage.js +14 -8
  174. package/dist/canonical/linkage.js.map +1 -1
  175. package/dist/canonical/normal-form.d.ts +17 -0
  176. package/dist/canonical/normal-form.d.ts.map +1 -1
  177. package/dist/canonical/normal-form.js +21 -4
  178. package/dist/canonical/normal-form.js.map +1 -1
  179. package/dist/cases/brownian-sphere.d.ts +68 -0
  180. package/dist/cases/brownian-sphere.d.ts.map +1 -0
  181. package/dist/cases/brownian-sphere.js +353 -0
  182. package/dist/cases/brownian-sphere.js.map +1 -0
  183. package/dist/cases/damped-resonator.d.ts +23 -0
  184. package/dist/cases/damped-resonator.d.ts.map +1 -0
  185. package/dist/cases/damped-resonator.js +224 -0
  186. package/dist/cases/damped-resonator.js.map +1 -0
  187. package/dist/cases/index.d.ts +11 -0
  188. package/dist/cases/index.d.ts.map +1 -0
  189. package/dist/cases/index.js +29 -0
  190. package/dist/cases/index.js.map +1 -0
  191. package/dist/cases/kepler-rv.d.ts +13 -0
  192. package/dist/cases/kepler-rv.d.ts.map +1 -0
  193. package/dist/cases/kepler-rv.js +168 -0
  194. package/dist/cases/kepler-rv.js.map +1 -0
  195. package/dist/cases/lumped-cooling.d.ts +46 -0
  196. package/dist/cases/lumped-cooling.d.ts.map +1 -0
  197. package/dist/cases/lumped-cooling.js +261 -0
  198. package/dist/cases/lumped-cooling.js.map +1 -0
  199. package/dist/cases/quadrature.d.ts +14 -0
  200. package/dist/cases/quadrature.d.ts.map +1 -0
  201. package/dist/cases/quadrature.js +41 -0
  202. package/dist/cases/quadrature.js.map +1 -0
  203. package/dist/cases/resistor-noise.d.ts +14 -0
  204. package/dist/cases/resistor-noise.d.ts.map +1 -0
  205. package/dist/cases/resistor-noise.js +210 -0
  206. package/dist/cases/resistor-noise.js.map +1 -0
  207. package/dist/cases/skin-depth.d.ts +21 -0
  208. package/dist/cases/skin-depth.d.ts.map +1 -0
  209. package/dist/cases/skin-depth.js +174 -0
  210. package/dist/cases/skin-depth.js.map +1 -0
  211. package/dist/cases/types.d.ts +115 -0
  212. package/dist/cases/types.d.ts.map +1 -0
  213. package/dist/cases/types.js +20 -0
  214. package/dist/cases/types.js.map +1 -0
  215. package/dist/cli/commands/_atlas-map.d.ts +409 -0
  216. package/dist/cli/commands/_atlas-map.d.ts.map +1 -0
  217. package/dist/cli/commands/_atlas-map.js +1014 -0
  218. package/dist/cli/commands/_atlas-map.js.map +1 -0
  219. package/dist/cli/commands/_atlas-route.d.ts +111 -0
  220. package/dist/cli/commands/_atlas-route.d.ts.map +1 -0
  221. package/dist/cli/commands/_atlas-route.js +140 -0
  222. package/dist/cli/commands/_atlas-route.js.map +1 -0
  223. package/dist/cli/commands/_discovery-opts.d.ts.map +1 -1
  224. package/dist/cli/commands/_discovery-opts.js +10 -1
  225. package/dist/cli/commands/_discovery-opts.js.map +1 -1
  226. package/dist/cli/commands/atlas.d.ts +20 -0
  227. package/dist/cli/commands/atlas.d.ts.map +1 -1
  228. package/dist/cli/commands/atlas.js +333 -19
  229. package/dist/cli/commands/atlas.js.map +1 -1
  230. package/dist/cli/commands/audit.d.ts.map +1 -1
  231. package/dist/cli/commands/audit.js +12 -3
  232. package/dist/cli/commands/audit.js.map +1 -1
  233. package/dist/cli/commands/axes.js +4 -4
  234. package/dist/cli/commands/candidates.d.ts.map +1 -1
  235. package/dist/cli/commands/candidates.js +3 -2
  236. package/dist/cli/commands/candidates.js.map +1 -1
  237. package/dist/cli/commands/canonical.d.ts.map +1 -1
  238. package/dist/cli/commands/canonical.js +39 -10
  239. package/dist/cli/commands/canonical.js.map +1 -1
  240. package/dist/cli/commands/confront.d.ts.map +1 -1
  241. package/dist/cli/commands/confront.js +210 -28
  242. package/dist/cli/commands/confront.js.map +1 -1
  243. package/dist/cli/commands/connectors.d.ts.map +1 -1
  244. package/dist/cli/commands/connectors.js +5 -4
  245. package/dist/cli/commands/connectors.js.map +1 -1
  246. package/dist/cli/commands/coverage.js +3 -3
  247. package/dist/cli/commands/derive.d.ts.map +1 -1
  248. package/dist/cli/commands/derive.js +21 -9
  249. package/dist/cli/commands/derive.js.map +1 -1
  250. package/dist/cli/commands/discover.d.ts.map +1 -1
  251. package/dist/cli/commands/discover.js +149 -32
  252. package/dist/cli/commands/discover.js.map +1 -1
  253. package/dist/cli/commands/eval.d.ts.map +1 -1
  254. package/dist/cli/commands/eval.js +76 -17
  255. package/dist/cli/commands/eval.js.map +1 -1
  256. package/dist/cli/commands/evaluate.d.ts +30 -0
  257. package/dist/cli/commands/evaluate.d.ts.map +1 -1
  258. package/dist/cli/commands/evaluate.js +440 -25
  259. package/dist/cli/commands/evaluate.js.map +1 -1
  260. package/dist/cli/commands/explain.d.ts.map +1 -1
  261. package/dist/cli/commands/explain.js +38 -11
  262. package/dist/cli/commands/explain.js.map +1 -1
  263. package/dist/cli/commands/frontier.d.ts +3 -0
  264. package/dist/cli/commands/frontier.d.ts.map +1 -0
  265. package/dist/cli/commands/frontier.js +28 -0
  266. package/dist/cli/commands/frontier.js.map +1 -0
  267. package/dist/cli/commands/ground.d.ts.map +1 -1
  268. package/dist/cli/commands/ground.js +37 -12
  269. package/dist/cli/commands/ground.js.map +1 -1
  270. package/dist/cli/commands/index.d.ts +5 -0
  271. package/dist/cli/commands/index.d.ts.map +1 -1
  272. package/dist/cli/commands/index.js +5 -0
  273. package/dist/cli/commands/index.js.map +1 -1
  274. package/dist/cli/commands/map.d.ts +8 -0
  275. package/dist/cli/commands/map.d.ts.map +1 -1
  276. package/dist/cli/commands/map.js +385 -57
  277. package/dist/cli/commands/map.js.map +1 -1
  278. package/dist/cli/commands/metric.d.ts +3 -0
  279. package/dist/cli/commands/metric.d.ts.map +1 -0
  280. package/dist/cli/commands/metric.js +136 -0
  281. package/dist/cli/commands/metric.js.map +1 -0
  282. package/dist/cli/commands/path.d.ts +109 -1
  283. package/dist/cli/commands/path.d.ts.map +1 -1
  284. package/dist/cli/commands/path.js +1019 -109
  285. package/dist/cli/commands/path.js.map +1 -1
  286. package/dist/cli/commands/predict.d.ts.map +1 -1
  287. package/dist/cli/commands/predict.js +3 -2
  288. package/dist/cli/commands/predict.js.map +1 -1
  289. package/dist/cli/commands/priority.d.ts.map +1 -1
  290. package/dist/cli/commands/priority.js +3 -2
  291. package/dist/cli/commands/priority.js.map +1 -1
  292. package/dist/cli/commands/probe.d.ts +7 -0
  293. package/dist/cli/commands/probe.d.ts.map +1 -1
  294. package/dist/cli/commands/probe.js +234 -52
  295. package/dist/cli/commands/probe.js.map +1 -1
  296. package/dist/cli/commands/recover.d.ts.map +1 -1
  297. package/dist/cli/commands/recover.js +17 -6
  298. package/dist/cli/commands/recover.js.map +1 -1
  299. package/dist/cli/commands/regime.d.ts +1 -1
  300. package/dist/cli/commands/regime.d.ts.map +1 -1
  301. package/dist/cli/commands/regime.js +134 -33
  302. package/dist/cli/commands/regime.js.map +1 -1
  303. package/dist/cli/commands/retrieve.d.ts +3 -0
  304. package/dist/cli/commands/retrieve.d.ts.map +1 -0
  305. package/dist/cli/commands/retrieve.js +65 -0
  306. package/dist/cli/commands/retrieve.js.map +1 -0
  307. package/dist/cli/commands/search.d.ts +3 -0
  308. package/dist/cli/commands/search.d.ts.map +1 -0
  309. package/dist/cli/commands/search.js +70 -0
  310. package/dist/cli/commands/search.js.map +1 -0
  311. package/dist/cli/commands/symbolic.d.ts.map +1 -1
  312. package/dist/cli/commands/symbolic.js +107 -16
  313. package/dist/cli/commands/symbolic.js.map +1 -1
  314. package/dist/cli/commands/testplan.d.ts +3 -0
  315. package/dist/cli/commands/testplan.d.ts.map +1 -0
  316. package/dist/cli/commands/testplan.js +131 -0
  317. package/dist/cli/commands/testplan.js.map +1 -0
  318. package/dist/cli/conventions.d.ts +22 -0
  319. package/dist/cli/conventions.d.ts.map +1 -0
  320. package/dist/cli/conventions.js +48 -0
  321. package/dist/cli/conventions.js.map +1 -0
  322. package/dist/cli/euler-guard.d.ts +9 -0
  323. package/dist/cli/euler-guard.d.ts.map +1 -0
  324. package/dist/cli/euler-guard.js +11 -0
  325. package/dist/cli/euler-guard.js.map +1 -0
  326. package/dist/cli/eval-numbers.d.ts +26 -0
  327. package/dist/cli/eval-numbers.d.ts.map +1 -0
  328. package/dist/cli/eval-numbers.js +49 -0
  329. package/dist/cli/eval-numbers.js.map +1 -0
  330. package/dist/cli/expr-print.d.ts +25 -0
  331. package/dist/cli/expr-print.d.ts.map +1 -0
  332. package/dist/cli/expr-print.js +123 -0
  333. package/dist/cli/expr-print.js.map +1 -0
  334. package/dist/cli/graphs.d.ts +26 -0
  335. package/dist/cli/graphs.d.ts.map +1 -1
  336. package/dist/cli/graphs.js +19 -0
  337. package/dist/cli/graphs.js.map +1 -1
  338. package/dist/cli/main.d.ts +4 -10
  339. package/dist/cli/main.d.ts.map +1 -1
  340. package/dist/cli/main.js +370 -167
  341. package/dist/cli/main.js.map +1 -1
  342. package/dist/cli/map-evidence.d.ts +47 -0
  343. package/dist/cli/map-evidence.d.ts.map +1 -0
  344. package/dist/cli/map-evidence.js +53 -0
  345. package/dist/cli/map-evidence.js.map +1 -0
  346. package/dist/cli/output.d.ts +21 -1
  347. package/dist/cli/output.d.ts.map +1 -1
  348. package/dist/cli/output.js +5 -1
  349. package/dist/cli/output.js.map +1 -1
  350. package/dist/{composition → cli}/poster-source.d.ts +3 -2
  351. package/dist/cli/poster-source.d.ts.map +1 -0
  352. package/dist/{composition → cli}/poster-source.js +2 -1
  353. package/dist/cli/poster-source.js.map +1 -0
  354. package/dist/cli/record-reach.d.ts +44 -0
  355. package/dist/cli/record-reach.d.ts.map +1 -0
  356. package/dist/cli/record-reach.js +228 -0
  357. package/dist/cli/record-reach.js.map +1 -0
  358. package/dist/cli/record-tables.d.ts +38 -0
  359. package/dist/cli/record-tables.d.ts.map +1 -0
  360. package/dist/cli/record-tables.js +110 -0
  361. package/dist/cli/record-tables.js.map +1 -0
  362. package/dist/cli/record.d.ts +141 -0
  363. package/dist/cli/record.d.ts.map +1 -0
  364. package/dist/cli/record.js +612 -0
  365. package/dist/cli/record.js.map +1 -0
  366. package/dist/cli/search-index.d.ts +56 -0
  367. package/dist/cli/search-index.d.ts.map +1 -0
  368. package/dist/cli/search-index.js +190 -0
  369. package/dist/cli/search-index.js.map +1 -0
  370. package/dist/cli/statuses.d.ts +25 -0
  371. package/dist/cli/statuses.d.ts.map +1 -0
  372. package/dist/cli/statuses.js +276 -0
  373. package/dist/cli/statuses.js.map +1 -0
  374. package/dist/cli/version.d.ts +8 -0
  375. package/dist/cli/version.d.ts.map +1 -1
  376. package/dist/cli/version.js +32 -1
  377. package/dist/cli/version.js.map +1 -1
  378. package/dist/cli-api.d.ts +33 -15
  379. package/dist/cli-api.d.ts.map +1 -1
  380. package/dist/cli-api.js +31 -11
  381. package/dist/cli-api.js.map +1 -1
  382. package/dist/composition/bridge-analysis.d.ts.map +1 -1
  383. package/dist/composition/bridge-analysis.js +2 -1
  384. package/dist/composition/bridge-analysis.js.map +1 -1
  385. package/dist/composition/canonical-compare.d.ts +29 -16
  386. package/dist/composition/canonical-compare.d.ts.map +1 -1
  387. package/dist/composition/canonical-compare.js +355 -59
  388. package/dist/composition/canonical-compare.js.map +1 -1
  389. package/dist/composition/canonical-graph.d.ts +2 -2
  390. package/dist/composition/canonical-graph.js +3 -3
  391. package/dist/composition/canonical-graph.js.map +1 -1
  392. package/dist/composition/canonical-prefactors.d.ts +24 -1
  393. package/dist/composition/canonical-prefactors.d.ts.map +1 -1
  394. package/dist/composition/canonical-prefactors.js +97 -1
  395. package/dist/composition/canonical-prefactors.js.map +1 -1
  396. package/dist/composition/compose-symbolic.js +1 -1
  397. package/dist/composition/compose-symbolic.js.map +1 -1
  398. package/dist/composition/compose.d.ts.map +1 -1
  399. package/dist/composition/compose.js +17 -9
  400. package/dist/composition/compose.js.map +1 -1
  401. package/dist/composition/composition-recovery.d.ts +47 -0
  402. package/dist/composition/composition-recovery.d.ts.map +1 -0
  403. package/dist/composition/composition-recovery.js +77 -0
  404. package/dist/composition/composition-recovery.js.map +1 -0
  405. package/dist/composition/consequence.d.ts +39 -0
  406. package/dist/composition/consequence.d.ts.map +1 -1
  407. package/dist/composition/consequence.js +37 -0
  408. package/dist/composition/consequence.js.map +1 -1
  409. package/dist/composition/discovery.d.ts +20 -0
  410. package/dist/composition/discovery.d.ts.map +1 -1
  411. package/dist/composition/discovery.js +27 -5
  412. package/dist/composition/discovery.js.map +1 -1
  413. package/dist/composition/edge.d.ts +1 -1
  414. package/dist/composition/edge.d.ts.map +1 -1
  415. package/dist/composition/edge.js.map +1 -1
  416. package/dist/composition/edges/_catalog-helpers.d.ts +4 -0
  417. package/dist/composition/edges/_catalog-helpers.d.ts.map +1 -1
  418. package/dist/composition/edges/_catalog-helpers.js +15 -0
  419. package/dist/composition/edges/_catalog-helpers.js.map +1 -1
  420. package/dist/composition/edges/calibration.d.ts.map +1 -1
  421. package/dist/composition/edges/calibration.js +57 -0
  422. package/dist/composition/edges/calibration.js.map +1 -1
  423. package/dist/composition/edges/catalog-fields.d.ts.map +1 -1
  424. package/dist/composition/edges/catalog-fields.js +2 -1
  425. package/dist/composition/edges/catalog-fields.js.map +1 -1
  426. package/dist/composition/edges/catalog-gravitation-cosmology.d.ts.map +1 -1
  427. package/dist/composition/edges/catalog-gravitation-cosmology.js +2 -1
  428. package/dist/composition/edges/catalog-gravitation-cosmology.js.map +1 -1
  429. package/dist/composition/edges/catalog-quantum.d.ts.map +1 -1
  430. package/dist/composition/edges/catalog-quantum.js +26 -0
  431. package/dist/composition/edges/catalog-quantum.js.map +1 -1
  432. package/dist/composition/edges/catalog-tranche.d.ts.map +1 -1
  433. package/dist/composition/edges/catalog-tranche.js +2 -1
  434. package/dist/composition/edges/catalog-tranche.js.map +1 -1
  435. package/dist/composition/expr-eval.d.ts.map +1 -1
  436. package/dist/composition/expr-eval.js +4 -1
  437. package/dist/composition/expr-eval.js.map +1 -1
  438. package/dist/composition/expr-simplify.js +1 -1
  439. package/dist/composition/expr-simplify.js.map +1 -1
  440. package/dist/composition/frontier-account.d.ts +78 -0
  441. package/dist/composition/frontier-account.d.ts.map +1 -0
  442. package/dist/composition/frontier-account.js +127 -0
  443. package/dist/composition/frontier-account.js.map +1 -0
  444. package/dist/composition/graph-viz.d.ts +7 -22
  445. package/dist/composition/graph-viz.d.ts.map +1 -1
  446. package/dist/composition/graph-viz.js +4 -27
  447. package/dist/composition/graph-viz.js.map +1 -1
  448. package/dist/composition/grounding.d.ts +49 -0
  449. package/dist/composition/grounding.d.ts.map +1 -1
  450. package/dist/composition/grounding.js +38 -0
  451. package/dist/composition/grounding.js.map +1 -1
  452. package/dist/composition/index.d.ts +0 -2
  453. package/dist/composition/index.d.ts.map +1 -1
  454. package/dist/composition/index.js +1 -1
  455. package/dist/composition/index.js.map +1 -1
  456. package/dist/composition/probe/expression-gaps.d.ts +27 -0
  457. package/dist/composition/probe/expression-gaps.d.ts.map +1 -0
  458. package/dist/composition/probe/expression-gaps.js +47 -0
  459. package/dist/composition/probe/expression-gaps.js.map +1 -0
  460. package/dist/composition/probe/frontier.d.ts +2 -1
  461. package/dist/composition/probe/frontier.d.ts.map +1 -1
  462. package/dist/composition/probe/frontier.js +3 -2
  463. package/dist/composition/probe/frontier.js.map +1 -1
  464. package/dist/composition/probe/index.d.ts +4 -1
  465. package/dist/composition/probe/index.d.ts.map +1 -1
  466. package/dist/composition/probe/index.js +3 -1
  467. package/dist/composition/probe/index.js.map +1 -1
  468. package/dist/composition/probe/pipeline.d.ts +2 -0
  469. package/dist/composition/probe/pipeline.d.ts.map +1 -1
  470. package/dist/composition/probe/pipeline.js +6 -2
  471. package/dist/composition/probe/pipeline.js.map +1 -1
  472. package/dist/composition/probe/problem.d.ts +7 -0
  473. package/dist/composition/probe/problem.d.ts.map +1 -1
  474. package/dist/composition/probe/problem.js +15 -5
  475. package/dist/composition/probe/problem.js.map +1 -1
  476. package/dist/composition/probe/search-budget.d.ts.map +1 -1
  477. package/dist/composition/probe/search-budget.js +6 -2
  478. package/dist/composition/probe/search-budget.js.map +1 -1
  479. package/dist/composition/probe/study.d.ts +340 -0
  480. package/dist/composition/probe/study.d.ts.map +1 -0
  481. package/dist/composition/probe/study.js +1519 -0
  482. package/dist/composition/probe/study.js.map +1 -0
  483. package/dist/composition/proposed-bridges.js +1 -1
  484. package/dist/composition/proposed-bridges.js.map +1 -1
  485. package/dist/composition/quantities.d.ts +4 -16
  486. package/dist/composition/quantities.d.ts.map +1 -1
  487. package/dist/composition/quantities.js +4 -16
  488. package/dist/composition/quantities.js.map +1 -1
  489. package/dist/composition/retrodiction.d.ts.map +1 -1
  490. package/dist/composition/retrodiction.js +6 -2
  491. package/dist/composition/retrodiction.js.map +1 -1
  492. package/dist/composition/uncertainty.d.ts +1 -1
  493. package/dist/composition/uncertainty.d.ts.map +1 -1
  494. package/dist/composition/user-equation.d.ts +79 -8
  495. package/dist/composition/user-equation.d.ts.map +1 -1
  496. package/dist/composition/user-equation.js +224 -32
  497. package/dist/composition/user-equation.js.map +1 -1
  498. package/dist/core/constants.d.ts +9 -4
  499. package/dist/core/constants.d.ts.map +1 -1
  500. package/dist/core/constants.js +9 -4
  501. package/dist/core/constants.js.map +1 -1
  502. package/dist/core/types.d.ts +1 -1
  503. package/dist/core/types.d.ts.map +1 -1
  504. package/dist/core/types.js +2 -1
  505. package/dist/core/types.js.map +1 -1
  506. package/dist/dimensional/curvature.d.ts +7 -56
  507. package/dist/dimensional/curvature.d.ts.map +1 -1
  508. package/dist/dimensional/curvature.js +7 -76
  509. package/dist/dimensional/curvature.js.map +1 -1
  510. package/dist/dimensional/dimension-spec.d.ts +7 -1
  511. package/dist/dimensional/dimension-spec.d.ts.map +1 -1
  512. package/dist/dimensional/dimension-spec.js +131 -3
  513. package/dist/dimensional/dimension-spec.js.map +1 -1
  514. package/dist/dimensional/formula-names.d.ts +30 -0
  515. package/dist/dimensional/formula-names.d.ts.map +1 -0
  516. package/dist/dimensional/formula-names.js +37 -0
  517. package/dist/dimensional/formula-names.js.map +1 -0
  518. package/dist/dimensional/natural-units.d.ts +33 -0
  519. package/dist/dimensional/natural-units.d.ts.map +1 -0
  520. package/dist/dimensional/natural-units.js +58 -0
  521. package/dist/dimensional/natural-units.js.map +1 -0
  522. package/dist/{composition → dimensional}/symbolic-constants.d.ts +21 -2
  523. package/dist/dimensional/symbolic-constants.d.ts.map +1 -0
  524. package/dist/dimensional/symbolic-constants.js +116 -0
  525. package/dist/dimensional/symbolic-constants.js.map +1 -0
  526. package/dist/dimensional/unit-convention.d.ts +30 -0
  527. package/dist/dimensional/unit-convention.d.ts.map +1 -0
  528. package/dist/dimensional/unit-convention.js +60 -0
  529. package/dist/dimensional/unit-convention.js.map +1 -0
  530. package/dist/dimensional/units.d.ts +43 -0
  531. package/dist/dimensional/units.d.ts.map +1 -0
  532. package/dist/dimensional/units.js +197 -0
  533. package/dist/dimensional/units.js.map +1 -0
  534. package/dist/index.d.ts +8 -4
  535. package/dist/index.d.ts.map +1 -1
  536. package/dist/index.js +7 -3
  537. package/dist/index.js.map +1 -1
  538. package/dist/numerical/bianchi-residual.d.ts +55 -0
  539. package/dist/numerical/bianchi-residual.d.ts.map +1 -0
  540. package/dist/numerical/bianchi-residual.js +79 -0
  541. package/dist/numerical/bianchi-residual.js.map +1 -0
  542. package/dist/numerical/binding-value.d.ts +67 -0
  543. package/dist/numerical/binding-value.d.ts.map +1 -0
  544. package/dist/numerical/binding-value.js +347 -0
  545. package/dist/numerical/binding-value.js.map +1 -0
  546. package/dist/numerical/connection-lowering-helpers.d.ts.map +1 -1
  547. package/dist/numerical/connection-lowering-helpers.js +13 -26
  548. package/dist/numerical/connection-lowering-helpers.js.map +1 -1
  549. package/dist/numerical/curvature-lowering-helpers.d.ts.map +1 -1
  550. package/dist/numerical/curvature-lowering-helpers.js +9 -0
  551. package/dist/numerical/curvature-lowering-helpers.js.map +1 -1
  552. package/dist/numerical/float64-engine.d.ts.map +1 -1
  553. package/dist/numerical/float64-engine.js +23 -16
  554. package/dist/numerical/float64-engine.js.map +1 -1
  555. package/dist/numerical/formula-dimension.d.ts +7 -0
  556. package/dist/numerical/formula-dimension.d.ts.map +1 -1
  557. package/dist/numerical/formula-dimension.js +23 -6
  558. package/dist/numerical/formula-dimension.js.map +1 -1
  559. package/dist/numerical/formula-mathts.d.ts.map +1 -1
  560. package/dist/numerical/formula-mathts.js +68 -6
  561. package/dist/numerical/formula-mathts.js.map +1 -1
  562. package/dist/numerical/formula.d.ts +27 -0
  563. package/dist/numerical/formula.d.ts.map +1 -1
  564. package/dist/numerical/formula.js +68 -6
  565. package/dist/numerical/formula.js.map +1 -1
  566. package/dist/numerical/spacetime-metrics.d.ts +243 -0
  567. package/dist/numerical/spacetime-metrics.d.ts.map +1 -0
  568. package/dist/numerical/spacetime-metrics.js +1056 -0
  569. package/dist/numerical/spacetime-metrics.js.map +1 -0
  570. package/dist/relations/composition-table.d.ts +61 -0
  571. package/dist/relations/composition-table.d.ts.map +1 -0
  572. package/dist/relations/composition-table.js +140 -0
  573. package/dist/relations/composition-table.js.map +1 -0
  574. package/dist/relations/conventions.d.ts +63 -0
  575. package/dist/relations/conventions.d.ts.map +1 -0
  576. package/dist/relations/conventions.js +93 -0
  577. package/dist/relations/conventions.js.map +1 -0
  578. package/dist/relations/regime.d.ts +159 -0
  579. package/dist/relations/regime.d.ts.map +1 -0
  580. package/dist/relations/regime.js +304 -0
  581. package/dist/relations/regime.js.map +1 -0
  582. package/dist/relations/types.d.ts +259 -0
  583. package/dist/relations/types.d.ts.map +1 -0
  584. package/dist/relations/types.js +37 -0
  585. package/dist/relations/types.js.map +1 -0
  586. package/package.json +166 -163
  587. package/dist/composition/poster-source.d.ts.map +0 -1
  588. package/dist/composition/poster-source.js.map +0 -1
  589. package/dist/composition/symbolic-constants.d.ts.map +0 -1
  590. package/dist/composition/symbolic-constants.js +0 -65
  591. package/dist/composition/symbolic-constants.js.map +0 -1
@@ -0,0 +1,178 @@
1
+ /**
2
+ * `ab-pendulum-linear`'s declared translation from its bound's quantity, the
3
+ * relative period error, into the accumulated PHASE error.
4
+ *
5
+ * Both motions start from rest at θ0 at t = 0. The phase is the angle
6
+ * variable: 0 at release and advancing by 2π per period, uniformly in time,
7
+ * so the pendulum's is 2π t/T and the linear oscillator's 2π t/T0. With the
8
+ * bound's `ε = T/T0 − 1` (normalised by the reduced model's period),
9
+ *
10
+ * Δφ(t) = 2π t/T0 − 2π t/T = 2π (t/T0) · ε/(1 + ε),
11
+ *
12
+ * which reaches a tolerance Δ at `t* = Δ · T0 · (1 + ε)/(2π ε)`. Nothing is
13
+ * truncated: the map is exact in ε, and ε itself is the bound's closed form.
14
+ *
15
+ * It is NOT a bound on the pointwise position error |θ(t) − θ_lin(t)|: the
16
+ * pendulum's waveform carries a third harmonic of amplitude ≈ θ0³/192, which
17
+ * is not a phase, and the position error at a given phase error depends on
18
+ * where in the cycle the observation falls.
19
+ *
20
+ * The witness W7p integrates BOTH equations of motion and reads each phase off
21
+ * its zero crossings — crossing k is at phase π/2 + kπ by the symmetry of a
22
+ * release from rest, and the angle variable is linear in time between them —
23
+ * so it measures the drift without using ε or the elliptic integral. It runs
24
+ * at the fixture θ0 = 0.2 as the regression anchor, and again at the caller's
25
+ * point, bounded to 512 T0 of integration (`phasePointCheck`).
26
+ *
27
+ * @module atlas/oscillators/phase-translation
28
+ * @internal
29
+ */
30
+ import { pendulumPeriodErrorAt } from './bridges-limits.js';
31
+ import { crossingTimes, linearAccel, pendulumAccel, phaseAt, theta0OfPeriodError } from './pendulum-motion.js';
32
+ const TWO_PI = 2 * Math.PI;
33
+ /**
34
+ * The time, in units of T0, at which the MEASURED phase lead of the linear
35
+ * oscillator over the pendulum first reaches `tolerance` rad, both integrated
36
+ * by RK4 at `stepsPerPeriod` steps of T0.
37
+ *
38
+ * @returns NaN if the drift does not reach `tolerance` within 2^16 periods.
39
+ * @internal
40
+ */
41
+ export function measurePhaseHorizon(theta0, tolerance, stepsPerPeriod) {
42
+ for (let periods = 16; periods <= 2 ** 16; periods *= 2) {
43
+ const t = measurePhaseHorizonWithin(theta0, tolerance, stepsPerPeriod, periods);
44
+ if (!Number.isNaN(t))
45
+ return t;
46
+ }
47
+ return Number.NaN;
48
+ }
49
+ /** As `measurePhaseHorizon`, over exactly `periods` of T0; NaN if the drift does not reach `tolerance` in them. @internal */
50
+ export function measurePhaseHorizonWithin(theta0, tolerance, stepsPerPeriod, periods) {
51
+ const pend = crossingTimes(pendulumAccel, theta0, stepsPerPeriod, periods);
52
+ const lin = crossingTimes(linearAccel, theta0, stepsPerPeriod, periods);
53
+ let prevT = 0;
54
+ let prevDrift = 0;
55
+ for (let k = 0; k < pend.length; k++) {
56
+ const c = pend[k];
57
+ const drift = phaseAt(lin, c) - (Math.PI / 2 + k * Math.PI);
58
+ if (!Number.isFinite(drift))
59
+ break;
60
+ if (drift >= tolerance)
61
+ return prevT + ((tolerance - prevDrift) * (c - prevT)) / (drift - prevDrift);
62
+ prevT = c;
63
+ prevDrift = drift;
64
+ }
65
+ return Number.NaN;
66
+ }
67
+ /** `t* = Δ T0 (1+ε)/(2π ε)`; `Infinity` at ε = 0, where no phase accumulates. */
68
+ function phaseHorizon(eps, tolerance, T0) {
69
+ if (T0 === undefined || !Number.isFinite(T0) || T0 <= 0 || !Number.isFinite(eps) || eps < 0)
70
+ return Number.NaN;
71
+ return eps === 0 ? Infinity : (tolerance * T0 * (1 + eps)) / (TWO_PI * eps);
72
+ }
73
+ const W7P_THETA0 = 0.2;
74
+ const W7P_TOLERANCE = 1;
75
+ /** The point witness integrates at most this many periods of T0, so its cost is bounded. */
76
+ export const PHASE_POINT_MAX_PERIODS = 512;
77
+ /**
78
+ * The point witness measures the time to this much drift, or to the drift
79
+ * reached at the cap if less: the map is linear in t, so its slope is what is
80
+ * checked, whatever tolerance the caller asked about.
81
+ */
82
+ const PHASE_POINT_DRIFT = 1;
83
+ /**
84
+ * Below this measured drift the rounding noise of the two motions' crossing
85
+ * times comes within a factor of ten of the witness tolerance. With the
86
+ * crossings located by `crossingTimes`' secant refinement, the fine error was
87
+ * measured at 800 steps per T0 as 1.5e-8 relative at 1.1e-5 rad of drift,
88
+ * 7.4e-9 at 7.2e-5 rad, 2.5e-9 at 2.0e-4 rad and 2.4e-10 to 9.2e-10 from
89
+ * 2e-2 rad up. With the straight-line crossings it replaced, the same error
90
+ * was 9.5e-6 relative at 2e-4 rad and 1.2e-7 at 2e-2 rad.
91
+ */
92
+ const PHASE_POINT_MIN_DRIFT = 1e-4;
93
+ /**
94
+ * The (1+ε) control differs from the target by ε/(1+ε) relative, so it can be
95
+ * refuted only where ε exceeds this tolerance (θ0 above about 9e-4).
96
+ */
97
+ const PHASE_POINT_RELATIVE_TOLERANCE = 5e-8;
98
+ /**
99
+ * W7p at the caller's θ0 (recovered from ε) instead of the fixture: the time
100
+ * the measured drift reaches min(1 rad, the drift at the cap), within
101
+ * PHASE_POINT_RELATIVE_TOLERANCE of the closed form. Its control is the same measurement against
102
+ * the horizon without the (1+ε) factor, which differs from the target by
103
+ * ε/(1+ε) relative — so the control can fail only where that exceeds the
104
+ * witness tolerance, and the caller is told when it does not.
105
+ */
106
+ function phasePointCheck(eps) {
107
+ if (!Number.isFinite(eps) || eps <= 0)
108
+ return { unavailable: `no phase drift accumulates at ε = ${eps}` };
109
+ const theta0 = theta0OfPeriodError(eps);
110
+ const measured = Math.min(PHASE_POINT_DRIFT, (TWO_PI * PHASE_POINT_MAX_PERIODS * eps) / (1 + eps));
111
+ if (measured < PHASE_POINT_MIN_DRIFT) {
112
+ return {
113
+ unavailable: `the drift within ${PHASE_POINT_MAX_PERIODS} T0 at θ0 = ${Number(theta0.toPrecision(8))} is ${measured} rad, below the ` +
114
+ `${PHASE_POINT_MIN_DRIFT} rad this witness resolves; not run`,
115
+ };
116
+ }
117
+ const target = phaseHorizon(eps, measured, 1);
118
+ const periods = Math.ceil(target) + 2;
119
+ const evaluate = (stepsPerPeriod) => measurePhaseHorizonWithin(theta0, measured, stepsPerPeriod, periods);
120
+ const spec = { evaluate, coarseResolution: 200, fineResolution: 800, tolerance: PHASE_POINT_RELATIVE_TOLERANCE * target };
121
+ const capped = measured < PHASE_POINT_DRIFT ? ` (the drift reached in ${PHASE_POINT_MAX_PERIODS} T0)` : '';
122
+ return {
123
+ claim: `RK4-measured time to ${measured} rad${capped} of phase drift at θ0 = ${Number(theta0.toPrecision(8))} (recovered from ε) ` +
124
+ `within ${PHASE_POINT_RELATIVE_TOLERANCE} relative of t* = ${target} T0; 200 and 800 steps per T0, ${periods} T0 integrated`,
125
+ check: { id: 'W7p@point', ...spec, target },
126
+ control: { id: 'W7p@point-control', ...spec, target: measured / (TWO_PI * eps) },
127
+ controlClaim: 'the same measurement against the horizon without the (1+ε) factor, Δ T0/(2π ε)',
128
+ };
129
+ }
130
+ /** @internal */
131
+ export const PENDULUM_PHASE_TRANSLATION = {
132
+ bridgeId: 'ab-pendulum-linear',
133
+ observable: 'phase',
134
+ unit: 'rad',
135
+ fromNorm: 'relative period error, normalized by the value of the reduced model',
136
+ errorKind: 'exact',
137
+ definition: 'the angle variable of each motion (0 at release from rest at θ0, 2π per period); the error is the ' +
138
+ "linear oscillator's lead over the pendulum, Δφ(t) = 2πt/T0 − 2πt/T",
139
+ derivation: 'with ε = T/T0 − 1, Δφ(t) = 2π (t/T0) ε/(1+ε), exact in ε; it reaches Δ at t* = Δ T0 (1+ε)/(2π ε). ' +
140
+ 'ε/(1+ε) increases with ε, so the domain supremum of ε gives the shortest horizon over the domain',
141
+ premises: [
142
+ 'both motions are released from rest at the same θ0 at t = 0',
143
+ 'T0 = 2π √(ℓ/g) is the linear period, in the unit t is given in',
144
+ ],
145
+ parameters: ['T0'],
146
+ timeUnit: 'the unit of T0',
147
+ errorAt: (eps, t, { T0 }) => {
148
+ if (T0 === undefined || !Number.isFinite(T0) || T0 <= 0 || !Number.isFinite(eps) || !Number.isFinite(t))
149
+ return Number.NaN;
150
+ return (TWO_PI * (t / T0) * eps) / (1 + eps);
151
+ },
152
+ horizonFor: (eps, tolerance, { T0 }) => phaseHorizon(eps, tolerance, T0),
153
+ boundary: 'inclusive: adequate iff t ≤ t*, i.e. Δφ(t) ≤ the tolerance',
154
+ notCovered: [
155
+ 'the pointwise position error |θ(t) − θ_lin(t)| (the waveform carries a third harmonic ≈ θ0³/192 that is not a phase)',
156
+ 'the amplitude',
157
+ ],
158
+ witnesses: [
159
+ {
160
+ id: 'W7p',
161
+ kind: 'numeric',
162
+ test: 'tests/atlas/pendulum-phase-translation.test.ts',
163
+ tolerance: `RK4-measured time to ${W7P_TOLERANCE} rad of phase drift at θ0 = ${W7P_THETA0} within 1e-4 T0 of t*`,
164
+ },
165
+ ],
166
+ checks: [
167
+ {
168
+ id: 'W7p',
169
+ evaluate: (stepsPerPeriod) => measurePhaseHorizon(W7P_THETA0, W7P_TOLERANCE, stepsPerPeriod),
170
+ target: phaseHorizon(pendulumPeriodErrorAt({ theta0: W7P_THETA0 }), W7P_TOLERANCE, 1),
171
+ coarseResolution: 50,
172
+ fineResolution: 200,
173
+ tolerance: 1e-4,
174
+ },
175
+ ],
176
+ pointCheck: phasePointCheck,
177
+ };
178
+ //# sourceMappingURL=phase-translation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phase-translation.js","sourceRoot":"","sources":["../../../src/atlas/oscillators/phase-translation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAGH,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE/G,MAAM,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAE3B;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAc,EAAE,SAAiB,EAAE,cAAsB;IAC3F,KAAK,IAAI,OAAO,GAAG,EAAE,EAAE,OAAO,IAAI,CAAC,IAAI,EAAE,EAAE,OAAO,IAAI,CAAC,EA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,EAAE,EAAE,CAAC,mBAAmB,CAAC,UAAU,EAAE,aAAa,EAAE,cAAc,CAAC;YAC5F,MAAM,EAAE,YAAY,CAAC,qBAAqB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC;YACrF,gBAAgB,EAAE,EAAE;YACpB,cAAc,EAAE,GAAG;YACnB,SAAS,EAAE,IAAI;SAChB;KACF;IACD,UAAU,EAAE,eAAe;CAC5B,CAAC"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * `ab-pendulum-linear`'s declared translation from its bound's quantity, the
3
+ * relative period error ε, into an UPPER BOUND on the pointwise position error
4
+ * |θ(t) − θ_lin(t)|, in rad.
5
+ *
6
+ * Both motions start from rest at θ0. The pendulum is θ(t) = F(φ), φ = 2πt/T,
7
+ * with the classical Fourier series of the elliptic solution
8
+ *
9
+ * F(φ) = Σ_{n≥0} (−1)ⁿ aₙ cos((2n+1)φ), aₙ = 8 q^{n+½} / ((2n+1)(1 + q^{2n+1})),
10
+ *
11
+ * q the nome of k = sin(θ0/2); F(0) = θ0 = Σ (−1)ⁿ aₙ. The linear motion is
12
+ * θ0 cos φ_lin, φ_lin = 2πt/T0. Splitting at θ0 cos φ,
13
+ *
14
+ * |θ − θ_lin| ≤ |F(φ) − θ0 cos φ| + θ0 |cos φ − cos φ_lin|
15
+ * ≤ 2 Σ_{n≥1} aₙ + 2θ0 |sin(Δφ/2)|,
16
+ *
17
+ * because F(φ) − θ0 cos φ = Σ_{n≥1} (−1)ⁿ aₙ (cos((2n+1)φ) − cos φ). With
18
+ * aₙ ≤ (8/3) q^{n+½} for n ≥ 1 the first term is at most
19
+ * W̄ = (16/3) q^{3/2}/(1 − q) ≈ θ0³/96, and Δφ = 2π(t/T0) ε/(1+ε) is the
20
+ * exact phase lead of `phase-translation.ts`. So
21
+ *
22
+ * B(t) = W̄ + 2θ0 sin(min(Δφ(t), π)/2)
23
+ *
24
+ * bounds the error at every t; the clamp at π keeps B non-decreasing in t and
25
+ * is still a bound, since |cos a − cos b| ≤ 2. It is rigorous GIVEN the
26
+ * Fourier series, which is quoted, not derived here. Witness W7xs checks the
27
+ * series against RK4 over one period at each θ0 of a grid across the domain;
28
+ * that is a check at those points, not a derivation.
29
+ *
30
+ * B is an upper bound, not the error: past its horizon the BOUND exceeds the
31
+ * tolerance, and the error may not. It is near-sharp where Δφ → π (the
32
+ * motions are in antiphase and the error reaches 2θ0), and the waveform term
33
+ * cannot be dropped: without W̄, RK4 finds the error above 2θ0 sin(Δφ/2) by
34
+ * about 3% (witness control).
35
+ *
36
+ * @module atlas/oscillators/position-translation
37
+ * @internal
38
+ */
39
+ import type { ObservableTranslation } from '../translation.js';
40
+ import type { NumericWitnessSpec } from '../witness-numeric.js';
41
+ /** W̄ = (16/3) q^{3/2}/(1 − q): the bound on the waveform distortion |F(φ) − θ0 cos φ|. @internal */
42
+ export declare function waveformBound(theta0: number): number;
43
+ /** The pendulum's fundamental Fourier coefficient a₀ = 8√q/(1 + q). @internal */
44
+ export declare function fundamentalCoefficient(theta0: number): number;
45
+ /** The point witness integrates at most this many periods of T0. */
46
+ export declare const POSITION_POINT_MAX_PERIODS = 512;
47
+ /** a₀ measured by projecting one RK4 pendulum period onto cos φ (trapezoid, exact for a periodic integrand). */
48
+ export declare function measureFundamental(theta0: number, stepsPerPeriod: number): number;
49
+ /** The θ0 at which W7xs checks the Fourier series: a grid across the bridge's domain θ0 ≤ 0.5. @internal */
50
+ export declare const FOURIER_SERIES_THETA0S: readonly number[];
51
+ /**
52
+ * W7xs, or its control: the Fourier series against RK4 of the pendulum, at 200
53
+ * and 800 steps per period, within 1e-9 rad at every step and every grid θ0.
54
+ * @internal
55
+ */
56
+ export declare function fourierSeriesCheck(id: string, variant?: 'plus' | 'minus'): NumericWitnessSpec;
57
+ /** @internal */
58
+ export declare const PENDULUM_POSITION_TRANSLATION: ObservableTranslation;
59
+ //# sourceMappingURL=position-translation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"position-translation.d.ts","sourceRoot":"","sources":["../../../src/atlas/oscillators/position-translation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAMhE,qGAAqG;AACrG,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAGpD;AAED,iFAAiF;AACjF,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAG7D;AAsBD,oEAAoE;AACpE,eAAO,MAAM,0BAA0B,MAAM,CAAC;AA8C9C,gHAAgH;AAChH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,MAAM,CAWjF;AAED,4GAA4G;AAC5G,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAAoC,CAAC;AAmCzF;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,MAAM,GAAG,OAAgB,GAAG,kBAAkB,CASrG;AA6BD,gBAAgB;AAChB,eAAO,MAAM,6BAA6B,EAAE,qBAqD3C,CAAC"}
@@ -0,0 +1,254 @@
1
+ /**
2
+ * `ab-pendulum-linear`'s declared translation from its bound's quantity, the
3
+ * relative period error ε, into an UPPER BOUND on the pointwise position error
4
+ * |θ(t) − θ_lin(t)|, in rad.
5
+ *
6
+ * Both motions start from rest at θ0. The pendulum is θ(t) = F(φ), φ = 2πt/T,
7
+ * with the classical Fourier series of the elliptic solution
8
+ *
9
+ * F(φ) = Σ_{n≥0} (−1)ⁿ aₙ cos((2n+1)φ), aₙ = 8 q^{n+½} / ((2n+1)(1 + q^{2n+1})),
10
+ *
11
+ * q the nome of k = sin(θ0/2); F(0) = θ0 = Σ (−1)ⁿ aₙ. The linear motion is
12
+ * θ0 cos φ_lin, φ_lin = 2πt/T0. Splitting at θ0 cos φ,
13
+ *
14
+ * |θ − θ_lin| ≤ |F(φ) − θ0 cos φ| + θ0 |cos φ − cos φ_lin|
15
+ * ≤ 2 Σ_{n≥1} aₙ + 2θ0 |sin(Δφ/2)|,
16
+ *
17
+ * because F(φ) − θ0 cos φ = Σ_{n≥1} (−1)ⁿ aₙ (cos((2n+1)φ) − cos φ). With
18
+ * aₙ ≤ (8/3) q^{n+½} for n ≥ 1 the first term is at most
19
+ * W̄ = (16/3) q^{3/2}/(1 − q) ≈ θ0³/96, and Δφ = 2π(t/T0) ε/(1+ε) is the
20
+ * exact phase lead of `phase-translation.ts`. So
21
+ *
22
+ * B(t) = W̄ + 2θ0 sin(min(Δφ(t), π)/2)
23
+ *
24
+ * bounds the error at every t; the clamp at π keeps B non-decreasing in t and
25
+ * is still a bound, since |cos a − cos b| ≤ 2. It is rigorous GIVEN the
26
+ * Fourier series, which is quoted, not derived here. Witness W7xs checks the
27
+ * series against RK4 over one period at each θ0 of a grid across the domain;
28
+ * that is a check at those points, not a derivation.
29
+ *
30
+ * B is an upper bound, not the error: past its horizon the BOUND exceeds the
31
+ * tolerance, and the error may not. It is near-sharp where Δφ → π (the
32
+ * motions are in antiphase and the error reaches 2θ0), and the waveform term
33
+ * cannot be dropped: without W̄, RK4 finds the error above 2θ0 sin(Δφ/2) by
34
+ * about 3% (witness control).
35
+ *
36
+ * @module atlas/oscillators/position-translation
37
+ * @internal
38
+ */
39
+ import { pendulumPeriodErrorAt } from './bridges-limits.js';
40
+ import { linearAccel, pendulumAccel, pendulumNome, rk4Step, theta0OfPeriodError } from './pendulum-motion.js';
41
+ const TWO_PI = 2 * Math.PI;
42
+ /** W̄ = (16/3) q^{3/2}/(1 − q): the bound on the waveform distortion |F(φ) − θ0 cos φ|. @internal */
43
+ export function waveformBound(theta0) {
44
+ const q = pendulumNome(theta0);
45
+ return ((16 / 3) * q ** 1.5) / (1 - q);
46
+ }
47
+ /** The pendulum's fundamental Fourier coefficient a₀ = 8√q/(1 + q). @internal */
48
+ export function fundamentalCoefficient(theta0) {
49
+ const q = pendulumNome(theta0);
50
+ return (8 * Math.sqrt(q)) / (1 + q);
51
+ }
52
+ const lead = (eps, tOverT0) => (TWO_PI * tOverT0 * eps) / (1 + eps);
53
+ /** B(t/T0) at θ0 recovered from ε; `drift` and `waveform` scale its two terms (1, 1 is B itself). */
54
+ function positionBound(eps, drift = 1, waveform = 1) {
55
+ const theta0 = theta0OfPeriodError(eps);
56
+ const floor = waveform * waveformBound(theta0);
57
+ return (tOverT0) => floor + drift * 2 * theta0 * Math.sin(Math.min(lead(eps, tOverT0), Math.PI) / 2);
58
+ }
59
+ function positionHorizon(eps, tolerance, T0) {
60
+ if (T0 === undefined || !Number.isFinite(T0) || T0 <= 0 || !Number.isFinite(eps) || eps < 0)
61
+ return Number.NaN;
62
+ if (eps === 0)
63
+ return Infinity;
64
+ const theta0 = theta0OfPeriodError(eps);
65
+ const floor = waveformBound(theta0);
66
+ if (tolerance < floor)
67
+ return Number.NaN;
68
+ const r = (tolerance - floor) / (2 * theta0);
69
+ if (r >= 1)
70
+ return Infinity;
71
+ return (2 * Math.asin(r) * T0 * (1 + eps)) / (TWO_PI * eps);
72
+ }
73
+ /** The point witness integrates at most this many periods of T0. */
74
+ export const POSITION_POINT_MAX_PERIODS = 512;
75
+ /** Samples per T0 both resolutions report at. */
76
+ const SAMPLES_PER_PERIOD = 200;
77
+ /**
78
+ * |θ(t) − θ_lin(t)| from RK4 of both motions, and B(t) at the same samples,
79
+ * over `periods` of T0; `stepsPerPeriod` must be a multiple of 200.
80
+ */
81
+ function dominanceSamples(theta0, periods, stepsPerPeriod, bound) {
82
+ const stride = stepsPerPeriod / SAMPLES_PER_PERIOD;
83
+ const h = 1 / stepsPerPeriod;
84
+ const measured = [];
85
+ const b = [];
86
+ let x = theta0;
87
+ let v = 0;
88
+ let y = theta0;
89
+ let u = 0;
90
+ const steps = Math.floor(periods * SAMPLES_PER_PERIOD) * stride;
91
+ for (let i = 1; i <= steps; i++) {
92
+ [x, v] = rk4Step(x, v, h, pendulumAccel);
93
+ [y, u] = rk4Step(y, u, h, linearAccel);
94
+ if (i % stride === 0) {
95
+ measured.push(Math.abs(x - y));
96
+ b.push(bound(i * h));
97
+ }
98
+ }
99
+ return { measured, bound: b };
100
+ }
101
+ /** The window a dominance witness covers: up to antiphase (Δφ = π), past which B ≥ 2θ0 holds trivially, capped. */
102
+ function dominanceWindow(eps) {
103
+ return Math.min(POSITION_POINT_MAX_PERIODS, (1 + eps) / (2 * eps));
104
+ }
105
+ function dominanceSpec(id, eps, drift, waveform) {
106
+ const theta0 = theta0OfPeriodError(eps);
107
+ const periods = dominanceWindow(eps);
108
+ return {
109
+ id,
110
+ kind: 'dominance',
111
+ evaluate: (stepsPerPeriod) => dominanceSamples(theta0, periods, stepsPerPeriod, positionBound(eps, drift, waveform)),
112
+ coarseResolution: 200,
113
+ fineResolution: 800,
114
+ };
115
+ }
116
+ /** a₀ measured by projecting one RK4 pendulum period onto cos φ (trapezoid, exact for a periodic integrand). */
117
+ export function measureFundamental(theta0, stepsPerPeriod) {
118
+ const T = 1 + pendulumPeriodErrorAt({ theta0 });
119
+ const h = T / stepsPerPeriod;
120
+ let x = theta0;
121
+ let v = 0;
122
+ let sum = theta0;
123
+ for (let i = 1; i < stepsPerPeriod; i++) {
124
+ [x, v] = rk4Step(x, v, h, pendulumAccel);
125
+ sum += x * Math.cos((TWO_PI * i) / stepsPerPeriod);
126
+ }
127
+ return (2 * sum) / stepsPerPeriod;
128
+ }
129
+ /** The θ0 at which W7xs checks the Fourier series: a grid across the bridge's domain θ0 ≤ 0.5. @internal */
130
+ export const FOURIER_SERIES_THETA0S = [0.01, 0.1, 0.2, 0.3, 0.4, 0.5];
131
+ const FOURIER_SERIES_TERMS = 20;
132
+ const FOURIER_SERIES_TOLERANCE = 1e-9;
133
+ /**
134
+ * F(φ) = Σ_{n<20} (−1)ⁿ aₙ cos((2n+1)φ). `'minus'` puts (1 − q^{2n+1}) in the
135
+ * denominator of aₙ, a transcription error the control uses.
136
+ */
137
+ function fourierSeries(theta0, phi, variant) {
138
+ const q = pendulumNome(theta0);
139
+ let s = 0;
140
+ for (let n = 0; n < FOURIER_SERIES_TERMS; n++) {
141
+ const odd = 2 * n + 1;
142
+ const a = (8 * q ** (n + 0.5)) / (odd * (variant === 'plus' ? 1 + q ** odd : 1 - q ** odd));
143
+ s += (n % 2 === 0 ? a : -a) * Math.cos(odd * phi);
144
+ }
145
+ return s;
146
+ }
147
+ /** max over the grid, and over one period T = T0(1+ε) sampled at every RK4 step, of |θ_RK4(t) − F(2πt/T)|. */
148
+ function fourierSeriesDeviation(stepsPerPeriod, variant) {
149
+ let worst = 0;
150
+ for (const theta0 of FOURIER_SERIES_THETA0S) {
151
+ const h = (1 + pendulumPeriodErrorAt({ theta0 })) / stepsPerPeriod;
152
+ let x = theta0;
153
+ let v = 0;
154
+ worst = Math.max(worst, Math.abs(x - fourierSeries(theta0, 0, variant)));
155
+ for (let i = 1; i <= stepsPerPeriod; i++) {
156
+ [x, v] = rk4Step(x, v, h, pendulumAccel);
157
+ worst = Math.max(worst, Math.abs(x - fourierSeries(theta0, (TWO_PI * i) / stepsPerPeriod, variant)));
158
+ }
159
+ }
160
+ return worst;
161
+ }
162
+ /**
163
+ * W7xs, or its control: the Fourier series against RK4 of the pendulum, at 200
164
+ * and 800 steps per period, within 1e-9 rad at every step and every grid θ0.
165
+ * @internal
166
+ */
167
+ export function fourierSeriesCheck(id, variant = 'plus') {
168
+ return {
169
+ id,
170
+ evaluate: (stepsPerPeriod) => fourierSeriesDeviation(stepsPerPeriod, variant),
171
+ target: 0,
172
+ coarseResolution: 200,
173
+ fineResolution: 800,
174
+ tolerance: FOURIER_SERIES_TOLERANCE,
175
+ };
176
+ }
177
+ const W7X_THETA0 = 0.3;
178
+ const W7X_EPS = pendulumPeriodErrorAt({ theta0: W7X_THETA0 });
179
+ const W7XA = {
180
+ id: 'W7xa',
181
+ evaluate: (stepsPerPeriod) => measureFundamental(W7X_THETA0, stepsPerPeriod),
182
+ target: fundamentalCoefficient(W7X_THETA0),
183
+ coarseResolution: 200,
184
+ fineResolution: 800,
185
+ tolerance: 1e-10,
186
+ };
187
+ function positionPointCheck(eps) {
188
+ if (!Number.isFinite(eps) || eps <= 0)
189
+ return { unavailable: `θ0 = 0 at ε = ${eps}: both motions are at rest and the error is 0` };
190
+ const theta0 = theta0OfPeriodError(eps);
191
+ const periods = dominanceWindow(eps);
192
+ const capped = periods === POSITION_POINT_MAX_PERIODS ? `, capped at ${POSITION_POINT_MAX_PERIODS} T0 (antiphase is at ${(1 + eps) / (2 * eps)} T0)` : ' (to antiphase, Δφ = π)';
193
+ return {
194
+ claim: `RK4 |θ − θ_lin| ≤ B(t) at every sample, θ0 = ${Number(theta0.toPrecision(8))} (recovered from ε), over t ≤ ${periods} T0${capped}; ` +
195
+ `200 and 800 steps per T0, sampled 200 per T0; the coarse-to-fine difference is the uncertainty`,
196
+ check: dominanceSpec('W7x@point', eps, 1, 1),
197
+ control: dominanceSpec('W7x@point-control', eps, 1, 0),
198
+ controlClaim: 'the same bound without its waveform term W̄, 2θ0 sin(Δφ/2) alone',
199
+ };
200
+ }
201
+ /** @internal */
202
+ export const PENDULUM_POSITION_TRANSLATION = {
203
+ bridgeId: 'ab-pendulum-linear',
204
+ observable: 'position',
205
+ unit: 'rad',
206
+ fromNorm: 'relative period error, normalized by the value of the reduced model',
207
+ errorKind: 'upper-bound',
208
+ definition: 'the pointwise angle error |θ(t) − θ_lin(t)| of the two motions released from rest at θ0',
209
+ derivation: 'an UPPER BOUND B(t) = W̄ + 2θ0 sin(min(Δφ(t), π)/2), Δφ = 2π (t/T0) ε/(1+ε) the exact phase lead and ' +
210
+ 'W̄ = (16/3) q^{3/2}/(1−q) ≈ θ0³/96 the waveform term (q the nome of sin(θ0/2); θ0 is recovered from ε). ' +
211
+ 'From the Fourier series θ = Σ (−1)ⁿ aₙ cos((2n+1)φ): |θ − θ0 cos φ| ≤ 2 Σ_{n≥1} aₙ ≤ W̄, and θ0|cos φ − cos φ_lin| ≤ 2θ0|sin(Δφ/2)|. ' +
212
+ 'B increases with ε, so the domain supremum of ε gives the shortest horizon over the domain',
213
+ premises: [
214
+ 'both motions are released from rest at the same θ0 at t = 0',
215
+ 'T0 = 2π √(ℓ/g) is the linear period, in the unit t is given in',
216
+ 'the classical Fourier series of the pendulum (all aₙ > 0, Σ (−1)ⁿ aₙ = θ0) — quoted, not derived here; ' +
217
+ `machine-checked against RK4 at θ0 ∈ {${FOURIER_SERIES_THETA0S.join(', ')}} (W7xs), not between those points`,
218
+ ],
219
+ parameters: ['T0'],
220
+ timeUnit: 'the unit of T0',
221
+ errorAt: (eps, t, { T0 }) => {
222
+ if (T0 === undefined || !Number.isFinite(T0) || T0 <= 0 || !Number.isFinite(eps) || eps < 0 || !Number.isFinite(t))
223
+ return Number.NaN;
224
+ return positionBound(eps)(t / T0);
225
+ },
226
+ horizonFor: (eps, tolerance, { T0 }) => positionHorizon(eps, tolerance, T0),
227
+ floor: (eps) => waveformBound(theta0OfPeriodError(eps)),
228
+ boundary: 'inclusive: certified iff t ≤ t*, i.e. B(t) ≤ the tolerance; past t* the BOUND exceeds it and the error may not (undetermined, not inadequate)',
229
+ notCovered: ['the phase (declared separately: --tolerance=phase:EPS)', 'the angular velocity', 'the amplitude'],
230
+ witnesses: [
231
+ {
232
+ id: 'W7x',
233
+ kind: 'numeric',
234
+ test: 'tests/atlas/pendulum-position-translation.test.ts',
235
+ tolerance: `RK4 |θ − θ_lin| ≤ B(t) at every sample to antiphase, θ0 = ${W7X_THETA0}, by more than the coarse-to-fine difference`,
236
+ },
237
+ {
238
+ id: 'W7xa',
239
+ kind: 'numeric',
240
+ test: 'tests/atlas/pendulum-position-translation.test.ts',
241
+ tolerance: `RK4-projected fundamental coefficient at θ0 = ${W7X_THETA0} within 1e-10 of 8√q/(1+q)`,
242
+ },
243
+ {
244
+ id: 'W7xs',
245
+ kind: 'numeric',
246
+ test: 'tests/atlas/pendulum-position-translation.test.ts',
247
+ tolerance: `the Fourier series (${FOURIER_SERIES_TERMS} terms) within ${FOURIER_SERIES_TOLERANCE} rad of RK4 at every step of one period, ` +
248
+ `at θ0 ∈ {${FOURIER_SERIES_THETA0S.join(', ')}}`,
249
+ },
250
+ ],
251
+ checks: [dominanceSpec('W7x', W7X_EPS, 1, 1), W7XA, fourierSeriesCheck('W7xs')],
252
+ pointCheck: positionPointCheck,
253
+ };
254
+ //# sourceMappingURL=position-translation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"position-translation.js","sourceRoot":"","sources":["../../../src/atlas/oscillators/position-translation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAKH,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE9G,MAAM,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAE3B,qGAAqG;AACrG,MAAM,UAAU,aAAa,CAAC,MAAc;IAC1C,MAAM,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;IAC/B,OAAO,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AACzC,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,sBAAsB,CAAC,MAAc;IACnD,MAAM,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;IAC/B,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,IAAI,GAAG,CAAC,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