universal-physics-tensor 9.0.0 → 11.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1109) hide show
  1. package/README.md +21 -17
  2. package/bin/upt.mjs +13 -1
  3. package/data/atlas/atlas.json +79 -68
  4. package/data/atlas/atlas.jsonld +1 -1
  5. package/data/atlas/diffusion.json +24 -23
  6. package/data/atlas/oscillators.json +21 -16
  7. package/data/atlas/waves.json +36 -31
  8. package/data/atlas/witness-results.json +11 -11
  9. package/data/bridge-catalog.json +1192 -1636
  10. package/data/bridge-catalog.schema.json +390 -135
  11. package/data/quantities.json +53 -19
  12. package/data/schemas/atlas-record.v0.json +184 -46
  13. package/data/units.json +33 -4
  14. package/dist/atlas/applicability.d.ts.map +1 -1
  15. package/dist/atlas/applicability.js +35 -18
  16. package/dist/atlas/applicability.js.map +1 -1
  17. package/dist/atlas/association.js.map +1 -1
  18. package/dist/atlas/benchmark/backend-shapes.d.ts.map +1 -1
  19. package/dist/atlas/benchmark/backend-shapes.js +5 -1
  20. package/dist/atlas/benchmark/backend-shapes.js.map +1 -1
  21. package/dist/atlas/benchmark/baselines.d.ts.map +1 -1
  22. package/dist/atlas/benchmark/baselines.js +8 -0
  23. package/dist/atlas/benchmark/baselines.js.map +1 -1
  24. package/dist/atlas/benchmark/hybrid-retrieval.d.ts +12 -3
  25. package/dist/atlas/benchmark/hybrid-retrieval.d.ts.map +1 -1
  26. package/dist/atlas/benchmark/hybrid-retrieval.js +30 -21
  27. package/dist/atlas/benchmark/hybrid-retrieval.js.map +1 -1
  28. package/dist/atlas/benchmark/leakage.js.map +1 -1
  29. package/dist/atlas/benchmark/loader.js +2 -2
  30. package/dist/atlas/benchmark/loader.js.map +1 -1
  31. package/dist/atlas/benchmark/run-atlas.d.ts.map +1 -1
  32. package/dist/atlas/benchmark/run-atlas.js +14 -2
  33. package/dist/atlas/benchmark/run-atlas.js.map +1 -1
  34. package/dist/atlas/benchmark/stats.d.ts +3 -3
  35. package/dist/atlas/benchmark/stats.d.ts.map +1 -1
  36. package/dist/atlas/benchmark/stats.js +16 -8
  37. package/dist/atlas/benchmark/stats.js.map +1 -1
  38. package/dist/atlas/benchmark/study.js.map +1 -1
  39. package/dist/atlas/benchmark/types.js.map +1 -1
  40. package/dist/atlas/bridge-record.d.ts +4 -4
  41. package/dist/atlas/bridge-record.d.ts.map +1 -1
  42. package/dist/atlas/bridge-record.js +6 -6
  43. package/dist/atlas/bridge-record.js.map +1 -1
  44. package/dist/atlas/catalog-formal-ref.d.ts +26 -3
  45. package/dist/atlas/catalog-formal-ref.d.ts.map +1 -1
  46. package/dist/atlas/catalog-formal-ref.js +52 -5
  47. package/dist/atlas/catalog-formal-ref.js.map +1 -1
  48. package/dist/atlas/chain-pipeline.d.ts +0 -11
  49. package/dist/atlas/chain-pipeline.d.ts.map +1 -1
  50. package/dist/atlas/chain-pipeline.js +12 -24
  51. package/dist/atlas/chain-pipeline.js.map +1 -1
  52. package/dist/atlas/composition-table.js.map +1 -1
  53. package/dist/atlas/conventions.js.map +1 -1
  54. package/dist/atlas/coverage.d.ts +2 -2
  55. package/dist/atlas/coverage.js.map +1 -1
  56. package/dist/atlas/derivation.js.map +1 -1
  57. package/dist/atlas/derive-evidence.d.ts +6 -4
  58. package/dist/atlas/derive-evidence.d.ts.map +1 -1
  59. package/dist/atlas/derive-evidence.js +7 -2
  60. package/dist/atlas/derive-evidence.js.map +1 -1
  61. package/dist/atlas/diffusion/bridges-closure.d.ts +0 -4
  62. package/dist/atlas/diffusion/bridges-closure.d.ts.map +1 -1
  63. package/dist/atlas/diffusion/bridges-closure.js +8 -17
  64. package/dist/atlas/diffusion/bridges-closure.js.map +1 -1
  65. package/dist/atlas/diffusion/bridges.d.ts.map +1 -1
  66. package/dist/atlas/diffusion/bridges.js +27 -42
  67. package/dist/atlas/diffusion/bridges.js.map +1 -1
  68. package/dist/atlas/diffusion/dimensions.d.ts +6 -14
  69. package/dist/atlas/diffusion/dimensions.d.ts.map +1 -1
  70. package/dist/atlas/diffusion/dimensions.js +8 -16
  71. package/dist/atlas/diffusion/dimensions.js.map +1 -1
  72. package/dist/atlas/diffusion/index.d.ts +1 -1
  73. package/dist/atlas/diffusion/index.d.ts.map +1 -1
  74. package/dist/atlas/diffusion/index.js.map +1 -1
  75. package/dist/atlas/diffusion/models.d.ts +3 -3
  76. package/dist/atlas/diffusion/models.d.ts.map +1 -1
  77. package/dist/atlas/diffusion/models.js +5 -10
  78. package/dist/atlas/diffusion/models.js.map +1 -1
  79. package/dist/atlas/diffusion/numerics.d.ts +16 -4
  80. package/dist/atlas/diffusion/numerics.d.ts.map +1 -1
  81. package/dist/atlas/diffusion/numerics.js +38 -24
  82. package/dist/atlas/diffusion/numerics.js.map +1 -1
  83. package/dist/atlas/error-algebra.d.ts +6 -0
  84. package/dist/atlas/error-algebra.d.ts.map +1 -1
  85. package/dist/atlas/error-algebra.js +26 -0
  86. package/dist/atlas/error-algebra.js.map +1 -1
  87. package/dist/atlas/export.d.ts +18 -2
  88. package/dist/atlas/export.d.ts.map +1 -1
  89. package/dist/atlas/export.js +9 -3
  90. package/dist/atlas/export.js.map +1 -1
  91. package/dist/atlas/families.d.ts +19 -2
  92. package/dist/atlas/families.d.ts.map +1 -1
  93. package/dist/atlas/families.js +26 -3
  94. package/dist/atlas/families.js.map +1 -1
  95. package/dist/atlas/family.d.ts +27 -0
  96. package/dist/atlas/family.d.ts.map +1 -0
  97. package/dist/atlas/family.js +12 -0
  98. package/dist/atlas/family.js.map +1 -0
  99. package/dist/atlas/index.d.ts +3 -2
  100. package/dist/atlas/index.d.ts.map +1 -1
  101. package/dist/atlas/index.js +2 -1
  102. package/dist/atlas/index.js.map +1 -1
  103. package/dist/atlas/link-prediction.d.ts +107 -4
  104. package/dist/atlas/link-prediction.d.ts.map +1 -1
  105. package/dist/atlas/link-prediction.js +212 -66
  106. package/dist/atlas/link-prediction.js.map +1 -1
  107. package/dist/atlas/model.js.map +1 -1
  108. package/dist/atlas/oscillators/bridges-coarse.d.ts.map +1 -1
  109. package/dist/atlas/oscillators/bridges-coarse.js +7 -12
  110. package/dist/atlas/oscillators/bridges-coarse.js.map +1 -1
  111. package/dist/atlas/oscillators/bridges-exact.d.ts.map +1 -1
  112. package/dist/atlas/oscillators/bridges-exact.js +6 -10
  113. package/dist/atlas/oscillators/bridges-exact.js.map +1 -1
  114. package/dist/atlas/oscillators/bridges-limits.d.ts +3 -16
  115. package/dist/atlas/oscillators/bridges-limits.d.ts.map +1 -1
  116. package/dist/atlas/oscillators/bridges-limits.js +23 -36
  117. package/dist/atlas/oscillators/bridges-limits.js.map +1 -1
  118. package/dist/atlas/oscillators/dimensions.d.ts +9 -21
  119. package/dist/atlas/oscillators/dimensions.d.ts.map +1 -1
  120. package/dist/atlas/oscillators/dimensions.js +9 -21
  121. package/dist/atlas/oscillators/dimensions.js.map +1 -1
  122. package/dist/atlas/oscillators/index.d.ts +1 -16
  123. package/dist/atlas/oscillators/index.d.ts.map +1 -1
  124. package/dist/atlas/oscillators/index.js.map +1 -1
  125. package/dist/atlas/oscillators/limit-witnesses.d.ts +2 -2
  126. package/dist/atlas/oscillators/limit-witnesses.d.ts.map +1 -1
  127. package/dist/atlas/oscillators/limit-witnesses.js +17 -15
  128. package/dist/atlas/oscillators/limit-witnesses.js.map +1 -1
  129. package/dist/atlas/oscillators/models.d.ts.map +1 -1
  130. package/dist/atlas/oscillators/models.js +2 -6
  131. package/dist/atlas/oscillators/models.js.map +1 -1
  132. package/dist/atlas/oscillators/norm-transport-witness.js.map +1 -1
  133. package/dist/atlas/oscillators/norm-transport.js.map +1 -1
  134. package/dist/atlas/oscillators/norms.js.map +1 -1
  135. package/dist/atlas/oscillators/pendulum-motion.d.ts +29 -6
  136. package/dist/atlas/oscillators/pendulum-motion.d.ts.map +1 -1
  137. package/dist/atlas/oscillators/pendulum-motion.js +60 -40
  138. package/dist/atlas/oscillators/pendulum-motion.js.map +1 -1
  139. package/dist/atlas/oscillators/phase-carriage.js.map +1 -1
  140. package/dist/atlas/oscillators/phase-translation.d.ts +0 -11
  141. package/dist/atlas/oscillators/phase-translation.d.ts.map +1 -1
  142. package/dist/atlas/oscillators/phase-translation.js +3 -4
  143. package/dist/atlas/oscillators/phase-translation.js.map +1 -1
  144. package/dist/atlas/oscillators/position-translation.d.ts +68 -7
  145. package/dist/atlas/oscillators/position-translation.d.ts.map +1 -1
  146. package/dist/atlas/oscillators/position-translation.js +123 -12
  147. package/dist/atlas/oscillators/position-translation.js.map +1 -1
  148. package/dist/atlas/oscillators/rejections.d.ts +0 -2
  149. package/dist/atlas/oscillators/rejections.d.ts.map +1 -1
  150. package/dist/atlas/oscillators/rejections.js +0 -7
  151. package/dist/atlas/oscillators/rejections.js.map +1 -1
  152. package/dist/atlas/path-bound.js.map +1 -1
  153. package/dist/atlas/physjs-entries.generated.d.ts +25 -24
  154. package/dist/atlas/physjs-entries.generated.d.ts.map +1 -1
  155. package/dist/atlas/physjs-entries.generated.js +25 -24
  156. package/dist/atlas/physjs-entries.generated.js.map +1 -1
  157. package/dist/atlas/physjs-ref.d.ts +107 -70
  158. package/dist/atlas/physjs-ref.d.ts.map +1 -1
  159. package/dist/atlas/physjs-ref.js +184 -101
  160. package/dist/atlas/physjs-ref.js.map +1 -1
  161. package/dist/atlas/physjs-reviewed.d.ts +31 -0
  162. package/dist/atlas/physjs-reviewed.d.ts.map +1 -0
  163. package/dist/atlas/physjs-reviewed.js +194 -0
  164. package/dist/atlas/physjs-reviewed.js.map +1 -0
  165. package/dist/atlas/poster/associations.js.map +1 -1
  166. package/dist/atlas/poster/derivations.js.map +1 -1
  167. package/dist/atlas/poster/statements.d.ts +0 -19
  168. package/dist/atlas/poster/statements.d.ts.map +1 -1
  169. package/dist/atlas/poster/statements.js +1 -1
  170. package/dist/atlas/poster/statements.js.map +1 -1
  171. package/dist/atlas/proof-target.d.ts +1 -1
  172. package/dist/atlas/proof-target.js +1 -1
  173. package/dist/atlas/proof-target.js.map +1 -1
  174. package/dist/atlas/public.d.ts +2 -1
  175. package/dist/atlas/public.d.ts.map +1 -1
  176. package/dist/atlas/public.js +2 -1
  177. package/dist/atlas/public.js.map +1 -1
  178. package/dist/atlas/regime.d.ts +1 -1
  179. package/dist/atlas/regime.d.ts.map +1 -1
  180. package/dist/atlas/regime.js +1 -1
  181. package/dist/atlas/regime.js.map +1 -1
  182. package/dist/atlas/serialize.d.ts +18 -12
  183. package/dist/atlas/serialize.d.ts.map +1 -1
  184. package/dist/atlas/serialize.js +28 -18
  185. package/dist/atlas/serialize.js.map +1 -1
  186. package/dist/atlas/statement.js.map +1 -1
  187. package/dist/atlas/text-overlap.d.ts +23 -0
  188. package/dist/atlas/text-overlap.d.ts.map +1 -0
  189. package/dist/atlas/text-overlap.js +41 -0
  190. package/dist/atlas/text-overlap.js.map +1 -0
  191. package/dist/atlas/translation-registry.js.map +1 -1
  192. package/dist/atlas/translation.js.map +1 -1
  193. package/dist/atlas/types.d.ts +9 -2
  194. package/dist/atlas/types.d.ts.map +1 -1
  195. package/dist/atlas/types.js +1 -1
  196. package/dist/atlas/types.js.map +1 -1
  197. package/dist/atlas/waves/bridges-closure.d.ts.map +1 -1
  198. package/dist/atlas/waves/bridges-closure.js +2 -9
  199. package/dist/atlas/waves/bridges-closure.js.map +1 -1
  200. package/dist/atlas/waves/bridges.d.ts.map +1 -1
  201. package/dist/atlas/waves/bridges.js +32 -52
  202. package/dist/atlas/waves/bridges.js.map +1 -1
  203. package/dist/atlas/waves/index.d.ts +1 -1
  204. package/dist/atlas/waves/index.d.ts.map +1 -1
  205. package/dist/atlas/waves/index.js.map +1 -1
  206. package/dist/atlas/waves/models.d.ts +5 -6
  207. package/dist/atlas/waves/models.d.ts.map +1 -1
  208. package/dist/atlas/waves/models.js +7 -13
  209. package/dist/atlas/waves/models.js.map +1 -1
  210. package/dist/atlas/waves/numerics.d.ts.map +1 -1
  211. package/dist/atlas/waves/numerics.js +10 -3
  212. package/dist/atlas/waves/numerics.js.map +1 -1
  213. package/dist/atlas/witness-artifact.js.map +1 -1
  214. package/dist/atlas/witness-dominance.d.ts +4 -3
  215. package/dist/atlas/witness-dominance.d.ts.map +1 -1
  216. package/dist/atlas/witness-dominance.js +15 -5
  217. package/dist/atlas/witness-dominance.js.map +1 -1
  218. package/dist/atlas/witness-numeric.d.ts +38 -4
  219. package/dist/atlas/witness-numeric.d.ts.map +1 -1
  220. package/dist/atlas/witness-numeric.js +80 -2
  221. package/dist/atlas/witness-numeric.js.map +1 -1
  222. package/dist/atlas/witness-result.d.ts +7 -1
  223. package/dist/atlas/witness-result.d.ts.map +1 -1
  224. package/dist/atlas/witness-result.js.map +1 -1
  225. package/dist/atlas/witness-specs.d.ts.map +1 -1
  226. package/dist/atlas/witness-specs.js +19 -0
  227. package/dist/atlas/witness-specs.js.map +1 -1
  228. package/dist/atlas/witness-symbolic.d.ts +75 -3
  229. package/dist/atlas/witness-symbolic.d.ts.map +1 -1
  230. package/dist/atlas/witness-symbolic.js +116 -10
  231. package/dist/atlas/witness-symbolic.js.map +1 -1
  232. package/dist/atlas/witnesses/quantum-support.js.map +1 -1
  233. package/dist/bridges/caller-table.d.ts +1 -1
  234. package/dist/bridges/caller-table.d.ts.map +1 -1
  235. package/dist/bridges/caller-table.js.map +1 -1
  236. package/dist/bridges/carrier-sign.d.ts.map +1 -1
  237. package/dist/bridges/carrier-sign.js +8 -3
  238. package/dist/bridges/carrier-sign.js.map +1 -1
  239. package/dist/bridges/catalog-adapter.d.ts +12 -3
  240. package/dist/bridges/catalog-adapter.d.ts.map +1 -1
  241. package/dist/bridges/catalog-adapter.js +17 -9
  242. package/dist/bridges/catalog-adapter.js.map +1 -1
  243. package/dist/bridges/catalog-load.d.ts +12 -2
  244. package/dist/bridges/catalog-load.d.ts.map +1 -1
  245. package/dist/bridges/catalog-load.js +181 -13
  246. package/dist/bridges/catalog-load.js.map +1 -1
  247. package/dist/bridges/catalog-types.d.ts +74 -26
  248. package/dist/bridges/catalog-types.d.ts.map +1 -1
  249. package/dist/bridges/catalog-types.js +11 -1
  250. package/dist/bridges/catalog-types.js.map +1 -1
  251. package/dist/bridges/coefficient-statement.js +1 -5
  252. package/dist/bridges/coefficient-statement.js.map +1 -1
  253. package/dist/bridges/confrontation-coverage.js.map +1 -1
  254. package/dist/bridges/confrontations.d.ts +1 -1
  255. package/dist/bridges/confrontations.d.ts.map +1 -1
  256. package/dist/bridges/confrontations.js +1 -1
  257. package/dist/bridges/confrontations.js.map +1 -1
  258. package/dist/bridges/evaluation-errors.d.ts +46 -3
  259. package/dist/bridges/evaluation-errors.d.ts.map +1 -1
  260. package/dist/bridges/evaluation-errors.js +40 -4
  261. package/dist/bridges/evaluation-errors.js.map +1 -1
  262. package/dist/bridges/evaluator-inputs.d.ts.map +1 -1
  263. package/dist/bridges/evaluator-inputs.js +7 -5
  264. package/dist/bridges/evaluator-inputs.js.map +1 -1
  265. package/dist/bridges/evaluators.d.ts +17 -2
  266. package/dist/bridges/evaluators.d.ts.map +1 -1
  267. package/dist/bridges/evaluators.js +76 -28
  268. package/dist/bridges/evaluators.js.map +1 -1
  269. package/dist/bridges/expr-parse.d.ts +38 -4
  270. package/dist/bridges/expr-parse.d.ts.map +1 -1
  271. package/dist/bridges/expr-parse.js +101 -12
  272. package/dist/bridges/expr-parse.js.map +1 -1
  273. package/dist/bridges/holds.d.ts +40 -4
  274. package/dist/bridges/holds.d.ts.map +1 -1
  275. package/dist/bridges/holds.js +128 -19
  276. package/dist/bridges/holds.js.map +1 -1
  277. package/dist/bridges/index.d.ts +15 -14
  278. package/dist/bridges/index.d.ts.map +1 -1
  279. package/dist/bridges/index.js +14 -15
  280. package/dist/bridges/index.js.map +1 -1
  281. package/dist/bridges/input-contract.js.map +1 -1
  282. package/dist/bridges/membership.d.ts +5 -3
  283. package/dist/bridges/membership.d.ts.map +1 -1
  284. package/dist/bridges/membership.js +5 -6
  285. package/dist/bridges/membership.js.map +1 -1
  286. package/dist/bridges/notices.d.ts.map +1 -1
  287. package/dist/bridges/notices.js +5 -5
  288. package/dist/bridges/notices.js.map +1 -1
  289. package/dist/bridges/observations/types.js.map +1 -1
  290. package/dist/bridges/rejected.d.ts +11 -17
  291. package/dist/bridges/rejected.d.ts.map +1 -1
  292. package/dist/bridges/rejected.js +13 -68
  293. package/dist/bridges/rejected.js.map +1 -1
  294. package/dist/bridges/relation-eval.d.ts +6 -7
  295. package/dist/bridges/relation-eval.d.ts.map +1 -1
  296. package/dist/bridges/relation-eval.js +20 -50
  297. package/dist/bridges/relation-eval.js.map +1 -1
  298. package/dist/bridges/rhs-registry.js.map +1 -1
  299. package/dist/bridges/sensitivity.d.ts +11 -3
  300. package/dist/bridges/sensitivity.d.ts.map +1 -1
  301. package/dist/bridges/sensitivity.js +27 -13
  302. package/dist/bridges/sensitivity.js.map +1 -1
  303. package/dist/bridges/tensor-index.js.map +1 -1
  304. package/dist/bridges/types.d.ts +1 -7
  305. package/dist/bridges/types.d.ts.map +1 -1
  306. package/dist/bridges/types.js +1 -4
  307. package/dist/bridges/types.js.map +1 -1
  308. package/dist/bridges/validity.d.ts +33 -0
  309. package/dist/bridges/validity.d.ts.map +1 -0
  310. package/dist/bridges/validity.js +67 -0
  311. package/dist/bridges/validity.js.map +1 -0
  312. package/dist/canonical/canonical-equation.js.map +1 -1
  313. package/dist/canonical/dimensional-fields.js.map +1 -1
  314. package/dist/canonical/entries/_l1-build.js.map +1 -1
  315. package/dist/canonical/entries/atomic.js +1 -3
  316. package/dist/canonical/entries/atomic.js.map +1 -1
  317. package/dist/canonical/entries/condensed-matter.d.ts.map +1 -1
  318. package/dist/canonical/entries/condensed-matter.js +8 -9
  319. package/dist/canonical/entries/condensed-matter.js.map +1 -1
  320. package/dist/canonical/entries/dimensional-classics.d.ts.map +1 -1
  321. package/dist/canonical/entries/dimensional-classics.js +5 -6
  322. package/dist/canonical/entries/dimensional-classics.js.map +1 -1
  323. package/dist/canonical/entries/electromagnetism.d.ts.map +1 -1
  324. package/dist/canonical/entries/electromagnetism.js +6 -12
  325. package/dist/canonical/entries/electromagnetism.js.map +1 -1
  326. package/dist/canonical/entries/fluids-waves.d.ts.map +1 -1
  327. package/dist/canonical/entries/fluids-waves.js +3 -7
  328. package/dist/canonical/entries/fluids-waves.js.map +1 -1
  329. package/dist/canonical/entries/mechanics.d.ts.map +1 -1
  330. package/dist/canonical/entries/mechanics.js +4 -6
  331. package/dist/canonical/entries/mechanics.js.map +1 -1
  332. package/dist/canonical/entries/nonmonomial.d.ts.map +1 -1
  333. package/dist/canonical/entries/nonmonomial.js +38 -39
  334. package/dist/canonical/entries/nonmonomial.js.map +1 -1
  335. package/dist/canonical/entries/relativity.d.ts.map +1 -1
  336. package/dist/canonical/entries/relativity.js +6 -6
  337. package/dist/canonical/entries/relativity.js.map +1 -1
  338. package/dist/canonical/entries/statistical-mechanics.js +5 -5
  339. package/dist/canonical/entries/statistical-mechanics.js.map +1 -1
  340. package/dist/canonical/entries/thermo-nuclear-cosmo.d.ts.map +1 -1
  341. package/dist/canonical/entries/thermo-nuclear-cosmo.js +6 -10
  342. package/dist/canonical/entries/thermo-nuclear-cosmo.js.map +1 -1
  343. package/dist/canonical/fixed-points.d.ts +94 -0
  344. package/dist/canonical/fixed-points.d.ts.map +1 -0
  345. package/dist/canonical/fixed-points.js +81 -0
  346. package/dist/canonical/fixed-points.js.map +1 -0
  347. package/dist/canonical/linkage.d.ts +29 -4
  348. package/dist/canonical/linkage.d.ts.map +1 -1
  349. package/dist/canonical/linkage.js +47 -64
  350. package/dist/canonical/linkage.js.map +1 -1
  351. package/dist/canonical/normal-form.d.ts +0 -8
  352. package/dist/canonical/normal-form.d.ts.map +1 -1
  353. package/dist/canonical/normal-form.js +22 -23
  354. package/dist/canonical/normal-form.js.map +1 -1
  355. package/dist/canonical/registry.js.map +1 -1
  356. package/dist/canonical/residual.js.map +1 -1
  357. package/dist/canonical/seed-l-layer.d.ts +7 -1
  358. package/dist/canonical/seed-l-layer.d.ts.map +1 -1
  359. package/dist/canonical/seed-l-layer.js +7 -1
  360. package/dist/canonical/seed-l-layer.js.map +1 -1
  361. package/dist/canonical/structural.d.ts +42 -21
  362. package/dist/canonical/structural.d.ts.map +1 -1
  363. package/dist/canonical/structural.js +64 -23
  364. package/dist/canonical/structural.js.map +1 -1
  365. package/dist/cases/brownian-sphere.d.ts +3 -3
  366. package/dist/cases/brownian-sphere.d.ts.map +1 -1
  367. package/dist/cases/brownian-sphere.js +10 -9
  368. package/dist/cases/brownian-sphere.js.map +1 -1
  369. package/dist/cases/damped-resonator.d.ts.map +1 -1
  370. package/dist/cases/damped-resonator.js +8 -11
  371. package/dist/cases/damped-resonator.js.map +1 -1
  372. package/dist/cases/index.js.map +1 -1
  373. package/dist/cases/kepler-rv.d.ts +1 -1
  374. package/dist/cases/kepler-rv.d.ts.map +1 -1
  375. package/dist/cases/kepler-rv.js +3 -2
  376. package/dist/cases/kepler-rv.js.map +1 -1
  377. package/dist/cases/lumped-cooling.d.ts +8 -3
  378. package/dist/cases/lumped-cooling.d.ts.map +1 -1
  379. package/dist/cases/lumped-cooling.js +22 -24
  380. package/dist/cases/lumped-cooling.js.map +1 -1
  381. package/dist/cases/quadrature.d.ts +7 -9
  382. package/dist/cases/quadrature.d.ts.map +1 -1
  383. package/dist/cases/quadrature.js +28 -32
  384. package/dist/cases/quadrature.js.map +1 -1
  385. package/dist/cases/resistor-noise.js +7 -7
  386. package/dist/cases/resistor-noise.js.map +1 -1
  387. package/dist/cases/skin-depth.d.ts +0 -4
  388. package/dist/cases/skin-depth.d.ts.map +1 -1
  389. package/dist/cases/skin-depth.js +3 -7
  390. package/dist/cases/skin-depth.js.map +1 -1
  391. package/dist/cases/types.js.map +1 -1
  392. package/dist/cli/args.d.ts +30 -3
  393. package/dist/cli/args.d.ts.map +1 -1
  394. package/dist/cli/args.js +47 -9
  395. package/dist/cli/args.js.map +1 -1
  396. package/dist/cli/bindings.d.ts +13 -0
  397. package/dist/cli/bindings.d.ts.map +1 -0
  398. package/dist/cli/bindings.js +33 -0
  399. package/dist/cli/bindings.js.map +1 -0
  400. package/dist/cli/closed-form-range.js.map +1 -1
  401. package/dist/cli/command.d.ts +8 -1
  402. package/dist/cli/command.d.ts.map +1 -1
  403. package/dist/cli/command.js.map +1 -1
  404. package/dist/cli/commands/_atlas-map.d.ts +2 -11
  405. package/dist/cli/commands/_atlas-map.d.ts.map +1 -1
  406. package/dist/cli/commands/_atlas-map.js +50 -35
  407. package/dist/cli/commands/_atlas-map.js.map +1 -1
  408. package/dist/cli/commands/_atlas-route.d.ts.map +1 -1
  409. package/dist/cli/commands/_atlas-route.js +6 -2
  410. package/dist/cli/commands/_atlas-route.js.map +1 -1
  411. package/dist/cli/commands/_discovery-opts.d.ts.map +1 -1
  412. package/dist/cli/commands/_discovery-opts.js +48 -14
  413. package/dist/cli/commands/_discovery-opts.js.map +1 -1
  414. package/dist/cli/commands/atlas.d.ts.map +1 -1
  415. package/dist/cli/commands/atlas.js +9 -8
  416. package/dist/cli/commands/atlas.js.map +1 -1
  417. package/dist/cli/commands/audit.d.ts.map +1 -1
  418. package/dist/cli/commands/audit.js +20 -20
  419. package/dist/cli/commands/audit.js.map +1 -1
  420. package/dist/cli/commands/axes.d.ts.map +1 -1
  421. package/dist/cli/commands/axes.js +20 -1
  422. package/dist/cli/commands/axes.js.map +1 -1
  423. package/dist/cli/commands/candidates.d.ts.map +1 -1
  424. package/dist/cli/commands/candidates.js +16 -8
  425. package/dist/cli/commands/candidates.js.map +1 -1
  426. package/dist/cli/commands/canonical.js.map +1 -1
  427. package/dist/cli/commands/chain.js +1 -1
  428. package/dist/cli/commands/chain.js.map +1 -1
  429. package/dist/cli/commands/confront.d.ts.map +1 -1
  430. package/dist/cli/commands/confront.js +22 -20
  431. package/dist/cli/commands/confront.js.map +1 -1
  432. package/dist/cli/commands/connectors.js.map +1 -1
  433. package/dist/cli/commands/coverage.js.map +1 -1
  434. package/dist/cli/commands/derive.d.ts.map +1 -1
  435. package/dist/cli/commands/derive.js +60 -35
  436. package/dist/cli/commands/derive.js.map +1 -1
  437. package/dist/cli/commands/discover.d.ts.map +1 -1
  438. package/dist/cli/commands/discover.js +20 -10
  439. package/dist/cli/commands/discover.js.map +1 -1
  440. package/dist/cli/commands/eval.d.ts.map +1 -1
  441. package/dist/cli/commands/eval.js +14 -10
  442. package/dist/cli/commands/eval.js.map +1 -1
  443. package/dist/cli/commands/evaluate.d.ts.map +1 -1
  444. package/dist/cli/commands/evaluate.js +108 -58
  445. package/dist/cli/commands/evaluate.js.map +1 -1
  446. package/dist/cli/commands/explain.d.ts.map +1 -1
  447. package/dist/cli/commands/explain.js +16 -8
  448. package/dist/cli/commands/explain.js.map +1 -1
  449. package/dist/cli/commands/frontier.js.map +1 -1
  450. package/dist/cli/commands/ground.d.ts.map +1 -1
  451. package/dist/cli/commands/ground.js +41 -10
  452. package/dist/cli/commands/ground.js.map +1 -1
  453. package/dist/cli/commands/index.js.map +1 -1
  454. package/dist/cli/commands/map.d.ts.map +1 -1
  455. package/dist/cli/commands/map.js +155 -92
  456. package/dist/cli/commands/map.js.map +1 -1
  457. package/dist/cli/commands/metric.d.ts.map +1 -1
  458. package/dist/cli/commands/metric.js +58 -20
  459. package/dist/cli/commands/metric.js.map +1 -1
  460. package/dist/cli/commands/path.d.ts +10 -0
  461. package/dist/cli/commands/path.d.ts.map +1 -1
  462. package/dist/cli/commands/path.js +29 -7
  463. package/dist/cli/commands/path.js.map +1 -1
  464. package/dist/cli/commands/predict.js.map +1 -1
  465. package/dist/cli/commands/priority.js.map +1 -1
  466. package/dist/cli/commands/probe.d.ts.map +1 -1
  467. package/dist/cli/commands/probe.js +105 -38
  468. package/dist/cli/commands/probe.js.map +1 -1
  469. package/dist/cli/commands/recover.js +1 -1
  470. package/dist/cli/commands/recover.js.map +1 -1
  471. package/dist/cli/commands/regime.d.ts +5 -4
  472. package/dist/cli/commands/regime.d.ts.map +1 -1
  473. package/dist/cli/commands/regime.js +25 -26
  474. package/dist/cli/commands/regime.js.map +1 -1
  475. package/dist/cli/commands/retrieve.d.ts.map +1 -1
  476. package/dist/cli/commands/retrieve.js +23 -14
  477. package/dist/cli/commands/retrieve.js.map +1 -1
  478. package/dist/cli/commands/search.d.ts.map +1 -1
  479. package/dist/cli/commands/search.js +9 -4
  480. package/dist/cli/commands/search.js.map +1 -1
  481. package/dist/cli/commands/symbolic.js +31 -36
  482. package/dist/cli/commands/symbolic.js.map +1 -1
  483. package/dist/cli/commands/testplan.d.ts.map +1 -1
  484. package/dist/cli/commands/testplan.js +5 -3
  485. package/dist/cli/commands/testplan.js.map +1 -1
  486. package/dist/cli/conventions.js.map +1 -1
  487. package/dist/cli/determination.js.map +1 -1
  488. package/dist/cli/errors.js.map +1 -1
  489. package/dist/cli/euler-guard.js.map +1 -1
  490. package/dist/cli/eval-numbers.js.map +1 -1
  491. package/dist/cli/expr-print.d.ts +28 -3
  492. package/dist/cli/expr-print.d.ts.map +1 -1
  493. package/dist/cli/expr-print.js +42 -22
  494. package/dist/cli/expr-print.js.map +1 -1
  495. package/dist/cli/flag-help.js.map +1 -1
  496. package/dist/cli/graphs.js.map +1 -1
  497. package/dist/cli/library-defaults.d.ts +19 -0
  498. package/dist/cli/library-defaults.d.ts.map +1 -0
  499. package/dist/cli/library-defaults.js +22 -0
  500. package/dist/cli/library-defaults.js.map +1 -0
  501. package/dist/cli/main.d.ts +7 -0
  502. package/dist/cli/main.d.ts.map +1 -1
  503. package/dist/cli/main.js +25 -6
  504. package/dist/cli/main.js.map +1 -1
  505. package/dist/cli/map-evidence.js.map +1 -1
  506. package/dist/cli/numeric-flag.d.ts +12 -0
  507. package/dist/cli/numeric-flag.d.ts.map +1 -0
  508. package/dist/cli/numeric-flag.js +44 -0
  509. package/dist/cli/numeric-flag.js.map +1 -0
  510. package/dist/cli/output.d.ts +23 -6
  511. package/dist/cli/output.d.ts.map +1 -1
  512. package/dist/cli/output.js +15 -0
  513. package/dist/cli/output.js.map +1 -1
  514. package/dist/cli/published-url.js.map +1 -1
  515. package/dist/cli/record-reach.d.ts +6 -0
  516. package/dist/cli/record-reach.d.ts.map +1 -1
  517. package/dist/cli/record-reach.js +17 -11
  518. package/dist/cli/record-reach.js.map +1 -1
  519. package/dist/cli/record-tables.d.ts.map +1 -1
  520. package/dist/cli/record-tables.js +7 -6
  521. package/dist/cli/record-tables.js.map +1 -1
  522. package/dist/cli/record.d.ts +1 -5
  523. package/dist/cli/record.d.ts.map +1 -1
  524. package/dist/cli/record.js +40 -20
  525. package/dist/cli/record.js.map +1 -1
  526. package/dist/cli/search-index.d.ts +5 -0
  527. package/dist/cli/search-index.d.ts.map +1 -1
  528. package/dist/cli/search-index.js +19 -7
  529. package/dist/cli/search-index.js.map +1 -1
  530. package/dist/cli/statuses.d.ts +0 -2
  531. package/dist/cli/statuses.d.ts.map +1 -1
  532. package/dist/cli/statuses.js +0 -7
  533. package/dist/cli/statuses.js.map +1 -1
  534. package/dist/cli/stored-results.d.ts +7 -0
  535. package/dist/cli/stored-results.d.ts.map +1 -0
  536. package/dist/cli/stored-results.js +23 -0
  537. package/dist/cli/stored-results.js.map +1 -0
  538. package/dist/cli/top-level-help.js.map +1 -1
  539. package/dist/cli/version.d.ts.map +1 -1
  540. package/dist/cli/version.js +7 -5
  541. package/dist/cli/version.js.map +1 -1
  542. package/dist/cli-api.d.ts +49 -14
  543. package/dist/cli-api.d.ts.map +1 -1
  544. package/dist/cli-api.js +42 -17
  545. package/dist/cli-api.js.map +1 -1
  546. package/dist/composition/adjudication.js.map +1 -1
  547. package/dist/composition/algebraic-equivalence.d.ts +43 -0
  548. package/dist/composition/algebraic-equivalence.d.ts.map +1 -0
  549. package/dist/composition/algebraic-equivalence.js +115 -0
  550. package/dist/composition/algebraic-equivalence.js.map +1 -0
  551. package/dist/composition/aliases.js.map +1 -1
  552. package/dist/composition/audit-coverage.d.ts +2 -0
  553. package/dist/composition/audit-coverage.d.ts.map +1 -1
  554. package/dist/composition/audit-coverage.js.map +1 -1
  555. package/dist/composition/axes.d.ts +6 -0
  556. package/dist/composition/axes.d.ts.map +1 -1
  557. package/dist/composition/axes.js +18 -6
  558. package/dist/composition/axes.js.map +1 -1
  559. package/dist/composition/axis-audit.d.ts +47 -20
  560. package/dist/composition/axis-audit.d.ts.map +1 -1
  561. package/dist/composition/axis-audit.js +82 -9
  562. package/dist/composition/axis-audit.js.map +1 -1
  563. package/dist/composition/bridge-analysis.d.ts +14 -15
  564. package/dist/composition/bridge-analysis.d.ts.map +1 -1
  565. package/dist/composition/bridge-analysis.js +148 -91
  566. package/dist/composition/bridge-analysis.js.map +1 -1
  567. package/dist/composition/bridge-prediction.d.ts +5 -1
  568. package/dist/composition/bridge-prediction.d.ts.map +1 -1
  569. package/dist/composition/bridge-prediction.js +12 -16
  570. package/dist/composition/bridge-prediction.js.map +1 -1
  571. package/dist/composition/buckingham-filter.js.map +1 -1
  572. package/dist/composition/canonical-compare.d.ts +40 -0
  573. package/dist/composition/canonical-compare.d.ts.map +1 -1
  574. package/dist/composition/canonical-compare.js +134 -26
  575. package/dist/composition/canonical-compare.js.map +1 -1
  576. package/dist/composition/canonical-graph.d.ts +9 -10
  577. package/dist/composition/canonical-graph.d.ts.map +1 -1
  578. package/dist/composition/canonical-graph.js +33 -102
  579. package/dist/composition/canonical-graph.js.map +1 -1
  580. package/dist/composition/canonical-json.js +2 -2
  581. package/dist/composition/canonical-json.js.map +1 -1
  582. package/dist/composition/canonical-prefactors.js.map +1 -1
  583. package/dist/composition/catalog-graph.d.ts.map +1 -1
  584. package/dist/composition/catalog-graph.js +8 -25
  585. package/dist/composition/catalog-graph.js.map +1 -1
  586. package/dist/composition/chain-candidate.d.ts +10 -0
  587. package/dist/composition/chain-candidate.d.ts.map +1 -1
  588. package/dist/composition/chain-candidate.js +11 -2
  589. package/dist/composition/chain-candidate.js.map +1 -1
  590. package/dist/composition/chain-match.d.ts +6 -3
  591. package/dist/composition/chain-match.d.ts.map +1 -1
  592. package/dist/composition/chain-match.js +4 -1
  593. package/dist/composition/chain-match.js.map +1 -1
  594. package/dist/composition/chain-regime.js.map +1 -1
  595. package/dist/composition/chain-result.d.ts.map +1 -1
  596. package/dist/composition/chain-result.js +2 -14
  597. package/dist/composition/chain-result.js.map +1 -1
  598. package/dist/composition/compose-surface.js.map +1 -1
  599. package/dist/composition/compose-symbolic.d.ts.map +1 -1
  600. package/dist/composition/compose-symbolic.js +3 -2
  601. package/dist/composition/compose-symbolic.js.map +1 -1
  602. package/dist/composition/compose.d.ts.map +1 -1
  603. package/dist/composition/compose.js +166 -41
  604. package/dist/composition/compose.js.map +1 -1
  605. package/dist/composition/composition-recovery.d.ts.map +1 -1
  606. package/dist/composition/composition-recovery.js +4 -7
  607. package/dist/composition/composition-recovery.js.map +1 -1
  608. package/dist/composition/consequence.d.ts.map +1 -1
  609. package/dist/composition/consequence.js +15 -6
  610. package/dist/composition/consequence.js.map +1 -1
  611. package/dist/composition/consistency.js.map +1 -1
  612. package/dist/composition/descriptor.d.ts +1 -1
  613. package/dist/composition/descriptor.d.ts.map +1 -1
  614. package/dist/composition/descriptor.js.map +1 -1
  615. package/dist/composition/dimension-adjacency.js.map +1 -1
  616. package/dist/composition/discovery.d.ts +77 -11
  617. package/dist/composition/discovery.d.ts.map +1 -1
  618. package/dist/composition/discovery.js +194 -80
  619. package/dist/composition/discovery.js.map +1 -1
  620. package/dist/composition/edge.d.ts +40 -10
  621. package/dist/composition/edge.d.ts.map +1 -1
  622. package/dist/composition/edge.js +47 -12
  623. package/dist/composition/edge.js.map +1 -1
  624. package/dist/composition/enumerate.d.ts +2 -2
  625. package/dist/composition/enumerate.d.ts.map +1 -1
  626. package/dist/composition/enumerate.js +18 -3
  627. package/dist/composition/enumerate.js.map +1 -1
  628. package/dist/composition/evaluate-relation.d.ts +35 -11
  629. package/dist/composition/evaluate-relation.d.ts.map +1 -1
  630. package/dist/composition/evaluate-relation.js +60 -39
  631. package/dist/composition/evaluate-relation.js.map +1 -1
  632. package/dist/composition/explain.d.ts +5 -9
  633. package/dist/composition/explain.d.ts.map +1 -1
  634. package/dist/composition/explain.js +38 -18
  635. package/dist/composition/explain.js.map +1 -1
  636. package/dist/composition/expr-eval.d.ts.map +1 -1
  637. package/dist/composition/expr-eval.js +2 -11
  638. package/dist/composition/expr-eval.js.map +1 -1
  639. package/dist/composition/expr-simplify.d.ts +16 -0
  640. package/dist/composition/expr-simplify.d.ts.map +1 -1
  641. package/dist/composition/expr-simplify.js +24 -59
  642. package/dist/composition/expr-simplify.js.map +1 -1
  643. package/dist/composition/expr-subst.js.map +1 -1
  644. package/dist/composition/formula-shape.d.ts +28 -0
  645. package/dist/composition/formula-shape.d.ts.map +1 -1
  646. package/dist/composition/formula-shape.js +96 -2
  647. package/dist/composition/formula-shape.js.map +1 -1
  648. package/dist/composition/frontier-account.d.ts +3 -2
  649. package/dist/composition/frontier-account.d.ts.map +1 -1
  650. package/dist/composition/frontier-account.js +7 -3
  651. package/dist/composition/frontier-account.js.map +1 -1
  652. package/dist/composition/graph-structure.d.ts +98 -0
  653. package/dist/composition/graph-structure.d.ts.map +1 -0
  654. package/dist/composition/graph-structure.js +167 -0
  655. package/dist/composition/graph-structure.js.map +1 -0
  656. package/dist/composition/graph-viz-svg.d.ts.map +1 -1
  657. package/dist/composition/graph-viz-svg.js +1 -1
  658. package/dist/composition/graph-viz-svg.js.map +1 -1
  659. package/dist/composition/graph-viz.d.ts.map +1 -1
  660. package/dist/composition/graph-viz.js +8 -37
  661. package/dist/composition/graph-viz.js.map +1 -1
  662. package/dist/composition/grounding.js.map +1 -1
  663. package/dist/composition/identifiability.d.ts +91 -4
  664. package/dist/composition/identifiability.d.ts.map +1 -1
  665. package/dist/composition/identifiability.js +363 -6
  666. package/dist/composition/identifiability.js.map +1 -1
  667. package/dist/composition/index.d.ts +14 -8
  668. package/dist/composition/index.d.ts.map +1 -1
  669. package/dist/composition/index.js +7 -5
  670. package/dist/composition/index.js.map +1 -1
  671. package/dist/composition/mathts-quiet.d.ts +29 -0
  672. package/dist/composition/mathts-quiet.d.ts.map +1 -0
  673. package/dist/composition/mathts-quiet.js +57 -0
  674. package/dist/composition/mathts-quiet.js.map +1 -0
  675. package/dist/composition/mathts-scalar-symbols.d.ts.map +1 -1
  676. package/dist/composition/mathts-scalar-symbols.js +20 -35
  677. package/dist/composition/mathts-scalar-symbols.js.map +1 -1
  678. package/dist/composition/not-composable-seeds.d.ts +3 -1
  679. package/dist/composition/not-composable-seeds.d.ts.map +1 -1
  680. package/dist/composition/not-composable-seeds.js +2 -0
  681. package/dist/composition/not-composable-seeds.js.map +1 -1
  682. package/dist/composition/probe/backend-protocol.js.map +1 -1
  683. package/dist/composition/probe/candidate-store.js.map +1 -1
  684. package/dist/composition/probe/corpus.d.ts +4 -2
  685. package/dist/composition/probe/corpus.d.ts.map +1 -1
  686. package/dist/composition/probe/corpus.js +20 -9
  687. package/dist/composition/probe/corpus.js.map +1 -1
  688. package/dist/composition/probe/dataset.d.ts +17 -0
  689. package/dist/composition/probe/dataset.d.ts.map +1 -1
  690. package/dist/composition/probe/dataset.js +95 -50
  691. package/dist/composition/probe/dataset.js.map +1 -1
  692. package/dist/composition/probe/experiment-design.d.ts +5 -1
  693. package/dist/composition/probe/experiment-design.d.ts.map +1 -1
  694. package/dist/composition/probe/experiment-design.js +44 -24
  695. package/dist/composition/probe/experiment-design.js.map +1 -1
  696. package/dist/composition/probe/expression-gaps.js.map +1 -1
  697. package/dist/composition/probe/falsify.d.ts +14 -3
  698. package/dist/composition/probe/falsify.d.ts.map +1 -1
  699. package/dist/composition/probe/falsify.js +16 -27
  700. package/dist/composition/probe/falsify.js.map +1 -1
  701. package/dist/composition/probe/fingerprint.js.map +1 -1
  702. package/dist/composition/probe/fit.d.ts +7 -1
  703. package/dist/composition/probe/fit.d.ts.map +1 -1
  704. package/dist/composition/probe/fit.js +48 -23
  705. package/dist/composition/probe/fit.js.map +1 -1
  706. package/dist/composition/probe/frontier.d.ts.map +1 -1
  707. package/dist/composition/probe/frontier.js +33 -15
  708. package/dist/composition/probe/frontier.js.map +1 -1
  709. package/dist/composition/probe/generator.d.ts +27 -1
  710. package/dist/composition/probe/generator.d.ts.map +1 -1
  711. package/dist/composition/probe/generator.js +53 -30
  712. package/dist/composition/probe/generator.js.map +1 -1
  713. package/dist/composition/probe/index.d.ts +18 -2
  714. package/dist/composition/probe/index.d.ts.map +1 -1
  715. package/dist/composition/probe/index.js +10 -2
  716. package/dist/composition/probe/index.js.map +1 -1
  717. package/dist/composition/probe/limits.d.ts +24 -1
  718. package/dist/composition/probe/limits.d.ts.map +1 -1
  719. package/dist/composition/probe/limits.js +53 -11
  720. package/dist/composition/probe/limits.js.map +1 -1
  721. package/dist/composition/probe/metadata.js.map +1 -1
  722. package/dist/composition/probe/pipeline.d.ts +5 -0
  723. package/dist/composition/probe/pipeline.d.ts.map +1 -1
  724. package/dist/composition/probe/pipeline.js +22 -9
  725. package/dist/composition/probe/pipeline.js.map +1 -1
  726. package/dist/composition/probe/power-law.d.ts +121 -0
  727. package/dist/composition/probe/power-law.d.ts.map +1 -0
  728. package/dist/composition/probe/power-law.js +255 -0
  729. package/dist/composition/probe/power-law.js.map +1 -0
  730. package/dist/composition/probe/problem.d.ts +12 -1
  731. package/dist/composition/probe/problem.d.ts.map +1 -1
  732. package/dist/composition/probe/problem.js +242 -48
  733. package/dist/composition/probe/problem.js.map +1 -1
  734. package/dist/composition/probe/report.js +1 -1
  735. package/dist/composition/probe/report.js.map +1 -1
  736. package/dist/composition/probe/residual.d.ts +6 -1
  737. package/dist/composition/probe/residual.d.ts.map +1 -1
  738. package/dist/composition/probe/residual.js +9 -7
  739. package/dist/composition/probe/residual.js.map +1 -1
  740. package/dist/composition/probe/run-manifest.js +2 -2
  741. package/dist/composition/probe/run-manifest.js.map +1 -1
  742. package/dist/composition/probe/scoring.d.ts +2 -1
  743. package/dist/composition/probe/scoring.d.ts.map +1 -1
  744. package/dist/composition/probe/scoring.js +21 -7
  745. package/dist/composition/probe/scoring.js.map +1 -1
  746. package/dist/composition/probe/search-budget.js.map +1 -1
  747. package/dist/composition/probe/serialize.js.map +1 -1
  748. package/dist/composition/probe/structure.d.ts +82 -17
  749. package/dist/composition/probe/structure.d.ts.map +1 -1
  750. package/dist/composition/probe/structure.js +129 -55
  751. package/dist/composition/probe/structure.js.map +1 -1
  752. package/dist/composition/probe/study.d.ts +35 -12
  753. package/dist/composition/probe/study.d.ts.map +1 -1
  754. package/dist/composition/probe/study.js +241 -184
  755. package/dist/composition/probe/study.js.map +1 -1
  756. package/dist/composition/probe/t-tail.d.ts +17 -0
  757. package/dist/composition/probe/t-tail.d.ts.map +1 -0
  758. package/dist/composition/probe/t-tail.js +32 -0
  759. package/dist/composition/probe/t-tail.js.map +1 -0
  760. package/dist/composition/probe/types.d.ts +6 -1
  761. package/dist/composition/probe/types.d.ts.map +1 -1
  762. package/dist/composition/probe/types.js +2 -0
  763. package/dist/composition/probe/types.js.map +1 -1
  764. package/dist/composition/proposed-bridges.d.ts +51 -13
  765. package/dist/composition/proposed-bridges.d.ts.map +1 -1
  766. package/dist/composition/proposed-bridges.js +110 -58
  767. package/dist/composition/proposed-bridges.js.map +1 -1
  768. package/dist/composition/quantities.d.ts +0 -4
  769. package/dist/composition/quantities.d.ts.map +1 -1
  770. package/dist/composition/quantities.js +5 -5
  771. package/dist/composition/quantities.js.map +1 -1
  772. package/dist/composition/quantity-clusters.d.ts +48 -0
  773. package/dist/composition/quantity-clusters.d.ts.map +1 -0
  774. package/dist/composition/quantity-clusters.js +98 -0
  775. package/dist/composition/quantity-clusters.js.map +1 -0
  776. package/dist/composition/quantity.d.ts +18 -2
  777. package/dist/composition/quantity.d.ts.map +1 -1
  778. package/dist/composition/quantity.js +35 -6
  779. package/dist/composition/quantity.js.map +1 -1
  780. package/dist/composition/rational-exponent.d.ts +40 -0
  781. package/dist/composition/rational-exponent.d.ts.map +1 -0
  782. package/dist/composition/rational-exponent.js +65 -0
  783. package/dist/composition/rational-exponent.js.map +1 -0
  784. package/dist/composition/representative-values.d.ts +22 -0
  785. package/dist/composition/representative-values.d.ts.map +1 -1
  786. package/dist/composition/representative-values.js +23 -0
  787. package/dist/composition/representative-values.js.map +1 -1
  788. package/dist/composition/retrodiction.d.ts +16 -6
  789. package/dist/composition/retrodiction.d.ts.map +1 -1
  790. package/dist/composition/retrodiction.js +36 -10
  791. package/dist/composition/retrodiction.js.map +1 -1
  792. package/dist/composition/uncertainty.js.map +1 -1
  793. package/dist/composition/user-equation.d.ts.map +1 -1
  794. package/dist/composition/user-equation.js +2 -2
  795. package/dist/composition/user-equation.js.map +1 -1
  796. package/dist/core/assignment.d.ts +19 -0
  797. package/dist/core/assignment.d.ts.map +1 -0
  798. package/dist/core/assignment.js +19 -0
  799. package/dist/core/assignment.js.map +1 -0
  800. package/dist/core/axes-registry.d.ts +8 -5
  801. package/dist/core/axes-registry.d.ts.map +1 -1
  802. package/dist/core/axes-registry.js.map +1 -1
  803. package/dist/core/cell.js.map +1 -1
  804. package/dist/core/compare.d.ts +32 -0
  805. package/dist/core/compare.d.ts.map +1 -0
  806. package/dist/core/compare.js +46 -0
  807. package/dist/core/compare.js.map +1 -0
  808. package/dist/core/constants.d.ts +35 -35
  809. package/dist/core/constants.d.ts.map +1 -1
  810. package/dist/core/constants.js +52 -37
  811. package/dist/core/constants.js.map +1 -1
  812. package/dist/core/data-file.d.ts +7 -0
  813. package/dist/core/data-file.d.ts.map +1 -1
  814. package/dist/core/data-file.js +17 -0
  815. package/dist/core/data-file.js.map +1 -1
  816. package/dist/core/flux-rules.js +1 -1
  817. package/dist/core/flux-rules.js.map +1 -1
  818. package/dist/core/format.d.ts +36 -0
  819. package/dist/core/format.d.ts.map +1 -0
  820. package/dist/core/format.js +39 -0
  821. package/dist/core/format.js.map +1 -0
  822. package/dist/core/hash.d.ts +14 -0
  823. package/dist/core/hash.d.ts.map +1 -0
  824. package/dist/core/hash.js +17 -0
  825. package/dist/core/hash.js.map +1 -0
  826. package/dist/core/json-schema.d.ts +3 -1
  827. package/dist/core/json-schema.d.ts.map +1 -1
  828. package/dist/core/json-schema.js +41 -16
  829. package/dist/core/json-schema.js.map +1 -1
  830. package/dist/core/labeled-tensor.d.ts +6 -1
  831. package/dist/core/labeled-tensor.d.ts.map +1 -1
  832. package/dist/core/labeled-tensor.js +18 -16
  833. package/dist/core/labeled-tensor.js.map +1 -1
  834. package/dist/core/mathts-read.d.ts +25 -0
  835. package/dist/core/mathts-read.d.ts.map +1 -0
  836. package/dist/core/mathts-read.js +51 -0
  837. package/dist/core/mathts-read.js.map +1 -0
  838. package/dist/core/regime-registry.d.ts +6 -2
  839. package/dist/core/regime-registry.d.ts.map +1 -1
  840. package/dist/core/regime-registry.js.map +1 -1
  841. package/dist/core/regime-rule-install.js.map +1 -1
  842. package/dist/core/regimes-builtins.js.map +1 -1
  843. package/dist/core/tensor.d.ts +7 -4
  844. package/dist/core/tensor.d.ts.map +1 -1
  845. package/dist/core/tensor.js +64 -8
  846. package/dist/core/tensor.js.map +1 -1
  847. package/dist/core/types.d.ts +5 -5
  848. package/dist/core/types.js.map +1 -1
  849. package/dist/core/universal-index.js.map +1 -1
  850. package/dist/diff/bridge-ast-gradient.d.ts +4 -5
  851. package/dist/diff/bridge-ast-gradient.d.ts.map +1 -1
  852. package/dist/diff/bridge-ast-gradient.js +10 -6
  853. package/dist/diff/bridge-ast-gradient.js.map +1 -1
  854. package/dist/diff/bridge-gradient.d.ts +43 -86
  855. package/dist/diff/bridge-gradient.d.ts.map +1 -1
  856. package/dist/diff/bridge-gradient.js +40 -109
  857. package/dist/diff/bridge-gradient.js.map +1 -1
  858. package/dist/diff/bridge-specs.d.ts +16 -5
  859. package/dist/diff/bridge-specs.d.ts.map +1 -1
  860. package/dist/diff/bridge-specs.js +19 -4
  861. package/dist/diff/bridge-specs.js.map +1 -1
  862. package/dist/dimensional/algebra.d.ts +18 -0
  863. package/dist/dimensional/algebra.d.ts.map +1 -1
  864. package/dist/dimensional/algebra.js +41 -1
  865. package/dist/dimensional/algebra.js.map +1 -1
  866. package/dist/dimensional/ast-builders.d.ts +12 -4
  867. package/dist/dimensional/ast-builders.d.ts.map +1 -1
  868. package/dist/dimensional/ast-builders.js +17 -5
  869. package/dist/dimensional/ast-builders.js.map +1 -1
  870. package/dist/dimensional/ast-leaves.d.ts +81 -0
  871. package/dist/dimensional/ast-leaves.d.ts.map +1 -0
  872. package/dist/dimensional/ast-leaves.js +146 -0
  873. package/dist/dimensional/ast-leaves.js.map +1 -0
  874. package/dist/dimensional/ast-types.js.map +1 -1
  875. package/dist/dimensional/bridge-check.js.map +1 -1
  876. package/dist/dimensional/buckingham.d.ts.map +1 -1
  877. package/dist/dimensional/buckingham.js +15 -27
  878. package/dist/dimensional/buckingham.js.map +1 -1
  879. package/dist/dimensional/connection-validators.d.ts +2 -1
  880. package/dist/dimensional/connection-validators.d.ts.map +1 -1
  881. package/dist/dimensional/connection-validators.js.map +1 -1
  882. package/dist/dimensional/connection.js.map +1 -1
  883. package/dist/dimensional/constant-rows.d.ts.map +1 -1
  884. package/dist/dimensional/constant-rows.js +17 -13
  885. package/dist/dimensional/constant-rows.js.map +1 -1
  886. package/dist/dimensional/constants.d.ts +5 -6
  887. package/dist/dimensional/constants.d.ts.map +1 -1
  888. package/dist/dimensional/constants.js +5 -6
  889. package/dist/dimensional/constants.js.map +1 -1
  890. package/dist/dimensional/curvature-composite.js.map +1 -1
  891. package/dist/dimensional/curvature-invariants.js.map +1 -1
  892. package/dist/dimensional/curvature.js.map +1 -1
  893. package/dist/dimensional/dimension-inference.d.ts.map +1 -1
  894. package/dist/dimensional/dimension-inference.js +1 -2
  895. package/dist/dimensional/dimension-inference.js.map +1 -1
  896. package/dist/dimensional/dimension-spec.d.ts +13 -7
  897. package/dist/dimensional/dimension-spec.d.ts.map +1 -1
  898. package/dist/dimensional/dimension-spec.js +49 -23
  899. package/dist/dimensional/dimension-spec.js.map +1 -1
  900. package/dist/dimensional/einstein-equation.js.map +1 -1
  901. package/dist/dimensional/errors.d.ts +4 -2
  902. package/dist/dimensional/errors.d.ts.map +1 -1
  903. package/dist/dimensional/errors.js +3 -17
  904. package/dist/dimensional/errors.js.map +1 -1
  905. package/dist/dimensional/exact-scale.d.ts +0 -17
  906. package/dist/dimensional/exact-scale.d.ts.map +1 -1
  907. package/dist/dimensional/exact-scale.js +8 -8
  908. package/dist/dimensional/exact-scale.js.map +1 -1
  909. package/dist/dimensional/field-equation-helpers.js.map +1 -1
  910. package/dist/dimensional/formula-names.js.map +1 -1
  911. package/dist/dimensional/fresh-label.js.map +1 -1
  912. package/dist/dimensional/friedmann-equation.d.ts +3 -3
  913. package/dist/dimensional/friedmann-equation.js +3 -3
  914. package/dist/dimensional/friedmann-equation.js.map +1 -1
  915. package/dist/dimensional/gauge-field.d.ts +2 -3
  916. package/dist/dimensional/gauge-field.d.ts.map +1 -1
  917. package/dist/dimensional/gauge-field.js +2 -3
  918. package/dist/dimensional/gauge-field.js.map +1 -1
  919. package/dist/dimensional/hyphen-names.d.ts +12 -2
  920. package/dist/dimensional/hyphen-names.d.ts.map +1 -1
  921. package/dist/dimensional/hyphen-names.js +45 -12
  922. package/dist/dimensional/hyphen-names.js.map +1 -1
  923. package/dist/dimensional/killing-validators.js.map +1 -1
  924. package/dist/dimensional/klein-gordon-equation.js.map +1 -1
  925. package/dist/dimensional/metric-validators.d.ts +2 -1
  926. package/dist/dimensional/metric-validators.d.ts.map +1 -1
  927. package/dist/dimensional/metric-validators.js.map +1 -1
  928. package/dist/dimensional/metric.d.ts.map +1 -1
  929. package/dist/dimensional/metric.js +0 -1
  930. package/dist/dimensional/metric.js.map +1 -1
  931. package/dist/dimensional/natural-units.js.map +1 -1
  932. package/dist/dimensional/quantity-registry.d.ts +13 -0
  933. package/dist/dimensional/quantity-registry.d.ts.map +1 -1
  934. package/dist/dimensional/quantity-registry.js +14 -6
  935. package/dist/dimensional/quantity-registry.js.map +1 -1
  936. package/dist/dimensional/rg-flow.js.map +1 -1
  937. package/dist/dimensional/stress-energy-validators.js.map +1 -1
  938. package/dist/dimensional/symbolic-constants.d.ts +9 -0
  939. package/dist/dimensional/symbolic-constants.d.ts.map +1 -1
  940. package/dist/dimensional/symbolic-constants.js +20 -3
  941. package/dist/dimensional/symbolic-constants.js.map +1 -1
  942. package/dist/dimensional/tensor-trace.js.map +1 -1
  943. package/dist/dimensional/tensor.js.map +1 -1
  944. package/dist/dimensional/types.d.ts +36 -0
  945. package/dist/dimensional/types.d.ts.map +1 -1
  946. package/dist/dimensional/types.js +45 -7
  947. package/dist/dimensional/types.js.map +1 -1
  948. package/dist/dimensional/unit-convention.d.ts +0 -2
  949. package/dist/dimensional/unit-convention.d.ts.map +1 -1
  950. package/dist/dimensional/unit-convention.js +2 -2
  951. package/dist/dimensional/unit-convention.js.map +1 -1
  952. package/dist/dimensional/unit-data.d.ts.map +1 -1
  953. package/dist/dimensional/unit-data.js +11 -7
  954. package/dist/dimensional/unit-data.js.map +1 -1
  955. package/dist/dimensional/units.d.ts.map +1 -1
  956. package/dist/dimensional/units.js +38 -20
  957. package/dist/dimensional/units.js.map +1 -1
  958. package/dist/dimensional/validator-registry.js.map +1 -1
  959. package/dist/dimensional/validator.d.ts +0 -16
  960. package/dist/dimensional/validator.d.ts.map +1 -1
  961. package/dist/dimensional/validator.js +65 -29
  962. package/dist/dimensional/validator.js.map +1 -1
  963. package/dist/dimensional/weyl-validators.js.map +1 -1
  964. package/dist/index.d.ts +59 -8
  965. package/dist/index.d.ts.map +1 -1
  966. package/dist/index.js +22 -24
  967. package/dist/index.js.map +1 -1
  968. package/dist/numerical/bianchi-residual.js.map +1 -1
  969. package/dist/numerical/binding-value.d.ts +11 -6
  970. package/dist/numerical/binding-value.d.ts.map +1 -1
  971. package/dist/numerical/binding-value.js +126 -122
  972. package/dist/numerical/binding-value.js.map +1 -1
  973. package/dist/numerical/christoffel-flat.d.ts.map +1 -1
  974. package/dist/numerical/christoffel-flat.js +3 -2
  975. package/dist/numerical/christoffel-flat.js.map +1 -1
  976. package/dist/numerical/connection-lowering-helpers.js.map +1 -1
  977. package/dist/numerical/covariant-eikonal.d.ts.map +1 -1
  978. package/dist/numerical/covariant-eikonal.js +36 -13
  979. package/dist/numerical/covariant-eikonal.js.map +1 -1
  980. package/dist/numerical/curvature-lowering-helpers.d.ts +20 -0
  981. package/dist/numerical/curvature-lowering-helpers.d.ts.map +1 -1
  982. package/dist/numerical/curvature-lowering-helpers.js +9 -5
  983. package/dist/numerical/curvature-lowering-helpers.js.map +1 -1
  984. package/dist/numerical/derivative-lowering.js.map +1 -1
  985. package/dist/numerical/einstein-equation.js.map +1 -1
  986. package/dist/numerical/engine-registry.js.map +1 -1
  987. package/dist/numerical/errors.d.ts +7 -3
  988. package/dist/numerical/errors.d.ts.map +1 -1
  989. package/dist/numerical/errors.js +5 -8
  990. package/dist/numerical/errors.js.map +1 -1
  991. package/dist/numerical/evaluator-uncertainty.d.ts.map +1 -1
  992. package/dist/numerical/evaluator-uncertainty.js +19 -2
  993. package/dist/numerical/evaluator-uncertainty.js.map +1 -1
  994. package/dist/numerical/finite-difference.d.ts +22 -0
  995. package/dist/numerical/finite-difference.d.ts.map +1 -0
  996. package/dist/numerical/finite-difference.js +27 -0
  997. package/dist/numerical/finite-difference.js.map +1 -0
  998. package/dist/numerical/formula-contract.d.ts +63 -7
  999. package/dist/numerical/formula-contract.d.ts.map +1 -1
  1000. package/dist/numerical/formula-contract.js +61 -42
  1001. package/dist/numerical/formula-contract.js.map +1 -1
  1002. package/dist/numerical/formula-dimension.d.ts +8 -7
  1003. package/dist/numerical/formula-dimension.d.ts.map +1 -1
  1004. package/dist/numerical/formula-dimension.js +58 -36
  1005. package/dist/numerical/formula-dimension.js.map +1 -1
  1006. package/dist/numerical/formula-mathts.d.ts.map +1 -1
  1007. package/dist/numerical/formula-mathts.js +5 -2
  1008. package/dist/numerical/formula-mathts.js.map +1 -1
  1009. package/dist/numerical/formula-registry.d.ts +13 -3
  1010. package/dist/numerical/formula-registry.d.ts.map +1 -1
  1011. package/dist/numerical/formula-registry.js +7 -2
  1012. package/dist/numerical/formula-registry.js.map +1 -1
  1013. package/dist/numerical/geodesic-integrator.d.ts.map +1 -1
  1014. package/dist/numerical/geodesic-integrator.js +22 -14
  1015. package/dist/numerical/geodesic-integrator.js.map +1 -1
  1016. package/dist/numerical/geometrized.d.ts.map +1 -1
  1017. package/dist/numerical/geometrized.js +0 -1
  1018. package/dist/numerical/geometrized.js.map +1 -1
  1019. package/dist/numerical/gl4-integrator.d.ts +28 -27
  1020. package/dist/numerical/gl4-integrator.d.ts.map +1 -1
  1021. package/dist/numerical/gl4-integrator.js +41 -42
  1022. package/dist/numerical/gl4-integrator.js.map +1 -1
  1023. package/dist/numerical/grid-field.js.map +1 -1
  1024. package/dist/numerical/index.js.map +1 -1
  1025. package/dist/numerical/input-validation.d.ts +3 -6
  1026. package/dist/numerical/input-validation.d.ts.map +1 -1
  1027. package/dist/numerical/input-validation.js +4 -8
  1028. package/dist/numerical/input-validation.js.map +1 -1
  1029. package/dist/numerical/killing.d.ts +8 -5
  1030. package/dist/numerical/killing.d.ts.map +1 -1
  1031. package/dist/numerical/killing.js.map +1 -1
  1032. package/dist/numerical/klein-gordon.js.map +1 -1
  1033. package/dist/numerical/kretschmann.js.map +1 -1
  1034. package/dist/numerical/lowering-utils.js.map +1 -1
  1035. package/dist/numerical/lowering.d.ts.map +1 -1
  1036. package/dist/numerical/lowering.js +7 -17
  1037. package/dist/numerical/lowering.js.map +1 -1
  1038. package/dist/numerical/mathts-engine.d.ts.map +1 -1
  1039. package/dist/numerical/mathts-engine.js +16 -25
  1040. package/dist/numerical/mathts-engine.js.map +1 -1
  1041. package/dist/numerical/metric-inverse.d.ts.map +1 -1
  1042. package/dist/numerical/metric-inverse.js +83 -46
  1043. package/dist/numerical/metric-inverse.js.map +1 -1
  1044. package/dist/numerical/null-ic.js.map +1 -1
  1045. package/dist/numerical/null-ray-integrator.d.ts +2 -1
  1046. package/dist/numerical/null-ray-integrator.d.ts.map +1 -1
  1047. package/dist/numerical/null-ray-integrator.js +12 -12
  1048. package/dist/numerical/null-ray-integrator.js.map +1 -1
  1049. package/dist/numerical/painleve-gullstrand-metric.js +2 -2
  1050. package/dist/numerical/painleve-gullstrand-metric.js.map +1 -1
  1051. package/dist/numerical/pderiv.d.ts.map +1 -1
  1052. package/dist/numerical/pderiv.js +9 -2
  1053. package/dist/numerical/pderiv.js.map +1 -1
  1054. package/dist/numerical/perihelion-finder.d.ts +0 -36
  1055. package/dist/numerical/perihelion-finder.d.ts.map +1 -1
  1056. package/dist/numerical/perihelion-finder.js +41 -87
  1057. package/dist/numerical/perihelion-finder.js.map +1 -1
  1058. package/dist/numerical/quadrature.d.ts +5 -2
  1059. package/dist/numerical/quadrature.d.ts.map +1 -1
  1060. package/dist/numerical/quadrature.js +19 -4
  1061. package/dist/numerical/quadrature.js.map +1 -1
  1062. package/dist/numerical/rk4-trajectory.d.ts +10 -0
  1063. package/dist/numerical/rk4-trajectory.d.ts.map +1 -0
  1064. package/dist/numerical/rk4-trajectory.js +37 -0
  1065. package/dist/numerical/rk4-trajectory.js.map +1 -0
  1066. package/dist/numerical/schwarzschild.d.ts +14 -0
  1067. package/dist/numerical/schwarzschild.d.ts.map +1 -0
  1068. package/dist/numerical/schwarzschild.js +17 -0
  1069. package/dist/numerical/schwarzschild.js.map +1 -0
  1070. package/dist/numerical/spacetime-metrics.d.ts +25 -19
  1071. package/dist/numerical/spacetime-metrics.d.ts.map +1 -1
  1072. package/dist/numerical/spacetime-metrics.js +180 -286
  1073. package/dist/numerical/spacetime-metrics.js.map +1 -1
  1074. package/dist/numerical/statistics.d.ts +24 -0
  1075. package/dist/numerical/statistics.d.ts.map +1 -0
  1076. package/dist/numerical/statistics.js +52 -0
  1077. package/dist/numerical/statistics.js.map +1 -0
  1078. package/dist/numerical/strides.js.map +1 -1
  1079. package/dist/numerical/tensor-engine.d.ts +30 -5
  1080. package/dist/numerical/tensor-engine.d.ts.map +1 -1
  1081. package/dist/numerical/tensor-engine.js +12 -0
  1082. package/dist/numerical/tensor-engine.js.map +1 -1
  1083. package/dist/numerical/types.js.map +1 -1
  1084. package/dist/numerical/weyl-lowering.js.map +1 -1
  1085. package/dist/relations/category.js.map +1 -1
  1086. package/dist/relations/composition-table.d.ts +4 -4
  1087. package/dist/relations/composition-table.js +4 -4
  1088. package/dist/relations/composition-table.js.map +1 -1
  1089. package/dist/relations/conventions.js.map +1 -1
  1090. package/dist/relations/domain-regimes.js.map +1 -1
  1091. package/dist/relations/regime-registration.js.map +1 -1
  1092. package/dist/relations/regime-vocabularies.js.map +1 -1
  1093. package/dist/relations/regime.d.ts +28 -8
  1094. package/dist/relations/regime.d.ts.map +1 -1
  1095. package/dist/relations/regime.js +44 -15
  1096. package/dist/relations/regime.js.map +1 -1
  1097. package/dist/relations/types.d.ts +18 -5
  1098. package/dist/relations/types.d.ts.map +1 -1
  1099. package/dist/relations/types.js +5 -3
  1100. package/dist/relations/types.js.map +1 -1
  1101. package/package.json +16 -20
  1102. package/dist/bridges/registry.d.ts +0 -60
  1103. package/dist/bridges/registry.d.ts.map +0 -1
  1104. package/dist/bridges/registry.js +0 -87
  1105. package/dist/bridges/registry.js.map +0 -1
  1106. package/dist/cli/poster-source.d.ts +0 -154
  1107. package/dist/cli/poster-source.d.ts.map +0 -1
  1108. package/dist/cli/poster-source.js +0 -184
  1109. package/dist/cli/poster-source.js.map +0 -1
@@ -6,27 +6,43 @@
6
6
  * node uses the same mostly-plus signature. The Kretschmann scalar does not
7
7
  * depend on that choice.
8
8
  *
9
- * Schwarzschild Christoffel symbols are the closed form. Riemann, Ricci and
10
- * Kretschmann are a 4th-order finite difference of the metric, checked in
11
- * tests against the closed forms (Schwarzschild Kretschmann, flat-dust FLRW
12
- * Ricci scalar, Kerr Kretschmann). Kerr geodesics in Boyer–Lindquist
13
- * coordinates, including inclined ones, take their initial data from the
14
- * Carter constant and are integrated with the second-order geodesic equation.
9
+ * Schwarzschild and Kerr Christoffel symbols are closed forms; the Kerr
10
+ * ones come from the analytic metric derivatives through the one Christoffel
11
+ * builder (`computeChristoffelTensor`). Riemann, Ricci and Kretschmann are
12
+ * the finite-difference curvature stack of `curvature-lowering-helpers.ts`
13
+ * (`christoffelAt`, `riemannUpperAt`, `lowerFirstIndex`) and
14
+ * `computeKretschmann`, checked in tests against the closed forms
15
+ * (Schwarzschild Kretschmann, flat-dust FLRW Ricci scalar, Kerr
16
+ * Kretschmann). The metric inverse is MathTS `inv`. Kerr geodesics in
17
+ * Boyer–Lindquist coordinates, including inclined ones, take their initial
18
+ * data from the Carter constant and are integrated with the second-order
19
+ * geodesic equation by `integrateGeodesic` (`geodesic-integrator.ts`).
20
+ * This module holds no curvature or geodesic arithmetic of its own.
15
21
  *
16
22
  * @module numerical/spacetime-metrics
17
23
  * @internal
18
24
  */
19
- import { solveODESystem } from '@danielsimonjr/mathts-functions';
25
+ import { det, inv } from '@danielsimonjr/mathts-functions';
26
+ import { splitAssignment } from '../core/assignment.js';
27
+ import { relDiff, withinMixed } from '../core/compare.js';
28
+ import { numberFrom, numberMatrixFrom } from '../core/mathts-read.js';
20
29
  import { C_SI, G_SI, M_SUN_SI } from '../core/constants.js';
21
- import { DIMENSIONLESS, LENGTH, MASS, MASS_DENSITY, TIME, VELOCITY } from '../dimensional/types.js';
30
+ import { DIMENSIONLESS, GRAVITATIONAL_CONSTANT, LENGTH, MASS, MASS_DENSITY, TIME, VELOCITY } from '../dimensional/types.js';
31
+ import { UnitError } from '../dimensional/units.js';
22
32
  import { readParameter } from './binding-value.js';
23
- /** The signature this module differentiates. */
33
+ import { computeChristoffelTensor } from './connection-lowering-helpers.js';
34
+ import { christoffelAt, lowerFirstIndex, riemannUpperAt } from './curvature-lowering-helpers.js';
35
+ import { integrateGeodesic as integrateGeodesicRK4 } from './geodesic-integrator.js';
36
+ import { computeKretschmann } from './kretschmann.js';
37
+ import { MathTSEngine } from './mathts-engine.js';
38
+ import { schwarzschildRadius } from './schwarzschild.js';
39
+ /** The signature this module differentiates; `CurvatureReport.signature` is its type. */
24
40
  export const METRIC_SIGNATURE = '(-,+,+,+)';
25
41
  /**
26
42
  * Printed with every curvature report. The line element and the canonical
27
43
  * Einstein-equation metric node share this mostly-plus signature.
28
44
  */
29
- export const METRIC_SIGNATURE_NOTE = 'Line element signature (−,+,+,+), the same mostly-plus signature as the Schwarzschild fixture ' +
45
+ const METRIC_SIGNATURE_NOTE = 'Line element signature (−,+,+,+), the same mostly-plus signature as the Schwarzschild fixture ' +
30
46
  'and as the canonical Einstein-equation metric node. ' +
31
47
  'The Kretschmann scalar does not depend on that choice.';
32
48
  const Z = 1e-8;
@@ -36,145 +52,53 @@ function zeros(n) {
36
52
  function mat4() {
37
53
  return [zeros(4), zeros(4), zeros(4), zeros(4)];
38
54
  }
55
+ /** The engine the curvature helpers carry their tensors on. */
56
+ const ENGINE = new MathTSEngine();
57
+ /**
58
+ * The metric inverse, MathTS `inv`. A singular metric is this module's error,
59
+ * decided by MathTS `det` before the inverse is asked for, so no error text is
60
+ * read. `inv` and `det` are typed over every MathTS matrix kind, so their
61
+ * results are read back as the number and the 4×4 number array they are for a
62
+ * number[][] input.
63
+ */
39
64
  function invert4(src) {
40
- const a = src.map((row, i) => {
41
- const out = zeros(8);
42
- for (let j = 0; j < 4; j++)
43
- out[j] = row[j];
44
- out[4 + i] = 1;
45
- return out;
46
- });
47
- for (let col = 0; col < 4; col++) {
48
- let pivot = col;
49
- for (let r = col + 1; r < 4; r++) {
50
- if (Math.abs(a[r][col]) > Math.abs(a[pivot][col]))
51
- pivot = r;
52
- }
53
- const tmp = a[col];
54
- a[col] = a[pivot];
55
- a[pivot] = tmp;
56
- const div = a[col][col];
57
- if (!Number.isFinite(div) || Math.abs(div) < 1e-18)
58
- throw new Error('metric is singular at this point');
59
- for (let j = 0; j < 8; j++)
60
- a[col][j] = a[col][j] / div;
61
- for (let r = 0; r < 4; r++) {
62
- if (r === col)
63
- continue;
64
- const f = a[r][col];
65
- for (let j = 0; j < 8; j++)
66
- a[r][j] = a[r][j] - f * a[col][j];
67
- }
65
+ const determinant = numberFrom('det', det(src));
66
+ if (!Number.isFinite(determinant) || determinant === 0) {
67
+ throw new MetricValueError('metric is singular at this point');
68
68
  }
69
- return a.map((row) => row.slice(4));
70
- }
71
- function shift(x, mu, delta) {
72
- const y = [x[0], x[1], x[2], x[3]];
73
- y[mu] += delta;
74
- return y;
75
- }
76
- /** 4th-order central difference of a matrix-valued function. */
77
- function dMetric(g, x, mu, h) {
78
- const at = (s) => g(shift(x, mu, s * h));
79
- const a = at(-2);
80
- const b = at(-1);
81
- const c = at(1);
82
- const d = at(2);
83
- const out = mat4();
84
- for (let i = 0; i < 4; i++) {
85
- for (let j = 0; j < 4; j++) {
86
- const av = a[i][j];
87
- const bv = b[i][j];
88
- const cv = c[i][j];
89
- const dv = d[i][j];
90
- // A component that does not change must not differentiate a huge constant
91
- // (g_tt = −c²): the stencil cancels only up to a roundoff, and that
92
- // roundoff divided by h is a fake Christoffel.
93
- out[i][j] = av === bv && bv === cv && cv === dv ? 0 : (-dv + 8 * cv - 8 * bv + av) / (12 * h);
94
- }
69
+ try {
70
+ return numberMatrixFrom('inv', inv(src), 4);
71
+ }
72
+ catch (error) {
73
+ throw new Error('metric inverse is not a 4×4 matrix', { cause: error });
95
74
  }
96
- return out;
75
+ }
76
+ /** The nested-array closures the curvature helpers take, over a `MetricFn`. */
77
+ function closuresOf(g) {
78
+ const at = (x) => g([x[0], x[1], x[2], x[3]]);
79
+ return { gFn: at, gInverseFn: (x) => invert4(at(x)) };
97
80
  }
98
81
  function blankGamma() {
99
82
  return [0, 1, 2, 3].map(() => mat4());
100
83
  }
101
- /** A rank-4 array of numbers, indexed [a][b][c][d]. */
102
- function tensor4() {
103
- return [0, 1, 2, 3].map(() => [0, 1, 2, 3].map(() => [0, 1, 2, 3].map(() => [0, 0, 0, 0])));
104
- }
105
- function christoffelOf(g, x, steps) {
106
- const gi = invert4(g(x));
107
- const dg = [0, 1, 2, 3].map((mu) => dMetric(g, x, mu, steps[mu]));
108
- const G = blankGamma();
109
- for (let rho = 0; rho < 4; rho++) {
110
- for (let mu = 0; mu < 4; mu++) {
111
- for (let nu = mu; nu < 4; nu++) {
112
- let s = 0;
113
- for (let sigma = 0; sigma < 4; sigma++) {
114
- s += gi[rho][sigma] * (dg[mu][nu][sigma] + dg[nu][mu][sigma] - dg[sigma][mu][nu]);
115
- }
116
- const v = 0.5 * s;
117
- G[rho][mu][nu] = v;
118
- G[rho][nu][mu] = v;
119
- }
120
- }
121
- }
122
- return G;
84
+ /** Γ^ρ_{μν}(x) by the finite-difference Christoffel of the curvature helpers. */
85
+ function christoffelOf(g, x) {
86
+ const { gFn, gInverseFn } = closuresOf(g);
87
+ return christoffelAt(x, gFn, gInverseFn, 4, ENGINE);
123
88
  }
124
89
  /**
125
- * R^ρ_{σμν} = ∂_μ Γ^ρ_{νσ} − ∂_ν Γ^ρ_{μσ} + Γ^ρ_{μλ} Γ^λ_{νσ} − Γ^ρ_{νλ} Γ^λ_{μσ}.
126
- * Christoffel comes from a 4th-order difference of the metric; its coordinate
127
- * derivative is a central difference of that. Checked against the Schwarzschild
128
- * Kretschmann closed form.
90
+ * Christoffel, Ricci, the Ricci scalar and the Kretschmann scalar at `x`:
91
+ * `christoffelAt` and `riemannUpperAt` (the finite-difference Γ and R^ρ_{σμν}
92
+ * of the curvature helpers), the Ricci contraction R_{σν} = R^ρ_{σρν}, and
93
+ * `computeKretschmann` over the lowered Riemann. Checked against the
94
+ * Schwarzschild Kretschmann closed form.
129
95
  */
130
- function tensorsOf(g, x, steps) {
96
+ function tensorsOf(g, x) {
97
+ const { gFn, gInverseFn } = closuresOf(g);
131
98
  const g0 = g(x);
132
99
  const gi = invert4(g0);
133
- const gamma = christoffelOf(g, x, steps);
134
- const partial = [];
135
- for (let mu = 0; mu < 4; mu++) {
136
- const h = steps[mu];
137
- const plus = christoffelOf(g, shift(x, mu, h), steps);
138
- const minus = christoffelOf(g, shift(x, mu, -h), steps);
139
- const d = blankGamma();
140
- for (let rho = 0; rho < 4; rho++) {
141
- for (let a = 0; a < 4; a++) {
142
- for (let b = 0; b < 4; b++) {
143
- d[rho][a][b] = (plus[rho][a][b] - minus[rho][a][b]) / (2 * h);
144
- }
145
- }
146
- }
147
- partial.push(d);
148
- }
149
- const up = tensor4();
150
- for (let rho = 0; rho < 4; rho++) {
151
- for (let sigma = 0; sigma < 4; sigma++) {
152
- for (let mu = 0; mu < 4; mu++) {
153
- for (let nu = 0; nu < 4; nu++) {
154
- let s = partial[mu][rho][nu][sigma] - partial[nu][rho][mu][sigma];
155
- for (let lam = 0; lam < 4; lam++) {
156
- s +=
157
- gamma[rho][mu][lam] * gamma[lam][nu][sigma] -
158
- gamma[rho][nu][lam] * gamma[lam][mu][sigma];
159
- }
160
- up[rho][sigma][mu][nu] = s;
161
- }
162
- }
163
- }
164
- }
165
- const lower = tensor4();
166
- for (let a = 0; a < 4; a++) {
167
- for (let b = 0; b < 4; b++) {
168
- for (let c = 0; c < 4; c++) {
169
- for (let d = 0; d < 4; d++) {
170
- let s = 0;
171
- for (let rho = 0; rho < 4; rho++)
172
- s += g0[a][rho] * up[rho][b][c][d];
173
- lower[a][b][c][d] = s;
174
- }
175
- }
176
- }
177
- }
100
+ const gamma = christoffelAt(x, gFn, gInverseFn, 4, ENGINE);
101
+ const up = riemannUpperAt(x, gFn, gInverseFn, 4, ENGINE, gamma);
178
102
  const ricci = mat4();
179
103
  for (let sigma = 0; sigma < 4; sigma++) {
180
104
  for (let nu = 0; nu < 4; nu++) {
@@ -189,26 +113,8 @@ function tensorsOf(g, x, steps) {
189
113
  for (let b = 0; b < 4; b++)
190
114
  ricciScalar += gi[a][b] * ricci[a][b];
191
115
  }
192
- let kretschmann = 0;
193
- for (let a = 0; a < 4; a++) {
194
- for (let b = 0; b < 4; b++) {
195
- for (let c = 0; c < 4; c++) {
196
- for (let d = 0; d < 4; d++) {
197
- let raised = 0;
198
- for (let ap = 0; ap < 4; ap++) {
199
- for (let bp = 0; bp < 4; bp++) {
200
- for (let cp = 0; cp < 4; cp++) {
201
- for (let dp = 0; dp < 4; dp++) {
202
- raised += gi[a][ap] * gi[b][bp] * gi[c][cp] * gi[d][dp] * lower[ap][bp][cp][dp];
203
- }
204
- }
205
- }
206
- }
207
- kretschmann += lower[a][b][c][d] * raised;
208
- }
209
- }
210
- }
211
- }
116
+ const lower = lowerFirstIndex(up, g0.flat(), 4);
117
+ const kretschmann = computeKretschmann(lower, gi);
212
118
  return { ricciScalar, kretschmann, ricci, christoffel: gamma };
213
119
  }
214
120
  function nonzeroMatrix(m, label) {
@@ -243,11 +149,8 @@ function nonzeroGamma(G) {
243
149
  }
244
150
  return out;
245
151
  }
246
- function stepsFor(x) {
247
- return [Math.max(Math.abs(x[0]), 1) * 1e-4, Math.max(Math.abs(x[1]), 1) * 1e-4, 1e-4, 1e-4];
248
- }
249
152
  function schwarzschildMetric(M, c, G) {
250
- const rs = (2 * G * M) / (c * c);
153
+ const rs = schwarzschildRadius(M, G, c);
251
154
  return (x) => {
252
155
  const r = x[1];
253
156
  const th = x[2];
@@ -337,10 +240,25 @@ export class MetricMassError extends Error {
337
240
  this.name = 'MetricMassError';
338
241
  }
339
242
  }
243
+ /**
244
+ * A value the metric library refuses: a point inside the horizon or on a
245
+ * pole, a Kerr point inside the ring, an unknown or repeated parameter, a
246
+ * token that is not `key=value`, an orbit or geodesic start the closed forms
247
+ * do not admit, a Newton iteration that does not converge at the given
248
+ * point. The CLI maps this class to exit 1; any other class is a defect and
249
+ * is not converted.
250
+ * @internal
251
+ */
252
+ export class MetricValueError extends Error {
253
+ constructor(message) {
254
+ super(message);
255
+ this.name = 'MetricValueError';
256
+ }
257
+ }
340
258
  /** A mass that is not positive is not a source. */
341
259
  function requirePositiveMass(M) {
342
260
  if (!(M > 0))
343
- throw new MetricMassError(`${M <= 0 ? 'a non-positive' : 'a non-finite'} mass is not a source: the metric needs a positive mass`);
261
+ throw new MetricMassError(`${M <= 0 ? 'a non-positive' : 'a non-finite'} mass (M = ${M} kg) is not a source: the metric needs a positive mass`);
344
262
  }
345
263
  /**
346
264
  * The polar angle is a point of the spherical chart only on the open interval
@@ -350,14 +268,14 @@ function requirePositiveMass(M) {
350
268
  */
351
269
  function requirePolarInterior(theta) {
352
270
  if (!(theta > 0 && theta < Math.PI && Math.sin(theta) > 1e-9)) {
353
- throw new Error(`θ must be strictly between 0 and π (got ${theta}): the poles are coordinate singularities of the spherical chart`);
271
+ throw new MetricValueError(`θ must be strictly between 0 and π (got ${theta}): the poles are coordinate singularities of the spherical chart`);
354
272
  }
355
273
  }
356
274
  /** SI dimension of each metric parameter. A bare number is already in that unit. */
357
275
  const PARAM_DIM = {
358
276
  M: MASS,
359
277
  c: VELOCITY,
360
- G: { L: 3, M: -1, T: -2, I: 0, Theta: 0, N: 0, J: 0 },
278
+ G: GRAVITATIONAL_CONSTANT,
361
279
  r: LENGTH,
362
280
  a: LENGTH,
363
281
  t: TIME,
@@ -371,17 +289,30 @@ const PARAM_DIM = {
371
289
  rho: MASS_DENSITY,
372
290
  };
373
291
  /** Parse `key=value` pairs. A value is a number, a unit, or a constant expression. @internal */
374
- export function metricParams(pairs, defaults) {
292
+ function metricParams(pairs, defaults) {
375
293
  const values = { ...defaults };
376
294
  const notes = [];
295
+ const seen = new Set();
377
296
  for (const pair of pairs) {
378
- const eq = pair.indexOf('=');
379
- if (eq <= 0)
380
- throw new Error(`'${pair}' must be key=value`);
381
- const key = pair.slice(0, eq);
297
+ const split = splitAssignment(pair);
298
+ if (split === null)
299
+ throw new MetricValueError(`'${pair}' must be key=value`);
300
+ const key = split.name;
382
301
  if (!(key in defaults))
383
- throw new Error(`unknown parameter '${key}' (expected ${Object.keys(defaults).join(', ')})`);
384
- const read = readParameter(pair.slice(eq + 1), PARAM_DIM[key] ?? DIMENSIONLESS);
302
+ throw new MetricValueError(`unknown parameter '${key}' (expected ${Object.keys(defaults).join(', ')})`);
303
+ if (seen.has(key))
304
+ throw new MetricValueError(`'${key}' is given twice ('${pair}'); give one value per parameter`);
305
+ seen.add(key);
306
+ let read;
307
+ try {
308
+ read = readParameter(split.raw, PARAM_DIM[key] ?? DIMENSIONLESS);
309
+ }
310
+ catch (e) {
311
+ // The reader knows the text and the dimension it was given, not which parameter held them.
312
+ if (e instanceof UnitError)
313
+ throw new UnitError(`parameter ${key}: ${e.message}`);
314
+ throw e;
315
+ }
385
316
  values[key] = read.value;
386
317
  for (const note of read.notes)
387
318
  if (!notes.includes(note))
@@ -405,7 +336,7 @@ export function curvatureReport(metric, pairs = []) {
405
336
  return m;
406
337
  };
407
338
  const x = [p.t, p.r, p.theta, p.phi];
408
- const t = tensorsOf(g, x, stepsFor(x));
339
+ const t = tensorsOf(g, x);
409
340
  return stateCurvature(pack('minkowski', p, x, t, { ricciScalar: 0, kretschmann: 0 }, [
410
341
  'Minkowski in Cartesian-like coordinates (the angular part is not a sphere here; g_θθ = g_φφ = 1).',
411
342
  ...notes,
@@ -416,14 +347,14 @@ export function curvatureReport(metric, pairs = []) {
416
347
  const { values: p, notes } = metricParams(pairs, { M: M_SUN_SI, c: C_SI, G: G_SI, r: Number.NaN, theta: Math.PI / 2, phi: 0, t: 0 });
417
348
  requirePositiveMass(p.M);
418
349
  requirePolarInterior(p.theta);
419
- const rs = (2 * p.G * p.M) / (p.c * p.c);
350
+ const rs = schwarzschildRadius(p.M, p.G, p.c);
420
351
  if (Number.isNaN(p.r))
421
352
  p.r = 10 * rs;
422
353
  if (!(p.r > rs))
423
- throw new Error(`r must be outside the horizon (r_s = ${rs})`);
354
+ throw new MetricValueError(`r must be outside the horizon (r = ${p.r} m, r_s = ${rs} m)`);
424
355
  const g = schwarzschildMetric(p.M, p.c, p.G);
425
356
  const x = [p.t, p.r, p.theta, p.phi];
426
- const t = tensorsOf(g, x, stepsFor(x));
357
+ const t = tensorsOf(g, x);
427
358
  const K = schwarzschildKretschmann(p.M, p.r, p.c, p.G);
428
359
  return stateCurvature(pack('schwarzschild', p, x, t, { kretschmann: K, ricciScalar: 0, horizon_m: rs }, [
429
360
  'Closed form: Kretschmann = 48 G² M² / (c⁴ r⁶), Ricci = 0.',
@@ -456,8 +387,8 @@ export function curvatureReport(metric, pairs = []) {
456
387
  // Christoffel in the SI metric. Ricci and Kretschmann are computed at c = 1
457
388
  // and divided by c² and c⁴: g_tt = −c² makes those scalars smaller than the
458
389
  // roundoff of an SI finite difference.
459
- const tSi = tensorsOf(g, x, stepsFor(x));
460
- const t1 = p.c === 1 ? tSi : tensorsOf(flrwMetric(p.a0, p.t0, p.n, p.k, 1), x, stepsFor(x));
390
+ const tSi = tensorsOf(g, x);
391
+ const t1 = p.c === 1 ? tSi : tensorsOf(flrwMetric(p.a0, p.t0, p.n, p.k, 1), x);
461
392
  const c2 = p.c * p.c;
462
393
  const t = {
463
394
  christoffel: tSi.christoffel,
@@ -502,12 +433,12 @@ export function curvatureReport(metric, pairs = []) {
502
433
  if (Number.isNaN(p.r))
503
434
  p.r = 10 * Mgeom;
504
435
  if (!(p.r > 0))
505
- throw new Error(`r must be positive and outside the singularity (got ${p.r})`);
436
+ throw new MetricValueError(`r must be positive and outside the singularity (got r = ${p.r} m)`);
506
437
  if (Math.abs(p.a) >= p.r)
507
- throw new Error('Kerr finite difference wants |a| < r and r outside the ring');
438
+ throw new MetricValueError('Kerr finite difference wants |a| < r and r outside the ring');
508
439
  const g = kerrMetric(Mgeom, p.a);
509
440
  const x = [p.t, p.r, p.theta, p.phi];
510
- const t = tensorsOf(g, x, stepsFor(x));
441
+ const t = tensorsOf(g, x);
511
442
  const K = kerrKretschmann(Mgeom, p.r, p.a, p.theta);
512
443
  const aOverM = p.a / Mgeom;
513
444
  const kerrNotes = [
@@ -524,7 +455,6 @@ export function curvatureReport(metric, pairs = []) {
524
455
  'Geodesics (--geodesic) use the Carter constant. θ = π/2 is an equatorial circular orbit. Any other θ is an inclined spherical orbit with that polar turning point. ISCO and photon radii are closed forms in r/M.',
525
456
  ]));
526
457
  }
527
- const relDiff = (got, want) => Math.abs(got - want) / Math.max(Math.abs(want), 1e-30);
528
458
  /**
529
459
  * The headline Ricci scalar is the closed form when the finite difference
530
460
  * does not match it. A vacuum metric's finite-difference residual is not
@@ -540,14 +470,14 @@ function stateCurvature(report) {
540
470
  ricci = [];
541
471
  notes.push('Ricci is 0 for this vacuum metric. A finite-difference residual is not listed.');
542
472
  }
543
- else if (exactR !== undefined && relDiff(report.ricciScalar, exactR) > 1e-2) {
473
+ else if (exactR !== undefined && relDiff(report.ricciScalar, exactR, 1e-30) > 1e-2) {
544
474
  ricciScalar = exactR;
545
475
  ricci = [];
546
476
  notes.push('Ricci scalar is the closed form. The finite-difference scalar, restored from a c = 1 difference by 1/c², does not match it when spatial curvature is present, so those components are not listed.');
547
477
  }
548
478
  const H2 = report.closedForm.H2;
549
479
  const rhs = report.closedForm.friedmannRhs;
550
- if (H2 !== undefined && rhs !== undefined && relDiff(H2, rhs) > 1e-6) {
480
+ if (H2 !== undefined && rhs !== undefined && relDiff(H2, rhs, 1e-30) > 1e-6) {
551
481
  notes.push('H² and the Friedmann right-hand side differ, so this scale factor is not a solution of the Friedmann equation at the stated ρ, k and Λ. k is a curvature in 1/length²: k = 1 with c in m/s is a curvature radius of about a metre, not the dimensionless k = ±1 of geometrized cosmology.');
552
482
  }
553
483
  return { ...report, ricci, ricciScalar, notes };
@@ -589,52 +519,13 @@ export function schwarzschildCircularOrbit(opts) {
589
519
  const ut = 1 / Math.sqrt(1 - (3 * rs) / (2 * r0));
590
520
  const uphi = Omega * ut;
591
521
  if (!(f > 0) || !Number.isFinite(ut))
592
- throw new Error('circular orbit needs r > 1.5 r_s');
593
- // Analytic Γ for the equatorial circular orbit (θ = π/2, sin = 1, cos = 0).
594
- // Equatorial reduction. The polar symbols that carry cot θ are omitted:
595
- // a floating-point step off θ = π/2 makes cot θ explode.
596
- const gamma = (r) => {
597
- const ff = 1 - rs / r;
598
- const Gma = blankGamma();
599
- const set = (rho, mu, nu, v) => {
600
- Gma[rho][mu][nu] = v;
601
- Gma[rho][nu][mu] = v;
602
- };
603
- set(0, 0, 1, rs / (2 * r * (r - rs)));
604
- set(1, 0, 0, (rs * ff) / (2 * r * r));
605
- set(1, 1, 1, -rs / (2 * r * (r - rs)));
606
- set(1, 2, 2, -(r - rs));
607
- set(1, 3, 3, -(r - rs));
608
- set(2, 1, 2, 1 / r);
609
- set(3, 1, 3, 1 / r);
610
- return Gma;
611
- };
612
- // state: t, r, th, phi, ut, ur, uth, uphi
613
- let y = [0, r0, Math.PI / 2, 0, ut, 0, 0, uphi];
614
- const accel = (s) => {
615
- const Gma = gamma(s[1]);
616
- const u = [s[4], s[5], s[6], s[7]];
617
- const du = [0, 0, 0, 0];
618
- for (let rho = 0; rho < 4; rho++) {
619
- let sum = 0;
620
- for (let mu = 0; mu < 4; mu++) {
621
- for (let nu = 0; nu < 4; nu++)
622
- sum += Gma[rho][mu][nu] * u[mu] * u[nu];
623
- }
624
- du[rho] = -sum;
625
- }
626
- return [u[0], u[1], u[2], u[3], du[0], du[1], du[2], du[3]];
627
- };
522
+ throw new MetricValueError('circular orbit needs r > 1.5 r_s');
523
+ // The closed-form Schwarzschild Christoffel symbols, polar terms included:
524
+ // with u^θ = 0 and θ = π/2 the polar terms stay zero to roundoff.
628
525
  const period = (2 * Math.PI) / uphi;
629
526
  const fraction = opts?.fraction ?? 0.02;
630
527
  const steps = 400;
631
- const h = (period * fraction) / steps;
632
- for (let n = 0; n < steps; n++) {
633
- const sol = solveODESystem((_t, s) => accel(s), y, [0, h], { dt: h });
634
- y = (sol.y[sol.y.length - 1] ?? y).slice();
635
- y[2] = Math.PI / 2;
636
- y[6] = 0;
637
- }
528
+ const y = integrateWithChristoffel((r, theta) => schwarzschildChristoffel(M, r, theta), [0, r0, Math.PI / 2, 0, ut, 0, 0, uphi], period * fraction, steps);
638
529
  return { r0, rEnd: y[1], phiAdvance: y[3], steps };
639
530
  }
640
531
  /**
@@ -646,7 +537,7 @@ export function schwarzschildCircularOrbit(opts) {
646
537
  export function kerrIscoRadius(aOverM) {
647
538
  const chi = aOverM;
648
539
  if (!(Math.abs(chi) <= 1))
649
- throw new Error('|a/M| must be at most 1');
540
+ throw new MetricValueError('|a/M| must be at most 1');
650
541
  const z1 = 1 + Math.cbrt(1 - chi * chi) * (Math.cbrt(1 + chi) + Math.cbrt(1 - chi));
651
542
  const z2 = Math.sqrt(3 * chi * chi + z1 * z1);
652
543
  const inner = Math.sqrt((3 - z1) * (3 + z1 + 2 * z2));
@@ -660,7 +551,7 @@ export function kerrIscoRadius(aOverM) {
660
551
  export function kerrPhotonRadius(aOverM) {
661
552
  const chi = aOverM;
662
553
  if (!(Math.abs(chi) <= 1))
663
- throw new Error('|a/M| must be at most 1');
554
+ throw new MetricValueError('|a/M| must be at most 1');
664
555
  return {
665
556
  prograde: 2 * (1 + Math.cos((2 / 3) * Math.acos(-chi))),
666
557
  retrograde: 2 * (1 + Math.cos((2 / 3) * Math.acos(chi))),
@@ -686,7 +577,7 @@ function equatorialCircular(M, a, r, prograde) {
686
577
  const g0 = kerrMetric(M, a)([0, r, Math.PI / 2, 0]);
687
578
  const norm = -(g0[0][0] + 2 * Omega * g0[0][3] + Omega * Omega * g0[3][3]);
688
579
  if (!(norm > 0) || !Number.isFinite(Omega))
689
- throw new Error('circular orbit is not timelike at this radius');
580
+ throw new MetricValueError('circular orbit is not timelike at this radius');
690
581
  const ut = 1 / Math.sqrt(norm);
691
582
  const uphi = Omega * ut;
692
583
  return {
@@ -729,7 +620,7 @@ function solveSpherical(M, a, r, Q, mu2, prograde) {
729
620
  const det = j11 * j22 - j12 * j21;
730
621
  const scale = Math.max(1, Math.abs(j11), Math.abs(j12), Math.abs(j21), Math.abs(j22));
731
622
  if (!Number.isFinite(det) || Math.abs(det) < 1e-18 * scale * scale)
732
- throw new Error('spherical-orbit Jacobian is singular');
623
+ throw new MetricValueError('spherical-orbit Jacobian is singular');
733
624
  const stepE = (j22 * f1 - j12 * f2) / det;
734
625
  const stepL = (-j21 * f1 + j11 * f2) / det;
735
626
  E -= stepE;
@@ -743,7 +634,7 @@ function solveSpherical(M, a, r, Q, mu2, prograde) {
743
634
  if (settled)
744
635
  return { E, L: L * M };
745
636
  }
746
- throw new Error('spherical orbit did not converge');
637
+ throw new MetricValueError('spherical orbit did not converge');
747
638
  }
748
639
  /**
749
640
  * Timelike spherical orbit at fixed r: R = R' = 0. `Q` is the Carter constant
@@ -754,7 +645,7 @@ export function kerrSphericalTimelike(opts) {
754
645
  const M = opts?.M ?? 1;
755
646
  const chi = opts?.aOverM ?? 0;
756
647
  if (!(M > 0) || !(Math.abs(chi) <= 1))
757
- throw new Error('spherical orbit wants M > 0 and |a/M| ≤ 1');
648
+ throw new MetricValueError('spherical orbit wants M > 0 and |a/M| ≤ 1');
758
649
  const a = chi * M;
759
650
  const r = (opts?.rOverM ?? 10) * M;
760
651
  const Q = opts?.Q ?? 0;
@@ -778,26 +669,26 @@ export function kerrSphericalPhoton(opts) {
778
669
  const chi = opts?.aOverM ?? 0;
779
670
  const rHat = opts?.rOverM;
780
671
  if (!(M > 0) || !(Math.abs(chi) > 0 && Math.abs(chi) <= 1))
781
- throw new Error('spherical photon orbit wants M > 0 and 0 < |a/M| ≤ 1');
672
+ throw new MetricValueError('spherical photon orbit wants M > 0 and 0 < |a/M| ≤ 1');
782
673
  if (rHat === undefined)
783
- throw new Error('spherical photon orbit needs rOverM');
674
+ throw new MetricValueError('spherical photon orbit needs rOverM');
784
675
  const ends = kerrPhotonRadius(chi);
785
676
  const lo = Math.min(ends.prograde, ends.retrograde);
786
677
  const hi = Math.max(ends.prograde, ends.retrograde);
787
678
  if (!(rHat >= lo - 1e-9 && rHat <= hi + 1e-9)) {
788
- throw new Error('spherical photon radius lies between the prograde and retrograde photon orbits');
679
+ throw new MetricValueError('spherical photon radius lies between the prograde and retrograde photon orbits');
789
680
  }
790
681
  const a = chi * M;
791
682
  const r = rHat * M;
792
683
  if (!(Math.abs(r - M) > 1e-9 * M))
793
- throw new Error('extremal prograde photon orbit sits on the horizon');
684
+ throw new MetricValueError('extremal prograde photon orbit sits on the horizon');
794
685
  const Delta = r * r - 2 * M * r + a * a;
795
686
  const E = 1;
796
687
  const L = E * ((r * r + a * a) / a - (2 * r * Delta) / (a * (r - M)));
797
688
  const P = E * (r * r + a * a) - a * L;
798
689
  const Q = (P * P) / Delta - (L - a * E) ** 2;
799
690
  if (Q < -1e-8 * M * M)
800
- throw new Error('no spherical photon orbit at this radius');
691
+ throw new MetricValueError('no spherical photon orbit at this radius');
801
692
  return { E, L, Q: Q < 0 ? 0 : Q };
802
693
  }
803
694
  /**
@@ -809,14 +700,14 @@ export function kerrTurningPointOrbit(opts) {
809
700
  const M = opts.M ?? 1;
810
701
  const chi = opts.aOverM ?? 0;
811
702
  if (!(M > 0) || !(Math.abs(chi) <= 1))
812
- throw new Error('turning-point orbit wants M > 0 and |a/M| ≤ 1');
703
+ throw new MetricValueError('turning-point orbit wants M > 0 and |a/M| ≤ 1');
813
704
  const a = chi * M;
814
705
  const r = (opts.rOverM ?? 10) * M;
815
706
  const theta = opts.theta;
816
707
  const s = Math.sin(theta);
817
708
  const c = Math.cos(theta);
818
709
  if (!(Math.abs(s) > 1e-3) || !(Math.abs(c) > 1e-4)) {
819
- throw new Error('turning-point θ must sit off the equator and off the pole');
710
+ throw new MetricValueError('turning-point θ must sit off the equator and off the pole');
820
711
  }
821
712
  const seed = equatorialCircular(M, a, r, opts.prograde !== false);
822
713
  let Q = seed.L * seed.L * c * c;
@@ -828,12 +719,12 @@ export function kerrTurningPointOrbit(opts) {
828
719
  L = solved.L;
829
720
  const next = c * c * (a * a * (1 - E * E) + (L * L) / (s * s));
830
721
  if (!Number.isFinite(next) || next < 0)
831
- throw new Error('turning-point Carter constant left the physical range');
832
- if (Math.abs(next - Q) <= 1e-9 * Math.max(1, Math.abs(next)))
722
+ throw new MetricValueError('turning-point Carter constant left the physical range');
723
+ if (withinMixed(Q, next, 1e-9))
833
724
  return { E, L, Q: next };
834
725
  Q = next;
835
726
  }
836
- throw new Error('turning-point Carter constant did not converge');
727
+ throw new MetricValueError('turning-point Carter constant did not converge');
837
728
  }
838
729
  function kerrMetricDerivatives(M, a, r, theta) {
839
730
  const c = Math.cos(theta);
@@ -863,26 +754,15 @@ function kerrMetricDerivatives(M, a, r, theta) {
863
754
  dth[3][3] = ((2 * s * c * A + s * s * dAt) * Sigma - s * s * A * dSt) / Sigma2;
864
755
  return { dr, dth };
865
756
  }
757
+ /**
758
+ * Γ^ρ_{μν} from a metric and its analytic partial derivatives, through the
759
+ * one Christoffel builder (`computeChristoffelTensor`). A `null` derivative
760
+ * is a coordinate the metric does not depend on.
761
+ */
866
762
  function christoffelFrom(g, dg) {
867
- const gi = invert4(g);
868
- const G = blankGamma();
869
- for (let rho = 0; rho < 4; rho++) {
870
- for (let mu = 0; mu < 4; mu++) {
871
- for (let nu = mu; nu < 4; nu++) {
872
- let s = 0;
873
- for (let sigma = 0; sigma < 4; sigma++) {
874
- const dmu = dg[mu]?.[nu][sigma] ?? 0;
875
- const dnu = dg[nu]?.[mu][sigma] ?? 0;
876
- const dsig = dg[sigma]?.[mu][nu] ?? 0;
877
- s += gi[rho][sigma] * (dmu + dnu - dsig);
878
- }
879
- const v = 0.5 * s;
880
- G[rho][mu][nu] = v;
881
- G[rho][nu][mu] = v;
882
- }
883
- }
884
- }
885
- return G;
763
+ const gInverseFlat = invert4(g).flat();
764
+ const tensor = computeChristoffelTensor(gInverseFlat, (mu) => (dg[mu] ?? mat4()).flat(), 4, ENGINE);
765
+ return ENGINE.toNested(tensor);
886
766
  }
887
767
  function kerrChristoffel(M, a, r, theta) {
888
768
  const partial = kerrMetricDerivatives(M, a, r, theta);
@@ -892,7 +772,7 @@ function kerrChristoffel(M, a, r, theta) {
892
772
  export function kerrChristoffelFdGap(M, a, r, theta) {
893
773
  const x = [0, r, theta, 0];
894
774
  const analytic = kerrChristoffel(M, a, r, theta);
895
- const fd = christoffelOf(kerrMetric(M, a), x, stepsFor(x));
775
+ const fd = christoffelOf(kerrMetric(M, a), x);
896
776
  let gap = 0;
897
777
  for (let rho = 0; rho < 4; rho++) {
898
778
  for (let mu = 0; mu < 4; mu++) {
@@ -942,18 +822,18 @@ function carterState(M, a, r, theta, E, L, Q, mu2, signR, signTheta, allowOffShe
942
822
  const c = Math.cos(theta);
943
823
  const s = Math.sin(theta);
944
824
  if (!(Math.abs(s) > 1e-6))
945
- throw new Error('Boyer–Lindquist geodesic wants θ away from the poles');
825
+ throw new MetricValueError('Boyer–Lindquist geodesic wants θ away from the poles');
946
826
  const Sigma = r * r + a * a * c * c;
947
827
  const Delta = r * r - 2 * M * r + a * a;
948
828
  if (!(Delta > 0))
949
- throw new Error('geodesic start must be outside the horizon');
829
+ throw new MetricValueError('geodesic start must be outside the horizon');
950
830
  const R = radialPotential(M, a, r, E, L, Q, mu2);
951
831
  const Theta = Q - c * c * (a * a * (mu2 - E * E) + (L * L) / (s * s));
952
832
  const scale = Math.max(1, E * E, L * L, Math.abs(Q));
953
833
  if (R < -1e-8 * scale && !allowOffShell)
954
- throw new Error('radial potential is negative at the start');
834
+ throw new MetricValueError('radial potential is negative at the start');
955
835
  if (Theta < -1e-8 * scale && !allowOffShell)
956
- throw new Error('polar potential is negative at the start');
836
+ throw new MetricValueError('polar potential is negative at the start');
957
837
  const g = kerrMetric(M, a)([0, r, theta, 0]);
958
838
  const det = g[0][0] * g[3][3] - g[0][3] * g[0][3];
959
839
  const ut = (g[3][3] * -E - g[0][3] * L) / det;
@@ -962,24 +842,38 @@ function carterState(M, a, r, theta, E, L, Q, mu2, signR, signTheta, allowOffShe
962
842
  const uth = signTheta * Math.sqrt(Math.max(Theta, 0)) / Sigma;
963
843
  return [0, r, theta, 0, ut, ur, uth, uphi];
964
844
  }
965
- function integrateGeodesic(gammaAt, y0, fraction, steps) {
966
- const accel = (s) => {
967
- const Gma = gammaAt(s[1], s[2]);
968
- const u = [s[4], s[5], s[6], s[7]];
969
- const du = [0, 0, 0, 0];
970
- for (let rho = 0; rho < 4; rho++) {
971
- let sum = 0;
972
- for (let mu = 0; mu < 4; mu++)
973
- for (let nu = 0; nu < 4; nu++)
974
- sum += Gma[rho][mu][nu] * u[mu] * u[nu];
975
- du[rho] = -sum;
845
+ /**
846
+ * The state `[t, r, θ, φ, u^t, u^r, u^θ, u^φ]` after `steps` RK4 steps of
847
+ * the second-order geodesic equation over an affine extent `tauEnd`, by
848
+ * `integrateGeodesic` of `geodesic-integrator.ts` with `gammaAt` packed into
849
+ * its flat layout `G[16·μ + 4·ν + ρ] = Γ^μ_{νρ}`.
850
+ */
851
+ function integrateWithChristoffel(gammaAt, y0, tauEnd, steps) {
852
+ const christoffelFn = (x, out) => {
853
+ const flat = out ?? new Float64Array(64);
854
+ const gamma = gammaAt(x[1], x[2]);
855
+ for (let mu = 0; mu < 4; mu++) {
856
+ for (let nu = 0; nu < 4; nu++) {
857
+ for (let rho = 0; rho < 4; rho++)
858
+ flat[16 * mu + 4 * nu + rho] = gamma[mu][nu][rho];
859
+ }
976
860
  }
977
- return [u[0], u[1], u[2], u[3], du[0], du[1], du[2], du[3]];
861
+ return flat;
978
862
  };
863
+ const result = integrateGeodesicRK4({
864
+ christoffelFn,
865
+ x0: [y0[0], y0[1], y0[2], y0[3]],
866
+ v0: [y0[4], y0[5], y0[6], y0[7]],
867
+ tauStart: 0,
868
+ tauEnd,
869
+ steps,
870
+ });
871
+ return [...result.xFinal, ...result.vFinal];
872
+ }
873
+ /** `fraction` of an orbit's angular period, from the start's angular rate. */
874
+ function orbitExtent(y0, fraction) {
979
875
  const angular = Math.max(Math.abs(y0[7]), Math.abs(y0[6]), 1e-12);
980
- const h = ((2 * Math.PI) / angular) * fraction / steps;
981
- const sol = solveODESystem((_t, s) => accel(s), y0.slice(), [0, steps * h], { dt: h });
982
- return sol.y[sol.y.length - 1] ?? y0.slice();
876
+ return ((2 * Math.PI) / angular) * fraction;
983
877
  }
984
878
  function sampleOf(metric, a, y0, y1, steps, mu2) {
985
879
  const start = conservedOf(metric, a, y0, mu2);
@@ -1015,7 +909,7 @@ export function kerrGeodesic(opts) {
1015
909
  const M = opts.M ?? 1;
1016
910
  const chi = opts.aOverM ?? 0;
1017
911
  if (!(M > 0) || !(Math.abs(chi) <= 1))
1018
- throw new Error('Kerr geodesic wants M > 0 and |a/M| ≤ 1');
912
+ throw new MetricValueError('Kerr geodesic wants M > 0 and |a/M| ≤ 1');
1019
913
  const a = chi * M;
1020
914
  const r = (opts.rOverM ?? 10) * M;
1021
915
  const theta = opts.theta ?? Math.PI / 2;
@@ -1024,7 +918,7 @@ export function kerrGeodesic(opts) {
1024
918
  const fraction = opts.fraction ?? 0.01;
1025
919
  const metric = kerrMetric(M, a);
1026
920
  const y0 = carterState(M, a, r, theta, opts.E, opts.L, opts.Q, mu2, opts.signR ?? 1, opts.signTheta ?? 1, opts.allowOffShell === true);
1027
- const y1 = integrateGeodesic((rr, th) => kerrChristoffel(M, a, rr, th), y0, fraction, steps);
921
+ const y1 = integrateWithChristoffel((rr, th) => kerrChristoffel(M, a, rr, th), y0, orbitExtent(y0, fraction), steps);
1028
922
  return sampleOf(metric, a, y0, y1, steps, mu2);
1029
923
  }
1030
924
  /**
@@ -1036,14 +930,14 @@ export function kerrGeodesic(opts) {
1036
930
  export function schwarzschildGeodesic(opts) {
1037
931
  const M = opts.M ?? 1;
1038
932
  if (!(M > 0))
1039
- throw new Error('Schwarzschild geodesic wants M > 0');
933
+ throw new MetricValueError('Schwarzschild geodesic wants M > 0');
1040
934
  const r = (opts.rOverM ?? 10) * M;
1041
935
  const theta = opts.theta ?? Math.PI / 2;
1042
936
  const steps = opts.steps ?? 80;
1043
937
  const fraction = opts.fraction ?? 0.01;
1044
938
  const metric = schwarzschildMetric(M, 1, 1);
1045
939
  const y0 = carterState(M, 0, r, theta, opts.E, opts.L, opts.Q, 1, opts.signR ?? 1, opts.signTheta ?? 1, false);
1046
- const y1 = integrateGeodesic((rr, th) => schwarzschildChristoffel(M, rr, th), y0, fraction, steps);
940
+ const y1 = integrateWithChristoffel((rr, th) => schwarzschildChristoffel(M, rr, th), y0, orbitExtent(y0, fraction), steps);
1047
941
  return sampleOf(metric, 0, y0, y1, steps, 1);
1048
942
  }
1049
943
  /**
@@ -1057,7 +951,7 @@ export function kerrEquatorialCircular(opts) {
1057
951
  const chi = opts?.aOverM ?? 0;
1058
952
  const rOverM = opts?.rOverM ?? 10;
1059
953
  if (!(M > 0) || !(Math.abs(chi) <= 1))
1060
- throw new Error('|a/M| must be at most 1');
954
+ throw new MetricValueError('|a/M| must be at most 1');
1061
955
  const eq = equatorialCircular(M, chi * M, rOverM * M, opts?.prograde !== false);
1062
956
  return kerrGeodesic({
1063
957
  M,