universal-physics-tensor 10.0.0 → 12.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 (835) hide show
  1. package/README.md +39 -36
  2. package/bin/upt.mjs +13 -1
  3. package/data/applied-cases.json +1892 -0
  4. package/data/applied-cases.schema.json +194 -0
  5. package/data/atlas/atlas.json +25 -25
  6. package/data/atlas/atlas.jsonld +1 -1
  7. package/data/atlas/diffusion.json +6 -6
  8. package/data/atlas/oscillators.json +7 -7
  9. package/data/atlas/waves.json +14 -14
  10. package/data/atlas/witness-results.json +11 -11
  11. package/data/bridge-catalog.json +389 -230
  12. package/data/bridge-catalog.schema.json +45 -7
  13. package/data/units.json +6 -25
  14. package/dist/atlas/applicability.d.ts.map +1 -1
  15. package/dist/atlas/applicability.js +21 -15
  16. package/dist/atlas/applicability.js.map +1 -1
  17. package/dist/atlas/benchmark/hybrid-retrieval.d.ts +9 -1
  18. package/dist/atlas/benchmark/hybrid-retrieval.d.ts.map +1 -1
  19. package/dist/atlas/benchmark/hybrid-retrieval.js +15 -13
  20. package/dist/atlas/benchmark/hybrid-retrieval.js.map +1 -1
  21. package/dist/atlas/benchmark/loader.js +2 -2
  22. package/dist/atlas/benchmark/loader.js.map +1 -1
  23. package/dist/atlas/benchmark/stats.d.ts +2 -2
  24. package/dist/atlas/benchmark/stats.d.ts.map +1 -1
  25. package/dist/atlas/benchmark/stats.js +9 -15
  26. package/dist/atlas/benchmark/stats.js.map +1 -1
  27. package/dist/atlas/catalog-formal-ref.d.ts +26 -3
  28. package/dist/atlas/catalog-formal-ref.d.ts.map +1 -1
  29. package/dist/atlas/catalog-formal-ref.js +52 -5
  30. package/dist/atlas/catalog-formal-ref.js.map +1 -1
  31. package/dist/atlas/chain-pipeline.d.ts.map +1 -1
  32. package/dist/atlas/chain-pipeline.js +7 -8
  33. package/dist/atlas/chain-pipeline.js.map +1 -1
  34. package/dist/atlas/diffusion/bridges-closure.d.ts +0 -4
  35. package/dist/atlas/diffusion/bridges-closure.d.ts.map +1 -1
  36. package/dist/atlas/diffusion/bridges-closure.js +8 -12
  37. package/dist/atlas/diffusion/bridges-closure.js.map +1 -1
  38. package/dist/atlas/diffusion/bridges.d.ts.map +1 -1
  39. package/dist/atlas/diffusion/bridges.js +27 -39
  40. package/dist/atlas/diffusion/bridges.js.map +1 -1
  41. package/dist/atlas/diffusion/dimensions.d.ts +6 -14
  42. package/dist/atlas/diffusion/dimensions.d.ts.map +1 -1
  43. package/dist/atlas/diffusion/dimensions.js +8 -16
  44. package/dist/atlas/diffusion/dimensions.js.map +1 -1
  45. package/dist/atlas/diffusion/models.d.ts +3 -3
  46. package/dist/atlas/diffusion/models.d.ts.map +1 -1
  47. package/dist/atlas/diffusion/models.js +5 -10
  48. package/dist/atlas/diffusion/models.js.map +1 -1
  49. package/dist/atlas/diffusion/numerics.d.ts +16 -4
  50. package/dist/atlas/diffusion/numerics.d.ts.map +1 -1
  51. package/dist/atlas/diffusion/numerics.js +38 -24
  52. package/dist/atlas/diffusion/numerics.js.map +1 -1
  53. package/dist/atlas/link-prediction.d.ts +106 -3
  54. package/dist/atlas/link-prediction.d.ts.map +1 -1
  55. package/dist/atlas/link-prediction.js +212 -66
  56. package/dist/atlas/link-prediction.js.map +1 -1
  57. package/dist/atlas/oscillators/bridges-coarse.d.ts.map +1 -1
  58. package/dist/atlas/oscillators/bridges-coarse.js +7 -11
  59. package/dist/atlas/oscillators/bridges-coarse.js.map +1 -1
  60. package/dist/atlas/oscillators/bridges-exact.d.ts.map +1 -1
  61. package/dist/atlas/oscillators/bridges-exact.js +6 -7
  62. package/dist/atlas/oscillators/bridges-exact.js.map +1 -1
  63. package/dist/atlas/oscillators/bridges-limits.d.ts +3 -16
  64. package/dist/atlas/oscillators/bridges-limits.d.ts.map +1 -1
  65. package/dist/atlas/oscillators/bridges-limits.js +23 -34
  66. package/dist/atlas/oscillators/bridges-limits.js.map +1 -1
  67. package/dist/atlas/oscillators/dimensions.d.ts +9 -21
  68. package/dist/atlas/oscillators/dimensions.d.ts.map +1 -1
  69. package/dist/atlas/oscillators/dimensions.js +9 -21
  70. package/dist/atlas/oscillators/dimensions.js.map +1 -1
  71. package/dist/atlas/oscillators/limit-witnesses.d.ts +2 -2
  72. package/dist/atlas/oscillators/limit-witnesses.d.ts.map +1 -1
  73. package/dist/atlas/oscillators/limit-witnesses.js +17 -15
  74. package/dist/atlas/oscillators/limit-witnesses.js.map +1 -1
  75. package/dist/atlas/oscillators/models.d.ts.map +1 -1
  76. package/dist/atlas/oscillators/models.js +2 -6
  77. package/dist/atlas/oscillators/models.js.map +1 -1
  78. package/dist/atlas/oscillators/pendulum-motion.d.ts +29 -6
  79. package/dist/atlas/oscillators/pendulum-motion.d.ts.map +1 -1
  80. package/dist/atlas/oscillators/pendulum-motion.js +60 -40
  81. package/dist/atlas/oscillators/pendulum-motion.js.map +1 -1
  82. package/dist/atlas/oscillators/phase-translation.d.ts +0 -11
  83. package/dist/atlas/oscillators/phase-translation.d.ts.map +1 -1
  84. package/dist/atlas/oscillators/phase-translation.js +3 -4
  85. package/dist/atlas/oscillators/phase-translation.js.map +1 -1
  86. package/dist/atlas/oscillators/position-translation.d.ts +68 -7
  87. package/dist/atlas/oscillators/position-translation.d.ts.map +1 -1
  88. package/dist/atlas/oscillators/position-translation.js +123 -12
  89. package/dist/atlas/oscillators/position-translation.js.map +1 -1
  90. package/dist/atlas/oscillators/rejections.d.ts +0 -2
  91. package/dist/atlas/oscillators/rejections.d.ts.map +1 -1
  92. package/dist/atlas/oscillators/rejections.js +0 -7
  93. package/dist/atlas/oscillators/rejections.js.map +1 -1
  94. package/dist/atlas/physjs-entries.generated.d.ts +35 -25
  95. package/dist/atlas/physjs-entries.generated.d.ts.map +1 -1
  96. package/dist/atlas/physjs-entries.generated.js +37 -25
  97. package/dist/atlas/physjs-entries.generated.js.map +1 -1
  98. package/dist/atlas/physjs-ref.d.ts +34 -31
  99. package/dist/atlas/physjs-ref.d.ts.map +1 -1
  100. package/dist/atlas/physjs-ref.js +55 -53
  101. package/dist/atlas/physjs-ref.js.map +1 -1
  102. package/dist/atlas/physjs-reviewed.d.ts +1 -1
  103. package/dist/atlas/physjs-reviewed.js +15 -15
  104. package/dist/atlas/physjs-reviewed.js.map +1 -1
  105. package/dist/atlas/poster/statements.d.ts +0 -19
  106. package/dist/atlas/poster/statements.d.ts.map +1 -1
  107. package/dist/atlas/poster/statements.js +1 -1
  108. package/dist/atlas/poster/statements.js.map +1 -1
  109. package/dist/atlas/proof-target.d.ts +1 -1
  110. package/dist/atlas/proof-target.js +1 -1
  111. package/dist/atlas/proof-target.js.map +1 -1
  112. package/dist/atlas/regime.d.ts +1 -1
  113. package/dist/atlas/regime.d.ts.map +1 -1
  114. package/dist/atlas/regime.js +1 -1
  115. package/dist/atlas/regime.js.map +1 -1
  116. package/dist/atlas/text-overlap.d.ts +23 -0
  117. package/dist/atlas/text-overlap.d.ts.map +1 -0
  118. package/dist/atlas/text-overlap.js +41 -0
  119. package/dist/atlas/text-overlap.js.map +1 -0
  120. package/dist/atlas/waves/bridges-closure.d.ts.map +1 -1
  121. package/dist/atlas/waves/bridges-closure.js +2 -6
  122. package/dist/atlas/waves/bridges-closure.js.map +1 -1
  123. package/dist/atlas/waves/bridges.d.ts.map +1 -1
  124. package/dist/atlas/waves/bridges.js +32 -48
  125. package/dist/atlas/waves/bridges.js.map +1 -1
  126. package/dist/atlas/waves/models.d.ts +5 -6
  127. package/dist/atlas/waves/models.d.ts.map +1 -1
  128. package/dist/atlas/waves/models.js +7 -13
  129. package/dist/atlas/waves/models.js.map +1 -1
  130. package/dist/atlas/waves/numerics.d.ts.map +1 -1
  131. package/dist/atlas/waves/numerics.js +10 -3
  132. package/dist/atlas/waves/numerics.js.map +1 -1
  133. package/dist/atlas/witness-numeric.d.ts +30 -0
  134. package/dist/atlas/witness-numeric.d.ts.map +1 -1
  135. package/dist/atlas/witness-numeric.js +53 -0
  136. package/dist/atlas/witness-numeric.js.map +1 -1
  137. package/dist/atlas/witness-specs.d.ts.map +1 -1
  138. package/dist/atlas/witness-specs.js +19 -0
  139. package/dist/atlas/witness-specs.js.map +1 -1
  140. package/dist/atlas/witness-symbolic.d.ts +75 -3
  141. package/dist/atlas/witness-symbolic.d.ts.map +1 -1
  142. package/dist/atlas/witness-symbolic.js +116 -10
  143. package/dist/atlas/witness-symbolic.js.map +1 -1
  144. package/dist/bridges/catalog-load.d.ts.map +1 -1
  145. package/dist/bridges/catalog-load.js +13 -8
  146. package/dist/bridges/catalog-load.js.map +1 -1
  147. package/dist/bridges/catalog-types.d.ts +26 -2
  148. package/dist/bridges/catalog-types.d.ts.map +1 -1
  149. package/dist/bridges/catalog-types.js +11 -1
  150. package/dist/bridges/catalog-types.js.map +1 -1
  151. package/dist/bridges/evaluation-errors.d.ts +31 -1
  152. package/dist/bridges/evaluation-errors.d.ts.map +1 -1
  153. package/dist/bridges/evaluation-errors.js +20 -2
  154. package/dist/bridges/evaluation-errors.js.map +1 -1
  155. package/dist/bridges/evaluator-inputs.d.ts.map +1 -1
  156. package/dist/bridges/evaluator-inputs.js +7 -5
  157. package/dist/bridges/evaluator-inputs.js.map +1 -1
  158. package/dist/bridges/evaluators.d.ts.map +1 -1
  159. package/dist/bridges/evaluators.js +27 -12
  160. package/dist/bridges/evaluators.js.map +1 -1
  161. package/dist/bridges/expr-parse.d.ts +11 -0
  162. package/dist/bridges/expr-parse.d.ts.map +1 -1
  163. package/dist/bridges/expr-parse.js +14 -5
  164. package/dist/bridges/expr-parse.js.map +1 -1
  165. package/dist/bridges/holds.d.ts +35 -3
  166. package/dist/bridges/holds.d.ts.map +1 -1
  167. package/dist/bridges/holds.js +117 -23
  168. package/dist/bridges/holds.js.map +1 -1
  169. package/dist/bridges/notices.d.ts.map +1 -1
  170. package/dist/bridges/notices.js +5 -5
  171. package/dist/bridges/notices.js.map +1 -1
  172. package/dist/bridges/relation-eval.d.ts +4 -4
  173. package/dist/bridges/relation-eval.d.ts.map +1 -1
  174. package/dist/bridges/relation-eval.js +15 -16
  175. package/dist/bridges/relation-eval.js.map +1 -1
  176. package/dist/bridges/sensitivity.d.ts.map +1 -1
  177. package/dist/bridges/sensitivity.js +3 -3
  178. package/dist/bridges/sensitivity.js.map +1 -1
  179. package/dist/bridges/validity.d.ts +33 -0
  180. package/dist/bridges/validity.d.ts.map +1 -0
  181. package/dist/bridges/validity.js +67 -0
  182. package/dist/bridges/validity.js.map +1 -0
  183. package/dist/canonical/entries/atomic.js +1 -3
  184. package/dist/canonical/entries/atomic.js.map +1 -1
  185. package/dist/canonical/entries/condensed-matter.d.ts.map +1 -1
  186. package/dist/canonical/entries/condensed-matter.js +4 -5
  187. package/dist/canonical/entries/condensed-matter.js.map +1 -1
  188. package/dist/canonical/entries/dimensional-classics.d.ts.map +1 -1
  189. package/dist/canonical/entries/dimensional-classics.js +3 -4
  190. package/dist/canonical/entries/dimensional-classics.js.map +1 -1
  191. package/dist/canonical/entries/electromagnetism.d.ts.map +1 -1
  192. package/dist/canonical/entries/electromagnetism.js +4 -10
  193. package/dist/canonical/entries/electromagnetism.js.map +1 -1
  194. package/dist/canonical/entries/fluids-waves.d.ts.map +1 -1
  195. package/dist/canonical/entries/fluids-waves.js +3 -7
  196. package/dist/canonical/entries/fluids-waves.js.map +1 -1
  197. package/dist/canonical/entries/mechanics.d.ts.map +1 -1
  198. package/dist/canonical/entries/mechanics.js +4 -6
  199. package/dist/canonical/entries/mechanics.js.map +1 -1
  200. package/dist/canonical/entries/nonmonomial.d.ts.map +1 -1
  201. package/dist/canonical/entries/nonmonomial.js +9 -17
  202. package/dist/canonical/entries/nonmonomial.js.map +1 -1
  203. package/dist/canonical/entries/relativity.d.ts.map +1 -1
  204. package/dist/canonical/entries/relativity.js +6 -6
  205. package/dist/canonical/entries/relativity.js.map +1 -1
  206. package/dist/canonical/entries/thermo-nuclear-cosmo.d.ts.map +1 -1
  207. package/dist/canonical/entries/thermo-nuclear-cosmo.js +6 -10
  208. package/dist/canonical/entries/thermo-nuclear-cosmo.js.map +1 -1
  209. package/dist/canonical/fixed-points.d.ts +94 -0
  210. package/dist/canonical/fixed-points.d.ts.map +1 -0
  211. package/dist/canonical/fixed-points.js +81 -0
  212. package/dist/canonical/fixed-points.js.map +1 -0
  213. package/dist/canonical/linkage.d.ts.map +1 -1
  214. package/dist/canonical/linkage.js +25 -44
  215. package/dist/canonical/linkage.js.map +1 -1
  216. package/dist/canonical/normal-form.d.ts.map +1 -1
  217. package/dist/canonical/normal-form.js +5 -11
  218. package/dist/canonical/normal-form.js.map +1 -1
  219. package/dist/canonical/structural.d.ts +21 -21
  220. package/dist/canonical/structural.d.ts.map +1 -1
  221. package/dist/canonical/structural.js +40 -19
  222. package/dist/canonical/structural.js.map +1 -1
  223. package/dist/cases/catalog-checks.d.ts +10 -0
  224. package/dist/cases/catalog-checks.d.ts.map +1 -0
  225. package/dist/cases/catalog-checks.js +241 -0
  226. package/dist/cases/catalog-checks.js.map +1 -0
  227. package/dist/cases/catalog.d.ts +83 -0
  228. package/dist/cases/catalog.d.ts.map +1 -0
  229. package/dist/cases/catalog.js +118 -0
  230. package/dist/cases/catalog.js.map +1 -0
  231. package/dist/cases/engine.d.ts +13 -0
  232. package/dist/cases/engine.d.ts.map +1 -0
  233. package/dist/cases/engine.js +179 -0
  234. package/dist/cases/engine.js.map +1 -0
  235. package/dist/cases/index.d.ts.map +1 -1
  236. package/dist/cases/index.js +5 -7
  237. package/dist/cases/index.js.map +1 -1
  238. package/dist/cases/methods.d.ts +215 -0
  239. package/dist/cases/methods.d.ts.map +1 -0
  240. package/dist/cases/methods.js +743 -0
  241. package/dist/cases/methods.js.map +1 -0
  242. package/dist/cases/quadrature.d.ts +7 -9
  243. package/dist/cases/quadrature.d.ts.map +1 -1
  244. package/dist/cases/quadrature.js +28 -32
  245. package/dist/cases/quadrature.js.map +1 -1
  246. package/dist/cases/types.d.ts +12 -0
  247. package/dist/cases/types.d.ts.map +1 -1
  248. package/dist/cases/types.js.map +1 -1
  249. package/dist/cli/args.d.ts +25 -1
  250. package/dist/cli/args.d.ts.map +1 -1
  251. package/dist/cli/args.js +30 -8
  252. package/dist/cli/args.js.map +1 -1
  253. package/dist/cli/bindings.d.ts.map +1 -1
  254. package/dist/cli/bindings.js +5 -4
  255. package/dist/cli/bindings.js.map +1 -1
  256. package/dist/cli/command.d.ts +11 -1
  257. package/dist/cli/command.d.ts.map +1 -1
  258. package/dist/cli/command.js.map +1 -1
  259. package/dist/cli/commands/_atlas-map.d.ts +0 -9
  260. package/dist/cli/commands/_atlas-map.d.ts.map +1 -1
  261. package/dist/cli/commands/_atlas-map.js +8 -18
  262. package/dist/cli/commands/_atlas-map.js.map +1 -1
  263. package/dist/cli/commands/_atlas-route.d.ts.map +1 -1
  264. package/dist/cli/commands/_atlas-route.js +6 -2
  265. package/dist/cli/commands/_atlas-route.js.map +1 -1
  266. package/dist/cli/commands/_discovery-opts.d.ts +1 -0
  267. package/dist/cli/commands/_discovery-opts.d.ts.map +1 -1
  268. package/dist/cli/commands/_discovery-opts.js +9 -9
  269. package/dist/cli/commands/_discovery-opts.js.map +1 -1
  270. package/dist/cli/commands/atlas.d.ts.map +1 -1
  271. package/dist/cli/commands/atlas.js +8 -5
  272. package/dist/cli/commands/atlas.js.map +1 -1
  273. package/dist/cli/commands/audit.d.ts.map +1 -1
  274. package/dist/cli/commands/audit.js +8 -1
  275. package/dist/cli/commands/audit.js.map +1 -1
  276. package/dist/cli/commands/axes.d.ts.map +1 -1
  277. package/dist/cli/commands/axes.js +20 -1
  278. package/dist/cli/commands/axes.js.map +1 -1
  279. package/dist/cli/commands/confront.d.ts.map +1 -1
  280. package/dist/cli/commands/confront.js +8 -14
  281. package/dist/cli/commands/confront.js.map +1 -1
  282. package/dist/cli/commands/derive.d.ts.map +1 -1
  283. package/dist/cli/commands/derive.js +22 -22
  284. package/dist/cli/commands/derive.js.map +1 -1
  285. package/dist/cli/commands/discover.d.ts.map +1 -1
  286. package/dist/cli/commands/discover.js +122 -73
  287. package/dist/cli/commands/discover.js.map +1 -1
  288. package/dist/cli/commands/eval.d.ts.map +1 -1
  289. package/dist/cli/commands/eval.js +1 -0
  290. package/dist/cli/commands/eval.js.map +1 -1
  291. package/dist/cli/commands/evaluate.d.ts.map +1 -1
  292. package/dist/cli/commands/evaluate.js +67 -39
  293. package/dist/cli/commands/evaluate.js.map +1 -1
  294. package/dist/cli/commands/explain.d.ts.map +1 -1
  295. package/dist/cli/commands/explain.js +24 -3
  296. package/dist/cli/commands/explain.js.map +1 -1
  297. package/dist/cli/commands/ground.d.ts.map +1 -1
  298. package/dist/cli/commands/ground.js +7 -1
  299. package/dist/cli/commands/ground.js.map +1 -1
  300. package/dist/cli/commands/map.d.ts.map +1 -1
  301. package/dist/cli/commands/map.js +84 -11
  302. package/dist/cli/commands/map.js.map +1 -1
  303. package/dist/cli/commands/metric.d.ts.map +1 -1
  304. package/dist/cli/commands/metric.js +12 -9
  305. package/dist/cli/commands/metric.js.map +1 -1
  306. package/dist/cli/commands/path.d.ts +10 -0
  307. package/dist/cli/commands/path.d.ts.map +1 -1
  308. package/dist/cli/commands/path.js +25 -3
  309. package/dist/cli/commands/path.js.map +1 -1
  310. package/dist/cli/commands/probe.d.ts.map +1 -1
  311. package/dist/cli/commands/probe.js +59 -16
  312. package/dist/cli/commands/probe.js.map +1 -1
  313. package/dist/cli/commands/regime.d.ts.map +1 -1
  314. package/dist/cli/commands/regime.js +1 -0
  315. package/dist/cli/commands/regime.js.map +1 -1
  316. package/dist/cli/commands/retrieve.d.ts.map +1 -1
  317. package/dist/cli/commands/retrieve.js +1 -0
  318. package/dist/cli/commands/retrieve.js.map +1 -1
  319. package/dist/cli/commands/search.d.ts.map +1 -1
  320. package/dist/cli/commands/search.js +1 -0
  321. package/dist/cli/commands/search.js.map +1 -1
  322. package/dist/cli/commands/symbolic.d.ts.map +1 -1
  323. package/dist/cli/commands/symbolic.js +19 -28
  324. package/dist/cli/commands/symbolic.js.map +1 -1
  325. package/dist/cli/commands/testplan.d.ts.map +1 -1
  326. package/dist/cli/commands/testplan.js +4 -2
  327. package/dist/cli/commands/testplan.js.map +1 -1
  328. package/dist/cli/determination.d.ts +1 -0
  329. package/dist/cli/determination.d.ts.map +1 -1
  330. package/dist/cli/determination.js.map +1 -1
  331. package/dist/cli/expr-print.d.ts +0 -2
  332. package/dist/cli/expr-print.d.ts.map +1 -1
  333. package/dist/cli/expr-print.js +7 -31
  334. package/dist/cli/expr-print.js.map +1 -1
  335. package/dist/cli/flag-help.d.ts +1 -0
  336. package/dist/cli/flag-help.d.ts.map +1 -1
  337. package/dist/cli/flag-help.js +1 -0
  338. package/dist/cli/flag-help.js.map +1 -1
  339. package/dist/cli/graphs.d.ts +2 -0
  340. package/dist/cli/graphs.d.ts.map +1 -1
  341. package/dist/cli/graphs.js +1 -0
  342. package/dist/cli/graphs.js.map +1 -1
  343. package/dist/cli/main.d.ts +8 -0
  344. package/dist/cli/main.d.ts.map +1 -1
  345. package/dist/cli/main.js +19 -3
  346. package/dist/cli/main.js.map +1 -1
  347. package/dist/cli/numeric-flag.d.ts +12 -0
  348. package/dist/cli/numeric-flag.d.ts.map +1 -0
  349. package/dist/cli/numeric-flag.js +44 -0
  350. package/dist/cli/numeric-flag.js.map +1 -0
  351. package/dist/cli/output.d.ts +28 -0
  352. package/dist/cli/output.d.ts.map +1 -1
  353. package/dist/cli/output.js +23 -0
  354. package/dist/cli/output.js.map +1 -1
  355. package/dist/cli/record-reach.js +2 -2
  356. package/dist/cli/record-reach.js.map +1 -1
  357. package/dist/cli/record-tables.d.ts.map +1 -1
  358. package/dist/cli/record-tables.js +6 -5
  359. package/dist/cli/record-tables.js.map +1 -1
  360. package/dist/cli/record.d.ts +1 -5
  361. package/dist/cli/record.d.ts.map +1 -1
  362. package/dist/cli/record.js +9 -8
  363. package/dist/cli/record.js.map +1 -1
  364. package/dist/cli/search-index.d.ts.map +1 -1
  365. package/dist/cli/search-index.js +7 -6
  366. package/dist/cli/search-index.js.map +1 -1
  367. package/dist/cli/statuses.d.ts +0 -2
  368. package/dist/cli/statuses.d.ts.map +1 -1
  369. package/dist/cli/statuses.js +12 -9
  370. package/dist/cli/statuses.js.map +1 -1
  371. package/dist/cli/stored-results.d.ts +7 -0
  372. package/dist/cli/stored-results.d.ts.map +1 -0
  373. package/dist/cli/stored-results.js +23 -0
  374. package/dist/cli/stored-results.js.map +1 -0
  375. package/dist/cli/version.d.ts +1 -0
  376. package/dist/cli/version.d.ts.map +1 -1
  377. package/dist/cli/version.js +8 -5
  378. package/dist/cli/version.js.map +1 -1
  379. package/dist/cli-api.d.ts +36 -5
  380. package/dist/cli-api.d.ts.map +1 -1
  381. package/dist/cli-api.js +30 -4
  382. package/dist/cli-api.js.map +1 -1
  383. package/dist/composition/algebraic-equivalence.d.ts +43 -0
  384. package/dist/composition/algebraic-equivalence.d.ts.map +1 -0
  385. package/dist/composition/algebraic-equivalence.js +115 -0
  386. package/dist/composition/algebraic-equivalence.js.map +1 -0
  387. package/dist/composition/axes.d.ts +0 -6
  388. package/dist/composition/axes.d.ts.map +1 -1
  389. package/dist/composition/axes.js +6 -6
  390. package/dist/composition/axes.js.map +1 -1
  391. package/dist/composition/axis-audit.d.ts +47 -20
  392. package/dist/composition/axis-audit.d.ts.map +1 -1
  393. package/dist/composition/axis-audit.js +82 -9
  394. package/dist/composition/axis-audit.js.map +1 -1
  395. package/dist/composition/bridge-analysis.d.ts +17 -0
  396. package/dist/composition/bridge-analysis.d.ts.map +1 -1
  397. package/dist/composition/bridge-analysis.js +102 -55
  398. package/dist/composition/bridge-analysis.js.map +1 -1
  399. package/dist/composition/canonical-compare.d.ts +40 -0
  400. package/dist/composition/canonical-compare.d.ts.map +1 -1
  401. package/dist/composition/canonical-compare.js +122 -24
  402. package/dist/composition/canonical-compare.js.map +1 -1
  403. package/dist/composition/canonical-graph.d.ts +3 -3
  404. package/dist/composition/canonical-graph.d.ts.map +1 -1
  405. package/dist/composition/canonical-graph.js +11 -38
  406. package/dist/composition/canonical-graph.js.map +1 -1
  407. package/dist/composition/canonical-json.js +2 -2
  408. package/dist/composition/canonical-json.js.map +1 -1
  409. package/dist/composition/catalog-graph.d.ts.map +1 -1
  410. package/dist/composition/catalog-graph.js +2 -5
  411. package/dist/composition/catalog-graph.js.map +1 -1
  412. package/dist/composition/chain-candidate.d.ts +8 -0
  413. package/dist/composition/chain-candidate.d.ts.map +1 -1
  414. package/dist/composition/chain-candidate.js +9 -2
  415. package/dist/composition/chain-candidate.js.map +1 -1
  416. package/dist/composition/chain-match.d.ts +6 -3
  417. package/dist/composition/chain-match.d.ts.map +1 -1
  418. package/dist/composition/chain-match.js +4 -1
  419. package/dist/composition/chain-match.js.map +1 -1
  420. package/dist/composition/chain-result.d.ts.map +1 -1
  421. package/dist/composition/chain-result.js +2 -14
  422. package/dist/composition/chain-result.js.map +1 -1
  423. package/dist/composition/compose-symbolic.d.ts.map +1 -1
  424. package/dist/composition/compose-symbolic.js +3 -2
  425. package/dist/composition/compose-symbolic.js.map +1 -1
  426. package/dist/composition/compose.d.ts.map +1 -1
  427. package/dist/composition/compose.js +13 -5
  428. package/dist/composition/compose.js.map +1 -1
  429. package/dist/composition/composition-recovery.d.ts.map +1 -1
  430. package/dist/composition/composition-recovery.js +4 -7
  431. package/dist/composition/composition-recovery.js.map +1 -1
  432. package/dist/composition/consequence.d.ts +15 -5
  433. package/dist/composition/consequence.d.ts.map +1 -1
  434. package/dist/composition/consequence.js +6 -4
  435. package/dist/composition/consequence.js.map +1 -1
  436. package/dist/composition/discovery.d.ts +129 -9
  437. package/dist/composition/discovery.d.ts.map +1 -1
  438. package/dist/composition/discovery.js +171 -67
  439. package/dist/composition/discovery.js.map +1 -1
  440. package/dist/composition/edge.d.ts +21 -2
  441. package/dist/composition/edge.d.ts.map +1 -1
  442. package/dist/composition/edge.js +23 -1
  443. package/dist/composition/edge.js.map +1 -1
  444. package/dist/composition/enumerate.d.ts.map +1 -1
  445. package/dist/composition/enumerate.js +18 -3
  446. package/dist/composition/enumerate.js.map +1 -1
  447. package/dist/composition/evaluate-relation.d.ts +35 -11
  448. package/dist/composition/evaluate-relation.d.ts.map +1 -1
  449. package/dist/composition/evaluate-relation.js +60 -39
  450. package/dist/composition/evaluate-relation.js.map +1 -1
  451. package/dist/composition/explain.d.ts +3 -12
  452. package/dist/composition/explain.d.ts.map +1 -1
  453. package/dist/composition/explain.js +7 -20
  454. package/dist/composition/explain.js.map +1 -1
  455. package/dist/composition/expr-eval.d.ts +1 -1
  456. package/dist/composition/expr-eval.d.ts.map +1 -1
  457. package/dist/composition/expr-eval.js +6 -15
  458. package/dist/composition/expr-eval.js.map +1 -1
  459. package/dist/composition/expr-simplify.d.ts +26 -14
  460. package/dist/composition/expr-simplify.d.ts.map +1 -1
  461. package/dist/composition/expr-simplify.js +64 -72
  462. package/dist/composition/expr-simplify.js.map +1 -1
  463. package/dist/composition/formula-shape.d.ts +23 -4
  464. package/dist/composition/formula-shape.d.ts.map +1 -1
  465. package/dist/composition/formula-shape.js +57 -17
  466. package/dist/composition/formula-shape.js.map +1 -1
  467. package/dist/composition/graph-structure.d.ts +98 -0
  468. package/dist/composition/graph-structure.d.ts.map +1 -0
  469. package/dist/composition/graph-structure.js +167 -0
  470. package/dist/composition/graph-structure.js.map +1 -0
  471. package/dist/composition/graph-viz-svg.d.ts.map +1 -1
  472. package/dist/composition/graph-viz-svg.js +1 -1
  473. package/dist/composition/graph-viz-svg.js.map +1 -1
  474. package/dist/composition/graph-viz.d.ts.map +1 -1
  475. package/dist/composition/graph-viz.js +8 -37
  476. package/dist/composition/graph-viz.js.map +1 -1
  477. package/dist/composition/grounding.d.ts.map +1 -1
  478. package/dist/composition/grounding.js +19 -7
  479. package/dist/composition/grounding.js.map +1 -1
  480. package/dist/composition/identifiability.d.ts +91 -4
  481. package/dist/composition/identifiability.d.ts.map +1 -1
  482. package/dist/composition/identifiability.js +363 -6
  483. package/dist/composition/identifiability.js.map +1 -1
  484. package/dist/composition/index.d.ts +8 -4
  485. package/dist/composition/index.d.ts.map +1 -1
  486. package/dist/composition/index.js +3 -2
  487. package/dist/composition/index.js.map +1 -1
  488. package/dist/composition/mathts-quiet.d.ts +7 -8
  489. package/dist/composition/mathts-quiet.d.ts.map +1 -1
  490. package/dist/composition/mathts-quiet.js +7 -16
  491. package/dist/composition/mathts-quiet.js.map +1 -1
  492. package/dist/composition/mathts-scalar-symbols.d.ts.map +1 -1
  493. package/dist/composition/mathts-scalar-symbols.js +2 -1
  494. package/dist/composition/mathts-scalar-symbols.js.map +1 -1
  495. package/dist/composition/own-equation-magnitude.d.ts +95 -0
  496. package/dist/composition/own-equation-magnitude.d.ts.map +1 -0
  497. package/dist/composition/own-equation-magnitude.js +270 -0
  498. package/dist/composition/own-equation-magnitude.js.map +1 -0
  499. package/dist/composition/probe/backend-protocol.d.ts +3 -0
  500. package/dist/composition/probe/backend-protocol.d.ts.map +1 -1
  501. package/dist/composition/probe/backend-protocol.js.map +1 -1
  502. package/dist/composition/probe/candidate-store.d.ts +1 -0
  503. package/dist/composition/probe/candidate-store.d.ts.map +1 -1
  504. package/dist/composition/probe/candidate-store.js +1 -0
  505. package/dist/composition/probe/candidate-store.js.map +1 -1
  506. package/dist/composition/probe/corpus.d.ts +8 -4
  507. package/dist/composition/probe/corpus.d.ts.map +1 -1
  508. package/dist/composition/probe/corpus.js +23 -12
  509. package/dist/composition/probe/corpus.js.map +1 -1
  510. package/dist/composition/probe/dataset.d.ts +18 -0
  511. package/dist/composition/probe/dataset.d.ts.map +1 -1
  512. package/dist/composition/probe/dataset.js +95 -50
  513. package/dist/composition/probe/dataset.js.map +1 -1
  514. package/dist/composition/probe/experiment-design.d.ts +7 -1
  515. package/dist/composition/probe/experiment-design.d.ts.map +1 -1
  516. package/dist/composition/probe/experiment-design.js +44 -24
  517. package/dist/composition/probe/experiment-design.js.map +1 -1
  518. package/dist/composition/probe/falsify.d.ts +2 -0
  519. package/dist/composition/probe/falsify.d.ts.map +1 -1
  520. package/dist/composition/probe/falsify.js +2 -0
  521. package/dist/composition/probe/falsify.js.map +1 -1
  522. package/dist/composition/probe/fit.d.ts +7 -0
  523. package/dist/composition/probe/fit.d.ts.map +1 -1
  524. package/dist/composition/probe/fit.js +46 -22
  525. package/dist/composition/probe/fit.js.map +1 -1
  526. package/dist/composition/probe/frontier.d.ts.map +1 -1
  527. package/dist/composition/probe/frontier.js +33 -15
  528. package/dist/composition/probe/frontier.js.map +1 -1
  529. package/dist/composition/probe/generator.d.ts +30 -1
  530. package/dist/composition/probe/generator.d.ts.map +1 -1
  531. package/dist/composition/probe/generator.js +58 -36
  532. package/dist/composition/probe/generator.js.map +1 -1
  533. package/dist/composition/probe/index.d.ts +14 -0
  534. package/dist/composition/probe/index.d.ts.map +1 -1
  535. package/dist/composition/probe/index.js +6 -0
  536. package/dist/composition/probe/index.js.map +1 -1
  537. package/dist/composition/probe/limits.d.ts +25 -1
  538. package/dist/composition/probe/limits.d.ts.map +1 -1
  539. package/dist/composition/probe/limits.js +53 -11
  540. package/dist/composition/probe/limits.js.map +1 -1
  541. package/dist/composition/probe/pipeline.d.ts +5 -0
  542. package/dist/composition/probe/pipeline.d.ts.map +1 -1
  543. package/dist/composition/probe/pipeline.js +73 -24
  544. package/dist/composition/probe/pipeline.js.map +1 -1
  545. package/dist/composition/probe/power-law.d.ts +121 -0
  546. package/dist/composition/probe/power-law.d.ts.map +1 -0
  547. package/dist/composition/probe/power-law.js +251 -0
  548. package/dist/composition/probe/power-law.js.map +1 -0
  549. package/dist/composition/probe/problem.d.ts +8 -4
  550. package/dist/composition/probe/problem.d.ts.map +1 -1
  551. package/dist/composition/probe/problem.js +177 -49
  552. package/dist/composition/probe/problem.js.map +1 -1
  553. package/dist/composition/probe/report.js +1 -1
  554. package/dist/composition/probe/report.js.map +1 -1
  555. package/dist/composition/probe/residual.d.ts +7 -1
  556. package/dist/composition/probe/residual.d.ts.map +1 -1
  557. package/dist/composition/probe/residual.js +10 -7
  558. package/dist/composition/probe/residual.js.map +1 -1
  559. package/dist/composition/probe/run-manifest.d.ts +1 -0
  560. package/dist/composition/probe/run-manifest.d.ts.map +1 -1
  561. package/dist/composition/probe/run-manifest.js.map +1 -1
  562. package/dist/composition/probe/scalar-search.d.ts +50 -0
  563. package/dist/composition/probe/scalar-search.d.ts.map +1 -0
  564. package/dist/composition/probe/scalar-search.js +169 -0
  565. package/dist/composition/probe/scalar-search.js.map +1 -0
  566. package/dist/composition/probe/scoring.d.ts +1 -0
  567. package/dist/composition/probe/scoring.d.ts.map +1 -1
  568. package/dist/composition/probe/scoring.js.map +1 -1
  569. package/dist/composition/probe/structure.d.ts +82 -17
  570. package/dist/composition/probe/structure.d.ts.map +1 -1
  571. package/dist/composition/probe/structure.js +129 -55
  572. package/dist/composition/probe/structure.js.map +1 -1
  573. package/dist/composition/probe/study.d.ts +31 -9
  574. package/dist/composition/probe/study.d.ts.map +1 -1
  575. package/dist/composition/probe/study.js +235 -184
  576. package/dist/composition/probe/study.js.map +1 -1
  577. package/dist/composition/probe/t-tail.d.ts +16 -0
  578. package/dist/composition/probe/t-tail.d.ts.map +1 -0
  579. package/dist/composition/probe/t-tail.js +29 -0
  580. package/dist/composition/probe/t-tail.js.map +1 -0
  581. package/dist/composition/probe/types.d.ts +3 -0
  582. package/dist/composition/probe/types.d.ts.map +1 -1
  583. package/dist/composition/probe/types.js.map +1 -1
  584. package/dist/composition/proposed-bridges.d.ts +52 -12
  585. package/dist/composition/proposed-bridges.d.ts.map +1 -1
  586. package/dist/composition/proposed-bridges.js +107 -60
  587. package/dist/composition/proposed-bridges.js.map +1 -1
  588. package/dist/composition/quantity-clusters.d.ts +48 -0
  589. package/dist/composition/quantity-clusters.d.ts.map +1 -0
  590. package/dist/composition/quantity-clusters.js +98 -0
  591. package/dist/composition/quantity-clusters.js.map +1 -0
  592. package/dist/composition/rational-exponent.d.ts +40 -0
  593. package/dist/composition/rational-exponent.d.ts.map +1 -0
  594. package/dist/composition/rational-exponent.js +65 -0
  595. package/dist/composition/rational-exponent.js.map +1 -0
  596. package/dist/composition/representative-values.d.ts +22 -0
  597. package/dist/composition/representative-values.d.ts.map +1 -1
  598. package/dist/composition/representative-values.js +29 -0
  599. package/dist/composition/representative-values.js.map +1 -1
  600. package/dist/composition/retrodiction.d.ts +15 -0
  601. package/dist/composition/retrodiction.d.ts.map +1 -1
  602. package/dist/composition/retrodiction.js +12 -4
  603. package/dist/composition/retrodiction.js.map +1 -1
  604. package/dist/composition/user-equation.d.ts +1 -0
  605. package/dist/composition/user-equation.d.ts.map +1 -1
  606. package/dist/composition/user-equation.js +3 -2
  607. package/dist/composition/user-equation.js.map +1 -1
  608. package/dist/core/assignment.d.ts +19 -0
  609. package/dist/core/assignment.d.ts.map +1 -0
  610. package/dist/core/assignment.js +19 -0
  611. package/dist/core/assignment.js.map +1 -0
  612. package/dist/core/compare.d.ts +32 -0
  613. package/dist/core/compare.d.ts.map +1 -0
  614. package/dist/core/compare.js +46 -0
  615. package/dist/core/compare.js.map +1 -0
  616. package/dist/core/constants.d.ts +42 -41
  617. package/dist/core/constants.d.ts.map +1 -1
  618. package/dist/core/constants.js +71 -51
  619. package/dist/core/constants.js.map +1 -1
  620. package/dist/core/data-file.d.ts +7 -0
  621. package/dist/core/data-file.d.ts.map +1 -1
  622. package/dist/core/data-file.js +17 -0
  623. package/dist/core/data-file.js.map +1 -1
  624. package/dist/core/format.d.ts +36 -0
  625. package/dist/core/format.d.ts.map +1 -0
  626. package/dist/core/format.js +39 -0
  627. package/dist/core/format.js.map +1 -0
  628. package/dist/core/hash.d.ts +14 -0
  629. package/dist/core/hash.d.ts.map +1 -0
  630. package/dist/core/hash.js +17 -0
  631. package/dist/core/hash.js.map +1 -0
  632. package/dist/core/json-schema.d.ts +2 -0
  633. package/dist/core/json-schema.d.ts.map +1 -1
  634. package/dist/core/json-schema.js +14 -13
  635. package/dist/core/json-schema.js.map +1 -1
  636. package/dist/core/labeled-tensor.d.ts.map +1 -1
  637. package/dist/core/labeled-tensor.js +0 -8
  638. package/dist/core/labeled-tensor.js.map +1 -1
  639. package/dist/core/mathts-read.d.ts +25 -0
  640. package/dist/core/mathts-read.d.ts.map +1 -0
  641. package/dist/core/mathts-read.js +51 -0
  642. package/dist/core/mathts-read.js.map +1 -0
  643. package/dist/core/tensor.d.ts.map +1 -1
  644. package/dist/core/tensor.js +24 -0
  645. package/dist/core/tensor.js.map +1 -1
  646. package/dist/core/types.d.ts +5 -5
  647. package/dist/diff/bridge-ast-gradient.d.ts +27 -23
  648. package/dist/diff/bridge-ast-gradient.d.ts.map +1 -1
  649. package/dist/diff/bridge-ast-gradient.js +75 -173
  650. package/dist/diff/bridge-ast-gradient.js.map +1 -1
  651. package/dist/diff/bridge-gradient.d.ts +19 -6
  652. package/dist/diff/bridge-gradient.d.ts.map +1 -1
  653. package/dist/diff/bridge-gradient.js +19 -11
  654. package/dist/diff/bridge-gradient.js.map +1 -1
  655. package/dist/diff/bridge-specs.d.ts.map +1 -1
  656. package/dist/diff/bridge-specs.js +3 -0
  657. package/dist/diff/bridge-specs.js.map +1 -1
  658. package/dist/dimensional/algebra.d.ts +18 -0
  659. package/dist/dimensional/algebra.d.ts.map +1 -1
  660. package/dist/dimensional/algebra.js +41 -1
  661. package/dist/dimensional/algebra.js.map +1 -1
  662. package/dist/dimensional/ast-builders.d.ts +7 -0
  663. package/dist/dimensional/ast-builders.d.ts.map +1 -1
  664. package/dist/dimensional/ast-builders.js +11 -0
  665. package/dist/dimensional/ast-builders.js.map +1 -1
  666. package/dist/dimensional/ast-leaves.d.ts +81 -0
  667. package/dist/dimensional/ast-leaves.d.ts.map +1 -0
  668. package/dist/dimensional/ast-leaves.js +146 -0
  669. package/dist/dimensional/ast-leaves.js.map +1 -0
  670. package/dist/dimensional/ast-types.d.ts +15 -0
  671. package/dist/dimensional/ast-types.d.ts.map +1 -1
  672. package/dist/dimensional/ast-types.js.map +1 -1
  673. package/dist/dimensional/buckingham.d.ts.map +1 -1
  674. package/dist/dimensional/buckingham.js +15 -27
  675. package/dist/dimensional/buckingham.js.map +1 -1
  676. package/dist/dimensional/constant-rows.js +9 -9
  677. package/dist/dimensional/constant-rows.js.map +1 -1
  678. package/dist/dimensional/curvature-composite.d.ts +1 -1
  679. package/dist/dimensional/curvature-composite.js.map +1 -1
  680. package/dist/dimensional/dimension-inference.d.ts.map +1 -1
  681. package/dist/dimensional/dimension-inference.js +1 -2
  682. package/dist/dimensional/dimension-inference.js.map +1 -1
  683. package/dist/dimensional/errors.d.ts +1 -1
  684. package/dist/dimensional/errors.d.ts.map +1 -1
  685. package/dist/dimensional/errors.js +1 -15
  686. package/dist/dimensional/errors.js.map +1 -1
  687. package/dist/dimensional/exact-scale.d.ts +24 -11
  688. package/dist/dimensional/exact-scale.d.ts.map +1 -1
  689. package/dist/dimensional/exact-scale.js +122 -130
  690. package/dist/dimensional/exact-scale.js.map +1 -1
  691. package/dist/dimensional/gauge-field.d.ts.map +1 -1
  692. package/dist/dimensional/gauge-field.js +2 -2
  693. package/dist/dimensional/gauge-field.js.map +1 -1
  694. package/dist/dimensional/hyphen-names.d.ts +12 -2
  695. package/dist/dimensional/hyphen-names.d.ts.map +1 -1
  696. package/dist/dimensional/hyphen-names.js +44 -19
  697. package/dist/dimensional/hyphen-names.js.map +1 -1
  698. package/dist/dimensional/mathts-unit-delegation.d.ts +29 -0
  699. package/dist/dimensional/mathts-unit-delegation.d.ts.map +1 -0
  700. package/dist/dimensional/mathts-unit-delegation.js +187 -0
  701. package/dist/dimensional/mathts-unit-delegation.js.map +1 -0
  702. package/dist/dimensional/mathts-unit-wrapper.d.ts +33 -0
  703. package/dist/dimensional/mathts-unit-wrapper.d.ts.map +1 -0
  704. package/dist/dimensional/mathts-unit-wrapper.js +190 -0
  705. package/dist/dimensional/mathts-unit-wrapper.js.map +1 -0
  706. package/dist/dimensional/metric.d.ts.map +1 -1
  707. package/dist/dimensional/metric.js +0 -1
  708. package/dist/dimensional/metric.js.map +1 -1
  709. package/dist/dimensional/scalar-lowering.d.ts +21 -0
  710. package/dist/dimensional/scalar-lowering.d.ts.map +1 -0
  711. package/dist/dimensional/scalar-lowering.js +45 -0
  712. package/dist/dimensional/scalar-lowering.js.map +1 -0
  713. package/dist/dimensional/symbolic-constants.d.ts +9 -0
  714. package/dist/dimensional/symbolic-constants.d.ts.map +1 -1
  715. package/dist/dimensional/symbolic-constants.js +13 -1
  716. package/dist/dimensional/symbolic-constants.js.map +1 -1
  717. package/dist/dimensional/types.d.ts +36 -0
  718. package/dist/dimensional/types.d.ts.map +1 -1
  719. package/dist/dimensional/types.js +45 -7
  720. package/dist/dimensional/types.js.map +1 -1
  721. package/dist/dimensional/unit-data.d.ts +5 -1
  722. package/dist/dimensional/unit-data.d.ts.map +1 -1
  723. package/dist/dimensional/unit-data.js +30 -6
  724. package/dist/dimensional/unit-data.js.map +1 -1
  725. package/dist/dimensional/units.d.ts +2 -0
  726. package/dist/dimensional/units.d.ts.map +1 -1
  727. package/dist/dimensional/units.js +59 -3
  728. package/dist/dimensional/units.js.map +1 -1
  729. package/dist/dimensional/validator.d.ts +2 -0
  730. package/dist/dimensional/validator.d.ts.map +1 -1
  731. package/dist/dimensional/validator.js.map +1 -1
  732. package/dist/index.d.ts +9 -3
  733. package/dist/index.d.ts.map +1 -1
  734. package/dist/index.js +10 -4
  735. package/dist/index.js.map +1 -1
  736. package/dist/numerical/christoffel-flat.d.ts.map +1 -1
  737. package/dist/numerical/christoffel-flat.js +3 -2
  738. package/dist/numerical/christoffel-flat.js.map +1 -1
  739. package/dist/numerical/connection-lowering-helpers.d.ts +3 -1
  740. package/dist/numerical/connection-lowering-helpers.d.ts.map +1 -1
  741. package/dist/numerical/connection-lowering-helpers.js +11 -15
  742. package/dist/numerical/connection-lowering-helpers.js.map +1 -1
  743. package/dist/numerical/covariant-eikonal.d.ts.map +1 -1
  744. package/dist/numerical/covariant-eikonal.js +34 -11
  745. package/dist/numerical/covariant-eikonal.js.map +1 -1
  746. package/dist/numerical/curvature-lowering-helpers.js +3 -2
  747. package/dist/numerical/curvature-lowering-helpers.js.map +1 -1
  748. package/dist/numerical/errors.d.ts.map +1 -1
  749. package/dist/numerical/errors.js +0 -3
  750. package/dist/numerical/errors.js.map +1 -1
  751. package/dist/numerical/finite-difference.d.ts +22 -0
  752. package/dist/numerical/finite-difference.d.ts.map +1 -0
  753. package/dist/numerical/finite-difference.js +27 -0
  754. package/dist/numerical/finite-difference.js.map +1 -0
  755. package/dist/numerical/geodesic-integrator.d.ts.map +1 -1
  756. package/dist/numerical/geodesic-integrator.js +22 -14
  757. package/dist/numerical/geodesic-integrator.js.map +1 -1
  758. package/dist/numerical/geometrized.d.ts.map +1 -1
  759. package/dist/numerical/geometrized.js +0 -1
  760. package/dist/numerical/geometrized.js.map +1 -1
  761. package/dist/numerical/mathts-engine.d.ts.map +1 -1
  762. package/dist/numerical/mathts-engine.js +10 -24
  763. package/dist/numerical/mathts-engine.js.map +1 -1
  764. package/dist/numerical/metric-inverse.d.ts.map +1 -1
  765. package/dist/numerical/metric-inverse.js +83 -46
  766. package/dist/numerical/metric-inverse.js.map +1 -1
  767. package/dist/numerical/null-ray-integrator.d.ts +2 -1
  768. package/dist/numerical/null-ray-integrator.d.ts.map +1 -1
  769. package/dist/numerical/null-ray-integrator.js +12 -12
  770. package/dist/numerical/null-ray-integrator.js.map +1 -1
  771. package/dist/numerical/painleve-gullstrand-metric.js +2 -2
  772. package/dist/numerical/painleve-gullstrand-metric.js.map +1 -1
  773. package/dist/numerical/pderiv.d.ts.map +1 -1
  774. package/dist/numerical/pderiv.js +2 -6
  775. package/dist/numerical/pderiv.js.map +1 -1
  776. package/dist/numerical/perihelion-finder.d.ts +0 -36
  777. package/dist/numerical/perihelion-finder.d.ts.map +1 -1
  778. package/dist/numerical/perihelion-finder.js +41 -87
  779. package/dist/numerical/perihelion-finder.js.map +1 -1
  780. package/dist/numerical/quadrature.d.ts.map +1 -1
  781. package/dist/numerical/quadrature.js +11 -13
  782. package/dist/numerical/quadrature.js.map +1 -1
  783. package/dist/numerical/rk4-trajectory.d.ts +10 -0
  784. package/dist/numerical/rk4-trajectory.d.ts.map +1 -0
  785. package/dist/numerical/rk4-trajectory.js +37 -0
  786. package/dist/numerical/rk4-trajectory.js.map +1 -0
  787. package/dist/numerical/schwarzschild.d.ts +14 -0
  788. package/dist/numerical/schwarzschild.d.ts.map +1 -0
  789. package/dist/numerical/schwarzschild.js +17 -0
  790. package/dist/numerical/schwarzschild.js.map +1 -0
  791. package/dist/numerical/spacetime-metrics.d.ts +12 -0
  792. package/dist/numerical/spacetime-metrics.d.ts.map +1 -1
  793. package/dist/numerical/spacetime-metrics.js +72 -56
  794. package/dist/numerical/spacetime-metrics.js.map +1 -1
  795. package/dist/numerical/statistics.d.ts +24 -0
  796. package/dist/numerical/statistics.d.ts.map +1 -0
  797. package/dist/numerical/statistics.js +52 -0
  798. package/dist/numerical/statistics.js.map +1 -0
  799. package/dist/numerical/strides.d.ts +3 -2
  800. package/dist/numerical/strides.d.ts.map +1 -1
  801. package/dist/numerical/strides.js +3 -10
  802. package/dist/numerical/strides.js.map +1 -1
  803. package/dist/numerical/tensor-engine.d.ts +21 -0
  804. package/dist/numerical/tensor-engine.d.ts.map +1 -1
  805. package/dist/numerical/tensor-engine.js +12 -0
  806. package/dist/numerical/tensor-engine.js.map +1 -1
  807. package/dist/relations/regime.d.ts +10 -0
  808. package/dist/relations/regime.d.ts.map +1 -1
  809. package/dist/relations/regime.js +18 -1
  810. package/dist/relations/regime.js.map +1 -1
  811. package/package.json +9 -12
  812. package/dist/cases/brownian-sphere.d.ts +0 -68
  813. package/dist/cases/brownian-sphere.d.ts.map +0 -1
  814. package/dist/cases/brownian-sphere.js +0 -354
  815. package/dist/cases/brownian-sphere.js.map +0 -1
  816. package/dist/cases/damped-resonator.d.ts +0 -23
  817. package/dist/cases/damped-resonator.d.ts.map +0 -1
  818. package/dist/cases/damped-resonator.js +0 -224
  819. package/dist/cases/damped-resonator.js.map +0 -1
  820. package/dist/cases/kepler-rv.d.ts +0 -13
  821. package/dist/cases/kepler-rv.d.ts.map +0 -1
  822. package/dist/cases/kepler-rv.js +0 -172
  823. package/dist/cases/kepler-rv.js.map +0 -1
  824. package/dist/cases/lumped-cooling.d.ts +0 -46
  825. package/dist/cases/lumped-cooling.d.ts.map +0 -1
  826. package/dist/cases/lumped-cooling.js +0 -261
  827. package/dist/cases/lumped-cooling.js.map +0 -1
  828. package/dist/cases/resistor-noise.d.ts +0 -14
  829. package/dist/cases/resistor-noise.d.ts.map +0 -1
  830. package/dist/cases/resistor-noise.js +0 -215
  831. package/dist/cases/resistor-noise.js.map +0 -1
  832. package/dist/cases/skin-depth.d.ts +0 -21
  833. package/dist/cases/skin-depth.d.ts.map +0 -1
  834. package/dist/cases/skin-depth.js +0 -174
  835. package/dist/cases/skin-depth.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAInD,OAAO,EACL,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,MAAM,EACN,IAAI,EACJ,KAAK,EACL,MAAM,EACN,MAAM,EACN,MAAM,EACN,KAAK,EAEL,QAAQ,EAER,SAAS,EAET,MAAM,EAEN,SAAS,GACV,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,YAAY,EACZ,aAAa,EACb,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,KAAK,EACL,QAAQ,EACR,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAMpD,YAAY,EACV,IAAI,EACJ,QAAQ,EACR,cAAc,EACd,OAAO,EACP,UAAU,EACV,aAAa,GACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAK3C,YAAY,EACV,cAAc,EACd,UAAU,GACX,MAAM,sBAAsB,CAAC;AAC9B,OAAO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B,uCAAuC;AACvC,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,8CAA8C;AAC9C,YAAY,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvE,2EAA2E;AAC3E,YAAY,EAAE,0BAA0B,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC/F,qDAAqD;AACrD,YAAY,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpE,mFAAmF;AACnF,YAAY,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,uCAAuC;AACvC,YAAY,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,4DAA4D;AAC5D,YAAY,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAClF,iFAAiF;AACjF,YAAY,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC"}
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@
6
6
  * @packageDocumentation
7
7
  */
8
8
  export { UniversalTensor } from './core/tensor.js';
9
- // v0.5.1 — canonical flat CODATA 2018 / SI-defined constants (PC-1).
9
+ // v0.5.1 — canonical flat CODATA 2022 / SI-defined constants (PC-1).
10
10
  // Single source of truth across numerical, dimensional, and bridge layers.
11
11
  // See src/core/constants.ts and docs/planning/v0.5.1-Implementation-Plan.md.
12
12
  export { C_SI, G_SI, H_SI, HBAR_SI, K_B_SI, E_SI, ALPHA, M_P_SI, L_P_SI, T_P_SI, H0_SI,
@@ -71,8 +71,11 @@ export { ricci } from './dimensional/curvature.js';
71
71
  // v0.5.0 curvature layer — Einstein tensor helper (Task 8). `einstein(R, g,
72
72
  // gInverse)` wraps a RiemannTensorNode + metric pair and produces the
73
73
  // composite G_μν = R_μν − ½ R g_μν as an ExprNode (own validator +
74
- // lowering arms — no AST rewrite). Vacuum-Einstein scope; matter-coupled
75
- // `G_μν = κ T_μν` is deferred to v0.6.0+.
74
+ // lowering arms — no AST rewrite). The matter-coupled field-equation node
75
+ // `G_μν = κ T_μν` exists (`EinsteinFieldEquationNode`, validated in
76
+ // dimensional/validator.ts); its numerical lowering is still deferred: the
77
+ // lowering layer refuses a deferred node kind with `NumericalBackendError`
78
+ // and names the evaluator to use instead (numerical/lowering.ts).
76
79
  export { einstein } from './dimensional/curvature.js';
77
80
  // v0.5.0 curvature layer — Bianchi residual helper (Task 9). `bianchiResidual(R)`
78
81
  // returns {residual, evaluate, evaluateMax} for the cyclic second-Bianchi-identity
@@ -142,6 +145,8 @@ findPerihelion, } from './numerical/index.js';
142
145
  export { composeEdges, consistencyRatio, evaluateEdge, minConfidence, regimesDiffer, QUANTITY_IDENTIFICATIONS, CompositionDimensionError, CompositionJunctionError, DomainViolationError,
143
146
  // Calibration edges (pre-registered CT-1/CT-1b/CT-2/CT-3 targets)
144
147
  M_SUN_KG, } from './composition/index.js';
148
+ /** A validity domain built from one condition text: the predicate, the description and the refusal all read it. */
149
+ export { validityDomain } from './composition/index.js';
145
150
  // v0.8.0 — Bridge-membership criterion + negative catalog (G-2 / P-4)
146
151
  export { adjudicateBridgeEntry, adjudicateCatalog } from './bridges/membership.js';
147
152
  export { REJECTED_BRIDGE_ADJUDICATIONS, REJECTED_BRIDGE_IDS } from './bridges/rejected.js';
@@ -152,7 +157,8 @@ export { enumerateCompositions, REGISTERED_COMPOSITION_IDS, propagateUncertainty
152
157
  // Identifiability classifier (structural over/exactly/under-determined
153
158
  // over the composition graph — Consequence 1 of the bridge-inference
154
159
  // epistemics note)
155
- export { classifyIdentifiability, classifyAll, forwardClosure, } from './composition/index.js';
160
+ /** The forward closure, the per-target classifier, the sweep, and the log-space rank over the monomial edges. */
161
+ export { classifyIdentifiability, classifyAll, forwardClosure, identifiabilityByRank, } from './composition/index.js';
156
162
  // Retrodiction harness (the framework's own falsification benchmark —
157
163
  // Consequence 2 of the bridge-inference epistemics note)
158
164
  export { retrodict, retrodictNode } from './composition/index.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"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ACtB,MAAM,+BAA+B,CAAC;AAKvC,qEAAqE;AACrE,+DAA+D;AAC/D,oEAAoE;AACpE,+CAA+C;AAC/C,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAOtF,gFAAgF;AAChF,6EAA6E;AAC7E,4EAA4E;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG/D,8EAA8E;AAC9E,8EAA8E;AAC9E,+EAA+E;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAG7D,oEAAoE;AACpE,6EAA6E;AAC7E,2EAA2E;AAC3E,yEAAyE;AACzE,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AAczC,+FAA+F;AAC/F,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AAGjF,+DAA+D;AAC/D,4EAA4E;AAC5E,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,gBAAgB;AAChB,iFAAiF;AACjF,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,6BAA6B,CAAC;AAGrC,6EAA6E;AAC7E,4EAA4E;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAG/D,+EAA+E;AAC/E,yEAAyE;AACzE,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC","sourcesContent":["/**\n * Universal Physics Tensor Framework\n *\n * Computational framework for exploring unified physics through tensor formalism\n *\n * @packageDocumentation\n */\n\nexport { UniversalTensor } from './core/tensor.js';\n// v0.5.1 — canonical flat CODATA 2018 / SI-defined constants (PC-1).\n// Single source of truth across numerical, dimensional, and bridge layers.\n// See src/core/constants.ts and docs/planning/v0.5.1-Implementation-Plan.md.\nexport {\n C_SI,\n G_SI,\n H_SI,\n HBAR_SI,\n K_B_SI,\n E_SI,\n ALPHA,\n M_P_SI,\n L_P_SI,\n T_P_SI,\n H0_SI,\n // v0.8.0 punch-list — promoted from the calibration-edges module\n M_SUN_SI,\n // IAU 2015 nominal solar GM. Not G_SI * M_SUN_SI.\n GM_SUN_SI,\n // v0.11 — electron mass (namespacing criterion-3 pin)\n M_E_SI,\n // canonical registry — Wien displacement constant (CE-wien)\n B_WIEN_SI,\n} from './core/constants.js';\nexport type {\n TensorConfig,\n TensorIndices,\n PhysicalLaw,\n BridgeEquation,\n EmergentPhenomenon,\n PhysicalScale,\n Force,\n Symmetry,\n InformationMeasure,\n} from './core/types.js';\nexport { PhysicalConstants } from './core/types.js';\n\n// v0.7 Proposal 3 — Typed `Cell` discriminated union (storage-layer\n// surface). `PhysicalLaw` / `BridgeEquation` / `EmergentPhenomenon`\n// above remain the legacy surface (consumers haven't migrated yet);\n// the new `Cell` union is the preferred forward-looking shape.\nexport type {\n Cell,\n CellBase,\n CellConfidence,\n LawCell,\n BridgeCell,\n EmergenceCell,\n} from './core/cell.js';\nexport { compose } from './core/tensor.js';\n\n// v0.7 Proposal 2 — Sparse semantic catalog (flux rules + adapter).\n// Per Decision #9, only the consumer-facing types are re-exported;\n// FluxRule / FluxRuleKind / FluxRuleResult stay @internal.\nexport type {\n FluxDiagnostic,\n FluxReport,\n} from './core/flux-rules.js';\nexport { FluxViolationError } from './core/flux-rules.js';\nexport type {\n CatalogEntryStatus,\n CatalogIngestionReport,\n} from './bridges/catalog-adapter.js';\nexport {\n catalogToCells,\n scanCatalog,\n ingestCatalog,\n ingestionReportToFluxReport,\n CatalogIngestionError,\n} from './bridges/catalog-adapter.js';\n\n// v0.7 Proposal 1 — Intelligent Index layer (UniversalIndex + Axes\n// + LabeledTensor wrapper). Per Decision #10, 10 public symbols.\n// MergedLabels<L,R> and canonicalLabelOrder stay @internal.\nexport type {\n AxisName,\n UniversalIndex,\n UniversalIndexId,\n MakeIndexOptions,\n} from './core/universal-index.js';\nexport { makeIndex } from './core/universal-index.js';\nexport type { AxesRegistry } from './core/axes-registry.js';\nexport { Axes } from './core/axes-registry.js';\nexport {\n LabeledTensor,\n LabeledTensorConstructionError,\n AxisMismatchError,\n IdentityConflictError,\n IndexNameMismatchError,\n RankPreservationError,\n AxisOrderError,\n AxisMergeError,\n AxisSplitError,\n} from './core/labeled-tensor.js';\n\n// v0.8 Proposal 5 — RegimeType extension system. Per P5 Decision #1,\n// ship the mechanism + the 18 v0.6-shipped values pre-registered;\n// closed taxonomy of new physics-regime built-ins deferred to v0.9.\nexport type {\n RegimeProvenance,\n RegimeValueBase,\n RegimeSpec,\n} from './core/regime-registry.js';\nexport {\n defineRegime,\n defineScale,\n defineForce,\n defineSymmetry,\n defineInformation,\n defineDimension,\n defineTopology,\n lookupRegime,\n listRegimesByAxis,\n provenanceFor,\n attachRegimesToCell,\n getCellRegimes,\n RegimeCollisionError,\n} from './core/regime-registry.js';\n// Phase 4 wiring side-effect: installs the regime-consistency rule.\nimport './core/regime-rule-install.js';\n// Phase 2 side-effect: pre-registers the 18 built-in regimes.\nimport './core/regimes-builtins.js';\n\n// v0.9 Proposal 8 — Bridge Parameter Differentiation (P8 Decision #1: lives\n// in src/diff/, doesn't touch src/bridges/). `bridgeGradientNumerical` is\n// central finite differences over a spec, engine-free. Engine AD of a spec\n// is unreachable by construction (`evaluate` returns a number, which carries\n// no tape); the exact AD path is `bridgeGradientAST` over the symbolic RHS.\nexport type { BridgeDiffSpec, BridgeNumericalGradientResult } from './diff/bridge-gradient.js';\nexport { bridgeGradientNumerical } from './diff/bridge-gradient.js';\n// Exact bridge gradients via reverse-mode AD over the symbolic RHS AST\n// (traced lowering through mathts-autograd; faithful encodings only).\nexport type { ASTGradientResult } from './diff/bridge-ast-gradient.js';\nexport {\n bridgeGradientAST,\n bridgeGradientASTById,\n astDifferentiableBridgeIds,\n} from './diff/bridge-ast-gradient.js';\n/** Differentiable relations: Shapiro delay, perihelion advance, Hawking temperature, and the decoherence rate. */\nexport {\n SHAPIRO_DELAY_DIFF,\n PERIHELION_ADVANCE_DIFF,\n HAWKING_TEMPERATURE_DIFF,\n DECOHERENCE_RATE_DIFF,\n DIFFERENTIABLE_RELATIONS,\n} from './diff/bridge-specs.js';\n\n// The catalog rows of `data/bridge-catalog.json`, in id order.\n// `BridgeEquationEntry` is a different shape from the runtime `BridgeEquation`\n// interface above: the entry is the catalog's record of an equation (status,\n// known issues, references, dependencies), while `BridgeEquation` describes a\n// runtime bridge between two tensor regimes.\nexport { BRIDGE_EQUATIONS } from './bridges/index.js';\n/** Request a caller-table confrontation. The catalog status does not change. */\nexport {\n requestCallerTableConfrontation,\n} from './bridges/caller-table.js';\n/** Types of a caller-table request and of its refusal or hit. */\nexport type {\n MeasuredCouplingRow,\n RunningProcedureRecord,\n RunningProcedure,\n CallerTableRequest,\n CallerTableRefusal,\n CallerTableHit,\n CallerTableResult,\n} from './bridges/caller-table.js';\nexport type {\n BridgeEquationEntry,\n BridgeEquationStatus,\n BridgeIssueSeverity,\n BridgeIssueFixable,\n KnownIssue,\n} from './bridges/index.js';\n\n/**\n * Constants that stay on the package root, and `CarrierSignError`.\n * Per-bridge evaluate functions are not on this root.\n */\nexport {\n VON_KLITZING_SI,\n JOSEPHSON_CONSTANT_SI,\n LORENZ_NUMBER_SI,\n BCS_GAP_RATIO,\n LANE_EMDEN_OMEGA3,\n THOMSON_CROSS_SECTION_SI,\n M_PROTON_SI,\n CarrierSignError,\n} from './bridges/index.js';\n/**\n * One evaluation of a catalog id or a canonical id.\n * A sourced number is `kind: 'value'`. An unset coefficient is `kind: 'unset'`.\n * @public\n */\nexport { evaluateRelation, CoefficientUnsetError } from './composition/index.js';\n/** The input errors {@link evaluateRelation} throws before any domain check; a domain failure is `DomainViolationError`. */\nexport {\n DuplicateInputError,\n InputTypeError,\n MissingInputError,\n NonFiniteInputError,\n UnknownInputError,\n} from './composition/index.js';\n/** A caller input that names a registered constant (`G`, `k_B`, `m_p`, …) is refused on every evaluation path. */\nexport { ConstantInputError } from './bridges/index.js';\n/** The result of {@link evaluateRelation}. A value carries a public `Dimension`. */\nexport type { Evaluation } from './composition/index.js';\n\nexport type { EvaluatorSpec, EvaluatorParameter, ParameterAlternate, GeometryRole } from './bridges/evaluators.js';\n/** An extra output an `EvaluatorSpec` returns beside its `value`. */\nexport type { CatalogEvaluatorOutput } from './bridges/catalog-types.js';\n/** The input contract an evaluator's `run` checks before the domain, and what a caller asks `run` for. */\nexport type { ContractAlternate, EvaluationWant, InputContract, InputSlot } from './bridges/input-contract.js';\n/** Build an input contract; throws when one spelling or alternate would bind two slots. */\nexport { inputContract } from './bridges/input-contract.js';\n\n// v0.4.0 connection layer — Christoffel formula builder and covariant derivative\n// AST node type. `christoffel` is public because bridge modules and downstream\n// callers compose Γ trees directly; `CovariantDerivativeNode` is the structural\n// type for the new ∇_μ AST kind.\nexport { christoffel } from './dimensional/connection.js';\n// CovariantDerivativeNode is re-exported from validator.ts (which holds the union);\n// importing from there avoids creating a separate source-of-truth.\nexport type { CovariantDerivativeNode } from './dimensional/validator.js';\n\n// v0.5.0 curvature layer — Ricci tensor helper (Task 7). `ricci(R)` wraps a\n// RiemannTensorNode and produces the contracted R_μν = R^λ_{λμν} as a\n// composite ExprNode (own validator + lowering arms).\nexport { ricci } from './dimensional/curvature.js';\nexport type { RicciTensorNode } from './dimensional/validator.js';\n\n// v0.5.0 curvature layer — Einstein tensor helper (Task 8). `einstein(R, g,\n// gInverse)` wraps a RiemannTensorNode + metric pair and produces the\n// composite G_μν = R_μν − ½ R g_μν as an ExprNode (own validator +\n// lowering arms — no AST rewrite). Vacuum-Einstein scope; matter-coupled\n// `G_μν = κ T_μν` is deferred to v0.6.0+.\nexport { einstein } from './dimensional/curvature.js';\nexport type { EinsteinTensorNode } from './dimensional/validator.js';\n\n// v0.5.0 curvature layer — Bianchi residual helper (Task 9). `bianchiResidual(R)`\n// returns {residual, evaluate, evaluateMax} for the cyclic second-Bianchi-identity\n// check ∇_{[λ} R_{μν]ρσ} = 0. The evaluator lives in numerical so curvature.ts\n// does not import it. Closes Phase 1 — Foundations.\nexport { bianchiResidual } from './numerical/bianchi-residual.js';\nexport type { BianchiResidualNode } from './dimensional/validator.js';\n\n// v0.6.0 Phase 1 — Killing-vector machinery (Task 1.3).\n// `verifyKillingEquation` checks the Killing equation ∇_μ ξ_ν + ∇_ν ξ_μ = 0\n// numerically at a point using a hybrid impl (exact Christoffels + analytic\n// metric derivatives). `evaluateConservedCharge` evaluates Q = ξ^μ p_μ along\n// a geodesic. `ChristoffelAccess` is the layout-agnostic Christoffel accessor\n// type that insulates consumers from the Phase 2 BR-2 flat-layout migration.\nexport {\n verifyKillingEquation,\n checkKillingEquation,\n evaluateConservedCharge,\n} from './numerical/killing.js';\nexport type {\n KillingEquationOptions,\n KillingEquationCheck,\n ChristoffelAccess,\n} from './numerical/killing.js';\n\n// v0.4.0 geodesic integrator (RK4 solver — headline feature of v0.4.0)\nexport {\n integrateGeodesic,\n type GeodesicIntegratorInputs,\n type GeodesicIntegratorResult,\n} from './numerical/geodesic-integrator.js';\n\n// v0.14 G-9 increment 2 — geometrized-units boundary adapters. Convert a scalar\n// between SI and geometrized (G = c = 1) units, driven by its `Dimension`\n// exponent vector (factor G^M·c^(T−2M)). For consumers running the GR pipeline\n// in geometrized units; the default-pipeline migration is a later increment.\nexport {\n toGeometrized,\n fromGeometrized,\n geometrizedFactor,\n NonGeometrizableDimensionError,\n} from './numerical/geometrized.js';\n\n// v0.7.1 M-1 — Surface restoration: five v0.7 dimensional primitives were\n// @public-tagged during the BE-X re-encoding sprint but absent from this\n// manifest. Re-exported here per Phase 1 Task 1.2 (Decision #2 guard).\n// Mirrors the v0.6.0 EinsteinFieldEquationNode / KretschmannScalarNode /\n// RicciTensorNode pattern — predicate-node types + validators are @public.\nexport type {\n TracableTensorNode,\n TensorTraceNode,\n TensorTraceValidationResult,\n TensorTraceOptions,\n} from './dimensional/tensor-trace.js';\nexport { validateTensorTrace } from './dimensional/tensor-trace.js';\n\nexport type {\n FriedmannVariant,\n FriedmannEquationNode,\n FriedmannEquationValidationResult,\n} from './dimensional/friedmann-equation.js';\nexport { validateFriedmannEquation } from './dimensional/friedmann-equation.js';\n\nexport type {\n RGCouplingNode,\n BetaFunctionNode,\n BetaFunctionValidationResult,\n} from './dimensional/rg-flow.js';\nexport { rgCoupling, validateRGCoupling, validateBetaFunction } from './dimensional/rg-flow.js';\n\nexport type {\n ArrowOfTime,\n GaugeFieldNode,\n TimeSymmetryPredicateNode,\n TimeSymmetryPredicateValidationResult,\n} from './dimensional/gauge-field.js';\nexport { validateGaugeField, validateTimeSymmetryPredicate } from './dimensional/gauge-field.js';\n\nexport type {\n ScalarFieldNode,\n KleinGordonEquationNode,\n KleinGordonEquationValidationResult,\n} from './dimensional/klein-gordon-equation.js';\nexport { validateKleinGordonEquation } from './dimensional/klein-gordon-equation.js';\n\n// Dimensional analyzer (Tier 4) — SI dimension propagation through bridge\n// equations expressed as ExprNode trees. See src/dimensional/README.md.\n// Every symbol re-exported in this block is `@public` — the consumer-facing\n// dimensional/metric surface (stabilised in v0.3.0).\nexport type { Dimension } from './dimensional/types.js';\n/** The one unit reader: parse a unit, convert a value exactly, and the typed errors it throws. */\nexport {\n AmbiguousUnitError,\n convertValue,\n parseUnit,\n UnitError,\n UnitRefusedError,\n UnknownUnitError,\n} from './dimensional/units.js';\n/** A parsed unit, a converted value, and how a temperature is read. */\nexport type { AffineTemperature, ConvertedValue, ParsedUnit, TemperatureReading } from './dimensional/units.js';\nexport {\n DIMENSIONLESS,\n LENGTH,\n AREA,\n TIME,\n FREQUENCY,\n MASS,\n VELOCITY,\n ACCELERATION,\n FORCE,\n ENERGY,\n POWER,\n ACTION,\n TEMPERATURE,\n ENTROPY,\n CHARGE,\n} from './dimensional/types.js';\nexport {\n multiply,\n divide,\n power,\n add,\n subtract,\n equals,\n format,\n DimensionMismatchError,\n} from './dimensional/algebra.js';\nexport type { ExprNode, TranscendentalFn, ValidationResult, Violation } from './dimensional/validator.js';\nexport { validate, validateEquation, validateInverseMetricPair } from './dimensional/validator.js';\nexport { inferDimensionForBridge } from './dimensional/bridge-check.js';\n\n// v0.6.0 Phase 2 Task 2.4 — Einstein-equation numerical evaluator.\n// `evaluateEinsteinEquationResidual` computes the scale-normalized max residual\n// |G_μν + Λ g_μν − κ T_μν| / |g_μν| at a coordinate point. Accepts metric\n// closures + stress-energy closure; returns a dimensionless relative residual.\n// For Schwarzschild vacuum (T=0, Λ=0) the residual is the FD truncation floor\n// (~1e-10 relative at 4th-order stencil accuracy).\nexport {\n evaluateEinsteinEquationResidual,\n} from './numerical/einstein-equation.js';\nexport type {\n EinsteinEquationResidualInput,\n MetricClosure,\n Vec4,\n} from './numerical/einstein-equation.js';\n\n// v0.6.0 Phase 2 Task 2.3 — EinsteinFieldEquationNode predicate AST + validator.\n// Represents G_μν + Λ g_μν = (8πG/c⁴) T_μν as a structurally-validated AST node.\n// Validator checks: free-index agreement, per-component dim equality [L⁻²],\n// and symmetry agreement (Decision #3 + #11).\nexport { validateEinsteinFieldEquation } from './dimensional/einstein-equation.js';\nexport type {\n EinsteinFieldEquationNode,\n EinsteinFieldEquationValidationResult,\n} from './dimensional/einstein-equation.js';\n\n// v0.6.0 Phase 3 Task 3.5 — KretschmannScalarNode AST + validator.\n// K = R_{ρσμν} R^{ρσμν} is the canonical curvature invariant; scalar (rank-0),\n// dim [L⁻⁴]. Diverges at genuine singularities; finite at coordinate ones.\nexport type {\n KretschmannScalarNode,\n KretschmannScalarValidationResult,\n} from './dimensional/curvature-invariants.js';\nexport { validateKretschmannScalar } from './dimensional/curvature-invariants.js';\n\n// v0.6.0 Phase 3 Task 3.6 — Kretschmann scalar numerical contraction.\n// O(4⁸) = 65536 multiplications per call — diagnostic/sample-point use only.\nexport { computeKretschmann } from './numerical/kretschmann.js';\n\n// Numerical-contraction backend (v0.3.5+). See docs/planning/v0.3.5-Design.md\n// and docs/planning/v0.4.0-Implementation-Plan.md (v0.4.0 additions below).\n// Every symbol below is `@public` — the consumer-facing (TensorJS) surface.\n// `MathTSEngine` is intentionally NOT re-exported here. It is reachable only\n// via the `universal-physics-tensor/numerical/mathts-engine` subpath. The\n// MathTS packages are required dependencies.\n/** Numerical evaluation, the covariant eikonal integrator, the GL4 geodesic integrator, and the perihelion finder. */\nexport {\n evaluateNumerical,\n evaluateNumericalRaw,\n evaluateMetricInverse,\n getActiveEngine,\n setActiveEngine,\n NumericalBackendError,\n // v0.4.0 additions to the numerical surface\n DuplicateCoordinateWarning,\n EngineCapabilityError,\n hasAutogradSupport,\n evaluateCovariantEikonalNumerical,\n // v0.5.0 GL4 symplectic integrator\n integrateGeodesicGL4,\n // v0.5.0 perihelion finder (Task 4)\n findPerihelion,\n} from './numerical/index.js';\n/** Types for numerical evaluation, gradients, the GL4 integrator, the perihelion finder, and the covariant eikonal. */\nexport type {\n NumericalResult,\n NumericalRawResult,\n EvaluateOptions,\n NumericalInputs,\n TensorEngine,\n EngineTensor,\n EinsumSpec,\n NestedArray,\n GridField,\n // v0.4.0 type additions\n ForwardGradResult,\n ReverseGradResult,\n // v0.5.0 GL4 type additions\n GL4State,\n GL4Snapshot,\n GL4Options,\n // v0.5.0 perihelion-finder type additions (Task 4)\n PerihelionResult,\n FindPerihelionOptions,\n CovariantEikonalInputs,\n CovariantEikonalResult,\n} from './numerical/index.js';\n\n// ---------------------------------------------------------------------------\n// v0.8.0 — Composition graph (graph-lite Quantity/BridgeEdge/composeEdges\n// beside the catalog; see docs/planning/v0.8.0-Design.md). The operator is\n// `composeEdges`, NOT `compose` — `compose` is the v0.7 Cell factory above.\n// ---------------------------------------------------------------------------\nexport {\n composeEdges,\n consistencyRatio,\n evaluateEdge,\n minConfidence,\n regimesDiffer,\n QUANTITY_IDENTIFICATIONS,\n CompositionDimensionError,\n CompositionJunctionError,\n DomainViolationError,\n // Calibration edges (pre-registered CT-1/CT-1b/CT-2/CT-3 targets)\n M_SUN_KG,\n} from './composition/index.js';\nexport type {\n BridgeEdge,\n ComposeOptions,\n EdgeConfidence,\n Quantity,\n QuantityIdentification,\n RegimeAttributes,\n ValidityDomain,\n} from './composition/index.js';\n\n// v0.8.0 — Bridge-membership criterion + negative catalog (G-2 / P-4)\nexport { adjudicateBridgeEntry, adjudicateCatalog } from './bridges/membership.js';\nexport { REJECTED_BRIDGE_ADJUDICATIONS, REJECTED_BRIDGE_IDS } from './bridges/rejected.js';\nexport type { BridgeVerdict, CatalogAdjudicationReport } from './bridges/membership.js';\nexport type { RejectedBridgeAdjudication } from './bridges/rejected.js';\n\n// v0.8.0 — GW170817 → BE-36 real-data confrontation (G-3)\n\n// v0.28+ — Mercury perihelion → BE-52 real-data confrontation (established bridge)\n\n// v0.10.0 — Phase-D enumeration + uncertainty propagation (T3/T4)\nexport {\n enumerateCompositions,\n REGISTERED_COMPOSITION_IDS,\n propagateUncertainty,\n} from './composition/index.js';\nexport type {\n CompositionCandidate,\n EnumerationReport,\n UncertaintyResult,\n} from './composition/index.js';\n\n// Identifiability classifier (structural over/exactly/under-determined\n// over the composition graph — Consequence 1 of the bridge-inference\n// epistemics note)\nexport {\n classifyIdentifiability,\n classifyAll,\n forwardClosure,\n} from './composition/index.js';\nexport type {\n IdentifiabilityVerdict,\n IdentifiabilityResult,\n IdentifiabilityOptions,\n} from './composition/index.js';\n\n// Retrodiction harness (the framework's own falsification benchmark —\n// Consequence 2 of the bridge-inference epistemics note)\nexport { retrodict, retrodictNode } from './composition/index.js';\n/** The retrodiction harness's result, prediction, refusal, report and option types. */\nexport type {\n RetrodictionOutcome,\n RetrodictionPrediction,\n RetrodictionResult,\n RetrodictionRefusal,\n RetrodictionReport,\n RetrodictionOptions,\n} from './composition/index.js';\n\n// Unified \"explain this quantity\" entry point over the three inference\n// primitives (identifiability + retrodiction + Buckingham-π)\nexport { explainQuantity } from './composition/index.js';\nexport type {\n DerivationExplanation,\n ExplainOptions,\n QuantityExplanation,\n} from './composition/index.js';\n\n// v0.12 — symbolic bridge composition (the Observable contract). Composes\n// bridges' symbolic ExprNode forms (not just numeric closures), dimensionally\n// validated and numerically evaluable.\nexport { composeSymbolic, SymbolicCompositionError, SymbolicEvalError } from './composition/index.js';\nexport type { Observable, ComposeSymbolicOptions } from './composition/index.js';\n\n// Physics-map visualization — render the bipartite, clustered hypergraph\n// (quantities = nodes, equations = junctions) as Mermaid / Graphviz-DOT source.\nexport { buildVizModel, edgeToJunction } from './composition/index.js';\nexport type {\n VizStatus,\n VizJunction,\n VizCluster,\n VizOptions,\n VizModel,\n VizFilterStats,\n} from './composition/index.js';\n// SVG rendering via the optional @viz-js/viz peer (separate module so the\n// graph-viz model stays pure/synchronous/dependency-free).\nexport { renderDotToSvg, SvgRendererUnavailableError } from './composition/index.js';\n\n// User-equation injection — parse a free-form \"TARGET = EXPR\" and place it into\n// the map as a connected 'user' junction (with a \"did you mean?\" hint).\nexport {\n parseUserEquation,\n suggestQuantities,\n suggestByDimension,\n equationLanding,\n analyzeUserEquation,\n UserEquationError,\n} from './composition/index.js';\n/** The catalog or parameter name a spelling means. One owner for a target and an input. */\nexport { resolveQuantityName } from './composition/index.js';\nexport type { UserEquation, EquationLanding, EquationAnalysis, EquationHint } from './composition/index.js';\n\n// Phase 1 — string → dimensional ExprNode parser + single-unknown dimensional\n// inference (the front-end to the physics AST).\nexport { parsePhysics } from './numerical/formula-registry.js';\nexport { FormulaDimensionError } from './numerical/formula-dimension.js';\nexport type { ParsedPhysics } from './numerical/formula-dimension.js';\nexport { inferUnknownDimension, substituteSymbolDim } from './dimensional/dimension-inference.js';\n// Dimension-adjacency review surface (name-divergent but same-dimension quantities).\nexport { dimensionAdjacency } from './composition/index.js';\nexport type { DimensionAdjacency } from './composition/index.js';\n\n\n// Buckingham-π enumerator (the principled primitive for the exactly-\n// determined case — build target 1 of the bridge-inference epistemics\n// note; FORM only, never the dimensionless constant)\nexport {\n buckinghamPi,\n dimensionallyDetermines,\n RationalizationError,\n} from './dimensional/buckingham.js';\nexport type {\n DimensionalVariable,\n PiGroup,\n BuckinghamVerdict,\n BuckinghamResult,\n DimensionalDeterminationResult,\n} from './dimensional/buckingham.js';\n\n// v0.11 — namespacing gate (Option D: name-collision rule + dispositions)\nexport {\n CompositionAliasError,\n SOURCE_ALIAS_DISPOSITIONS,\n} from './composition/compose-surface.js';\nexport type {\n AliasDisposition,\n DispositionRequired,\n} from './composition/compose-surface.js';\n\n// v0.11 — Klein-Gordon dispersion evaluator (G-7 closure, plane-wave sector)\nexport {\n evaluateKGDispersionResidual,\n verifyKleinGordonPlaneWave,\n} from './numerical/klein-gordon.js';\nexport type {\n KGDispersionResidualInput,\n KGPlaneWaveVerifyInput,\n KGPlaneWaveVerifyResult,\n} from './numerical/klein-gordon.js';\n\n// v0.11 — BE-23 Planckian-dissipation data confrontation (2nd real-data check)\n\n// The composition graph is the relation projection of the catalog.\nexport { CATALOG_GRAPH } from './composition/index.js';\n\n// The standard-physics counterpart: the canonical L-layer projected into the\n// composition-graph edge vocabulary, so the discovery/analysis funnel can run\n// on textbook physics ALONE (bridges excluded). See `composition/canonical-graph`.\nexport {\n CANONICAL_GRAPH,\n canonicalToEdges,\n CANONICAL_CONSTANTS,\n} from './composition/index.js';\n\n// ── Canonical-equation registry (the L-layer ground truth) ──────────────────\n// Textbook physics equations bridges are validated against. Multi-fidelity\n// (L0 dimensional / L1 scalar-AST / L2 field-equation) with epistemic-honesty\n// and provenance fields. See docs/planning/Canonical-Equation-Registry-A-*.\nexport {\n CANONICAL_EQUATIONS,\n CANONICAL_BY_ID,\n canonicalById,\n canonicalByDomain,\n partneredBridgeIds,\n bridgesWithoutCanonicalPartner,\n} from './canonical/registry.js';\nexport {\n canonicalToLaw,\n seedCanonicalLaws,\n CANONICAL_TENSOR_CONFIG,\n} from './canonical/seed-l-layer.js';\nexport type {\n CanonicalEquation,\n CanonicalDomain,\n EpistemicStatus,\n CanonicalForms,\n FieldEquationNode,\n} from './canonical/canonical-equation.js';\n// Sub-project B — bridge↔canonical linkage (validate vs standard physics).\n// `normalForm` is the structural hash up to dimensionless factors;\n// `classifyLinkage`/`scanLinkages` recover/contain bridges against canonicals\n// with the F4 circularity guard (`restates-canonical` vs genuine `recovers`).\nexport { normalForm, structurallyEqual } from './canonical/normal-form.js';\nexport { classifyLinkage, scanLinkages } from './canonical/linkage.js';\nexport type { LinkageResult, RecoveryOutcome } from './canonical/linkage.js';\n\n// Adjudication ledger — human verdicts on discovery-funnel identification\n// hypotheses (review memory the funnel must not re-surface as fresh).\n// Precedent: SOURCE_ALIAS_DISPOSITIONS/AliasDisposition above is the repo's\n// other reviewable judgment registry, and is index-exported the same way.\nexport {\n candidateId,\n ADJUDICATIONS,\n adjudicationFor,\n annotateAdjudications,\n} from './composition/adjudication.js';\nexport type { AnnotatedCandidate } from './composition/adjudication.js';\n/** The adjudication ledger's verdict and record types, exported from their owner, the catalog file's types. */\nexport type { AdjudicationVerdict, CatalogAdjudication } from './bridges/catalog-types.js';\n\n// Consequence propagation — the machine pre-classifier for the human\n// adjudication ledger. Annotates discovery candidates with the\n// entailed/novel-consequence/inconclusive signal; never mutates the\n// catalog/graph, never re-orders or re-scores.\nexport { annotateConsequences, classifyProposal } from './composition/consequence.js';\nexport type {\n ConsequenceAnnotatedCandidate,\n ConsequenceSignal,\n ConsequenceEvidence,\n} from './composition/consequence.js';\n\n// Epistemic-grounding ledger (PI-instrument Phase 1). A pure, derived view over\n// a candidate's falsifier results: which gates passed vs abstained, plus the\n// honest no-mechanism/no-data ceiling. Annotation-only; changes no verdict.\nexport { describeGrounding } from './composition/grounding.js';\nexport type { CandidateGrounding } from './composition/grounding.js';\n\n// Discovery funnel — vet link-candidate identifications against the inference\n// suite (Direction 2). rankDiscoveries is the entry point; VettedCandidate is\n// the output type. Required to feed annotateAdjudications from the public API.\nexport { rankDiscoveries } from './composition/discovery.js';\nexport type { VettedCandidate } from './composition/discovery.js';\n\n// v0.33.0 — `upt confront` real-data confrontation subsystem: typed\n// observations + a normalized ConfrontationOutcome (discriminated on `kind`)\n// wrap the per-bridge confrontation modules (be-23/36/37/48/52) behind one\n// registry, plus deciding-measurement elasticity for value-kind entries.\nexport {\n residualInSigma,\n combineInQuadrature,\n consistencyComparison,\n} from './bridges/observations/types.js';\nexport type {\n ConsistencyComparison,\n ObservationProvenance,\n SigmaComponent,\n ObservationKind,\n ConfrontationOutcome,\n ConfrontationDataHandling,\n ConfrontationPreprocessing,\n ConfrontationIndependence,\n SourceRef,\n SourceRefs,\n} from './bridges/observations/types.js';\n\n// BE-53 — one-loop coefficient, and a confrontation only when the caller supplies both inputs.\nexport { oneLoopCoefficientStatement } from './bridges/coefficient-statement.js';\nexport type { OneLoopCoefficientStatement, OneLoopCoefficientSign } from './bridges/coefficient-statement.js';\n\n// The confrontation registry: every committed confrontation of\n// `data/bridge-catalog.json`, the single lookup surface for `upt confront`.\nexport {\n CONFRONTATIONS,\n listConfrontations,\n runConfrontation,\n // Rigor hierarchy of the evidence spine (2026-07-05) — stringent/moderate/loose.\n CONFRONTATION_RIGOR,\n confrontationRigor,\n rigorDistribution,\n} from './bridges/confrontations.js';\nexport type { ConfrontationEntry, RigorTier } from './bridges/confrontations.js';\n\n// Deciding-measurement elasticity — which input a value-kind confrontation's\n// prediction depends on most strongly (central-difference log-sensitivity).\nexport { decidingMeasurement } from './bridges/sensitivity.js';\nexport type { Elasticity } from './bridges/sensitivity.js';\n\n// The PUBLIC atlas surface as a namespace (Atlas API review, Tier 1). The full\n// @internal surface stays on the universal-physics-tensor/atlas subpath.\nexport * as atlas from './atlas/public.js';\n\n// ---------------------------------------------------------------------------\n// Closure under type references (tests/api/root-public-closure.test.ts).\n// Every type a root export names is itself importable from the root or from\n// a package.json subpath; the names below were reachable only through the\n// public declarations that mention them.\n// ---------------------------------------------------------------------------\n/** The base class of every error this package throws. */\nexport type { UPTError } from './dimensional/errors.js';\n/** Which constants a natural-unit evaluation sets to one. */\nexport type { UnitMode } from './dimensional/natural-units.js';\n/** The tensor and curvature node family of the dimensional AST. */\nexport type {\n Variance,\n Role,\n TensorIndex,\n UpperIndex,\n CovariantIndex,\n TensorSymbolNode,\n TensorProductNode,\n MetricTensorNode,\n KroneckerDeltaNode,\n TensorPartialDerivativeNode,\n RiemannTensorNode,\n WeylTensorNode,\n KillingVectorNode,\n ConservedChargeNode,\n StressEnergyTensorNode,\n CosmologicalConstantNode,\n} from './dimensional/ast-types.js';\n/** The generic shape the curvature node types instantiate, and its kind union (referenced by the exported node types). */\nexport type { CurvatureCompositeNode, CurvatureKind } from './dimensional/curvature-composite.js';\n/** The kind of a flux rule. */\nexport type { FluxRuleKind } from './core/flux-rules.js';\n/** The per-axis value tables of the core axis registry. */\nexport type { ScaleAxes, ForceAxes, SymmetryAxes, InformationAxes } from './core/axes-registry.js';\n/** The convenience form a regime registration accepts for an axis. */\nexport type { AxisConvenience } from './core/regime-registry.js';\n/** The named inputs of the four bridge differentiation specs. */\nexport type { ShapiroInput, PerihelionInput, HawkingInput, DecoherenceInput } from './diff/bridge-specs.js';\n/** The contraction and free-axis records an einsum plan is made of. */\nexport type { EinsumContraction, EinsumFreeAxis } from './numerical/tensor-engine.js';\n/** The callbacks a Killing-equation check takes: the vector field, the metric and the connection. */\nexport type { KillingFn, KillingMetricFn, ChristoffelAtFn } from './numerical/killing.js';\n/** A relation's input contract and the sign and unit conventions it states. */\nexport type { RelationContract, Conventions } from './relations/types.js';\n/** The classification axes of the composition registry. */\nexport type {\n ScaleAxis,\n ForceAxis,\n InformationAxis,\n SymmetryAxis,\n TopologyAxis,\n StatisticsAxis,\n} from './composition/axes.js';\n/** Options of the chain enumerator. */\nexport type { EnumerationOptions } from './composition/enumerate.js';\n/** Options of the uncertainty propagation. */\nexport type { UncertaintyOptions } from './composition/uncertainty.js';\n/** Options of a user-equation analysis and the short form of a binding. */\nexport type { AnalyzeUserEquationOptions, ShortBinding } from './composition/user-equation.js';\n/** A constant as the canonical graph declares it. */\nexport type { ConstantDef } from './composition/canonical-graph.js';\n/** An identity consequence the surfacer proposes; never written to the catalog. */\nexport type { ProposedBridge } from './composition/proposed-bridges.js';\n/** Options of the discovery funnel. */\nexport type { DiscoveryOptions } from './composition/discovery.js';\n/** A representative value of a quantity with its source. */\nexport type { RepresentativeValue } from './composition/representative-values.js';\n/** A canonical prefactor, scalar or per dimensionless group, with its source. */\nexport type { SourcedPrefactor, SourcedGroupPrefactor } from './canonical/canonical-equation.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,qEAAqE;AACrE,2EAA2E;AAC3E,6EAA6E;AAC7E,OAAO,EACL,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,MAAM,EACN,IAAI,EACJ,KAAK,EACL,MAAM,EACN,MAAM,EACN,MAAM,EACN,KAAK;AACL,iEAAiE;AACjE,QAAQ;AACR,kDAAkD;AAClD,SAAS;AACT,sDAAsD;AACtD,MAAM;AACN,4DAA4D;AAC5D,SAAS,GACV,MAAM,qBAAqB,CAAC;AAY7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAcpD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAS3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAK1D,OAAO,EACL,cAAc,EACd,WAAW,EACX,aAAa,EACb,2BAA2B,EAC3B,qBAAqB,GACtB,MAAM,8BAA8B,CAAC;AAWtC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EACL,aAAa,EACb,8BAA8B,EAC9B,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,cAAc,EACd,cAAc,EACd,cAAc,GACf,MAAM,0BAA0B,CAAC;AAWlC,OAAO,EACL,YAAY,EACZ,WAAW,EACX,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,cAAc,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E,8EAA8E;AAC9E,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAGvE,0EAA0E;AAC1E,sEAAsE;AACtE,4EAA4E;AAC5E,0EAA0E;AAC1E,OAAO,EACL,WAAW,EACX,aAAa,EACb,eAAe,EACf,qBAAqB,GACtB,MAAM,+BAA+B,CAAC;AAKvC,qEAAqE;AACrE,+DAA+D;AAC/D,oEAAoE;AACpE,+CAA+C;AAC/C,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAOtF,gFAAgF;AAChF,6EAA6E;AAC7E,4EAA4E;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG/D,8EAA8E;AAC9E,8EAA8E;AAC9E,+EAA+E;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAG7D,oEAAoE;AACpE,6EAA6E;AAC7E,2EAA2E;AAC3E,yEAAyE;AACzE,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AAczC,+FAA+F;AAC/F,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AAGjF,+DAA+D;AAC/D,4EAA4E;AAC5E,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,gBAAgB;AAChB,iFAAiF;AACjF,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,6BAA6B,CAAC;AAGrC,6EAA6E;AAC7E,4EAA4E;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAG/D,+EAA+E;AAC/E,yEAAyE;AACzE,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC","sourcesContent":["/**\n * Universal Physics Tensor Framework\n *\n * Computational framework for exploring unified physics through tensor formalism\n *\n * @packageDocumentation\n */\n\nexport { UniversalTensor } from './core/tensor.js';\n// v0.5.1 — canonical flat CODATA 2022 / SI-defined constants (PC-1).\n// Single source of truth across numerical, dimensional, and bridge layers.\n// See src/core/constants.ts and docs/planning/v0.5.1-Implementation-Plan.md.\nexport {\n C_SI,\n G_SI,\n H_SI,\n HBAR_SI,\n K_B_SI,\n E_SI,\n ALPHA,\n M_P_SI,\n L_P_SI,\n T_P_SI,\n H0_SI,\n // v0.8.0 punch-list — promoted from the calibration-edges module\n M_SUN_SI,\n // IAU 2015 nominal solar GM. Not G_SI * M_SUN_SI.\n GM_SUN_SI,\n // v0.11 — electron mass (namespacing criterion-3 pin)\n M_E_SI,\n // canonical registry — Wien displacement constant (CE-wien)\n B_WIEN_SI,\n} from './core/constants.js';\nexport type {\n TensorConfig,\n TensorIndices,\n PhysicalLaw,\n BridgeEquation,\n EmergentPhenomenon,\n PhysicalScale,\n Force,\n Symmetry,\n InformationMeasure,\n} from './core/types.js';\nexport { PhysicalConstants } from './core/types.js';\n\n// v0.7 Proposal 3 — Typed `Cell` discriminated union (storage-layer\n// surface). `PhysicalLaw` / `BridgeEquation` / `EmergentPhenomenon`\n// above remain the legacy surface (consumers haven't migrated yet);\n// the new `Cell` union is the preferred forward-looking shape.\nexport type {\n Cell,\n CellBase,\n CellConfidence,\n LawCell,\n BridgeCell,\n EmergenceCell,\n} from './core/cell.js';\nexport { compose } from './core/tensor.js';\n\n// v0.7 Proposal 2 — Sparse semantic catalog (flux rules + adapter).\n// Per Decision #9, only the consumer-facing types are re-exported;\n// FluxRule / FluxRuleKind / FluxRuleResult stay @internal.\nexport type {\n FluxDiagnostic,\n FluxReport,\n} from './core/flux-rules.js';\nexport { FluxViolationError } from './core/flux-rules.js';\nexport type {\n CatalogEntryStatus,\n CatalogIngestionReport,\n} from './bridges/catalog-adapter.js';\nexport {\n catalogToCells,\n scanCatalog,\n ingestCatalog,\n ingestionReportToFluxReport,\n CatalogIngestionError,\n} from './bridges/catalog-adapter.js';\n\n// v0.7 Proposal 1 — Intelligent Index layer (UniversalIndex + Axes\n// + LabeledTensor wrapper). Per Decision #10, 10 public symbols.\n// MergedLabels<L,R> and canonicalLabelOrder stay @internal.\nexport type {\n AxisName,\n UniversalIndex,\n UniversalIndexId,\n MakeIndexOptions,\n} from './core/universal-index.js';\nexport { makeIndex } from './core/universal-index.js';\nexport type { AxesRegistry } from './core/axes-registry.js';\nexport { Axes } from './core/axes-registry.js';\nexport {\n LabeledTensor,\n LabeledTensorConstructionError,\n AxisMismatchError,\n IdentityConflictError,\n IndexNameMismatchError,\n RankPreservationError,\n AxisOrderError,\n AxisMergeError,\n AxisSplitError,\n} from './core/labeled-tensor.js';\n\n// v0.8 Proposal 5 — RegimeType extension system: the mechanism, with the 18\n// v0.6-shipped values pre-registered. No further built-in regime is added\n// (owner ruling of 2026-10-09, NOTES.md); a new regime is registered through\n// this mechanism by its caller.\nexport type {\n RegimeProvenance,\n RegimeValueBase,\n RegimeSpec,\n} from './core/regime-registry.js';\nexport {\n defineRegime,\n defineScale,\n defineForce,\n defineSymmetry,\n defineInformation,\n defineDimension,\n defineTopology,\n lookupRegime,\n listRegimesByAxis,\n provenanceFor,\n attachRegimesToCell,\n getCellRegimes,\n RegimeCollisionError,\n} from './core/regime-registry.js';\n// Phase 4 wiring side-effect: installs the regime-consistency rule.\nimport './core/regime-rule-install.js';\n// Phase 2 side-effect: pre-registers the 18 built-in regimes.\nimport './core/regimes-builtins.js';\n\n// v0.9 Proposal 8 — Bridge Parameter Differentiation (P8 Decision #1: lives\n// in src/diff/, doesn't touch src/bridges/). `bridgeGradientNumerical` is\n// central finite differences over a spec, engine-free. Engine AD of a spec\n// is unreachable by construction (`evaluate` returns a number, which carries\n// no tape); the exact AD path is `bridgeGradientAST` over the symbolic RHS.\nexport type { BridgeDiffSpec, BridgeNumericalGradientResult } from './diff/bridge-gradient.js';\nexport { bridgeGradientNumerical } from './diff/bridge-gradient.js';\n// Exact bridge gradients over the symbolic RHS AST, through MathTS\n// compileScalarGradient (faithful encodings only).\nexport type { ASTGradientResult } from './diff/bridge-ast-gradient.js';\nexport {\n bridgeGradientAST,\n bridgeGradientASTById,\n astDifferentiableBridgeIds,\n} from './diff/bridge-ast-gradient.js';\n/** Differentiable relations: Shapiro delay, perihelion advance, Hawking temperature, and the decoherence rate. */\nexport {\n SHAPIRO_DELAY_DIFF,\n PERIHELION_ADVANCE_DIFF,\n HAWKING_TEMPERATURE_DIFF,\n DECOHERENCE_RATE_DIFF,\n DIFFERENTIABLE_RELATIONS,\n} from './diff/bridge-specs.js';\n\n// The catalog rows of `data/bridge-catalog.json`, in id order.\n// `BridgeEquationEntry` is a different shape from the runtime `BridgeEquation`\n// interface above: the entry is the catalog's record of an equation (status,\n// known issues, references, dependencies), while `BridgeEquation` describes a\n// runtime bridge between two tensor regimes.\nexport { BRIDGE_EQUATIONS } from './bridges/index.js';\n/** Request a caller-table confrontation. The catalog status does not change. */\nexport {\n requestCallerTableConfrontation,\n} from './bridges/caller-table.js';\n/** Types of a caller-table request and of its refusal or hit. */\nexport type {\n MeasuredCouplingRow,\n RunningProcedureRecord,\n RunningProcedure,\n CallerTableRequest,\n CallerTableRefusal,\n CallerTableHit,\n CallerTableResult,\n} from './bridges/caller-table.js';\nexport type {\n BridgeEquationEntry,\n BridgeEquationStatus,\n BridgeIssueSeverity,\n BridgeIssueFixable,\n KnownIssue,\n} from './bridges/index.js';\n\n/**\n * Constants that stay on the package root, and `CarrierSignError`.\n * Per-bridge evaluate functions are not on this root.\n */\nexport {\n VON_KLITZING_SI,\n JOSEPHSON_CONSTANT_SI,\n LORENZ_NUMBER_SI,\n BCS_GAP_RATIO,\n LANE_EMDEN_OMEGA3,\n THOMSON_CROSS_SECTION_SI,\n M_PROTON_SI,\n CarrierSignError,\n} from './bridges/index.js';\n/**\n * One evaluation of a catalog id or a canonical id.\n * A sourced number is `kind: 'value'`. An unset coefficient is `kind: 'unset'`.\n * @public\n */\nexport { evaluateRelation, CoefficientUnsetError } from './composition/index.js';\n/** The input errors {@link evaluateRelation} throws before any domain check; a domain failure is `DomainViolationError`. */\nexport {\n DuplicateInputError,\n InputTypeError,\n MissingInputError,\n NonFiniteInputError,\n UnknownInputError,\n} from './composition/index.js';\n/** A caller input that names a registered constant (`G`, `k_B`, `m_p`, …) is refused on every evaluation path. */\nexport { ConstantInputError } from './bridges/index.js';\n/** The result of {@link evaluateRelation}. A value carries a public `Dimension`. */\nexport type { Evaluation, ExtraOutput } from './composition/index.js';\n\nexport type { EvaluatorSpec, EvaluatorParameter, ParameterAlternate, GeometryRole } from './bridges/evaluators.js';\n/** An extra output an `EvaluatorSpec` returns beside its `value`. */\nexport type { CatalogEvaluatorOutput } from './bridges/catalog-types.js';\n/** The input contract an evaluator's `run` checks before the domain, and what a caller asks `run` for. */\nexport type { ContractAlternate, EvaluationWant, InputContract, InputSlot } from './bridges/input-contract.js';\n/** Build an input contract; throws when one spelling or alternate would bind two slots. */\nexport { inputContract } from './bridges/input-contract.js';\n\n// v0.4.0 connection layer — Christoffel formula builder and covariant derivative\n// AST node type. `christoffel` is public because bridge modules and downstream\n// callers compose Γ trees directly; `CovariantDerivativeNode` is the structural\n// type for the new ∇_μ AST kind.\nexport { christoffel } from './dimensional/connection.js';\n// CovariantDerivativeNode is re-exported from validator.ts (which holds the union);\n// importing from there avoids creating a separate source-of-truth.\nexport type { CovariantDerivativeNode } from './dimensional/validator.js';\n\n// v0.5.0 curvature layer — Ricci tensor helper (Task 7). `ricci(R)` wraps a\n// RiemannTensorNode and produces the contracted R_μν = R^λ_{λμν} as a\n// composite ExprNode (own validator + lowering arms).\nexport { ricci } from './dimensional/curvature.js';\nexport type { RicciTensorNode } from './dimensional/validator.js';\n\n// v0.5.0 curvature layer — Einstein tensor helper (Task 8). `einstein(R, g,\n// gInverse)` wraps a RiemannTensorNode + metric pair and produces the\n// composite G_μν = R_μν − ½ R g_μν as an ExprNode (own validator +\n// lowering arms — no AST rewrite). The matter-coupled field-equation node\n// `G_μν = κ T_μν` exists (`EinsteinFieldEquationNode`, validated in\n// dimensional/validator.ts); its numerical lowering is still deferred: the\n// lowering layer refuses a deferred node kind with `NumericalBackendError`\n// and names the evaluator to use instead (numerical/lowering.ts).\nexport { einstein } from './dimensional/curvature.js';\nexport type { EinsteinTensorNode } from './dimensional/validator.js';\n\n// v0.5.0 curvature layer — Bianchi residual helper (Task 9). `bianchiResidual(R)`\n// returns {residual, evaluate, evaluateMax} for the cyclic second-Bianchi-identity\n// check ∇_{[λ} R_{μν]ρσ} = 0. The evaluator lives in numerical so curvature.ts\n// does not import it. Closes Phase 1 — Foundations.\nexport { bianchiResidual } from './numerical/bianchi-residual.js';\nexport type { BianchiResidualNode } from './dimensional/validator.js';\n\n// v0.6.0 Phase 1 — Killing-vector machinery (Task 1.3).\n// `verifyKillingEquation` checks the Killing equation ∇_μ ξ_ν + ∇_ν ξ_μ = 0\n// numerically at a point using a hybrid impl (exact Christoffels + analytic\n// metric derivatives). `evaluateConservedCharge` evaluates Q = ξ^μ p_μ along\n// a geodesic. `ChristoffelAccess` is the layout-agnostic Christoffel accessor\n// type that insulates consumers from the Phase 2 BR-2 flat-layout migration.\nexport {\n verifyKillingEquation,\n checkKillingEquation,\n evaluateConservedCharge,\n} from './numerical/killing.js';\nexport type {\n KillingEquationOptions,\n KillingEquationCheck,\n ChristoffelAccess,\n} from './numerical/killing.js';\n\n// v0.4.0 geodesic integrator (RK4 solver — headline feature of v0.4.0)\nexport {\n integrateGeodesic,\n type GeodesicIntegratorInputs,\n type GeodesicIntegratorResult,\n} from './numerical/geodesic-integrator.js';\n\n// v0.14 G-9 increment 2 — geometrized-units boundary adapters. Convert a scalar\n// between SI and geometrized (G = c = 1) units, driven by its `Dimension`\n// exponent vector (factor G^M·c^(T−2M)). For consumers running the GR pipeline\n// in geometrized units; the default-pipeline migration is a later increment.\nexport {\n toGeometrized,\n fromGeometrized,\n geometrizedFactor,\n NonGeometrizableDimensionError,\n} from './numerical/geometrized.js';\n\n// v0.7.1 M-1 — Surface restoration: five v0.7 dimensional primitives were\n// @public-tagged during the BE-X re-encoding sprint but absent from this\n// manifest. Re-exported here per Phase 1 Task 1.2 (Decision #2 guard).\n// Mirrors the v0.6.0 EinsteinFieldEquationNode / KretschmannScalarNode /\n// RicciTensorNode pattern — predicate-node types + validators are @public.\nexport type {\n TracableTensorNode,\n TensorTraceNode,\n TensorTraceValidationResult,\n TensorTraceOptions,\n} from './dimensional/tensor-trace.js';\nexport { validateTensorTrace } from './dimensional/tensor-trace.js';\n\nexport type {\n FriedmannVariant,\n FriedmannEquationNode,\n FriedmannEquationValidationResult,\n} from './dimensional/friedmann-equation.js';\nexport { validateFriedmannEquation } from './dimensional/friedmann-equation.js';\n\nexport type {\n RGCouplingNode,\n BetaFunctionNode,\n BetaFunctionValidationResult,\n} from './dimensional/rg-flow.js';\nexport { rgCoupling, validateRGCoupling, validateBetaFunction } from './dimensional/rg-flow.js';\n\nexport type {\n ArrowOfTime,\n GaugeFieldNode,\n TimeSymmetryPredicateNode,\n TimeSymmetryPredicateValidationResult,\n} from './dimensional/gauge-field.js';\nexport { validateGaugeField, validateTimeSymmetryPredicate } from './dimensional/gauge-field.js';\n\nexport type {\n ScalarFieldNode,\n KleinGordonEquationNode,\n KleinGordonEquationValidationResult,\n} from './dimensional/klein-gordon-equation.js';\nexport { validateKleinGordonEquation } from './dimensional/klein-gordon-equation.js';\n\n// Dimensional analyzer (Tier 4) — SI dimension propagation through bridge\n// equations expressed as ExprNode trees. See src/dimensional/README.md.\n// Every symbol re-exported in this block is `@public` — the consumer-facing\n// dimensional/metric surface (stabilised in v0.3.0).\nexport type { Dimension } from './dimensional/types.js';\n/** The one unit reader: parse a unit, convert a value exactly, and the typed errors it throws. */\nexport {\n AmbiguousUnitError,\n convertValue,\n parseUnit,\n UnitError,\n UnitRefusedError,\n UnknownUnitError,\n} from './dimensional/units.js';\n/** A parsed unit, a converted value, and how a temperature is read. */\nexport type { AffineTemperature, ConvertedValue, ParsedUnit, TemperatureReading } from './dimensional/units.js';\nexport {\n DIMENSIONLESS,\n LENGTH,\n AREA,\n TIME,\n FREQUENCY,\n MASS,\n VELOCITY,\n ACCELERATION,\n FORCE,\n ENERGY,\n POWER,\n ACTION,\n TEMPERATURE,\n ENTROPY,\n CHARGE,\n} from './dimensional/types.js';\nexport {\n multiply,\n divide,\n power,\n add,\n subtract,\n equals,\n format,\n DimensionMismatchError,\n} from './dimensional/algebra.js';\nexport type { ExprNode, TranscendentalFn, ValidationResult, Violation } from './dimensional/validator.js';\nexport { validate, validateEquation, validateInverseMetricPair } from './dimensional/validator.js';\nexport { inferDimensionForBridge } from './dimensional/bridge-check.js';\n\n// v0.6.0 Phase 2 Task 2.4 — Einstein-equation numerical evaluator.\n// `evaluateEinsteinEquationResidual` computes the scale-normalized max residual\n// |G_μν + Λ g_μν − κ T_μν| / |g_μν| at a coordinate point. Accepts metric\n// closures + stress-energy closure; returns a dimensionless relative residual.\n// For Schwarzschild vacuum (T=0, Λ=0) the residual is the FD truncation floor\n// (~1e-10 relative at 4th-order stencil accuracy).\nexport {\n evaluateEinsteinEquationResidual,\n} from './numerical/einstein-equation.js';\nexport type {\n EinsteinEquationResidualInput,\n MetricClosure,\n Vec4,\n} from './numerical/einstein-equation.js';\n\n// v0.6.0 Phase 2 Task 2.3 — EinsteinFieldEquationNode predicate AST + validator.\n// Represents G_μν + Λ g_μν = (8πG/c⁴) T_μν as a structurally-validated AST node.\n// Validator checks: free-index agreement, per-component dim equality [L⁻²],\n// and symmetry agreement (Decision #3 + #11).\nexport { validateEinsteinFieldEquation } from './dimensional/einstein-equation.js';\nexport type {\n EinsteinFieldEquationNode,\n EinsteinFieldEquationValidationResult,\n} from './dimensional/einstein-equation.js';\n\n// v0.6.0 Phase 3 Task 3.5 — KretschmannScalarNode AST + validator.\n// K = R_{ρσμν} R^{ρσμν} is the canonical curvature invariant; scalar (rank-0),\n// dim [L⁻⁴]. Diverges at genuine singularities; finite at coordinate ones.\nexport type {\n KretschmannScalarNode,\n KretschmannScalarValidationResult,\n} from './dimensional/curvature-invariants.js';\nexport { validateKretschmannScalar } from './dimensional/curvature-invariants.js';\n\n// v0.6.0 Phase 3 Task 3.6 — Kretschmann scalar numerical contraction.\n// O(4⁸) = 65536 multiplications per call — diagnostic/sample-point use only.\nexport { computeKretschmann } from './numerical/kretschmann.js';\n\n// Numerical-contraction backend (v0.3.5+). See docs/planning/v0.3.5-Design.md\n// and docs/planning/v0.4.0-Implementation-Plan.md (v0.4.0 additions below).\n// Every symbol below is `@public` — the consumer-facing (TensorJS) surface.\n// `MathTSEngine` is intentionally NOT re-exported here. It is reachable only\n// via the `universal-physics-tensor/numerical/mathts-engine` subpath. The\n// MathTS packages are required dependencies.\n/** Numerical evaluation, the covariant eikonal integrator, the GL4 geodesic integrator, and the perihelion finder. */\nexport {\n evaluateNumerical,\n evaluateNumericalRaw,\n evaluateMetricInverse,\n getActiveEngine,\n setActiveEngine,\n NumericalBackendError,\n // v0.4.0 additions to the numerical surface\n DuplicateCoordinateWarning,\n EngineCapabilityError,\n hasAutogradSupport,\n evaluateCovariantEikonalNumerical,\n // v0.5.0 GL4 symplectic integrator\n integrateGeodesicGL4,\n // v0.5.0 perihelion finder (Task 4)\n findPerihelion,\n} from './numerical/index.js';\n/** Types for numerical evaluation, gradients, the GL4 integrator, the perihelion finder, and the covariant eikonal. */\nexport type {\n NumericalResult,\n NumericalRawResult,\n EvaluateOptions,\n NumericalInputs,\n TensorEngine,\n EngineTensor,\n EinsumSpec,\n NestedArray,\n GridField,\n // v0.4.0 type additions\n ForwardGradResult,\n ReverseGradResult,\n // v0.5.0 GL4 type additions\n GL4State,\n GL4Snapshot,\n GL4Options,\n // v0.5.0 perihelion-finder type additions (Task 4)\n PerihelionResult,\n FindPerihelionOptions,\n CovariantEikonalInputs,\n CovariantEikonalResult,\n} from './numerical/index.js';\n\n// ---------------------------------------------------------------------------\n// v0.8.0 — Composition graph (graph-lite Quantity/BridgeEdge/composeEdges\n// beside the catalog; see docs/planning/v0.8.0-Design.md). The operator is\n// `composeEdges`, NOT `compose` — `compose` is the v0.7 Cell factory above.\n// ---------------------------------------------------------------------------\nexport {\n composeEdges,\n consistencyRatio,\n evaluateEdge,\n minConfidence,\n regimesDiffer,\n QUANTITY_IDENTIFICATIONS,\n CompositionDimensionError,\n CompositionJunctionError,\n DomainViolationError,\n // Calibration edges (pre-registered CT-1/CT-1b/CT-2/CT-3 targets)\n M_SUN_KG,\n} from './composition/index.js';\nexport type {\n BridgeEdge,\n ComposeOptions,\n EdgeConfidence,\n Quantity,\n QuantityIdentification,\n RegimeAttributes,\n ValidityDomain,\n} from './composition/index.js';\n/** A validity domain built from one condition text: the predicate, the description and the refusal all read it. */\nexport { validityDomain } from './composition/index.js';\n/** A failed validity condition and the inputs it read, as `DomainViolationError.violations` lists them. */\nexport type { DomainInput, DomainViolation } from './composition/index.js';\n\n// v0.8.0 — Bridge-membership criterion + negative catalog (G-2 / P-4)\nexport { adjudicateBridgeEntry, adjudicateCatalog } from './bridges/membership.js';\nexport { REJECTED_BRIDGE_ADJUDICATIONS, REJECTED_BRIDGE_IDS } from './bridges/rejected.js';\nexport type { BridgeVerdict, CatalogAdjudicationReport } from './bridges/membership.js';\nexport type { RejectedBridgeAdjudication } from './bridges/rejected.js';\n\n// v0.8.0 — GW170817 → BE-36 real-data confrontation (G-3)\n\n// v0.28+ — Mercury perihelion → BE-52 real-data confrontation (established bridge)\n\n// v0.10.0 — Phase-D enumeration + uncertainty propagation (T3/T4)\nexport {\n enumerateCompositions,\n REGISTERED_COMPOSITION_IDS,\n propagateUncertainty,\n} from './composition/index.js';\nexport type {\n CompositionCandidate,\n EnumerationReport,\n UncertaintyResult,\n} from './composition/index.js';\n\n// Identifiability classifier (structural over/exactly/under-determined\n// over the composition graph — Consequence 1 of the bridge-inference\n// epistemics note)\n/** The forward closure, the per-target classifier, the sweep, and the log-space rank over the monomial edges. */\nexport {\n classifyIdentifiability,\n classifyAll,\n forwardClosure,\n identifiabilityByRank,\n} from './composition/index.js';\n/** The classifier's verdict, result and option types, and the rank instrument's report. */\nexport type {\n IdentifiabilityVerdict,\n IdentifiabilityResult,\n IdentifiabilityOptions,\n RankIdentifiability,\n} from './composition/index.js';\n\n// Retrodiction harness (the framework's own falsification benchmark —\n// Consequence 2 of the bridge-inference epistemics note)\nexport { retrodict, retrodictNode } from './composition/index.js';\n/** The retrodiction harness's result, prediction, refusal, report and option types. */\nexport type {\n RetrodictionOutcome,\n RetrodictionPrediction,\n RetrodictionResult,\n RetrodictionRefusal,\n RetrodictionReport,\n RetrodictionOptions,\n} from './composition/index.js';\n\n// Unified \"explain this quantity\" entry point over the three inference\n// primitives (identifiability + retrodiction + Buckingham-π)\nexport { explainQuantity } from './composition/index.js';\nexport type {\n DerivationExplanation,\n ExplainOptions,\n QuantityExplanation,\n} from './composition/index.js';\n\n// v0.12 — symbolic bridge composition (the Observable contract). Composes\n// bridges' symbolic ExprNode forms (not just numeric closures), dimensionally\n// validated and numerically evaluable.\nexport { composeSymbolic, SymbolicCompositionError, SymbolicEvalError } from './composition/index.js';\nexport type { Observable, ComposeSymbolicOptions } from './composition/index.js';\n\n// Physics-map visualization — render the bipartite, clustered hypergraph\n// (quantities = nodes, equations = junctions) as Mermaid / Graphviz-DOT source.\nexport { buildVizModel, edgeToJunction } from './composition/index.js';\nexport type {\n VizStatus,\n VizJunction,\n VizCluster,\n VizOptions,\n VizModel,\n VizFilterStats,\n} from './composition/index.js';\n// SVG rendering via the optional @viz-js/viz peer (separate module so the\n// graph-viz model stays pure/synchronous/dependency-free).\nexport { renderDotToSvg, SvgRendererUnavailableError } from './composition/index.js';\n\n// User-equation injection — parse a free-form \"TARGET = EXPR\" and place it into\n// the map as a connected 'user' junction (with a \"did you mean?\" hint).\nexport {\n parseUserEquation,\n suggestQuantities,\n suggestByDimension,\n equationLanding,\n analyzeUserEquation,\n UserEquationError,\n} from './composition/index.js';\n/** The catalog or parameter name a spelling means. One owner for a target and an input. */\nexport { resolveQuantityName } from './composition/index.js';\nexport type { UserEquation, EquationLanding, EquationAnalysis, EquationHint } from './composition/index.js';\n\n// Phase 1 — string → dimensional ExprNode parser + single-unknown dimensional\n// inference (the front-end to the physics AST).\nexport { parsePhysics } from './numerical/formula-registry.js';\nexport { FormulaDimensionError } from './numerical/formula-dimension.js';\nexport type { ParsedPhysics } from './numerical/formula-dimension.js';\nexport { inferUnknownDimension, substituteSymbolDim } from './dimensional/dimension-inference.js';\n// Dimension-adjacency review surface (name-divergent but same-dimension quantities).\nexport { dimensionAdjacency } from './composition/index.js';\nexport type { DimensionAdjacency } from './composition/index.js';\n\n\n// Buckingham-π enumerator (the principled primitive for the exactly-\n// determined case — build target 1 of the bridge-inference epistemics\n// note; FORM only, never the dimensionless constant)\nexport {\n buckinghamPi,\n dimensionallyDetermines,\n RationalizationError,\n} from './dimensional/buckingham.js';\nexport type {\n DimensionalVariable,\n PiGroup,\n BuckinghamVerdict,\n BuckinghamResult,\n DimensionalDeterminationResult,\n} from './dimensional/buckingham.js';\n\n// v0.11 — namespacing gate (Option D: name-collision rule + dispositions)\nexport {\n CompositionAliasError,\n SOURCE_ALIAS_DISPOSITIONS,\n} from './composition/compose-surface.js';\nexport type {\n AliasDisposition,\n DispositionRequired,\n} from './composition/compose-surface.js';\n\n// v0.11 — Klein-Gordon dispersion evaluator (G-7 closure, plane-wave sector)\nexport {\n evaluateKGDispersionResidual,\n verifyKleinGordonPlaneWave,\n} from './numerical/klein-gordon.js';\nexport type {\n KGDispersionResidualInput,\n KGPlaneWaveVerifyInput,\n KGPlaneWaveVerifyResult,\n} from './numerical/klein-gordon.js';\n\n// v0.11 — BE-23 Planckian-dissipation data confrontation (2nd real-data check)\n\n// The composition graph is the relation projection of the catalog.\nexport { CATALOG_GRAPH } from './composition/index.js';\n\n// The standard-physics counterpart: the canonical L-layer projected into the\n// composition-graph edge vocabulary, so the discovery/analysis funnel can run\n// on textbook physics ALONE (bridges excluded). See `composition/canonical-graph`.\nexport {\n CANONICAL_GRAPH,\n canonicalToEdges,\n CANONICAL_CONSTANTS,\n} from './composition/index.js';\n\n// ── Canonical-equation registry (the L-layer ground truth) ──────────────────\n// Textbook physics equations bridges are validated against. Multi-fidelity\n// (L0 dimensional / L1 scalar-AST / L2 field-equation) with epistemic-honesty\n// and provenance fields. See docs/planning/Canonical-Equation-Registry-A-*.\nexport {\n CANONICAL_EQUATIONS,\n CANONICAL_BY_ID,\n canonicalById,\n canonicalByDomain,\n partneredBridgeIds,\n bridgesWithoutCanonicalPartner,\n} from './canonical/registry.js';\nexport {\n canonicalToLaw,\n seedCanonicalLaws,\n CANONICAL_TENSOR_CONFIG,\n} from './canonical/seed-l-layer.js';\nexport type {\n CanonicalEquation,\n CanonicalDomain,\n EpistemicStatus,\n CanonicalForms,\n FieldEquationNode,\n} from './canonical/canonical-equation.js';\n// Sub-project B — bridge↔canonical linkage (validate vs standard physics).\n// `normalForm` is the structural hash up to dimensionless factors;\n// `classifyLinkage`/`scanLinkages` recover/contain bridges against canonicals\n// with the F4 circularity guard (`restates-canonical` vs genuine `recovers`).\nexport { normalForm, structurallyEqual } from './canonical/normal-form.js';\nexport { classifyLinkage, scanLinkages } from './canonical/linkage.js';\nexport type { LinkageResult, RecoveryOutcome } from './canonical/linkage.js';\n\n// Adjudication ledger — human verdicts on discovery-funnel identification\n// hypotheses (review memory the funnel must not re-surface as fresh).\n// Precedent: SOURCE_ALIAS_DISPOSITIONS/AliasDisposition above is the repo's\n// other reviewable judgment registry, and is index-exported the same way.\nexport {\n candidateId,\n ADJUDICATIONS,\n adjudicationFor,\n annotateAdjudications,\n} from './composition/adjudication.js';\nexport type { AnnotatedCandidate } from './composition/adjudication.js';\n/** The adjudication ledger's verdict and record types, exported from their owner, the catalog file's types. */\nexport type { AdjudicationVerdict, CatalogAdjudication } from './bridges/catalog-types.js';\n\n// Consequence propagation — the machine pre-classifier for the human\n// adjudication ledger. Annotates discovery candidates with the\n// entailed/novel-consequence/inconclusive signal; never mutates the\n// catalog/graph, never re-orders or re-scores.\nexport { annotateConsequences, classifyProposal } from './composition/consequence.js';\nexport type {\n ConsequenceAnnotatedCandidate,\n ConsequenceSignal,\n ConsequenceEvidence,\n} from './composition/consequence.js';\n\n// Epistemic-grounding ledger (PI-instrument Phase 1). A pure, derived view over\n// a candidate's falsifier results: which gates passed vs abstained, plus the\n// honest no-mechanism/no-data ceiling. Annotation-only; changes no verdict.\nexport { describeGrounding } from './composition/grounding.js';\nexport type { CandidateGrounding } from './composition/grounding.js';\n\n// Discovery funnel — vet link-candidate identifications against the inference\n// suite (Direction 2). rankDiscoveries is the entry point; VettedCandidate is\n// the output type. Required to feed annotateAdjudications from the public API.\nexport { rankDiscoveries } from './composition/discovery.js';\nexport type { VettedCandidate } from './composition/discovery.js';\n\n// v0.33.0 — `upt confront` real-data confrontation subsystem: typed\n// observations + a normalized ConfrontationOutcome (discriminated on `kind`)\n// wrap the per-bridge confrontation modules (be-23/36/37/48/52) behind one\n// registry, plus deciding-measurement elasticity for value-kind entries.\nexport {\n residualInSigma,\n combineInQuadrature,\n consistencyComparison,\n} from './bridges/observations/types.js';\nexport type {\n ConsistencyComparison,\n ObservationProvenance,\n SigmaComponent,\n ObservationKind,\n ConfrontationOutcome,\n ConfrontationDataHandling,\n ConfrontationPreprocessing,\n ConfrontationIndependence,\n SourceRef,\n SourceRefs,\n} from './bridges/observations/types.js';\n\n// BE-53 — one-loop coefficient, and a confrontation only when the caller supplies both inputs.\nexport { oneLoopCoefficientStatement } from './bridges/coefficient-statement.js';\nexport type { OneLoopCoefficientStatement, OneLoopCoefficientSign } from './bridges/coefficient-statement.js';\n\n// The confrontation registry: every committed confrontation of\n// `data/bridge-catalog.json`, the single lookup surface for `upt confront`.\nexport {\n CONFRONTATIONS,\n listConfrontations,\n runConfrontation,\n // Rigor hierarchy of the evidence spine (2026-07-05) — stringent/moderate/loose.\n CONFRONTATION_RIGOR,\n confrontationRigor,\n rigorDistribution,\n} from './bridges/confrontations.js';\nexport type { ConfrontationEntry, RigorTier } from './bridges/confrontations.js';\n\n// Deciding-measurement elasticity — which input a value-kind confrontation's\n// prediction depends on most strongly (central-difference log-sensitivity).\nexport { decidingMeasurement } from './bridges/sensitivity.js';\nexport type { Elasticity } from './bridges/sensitivity.js';\n\n// The PUBLIC atlas surface as a namespace (Atlas API review, Tier 1). The full\n// @internal surface stays on the universal-physics-tensor/atlas subpath.\nexport * as atlas from './atlas/public.js';\n\n// ---------------------------------------------------------------------------\n// Closure under type references (tests/api/root-public-closure.test.ts).\n// Every type a root export names is itself importable from the root or from\n// a package.json subpath; the names below were reachable only through the\n// public declarations that mention them.\n// ---------------------------------------------------------------------------\n/** The base class of every error this package throws. */\nexport type { UPTError } from './dimensional/errors.js';\n/** Which constants a natural-unit evaluation sets to one. */\nexport type { UnitMode } from './dimensional/natural-units.js';\n/** The tensor and curvature node family of the dimensional AST. */\nexport type {\n Variance,\n Role,\n TensorIndex,\n UpperIndex,\n CovariantIndex,\n TensorSymbolNode,\n TensorProductNode,\n MetricTensorNode,\n KroneckerDeltaNode,\n TensorPartialDerivativeNode,\n RiemannTensorNode,\n WeylTensorNode,\n KillingVectorNode,\n ConservedChargeNode,\n StressEnergyTensorNode,\n CosmologicalConstantNode,\n} from './dimensional/ast-types.js';\n/** The generic shape the curvature node types instantiate, and its kind union (referenced by the exported node types). */\nexport type { CurvatureCompositeNode, CurvatureKind } from './dimensional/curvature-composite.js';\n/** The kind of a flux rule. */\nexport type { FluxRuleKind } from './core/flux-rules.js';\n/** The per-axis value tables of the core axis registry. */\nexport type { ScaleAxes, ForceAxes, SymmetryAxes, InformationAxes } from './core/axes-registry.js';\n/** The convenience form a regime registration accepts for an axis. */\nexport type { AxisConvenience } from './core/regime-registry.js';\n/** The named inputs of the four bridge differentiation specs. */\nexport type { ShapiroInput, PerihelionInput, HawkingInput, DecoherenceInput } from './diff/bridge-specs.js';\n/** The contraction and free-axis records an einsum plan is made of. */\nexport type { EinsumContraction, EinsumFreeAxis } from './numerical/tensor-engine.js';\n/** The callbacks a Killing-equation check takes: the vector field, the metric and the connection. */\nexport type { KillingFn, KillingMetricFn, ChristoffelAtFn } from './numerical/killing.js';\n/** A relation's input contract and the sign and unit conventions it states. */\nexport type { RelationContract, Conventions } from './relations/types.js';\n/** The classification axes of the composition registry. */\nexport type {\n ScaleAxis,\n ForceAxis,\n InformationAxis,\n SymmetryAxis,\n TopologyAxis,\n StatisticsAxis,\n} from './composition/axes.js';\n/** Options of the chain enumerator. */\nexport type { EnumerationOptions } from './composition/enumerate.js';\n/** Options of the uncertainty propagation. */\nexport type { UncertaintyOptions } from './composition/uncertainty.js';\n/** Options of a user-equation analysis and the short form of a binding. */\nexport type { AnalyzeUserEquationOptions, ShortBinding } from './composition/user-equation.js';\n/** A constant as the canonical graph declares it. */\nexport type { ConstantDef } from './composition/canonical-graph.js';\n/** An identity consequence the surfacer proposes; never written to the catalog. */\nexport type { ProposedBridge } from './composition/proposed-bridges.js';\n/** Options of the discovery funnel. */\nexport type { DiscoveryOptions } from './composition/discovery.js';\n/** A representative value of a quantity with its source. */\nexport type { RepresentativeValue } from './composition/representative-values.js';\n/** A canonical prefactor, scalar or per dimensionless group, with its source. */\nexport type { SourcedPrefactor, SourcedGroupPrefactor } from './canonical/canonical-equation.js';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"christoffel-flat.d.ts","sourceRoot":"","sources":["../../src/numerical/christoffel-flat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAKH;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAErF;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,CAC/B,CAAC,EAAE,MAAM,GACR,CAAC,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,EAAE,YAAY,KAAK,YAAY,CAoC3E"}
1
+ {"version":3,"file":"christoffel-flat.d.ts","sourceRoot":"","sources":["../../src/numerical/christoffel-flat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAMH;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAErF;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,CAC/B,CAAC,EAAE,MAAM,GACR,CAAC,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,EAAE,YAAY,KAAK,YAAY,CAoC3E"}
@@ -28,7 +28,8 @@
28
28
  * @public
29
29
  */
30
30
  // Use canonical SI constants per v0.5.1 PC-1 (do NOT inline truncated literals):
31
- import { C_SI, G_SI } from '../core/constants.js';
31
+ import { C_SI } from '../core/constants.js';
32
+ import { schwarzschildRadius } from './schwarzschild.js';
32
33
  /**
33
34
  * Encodes a Christoffel index triple (λ, μ, ν) into a flat array offset.
34
35
  *
@@ -61,7 +62,7 @@ export function encodeChristoffelIndex(lambda, mu, nu) {
61
62
  export function christoffelFnFlat(M) {
62
63
  return (x, out) => {
63
64
  const [_t, r, theta, _phi] = x;
64
- const r_s = (2 * G_SI * M) / (C_SI * C_SI);
65
+ const r_s = schwarzschildRadius(M);
65
66
  const arr = out ?? new Float64Array(64); // 64 zeros by default when fresh
66
67
  const dr_factor = r - r_s;
67
68
  const sinTheta = Math.sin(theta);
@@ -1 +1 @@
1
- {"version":3,"file":"christoffel-flat.js","sourceRoot":"","sources":["../../src/numerical/christoffel-flat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,iFAAiF;AACjF,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAElD;;;;;GAKG;AACH,MAA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AAG,WAAW;QAC9C,GAAG,CAAC,EAAE,GAAC,CAAC,GAAG,CAAC,GAAC,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC,CAAG,WAAW;QAC9C,GAAG,CAAC,EAAE,GAAC,CAAC,GAAG,CAAC,GAAC,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC,CAAE,WAAW;QAC9C,GAAG,CAAC,EAAE,GAAC,CAAC,GAAG,CAAC,GAAC,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC,CAAE,WAAW;QAE9C,OAAO,GAAG,CAAC;IACb,CAAC,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Flat-array Christoffel evaluator (v0.6.0 Phase 2, Task 2.8 — BR-2 BREAKING).\n *\n * Returns Float64Array(64) instead of nested number[4][4][4]. Layout\n * locked from Task 2.0 profiling: λ-major encoding (16λ + 4μ + ν).\n *\n * Formulas verified against the authoritative fixture at\n * tests/fixtures/schwarzschild.ts:10-18 (Carroll Ch. 5 / Hartle Ch. 9;\n * −,+,+,+ signature). Schwarzschild has 9 non-zero independent Christoffel\n * components, related by symmetry Γ^λ_{μν} = Γ^λ_{νμ} for 13 non-zero\n * array entries out of 64.\n *\n * Nonzero independent components:\n * Γ^t_{tr} = Γ^t_{rt} = r_s / (2·r·(r − r_s))\n * Γ^r_{tt} = c² · r_s · (r − r_s) / (2·r³)\n * Γ^r_{rr} = -r_s / (2·r·(r − r_s))\n * Γ^r_{θθ} = -(r − r_s)\n * Γ^r_{φφ} = -(r − r_s) · sin²θ\n * Γ^θ_{rθ} = Γ^θ_{θr} = 1/r\n * Γ^θ_{φφ} = -sinθ · cosθ\n * Γ^φ_{rφ} = Γ^φ_{φr} = 1/r\n * Γ^φ_{θφ} = Γ^φ_{φθ} = cosθ / sinθ\n *\n * where r_s = 2GM/c². All other entries are zero. Float64Array zero-initialises\n * by default, so we write only the 13 non-zero slots.\n *\n * @module numerical/christoffel-flat\n * @public\n */\n\n// Use canonical SI constants per v0.5.1 PC-1 (do NOT inline truncated literals):\nimport { C_SI, G_SI } from '../core/constants.js';\n\n/**\n * Encodes a Christoffel index triple (λ, μ, ν) into a flat array offset.\n *\n * Layout: λ-major — `16·λ + 4·μ + ν`.\n * Locked from Task 2.0 profiling (dual-condition gate; λ-major is default).\n */\nexport function encodeChristoffelIndex(lambda: number, mu: number, nu: number): number {\n return 16 * lambda + 4 * mu + nu;\n}\n\n/**\n * Returns a Christoffel-symbol closure for the Schwarzschild metric at a\n * given gravitational mass M (SI, kg).\n *\n * The returned closure maps a coordinate 4-vector x = [t, r, θ, φ] to a\n * Float64Array of length 64 containing Γ^λ_{μν} values in λ-major order.\n * Access element (λ, μ, ν) via `encodeChristoffelIndex(λ, μ, ν)`.\n *\n * This is the BR-2 breaking-change replacement for the nested `number[][][]`\n * returned by `schwarzschildChristoffelFn`. Consumer migration lands in Task 2.9.\n *\n * Scratch-buffer reuse (perf): the returned closure accepts an OPTIONAL\n * `out` Float64Array(64). When provided it is filled and returned (no\n * allocation) — the hot geodesic loop passes a single reused buffer to avoid\n * ~160k Float64Array(64) allocations per integration. Only the 13 nonzero\n * Schwarzschild slots are written; the other 51 are always zero, so a buffer\n * reused ONLY by this closure (or a fresh zero buffer) stays correct without\n * re-zeroing. When `out` is omitted a fresh array is allocated — the original\n * (and default) behavior, unchanged for external callers that retain results.\n */\nexport function christoffelFnFlat(\n M: number,\n): (x: [number, number, number, number], out?: Float64Array) => Float64Array {\n return (x, out) => {\n const [_t, r, theta, _phi] = x;\n const r_s = (2 * G_SI * M) / (C_SI * C_SI);\n const arr = out ?? new Float64Array(64); // 64 zeros by default when fresh\n const dr_factor = r - r_s;\n const sinTheta = Math.sin(theta);\n const cosTheta = Math.cos(theta);\n\n const Gt_tr = r_s / (2 * r * dr_factor);\n const Gr_tt = (C_SI * C_SI * r_s * dr_factor) / (2 * r * r * r);\n const Gr_rr = -r_s / (2 * r * dr_factor);\n const Gr_thth = -dr_factor;\n const Gr_phiphi = -dr_factor * sinTheta * sinTheta;\n const Gth_rth = 1 / r;\n const Gth_phiphi = -sinTheta * cosTheta;\n const Gphi_rphi = 1 / r;\n const Gphi_thphi = cosTheta / sinTheta;\n\n // Index encoding: 16*lambda + 4*mu + nu (λ-major)\n arr[16*0 + 4*0 + 1] = Gt_tr; // Γ^t_{tr}\n arr[16*0 + 4*1 + 0] = Gt_tr; // Γ^t_{rt} (symmetric)\n arr[16*1 + 4*0 + 0] = Gr_tt; // Γ^r_{tt}\n arr[16*1 + 4*1 + 1] = Gr_rr; // Γ^r_{rr}\n arr[16*1 + 4*2 + 2] = Gr_thth; // Γ^r_{θθ}\n arr[16*1 + 4*3 + 3] = Gr_phiphi; // Γ^r_{φφ}\n arr[16*2 + 4*1 + 2] = Gth_rth; // Γ^θ_{rθ}\n arr[16*2 + 4*2 + 1] = Gth_rth; // Γ^θ_{θr}\n arr[16*2 + 4*3 + 3] = Gth_phiphi; // Γ^θ_{φφ}\n arr[16*3 + 4*1 + 3] = Gphi_rphi; // Γ^φ_{rφ}\n arr[16*3 + 4*3 + 1] = Gphi_rphi; // Γ^φ_{φr}\n arr[16*3 + 4*2 + 3] = Gphi_thphi; // Γ^φ_{θφ}\n arr[16*3 + 4*3 + 2] = Gphi_thphi; // Γ^φ_{φθ}\n\n return arr;\n };\n}\n"]}
1
+ {"version":3,"file":"christoffel-flat.js","sourceRoot":"","sources":["../../src/numerical/christoffel-flat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,iFAAiF;AACjF,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CAAC,MAAc,EAAE,EAAU,EAAE,EAAU;IAC3E,OAAO,EAAE,GAAG,MAAM,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC;AACnC,CAAC;AAED;;;;;;;;;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UAAU,CAAC,CAAE,WAAW;QAC9C,GAAG,CAAC,EAAE,GAAC,CAAC,GAAG,CAAC,GAAC,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC,CAAE,WAAW;QAE9C,OAAO,GAAG,CAAC;IACb,CAAC,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Flat-array Christoffel evaluator (v0.6.0 Phase 2, Task 2.8 — BR-2 BREAKING).\n *\n * Returns Float64Array(64) instead of nested number[4][4][4]. Layout\n * locked from Task 2.0 profiling: λ-major encoding (16λ + 4μ + ν).\n *\n * Formulas verified against the authoritative fixture at\n * tests/fixtures/schwarzschild.ts:10-18 (Carroll Ch. 5 / Hartle Ch. 9;\n * −,+,+,+ signature). Schwarzschild has 9 non-zero independent Christoffel\n * components, related by symmetry Γ^λ_{μν} = Γ^λ_{νμ} for 13 non-zero\n * array entries out of 64.\n *\n * Nonzero independent components:\n * Γ^t_{tr} = Γ^t_{rt} = r_s / (2·r·(r − r_s))\n * Γ^r_{tt} = c² · r_s · (r − r_s) / (2·r³)\n * Γ^r_{rr} = -r_s / (2·r·(r − r_s))\n * Γ^r_{θθ} = -(r − r_s)\n * Γ^r_{φφ} = -(r − r_s) · sin²θ\n * Γ^θ_{rθ} = Γ^θ_{θr} = 1/r\n * Γ^θ_{φφ} = -sinθ · cosθ\n * Γ^φ_{rφ} = Γ^φ_{φr} = 1/r\n * Γ^φ_{θφ} = Γ^φ_{φθ} = cosθ / sinθ\n *\n * where r_s = 2GM/c². All other entries are zero. Float64Array zero-initialises\n * by default, so we write only the 13 non-zero slots.\n *\n * @module numerical/christoffel-flat\n * @public\n */\n\n// Use canonical SI constants per v0.5.1 PC-1 (do NOT inline truncated literals):\nimport { C_SI } from '../core/constants.js';\nimport { schwarzschildRadius } from './schwarzschild.js';\n\n/**\n * Encodes a Christoffel index triple (λ, μ, ν) into a flat array offset.\n *\n * Layout: λ-major — `16·λ + 4·μ + ν`.\n * Locked from Task 2.0 profiling (dual-condition gate; λ-major is default).\n */\nexport function encodeChristoffelIndex(lambda: number, mu: number, nu: number): number {\n return 16 * lambda + 4 * mu + nu;\n}\n\n/**\n * Returns a Christoffel-symbol closure for the Schwarzschild metric at a\n * given gravitational mass M (SI, kg).\n *\n * The returned closure maps a coordinate 4-vector x = [t, r, θ, φ] to a\n * Float64Array of length 64 containing Γ^λ_{μν} values in λ-major order.\n * Access element (λ, μ, ν) via `encodeChristoffelIndex(λ, μ, ν)`.\n *\n * This is the BR-2 breaking-change replacement for the nested `number[][][]`\n * returned by `schwarzschildChristoffelFn`. Consumer migration lands in Task 2.9.\n *\n * Scratch-buffer reuse (perf): the returned closure accepts an OPTIONAL\n * `out` Float64Array(64). When provided it is filled and returned (no\n * allocation) — the hot geodesic loop passes a single reused buffer to avoid\n * ~160k Float64Array(64) allocations per integration. Only the 13 nonzero\n * Schwarzschild slots are written; the other 51 are always zero, so a buffer\n * reused ONLY by this closure (or a fresh zero buffer) stays correct without\n * re-zeroing. When `out` is omitted a fresh array is allocated — the original\n * (and default) behavior, unchanged for external callers that retain results.\n */\nexport function christoffelFnFlat(\n M: number,\n): (x: [number, number, number, number], out?: Float64Array) => Float64Array {\n return (x, out) => {\n const [_t, r, theta, _phi] = x;\n const r_s = schwarzschildRadius(M);\n const arr = out ?? new Float64Array(64); // 64 zeros by default when fresh\n const dr_factor = r - r_s;\n const sinTheta = Math.sin(theta);\n const cosTheta = Math.cos(theta);\n\n const Gt_tr = r_s / (2 * r * dr_factor);\n const Gr_tt = (C_SI * C_SI * r_s * dr_factor) / (2 * r * r * r);\n const Gr_rr = -r_s / (2 * r * dr_factor);\n const Gr_thth = -dr_factor;\n const Gr_phiphi = -dr_factor * sinTheta * sinTheta;\n const Gth_rth = 1 / r;\n const Gth_phiphi = -sinTheta * cosTheta;\n const Gphi_rphi = 1 / r;\n const Gphi_thphi = cosTheta / sinTheta;\n\n // Index encoding: 16*lambda + 4*mu + nu (λ-major)\n arr[16*0 + 4*0 + 1] = Gt_tr; // Γ^t_{tr}\n arr[16*0 + 4*1 + 0] = Gt_tr; // Γ^t_{rt} (symmetric)\n arr[16*1 + 4*0 + 0] = Gr_tt; // Γ^r_{tt}\n arr[16*1 + 4*1 + 1] = Gr_rr; // Γ^r_{rr}\n arr[16*1 + 4*2 + 2] = Gr_thth; // Γ^r_{θθ}\n arr[16*1 + 4*3 + 3] = Gr_phiphi; // Γ^r_{φφ}\n arr[16*2 + 4*1 + 2] = Gth_rth; // Γ^θ_{rθ}\n arr[16*2 + 4*2 + 1] = Gth_rth; // Γ^θ_{θr}\n arr[16*2 + 4*3 + 3] = Gth_phiphi; // Γ^θ_{φφ}\n arr[16*3 + 4*1 + 3] = Gphi_rphi; // Γ^φ_{rφ}\n arr[16*3 + 4*3 + 1] = Gphi_rphi; // Γ^φ_{φr}\n arr[16*3 + 4*2 + 3] = Gphi_thphi; // Γ^φ_{θφ}\n arr[16*3 + 4*3 + 2] = Gphi_thphi; // Γ^φ_{φθ}\n\n return arr;\n };\n}\n"]}
@@ -31,8 +31,10 @@ export declare function zeroTensorLike(t: EngineTensor, engine: TensorEngine): E
31
31
  */
32
32
  export declare function zeroTensor(shape: ReadonlyArray<number>, engine: TensorEngine): EngineTensor;
33
33
  /**
34
- * Convert a flat number[] to a properly-nested NestedArray matching `shape`.
34
+ * Convert a flat number[] to a properly-nested NestedArray matching `shape`,
35
+ * in row-major order, through MathTS `new Tensor(shape, data).toNested()`.
35
36
  * Exported for use in lowering.ts where the engine requires nested structure.
37
+ * @throws NumericalBackendError when the data length is not the product of the shape.
36
38
  */
37
39
  export declare function flatToNested(flat: number[], shape: ReadonlyArray<number>): NestedArray;
38
40
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"connection-lowering-helpers.d.ts","sourceRoot":"","sources":["../../src/numerical/connection-lowering-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,KAAK,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MAAM,EAAE,YAAY,GACnB,YAAY,CA+Ed;AAMD;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,GAAG,UAAU,EAC7B,CAAC,EAAE,MAAM,EACT,iBAAiB,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,GAAG,SAAS,GAC9D,MAAM,EAAE,CAsBV"}
1
+ {"version":3,"file":"connection-lowering-helpers.d.ts","sourceRoot":"","sources":["../../src/numerical/connection-lowering-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAQ9C;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,EAAE,CA+CrD;AAyBD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,GAAG,YAAY,CAGlF;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,YAAY,GAAG,YAAY,CAE3F;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,WAAW,CAMtF;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,GAAG,YAAY,CAO9F;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,CAAC,EAAE,YAAY,EACf,CAAC,EAAE,YAAY,EACf,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,EACZ,MAAM,EAAE,YAAY,GACnB,YAAY,CAQd;AAMD;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CACtC,YAAY,EAAE,MAAM,EAAE,EACtB,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,EAAE,EACxC,CAAC,EAAE,MAAM,EACT,MAAM,EAAE,YAAY,GACnB,YAAY,CA4Cd;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,8BAA8B,CAC5C,SAAS,EAAE,MAAM,EAAE,EACnB,MAAM,EAAE,MAAM,EAAE,EAChB,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,EAC9B,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,OAAO,GAAG,OAAO,EAC3B,CAAC,EAAE,MAAM,EACT,MAAM,EAAE,YAAY,GACnB,YAAY,CA+Ed;AAMD;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,GAAG,UAAU,EAC7B,CAAC,EAAE,MAAM,EACT,iBAAiB,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,GAAG,SAAS,GAC9D,MAAM,EAAE,CAsBV"}
@@ -11,6 +11,7 @@
11
11
  *
12
12
  * @module numerical/connection-lowering-helpers
13
13
  */
14
+ import { Tensor } from '@danielsimonjr/mathts-tensor';
14
15
  import { NumericalBackendError } from './errors.js';
15
16
  import { rowMajorStrides as buildStrides, flatIndex, sameShape } from './strides.js';
16
17
  // ---------------------------------------------------------------------------
@@ -108,23 +109,18 @@ export function zeroTensor(shape, engine) {
108
109
  return engine.fromNested(buildNestedZeros([...shape]), [...shape]);
109
110
  }
110
111
  /**
111
- * Convert a flat number[] to a properly-nested NestedArray matching `shape`.
112
+ * Convert a flat number[] to a properly-nested NestedArray matching `shape`,
113
+ * in row-major order, through MathTS `new Tensor(shape, data).toNested()`.
112
114
  * Exported for use in lowering.ts where the engine requires nested structure.
115
+ * @throws NumericalBackendError when the data length is not the product of the shape.
113
116
  */
114
117
  export function flatToNested(flat, shape) {
115
- return flatToNestedImpl(flat, shape);
116
- }
117
- function flatToNestedImpl(flat, shape) {
118
- if (shape.length === 0)
119
- return flat[0] ?? 0;
120
- if (shape.length === 1)
121
- return flat.slice();
122
- const stride = flat.length / shape[0];
123
- const result = [];
124
- for (let i = 0; i < shape[0]; i++) {
125
- result.push(flatToNestedImpl(flat.slice(i * stride, (i + 1) * stride), shape.slice(1)));
118
+ try {
119
+ return new Tensor([...shape], Float64Array.from(flat)).toNested();
120
+ }
121
+ catch (e) {
122
+ throw new NumericalBackendError(`flatToNested: ${e.message}`);
126
123
  }
127
- return result;
128
124
  }
129
125
  /**
130
126
  * Elementwise a + b; throws on shape mismatch.
@@ -204,7 +200,7 @@ export function computeChristoffelTensor(gInverseFlat, getMetricDeriv, N, engine
204
200
  }
205
201
  }
206
202
  }
207
- return engine.fromNested(flatToNestedImpl(Gamma, [N, N, N]), [N, N, N]);
203
+ return engine.fromNested(flatToNested(Gamma, [N, N, N]), [N, N, N]);
208
204
  }
209
205
  // ---------------------------------------------------------------------------
210
206
  // Contraction of Γ with the operand tensor
@@ -312,7 +308,7 @@ export function contractChristoffelWithOperand(GammaFlat, ofFlat, ofShape, freeI
312
308
  outIdx[k] = 0;
313
309
  }
314
310
  }
315
- return engine.fromNested(flatToNestedImpl(out, outShape), outShape);
311
+ return engine.fromNested(flatToNested(out, outShape), outShape);
316
312
  }
317
313
  // ---------------------------------------------------------------------------
318
314
  // Metric-partial-derivative lookup (for 'supplied' strategy)
@@ -1 +1 @@
1
- {"version":3,"file":"connection-lowering-helpers.js","sourceRoot":"","sources":["../../src/numerical/connection-lowering-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OA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AC1B,MAAM,IAAI,qBAAqB,CAC7B,2CAA2C,GAAG,UAAU,IAAI,CAAC,MAAM,aAAa;YAChF,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAC7B,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["/**\n * Numerical helpers for covariant-derivative lowering (Task 12 [U]).\n *\n * These functions compute Christoffel symbols and tensor corrections from raw\n * metric data WITHOUT going through the christoffel() composite AST. The\n * composite AST is designed for symbolic/dimensional use; numerical lowering\n * builds Γ directly from metric components and metric-derivative arrays.\n *\n * All helpers are engine-agnostic: they operate on flat number[] arrays and\n * produce EngineTensor results via the engine.fromNested() interface.\n *\n * @module numerical/connection-lowering-helpers\n */\n\nimport type { EngineTensor, TensorEngine } from './tensor-engine.js';\nimport type { NestedArray } from './types.js';\nimport { NumericalBackendError } from './errors.js';\nimport { rowMajorStrides as buildStrides, flatIndex, sameShape } from './strides.js';\n\n// ---------------------------------------------------------------------------\n// Flat-array utilities\n// ---------------------------------------------------------------------------\n\n/**\n * Flatten a NestedArray to a plain number[] in row-major order.\n * Canonical implementation for this module. `flattenNestedArray` in\n * lowering.ts wraps this and adds an expectedSize invariant check.\n * `pderiv.ts` previously had its own identical `flattenToNumbers` —\n * consolidated to this function in v0.4.6 (see Task 9 of the v0.4.6 plan).\n */\nexport function flattenNA(data: NestedArray): number[] {\n if (typeof data === 'number') return [data];\n\n // Fast path for 1D arrays (vectors)\n if (data.length > 0 && typeof data[0] === 'number') {\n const len = data.length;\n const out = new Array(len);\n for (let i = 0; i < len; i++) {\n out[i] = data[i] as number;\n }\n return out;\n }\n\n // Fast path for 2D arrays (matrices)\n if (data.length > 0 && Array.isArray(data[0]) && data[0].length > 0 && typeof data[0][0] === 'number') {\n const rows = data.length;\n const cols = (data[0] as NestedArray[]).length;\n const out = new Array(rows * cols);\n let idx = 0;\n for (let i = 0; i < rows; i++) {\n const row = data[i] as NestedArray[];\n for (let j = 0; j < cols; j++) {\n out[idx++] = row[j] as number;\n }\n }\n return out;\n }\n\n // Explicit stack based non-recursive approach\n // We avoid the `for...of` overhead and function call overhead of recursion.\n const out: number[] = [];\n const stack: NestedArray[] = [data];\n\n while (stack.length > 0) {\n const current = stack.pop()!;\n if (typeof current === 'number') {\n out.push(current);\n } else {\n const len = current.length;\n // Push in reverse order to maintain left-to-right output order when popping\n for (let i = len - 1; i >= 0; i--) {\n stack.push(current[i]);\n }\n }\n }\n\n return out;\n}\n\n// ---------------------------------------------------------------------------\n// S2(c) helpers — specified by the Task 12 plan\n// ---------------------------------------------------------------------------\n\n/**\n * Build a properly-nested zero array matching the given shape.\n * engine.fromNested() expects nested arrays, not flat arrays, for rank > 1.\n */\nfunction buildNestedZeros(shape: ReadonlyArray<number>): NestedArray {\n if (shape.length === 0) return 0;\n if (shape.length === 1) return new Array<number>(shape[0]).fill(0);\n const inner = buildNestedZeros(shape.slice(1));\n // Deep-clone each inner node so they are independent arrays.\n const cloneNested = (n: NestedArray): NestedArray => {\n if (typeof n === 'number') return n;\n return (n as NestedArray[]).map(cloneNested);\n };\n const len = shape[0];\n const out = new Array(len);\n for (let i = 0; i < len; i++) out[i] = cloneNested(inner);\n return out;\n}\n\n/**\n * Return a same-shape EngineTensor whose data is all zeros.\n * S2(c) helper spec: returns a fresh zero tensor of the same shape as t.\n */\nexport function zeroTensorLike(t: EngineTensor, engine: TensorEngine): EngineTensor {\n const shape = [...t.shape];\n return engine.fromNested(buildNestedZeros(shape), shape);\n}\n\n/**\n * Return an all-zero EngineTensor of the given shape.\n */\nexport function zeroTensor(shape: ReadonlyArray<number>, engine: TensorEngine): EngineTensor {\n return engine.fromNested(buildNestedZeros([...shape]), [...shape]);\n}\n\n/**\n * Convert a flat number[] to a properly-nested NestedArray matching `shape`.\n * Exported for use in lowering.ts where the engine requires nested structure.\n */\nexport function flatToNested(flat: number[], shape: ReadonlyArray<number>): NestedArray {\n return flatToNestedImpl(flat, shape);\n}\n\nfunction flatToNestedImpl(flat: number[], shape: ReadonlyArray<number>): NestedArray {\n if (shape.length === 0) return flat[0] ?? 0;\n if (shape.length === 1) return flat.slice();\n const stride = flat.length / shape[0];\n const result: NestedArray[] = [];\n for (let i = 0; i < shape[0]; i++) {\n result.push(flatToNestedImpl(flat.slice(i * stride, (i + 1) * stride), shape.slice(1)));\n }\n return result;\n}\n\n/**\n * Elementwise a + b; throws on shape mismatch.\n * S2(c) helper spec.\n */\nexport function tensorAdd(a: EngineTensor, b: EngineTensor, engine: TensorEngine): EngineTensor {\n if (!sameShape(a.shape, b.shape)) {\n throw new NumericalBackendError(\n `tensorAdd: shape mismatch [${a.shape}] vs [${b.shape}]`,\n );\n }\n return engine.add(a, b);\n}\n\n/**\n * Elementwise a[i] + sign * b[i]; throws on shape mismatch.\n * S2(c) helper spec.\n */\nexport function tensorAddScaled(\n a: EngineTensor,\n b: EngineTensor,\n sign: 1 | -1,\n engine: TensorEngine,\n): EngineTensor {\n if (!sameShape(a.shape, b.shape)) {\n throw new NumericalBackendError(\n `tensorAddScaled: shape mismatch [${a.shape}] vs [${b.shape}]`,\n );\n }\n if (sign === 1) return engine.add(a, b);\n return engine.sub(a, b);\n}\n\n// ---------------------------------------------------------------------------\n// Christoffel numerical computation\n// ---------------------------------------------------------------------------\n\n/**\n * Compute the full Christoffel symbol Γ^α_{μν} from raw metric arrays.\n *\n * Γ^α_{μν} = (1/2) g^{αρ} (∂_μ g_{ρν} + ∂_ν g_{ρμ} − ∂_ρ g_{μν})\n *\n * Returns an EngineTensor of shape [N, N, N] indexed [α][μ][ν] (row-major).\n *\n * @param gInverseFlat Flat [N*N] array for g^{αρ} (row-major, α outer)\n * @param getMetricDeriv Function (mu: number) => flat [N*N] ∂_{mu} g (row-major)\n * @param N Dimension\n * @param engine Active TensorEngine\n */\nexport function computeChristoffelTensor(\n gInverseFlat: number[],\n getMetricDeriv: (mu: number) => number[],\n N: number,\n engine: TensorEngine,\n): EngineTensor {\n // Output: Gamma[alpha][mu][nu] stored in row-major order\n const size = N * N * N;\n const Gamma = new Array<number>(size).fill(0);\n\n // Precompute all N metric derivative arrays before the triple loop.\n // For strategy='supplied', getMetricDeriv calls flattenNA on the stored NestedArray\n // each invocation. Precomputing reduces calls from O(N^2 + N^2 + N^3) to N.\n // Per Step 1 verification: getMetricDeriv (backed by getMetricDerivFlat) returns\n // FRESH arrays on every call — 'zero' branch uses new Array().fill(0) and 'supplied'\n // branch calls flattenNA() which allocates a new number[] each time. No cached\n // references exist, so shallow-cloning is NOT required.\n const dMetric: number[][] = new Array(N);\n for (let mu = 0; mu < N; mu++) dMetric[mu] = getMetricDeriv(mu);\n\n for (let alpha = 0; alpha < N; alpha++) {\n const alpha_N = alpha * N;\n const alpha_N_N = alpha_N * N;\n for (let mu = 0; mu < N; mu++) {\n const mu_N = mu * N;\n const dmu = dMetric[mu]; // ∂_μ g_{ρν} — shape [N,N], ρ outer\n for (let nu = 0; nu < N; nu++) {\n let sum = 0;\n const dnu = dMetric[nu]; // ∂_ν g_{ρμ}\n for (let rho = 0; rho < N; rho++) {\n const gInvAlphaRho = gInverseFlat[alpha_N + rho]; // g^{α ρ}\n if (gInvAlphaRho !== 0) {\n const drho = dMetric[rho]; // ∂_ρ g_{μν}\n const rho_N = rho * N;\n // ∂_μ g_{ρν} → index [ρ,ν] in flat ∂_μ g\n const term1 = dmu[rho_N + nu];\n // ∂_ν g_{ρμ} → index [ρ,μ] in flat ∂_ν g\n const term2 = dnu[rho_N + mu];\n // ∂_ρ g_{μν} → index [μ,ν] in flat ∂_ρ g\n const term3 = drho[mu_N + nu];\n sum += gInvAlphaRho * (term1 + term2 - term3);\n }\n }\n Gamma[alpha_N_N + mu_N + nu] = 0.5 * sum;\n }\n }\n }\n\n return engine.fromNested(flatToNestedImpl(Gamma, [N, N, N]), [N, N, N]);\n}\n\n// ---------------------------------------------------------------------------\n// Contraction of Γ with the operand tensor\n// ---------------------------------------------------------------------------\n\n/**\n * Contract Γ^α_{μλ} or Γ^λ_{μα} with the operand tensor along the axis\n * corresponding to `freeIdxPos` (the position of the contracted free index\n * in the operand's flat axis list).\n *\n * S2(c) spec — explicit loop body:\n *\n * Upper case (∇_μ T^α_β):\n * out[α, μ, β, ...] += Γ[α, μ, λ] * T[λ_at_pos, β, ...]\n * i.e., contract over λ (axis `freeIdxPos` of T, axis 2 of Γ)\n *\n * Lower case (∇_μ T_α_β):\n * out[α, μ, β, ...] += Γ[λ, μ, α] * T[λ_at_pos, β, ...]\n * i.e., contract over λ (axis `freeIdxPos` of T, axis 0 of Γ)\n * and α indexes the fixed axis of Γ at position 2.\n *\n * Shape conventions (all row-major):\n * Gamma: shape [N, N, N] — [α or λ, μ, ν or α]\n * ofFlat: flat [totalSize] with strides computed from `ofShape`\n * outputShape: same as the partial-derivative output: [N, ...ofShape]\n * (wrt axis prepended, the freeIdxPos axis contracted out,\n * all other axes kept — but since ∇_μ output equals ∂_μ output shape,\n * we match that shape exactly)\n *\n * @param GammaFlat Flat [N^3] Γ^α_{μν} — [α][μ][ν] row-major\n * @param ofFlat Flat operand data, shape `ofShape`\n * @param ofShape Shape of the operand tensor\n * @param freeIdxPos Position (0-based) of the free index being contracted in `ofShape`\n * @param variance 'upper' → Γ^α_{μλ} contracts λ; 'lower' → Γ^λ_{μα} contracts λ\n * @param N Dimension\n * @param engine Active TensorEngine\n *\n * Returns an EngineTensor of shape [N, ...ofShape_without_freeIdxPos]\n * i.e., the same shape as the partial-derivative output (wrt axis first, others follow).\n */\nexport function contractChristoffelWithOperand(\n GammaFlat: number[],\n ofFlat: number[],\n ofShape: ReadonlyArray<number>,\n freeIdxPos: number,\n variance: 'upper' | 'lower',\n N: number,\n engine: TensorEngine,\n): EngineTensor {\n // Output shape: [N (wrt/mu axis), ...ofShape with freeIdxPos axis removed and\n // replaced by the alpha axis of the Christoffel]\n // Concretely: output has the same shape as ∂_μ T which is [...ofShape, N]\n // with wrtIndex appended. But freeIdx is now contracted (replaced by α):\n // upper: T had axis freeIdxPos as α (upper) → output keeps α at same position, prepends μ\n // lower: T had axis freeIdxPos as α (lower) → output keeps α at same position, prepends μ\n //\n // The output axis order matches ∂_μ T: [...ofShape, N] (wrt axis last? or first?)\n // Actually ∂_μ appends wrt as the LAST axis per v0.3.5 design.\n // So output shape of ∇_μ T = [...ofShape, N] where N is the wrt axis.\n // But the correction term must have the same shape.\n //\n // For the correction: we keep all of T's axes, with freeIdxPos contracting,\n // and add a new μ axis (last, like ∂_μ). The α index replaces the contracted\n // position (same position in the output as freeIdxPos was in T).\n //\n // Output shape = [...ofShape, N] where ofShape[freeIdxPos] stays (α replaces λ)\n // and the last axis N is the μ axis.\n\n const rank = ofShape.length;\n const outShape = [...ofShape, N]; // [...T_shape, mu]\n const outSize = outShape.reduce((a, b) => a * b, 1);\n const out = new Array<number>(outSize).fill(0);\n\n // Build strides for ofFlat and out\n const ofStrides = buildStrides(ofShape);\n const outStrides = buildStrides(outShape);\n\n // Iterate over all output indices\n const outIdx = new Array<number>(outShape.length).fill(0);\n const tIdxBase = new Array<number>(rank).fill(0);\n\n for (let n = 0; n < outSize; n++) {\n const mu = outIdx[rank]; // last axis of output is μ\n // The other axes map to T's indices, with freeIdxPos being the α/result axis\n const alpha = outIdx[freeIdxPos]; // the \"free\" index value (α for upper, α for lower)\n\n let sum = 0;\n\n // Map back to tIdxBase\n for (let k = 0; k < rank; k++) {\n tIdxBase[k] = outIdx[k];\n }\n tIdxBase[freeIdxPos] = 0;\n let tFlat = flatIndex(tIdxBase, ofStrides);\n const tStride = ofStrides[freeIdxPos];\n\n const alpha_N_N = alpha * N * N;\n const mu_N = mu * N;\n const mu_N_alpha = mu_N + alpha;\n\n for (let lam = 0; lam < N; lam++) {\n let gammaFlat: number;\n if (variance === 'upper') {\n // Γ^α_{μλ} — shape [α][μ][λ]\n gammaFlat = alpha_N_N + mu_N + lam;\n } else {\n // Γ^λ_{μα} — shape [λ][μ][α]\n gammaFlat = lam * N * N + mu_N_alpha;\n }\n\n const gVal = GammaFlat[gammaFlat];\n if (gVal !== 0) {\n sum += gVal * ofFlat[tFlat];\n }\n tFlat += tStride;\n }\n\n out[n] = sum;\n\n // Increment multi-index odometer\n for (let k = outShape.length - 1; k >= 0; k--) {\n if (++outIdx[k] < outShape[k]) break;\n outIdx[k] = 0;\n }\n }\n\n return engine.fromNested(flatToNestedImpl(out, outShape), outShape);\n}\n\n// ---------------------------------------------------------------------------\n// Metric-partial-derivative lookup (for 'supplied' strategy)\n// ---------------------------------------------------------------------------\n\n/**\n * Look up ∂_{mu} g from inputs.metricDerivatives.\n * Key format: `${metricName}/${coordLabel}_${mu}` (e.g. 'g/x_0' where\n * 'x' is the coordLabel string and '0' is the mu index). The coordLabel\n * is whatever string the caller passes — typically a coordinate label\n * like 'x', 't', 'r'; the literal Greek letter μ is NOT used as a key.\n * Returns a flat [N*N] array.\n *\n * Strategy 'zero': returns [N*N] zeros.\n * Strategy 'supplied': looks up the key; throws if absent.\n */\nexport function getMetricDerivFlat(\n metricName: string,\n coordLabel: string,\n mu: number,\n strategy: 'zero' | 'supplied',\n N: number,\n metricDerivatives: ReadonlyMap<string, NestedArray> | undefined,\n): number[] {\n if (strategy === 'zero') {\n return new Array<number>(N * N).fill(0);\n }\n // strategy === 'supplied'\n const key = `${metricName}/${coordLabel}_${mu}`;\n const d = metricDerivatives?.get(key);\n if (d === undefined) {\n throw new NumericalBackendError(\n `connection-lowering: no metric derivative supplied for \"${key}\" — ` +\n `a covariant-derivative with derivativeStrategy='supplied' requires ` +\n `inputs.metricDerivatives to contain \"${key}\" (flat [N×N] of ∂_{${mu}} g)`,\n );\n }\n const flat = flattenNA(d);\n if (flat.length !== N * N) {\n throw new NumericalBackendError(\n `connection-lowering: metricDerivatives[\"${key}\"] has ${flat.length} elements, ` +\n `expected ${N * N} (N=${N})`,\n );\n }\n return flat;\n}\n"]}
1
+ {"version":3,"file":"connection-lowering-helpers.js","sourceRoot":"","sources":["../../src/numerical/connection-lowering-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OA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C,YAAY,CAAC,GAAG,EAAE,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC;AAClE,CAAC;AAED,8EAA8E;AAC9E,6DAA6D;AAC7D,8EAA8E;AAE9E;;;;;;;;;;GAUG;AACH,MAAM,UAAU,kBAAkB,CAChC,UAAkB,EAClB,UAAkB,EAClB,EAAU,EACV,QAA6B,EAC7B,CAAS,EACT,iBAA+D;IAE/D,IAAI,QAAQ,KAAK,MAAM,EAAE,CAAC;QACxB,OAAO,IAAI,KAAK,CAAS,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC1C,CAAC;IACD,0BAA0B;IAC1B,MAAM,GAAG,GAAG,GAAG,UAAU,IAAI,UAAU,IAAI,EAAE,EAAE,CAAC;IAChD,MAAM,CAAC,GAAG,iBAAiB,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;IACtC,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;QACpB,MAAM,IAAI,qBAAqB,CAC7B,2DAA2D,GAAG,MAAM;YACpE,qEAAqE;YACrE,wCAAwC,GAAG,uBAAuB,EAAE,MAAM,CAC3E,CAAC;IACJ,CAAC;IACD,MAAM,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;IAC1B,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,qBAAqB,CAC7B,2CAA2C,GAAG,UAAU,IAAI,CAAC,MAAM,aAAa;YAChF,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAC7B,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["/**\n * Numerical helpers for covariant-derivative lowering (Task 12 [U]).\n *\n * These functions compute Christoffel symbols and tensor corrections from raw\n * metric data WITHOUT going through the christoffel() composite AST. The\n * composite AST is designed for symbolic/dimensional use; numerical lowering\n * builds Γ directly from metric components and metric-derivative arrays.\n *\n * All helpers are engine-agnostic: they operate on flat number[] arrays and\n * produce EngineTensor results via the engine.fromNested() interface.\n *\n * @module numerical/connection-lowering-helpers\n */\n\nimport { Tensor } from '@danielsimonjr/mathts-tensor';\nimport type { EngineTensor, TensorEngine } from './tensor-engine.js';\nimport type { NestedArray } from './types.js';\nimport { NumericalBackendError } from './errors.js';\nimport { rowMajorStrides as buildStrides, flatIndex, sameShape } from './strides.js';\n\n// ---------------------------------------------------------------------------\n// Flat-array utilities\n// ---------------------------------------------------------------------------\n\n/**\n * Flatten a NestedArray to a plain number[] in row-major order.\n * Canonical implementation for this module. `flattenNestedArray` in\n * lowering.ts wraps this and adds an expectedSize invariant check.\n * `pderiv.ts` previously had its own identical `flattenToNumbers` —\n * consolidated to this function in v0.4.6 (see Task 9 of the v0.4.6 plan).\n */\nexport function flattenNA(data: NestedArray): number[] {\n if (typeof data === 'number') return [data];\n\n // Fast path for 1D arrays (vectors)\n if (data.length > 0 && typeof data[0] === 'number') {\n const len = data.length;\n const out = new Array(len);\n for (let i = 0; i < len; i++) {\n out[i] = data[i] as number;\n }\n return out;\n }\n\n // Fast path for 2D arrays (matrices)\n if (data.length > 0 && Array.isArray(data[0]) && data[0].length > 0 && typeof data[0][0] === 'number') {\n const rows = data.length;\n const cols = (data[0] as NestedArray[]).length;\n const out = new Array(rows * cols);\n let idx = 0;\n for (let i = 0; i < rows; i++) {\n const row = data[i] as NestedArray[];\n for (let j = 0; j < cols; j++) {\n out[idx++] = row[j] as number;\n }\n }\n return out;\n }\n\n // Explicit stack based non-recursive approach\n // We avoid the `for...of` overhead and function call overhead of recursion.\n const out: number[] = [];\n const stack: NestedArray[] = [data];\n\n while (stack.length > 0) {\n const current = stack.pop()!;\n if (typeof current === 'number') {\n out.push(current);\n } else {\n const len = current.length;\n // Push in reverse order to maintain left-to-right output order when popping\n for (let i = len - 1; i >= 0; i--) {\n stack.push(current[i]);\n }\n }\n }\n\n return out;\n}\n\n// ---------------------------------------------------------------------------\n// S2(c) helpers — specified by the Task 12 plan\n// ---------------------------------------------------------------------------\n\n/**\n * Build a properly-nested zero array matching the given shape.\n * engine.fromNested() expects nested arrays, not flat arrays, for rank > 1.\n */\nfunction buildNestedZeros(shape: ReadonlyArray<number>): NestedArray {\n if (shape.length === 0) return 0;\n if (shape.length === 1) return new Array<number>(shape[0]).fill(0);\n const inner = buildNestedZeros(shape.slice(1));\n // Deep-clone each inner node so they are independent arrays.\n const cloneNested = (n: NestedArray): NestedArray => {\n if (typeof n === 'number') return n;\n return (n as NestedArray[]).map(cloneNested);\n };\n const len = shape[0];\n const out = new Array(len);\n for (let i = 0; i < len; i++) out[i] = cloneNested(inner);\n return out;\n}\n\n/**\n * Return a same-shape EngineTensor whose data is all zeros.\n * S2(c) helper spec: returns a fresh zero tensor of the same shape as t.\n */\nexport function zeroTensorLike(t: EngineTensor, engine: TensorEngine): EngineTensor {\n const shape = [...t.shape];\n return engine.fromNested(buildNestedZeros(shape), shape);\n}\n\n/**\n * Return an all-zero EngineTensor of the given shape.\n */\nexport function zeroTensor(shape: ReadonlyArray<number>, engine: TensorEngine): EngineTensor {\n return engine.fromNested(buildNestedZeros([...shape]), [...shape]);\n}\n\n/**\n * Convert a flat number[] to a properly-nested NestedArray matching `shape`,\n * in row-major order, through MathTS `new Tensor(shape, data).toNested()`.\n * Exported for use in lowering.ts where the engine requires nested structure.\n * @throws NumericalBackendError when the data length is not the product of the shape.\n */\nexport function flatToNested(flat: number[], shape: ReadonlyArray<number>): NestedArray {\n try {\n return new Tensor([...shape], Float64Array.from(flat)).toNested() as NestedArray;\n } catch (e) {\n throw new NumericalBackendError(`flatToNested: ${(e as Error).message}`);\n }\n}\n\n/**\n * Elementwise a + b; throws on shape mismatch.\n * S2(c) helper spec.\n */\nexport function tensorAdd(a: EngineTensor, b: EngineTensor, engine: TensorEngine): EngineTensor {\n if (!sameShape(a.shape, b.shape)) {\n throw new NumericalBackendError(\n `tensorAdd: shape mismatch [${a.shape}] vs [${b.shape}]`,\n );\n }\n return engine.add(a, b);\n}\n\n/**\n * Elementwise a[i] + sign * b[i]; throws on shape mismatch.\n * S2(c) helper spec.\n */\nexport function tensorAddScaled(\n a: EngineTensor,\n b: EngineTensor,\n sign: 1 | -1,\n engine: TensorEngine,\n): EngineTensor {\n if (!sameShape(a.shape, b.shape)) {\n throw new NumericalBackendError(\n `tensorAddScaled: shape mismatch [${a.shape}] vs [${b.shape}]`,\n );\n }\n if (sign === 1) return engine.add(a, b);\n return engine.sub(a, b);\n}\n\n// ---------------------------------------------------------------------------\n// Christoffel numerical computation\n// ---------------------------------------------------------------------------\n\n/**\n * Compute the full Christoffel symbol Γ^α_{μν} from raw metric arrays.\n *\n * Γ^α_{μν} = (1/2) g^{αρ} (∂_μ g_{ρν} + ∂_ν g_{ρμ} − ∂_ρ g_{μν})\n *\n * Returns an EngineTensor of shape [N, N, N] indexed [α][μ][ν] (row-major).\n *\n * @param gInverseFlat Flat [N*N] array for g^{αρ} (row-major, α outer)\n * @param getMetricDeriv Function (mu: number) => flat [N*N] ∂_{mu} g (row-major)\n * @param N Dimension\n * @param engine Active TensorEngine\n */\nexport function computeChristoffelTensor(\n gInverseFlat: number[],\n getMetricDeriv: (mu: number) => number[],\n N: number,\n engine: TensorEngine,\n): EngineTensor {\n // Output: Gamma[alpha][mu][nu] stored in row-major order\n const size = N * N * N;\n const Gamma = new Array<number>(size).fill(0);\n\n // Precompute all N metric derivative arrays before the triple loop.\n // For strategy='supplied', getMetricDeriv calls flattenNA on the stored NestedArray\n // each invocation. Precomputing reduces calls from O(N^2 + N^2 + N^3) to N.\n // Per Step 1 verification: getMetricDeriv (backed by getMetricDerivFlat) returns\n // FRESH arrays on every call — 'zero' branch uses new Array().fill(0) and 'supplied'\n // branch calls flattenNA() which allocates a new number[] each time. No cached\n // references exist, so shallow-cloning is NOT required.\n const dMetric: number[][] = new Array(N);\n for (let mu = 0; mu < N; mu++) dMetric[mu] = getMetricDeriv(mu);\n\n for (let alpha = 0; alpha < N; alpha++) {\n const alpha_N = alpha * N;\n const alpha_N_N = alpha_N * N;\n for (let mu = 0; mu < N; mu++) {\n const mu_N = mu * N;\n const dmu = dMetric[mu]; // ∂_μ g_{ρν} — shape [N,N], ρ outer\n for (let nu = 0; nu < N; nu++) {\n let sum = 0;\n const dnu = dMetric[nu]; // ∂_ν g_{ρμ}\n for (let rho = 0; rho < N; rho++) {\n const gInvAlphaRho = gInverseFlat[alpha_N + rho]; // g^{α ρ}\n if (gInvAlphaRho !== 0) {\n const drho = dMetric[rho]; // ∂_ρ g_{μν}\n const rho_N = rho * N;\n // ∂_μ g_{ρν} → index [ρ,ν] in flat ∂_μ g\n const term1 = dmu[rho_N + nu];\n // ∂_ν g_{ρμ} → index [ρ,μ] in flat ∂_ν g\n const term2 = dnu[rho_N + mu];\n // ∂_ρ g_{μν} → index [μ,ν] in flat ∂_ρ g\n const term3 = drho[mu_N + nu];\n sum += gInvAlphaRho * (term1 + term2 - term3);\n }\n }\n Gamma[alpha_N_N + mu_N + nu] = 0.5 * sum;\n }\n }\n }\n\n return engine.fromNested(flatToNested(Gamma, [N, N, N]), [N, N, N]);\n}\n\n// ---------------------------------------------------------------------------\n// Contraction of Γ with the operand tensor\n// ---------------------------------------------------------------------------\n\n/**\n * Contract Γ^α_{μλ} or Γ^λ_{μα} with the operand tensor along the axis\n * corresponding to `freeIdxPos` (the position of the contracted free index\n * in the operand's flat axis list).\n *\n * S2(c) spec — explicit loop body:\n *\n * Upper case (∇_μ T^α_β):\n * out[α, μ, β, ...] += Γ[α, μ, λ] * T[λ_at_pos, β, ...]\n * i.e., contract over λ (axis `freeIdxPos` of T, axis 2 of Γ)\n *\n * Lower case (∇_μ T_α_β):\n * out[α, μ, β, ...] += Γ[λ, μ, α] * T[λ_at_pos, β, ...]\n * i.e., contract over λ (axis `freeIdxPos` of T, axis 0 of Γ)\n * and α indexes the fixed axis of Γ at position 2.\n *\n * Shape conventions (all row-major):\n * Gamma: shape [N, N, N] — [α or λ, μ, ν or α]\n * ofFlat: flat [totalSize] with strides computed from `ofShape`\n * outputShape: same as the partial-derivative output: [N, ...ofShape]\n * (wrt axis prepended, the freeIdxPos axis contracted out,\n * all other axes kept — but since ∇_μ output equals ∂_μ output shape,\n * we match that shape exactly)\n *\n * @param GammaFlat Flat [N^3] Γ^α_{μν} — [α][μ][ν] row-major\n * @param ofFlat Flat operand data, shape `ofShape`\n * @param ofShape Shape of the operand tensor\n * @param freeIdxPos Position (0-based) of the free index being contracted in `ofShape`\n * @param variance 'upper' → Γ^α_{μλ} contracts λ; 'lower' → Γ^λ_{μα} contracts λ\n * @param N Dimension\n * @param engine Active TensorEngine\n *\n * Returns an EngineTensor of shape [N, ...ofShape_without_freeIdxPos]\n * i.e., the same shape as the partial-derivative output (wrt axis first, others follow).\n */\nexport function contractChristoffelWithOperand(\n GammaFlat: number[],\n ofFlat: number[],\n ofShape: ReadonlyArray<number>,\n freeIdxPos: number,\n variance: 'upper' | 'lower',\n N: number,\n engine: TensorEngine,\n): EngineTensor {\n // Output shape: [N (wrt/mu axis), ...ofShape with freeIdxPos axis removed and\n // replaced by the alpha axis of the Christoffel]\n // Concretely: output has the same shape as ∂_μ T which is [...ofShape, N]\n // with wrtIndex appended. But freeIdx is now contracted (replaced by α):\n // upper: T had axis freeIdxPos as α (upper) → output keeps α at same position, prepends μ\n // lower: T had axis freeIdxPos as α (lower) → output keeps α at same position, prepends μ\n //\n // The output axis order matches ∂_μ T: [...ofShape, N] (wrt axis last? or first?)\n // Actually ∂_μ appends wrt as the LAST axis per v0.3.5 design.\n // So output shape of ∇_μ T = [...ofShape, N] where N is the wrt axis.\n // But the correction term must have the same shape.\n //\n // For the correction: we keep all of T's axes, with freeIdxPos contracting,\n // and add a new μ axis (last, like ∂_μ). The α index replaces the contracted\n // position (same position in the output as freeIdxPos was in T).\n //\n // Output shape = [...ofShape, N] where ofShape[freeIdxPos] stays (α replaces λ)\n // and the last axis N is the μ axis.\n\n const rank = ofShape.length;\n const outShape = [...ofShape, N]; // [...T_shape, mu]\n const outSize = outShape.reduce((a, b) => a * b, 1);\n const out = new Array<number>(outSize).fill(0);\n\n // Build strides for ofFlat and out\n const ofStrides = buildStrides(ofShape);\n const outStrides = buildStrides(outShape);\n\n // Iterate over all output indices\n const outIdx = new Array<number>(outShape.length).fill(0);\n const tIdxBase = new Array<number>(rank).fill(0);\n\n for (let n = 0; n < outSize; n++) {\n const mu = outIdx[rank]; // last axis of output is μ\n // The other axes map to T's indices, with freeIdxPos being the α/result axis\n const alpha = outIdx[freeIdxPos]; // the \"free\" index value (α for upper, α for lower)\n\n let sum = 0;\n\n // Map back to tIdxBase\n for (let k = 0; k < rank; k++) {\n tIdxBase[k] = outIdx[k];\n }\n tIdxBase[freeIdxPos] = 0;\n let tFlat = flatIndex(tIdxBase, ofStrides);\n const tStride = ofStrides[freeIdxPos];\n\n const alpha_N_N = alpha * N * N;\n const mu_N = mu * N;\n const mu_N_alpha = mu_N + alpha;\n\n for (let lam = 0; lam < N; lam++) {\n let gammaFlat: number;\n if (variance === 'upper') {\n // Γ^α_{μλ} — shape [α][μ][λ]\n gammaFlat = alpha_N_N + mu_N + lam;\n } else {\n // Γ^λ_{μα} — shape [λ][μ][α]\n gammaFlat = lam * N * N + mu_N_alpha;\n }\n\n const gVal = GammaFlat[gammaFlat];\n if (gVal !== 0) {\n sum += gVal * ofFlat[tFlat];\n }\n tFlat += tStride;\n }\n\n out[n] = sum;\n\n // Increment multi-index odometer\n for (let k = outShape.length - 1; k >= 0; k--) {\n if (++outIdx[k] < outShape[k]) break;\n outIdx[k] = 0;\n }\n }\n\n return engine.fromNested(flatToNested(out, outShape), outShape);\n}\n\n// ---------------------------------------------------------------------------\n// Metric-partial-derivative lookup (for 'supplied' strategy)\n// ---------------------------------------------------------------------------\n\n/**\n * Look up ∂_{mu} g from inputs.metricDerivatives.\n * Key format: `${metricName}/${coordLabel}_${mu}` (e.g. 'g/x_0' where\n * 'x' is the coordLabel string and '0' is the mu index). The coordLabel\n * is whatever string the caller passes — typically a coordinate label\n * like 'x', 't', 'r'; the literal Greek letter μ is NOT used as a key.\n * Returns a flat [N*N] array.\n *\n * Strategy 'zero': returns [N*N] zeros.\n * Strategy 'supplied': looks up the key; throws if absent.\n */\nexport function getMetricDerivFlat(\n metricName: string,\n coordLabel: string,\n mu: number,\n strategy: 'zero' | 'supplied',\n N: number,\n metricDerivatives: ReadonlyMap<string, NestedArray> | undefined,\n): number[] {\n if (strategy === 'zero') {\n return new Array<number>(N * N).fill(0);\n }\n // strategy === 'supplied'\n const key = `${metricName}/${coordLabel}_${mu}`;\n const d = metricDerivatives?.get(key);\n if (d === undefined) {\n throw new NumericalBackendError(\n `connection-lowering: no metric derivative supplied for \"${key}\" — ` +\n `a covariant-derivative with derivativeStrategy='supplied' requires ` +\n `inputs.metricDerivatives to contain \"${key}\" (flat [N×N] of ∂_{${mu}} g)`,\n );\n }\n const flat = flattenNA(d);\n if (flat.length !== N * N) {\n throw new NumericalBackendError(\n `connection-lowering: metricDerivatives[\"${key}\"] has ${flat.length} elements, ` +\n `expected ${N * N} (N=${N})`,\n );\n }\n return flat;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"covariant-eikonal.d.ts","sourceRoot":"","sources":["../../src/numerical/covariant-eikonal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAWH;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,4DAA4D;IAC5D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,wEAAwE;IACxE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB;2EACuE;IACvE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;;;;;;O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