universal-physics-tensor 8.0.0 → 10.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 (916) hide show
  1. package/README.md +26 -21
  2. package/data/atlas/atlas.json +75 -64
  3. package/data/atlas/atlas.jsonld +1 -1
  4. package/data/atlas/diffusion.json +23 -22
  5. package/data/atlas/oscillators.json +21 -16
  6. package/data/atlas/waves.json +33 -28
  7. package/data/bridge-catalog.json +1356 -1791
  8. package/data/bridge-catalog.schema.json +789 -46
  9. package/data/quantities.json +280 -234
  10. package/data/quantities.schema.json +52 -0
  11. package/data/schemas/atlas-record.v0.json +184 -46
  12. package/data/units.json +1178 -0
  13. package/data/units.schema.json +124 -0
  14. package/dist/atlas/applicability.d.ts.map +1 -1
  15. package/dist/atlas/applicability.js +14 -3
  16. package/dist/atlas/applicability.js.map +1 -1
  17. package/dist/atlas/association.d.ts +1 -1
  18. package/dist/atlas/association.js.map +1 -1
  19. package/dist/atlas/benchmark/backend-shapes.d.ts.map +1 -1
  20. package/dist/atlas/benchmark/backend-shapes.js +5 -1
  21. package/dist/atlas/benchmark/backend-shapes.js.map +1 -1
  22. package/dist/atlas/benchmark/baselines.d.ts.map +1 -1
  23. package/dist/atlas/benchmark/baselines.js +8 -0
  24. package/dist/atlas/benchmark/baselines.js.map +1 -1
  25. package/dist/atlas/benchmark/hybrid-retrieval.d.ts +3 -2
  26. package/dist/atlas/benchmark/hybrid-retrieval.d.ts.map +1 -1
  27. package/dist/atlas/benchmark/hybrid-retrieval.js +16 -12
  28. package/dist/atlas/benchmark/hybrid-retrieval.js.map +1 -1
  29. package/dist/atlas/benchmark/leakage.js.map +1 -1
  30. package/dist/atlas/benchmark/loader.js.map +1 -1
  31. package/dist/atlas/benchmark/run-atlas.d.ts.map +1 -1
  32. package/dist/atlas/benchmark/run-atlas.js +14 -2
  33. package/dist/atlas/benchmark/run-atlas.js.map +1 -1
  34. package/dist/atlas/benchmark/stats.d.ts +1 -1
  35. package/dist/atlas/benchmark/stats.d.ts.map +1 -1
  36. package/dist/atlas/benchmark/stats.js +1 -1
  37. package/dist/atlas/benchmark/stats.js.map +1 -1
  38. package/dist/atlas/benchmark/study.js.map +1 -1
  39. package/dist/atlas/benchmark/types.js.map +1 -1
  40. package/dist/atlas/bridge-record.d.ts +4 -4
  41. package/dist/atlas/bridge-record.d.ts.map +1 -1
  42. package/dist/atlas/bridge-record.js +6 -6
  43. package/dist/atlas/bridge-record.js.map +1 -1
  44. package/dist/atlas/catalog-formal-ref.js.map +1 -1
  45. package/dist/atlas/chain-pipeline.d.ts +0 -11
  46. package/dist/atlas/chain-pipeline.d.ts.map +1 -1
  47. package/dist/atlas/chain-pipeline.js +5 -16
  48. package/dist/atlas/chain-pipeline.js.map +1 -1
  49. package/dist/atlas/composition-table.js.map +1 -1
  50. package/dist/atlas/conventions.js.map +1 -1
  51. package/dist/atlas/coverage.d.ts +2 -2
  52. package/dist/atlas/coverage.js.map +1 -1
  53. package/dist/atlas/derivation.js.map +1 -1
  54. package/dist/atlas/derive-evidence.d.ts +6 -4
  55. package/dist/atlas/derive-evidence.d.ts.map +1 -1
  56. package/dist/atlas/derive-evidence.js +7 -2
  57. package/dist/atlas/derive-evidence.js.map +1 -1
  58. package/dist/atlas/diffusion/bridges-closure.d.ts.map +1 -1
  59. package/dist/atlas/diffusion/bridges-closure.js +0 -5
  60. package/dist/atlas/diffusion/bridges-closure.js.map +1 -1
  61. package/dist/atlas/diffusion/bridges.d.ts.map +1 -1
  62. package/dist/atlas/diffusion/bridges.js +0 -3
  63. package/dist/atlas/diffusion/bridges.js.map +1 -1
  64. package/dist/atlas/diffusion/dimensions.js.map +1 -1
  65. package/dist/atlas/diffusion/index.d.ts +1 -1
  66. package/dist/atlas/diffusion/index.d.ts.map +1 -1
  67. package/dist/atlas/diffusion/index.js.map +1 -1
  68. package/dist/atlas/diffusion/models.js.map +1 -1
  69. package/dist/atlas/diffusion/numerics.js.map +1 -1
  70. package/dist/atlas/error-algebra.d.ts +6 -0
  71. package/dist/atlas/error-algebra.d.ts.map +1 -1
  72. package/dist/atlas/error-algebra.js +26 -0
  73. package/dist/atlas/error-algebra.js.map +1 -1
  74. package/dist/atlas/export.d.ts +18 -2
  75. package/dist/atlas/export.d.ts.map +1 -1
  76. package/dist/atlas/export.js +9 -3
  77. package/dist/atlas/export.js.map +1 -1
  78. package/dist/atlas/families.d.ts +19 -2
  79. package/dist/atlas/families.d.ts.map +1 -1
  80. package/dist/atlas/families.js +26 -3
  81. package/dist/atlas/families.js.map +1 -1
  82. package/dist/atlas/family.d.ts +27 -0
  83. package/dist/atlas/family.d.ts.map +1 -0
  84. package/dist/atlas/family.js +12 -0
  85. package/dist/atlas/family.js.map +1 -0
  86. package/dist/atlas/index.d.ts +3 -2
  87. package/dist/atlas/index.d.ts.map +1 -1
  88. package/dist/atlas/index.js +2 -1
  89. package/dist/atlas/index.js.map +1 -1
  90. package/dist/atlas/link-prediction.d.ts +1 -1
  91. package/dist/atlas/link-prediction.d.ts.map +1 -1
  92. package/dist/atlas/link-prediction.js.map +1 -1
  93. package/dist/atlas/model.js.map +1 -1
  94. package/dist/atlas/oscillators/bridges-coarse.d.ts.map +1 -1
  95. package/dist/atlas/oscillators/bridges-coarse.js +0 -1
  96. package/dist/atlas/oscillators/bridges-coarse.js.map +1 -1
  97. package/dist/atlas/oscillators/bridges-exact.d.ts.map +1 -1
  98. package/dist/atlas/oscillators/bridges-exact.js +0 -3
  99. package/dist/atlas/oscillators/bridges-exact.js.map +1 -1
  100. package/dist/atlas/oscillators/bridges-limits.d.ts.map +1 -1
  101. package/dist/atlas/oscillators/bridges-limits.js +0 -2
  102. package/dist/atlas/oscillators/bridges-limits.js.map +1 -1
  103. package/dist/atlas/oscillators/dimensions.js.map +1 -1
  104. package/dist/atlas/oscillators/index.d.ts +1 -16
  105. package/dist/atlas/oscillators/index.d.ts.map +1 -1
  106. package/dist/atlas/oscillators/index.js.map +1 -1
  107. package/dist/atlas/oscillators/limit-witnesses.js.map +1 -1
  108. package/dist/atlas/oscillators/models.js.map +1 -1
  109. package/dist/atlas/oscillators/norm-transport-witness.js.map +1 -1
  110. package/dist/atlas/oscillators/norm-transport.js.map +1 -1
  111. package/dist/atlas/oscillators/norms.js.map +1 -1
  112. package/dist/atlas/oscillators/pendulum-motion.js.map +1 -1
  113. package/dist/atlas/oscillators/phase-carriage.js.map +1 -1
  114. package/dist/atlas/oscillators/phase-translation.js.map +1 -1
  115. package/dist/atlas/oscillators/position-translation.js.map +1 -1
  116. package/dist/atlas/oscillators/rejections.js.map +1 -1
  117. package/dist/atlas/path-bound.js.map +1 -1
  118. package/dist/atlas/physjs-entries.generated.d.ts +1601 -220
  119. package/dist/atlas/physjs-entries.generated.d.ts.map +1 -1
  120. package/dist/atlas/physjs-entries.generated.js +1854 -345
  121. package/dist/atlas/physjs-entries.generated.js.map +1 -1
  122. package/dist/atlas/physjs-ref.d.ts +151 -117
  123. package/dist/atlas/physjs-ref.d.ts.map +1 -1
  124. package/dist/atlas/physjs-ref.js +244 -211
  125. package/dist/atlas/physjs-ref.js.map +1 -1
  126. package/dist/atlas/physjs-reviewed.d.ts +31 -0
  127. package/dist/atlas/physjs-reviewed.d.ts.map +1 -0
  128. package/dist/atlas/physjs-reviewed.js +194 -0
  129. package/dist/atlas/physjs-reviewed.js.map +1 -0
  130. package/dist/atlas/poster/associations.js.map +1 -1
  131. package/dist/atlas/poster/derivations.js.map +1 -1
  132. package/dist/atlas/poster/statements.js.map +1 -1
  133. package/dist/atlas/proof-target.d.ts +16 -8
  134. package/dist/atlas/proof-target.d.ts.map +1 -1
  135. package/dist/atlas/proof-target.js +34 -31
  136. package/dist/atlas/proof-target.js.map +1 -1
  137. package/dist/atlas/public.d.ts +2 -1
  138. package/dist/atlas/public.d.ts.map +1 -1
  139. package/dist/atlas/public.js +2 -1
  140. package/dist/atlas/public.js.map +1 -1
  141. package/dist/atlas/regime.js.map +1 -1
  142. package/dist/atlas/serialize.d.ts +18 -12
  143. package/dist/atlas/serialize.d.ts.map +1 -1
  144. package/dist/atlas/serialize.js +28 -18
  145. package/dist/atlas/serialize.js.map +1 -1
  146. package/dist/atlas/statement.js.map +1 -1
  147. package/dist/atlas/translation-registry.js.map +1 -1
  148. package/dist/atlas/translation.js.map +1 -1
  149. package/dist/atlas/types.d.ts +9 -2
  150. package/dist/atlas/types.d.ts.map +1 -1
  151. package/dist/atlas/types.js +1 -1
  152. package/dist/atlas/types.js.map +1 -1
  153. package/dist/atlas/waves/bridges-closure.d.ts.map +1 -1
  154. package/dist/atlas/waves/bridges-closure.js +0 -3
  155. package/dist/atlas/waves/bridges-closure.js.map +1 -1
  156. package/dist/atlas/waves/bridges.d.ts.map +1 -1
  157. package/dist/atlas/waves/bridges.js +0 -4
  158. package/dist/atlas/waves/bridges.js.map +1 -1
  159. package/dist/atlas/waves/index.d.ts +1 -1
  160. package/dist/atlas/waves/index.d.ts.map +1 -1
  161. package/dist/atlas/waves/index.js.map +1 -1
  162. package/dist/atlas/waves/models.js.map +1 -1
  163. package/dist/atlas/waves/numerics.js.map +1 -1
  164. package/dist/atlas/witness-artifact.js.map +1 -1
  165. package/dist/atlas/witness-dominance.d.ts +4 -3
  166. package/dist/atlas/witness-dominance.d.ts.map +1 -1
  167. package/dist/atlas/witness-dominance.js +15 -5
  168. package/dist/atlas/witness-dominance.js.map +1 -1
  169. package/dist/atlas/witness-numeric.d.ts +8 -4
  170. package/dist/atlas/witness-numeric.d.ts.map +1 -1
  171. package/dist/atlas/witness-numeric.js +27 -2
  172. package/dist/atlas/witness-numeric.js.map +1 -1
  173. package/dist/atlas/witness-result.d.ts +7 -1
  174. package/dist/atlas/witness-result.d.ts.map +1 -1
  175. package/dist/atlas/witness-result.js.map +1 -1
  176. package/dist/atlas/witness-specs.js.map +1 -1
  177. package/dist/atlas/witness-symbolic.js.map +1 -1
  178. package/dist/atlas/witnesses/quantum-support.js.map +1 -1
  179. package/dist/bridges/caller-table.d.ts +1 -1
  180. package/dist/bridges/caller-table.d.ts.map +1 -1
  181. package/dist/bridges/caller-table.js.map +1 -1
  182. package/dist/bridges/carrier-sign.d.ts.map +1 -1
  183. package/dist/bridges/carrier-sign.js +8 -3
  184. package/dist/bridges/carrier-sign.js.map +1 -1
  185. package/dist/bridges/catalog-adapter.d.ts +12 -3
  186. package/dist/bridges/catalog-adapter.d.ts.map +1 -1
  187. package/dist/bridges/catalog-adapter.js +22 -14
  188. package/dist/bridges/catalog-adapter.js.map +1 -1
  189. package/dist/bridges/catalog-load.d.ts +19 -2
  190. package/dist/bridges/catalog-load.d.ts.map +1 -1
  191. package/dist/bridges/catalog-load.js +233 -14
  192. package/dist/bridges/catalog-load.js.map +1 -1
  193. package/dist/bridges/catalog-types.d.ts +96 -27
  194. package/dist/bridges/catalog-types.d.ts.map +1 -1
  195. package/dist/bridges/catalog-types.js.map +1 -1
  196. package/dist/bridges/coefficient-statement.js +1 -5
  197. package/dist/bridges/coefficient-statement.js.map +1 -1
  198. package/dist/bridges/confrontation-coverage.js.map +1 -1
  199. package/dist/bridges/confrontations.d.ts +1 -1
  200. package/dist/bridges/confrontations.d.ts.map +1 -1
  201. package/dist/bridges/confrontations.js +1 -1
  202. package/dist/bridges/confrontations.js.map +1 -1
  203. package/dist/bridges/evaluation-errors.d.ts +89 -0
  204. package/dist/bridges/evaluation-errors.d.ts.map +1 -0
  205. package/dist/bridges/evaluation-errors.js +136 -0
  206. package/dist/bridges/evaluation-errors.js.map +1 -0
  207. package/dist/bridges/evaluator-inputs.d.ts +5 -3
  208. package/dist/bridges/evaluator-inputs.d.ts.map +1 -1
  209. package/dist/bridges/evaluator-inputs.js +24 -24
  210. package/dist/bridges/evaluator-inputs.js.map +1 -1
  211. package/dist/bridges/evaluators.d.ts +48 -8
  212. package/dist/bridges/evaluators.d.ts.map +1 -1
  213. package/dist/bridges/evaluators.js +173 -38
  214. package/dist/bridges/evaluators.js.map +1 -1
  215. package/dist/bridges/expr-parse.d.ts +38 -7
  216. package/dist/bridges/expr-parse.d.ts.map +1 -1
  217. package/dist/bridges/expr-parse.js +129 -156
  218. package/dist/bridges/expr-parse.js.map +1 -1
  219. package/dist/bridges/holds.d.ts +16 -8
  220. package/dist/bridges/holds.d.ts.map +1 -1
  221. package/dist/bridges/holds.js +130 -236
  222. package/dist/bridges/holds.js.map +1 -1
  223. package/dist/bridges/index.d.ts +15 -14
  224. package/dist/bridges/index.d.ts.map +1 -1
  225. package/dist/bridges/index.js +14 -15
  226. package/dist/bridges/index.js.map +1 -1
  227. package/dist/bridges/input-contract.d.ts +65 -0
  228. package/dist/bridges/input-contract.d.ts.map +1 -0
  229. package/dist/bridges/input-contract.js +97 -0
  230. package/dist/bridges/input-contract.js.map +1 -0
  231. package/dist/bridges/membership.d.ts +5 -3
  232. package/dist/bridges/membership.d.ts.map +1 -1
  233. package/dist/bridges/membership.js +5 -6
  234. package/dist/bridges/membership.js.map +1 -1
  235. package/dist/bridges/notices.d.ts +11 -0
  236. package/dist/bridges/notices.d.ts.map +1 -0
  237. package/dist/bridges/notices.js +22 -0
  238. package/dist/bridges/notices.js.map +1 -0
  239. package/dist/bridges/observations/types.js.map +1 -1
  240. package/dist/bridges/rejected.d.ts +11 -17
  241. package/dist/bridges/rejected.d.ts.map +1 -1
  242. package/dist/bridges/rejected.js +13 -68
  243. package/dist/bridges/rejected.js.map +1 -1
  244. package/dist/bridges/relation-eval.d.ts +5 -6
  245. package/dist/bridges/relation-eval.d.ts.map +1 -1
  246. package/dist/bridges/relation-eval.js +9 -38
  247. package/dist/bridges/relation-eval.js.map +1 -1
  248. package/dist/bridges/rhs-registry.js.map +1 -1
  249. package/dist/bridges/sensitivity.d.ts +11 -3
  250. package/dist/bridges/sensitivity.d.ts.map +1 -1
  251. package/dist/bridges/sensitivity.js +24 -10
  252. package/dist/bridges/sensitivity.js.map +1 -1
  253. package/dist/bridges/tensor-index.js.map +1 -1
  254. package/dist/bridges/types.d.ts +1 -7
  255. package/dist/bridges/types.d.ts.map +1 -1
  256. package/dist/bridges/types.js +1 -4
  257. package/dist/bridges/types.js.map +1 -1
  258. package/dist/canonical/canonical-equation.d.ts +31 -0
  259. package/dist/canonical/canonical-equation.d.ts.map +1 -1
  260. package/dist/canonical/canonical-equation.js.map +1 -1
  261. package/dist/canonical/dimensional-fields.js.map +1 -1
  262. package/dist/canonical/entries/_l1-build.js.map +1 -1
  263. package/dist/canonical/entries/atomic.d.ts.map +1 -1
  264. package/dist/canonical/entries/atomic.js +11 -1
  265. package/dist/canonical/entries/atomic.js.map +1 -1
  266. package/dist/canonical/entries/condensed-matter.d.ts.map +1 -1
  267. package/dist/canonical/entries/condensed-matter.js +7 -4
  268. package/dist/canonical/entries/condensed-matter.js.map +1 -1
  269. package/dist/canonical/entries/dimensional-classics.d.ts.map +1 -1
  270. package/dist/canonical/entries/dimensional-classics.js +50 -2
  271. package/dist/canonical/entries/dimensional-classics.js.map +1 -1
  272. package/dist/canonical/entries/electromagnetism.d.ts.map +1 -1
  273. package/dist/canonical/entries/electromagnetism.js +32 -2
  274. package/dist/canonical/entries/electromagnetism.js.map +1 -1
  275. package/dist/canonical/entries/fluids-waves.d.ts.map +1 -1
  276. package/dist/canonical/entries/fluids-waves.js +34 -0
  277. package/dist/canonical/entries/fluids-waves.js.map +1 -1
  278. package/dist/canonical/entries/mechanics.d.ts.map +1 -1
  279. package/dist/canonical/entries/mechanics.js +24 -0
  280. package/dist/canonical/entries/mechanics.js.map +1 -1
  281. package/dist/canonical/entries/nonmonomial.d.ts.map +1 -1
  282. package/dist/canonical/entries/nonmonomial.js +42 -24
  283. package/dist/canonical/entries/nonmonomial.js.map +1 -1
  284. package/dist/canonical/entries/relativity.d.ts.map +1 -1
  285. package/dist/canonical/entries/relativity.js +6 -0
  286. package/dist/canonical/entries/relativity.js.map +1 -1
  287. package/dist/canonical/entries/statistical-mechanics.d.ts.map +1 -1
  288. package/dist/canonical/entries/statistical-mechanics.js +24 -5
  289. package/dist/canonical/entries/statistical-mechanics.js.map +1 -1
  290. package/dist/canonical/entries/thermo-nuclear-cosmo.d.ts.map +1 -1
  291. package/dist/canonical/entries/thermo-nuclear-cosmo.js +15 -0
  292. package/dist/canonical/entries/thermo-nuclear-cosmo.js.map +1 -1
  293. package/dist/canonical/linkage.d.ts +29 -4
  294. package/dist/canonical/linkage.d.ts.map +1 -1
  295. package/dist/canonical/linkage.js +31 -29
  296. package/dist/canonical/linkage.js.map +1 -1
  297. package/dist/canonical/normal-form.d.ts +0 -8
  298. package/dist/canonical/normal-form.d.ts.map +1 -1
  299. package/dist/canonical/normal-form.js +17 -12
  300. package/dist/canonical/normal-form.js.map +1 -1
  301. package/dist/canonical/registry.js.map +1 -1
  302. package/dist/canonical/residual.js.map +1 -1
  303. package/dist/canonical/seed-l-layer.d.ts +7 -1
  304. package/dist/canonical/seed-l-layer.d.ts.map +1 -1
  305. package/dist/canonical/seed-l-layer.js +7 -1
  306. package/dist/canonical/seed-l-layer.js.map +1 -1
  307. package/dist/canonical/structural.d.ts +21 -0
  308. package/dist/canonical/structural.d.ts.map +1 -1
  309. package/dist/canonical/structural.js +24 -4
  310. package/dist/canonical/structural.js.map +1 -1
  311. package/dist/cases/brownian-sphere.js +4 -4
  312. package/dist/cases/brownian-sphere.js.map +1 -1
  313. package/dist/cases/damped-resonator.js +2 -2
  314. package/dist/cases/damped-resonator.js.map +1 -1
  315. package/dist/cases/index.d.ts +9 -2
  316. package/dist/cases/index.d.ts.map +1 -1
  317. package/dist/cases/index.js +26 -7
  318. package/dist/cases/index.js.map +1 -1
  319. package/dist/cases/kepler-rv.js +6 -6
  320. package/dist/cases/kepler-rv.js.map +1 -1
  321. package/dist/cases/lumped-cooling.js +1 -1
  322. package/dist/cases/lumped-cooling.js.map +1 -1
  323. package/dist/cases/quadrature.js.map +1 -1
  324. package/dist/cases/resistor-noise.js +3 -3
  325. package/dist/cases/resistor-noise.js.map +1 -1
  326. package/dist/cases/skin-depth.js.map +1 -1
  327. package/dist/cases/types.js.map +1 -1
  328. package/dist/cli/args.d.ts +7 -2
  329. package/dist/cli/args.d.ts.map +1 -1
  330. package/dist/cli/args.js +18 -2
  331. package/dist/cli/args.js.map +1 -1
  332. package/dist/cli/bindings.d.ts +13 -0
  333. package/dist/cli/bindings.d.ts.map +1 -0
  334. package/dist/cli/bindings.js +32 -0
  335. package/dist/cli/bindings.js.map +1 -0
  336. package/dist/cli/closed-form-range.js.map +1 -1
  337. package/dist/cli/command.js.map +1 -1
  338. package/dist/cli/commands/_atlas-map.d.ts +3 -3
  339. package/dist/cli/commands/_atlas-map.d.ts.map +1 -1
  340. package/dist/cli/commands/_atlas-map.js +43 -18
  341. package/dist/cli/commands/_atlas-map.js.map +1 -1
  342. package/dist/cli/commands/_atlas-route.js.map +1 -1
  343. package/dist/cli/commands/_discovery-opts.d.ts +2 -1
  344. package/dist/cli/commands/_discovery-opts.d.ts.map +1 -1
  345. package/dist/cli/commands/_discovery-opts.js +48 -18
  346. package/dist/cli/commands/_discovery-opts.js.map +1 -1
  347. package/dist/cli/commands/atlas.d.ts.map +1 -1
  348. package/dist/cli/commands/atlas.js +7 -12
  349. package/dist/cli/commands/atlas.js.map +1 -1
  350. package/dist/cli/commands/audit.d.ts.map +1 -1
  351. package/dist/cli/commands/audit.js +13 -21
  352. package/dist/cli/commands/audit.js.map +1 -1
  353. package/dist/cli/commands/axes.js.map +1 -1
  354. package/dist/cli/commands/candidates.d.ts.map +1 -1
  355. package/dist/cli/commands/candidates.js +16 -8
  356. package/dist/cli/commands/candidates.js.map +1 -1
  357. package/dist/cli/commands/canonical.js.map +1 -1
  358. package/dist/cli/commands/chain.js +1 -1
  359. package/dist/cli/commands/chain.js.map +1 -1
  360. package/dist/cli/commands/confront.d.ts.map +1 -1
  361. package/dist/cli/commands/confront.js +22 -14
  362. package/dist/cli/commands/confront.js.map +1 -1
  363. package/dist/cli/commands/connectors.d.ts.map +1 -1
  364. package/dist/cli/commands/connectors.js +8 -9
  365. package/dist/cli/commands/connectors.js.map +1 -1
  366. package/dist/cli/commands/coverage.js.map +1 -1
  367. package/dist/cli/commands/derive.d.ts.map +1 -1
  368. package/dist/cli/commands/derive.js +50 -26
  369. package/dist/cli/commands/derive.js.map +1 -1
  370. package/dist/cli/commands/discover.d.ts.map +1 -1
  371. package/dist/cli/commands/discover.js +18 -13
  372. package/dist/cli/commands/discover.js.map +1 -1
  373. package/dist/cli/commands/eval.d.ts.map +1 -1
  374. package/dist/cli/commands/eval.js +29 -26
  375. package/dist/cli/commands/eval.js.map +1 -1
  376. package/dist/cli/commands/evaluate.d.ts +1 -35
  377. package/dist/cli/commands/evaluate.d.ts.map +1 -1
  378. package/dist/cli/commands/evaluate.js +99 -208
  379. package/dist/cli/commands/evaluate.js.map +1 -1
  380. package/dist/cli/commands/explain.d.ts.map +1 -1
  381. package/dist/cli/commands/explain.js +57 -45
  382. package/dist/cli/commands/explain.js.map +1 -1
  383. package/dist/cli/commands/frontier.js.map +1 -1
  384. package/dist/cli/commands/ground.d.ts.map +1 -1
  385. package/dist/cli/commands/ground.js +41 -11
  386. package/dist/cli/commands/ground.js.map +1 -1
  387. package/dist/cli/commands/index.js.map +1 -1
  388. package/dist/cli/commands/map.d.ts.map +1 -1
  389. package/dist/cli/commands/map.js +84 -92
  390. package/dist/cli/commands/map.js.map +1 -1
  391. package/dist/cli/commands/metric.d.ts.map +1 -1
  392. package/dist/cli/commands/metric.js +53 -15
  393. package/dist/cli/commands/metric.js.map +1 -1
  394. package/dist/cli/commands/path.js +4 -4
  395. package/dist/cli/commands/path.js.map +1 -1
  396. package/dist/cli/commands/predict.js.map +1 -1
  397. package/dist/cli/commands/priority.js.map +1 -1
  398. package/dist/cli/commands/probe.d.ts.map +1 -1
  399. package/dist/cli/commands/probe.js +50 -26
  400. package/dist/cli/commands/probe.js.map +1 -1
  401. package/dist/cli/commands/recover.js +1 -1
  402. package/dist/cli/commands/recover.js.map +1 -1
  403. package/dist/cli/commands/regime.d.ts +5 -4
  404. package/dist/cli/commands/regime.d.ts.map +1 -1
  405. package/dist/cli/commands/regime.js +25 -27
  406. package/dist/cli/commands/regime.js.map +1 -1
  407. package/dist/cli/commands/retrieve.d.ts.map +1 -1
  408. package/dist/cli/commands/retrieve.js +22 -14
  409. package/dist/cli/commands/retrieve.js.map +1 -1
  410. package/dist/cli/commands/search.d.ts.map +1 -1
  411. package/dist/cli/commands/search.js +8 -4
  412. package/dist/cli/commands/search.js.map +1 -1
  413. package/dist/cli/commands/symbolic.d.ts.map +1 -1
  414. package/dist/cli/commands/symbolic.js +14 -7
  415. package/dist/cli/commands/symbolic.js.map +1 -1
  416. package/dist/cli/commands/testplan.js +4 -4
  417. package/dist/cli/commands/testplan.js.map +1 -1
  418. package/dist/cli/conventions.d.ts +6 -7
  419. package/dist/cli/conventions.d.ts.map +1 -1
  420. package/dist/cli/conventions.js +19 -28
  421. package/dist/cli/conventions.js.map +1 -1
  422. package/dist/cli/determination.js.map +1 -1
  423. package/dist/cli/errors.js.map +1 -1
  424. package/dist/cli/euler-guard.d.ts +13 -2
  425. package/dist/cli/euler-guard.d.ts.map +1 -1
  426. package/dist/cli/euler-guard.js +17 -3
  427. package/dist/cli/euler-guard.js.map +1 -1
  428. package/dist/cli/eval-numbers.d.ts +4 -9
  429. package/dist/cli/eval-numbers.d.ts.map +1 -1
  430. package/dist/cli/eval-numbers.js +11 -41
  431. package/dist/cli/eval-numbers.js.map +1 -1
  432. package/dist/cli/expr-print.d.ts +29 -2
  433. package/dist/cli/expr-print.d.ts.map +1 -1
  434. package/dist/cli/expr-print.js +46 -2
  435. package/dist/cli/expr-print.js.map +1 -1
  436. package/dist/cli/flag-help.js.map +1 -1
  437. package/dist/cli/graphs.js.map +1 -1
  438. package/dist/cli/library-defaults.d.ts +19 -0
  439. package/dist/cli/library-defaults.d.ts.map +1 -0
  440. package/dist/cli/library-defaults.js +22 -0
  441. package/dist/cli/library-defaults.js.map +1 -0
  442. package/dist/cli/main.js +7 -3
  443. package/dist/cli/main.js.map +1 -1
  444. package/dist/cli/map-evidence.js.map +1 -1
  445. package/dist/cli/output.d.ts +3 -6
  446. package/dist/cli/output.d.ts.map +1 -1
  447. package/dist/cli/output.js.map +1 -1
  448. package/dist/cli/published-url.d.ts +2 -0
  449. package/dist/cli/published-url.d.ts.map +1 -1
  450. package/dist/cli/published-url.js +5 -0
  451. package/dist/cli/published-url.js.map +1 -1
  452. package/dist/cli/record-reach.d.ts +6 -0
  453. package/dist/cli/record-reach.d.ts.map +1 -1
  454. package/dist/cli/record-reach.js +16 -10
  455. package/dist/cli/record-reach.js.map +1 -1
  456. package/dist/cli/record-tables.d.ts +2 -1
  457. package/dist/cli/record-tables.d.ts.map +1 -1
  458. package/dist/cli/record-tables.js +8 -3
  459. package/dist/cli/record-tables.js.map +1 -1
  460. package/dist/cli/record.d.ts.map +1 -1
  461. package/dist/cli/record.js +31 -12
  462. package/dist/cli/record.js.map +1 -1
  463. package/dist/cli/search-index.d.ts +5 -0
  464. package/dist/cli/search-index.d.ts.map +1 -1
  465. package/dist/cli/search-index.js +12 -1
  466. package/dist/cli/search-index.js.map +1 -1
  467. package/dist/cli/statuses.js.map +1 -1
  468. package/dist/cli/top-level-help.js.map +1 -1
  469. package/dist/cli/version.js.map +1 -1
  470. package/dist/cli-api.d.ts +57 -18
  471. package/dist/cli-api.d.ts.map +1 -1
  472. package/dist/cli-api.js +49 -21
  473. package/dist/cli-api.js.map +1 -1
  474. package/dist/composition/adjudication.d.ts +8 -30
  475. package/dist/composition/adjudication.d.ts.map +1 -1
  476. package/dist/composition/adjudication.js +15 -67
  477. package/dist/composition/adjudication.js.map +1 -1
  478. package/dist/composition/aliases.d.ts +1 -1
  479. package/dist/composition/aliases.d.ts.map +1 -1
  480. package/dist/composition/aliases.js +10 -20
  481. package/dist/composition/aliases.js.map +1 -1
  482. package/dist/composition/audit-coverage.d.ts +2 -0
  483. package/dist/composition/audit-coverage.d.ts.map +1 -1
  484. package/dist/composition/audit-coverage.js.map +1 -1
  485. package/dist/composition/axes.d.ts +12 -0
  486. package/dist/composition/axes.d.ts.map +1 -1
  487. package/dist/composition/axes.js +18 -6
  488. package/dist/composition/axes.js.map +1 -1
  489. package/dist/composition/axis-audit.js.map +1 -1
  490. package/dist/composition/bridge-analysis.d.ts +0 -14
  491. package/dist/composition/bridge-analysis.d.ts.map +1 -1
  492. package/dist/composition/bridge-analysis.js +66 -57
  493. package/dist/composition/bridge-analysis.js.map +1 -1
  494. package/dist/composition/bridge-prediction.d.ts +5 -1
  495. package/dist/composition/bridge-prediction.d.ts.map +1 -1
  496. package/dist/composition/bridge-prediction.js +12 -16
  497. package/dist/composition/bridge-prediction.js.map +1 -1
  498. package/dist/composition/buckingham-filter.js.map +1 -1
  499. package/dist/composition/canonical-compare.d.ts.map +1 -1
  500. package/dist/composition/canonical-compare.js +12 -2
  501. package/dist/composition/canonical-compare.js.map +1 -1
  502. package/dist/composition/canonical-graph.d.ts +15 -18
  503. package/dist/composition/canonical-graph.d.ts.map +1 -1
  504. package/dist/composition/canonical-graph.js +59 -85
  505. package/dist/composition/canonical-graph.js.map +1 -1
  506. package/dist/composition/canonical-json.js.map +1 -1
  507. package/dist/composition/canonical-prefactors.d.ts +10 -29
  508. package/dist/composition/canonical-prefactors.d.ts.map +1 -1
  509. package/dist/composition/canonical-prefactors.js +15 -202
  510. package/dist/composition/canonical-prefactors.js.map +1 -1
  511. package/dist/composition/catalog-graph.d.ts.map +1 -1
  512. package/dist/composition/catalog-graph.js +6 -20
  513. package/dist/composition/catalog-graph.js.map +1 -1
  514. package/dist/composition/chain-candidate.d.ts +2 -0
  515. package/dist/composition/chain-candidate.d.ts.map +1 -1
  516. package/dist/composition/chain-candidate.js +2 -0
  517. package/dist/composition/chain-candidate.js.map +1 -1
  518. package/dist/composition/chain-match.js.map +1 -1
  519. package/dist/composition/chain-regime.js.map +1 -1
  520. package/dist/composition/chain-result.js.map +1 -1
  521. package/dist/composition/compose-surface.js.map +1 -1
  522. package/dist/composition/compose-symbolic.js.map +1 -1
  523. package/dist/composition/compose.d.ts.map +1 -1
  524. package/dist/composition/compose.js +154 -36
  525. package/dist/composition/compose.js.map +1 -1
  526. package/dist/composition/composition-recovery.js.map +1 -1
  527. package/dist/composition/consequence.d.ts.map +1 -1
  528. package/dist/composition/consequence.js +15 -6
  529. package/dist/composition/consequence.js.map +1 -1
  530. package/dist/composition/consistency.js.map +1 -1
  531. package/dist/composition/descriptor.d.ts +1 -1
  532. package/dist/composition/descriptor.d.ts.map +1 -1
  533. package/dist/composition/descriptor.js.map +1 -1
  534. package/dist/composition/dimension-adjacency.js.map +1 -1
  535. package/dist/composition/discovery.d.ts +67 -7
  536. package/dist/composition/discovery.d.ts.map +1 -1
  537. package/dist/composition/discovery.js +83 -23
  538. package/dist/composition/discovery.js.map +1 -1
  539. package/dist/composition/edge.d.ts +19 -22
  540. package/dist/composition/edge.d.ts.map +1 -1
  541. package/dist/composition/edge.js +25 -28
  542. package/dist/composition/edge.js.map +1 -1
  543. package/dist/composition/enumerate.d.ts +2 -2
  544. package/dist/composition/enumerate.d.ts.map +1 -1
  545. package/dist/composition/enumerate.js.map +1 -1
  546. package/dist/composition/evaluate-relation.d.ts +29 -5
  547. package/dist/composition/evaluate-relation.d.ts.map +1 -1
  548. package/dist/composition/evaluate-relation.js +100 -72
  549. package/dist/composition/evaluate-relation.js.map +1 -1
  550. package/dist/composition/explain.d.ts +14 -4
  551. package/dist/composition/explain.d.ts.map +1 -1
  552. package/dist/composition/explain.js +53 -19
  553. package/dist/composition/explain.js.map +1 -1
  554. package/dist/composition/expr-eval.d.ts.map +1 -1
  555. package/dist/composition/expr-eval.js +2 -1
  556. package/dist/composition/expr-eval.js.map +1 -1
  557. package/dist/composition/expr-simplify.d.ts.map +1 -1
  558. package/dist/composition/expr-simplify.js +9 -39
  559. package/dist/composition/expr-simplify.js.map +1 -1
  560. package/dist/composition/expr-subst.js.map +1 -1
  561. package/dist/composition/formula-shape.d.ts +9 -0
  562. package/dist/composition/formula-shape.d.ts.map +1 -1
  563. package/dist/composition/formula-shape.js +54 -0
  564. package/dist/composition/formula-shape.js.map +1 -1
  565. package/dist/composition/frontier-account.d.ts +3 -2
  566. package/dist/composition/frontier-account.d.ts.map +1 -1
  567. package/dist/composition/frontier-account.js +7 -3
  568. package/dist/composition/frontier-account.js.map +1 -1
  569. package/dist/composition/graph-viz-svg.js.map +1 -1
  570. package/dist/composition/graph-viz.js.map +1 -1
  571. package/dist/composition/grounding.js.map +1 -1
  572. package/dist/composition/identifiability.js.map +1 -1
  573. package/dist/composition/index.d.ts +9 -5
  574. package/dist/composition/index.d.ts.map +1 -1
  575. package/dist/composition/index.js +7 -4
  576. package/dist/composition/index.js.map +1 -1
  577. package/dist/composition/mathts-quiet.d.ts +28 -0
  578. package/dist/composition/mathts-quiet.d.ts.map +1 -0
  579. package/dist/composition/mathts-quiet.js +56 -0
  580. package/dist/composition/mathts-quiet.js.map +1 -0
  581. package/dist/composition/mathts-scalar-symbols.d.ts.map +1 -1
  582. package/dist/composition/mathts-scalar-symbols.js +18 -34
  583. package/dist/composition/mathts-scalar-symbols.js.map +1 -1
  584. package/dist/composition/not-composable-seeds.d.ts +3 -1
  585. package/dist/composition/not-composable-seeds.d.ts.map +1 -1
  586. package/dist/composition/not-composable-seeds.js +2 -0
  587. package/dist/composition/not-composable-seeds.js.map +1 -1
  588. package/dist/composition/probe/backend-protocol.js.map +1 -1
  589. package/dist/composition/probe/candidate-store.js.map +1 -1
  590. package/dist/composition/probe/corpus.js.map +1 -1
  591. package/dist/composition/probe/dataset.js.map +1 -1
  592. package/dist/composition/probe/experiment-design.js.map +1 -1
  593. package/dist/composition/probe/expression-gaps.js.map +1 -1
  594. package/dist/composition/probe/falsify.d.ts +14 -3
  595. package/dist/composition/probe/falsify.d.ts.map +1 -1
  596. package/dist/composition/probe/falsify.js +14 -27
  597. package/dist/composition/probe/falsify.js.map +1 -1
  598. package/dist/composition/probe/fingerprint.js.map +1 -1
  599. package/dist/composition/probe/fit.d.ts +1 -1
  600. package/dist/composition/probe/fit.d.ts.map +1 -1
  601. package/dist/composition/probe/fit.js +2 -1
  602. package/dist/composition/probe/fit.js.map +1 -1
  603. package/dist/composition/probe/frontier.js.map +1 -1
  604. package/dist/composition/probe/generator.js.map +1 -1
  605. package/dist/composition/probe/index.d.ts +4 -2
  606. package/dist/composition/probe/index.d.ts.map +1 -1
  607. package/dist/composition/probe/index.js +4 -2
  608. package/dist/composition/probe/index.js.map +1 -1
  609. package/dist/composition/probe/limits.js.map +1 -1
  610. package/dist/composition/probe/metadata.js.map +1 -1
  611. package/dist/composition/probe/pipeline.d.ts +5 -0
  612. package/dist/composition/probe/pipeline.d.ts.map +1 -1
  613. package/dist/composition/probe/pipeline.js +13 -6
  614. package/dist/composition/probe/pipeline.js.map +1 -1
  615. package/dist/composition/probe/problem.d.ts +8 -0
  616. package/dist/composition/probe/problem.d.ts.map +1 -1
  617. package/dist/composition/probe/problem.js +78 -12
  618. package/dist/composition/probe/problem.js.map +1 -1
  619. package/dist/composition/probe/report.js.map +1 -1
  620. package/dist/composition/probe/residual.js.map +1 -1
  621. package/dist/composition/probe/run-manifest.js +2 -2
  622. package/dist/composition/probe/run-manifest.js.map +1 -1
  623. package/dist/composition/probe/scoring.d.ts +2 -1
  624. package/dist/composition/probe/scoring.d.ts.map +1 -1
  625. package/dist/composition/probe/scoring.js +21 -7
  626. package/dist/composition/probe/scoring.js.map +1 -1
  627. package/dist/composition/probe/search-budget.js.map +1 -1
  628. package/dist/composition/probe/serialize.js.map +1 -1
  629. package/dist/composition/probe/structure.js.map +1 -1
  630. package/dist/composition/probe/study.d.ts +4 -3
  631. package/dist/composition/probe/study.d.ts.map +1 -1
  632. package/dist/composition/probe/study.js +5 -3
  633. package/dist/composition/probe/study.js.map +1 -1
  634. package/dist/composition/probe/types.d.ts +3 -1
  635. package/dist/composition/probe/types.d.ts.map +1 -1
  636. package/dist/composition/probe/types.js +2 -0
  637. package/dist/composition/probe/types.js.map +1 -1
  638. package/dist/composition/proposed-bridges.d.ts +11 -4
  639. package/dist/composition/proposed-bridges.d.ts.map +1 -1
  640. package/dist/composition/proposed-bridges.js +14 -6
  641. package/dist/composition/proposed-bridges.js.map +1 -1
  642. package/dist/composition/quantities.d.ts +0 -4
  643. package/dist/composition/quantities.d.ts.map +1 -1
  644. package/dist/composition/quantities.js +5 -5
  645. package/dist/composition/quantities.js.map +1 -1
  646. package/dist/composition/quantity.d.ts +18 -2
  647. package/dist/composition/quantity.d.ts.map +1 -1
  648. package/dist/composition/quantity.js +35 -6
  649. package/dist/composition/quantity.js.map +1 -1
  650. package/dist/composition/representative-values.js.map +1 -1
  651. package/dist/composition/retrodiction.d.ts +18 -0
  652. package/dist/composition/retrodiction.d.ts.map +1 -1
  653. package/dist/composition/retrodiction.js +37 -7
  654. package/dist/composition/retrodiction.js.map +1 -1
  655. package/dist/composition/uncertainty.js.map +1 -1
  656. package/dist/composition/user-equation.d.ts +11 -7
  657. package/dist/composition/user-equation.d.ts.map +1 -1
  658. package/dist/composition/user-equation.js +24 -26
  659. package/dist/composition/user-equation.js.map +1 -1
  660. package/dist/core/axes-registry.d.ts +8 -5
  661. package/dist/core/axes-registry.d.ts.map +1 -1
  662. package/dist/core/axes-registry.js.map +1 -1
  663. package/dist/core/cell.js.map +1 -1
  664. package/dist/core/constants.d.ts +35 -12
  665. package/dist/core/constants.d.ts.map +1 -1
  666. package/dist/core/constants.js +46 -15
  667. package/dist/core/constants.js.map +1 -1
  668. package/dist/core/data-file.d.ts +27 -0
  669. package/dist/core/data-file.d.ts.map +1 -0
  670. package/dist/core/data-file.js +48 -0
  671. package/dist/core/data-file.js.map +1 -0
  672. package/dist/core/flux-rules.js +1 -1
  673. package/dist/core/flux-rules.js.map +1 -1
  674. package/dist/core/json-schema.d.ts +27 -0
  675. package/dist/core/json-schema.d.ts.map +1 -0
  676. package/dist/core/json-schema.js +177 -0
  677. package/dist/core/json-schema.js.map +1 -0
  678. package/dist/core/labeled-tensor.d.ts +6 -1
  679. package/dist/core/labeled-tensor.d.ts.map +1 -1
  680. package/dist/core/labeled-tensor.js +18 -8
  681. package/dist/core/labeled-tensor.js.map +1 -1
  682. package/dist/core/regime-registry.d.ts +6 -2
  683. package/dist/core/regime-registry.d.ts.map +1 -1
  684. package/dist/core/regime-registry.js.map +1 -1
  685. package/dist/core/regime-rule-install.js.map +1 -1
  686. package/dist/core/regimes-builtins.js.map +1 -1
  687. package/dist/core/tensor.d.ts +7 -4
  688. package/dist/core/tensor.d.ts.map +1 -1
  689. package/dist/core/tensor.js +40 -8
  690. package/dist/core/tensor.js.map +1 -1
  691. package/dist/core/types.d.ts +3 -2
  692. package/dist/core/types.d.ts.map +1 -1
  693. package/dist/core/types.js +16 -14
  694. package/dist/core/types.js.map +1 -1
  695. package/dist/core/universal-index.js.map +1 -1
  696. package/dist/diff/bridge-ast-gradient.d.ts +4 -5
  697. package/dist/diff/bridge-ast-gradient.d.ts.map +1 -1
  698. package/dist/diff/bridge-ast-gradient.js +16 -23
  699. package/dist/diff/bridge-ast-gradient.js.map +1 -1
  700. package/dist/diff/bridge-gradient.d.ts +24 -80
  701. package/dist/diff/bridge-gradient.d.ts.map +1 -1
  702. package/dist/diff/bridge-gradient.js +21 -98
  703. package/dist/diff/bridge-gradient.js.map +1 -1
  704. package/dist/diff/bridge-specs.d.ts +18 -6
  705. package/dist/diff/bridge-specs.d.ts.map +1 -1
  706. package/dist/diff/bridge-specs.js +17 -5
  707. package/dist/diff/bridge-specs.js.map +1 -1
  708. package/dist/dimensional/algebra.js.map +1 -1
  709. package/dist/dimensional/ast-builders.d.ts +5 -4
  710. package/dist/dimensional/ast-builders.d.ts.map +1 -1
  711. package/dist/dimensional/ast-builders.js +6 -5
  712. package/dist/dimensional/ast-builders.js.map +1 -1
  713. package/dist/dimensional/ast-types.js.map +1 -1
  714. package/dist/dimensional/bridge-check.d.ts.map +1 -1
  715. package/dist/dimensional/bridge-check.js +3 -5
  716. package/dist/dimensional/bridge-check.js.map +1 -1
  717. package/dist/dimensional/buckingham.js.map +1 -1
  718. package/dist/dimensional/connection-validators.d.ts +2 -1
  719. package/dist/dimensional/connection-validators.d.ts.map +1 -1
  720. package/dist/dimensional/connection-validators.js.map +1 -1
  721. package/dist/dimensional/connection.js.map +1 -1
  722. package/dist/dimensional/constant-rows.d.ts +54 -0
  723. package/dist/dimensional/constant-rows.d.ts.map +1 -0
  724. package/dist/dimensional/constant-rows.js +115 -0
  725. package/dist/dimensional/constant-rows.js.map +1 -0
  726. package/dist/dimensional/constants.d.ts +7 -17
  727. package/dist/dimensional/constants.d.ts.map +1 -1
  728. package/dist/dimensional/constants.js +12 -21
  729. package/dist/dimensional/constants.js.map +1 -1
  730. package/dist/dimensional/curvature-composite.js.map +1 -1
  731. package/dist/dimensional/curvature-invariants.js.map +1 -1
  732. package/dist/dimensional/curvature.js.map +1 -1
  733. package/dist/dimensional/dimension-inference.js.map +1 -1
  734. package/dist/dimensional/dimension-spec.d.ts +21 -6
  735. package/dist/dimensional/dimension-spec.d.ts.map +1 -1
  736. package/dist/dimensional/dimension-spec.js +150 -160
  737. package/dist/dimensional/dimension-spec.js.map +1 -1
  738. package/dist/dimensional/einstein-equation.js.map +1 -1
  739. package/dist/dimensional/errors.d.ts +3 -1
  740. package/dist/dimensional/errors.d.ts.map +1 -1
  741. package/dist/dimensional/errors.js +2 -2
  742. package/dist/dimensional/errors.js.map +1 -1
  743. package/dist/dimensional/exact-scale.d.ts +79 -0
  744. package/dist/dimensional/exact-scale.d.ts.map +1 -0
  745. package/dist/dimensional/exact-scale.js +222 -0
  746. package/dist/dimensional/exact-scale.js.map +1 -0
  747. package/dist/dimensional/field-equation-helpers.js.map +1 -1
  748. package/dist/dimensional/formula-names.d.ts +13 -12
  749. package/dist/dimensional/formula-names.d.ts.map +1 -1
  750. package/dist/dimensional/formula-names.js +28 -51
  751. package/dist/dimensional/formula-names.js.map +1 -1
  752. package/dist/dimensional/fresh-label.js.map +1 -1
  753. package/dist/dimensional/friedmann-equation.d.ts +3 -3
  754. package/dist/dimensional/friedmann-equation.js +3 -3
  755. package/dist/dimensional/friedmann-equation.js.map +1 -1
  756. package/dist/dimensional/gauge-field.d.ts +2 -3
  757. package/dist/dimensional/gauge-field.d.ts.map +1 -1
  758. package/dist/dimensional/gauge-field.js +0 -1
  759. package/dist/dimensional/gauge-field.js.map +1 -1
  760. package/dist/dimensional/hyphen-names.d.ts.map +1 -1
  761. package/dist/dimensional/hyphen-names.js +8 -0
  762. package/dist/dimensional/hyphen-names.js.map +1 -1
  763. package/dist/dimensional/killing-validators.js.map +1 -1
  764. package/dist/dimensional/klein-gordon-equation.js.map +1 -1
  765. package/dist/dimensional/metric-validators.d.ts +2 -1
  766. package/dist/dimensional/metric-validators.d.ts.map +1 -1
  767. package/dist/dimensional/metric-validators.js.map +1 -1
  768. package/dist/dimensional/metric.js.map +1 -1
  769. package/dist/dimensional/natural-units.js.map +1 -1
  770. package/dist/dimensional/quantity-registry.d.ts +23 -1
  771. package/dist/dimensional/quantity-registry.d.ts.map +1 -1
  772. package/dist/dimensional/quantity-registry.js +55 -18
  773. package/dist/dimensional/quantity-registry.js.map +1 -1
  774. package/dist/dimensional/rg-flow.js.map +1 -1
  775. package/dist/dimensional/stress-energy-validators.js.map +1 -1
  776. package/dist/dimensional/symbolic-constants.d.ts +63 -19
  777. package/dist/dimensional/symbolic-constants.d.ts.map +1 -1
  778. package/dist/dimensional/symbolic-constants.js +114 -92
  779. package/dist/dimensional/symbolic-constants.js.map +1 -1
  780. package/dist/dimensional/tensor-trace.js.map +1 -1
  781. package/dist/dimensional/tensor.js.map +1 -1
  782. package/dist/dimensional/types.js.map +1 -1
  783. package/dist/dimensional/unit-convention.d.ts +0 -2
  784. package/dist/dimensional/unit-convention.d.ts.map +1 -1
  785. package/dist/dimensional/unit-convention.js +2 -2
  786. package/dist/dimensional/unit-convention.js.map +1 -1
  787. package/dist/dimensional/unit-data.d.ts +70 -0
  788. package/dist/dimensional/unit-data.d.ts.map +1 -0
  789. package/dist/dimensional/unit-data.js +139 -0
  790. package/dist/dimensional/unit-data.js.map +1 -0
  791. package/dist/dimensional/units.d.ts +87 -24
  792. package/dist/dimensional/units.d.ts.map +1 -1
  793. package/dist/dimensional/units.js +290 -295
  794. package/dist/dimensional/units.js.map +1 -1
  795. package/dist/dimensional/validator-registry.js.map +1 -1
  796. package/dist/dimensional/validator.d.ts +0 -16
  797. package/dist/dimensional/validator.d.ts.map +1 -1
  798. package/dist/dimensional/validator.js +65 -29
  799. package/dist/dimensional/validator.js.map +1 -1
  800. package/dist/dimensional/weyl-validators.js.map +1 -1
  801. package/dist/index.d.ts +65 -18
  802. package/dist/index.d.ts.map +1 -1
  803. package/dist/index.js +19 -24
  804. package/dist/index.js.map +1 -1
  805. package/dist/numerical/bianchi-residual.js.map +1 -1
  806. package/dist/numerical/binding-value.d.ts +32 -7
  807. package/dist/numerical/binding-value.d.ts.map +1 -1
  808. package/dist/numerical/binding-value.js +218 -209
  809. package/dist/numerical/binding-value.js.map +1 -1
  810. package/dist/numerical/christoffel-flat.js.map +1 -1
  811. package/dist/numerical/connection-lowering-helpers.js.map +1 -1
  812. package/dist/numerical/covariant-eikonal.d.ts.map +1 -1
  813. package/dist/numerical/covariant-eikonal.js +2 -2
  814. package/dist/numerical/covariant-eikonal.js.map +1 -1
  815. package/dist/numerical/curvature-lowering-helpers.d.ts +20 -0
  816. package/dist/numerical/curvature-lowering-helpers.d.ts.map +1 -1
  817. package/dist/numerical/curvature-lowering-helpers.js +6 -3
  818. package/dist/numerical/curvature-lowering-helpers.js.map +1 -1
  819. package/dist/numerical/derivative-lowering.js.map +1 -1
  820. package/dist/numerical/einstein-equation.js.map +1 -1
  821. package/dist/numerical/engine-registry.js.map +1 -1
  822. package/dist/numerical/errors.d.ts +7 -3
  823. package/dist/numerical/errors.d.ts.map +1 -1
  824. package/dist/numerical/errors.js +5 -5
  825. package/dist/numerical/errors.js.map +1 -1
  826. package/dist/numerical/evaluator-uncertainty.d.ts +34 -0
  827. package/dist/numerical/evaluator-uncertainty.d.ts.map +1 -0
  828. package/dist/numerical/evaluator-uncertainty.js +134 -0
  829. package/dist/numerical/evaluator-uncertainty.js.map +1 -0
  830. package/dist/numerical/formula-contract.d.ts +67 -7
  831. package/dist/numerical/formula-contract.d.ts.map +1 -1
  832. package/dist/numerical/formula-contract.js +68 -42
  833. package/dist/numerical/formula-contract.js.map +1 -1
  834. package/dist/numerical/formula-dimension.d.ts +17 -7
  835. package/dist/numerical/formula-dimension.d.ts.map +1 -1
  836. package/dist/numerical/formula-dimension.js +120 -44
  837. package/dist/numerical/formula-dimension.js.map +1 -1
  838. package/dist/numerical/formula-mathts.d.ts.map +1 -1
  839. package/dist/numerical/formula-mathts.js +10 -3
  840. package/dist/numerical/formula-mathts.js.map +1 -1
  841. package/dist/numerical/formula-registry.d.ts +13 -3
  842. package/dist/numerical/formula-registry.d.ts.map +1 -1
  843. package/dist/numerical/formula-registry.js +7 -2
  844. package/dist/numerical/formula-registry.js.map +1 -1
  845. package/dist/numerical/geodesic-integrator.js.map +1 -1
  846. package/dist/numerical/geometrized.js.map +1 -1
  847. package/dist/numerical/gl4-integrator.d.ts +28 -27
  848. package/dist/numerical/gl4-integrator.d.ts.map +1 -1
  849. package/dist/numerical/gl4-integrator.js +44 -45
  850. package/dist/numerical/gl4-integrator.js.map +1 -1
  851. package/dist/numerical/grid-field.js.map +1 -1
  852. package/dist/numerical/index.js.map +1 -1
  853. package/dist/numerical/input-validation.d.ts +3 -6
  854. package/dist/numerical/input-validation.d.ts.map +1 -1
  855. package/dist/numerical/input-validation.js +4 -8
  856. package/dist/numerical/input-validation.js.map +1 -1
  857. package/dist/numerical/killing.d.ts +8 -5
  858. package/dist/numerical/killing.d.ts.map +1 -1
  859. package/dist/numerical/killing.js.map +1 -1
  860. package/dist/numerical/klein-gordon.js.map +1 -1
  861. package/dist/numerical/kretschmann.js.map +1 -1
  862. package/dist/numerical/lowering-utils.js.map +1 -1
  863. package/dist/numerical/lowering.d.ts.map +1 -1
  864. package/dist/numerical/lowering.js +7 -17
  865. package/dist/numerical/lowering.js.map +1 -1
  866. package/dist/numerical/mathts-engine.d.ts.map +1 -1
  867. package/dist/numerical/mathts-engine.js +11 -6
  868. package/dist/numerical/mathts-engine.js.map +1 -1
  869. package/dist/numerical/metric-inverse.js.map +1 -1
  870. package/dist/numerical/null-ic.js.map +1 -1
  871. package/dist/numerical/null-ray-integrator.js +4 -4
  872. package/dist/numerical/null-ray-integrator.js.map +1 -1
  873. package/dist/numerical/painleve-gullstrand-metric.js.map +1 -1
  874. package/dist/numerical/pderiv.d.ts.map +1 -1
  875. package/dist/numerical/pderiv.js +9 -2
  876. package/dist/numerical/pderiv.js.map +1 -1
  877. package/dist/numerical/perihelion-finder.js.map +1 -1
  878. package/dist/numerical/quadrature.d.ts +5 -2
  879. package/dist/numerical/quadrature.d.ts.map +1 -1
  880. package/dist/numerical/quadrature.js +20 -3
  881. package/dist/numerical/quadrature.js.map +1 -1
  882. package/dist/numerical/spacetime-metrics.d.ts +17 -19
  883. package/dist/numerical/spacetime-metrics.d.ts.map +1 -1
  884. package/dist/numerical/spacetime-metrics.js +158 -250
  885. package/dist/numerical/spacetime-metrics.js.map +1 -1
  886. package/dist/numerical/strides.js.map +1 -1
  887. package/dist/numerical/tensor-engine.d.ts +9 -5
  888. package/dist/numerical/tensor-engine.d.ts.map +1 -1
  889. package/dist/numerical/tensor-engine.js.map +1 -1
  890. package/dist/numerical/types.js.map +1 -1
  891. package/dist/numerical/weyl-lowering.js.map +1 -1
  892. package/dist/relations/category.js.map +1 -1
  893. package/dist/relations/composition-table.d.ts +4 -4
  894. package/dist/relations/composition-table.js +4 -4
  895. package/dist/relations/composition-table.js.map +1 -1
  896. package/dist/relations/conventions.js.map +1 -1
  897. package/dist/relations/domain-regimes.js.map +1 -1
  898. package/dist/relations/regime-registration.js.map +1 -1
  899. package/dist/relations/regime-vocabularies.js.map +1 -1
  900. package/dist/relations/regime.d.ts +18 -8
  901. package/dist/relations/regime.d.ts.map +1 -1
  902. package/dist/relations/regime.js +26 -14
  903. package/dist/relations/regime.js.map +1 -1
  904. package/dist/relations/types.d.ts +26 -6
  905. package/dist/relations/types.d.ts.map +1 -1
  906. package/dist/relations/types.js +15 -3
  907. package/dist/relations/types.js.map +1 -1
  908. package/package.json +10 -14
  909. package/dist/bridges/registry.d.ts +0 -60
  910. package/dist/bridges/registry.d.ts.map +0 -1
  911. package/dist/bridges/registry.js +0 -87
  912. package/dist/bridges/registry.js.map +0 -1
  913. package/dist/cli/poster-source.d.ts +0 -154
  914. package/dist/cli/poster-source.d.ts.map +0 -1
  915. package/dist/cli/poster-source.js +0 -184
  916. package/dist/cli/poster-source.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"bridge-check.js","sourceRoot":"","sources":["../../src/dimensional/bridge-check.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAM1C,SAAS,YAAY;IACnB,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,gCAAgC,CAAC,CAAC;IAC7F,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAyB,CAAC;IAC9E,MAAM,GAAG,GAAG,IAAI,GAAG,EAAqB,CAAC;IACzC,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACnC,IAAI,KAAK,CAAC,SAAS,KAAK,SAAS;YAAE,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IACxE,CAAC;IACD,OAAO,GAAG,CA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AAM,4BAA4B,GAAmC,YAAY,EAAE,CAAC;AAE3F;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CACrC,QAAgB,EAChB,IAAc;IAEd,MAAM,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IACzB,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,iBAAiB,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACvD,MAAM,QAAQ,GAAG,4BAA4B,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC5D,IAAI,QAAQ,KAAK,SAAS,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAiB,EAAE,QAAQ,CAAC,EAAE,CAAC;QACrE,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,CAAC,CAAC,iBAAiB,CAAC;AAC7B,CAAC","sourcesContent":["/**\n * Expected catalog dimensions, projected from the catalog record.\n * A mismatch between a parsed expression and that record returns null.\n *\n * @module dimensional/bridge-check\n */\n\nimport { checkedDataFile } from '../core/data-file.js';\nimport type { Dimension } from './types.js';\nimport { equals } from './algebra.js';\nimport type { ExprNode } from './validator.js';\nimport { validate } from './validator.js';\n\ninterface CatalogDimensionFile {\n readonly entries: readonly { readonly id: number; readonly dimension?: Dimension }[];\n}\n\nfunction loadExpected(): ReadonlyMap<number, Dimension> {\n // The same checked read as `bridges/catalog-load.ts`; this layer cannot import that module.\n const parsed = checkedDataFile('bridge-catalog.json') as CatalogDimensionFile;\n const map = new Map<number, Dimension>();\n for (const entry of parsed.entries) {\n if (entry.dimension !== undefined) map.set(entry.id, entry.dimension);\n }\n return map;\n}\n\n/** Catalog id → dimension recorded on that row. */\nexport const EXPECTED_DIMENSION_BY_BRIDGE: ReadonlyMap<number, Dimension> = loadExpected();\n\n/**\n * Infer the SI dimension of a bridge expression and cross-check it against\n * the catalog record when that record declares one.\n *\n * @returns The inferred dimension, or `null` when the expression is\n * dimensionally inconsistent or disagrees with the catalog record.\n */\nexport function inferDimensionForBridge(\n bridgeId: number,\n expr: ExprNode,\n): Dimension | null {\n const r = validate(expr);\n if (!r.ok || r.inferredDimension === null) return null;\n const expected = EXPECTED_DIMENSION_BY_BRIDGE.get(bridgeId);\n if (expected !== undefined && !equals(r.inferredDimension, expected)) {\n return null;\n }\n return r.inferredDimension;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"buckingham.js","sourceRoot":"","sources":["../../src/dimensional/buckingham.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAGpE,MAAM,KAAK,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,CAAU,CAAC;AAkE/D;cACc;AACd,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAC7C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAYD,SAAS,GAAG,CAAC,CAAS,EAAE,CAAS;IAC/B,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAChB,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAChB,OAAO,CAAC,EAAE,CAAC;QACT,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACtB,CAAC;IACD,OAAO,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC;AAED,SAAS,IAAI,CAAC,CAAS,EAAE,CAAS;IAChC,IAAI,CAAC,KAAK,CAAC;QAAE,MAAM,IAAI,oBAAoB,CAAC,kBAAkB,CAAC,CAAC;IAChE,IAAI,CAAC,GAAG,CAAC,EAAE,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AAS,CAAC;IACnD,CAAC;IAED,OAAO;QACL,MAAM,EAAE,MAAM,CAAC,IAAI;QACnB,SAAS,EAAE,cAAc;QACzB,UAAU,EAAE,IAAI;QAChB,QAAQ;QACR,yBAAyB,EAAE,IAAI;QAC/B,oBAAoB,EAAE,KAAK;QAC3B,MAAM,EACJ,4EAA4E;KAC/E,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Buckingham-π enumerator (build target 1 of\n * docs/planning/Bridge-Inference-Epistemics-Note.md — the principled\n * primitive for the classifier's EXACTLY-DETERMINED case).\n *\n * Given a set of dimensional variables presumed to obey one\n * dimensionally-homogeneous relation, the Buckingham-π theorem says that\n * relation re-expresses as F(π₁,…,π_{n−r}) = 0, where each πᵢ is a\n * dimensionless power-product of the variables and there are exactly\n * n − r of them (n = variables, r = rank of the dimension matrix). The\n * π-groups are a basis of the NULL SPACE of the dimension matrix.\n *\n * THE HONEST BOUNDARY (enforced by the result types — there is no value\n * or constant field anywhere): this returns the FORM only. It yields the\n * π-groups and, for a target, the monomial that determines it UP TO A\n * DIMENSIONLESS CONSTANT (the 2π, the ½, α). It does NOT and cannot\n * supply that constant, nor the function F. That boundary is exactly what\n * separates dimensional analysis from numerology — see the epistemics\n * note.\n *\n * Computation is EXACT (rational arithmetic), not floating Gaussian\n * elimination: physics dimension exponents are small rationals, and the\n * null-space basis must be exact to be trustworthy.\n *\n * @module dimensional/buckingham\n */\n\nimport { Fraction } from '@danielsimonjr/mathts-core';\nimport { rationalNullspace } from '@danielsimonjr/mathts-functions';\nimport type { Dimension } from './types.js';\n\nconst BASES = ['L', 'M', 'T', 'I', 'Theta', 'N', 'J'] as const;\n\n/** A named physical quantity with a dimension — the enumerator's input.\n * Structurally satisfied by a composition `Quantity`. @public */\nexport interface DimensionalVariable {\n readonly name: string;\n readonly dim: Dimension;\n}\n\n/** A dimensionless power-product of the input variables (integer\n * exponents; the conventional form). No value — π-groups carry FORM,\n * not magnitude. @public */\nexport interface PiGroup {\n /** Integer exponent of each variable in this dimensionless product. */\n readonly exponents: Readonly<Record<string, number>>;\n /** Display form, e.g. `period^2 · gravity · length^-1`. */\n readonly formula: string;\n}\n\n/** The dimensional closure of a variable set. @public */\nexport type BuckinghamVerdict =\n | 'dimensionally-independent' // 0 π-groups: no dimensionless product exists\n | 'single-invariant' // 1 π-group: one dimensionless invariant\n | 'multiple-invariants'; // ≥2 π-groups: a family F(π₁,…)\n\n/** Result of {@link buckinghamPi}. @public */\nexport interface BuckinghamResult {\n readonly variables: readonly string[];\n /** Base SI dimensions actually spanned by the inputs. */\n readonly baseDimensions: readonly string[];\n /** n — the number of variables. */\n readonly variableCount: number;\n /** r — the rank of the dimension matrix. */\n readonly rank: number;\n /** n − r — the number of independent dimensionless groups. */\n readonly piGroupCount: number;\n readonly piGroups: readonly PiGroup[];\n readonly verdict: BuckinghamVerdict;\n}\n\n/** Result of {@link dimensionallyDetermines}. @public */\nexport interface DimensionalDeterminationResult {\n readonly target: string;\n readonly governing: readonly string[];\n /** True iff the target is fixed by the governing variables UP TO A\n * DIMENSIONLESS CONSTANT (unique monomial). */\n readonly determined: boolean;\n /**\n * When determined: target = const · Π(governingⱼ ^ monomial[j]). The\n * exponents may be rational (e.g. 0.5 for a √ law). Always read with\n * `upToDimensionlessConstant` — the leading constant is NOT supplied.\n */\n readonly monomial?: Readonly<Record<string, number>>;\n /** Always true when `monomial` is present — a standing reminder. */\n readonly upToDimensionlessConstant?: true;\n /**\n * True only when the target's dimension is not in the span of the governing\n * variables, so a monomial needs dimensionful constants the inputs do not\n * name. False when the governing variables are dimensionally dependent or\n * leave more than one π-group: that failure is not a missing constant.\n */\n readonly outsideGoverningSpan: boolean;\n /** Plain-language reason for the verdict. */\n readonly reason: string;\n}\n\n/** Rationalization failed: a dimension exponent is not a small rational.\n * @public */\nexport class RationalizationError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'RationalizationError';\n }\n}\n\n// ---------------------------------------------------------------------------\n// Exact rational arithmetic (number-backed; dimension exponents are small\n// rationals, so reduced fractions never overflow in practice).\n// ---------------------------------------------------------------------------\n\ninterface Frac {\n readonly n: number;\n readonly d: number;\n}\n\nfunction gcd(a: number, b: number): number {\n a = Math.abs(a);\n b = Math.abs(b);\n while (b) {\n [a, b] = [b, a % b];\n }\n return a || 1;\n}\n\nfunction frac(n: number, d: number): Frac {\n if (d === 0) throw new RationalizationError('zero denominator');\n if (d < 0) {\n n = -n;\n d = -d;\n }\n const g = gcd(n, d);\n return { n: n / g, d: d / g };\n}\n\nconst MAX_DEN = 720;\n\n/** Convert a (possibly rational) exponent to an exact fraction by scanning\n * small denominators; throws if none matches within tolerance. */\nfunction toFrac(x: number): Frac {\n if (Number.isInteger(x)) return { n: x, d: 1 };\n for (let d = 2; d <= MAX_DEN; d++) {\n const n = x * d;\n if (Math.abs(n - Math.round(n)) < 1e-9 * Math.max(1, Math.abs(n))) {\n return frac(Math.round(n), d);\n }\n }\n throw new RationalizationError(\n `dimension exponent ${x} is not a rational with denominator ≤ ${MAX_DEN}`,\n );\n}\n\nconst fZero = (a: Frac): boolean => a.n === 0;\n\n/**\n * Exact null space of the dimension matrix. Exponents pass through as\n * {@link Fraction} values after {@link toFrac}, so an irrational is still\n * {@link RationalizationError} and is not accepted by a continued fraction.\n * A matrix with no rows is `0×n`: `{ columns: n }` is the standard basis.\n * MathTS integerizes each vector (content 1, first nonzero entry positive).\n */\nfunction nullSpace(matrix: Frac[][], cols: number): { basis: number[][]; rank: number } {\n const entries = matrix.map((row) => row.map((f) => new Fraction(f.n, f.d)));\n const solved = rationalNullspace(entries, { columns: cols });\n const basis = solved.basis.map((vec) =>\n vec.map((entry) => {\n if (entry.denominator !== 1n) {\n throw new RationalizationError(\n `null-space entry ${entry.toString()} is not an integer`,\n );\n }\n return Number(entry.numerator);\n }),\n );\n return { basis, rank: solved.rank };\n}\n\nfunction buildMatrix(variables: readonly DimensionalVariable[]): {\n matrix: Frac[][];\n spannedBases: string[];\n} {\n const spannedBases: string[] = [];\n const matrix: Frac[][] = [];\n for (const base of BASES) {\n const row = variables.map((v) => toFrac(v.dim[base]));\n if (row.some((f) => !fZero(f))) {\n spannedBases.push(base);\n matrix.push(row);\n }\n }\n return { matrix, spannedBases };\n}\n\nfunction formatPiGroup(\n exponents: Record<string, number>,\n order: readonly string[],\n): string {\n const parts: string[] = [];\n for (const name of order) {\n const e = exponents[name];\n if (e === 0) continue;\n parts.push(e === 1 ? name : `${name}^${e}`);\n }\n return parts.join(' · ') || '1';\n}\n\n/**\n * Enumerate the Buckingham-π groups of a dimensional variable set. Returns\n * the rank, the count n − r, and a null-space basis of dimensionless\n * groups. FORM only — no constants (see module docs).\n *\n * @public\n */\nexport function buckinghamPi(\n variables: readonly DimensionalVariable[],\n): BuckinghamResult {\n if (variables.length === 0) {\n throw new RationalizationError('buckinghamPi requires at least one variable');\n }\n const names = variables.map((v) => v.name);\n if (new Set(names).size !== names.length) {\n throw new RationalizationError(\n `buckinghamPi requires unique variable names; got [${names.join(', ')}]`,\n );\n }\n\n const n = variables.length;\n const { matrix, spannedBases } = buildMatrix(variables);\n\n const { basis, rank } = nullSpace(matrix, n);\n const piGroups: PiGroup[] = basis.map((vec) => {\n const exponents: Record<string, number> = {};\n for (let j = 0; j < n; j++) exponents[names[j]] = vec[j];\n return { exponents, formula: formatPiGroup(exponents, names) };\n });\n\n const piGroupCount = n - rank;\n const verdict: BuckinghamVerdict =\n piGroupCount === 0\n ? 'dimensionally-independent'\n : piGroupCount === 1\n ? 'single-invariant'\n : 'multiple-invariants';\n\n return {\n variables: names,\n baseDimensions: spannedBases,\n variableCount: n,\n rank,\n piGroupCount,\n piGroups,\n verdict,\n };\n}\n\n/**\n * Does the governing set fix the target UP TO A DIMENSIONLESS CONSTANT?\n *\n * True iff the governing variables are dimensionally independent and the\n * target's dimension lies in their span — equivalently, the full set has\n * exactly one π-group and the governing set has none. When determined,\n * returns the (possibly rational) monomial exponents such that\n * target = const · Π(governingⱼ ^ monomial[j]). The constant is NOT\n * supplied — dimensional analysis cannot.\n *\n * @public\n */\nexport function dimensionallyDetermines(\n target: DimensionalVariable,\n governing: readonly DimensionalVariable[],\n): DimensionalDeterminationResult {\n const governingNames = governing.map((v) => v.name);\n\n const governingPi = buckinghamPi(\n governing.length > 0 ? governing : [target],\n );\n // A redundancy among the governing variables means the monomial is not\n // unique (any dimensionless governing combo can be folded into the\n // constant) → not determined.\n if (governing.length > 0 && governingPi.piGroupCount > 0) {\n return {\n target: target.name,\n governing: governingNames,\n determined: false,\n outsideGoverningSpan: false,\n reason:\n 'governing variables are dimensionally dependent ' +\n `(${governingPi.piGroupCount} dimensionless combination(s) among them); ` +\n 'the determining monomial is not unique',\n };\n }\n\n const full = buckinghamPi([target, ...governing]);\n if (full.piGroupCount !== 1) {\n return {\n target: target.name,\n governing: governingNames,\n determined: false,\n outsideGoverningSpan: full.piGroupCount === 0,\n reason:\n full.piGroupCount === 0\n ? \"the target's dimension is not in the span of the governing \" +\n 'variables — no dimensionless group exists, so no monomial determines it'\n : `${full.piGroupCount} independent π-groups — the target is fixed ` +\n 'only as a function of several dimensionless ratios (under-constrained)',\n };\n }\n\n // The single π-group involves the target; solve it for the target.\n const group = full.piGroups[0].exponents;\n const targetExp = group[target.name];\n if (!targetExp) {\n return {\n target: target.name,\n governing: governingNames,\n determined: false,\n outsideGoverningSpan: false,\n reason:\n 'the sole dimensionless group does not involve the target ' +\n '(the target is dimensionally redundant with the governing set)',\n };\n }\n const monomial: Record<string, number> = {};\n for (const name of governingNames) {\n monomial[name] = -(group[name] ?? 0) / targetExp;\n }\n\n return {\n target: target.name,\n governing: governingNames,\n determined: true,\n monomial,\n upToDimensionlessConstant: true,\n outsideGoverningSpan: false,\n reason:\n 'unique dimensionless group fixes the target up to a dimensionless constant',\n };\n}\n"]}
@@ -11,6 +11,7 @@
11
11
  * @module dimensional/connection-validators
12
12
  */
13
13
  import type { Dimension } from './types.js';
14
+ import type { ExprNode } from './ast-types.js';
14
15
  import type { Role, CovariantDerivativeNode, RiemannTensorNode } from './ast-types.js';
15
16
  import type { PartialDerivativeChildResult } from './metric-validators.js';
16
17
  export type { UpperIndex, CovariantDerivativeNode, RiemannTensorNode } from './ast-types.js';
@@ -37,7 +38,7 @@ interface CovariantDerivativeValidationResult {
37
38
  * output freeIndices is just `of.freeIndices ∪ {wrtIndex.label: lower}`
38
39
  * (same structural rule as tensor-partial-derivative).
39
40
  */
40
- export declare function validateCovariantDerivative(node: CovariantDerivativeNode, validateChild: (child: unknown) => PartialDerivativeChildResult): CovariantDerivativeValidationResult;
41
+ export declare function validateCovariantDerivative(node: CovariantDerivativeNode, validateChild: (child: ExprNode) => PartialDerivativeChildResult): CovariantDerivativeValidationResult;
41
42
  /**
42
43
  * v0.5.0 (Task 1c-i): Riemann curvature tensor AST node R^ρ_{σμν}.
43
44
  *
@@ -1 +1 @@
1
- {"version":3,"file":"connection-validators.d.ts","sourceRoot":"","sources":["../../src/dimensional/connection-validators.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EACV,IAAI,EAKJ,uBAAuB,EACvB,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAC;AAU3E,YAAY,EAAE,UAAU,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAG7F,UAAU,mCAAmC;IAC3C,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC;IACxB,QAAQ,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpE,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC;CACtB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,uBAAuB,EAC7B,aAAa,EA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,CAAC,CAAC;QACnE,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAClB,CAAC;IAED,MAAM,WAAW,GAAG,IAAI,GAAG,EAA4C,CAAC;IACxE,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;IAC/D,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;QACpC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;IACrD,CAAC;IAED,yEAAyE;IACzE,0EAA0E;IAC1E,2EAA2E;IAC3E,MAAM,GAAG,GAAc,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;IAEzE,sEAAsE;IACtE,sEAAsE;IACtE,gEAAgE;IAChE,oCAAoC;IACpC,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,CAAC;AAC9B,CAAC","sourcesContent":["/**\n * Per-kind validation for v0.4.0 connection-layer AST nodes.\n *\n * Mirrors the pattern of `metric-validators.ts`: each validator is a pure\n * function returning a local `{dim, freeIndices, role?}` carrier that\n * validator.ts merges into its InferContext accumulator.\n *\n * Per v0.4.0-Design.md §4 + §7 (docs/specification/Part-IX-Connection-Layer.md\n * — pending).\n *\n * @module dimensional/connection-validators\n */\n\nimport type { Dimension } from './types.js';\nimport type { ExprNode } from './ast-types.js';\nimport type {\n Role,\n TensorSymbolNode,\n MetricTensorNode,\n CovariantIndex,\n UpperIndex,\n CovariantDerivativeNode,\n RiemannTensorNode,\n} from './ast-types.js';\nimport { divide } from './algebra.js';\nimport type { PartialDerivativeChildResult } from './metric-validators.js';\nimport {\n PartialDerivativeIndexVarianceError,\n MetricSignatureError,\n DuplicateCoordinateWarning,\n IndexLabelCollisionError,\n} from './errors.js';\n\n// Node/index types now live in the leaf `ast-types.ts`; re-exported so existing\n// importers of `… from './connection-validators.js'` are unchanged.\nexport type { UpperIndex, CovariantDerivativeNode, RiemannTensorNode } from './ast-types.js';\n\n// v0.6.1: dropped export — internal-only validation-result shape.\ninterface CovariantDerivativeValidationResult {\n readonly dim: Dimension;\n readonly freeIndices: Map<string, { upper: number; lower: number }>;\n readonly role?: Role;\n}\n\n/**\n * Validate a covariant-derivative node. Pure-function module-cycle-free\n * pattern (matches validatePartialDerivative). Recursion via the\n * `validateChild` callback supplied by the caller (validator.ts's\n * `infer()` dispatch).\n *\n * Throws:\n * - PartialDerivativeIndexVarianceError if wrtIndex.variance !== 'lower'\n * - MetricSignatureError if gLower is not both-lower or gInverse is not both-upper\n *\n * Note: the gLower / gInverse free indices are CONSUMED INTERNALLY by the\n * Christoffel formula's contractions and do NOT propagate upward. The\n * output freeIndices is just `of.freeIndices ∪ {wrtIndex.label: lower}`\n * (same structural rule as tensor-partial-derivative).\n */\nexport function validateCovariantDerivative(\n node: CovariantDerivativeNode,\n validateChild: (child: ExprNode) => PartialDerivativeChildResult,\n): CovariantDerivativeValidationResult {\n if (node.wrtIndex.variance !== 'lower') {\n throw new PartialDerivativeIndexVarianceError(node.wrtIndex.label);\n }\n if (\n node.gLower.indices[0].variance !== 'lower' ||\n node.gLower.indices[1].variance !== 'lower'\n ) {\n throw new MetricSignatureError(\n node.gLower.name,\n `covariant-derivative requires gLower to be both-lower (got ` +\n `[${node.gLower.indices[0].variance}, ${node.gLower.indices[1].variance}])`,\n );\n }\n if (\n node.gInverse.indices[0].variance !== 'upper' ||\n node.gInverse.indices[1].variance !== 'upper'\n ) {\n throw new MetricSignatureError(\n node.gInverse.name,\n `covariant-derivative requires gInverse to be both-upper (got ` +\n `[${node.gInverse.indices[0].variance}, ${node.gInverse.indices[1].variance}])`,\n );\n }\n\n const ofResult = validateChild(node.of);\n const wrtResult = validateChild(node.wrt);\n\n // gLower and gInverse are NOT validated via validateChild — their dims are\n // structurally fixed (known from the signature checks above at lines 71-88),\n // and any malformed metric would have already thrown there. Their free\n // indices are deliberately discarded: the Christoffel contractions inside\n // ∇_μ consume them internally.\n\n // Per §VIII.4 (pderiv-label-collision-rejected analog):\n // wrtIndex.label must not collide with of.freeIndices.\n //\n // I1 HYBRID DECISION: throw by default (soundness > friendliness);\n // env var UPT_ALLOW_COORD_SHADOW=1 downgrades to process.emitWarning.\n // Task 13 covers BOTH paths (default throws; env=1 warns).\n if (ofResult.freeIndices.has(node.wrtIndex.label)) {\n const conflict = node.wrtIndex.label;\n if (typeof process !== 'undefined' && process.env?.UPT_ALLOW_COORD_SHADOW === '1') {\n process.emitWarning(new DuplicateCoordinateWarning(conflict, conflict));\n } else {\n throw new MetricSignatureError(\n `covariant-derivative`,\n `wrt='${conflict}' shadows an existing free index '${conflict}'. ` +\n `Rename the operand's free index or set UPT_ALLOW_COORD_SHADOW=1 to ` +\n `downgrade to a warning.`,\n );\n }\n }\n\n // Output freeIndices = of.freeIndices ∪ {wrtIndex.label: lower}.\n const freeIndices = new Map<string, { upper: number; lower: number }>();\n for (const [label, counts] of ofResult.freeIndices) freeIndices.set(label, counts);\n freeIndices.set(node.wrtIndex.label, { upper: 0, lower: 1 });\n\n // Output dim = divide(of.dim, wrt.dim) — same as pderiv.\n const dim = divide(ofResult.dim, wrtResult.dim);\n\n // Role passthrough: propagate of.role only when the child has one; omit\n // otherwise. Mirrors the `role?: Role` optional declaration on\n // CovariantDerivativeValidationResult — don't force a 'field' default when\n // the child has no role (e.g. a plain scalar operand).\n return ofResult.role !== undefined\n ? { dim, freeIndices, role: ofResult.role }\n : { dim, freeIndices };\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// v0.5.0 Task 5: RiemannTensorNode\n// ─────────────────────────────────────────────────────────────────────────────\n\n/**\n * v0.5.0 (Task 1c-i): Riemann curvature tensor AST node R^ρ_{σμν}.\n *\n * Index convention per Carroll Ch. 3 §3.4 (Adam+Eve F4/S3):\n * R^ρ_σμν = ∂_μ Γ^ρ_σν − ∂_ν Γ^ρ_σμ + Γ^ρ_λμ Γ^λ_σν − Γ^ρ_λν Γ^λ_σμ\n * (σ in SECOND lower slot of each Γ.)\n *\n * Dimension F8/I3: Riemann is 1/L² (inverse length squared), NOT\n * dimensionless. Carroll Ch. 3 §3.4: R^ρ_σμν has units of (∂Γ) where\n * Γ ~ 1/L and ∂ ~ 1/L → R ~ 1/L².\n *\n * H1 (v0.4.0 pattern): gLower, gInverse, xCoord sub-nodes are present for\n * downstream consumers (numerical lowering at Task 6), but their free\n * indices are NOT propagated — the Riemann formula's contractions consume\n * them internally. Same rule as CovariantDerivativeNode.\n */\n// v0.6.1: dropped export — internal-only validation-result shape.\ninterface RiemannTensorValidationResult {\n readonly dim: Dimension;\n readonly freeIndices: Map<string, { upper: number; lower: number }>;\n}\n\n/**\n * Validate a riemann-tensor node.\n *\n * Throws:\n * - PartialDerivativeIndexVarianceError if upperIndex.variance !== 'upper'\n * or any lowerIndices[i].variance !== 'lower'\n * - MetricSignatureError if gLower / gInverse signature is wrong (reuses\n * CovariantDerivativeNode's structural checks)\n * - IndexLabelCollisionError if the 4 free-index labels {ρ, σ, μ, ν} are\n * not pairwise distinct (M9: disjointness only on the riemann node's\n * own free labels; raise/lower aliasing in surrounding algebra remains\n * legal — we do NOT compare against gLower/gInverse/xCoord labels).\n *\n * H1 (v0.4.0 pattern): gLower/gInverse/xCoord are NOT validated via the\n * validateChild callback, so their free indices do not propagate. They are\n * signature-checked here for early structural error reporting; their\n * numerical contents are consumed by Task 6's lowering helper.\n */\nexport function validateRiemannTensor(\n node: RiemannTensorNode,\n): RiemannTensorValidationResult {\n if (node.upperIndex.variance !== 'upper') {\n throw new PartialDerivativeIndexVarianceError(\n `riemann-tensor: upperIndex '${node.upperIndex.label}' must be 'upper', ` +\n `got '${(node.upperIndex as { variance: string }).variance}'`,\n );\n }\n for (let i = 0; i < 3; i++) {\n const idx = node.lowerIndices[i] as { label: string; variance: string };\n if (idx.variance !== 'lower') {\n throw new PartialDerivativeIndexVarianceError(\n `riemann-tensor: lowerIndices[${i}] '${idx.label}' must be 'lower', ` +\n `got '${idx.variance}'`,\n );\n }\n }\n if (\n node.gLower.indices[0].variance !== 'lower' ||\n node.gLower.indices[1].variance !== 'lower'\n ) {\n throw new MetricSignatureError(\n node.gLower.name,\n `riemann-tensor requires gLower to be both-lower (got ` +\n `[${node.gLower.indices[0].variance}, ${node.gLower.indices[1].variance}])`,\n );\n }\n if (\n node.gInverse.indices[0].variance !== 'upper' ||\n node.gInverse.indices[1].variance !== 'upper'\n ) {\n throw new MetricSignatureError(\n node.gInverse.name,\n `riemann-tensor requires gInverse to be both-upper (got ` +\n `[${node.gInverse.indices[0].variance}, ${node.gInverse.indices[1].variance}])`,\n );\n }\n\n // M9: disjointness on the riemann-tensor's own 4 free labels only.\n // Repeated labels across {ρ, σ, μ, ν} would imply an implicit contraction\n // (e.g. R^μ_μνλ = R_νλ), which is the Ricci-tensor node's job — not the\n // bare Riemann node's. We deliberately do NOT compare against gLower /\n // gInverse / xCoord labels: those are H1-suppressed dummies, and legal\n // post-raise/lower algebra may reuse those labels (see plan §M9).\n const labels = [\n node.upperIndex.label,\n node.lowerIndices[0].label,\n node.lowerIndices[1].label,\n node.lowerIndices[2].label,\n ];\n const seen = new Set<string>();\n for (const label of labels) {\n if (seen.has(label)) {\n throw new IndexLabelCollisionError(label, 2, ['riemann-tensor']);\n }\n seen.add(label);\n }\n\n const freeIndices = new Map<string, { upper: number; lower: number }>();\n freeIndices.set(node.upperIndex.label, { upper: 1, lower: 0 });\n for (const idx of node.lowerIndices) {\n freeIndices.set(idx.label, { upper: 0, lower: 1 });\n }\n\n // F8/I3: Riemann carries inverse-length-squared. Hard-coded — same shape\n // as the dim is structurally fixed for every Riemann tensor regardless of\n // metric dim. (The metric is treated as dimensionless per our convention.)\n const dim: Dimension = { L: -2, M: 0, T: 0, I: 0, Theta: 0, N: 0, J: 0 };\n\n // Role intentionally omitted — Riemann is a derived curvature object,\n // not a primary field; downstream tensor-product / equation consumers\n // don't need a role tag here. Mirrors CovariantDerivativeNode's\n // role-on-passthrough-only pattern.\n return { dim, freeIndices };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"connection.js","sourceRoot":"","sources":["../../src/dimensional/connection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAQ,MAAM,aAAa,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAG7C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,WAAW,CACzB,MAAwB,EACxB,QAA0B,EAC1B,KAAa,EAAU,IAAI;AAC3B,MAAc,EAAS,IAAI;AAC3B,MAAc,EAAS,IAAI;AAC3B,MAAwB;IAExB,6EAA6E;IAC7E,gFAAgF;IAChF,+EAA+E;IAC/E,uBAAuB;IACvB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC;QAC/E,MAAM,IAAI,SAAS,CACjB,mEAAmE;YACnE,cAAc,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,kBAAkB,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAC1E,CAAC;IACJ,CAAC;IAED,mDAAmD;IACnD,MAAM,KAAK,GAAG,IAAI,GAAG,CAAS,C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ees of v0.3.0 AST nodes). The substantive new operator (∇_μ) is a\n * dedicated ExprNode kind defined in connection-validators.ts; this module\n * holds the Christoffel formula builder (a composite, like raise/lower).\n *\n * Per docs/specification/Part-IX-Connection-Layer.md (Task 18) and\n * v0.4.0-Design.md §5.\n *\n * @module dimensional/connection\n */\n\nimport { DIMENSIONLESS } from './types.js';\nimport { equals, format } from './algebra.js';\nimport { contract, tsym } from './tensor.js';\nimport type { TensorSymbolNode } from './tensor.js';\nimport { metric, pderiv } from './metric.js';\nimport type { MetricTensorNode } from './metric-validators.js';\nimport type { ExprNode } from './validator.js';\nimport { freshLabel } from './fresh-label.js';\n\n/**\n * Christoffel symbol Γ^λ_μν = (1/2) g^λρ (∂_μ g_ρν + ∂_ν g_ρμ − ∂_ρ g_μν).\n *\n * Builds a composite tree of v0.3.0 nodes. The negation is encoded as binary\n * subtraction at the outer level: (∂_μ g_ρν + ∂_ν g_ρμ) − ∂_ρ g_μν.\n * Unary minus is NOT supported in v0.4.0 (validator special-cases '-' as\n * binary-only).\n *\n * The fresh dummy label ρ is generated via the deterministic freshLabel scheme\n * (Part-VIII §VIII.5 TENSOR-RULE raise-lower-fresh-label-deterministic):\n * tries 'ρ' first; falls back to 'ρ_1', 'ρ_2', … until non-colliding.\n *\n * Per v0.4.0-Design.md §5; Levi-Civita connection only.\n *\n * @param gLower Covariant metric g_ab (both indices lower).\n * @param gInverse Contravariant inverse metric g^ab (both indices upper).\n * @param upper Free upper index label λ.\n * @param lowerA First free lower index label μ.\n * @param lowerB Second free lower index label ν.\n * @param xCoord Coordinate tensor x^α — used as the wrt argument for pderiv.\n *\n * @public\n */\nexport function christoffel(\n gLower: MetricTensorNode,\n gInverse: MetricTensorNode,\n upper: string, // λ\n lowerA: string, // μ\n lowerB: string, // ν\n xCoord: TensorSymbolNode,\n): ExprNode {\n // Geometrized-convention precondition: this builder's Γ ~ 1/LENGTH dimension\n // and the numerical lowering both assume a DIMENSIONLESS metric. A dimensionful\n // metric would silently produce a wrong-dimensioned connection — assert rather\n // than let it through.\n if (!equals(gLower.dim, DIMENSIONLESS) || !equals(gInverse.dim, DIMENSIONLESS)) {\n throw new TypeError(\n `christoffel: requires a geometrized (dimensionless) metric — got ` +\n `gLower.dim=${format(gLower.dim)}, gInverse.dim=${format(gInverse.dim)}.`,\n );\n }\n\n // Collect labels in use to generate a fresh dummy.\n const taken = new Set<string>([upper, lowerA, lowerB]);\n for (const idx of gLower.indices) taken.add(idx.label);\n for (const idx of gInverse.indices) taken.add(idx.label);\n // Finding #2 fix: include xCoord's own index labels so the fresh dummy\n // cannot alias a coordinate-tensor index (e.g. xCoord with label 'ρ').\n for (const idx of xCoord.indices) taken.add(idx.label);\n const rho = freshLabel('ρ', taken);\n\n // Renamed inverse metric so its indices match: g^{λ rho}.\n const gInverseRenamed: MetricTensorNode = metric(\n gInverse.name,\n [\n { label: upper, variance: 'upper' },\n { label: rho, variance: 'upper' },\n ],\n gInverse.dim,\n gInverse.signature,\n gInverse.derivativeStrategy,\n );\n\n // The three lowered metrics: g_{ρ ν}, g_{ρ μ}, g_{μ ν}.\n const gRho_nu: MetricTensorNode = metric(gLower.name,\n [{ label: rho, variance: 'lower' }, { label: lowerB, variance: 'lower' }],\n gLower.dim, gLower.signature, gLower.derivativeStrategy);\n const gRho_mu: MetricTensorNode = metric(gLower.name,\n [{ label: rho, variance: 'lower' }, { label: lowerA, variance: 'lower' }],\n gLower.dim, gLower.signature, gLower.derivativeStrategy);\n const gMu_nu: MetricTensorNode = metric(gLower.name,\n [{ label: lowerA, variance: 'lower' }, { label: lowerB, variance: 'lower' }],\n gLower.dim, gLower.signature, gLower.derivativeStrategy);\n\n // The three pderiv terms: ∂_μ g_{ρν}, ∂_ν g_{ρμ}, ∂_ρ g_{μν}.\n const dmu_gRhoNu = pderiv(gRho_nu, xCoord, { label: lowerA, variance: 'lower' });\n const dnu_gRhoMu = pderiv(gRho_mu, xCoord, { label: lowerB, variance: 'lower' });\n const drho_gMuNu = pderiv(gMu_nu, xCoord, { label: rho, variance: 'lower' });\n\n // Sum: (∂_μ g_{ρν} + ∂_ν g_{ρμ}) − ∂_ρ g_{μν}.\n // Binary subtraction — unary minus is NOT supported in v0.4.0.\n const innerSum: ExprNode = {\n kind: 'op', op: '+',\n args: [dmu_gRhoNu, dnu_gRhoMu],\n };\n const sumExpr: ExprNode = {\n kind: 'op', op: '-',\n args: [innerSum, drho_gMuNu], // binary subtraction\n };\n\n // Half-factor: dimensionless scalar.\n const half: ExprNode = { kind: 'symbol', name: '(1/2)', dim: DIMENSIONLESS };\n\n // Final: (1/2) · g^{λρ} · sumExpr\n // Γ has units 1/LENGTH (geometrized DIMENSIONLESS metric).\n return contract(half, gInverseRenamed, sumExpr);\n}\n"]}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * The constant registry's rows as written: name, spellings, SI value, SI unit
3
+ * text, meaning, source and flags, one row per physical constant a formula or
4
+ * the unit table may name.
5
+ *
6
+ * `symbolic-constants.ts` derives each row's dimension from its unit with
7
+ * `parseUnit` and owns every projection. The rows live here, apart from that
8
+ * derivation, because the unit table reads constants too: `data/units.json`
9
+ * names `c`, `e`, `m_u`, `M_sun`, `Msun_iau` and `ln2` by these spellings, and
10
+ * the unit parser cannot import a module that imports the unit parser. This
11
+ * module imports only `core/constants.ts`, the owner of every value, so the
12
+ * unit loader and the registry read one set of spellings with no cycle.
13
+ *
14
+ * INTERNAL — not on the public surface.
15
+ *
16
+ * @module dimensional/constant-rows
17
+ */
18
+ /** One registered constant as written: everything but the dimension, which `symbolic-constants.ts` derives from `unit`. @internal */
19
+ export interface ConstantRow {
20
+ /** The formula name; the first spelling, and the key of every projection. */
21
+ readonly name: string;
22
+ /** Other exact-case spellings a caller may type. */
23
+ readonly spellings: readonly string[];
24
+ readonly value: number;
25
+ /** The SI unit, in the syntax `parseUnit` reads. The dimension is derived from it. */
26
+ readonly unit: string;
27
+ readonly meaning: string;
28
+ readonly source: string;
29
+ /** A universal constant a canonical `governing` list may bake. */
30
+ readonly canonical: boolean;
31
+ /** A caveat printed wherever the constant is used (`upt eval`, a relation that names it). */
32
+ readonly note?: string;
33
+ /** The `@danielsimonjr/mathts-functions` export that states the same constant (CODATA 2022 there), when one exists. The second method. */
34
+ readonly mathts?: string;
35
+ /** The two libraries agree to the last bit: exact in the 2019 SI, or a product of exact constants. */
36
+ readonly exact?: true;
37
+ /**
38
+ * The `data/quantities.json` id this constant is also a quantity of. The
39
+ * quantity registry takes the constant's spellings as that row's aliases;
40
+ * the file does not repeat them, so a spelling has one owner.
41
+ */
42
+ readonly quantity?: string;
43
+ /**
44
+ * A mathematical constant no rational states (ln 2, 2π, 4π, 8π). An exact
45
+ * reader (`data/units.json`'s scale expressions) carries `value` as the
46
+ * irrational factor instead of reading its decimal as a rational.
47
+ */
48
+ readonly irrational?: true;
49
+ }
50
+ /** Every registered constant as written. Order is the order the tables print. @internal */
51
+ export declare const CONSTANT_ROWS: readonly ConstantRow[];
52
+ /** The registered constant row `spelling` names, or undefined. @internal */
53
+ export declare function constantRow(spelling: string): ConstantRow | undefined;
54
+ //# sourceMappingURL=constant-rows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constant-rows.d.ts","sourceRoot":"","sources":["../../src/dimensional/constant-rows.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AA0BH,qIAAqI;AACrI,MAAM,WAAW,WAAW;IAC1B,6EAA6E;IAC7E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,oDAAoD;IACpD,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,sFAAsF;IACtF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,kEAAkE;IAClE,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,6FAA6F;IAC7F,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,0IAA0I;IAC1I,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,sGAAsG;IACtG,QAAQ,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC;CAC5B;AAoBD,2FAA2F;AAC3F,eAAO,MAAM,aAAa,EAAE,SAAS,WAAW,EA6E/C,CAAC;AAUF,4EAA4E;AAC5E,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAErE"}
@@ -0,0 +1,115 @@
1
+ /**
2
+ * The constant registry's rows as written: name, spellings, SI value, SI unit
3
+ * text, meaning, source and flags, one row per physical constant a formula or
4
+ * the unit table may name.
5
+ *
6
+ * `symbolic-constants.ts` derives each row's dimension from its unit with
7
+ * `parseUnit` and owns every projection. The rows live here, apart from that
8
+ * derivation, because the unit table reads constants too: `data/units.json`
9
+ * names `c`, `e`, `m_u`, `M_sun`, `Msun_iau` and `ln2` by these spellings, and
10
+ * the unit parser cannot import a module that imports the unit parser. This
11
+ * module imports only `core/constants.ts`, the owner of every value, so the
12
+ * unit loader and the registry read one set of spellings with no cycle.
13
+ *
14
+ * INTERNAL — not on the public surface.
15
+ *
16
+ * @module dimensional/constant-rows
17
+ */
18
+ import { B_WIEN_SI, C_SI, E_SI, EPS0_SI, EULER_GAMMA, FARADAY_SI, G_SI, GM_SUN_SI, H_SI, HBAR_CODATA_DISPLAY, HBAR_SI, K_B_SI, LANE_EMDEN_OMEGA3, M_E_SI, M_PROTON_SI, M_SUN_IAU_SI, M_SUN_SI, M_U_SI, MU0_SI, N_A_SI, SIGMA_SB_SI, THOMSON_CROSS_SECTION_SI, R_INF_SI } from '../core/constants.js';
19
+ const row = (input) => ({
20
+ ...input,
21
+ spellings: input.spellings ?? [],
22
+ canonical: input.canonical ?? false,
23
+ });
24
+ const OWNER = 'core/constants.ts';
25
+ /** Every registered constant as written. Order is the order the tables print. @internal */
26
+ export const CONSTANT_ROWS = [
27
+ // ── universal constants a canonical equation may bake ──────────────────
28
+ row({ name: 'hbar', spellings: ['ℏ', 'reduced-planck-constant'], value: HBAR_SI, unit: 'J*s', canonical: true, mathts: 'reducedPlanckConstant', exact: true,
29
+ meaning: 'reduced Planck constant h/(2π)', source: `exact H_SI/(2π) (${OWNER} HBAR_SI)`,
30
+ note: `hbar is HBAR_SI = H_SI/(2π), the exact reduced Planck constant. The CODATA display ${HBAR_CODATA_DISPLAY} ` +
31
+ `is that quotient truncated (relative difference ${(Math.abs(HBAR_CODATA_DISPLAY - HBAR_SI) / HBAR_SI).toExponential(3)}).` }),
32
+ row({ name: 'h', quantity: 'planck-constant', value: H_SI, unit: 'J*s', canonical: true, mathts: 'planckConstant', exact: true,
33
+ meaning: 'Planck constant', source: `exact SI, 2019 redefinition (${OWNER} H_SI)` }),
34
+ row({ name: 'c', spellings: ['speed-of-light', 'speed_of_light'], value: C_SI, unit: 'm/s', canonical: true, mathts: 'speedOfLight', exact: true,
35
+ meaning: 'speed of light in vacuum', source: `exact SI (${OWNER} C_SI)` }),
36
+ row({ name: 'R_inf', spellings: ['Rinf', 'R_infinity', 'rydberg'], quantity: 'rydberg-constant', value: R_INF_SI, unit: '1/m', canonical: true, mathts: 'rydberg',
37
+ meaning: 'Rydberg constant R∞, infinite nuclear mass (the reduced-mass correction R_M = R∞/(1 + m_e/M) is not applied)', source: `CODATA 2018 (${OWNER} R_INF_SI)` }),
38
+ row({ name: 'G', value: G_SI, unit: 'm^3/(kg*s^2)', canonical: true, mathts: 'gravitationConstant',
39
+ meaning: 'Newtonian gravitational constant', source: `CODATA 2018 (${OWNER} G_SI)` }),
40
+ row({ name: 'k_B', spellings: ['kB', 'boltzmann'], quantity: 'boltzmann-constant', value: K_B_SI, unit: 'J/K', canonical: true, mathts: 'boltzmann', exact: true,
41
+ meaning: 'Boltzmann constant', source: `exact SI, 2019 redefinition (${OWNER} K_B_SI)` }),
42
+ row({ name: 'ln2', value: Math.LN2, unit: '1', canonical: true, irrational: true,
43
+ meaning: 'natural logarithm of 2', source: 'mathematical constant (Math.LN2)' }),
44
+ row({ name: '8pi', value: 8 * Math.PI, unit: '1', canonical: true, irrational: true,
45
+ meaning: '8π', source: 'mathematical constant (8·Math.PI)' }),
46
+ row({ name: '4pi', value: 4 * Math.PI, unit: '1', canonical: true, irrational: true,
47
+ meaning: '4π', source: 'mathematical constant (4·Math.PI)' }),
48
+ row({ name: '2pi', value: 2 * Math.PI, unit: '1', canonical: true, irrational: true,
49
+ meaning: '2π', source: 'mathematical constant (2·Math.PI)' }),
50
+ // ISO 80000 / CODATA: a bare e is the elementary charge. Eccentricity is
51
+ // one_minus_e_sq. The canonical dimension guard still refuses to bake a
52
+ // dimensionless governing name e.
53
+ row({ name: 'e', spellings: ['e_charge'], value: E_SI, unit: 'C', canonical: true, mathts: 'elementaryCharge', exact: true,
54
+ meaning: 'elementary charge', source: `exact SI, 2019 redefinition (${OWNER} E_SI)` }),
55
+ row({ name: 'epsilon_0', spellings: ['epsilon0', 'eps0', 'vacuum-permittivity'], value: EPS0_SI, unit: 'F/m', canonical: true,
56
+ meaning: 'vacuum permittivity', source: `CODATA 2018 (${OWNER} EPS0_SI)` }),
57
+ row({ name: 'sigma_sb', spellings: ['stefan-boltzmann-constant'], value: SIGMA_SB_SI, unit: 'W/(m^2*K^4)', canonical: true, mathts: 'stefanBoltzmann',
58
+ meaning: 'Stefan–Boltzmann constant', source: `CODATA 2018 (${OWNER} SIGMA_SB_SI)` }),
59
+ row({ name: 'b', spellings: ['wien-constant'], value: B_WIEN_SI, unit: 'm*K', canonical: true, mathts: 'wienDisplacement',
60
+ meaning: 'Wien displacement constant', source: `CODATA 2018 (${OWNER} B_WIEN_SI)` }),
61
+ // IAU 2015 nominal solar parameter. M_sun in eval stays the rounded kilogram M_SUN_SI.
62
+ row({ name: 'GM_sun', value: GM_SUN_SI, unit: 'm^3/s^2', canonical: true,
63
+ meaning: 'IAU nominal solar gravitational parameter (GM)☉', source: `IAU 2015 Resolution B3 (${OWNER} GM_SUN_SI)` }),
64
+ row({ name: 'Msun_iau', value: M_SUN_IAU_SI, unit: 'kg', canonical: true,
65
+ meaning: 'IAU solar mass (GM)☉/G, the mass that reproduces GM_sun with G_SI', source: `GM_SUN_SI/G_SI (${OWNER} M_SUN_IAU_SI)` }),
66
+ row({ name: 'm_u', value: M_U_SI, unit: 'kg', canonical: true, mathts: 'atomicMass',
67
+ meaning: 'unified atomic mass unit (atomic mass constant)', source: `CODATA 2018 (${OWNER} M_U_SI)` }),
68
+ row({ name: 'm_e', spellings: ['electron_mass', 'electron-mass'], value: M_E_SI, unit: 'kg', canonical: true, mathts: 'electronMass',
69
+ meaning: 'electron mass', source: `CODATA 2018 (${OWNER} M_E_SI)` }),
70
+ // ── overlay names for `upt eval` and the dimensional assignment only ────
71
+ row({ name: 'mu_0', spellings: ['mu0'], value: MU0_SI, unit: 'H/m', mathts: 'magneticConstant',
72
+ meaning: 'vacuum permeability 1/(ε₀ c²)', source: `1/(EPS0_SI·C_SI²) (${OWNER} MU0_SI)` }),
73
+ row({ name: 'm_p', spellings: ['m_proton'], value: M_PROTON_SI, unit: 'kg', mathts: 'protonMass',
74
+ meaning: 'proton mass', source: `CODATA 2018 (${OWNER} M_PROTON_SI)` }),
75
+ row({ name: 'N_A', value: N_A_SI, unit: 'mol^-1', mathts: 'avogadro', exact: true,
76
+ meaning: 'Avogadro constant', source: `exact SI, 2019 redefinition (${OWNER} N_A_SI)` }),
77
+ row({ name: 'F', value: FARADAY_SI, unit: 'C/mol', mathts: 'faraday', exact: true,
78
+ meaning: 'Faraday constant N_A e', source: `N_A_SI·E_SI (${OWNER} FARADAY_SI)` }),
79
+ // R = N_A k_B, the molar gas constant the thermochemical records state in their titles.
80
+ row({ name: 'R', value: N_A_SI * K_B_SI, unit: 'J/(mol*K)', mathts: 'gasConstant', exact: true,
81
+ meaning: 'molar gas constant N_A k_B', source: `N_A_SI·K_B_SI (${OWNER})` }),
82
+ row({ name: 'M_sun', value: M_SUN_SI, unit: 'kg',
83
+ meaning: 'solar mass, the repo-conventional kilogram value', source: `${OWNER} M_SUN_SI` }),
84
+ // `curvature_k` and `scale_factor` are the Friedmann curvature extension
85
+ // (the frozen `CE-friedmann` entry is the flat term).
86
+ row({ name: 'curvature_k', value: 0, unit: '1',
87
+ meaning: 'Friedmann curvature index, flat by default', source: 'this registry (flat default 0)' }),
88
+ row({ name: 'scale_factor', value: 1, unit: 'm',
89
+ meaning: 'Friedmann scale factor, unit by default', source: 'this registry (default 1)' }),
90
+ row({ name: 'sigma_T', value: THOMSON_CROSS_SECTION_SI, unit: 'm^2', mathts: 'thomsonCrossSection',
91
+ meaning: 'Thomson cross section', source: `CODATA 2018 (${OWNER} THOMSON_CROSS_SECTION_SI)` }),
92
+ row({ name: 'lane_emden_omega_3', quantity: 'lane-emden-omega-3', value: LANE_EMDEN_OMEGA3, unit: '1',
93
+ meaning: 'Lane–Emden n = 3 dimensionless radius', source: `${OWNER} LANE_EMDEN_OMEGA3` }),
94
+ row({ name: 'euler_gamma', value: EULER_GAMMA, unit: '1',
95
+ meaning: 'Euler–Mascheroni constant γ', source: `${OWNER} EULER_GAMMA` }),
96
+ // GRW mass amplification: λ = λ₀ · (m / m₀), with λ₀ a rate and m₀ a mass.
97
+ // The two numbers are the catalog expression's, so the rate is unchanged.
98
+ row({ name: 'grw_lambda0', value: 1e-16, unit: 'Hz',
99
+ meaning: 'GRW localization rate λ₀', source: 'catalog expression (Ghirardi–Rimini–Weber 1986)' }),
100
+ row({ name: 'grw_m0', value: 1.67e-27, unit: 'kg',
101
+ meaning: 'GRW reference mass m₀ (a nucleon)', source: 'catalog expression (Ghirardi–Rimini–Weber 1986)' }),
102
+ ];
103
+ const BY_SPELLING = new Map();
104
+ for (const constant of CONSTANT_ROWS) {
105
+ for (const spelling of [constant.name, ...constant.spellings]) {
106
+ if (BY_SPELLING.has(spelling))
107
+ throw new Error(`constant registry: '${spelling}' is spelled twice`);
108
+ BY_SPELLING.set(spelling, constant);
109
+ }
110
+ }
111
+ /** The registered constant row `spelling` names, or undefined. @internal */
112
+ export function constantRow(spelling) {
113
+ return BY_SPELLING.get(spelling);
114
+ }
115
+ //# sourceMappingURL=constant-rows.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constant-rows.js","sourceRoot":"","sources":["../../src/dimensional/constant-rows.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,WAAW,EACX,UAAU,EACV,IAAI,EACJ,SAAS,EACT,IAAI,EACJ,mBAAmB,EACnB,OAAO,EACP,MAAM,EACN,iBAAiB,EACjB,MAAM,EACN,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,MAAM,EACN,MAAM,EACN,WAAW,EACX,wBAAwB,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AA6CnE,MAAM,GAAG,GAAG,CAAC,KAAe,EAAe,EAAE,CAAC,CAAC;IAC7C,GAAG,KAAK;IACR,SAAS,EAAE,KAAK,CAAC,SAAS,IAAI,EAAE;IAChC,SAAS,EAAE,KAAK,CAAC,SAAS,IAAI,KAAK;CACpC,CAAC,CAAC;AAEH,MAAM,KAAK,GAAG,mBAAmB,CAAC;AAElC,2FAA2F;AAC3F,MAAM,CAAC,MAAM,aAAa,GAA2B;IACnD,0EAA0E;IAC1E,GAAG,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,GAAG,EAAE,yBAAyB,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,uBAAuB,EAAE,KAAK,EAAE,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C,uBAAuB,QAAQ,oBAAoB,CAAC,CAAC;QACpG,WAAW,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACtC,CAAC;AACH,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,WAAW,CAAC,QAAgB;IAC1C,OAAO,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACnC,CAAC","sourcesContent":["/**\n * The constant registry's rows as written: name, spellings, SI value, SI unit\n * text, meaning, source and flags, one row per physical constant a formula or\n * the unit table may name.\n *\n * `symbolic-constants.ts` derives each row's dimension from its unit with\n * `parseUnit` and owns every projection. The rows live here, apart from that\n * derivation, because the unit table reads constants too: `data/units.json`\n * names `c`, `e`, `m_u`, `M_sun`, `Msun_iau` and `ln2` by these spellings, and\n * the unit parser cannot import a module that imports the unit parser. This\n * module imports only `core/constants.ts`, the owner of every value, so the\n * unit loader and the registry read one set of spellings with no cycle.\n *\n * INTERNAL — not on the public surface.\n *\n * @module dimensional/constant-rows\n */\n\nimport {\n B_WIEN_SI,\n C_SI,\n E_SI,\n EPS0_SI,\n EULER_GAMMA,\n FARADAY_SI,\n G_SI,\n GM_SUN_SI,\n H_SI,\n HBAR_CODATA_DISPLAY,\n HBAR_SI,\n K_B_SI,\n LANE_EMDEN_OMEGA3,\n M_E_SI,\n M_PROTON_SI,\n M_SUN_IAU_SI,\n M_SUN_SI,\n M_U_SI,\n MU0_SI,\n N_A_SI,\n SIGMA_SB_SI,\n THOMSON_CROSS_SECTION_SI, R_INF_SI } from '../core/constants.js';\n\n/** One registered constant as written: everything but the dimension, which `symbolic-constants.ts` derives from `unit`. @internal */\nexport interface ConstantRow {\n /** The formula name; the first spelling, and the key of every projection. */\n readonly name: string;\n /** Other exact-case spellings a caller may type. */\n readonly spellings: readonly string[];\n readonly value: number;\n /** The SI unit, in the syntax `parseUnit` reads. The dimension is derived from it. */\n readonly unit: string;\n readonly meaning: string;\n readonly source: string;\n /** A universal constant a canonical `governing` list may bake. */\n readonly canonical: boolean;\n /** A caveat printed wherever the constant is used (`upt eval`, a relation that names it). */\n readonly note?: string;\n /** The `@danielsimonjr/mathts-functions` export that states the same constant (CODATA 2022 there), when one exists. The second method. */\n readonly mathts?: string;\n /** The two libraries agree to the last bit: exact in the 2019 SI, or a product of exact constants. */\n readonly exact?: true;\n /**\n * The `data/quantities.json` id this constant is also a quantity of. The\n * quantity registry takes the constant's spellings as that row's aliases;\n * the file does not repeat them, so a spelling has one owner.\n */\n readonly quantity?: string;\n /**\n * A mathematical constant no rational states (ln 2, 2π, 4π, 8π). An exact\n * reader (`data/units.json`'s scale expressions) carries `value` as the\n * irrational factor instead of reading its decimal as a rational.\n */\n readonly irrational?: true;\n}\n\ntype RowInput = Omit<ConstantRow, 'spellings' | 'canonical' | 'note' | 'mathts' | 'exact' | 'quantity' | 'irrational'> & {\n readonly quantity?: string;\n readonly irrational?: true;\n readonly note?: string;\n readonly mathts?: string;\n readonly exact?: true;\n readonly spellings?: readonly string[];\n readonly canonical?: boolean;\n};\n\nconst row = (input: RowInput): ConstantRow => ({\n ...input,\n spellings: input.spellings ?? [],\n canonical: input.canonical ?? false,\n});\n\nconst OWNER = 'core/constants.ts';\n\n/** Every registered constant as written. Order is the order the tables print. @internal */\nexport const CONSTANT_ROWS: readonly ConstantRow[] = [\n // ── universal constants a canonical equation may bake ──────────────────\n row({ name: 'hbar', spellings: ['ℏ', 'reduced-planck-constant'], value: HBAR_SI, unit: 'J*s', canonical: true, mathts: 'reducedPlanckConstant', exact: true,\n meaning: 'reduced Planck constant h/(2π)', source: `exact H_SI/(2π) (${OWNER} HBAR_SI)`,\n note:\n `hbar is HBAR_SI = H_SI/(2π), the exact reduced Planck constant. The CODATA display ${HBAR_CODATA_DISPLAY} ` +\n `is that quotient truncated (relative difference ${(Math.abs(HBAR_CODATA_DISPLAY - HBAR_SI) / HBAR_SI).toExponential(3)}).` }),\n row({ name: 'h', quantity: 'planck-constant', value: H_SI, unit: 'J*s', canonical: true, mathts: 'planckConstant', exact: true,\n meaning: 'Planck constant', source: `exact SI, 2019 redefinition (${OWNER} H_SI)` }),\n row({ name: 'c', spellings: ['speed-of-light', 'speed_of_light'], value: C_SI, unit: 'm/s', canonical: true, mathts: 'speedOfLight', exact: true,\n meaning: 'speed of light in vacuum', source: `exact SI (${OWNER} C_SI)` }),\n row({ name: 'R_inf', spellings: ['Rinf', 'R_infinity', 'rydberg'], quantity: 'rydberg-constant', value: R_INF_SI, unit: '1/m', canonical: true, mathts: 'rydberg',\n meaning: 'Rydberg constant R∞, infinite nuclear mass (the reduced-mass correction R_M = R∞/(1 + m_e/M) is not applied)', source: `CODATA 2018 (${OWNER} R_INF_SI)` }),\n row({ name: 'G', value: G_SI, unit: 'm^3/(kg*s^2)', canonical: true, mathts: 'gravitationConstant',\n meaning: 'Newtonian gravitational constant', source: `CODATA 2018 (${OWNER} G_SI)` }),\n row({ name: 'k_B', spellings: ['kB', 'boltzmann'], quantity: 'boltzmann-constant', value: K_B_SI, unit: 'J/K', canonical: true, mathts: 'boltzmann', exact: true,\n meaning: 'Boltzmann constant', source: `exact SI, 2019 redefinition (${OWNER} K_B_SI)` }),\n row({ name: 'ln2', value: Math.LN2, unit: '1', canonical: true, irrational: true,\n meaning: 'natural logarithm of 2', source: 'mathematical constant (Math.LN2)' }),\n row({ name: '8pi', value: 8 * Math.PI, unit: '1', canonical: true, irrational: true,\n meaning: '8π', source: 'mathematical constant (8·Math.PI)' }),\n row({ name: '4pi', value: 4 * Math.PI, unit: '1', canonical: true, irrational: true,\n meaning: '4π', source: 'mathematical constant (4·Math.PI)' }),\n row({ name: '2pi', value: 2 * Math.PI, unit: '1', canonical: true, irrational: true,\n meaning: '2π', source: 'mathematical constant (2·Math.PI)' }),\n // ISO 80000 / CODATA: a bare e is the elementary charge. Eccentricity is\n // one_minus_e_sq. The canonical dimension guard still refuses to bake a\n // dimensionless governing name e.\n row({ name: 'e', spellings: ['e_charge'], value: E_SI, unit: 'C', canonical: true, mathts: 'elementaryCharge', exact: true,\n meaning: 'elementary charge', source: `exact SI, 2019 redefinition (${OWNER} E_SI)` }),\n row({ name: 'epsilon_0', spellings: ['epsilon0', 'eps0', 'vacuum-permittivity'], value: EPS0_SI, unit: 'F/m', canonical: true,\n meaning: 'vacuum permittivity', source: `CODATA 2018 (${OWNER} EPS0_SI)` }),\n row({ name: 'sigma_sb', spellings: ['stefan-boltzmann-constant'], value: SIGMA_SB_SI, unit: 'W/(m^2*K^4)', canonical: true, mathts: 'stefanBoltzmann',\n meaning: 'Stefan–Boltzmann constant', source: `CODATA 2018 (${OWNER} SIGMA_SB_SI)` }),\n row({ name: 'b', spellings: ['wien-constant'], value: B_WIEN_SI, unit: 'm*K', canonical: true, mathts: 'wienDisplacement',\n meaning: 'Wien displacement constant', source: `CODATA 2018 (${OWNER} B_WIEN_SI)` }),\n // IAU 2015 nominal solar parameter. M_sun in eval stays the rounded kilogram M_SUN_SI.\n row({ name: 'GM_sun', value: GM_SUN_SI, unit: 'm^3/s^2', canonical: true,\n meaning: 'IAU nominal solar gravitational parameter (GM)☉', source: `IAU 2015 Resolution B3 (${OWNER} GM_SUN_SI)` }),\n row({ name: 'Msun_iau', value: M_SUN_IAU_SI, unit: 'kg', canonical: true,\n meaning: 'IAU solar mass (GM)☉/G, the mass that reproduces GM_sun with G_SI', source: `GM_SUN_SI/G_SI (${OWNER} M_SUN_IAU_SI)` }),\n row({ name: 'm_u', value: M_U_SI, unit: 'kg', canonical: true, mathts: 'atomicMass',\n meaning: 'unified atomic mass unit (atomic mass constant)', source: `CODATA 2018 (${OWNER} M_U_SI)` }),\n row({ name: 'm_e', spellings: ['electron_mass', 'electron-mass'], value: M_E_SI, unit: 'kg', canonical: true, mathts: 'electronMass',\n meaning: 'electron mass', source: `CODATA 2018 (${OWNER} M_E_SI)` }),\n // ── overlay names for `upt eval` and the dimensional assignment only ────\n row({ name: 'mu_0', spellings: ['mu0'], value: MU0_SI, unit: 'H/m', mathts: 'magneticConstant',\n meaning: 'vacuum permeability 1/(ε₀ c²)', source: `1/(EPS0_SI·C_SI²) (${OWNER} MU0_SI)` }),\n row({ name: 'm_p', spellings: ['m_proton'], value: M_PROTON_SI, unit: 'kg', mathts: 'protonMass',\n meaning: 'proton mass', source: `CODATA 2018 (${OWNER} M_PROTON_SI)` }),\n row({ name: 'N_A', value: N_A_SI, unit: 'mol^-1', mathts: 'avogadro', exact: true,\n meaning: 'Avogadro constant', source: `exact SI, 2019 redefinition (${OWNER} N_A_SI)` }),\n row({ name: 'F', value: FARADAY_SI, unit: 'C/mol', mathts: 'faraday', exact: true,\n meaning: 'Faraday constant N_A e', source: `N_A_SI·E_SI (${OWNER} FARADAY_SI)` }),\n // R = N_A k_B, the molar gas constant the thermochemical records state in their titles.\n row({ name: 'R', value: N_A_SI * K_B_SI, unit: 'J/(mol*K)', mathts: 'gasConstant', exact: true,\n meaning: 'molar gas constant N_A k_B', source: `N_A_SI·K_B_SI (${OWNER})` }),\n row({ name: 'M_sun', value: M_SUN_SI, unit: 'kg',\n meaning: 'solar mass, the repo-conventional kilogram value', source: `${OWNER} M_SUN_SI` }),\n // `curvature_k` and `scale_factor` are the Friedmann curvature extension\n // (the frozen `CE-friedmann` entry is the flat term).\n row({ name: 'curvature_k', value: 0, unit: '1',\n meaning: 'Friedmann curvature index, flat by default', source: 'this registry (flat default 0)' }),\n row({ name: 'scale_factor', value: 1, unit: 'm',\n meaning: 'Friedmann scale factor, unit by default', source: 'this registry (default 1)' }),\n row({ name: 'sigma_T', value: THOMSON_CROSS_SECTION_SI, unit: 'm^2', mathts: 'thomsonCrossSection',\n meaning: 'Thomson cross section', source: `CODATA 2018 (${OWNER} THOMSON_CROSS_SECTION_SI)` }),\n row({ name: 'lane_emden_omega_3', quantity: 'lane-emden-omega-3', value: LANE_EMDEN_OMEGA3, unit: '1',\n meaning: 'Lane–Emden n = 3 dimensionless radius', source: `${OWNER} LANE_EMDEN_OMEGA3` }),\n row({ name: 'euler_gamma', value: EULER_GAMMA, unit: '1',\n meaning: 'Euler–Mascheroni constant γ', source: `${OWNER} EULER_GAMMA` }),\n // GRW mass amplification: λ = λ₀ · (m / m₀), with λ₀ a rate and m₀ a mass.\n // The two numbers are the catalog expression's, so the rate is unchanged.\n row({ name: 'grw_lambda0', value: 1e-16, unit: 'Hz',\n meaning: 'GRW localization rate λ₀', source: 'catalog expression (Ghirardi–Rimini–Weber 1986)' }),\n row({ name: 'grw_m0', value: 1.67e-27, unit: 'kg',\n meaning: 'GRW reference mass m₀ (a nucleon)', source: 'catalog expression (Ghirardi–Rimini–Weber 1986)' }),\n];\n\nconst BY_SPELLING = new Map<string, ConstantRow>();\nfor (const constant of CONSTANT_ROWS) {\n for (const spelling of [constant.name, ...constant.spellings]) {\n if (BY_SPELLING.has(spelling)) throw new Error(`constant registry: '${spelling}' is spelled twice`);\n BY_SPELLING.set(spelling, constant);\n }\n}\n\n/** The registered constant row `spelling` names, or undefined. @internal */\nexport function constantRow(spelling: string): ConstantRow | undefined {\n return BY_SPELLING.get(spelling);\n}\n"]}
@@ -1,30 +1,20 @@
1
1
  /**
2
- * SI dimensional signatures of fundamental physical constants.
3
- *
4
- * These are *dimensions only* — numerical values for the constants themselves
5
- * live in `src/core/types.ts` (`PhysicalConstants`). The split is intentional:
6
- * - `core/types.ts` owns numeric values (CODATA 2018) for runtime computation.
7
- * - this module owns the SI dimensional signatures for the validator.
8
- *
9
- * Sources for the dimensional signatures:
10
- * - CODATA 2018 / NIST CODATA values: https://physics.nist.gov/cuu/Constants/
11
- * - BIPM SI Brochure 9th ed. (2019)
12
- * - Planck-unit derivations: Planck (1899); see Wald, "General Relativity"
13
- * (1984), §G for the canonical Planck-length / Planck-time relations.
2
+ * SI dimensional signatures of a few fundamental constants, projected from
3
+ * the constant registry (`symbolic-constants.ts`), which derives each
4
+ * dimension from the constant's SI unit. Values live in `core/constants.ts`.
5
+ * Only the names the tests read are projected; a projection nothing reads is
6
+ * a second copy of a registry row, and `constantRecord(name).dim` is the
7
+ * owner (`G` and `e` were withdrawn for that reason).
14
8
  *
15
9
  * @module dimensional/constants
16
10
  */
17
- import { Dimension } from './types.js';
11
+ import { type Dimension } from './types.js';
18
12
  /** Reduced Planck constant ℏ — action [M L^2 T^-1]. */
19
13
  export declare const hbar: Dimension;
20
14
  /** Speed of light c — velocity [L T^-1]. */
21
15
  export declare const c: Dimension;
22
- /** Newton's gravitational constant G — [L^3 M^-1 T^-2]. */
23
- export declare const G: Dimension;
24
16
  /** Boltzmann constant k_B — energy / temperature [M L^2 T^-2 Θ^-1]. */
25
17
  export declare const k_B: Dimension;
26
- /** Elementary charge e — [T I] (coulombs). */
27
- export declare const e: Dimension;
28
18
  /** Planck length ℓ_P — [L]. */
29
19
  export declare const l_P: Dimension;
30
20
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/dimensional/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EACL,SAAS,EAKV,MAAM,YAAY,CAAC;AAEpB,uDAAuD;AACvD,eAAO,MAAM,IAAI,EAAE,SAAkB,CAAC;AAEtC,4CAA4C;AAC5C,eAAO,MAAM,CAAC,EAAE,SAAoB,CAAC;AAErC,2DAA2D;AAC3D,eAAO,MAAM,CAAC,EAAE,SAA8D,CAAC;AAE/E,uEAAuE;AACvE,eAAO,MAAM,GAAG,EAAE,SAA8D,CAAC;AAEjF,8CAA8C;AAC9C,eAAO,MAAM,CAAC,EAAE,SAAkB,CAAC;AAInC,+BAA+B;AAC/B,eAAO,MAAM,GAAG,EAAE,SAAkB,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/dimensional/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAU,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAKpD,uDAAuD;AACvD,eAAO,MAAM,IAAI,EAAE,SAAsB,CAAC;AAE1C,4CAA4C;AAC5C,eAAO,MAAM,CAAC,EAAE,SAAmB,CAAC;AAEpC,uEAAuE;AACvE,eAAO,MAAM,GAAG,EAAE,SAAqB,CAAC;AAExC,+BAA+B;AAC/B,eAAO,MAAM,GAAG,EAAE,SAAkB,CAAC"}
@@ -1,31 +1,22 @@
1
1
  /**
2
- * SI dimensional signatures of fundamental physical constants.
3
- *
4
- * These are *dimensions only* — numerical values for the constants themselves
5
- * live in `src/core/types.ts` (`PhysicalConstants`). The split is intentional:
6
- * - `core/types.ts` owns numeric values (CODATA 2018) for runtime computation.
7
- * - this module owns the SI dimensional signatures for the validator.
8
- *
9
- * Sources for the dimensional signatures:
10
- * - CODATA 2018 / NIST CODATA values: https://physics.nist.gov/cuu/Constants/
11
- * - BIPM SI Brochure 9th ed. (2019)
12
- * - Planck-unit derivations: Planck (1899); see Wald, "General Relativity"
13
- * (1984), §G for the canonical Planck-length / Planck-time relations.
2
+ * SI dimensional signatures of a few fundamental constants, projected from
3
+ * the constant registry (`symbolic-constants.ts`), which derives each
4
+ * dimension from the constant's SI unit. Values live in `core/constants.ts`.
5
+ * Only the names the tests read are projected; a projection nothing reads is
6
+ * a second copy of a registry row, and `constantRecord(name).dim` is the
7
+ * owner (`G` and `e` were withdrawn for that reason).
14
8
  *
15
9
  * @module dimensional/constants
16
10
  */
17
- import { LENGTH, VELOCITY, ACTION, CHARGE, } from './types.js';
11
+ import { LENGTH } from './types.js';
12
+ import { constantRecord } from './symbolic-constants.js';
13
+ const of = (name) => constantRecord(name).dim;
18
14
  /** Reduced Planck constant ℏ — action [M L^2 T^-1]. */
19
- export const hbar = ACTION;
15
+ export const hbar = of('hbar');
20
16
  /** Speed of light c — velocity [L T^-1]. */
21
- export const c = VELOCITY;
22
- /** Newton's gravitational constant G — [L^3 M^-1 T^-2]. */
23
- export const G = { L: 3, M: -1, T: -2, I: 0, Theta: 0, N: 0, J: 0 };
17
+ export const c = of('c');
24
18
  /** Boltzmann constant k_B — energy / temperature [M L^2 T^-2 Θ^-1]. */
25
- export const k_B = { L: 2, M: 1, T: -2, I: 0, Theta: -1, N: 0, J: 0 };
26
- /** Elementary charge e — [T I] (coulombs). */
27
- export const e = CHARGE;
28
- // --- Planck-unit shorthand (SI dimensions; numerical values not stored here). ---
19
+ export const k_B = of('k_B');
29
20
  /** Planck length ℓ_P — [L]. */
30
21
  export const l_P = LENGTH;
31
22
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/dimensional/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAEL,MAAM,EACN,QAAQ,EACR,MAAM,EACN,MAAM,GACP,MAAM,YAAY,CAAC;AAEpB,uDAAuD;AACvD,MAAM,CAAC,MAAM,IAAI,GAAc,MAAM,CAAC;AAEtC,4CAA4C;AAC5C,MAAM,CAAC,MAAM,CAAC,GAAc,QAAQ,CAAC;AAErC,2DAA2D;AAC3D,MAAM,CAAC,MAAM,CAAC,GAAc,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AAE/E,uEAAuE;AACvE,MAAM,CAAC,MAAM,GAAG,GAAc,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AAEjF,8CAA8C;AAC9C,MAAM,CAAC,MAAM,CAAC,GAAc,MAAM,CAAC;AAEnC,mFAAmF;AAEnF,+BAA+B;AAC/B,MAAM,CAAC,MAAM,GAAG,GAAc,MAAM,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/dimensional/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,MAAM,EAAkB,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,MAAM,EAAE,GAAG,CAAC,IAAY,EAAa,EAAE,CAAC,cAAc,CAAC,IAAI,CAAE,CAAC,GAAG,CAAC;AAElE,uDAAuD;AACvD,MAAM,CAAC,MAAM,IAAI,GAAc,EAAE,CAAC,MAAM,CAAC,CAAC;AAE1C,4CAA4C;AAC5C,MAAM,CAAC,MAAM,CAAC,GAAc,EAAE,CAAC,GAAG,CAAC,CAAC;AAEpC,uEAAuE;AACvE,MAAM,CAAC,MAAM,GAAG,GAAc,EAAE,CAAC,KAAK,CAAC,CAAC;AAExC,+BAA+B;AAC/B,MAAM,CAAC,MAAM,GAAG,GAAc,MAAM,CAAC","sourcesContent":["/**\n * SI dimensional signatures of a few fundamental constants, projected from\n * the constant registry (`symbolic-constants.ts`), which derives each\n * dimension from the constant's SI unit. Values live in `core/constants.ts`.\n * Only the names the tests read are projected; a projection nothing reads is\n * a second copy of a registry row, and `constantRecord(name).dim` is the\n * owner (`G` and `e` were withdrawn for that reason).\n *\n * @module dimensional/constants\n */\n\nimport { LENGTH, type Dimension } from './types.js';\nimport { constantRecord } from './symbolic-constants.js';\n\nconst of = (name: string): Dimension => constantRecord(name)!.dim;\n\n/** Reduced Planck constant ℏ — action [M L^2 T^-1]. */\nexport const hbar: Dimension = of('hbar');\n\n/** Speed of light c — velocity [L T^-1]. */\nexport const c: Dimension = of('c');\n\n/** Boltzmann constant k_B — energy / temperature [M L^2 T^-2 Θ^-1]. */\nexport const k_B: Dimension = of('k_B');\n\n/** Planck length ℓ_P — [L]. */\nexport const l_P: Dimension = LENGTH;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"curvature-composite.js","sourceRoot":"","sources":["../../src/dimensional/curvature-composite.ts"],"names":[],"mappings":"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AE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;KAChE;IACD,kBAAkB,EAAE;QAClB,yFAAyF;QACzF,gBAAgB,EAAE,cAAc;QAChC,YAAY,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;KAChE;IACD,aAAa,EAAE;QACb,gBAAgB,EAAE,sBAAsB;QACxC,YAAY,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;KAChE;IACD,oBAAoB,EAAE;QACpB,gBAAgB,EAAE,QAAQ;QAC1B,YAAY,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;KAChE;CACF,CAAC","sourcesContent":["/**\n * Curvature composite-AST factory (v0.6.0 Phase 3, Task 3.9).\n *\n * PD-6 trigger fires: Weyl is the 5th curvature primitive (after\n * Riemann/Ricci/Einstein/Bianchi from v0.5.0). The 4-kind parallel\n * duplication is now extracted into a shared factory.\n *\n * Net LOC change: −180 (per design Decision #5).\n *\n * P-1 fix: `CurvatureCompositeNode<K, S>` is an intersection type, not an\n * interface with an unused S. Without the intersection, the per-kind\n * slot type-safety would silently drop (the S parameter would be\n * decorative and TypeScript would not compose it into the result).\n *\n * @module dimensional/curvature-composite\n */\n\nimport type { Dimension } from './types.js';\n\n// ─────────────────────────────────────────────────────────────────────────────\n// CurvatureKind discriminant union\n// ─────────────────────────────────────────────────────────────────────────────\n\n/**\n * Discriminant union of all curvature-composite AST node kinds in UPT v0.6.0.\n *\n * Six curvature primitives:\n * - `riemann-tensor` — R^ρ_{σμν} (rank-4, 1-up 3-down, [L⁻²])\n * - `ricci-tensor` — R_{μν} (rank-2 lower-lower, [L⁻²])\n * - `einstein-tensor` — G_{μν} (rank-2 lower-lower, [L⁻²])\n * - `bianchi-residual` — B_{λμνρσ} (rank-5 lower, [L⁻³])\n * - `weyl-tensor` — C^ρ_{σμν} (rank-4, 1-up 3-down, [L⁻²])\n * - `kretschmann-scalar` — K (scalar, [L⁻⁴])\n *\n * @public\n */\nexport type CurvatureKind =\n | 'riemann-tensor'\n | 'ricci-tensor'\n | 'einstein-tensor'\n | 'bianchi-residual'\n | 'weyl-tensor'\n | 'kretschmann-scalar';\n\n// ─────────────────────────────────────────────────────────────────────────────\n// CurvatureKindSpec — per-kind shape + dim descriptor\n// ─────────────────────────────────────────────────────────────────────────────\n\n/**\n * Per-kind specification record used by the registry.\n *\n * `freeIndicesShape` is a human-readable summary of the free-index structure:\n * - `'rank-4-1upper-3lower'` — 1 upper + 3 lower (Riemann, Weyl)\n * - `'rank-2-lower-lower'` — 2 lower (Ricci, Einstein)\n * - `'rank-3-lower'` — the Bianchi residual B_{λμνρσ}, which has FIVE lower\n * indices. The \"3\" is not the rank: it counts the three\n * cyclic terms over (λ, μ, ν) in\n * B_{λμνρσ} = ∇_λ R_{μνρσ} + ∇_μ R_{νλρσ} + ∇_ν R_{λμρσ}.\n * The name stays because the registry is public.\n * - `'scalar'` — 0 free indices (Kretschmann)\n *\n * `componentDim` is the SI dimension of each component in the F8/I3 convention\n * (metric is dimensionless, coordinates carry [L]).\n *\n * @public\n */\ninterface CurvatureKindSpec {\n readonly freeIndicesShape: 'rank-4-1upper-3lower' | 'rank-2-lower-lower' | 'rank-3-lower' | 'scalar';\n readonly componentDim: Dimension;\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// CURVATURE_KIND_REGISTRY\n// ─────────────────────────────────────────────────────────────────────────────\n\n/**\n * Registry mapping each `CurvatureKind` to its shape + dimensional spec.\n *\n * Used by:\n * - Tests: to assert all 6 kinds are registered and that Riemann + Weyl\n * share the rank-4 shape (refactor-only invariant).\n * - Future lowering consolidation: `CURVATURE_KIND_REGISTRY[node.kind]`\n * can supply common validation data without per-kind duplication.\n *\n * @public\n */\nexport const CURVATURE_KIND_REGISTRY: Record<CurvatureKind, CurvatureKindSpec> = {\n 'riemann-tensor': {\n freeIndicesShape: 'rank-4-1upper-3lower',\n componentDim: { L: -2, M: 0, T: 0, I: 0, Theta: 0, N: 0, J: 0 },\n },\n 'ricci-tensor': {\n freeIndicesShape: 'rank-2-lower-lower',\n componentDim: { L: -2, M: 0, T: 0, I: 0, Theta: 0, N: 0, J: 0 },\n },\n 'einstein-tensor': {\n freeIndicesShape: 'rank-2-lower-lower',\n componentDim: { L: -2, M: 0, T: 0, I: 0, Theta: 0, N: 0, J: 0 },\n },\n 'bianchi-residual': {\n // Five lower indices; '3' counts the cyclic terms, not the rank (see CurvatureKindSpec).\n freeIndicesShape: 'rank-3-lower',\n componentDim: { L: -3, M: 0, T: 0, I: 0, Theta: 0, N: 0, J: 0 },\n },\n 'weyl-tensor': {\n freeIndicesShape: 'rank-4-1upper-3lower',\n componentDim: { L: -2, M: 0, T: 0, I: 0, Theta: 0, N: 0, J: 0 },\n },\n 'kretschmann-scalar': {\n freeIndicesShape: 'scalar',\n componentDim: { L: -4, M: 0, T: 0, I: 0, Theta: 0, N: 0, J: 0 },\n },\n};\n\n// ─────────────────────────────────────────────────────────────────────────────\n// CurvatureCompositeNode<K, S> — shared factory type\n// ─────────────────────────────────────────────────────────────────────────────\n\n/**\n * Generic factory type for all curvature-composite AST nodes.\n *\n * **P-1 fix (v0.6.0 plan-vet):** Must be an intersection type, not an\n * interface with an unused type parameter. The intersection `{ kind: K } & S`\n * ensures TypeScript actually composes the kind-specific slot type `S` into\n * the resulting type, giving real discriminant + kind-specific type safety.\n *\n * Usage (type alias):\n * ```typescript\n * type RicciTensorNode = CurvatureCompositeNode<'ricci-tensor', {\n * readonly riemann: RiemannTensorNode;\n * }>;\n * ```\n *\n * The intersection produces:\n * ```typescript\n * { readonly kind: 'ricci-tensor' } & { readonly riemann: RiemannTensorNode }\n * // ≡ { readonly kind: 'ricci-tensor'; readonly riemann: RiemannTensorNode }\n * ```\n *\n * @public\n */\nexport type CurvatureCompositeNode<K extends CurvatureKind, S extends object> = {\n readonly kind: K;\n} & S;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"curvature-invariants.js","sourceRoot":"","sources":["../../src/dimensional/curvature-invariants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAQH,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAwCnE;;;GAGG;AACH,MAAM,UAAU,GAAc,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AAEhF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,yBAAyB,CACvC,IAA2B;IAE3B,qEAAqE;IACrE,yEAAyE;IACzE,yEAAyE;IACzE,oEAAoE;IACpE,iEAAiE;IACjE,oCAAoC;IACpC,qBAAqB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAEpC,kCAAkC;IAClC,OAAO;QACL,GAAG,EAAE,UAAU;QACf,WAAW,EAAE,IAAI,GAAG,EAAE;KACvB,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"curvature-invariants.js","sourceRoot":"","sources":["../../src/dimensional/curvature-invariants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAQH,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAwCnE;;;GAGG;AACH,MAAM,UAAU,GAAc,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AAEhF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,yBAAyB,CACvC,IAA2B;IAE3B,qEAAqE;IACrE,yEAAyE;IACzE,yEAAyE;IACzE,oEAAoE;IACpE,iEAAiE;IACjE,oCAAoC;IACpC,qBAAqB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAEpC,kCAAkC;IAClC,OAAO;QACL,GAAG,EAAE,UAAU;QACf,WAAW,EAAE,IAAI,GAAG,EAAE;KACvB,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Kretschmann scalar AST node + validator (v0.6.0 Phase 3, Task 3.5).\n *\n * The Kretschmann scalar (also spelled \"Kretschner\") is the quadratic\n * curvature invariant:\n *\n * K = R_{ρσμν} R^{ρσμν}\n *\n * formed by full contraction of the Riemann tensor with itself (all four\n * indices raised on the second factor via the inverse metric). K is a\n * genuine spacetime scalar — coordinate-independent, diff-invariant — and\n * the canonical diagnostic for curvature-singularity detection: K diverges\n * at genuine singularities (Schwarzschild r→0) but is finite at coordinate\n * singularities (Schwarzschild r=r_s).\n *\n * Closed-form for Schwarzschild: K(r) = 48 G² M² / (c⁴ r⁶).\n *\n * Dimensional analysis:\n * - Riemann component: [L⁻²] (F8/I3 convention in connection-validators.ts)\n * - K = R × R: [L⁻²] × [L⁻²] = [L⁻⁴]\n *\n * Mirrors the WeylTensorNode pattern in weyl-validators.ts — own validator\n * function; wired via case arm in validator.ts + lowering stub in lowering.ts.\n *\n * @module dimensional/curvature-invariants\n */\n\nimport type { Dimension } from './types.js';\nimport type {\n RiemannTensorNode,\n MetricTensorNode,\n KretschmannScalarNode,\n} from './ast-types.js';\nimport { validateRiemannTensor } from './connection-validators.js';\n\n// The Kretschmann node now lives in the leaf `ast-types.ts`; re-exported.\nexport type { KretschmannScalarNode } from './ast-types.js';\n\n// ─────────────────────────────────────────────────────────────────────────────\n// KretschmannScalarNode — ExprNode kind 'kretschmann-scalar'\n// ─────────────────────────────────────────────────────────────────────────────\n\n/**\n * AST node for the Kretschmann scalar K = R_{ρσμν} R^{ρσμν}.\n *\n * `riemann`: the Riemann tensor being contracted with itself. The validator\n * re-enters its own validator so structural checks (index variance,\n * metric signature) fire for the embedded sub-node.\n *\n * `metric`: the metric tensor used to raise all four indices on the second\n * copy of Riemann. Present for downstream numerical consumers\n * (computeKretschmann in src/numerical/kretschmann.ts). Its free indices\n * are NOT propagated by the validator (H1 — consumed internally).\n *\n * `componentDim`: [L⁻⁴] — Riemann [L⁻²] squared, hard-coded per F8/I3.\n *\n * @public\n */\n/**\n * v0.6.0 Task 3.10d: KretschmannScalarNode expressed via CurvatureCompositeNode<K, S>.\n * The runtime shape is identical — pure type-alias migration.\n */\n/**\n * Result of validating a KretschmannScalarNode.\n * @public\n */\nexport interface KretschmannScalarValidationResult {\n /** [L⁻⁴] — Kretschmann is Riemann-squared in dimension. */\n readonly dim: Dimension;\n /** Empty: K is a scalar (rank-0, all indices contracted). */\n readonly freeIndices: Map<string, { upper: number; lower: number }>;\n}\n\n/**\n * Dimension literal for [L⁻⁴].\n * Kept module-private; callers receive it through the return value.\n */\nconst DIM_L_NEG4: Dimension = { L: -4, M: 0, T: 0, I: 0, Theta: 0, N: 0, J: 0 };\n\n/**\n * Validate a `kretschmann-scalar` node.\n *\n * Re-enters `validateRiemannTensor` for the embedded `riemann` sub-node\n * (so its index-variance, metric-signature, and label-disjointness checks\n * all fire). Discards the Riemann's free-index map — K is a full contraction\n * and every index disappears. Mirrors the `validateRicciTensor` pattern in\n * curvature.ts for embedded-Riemann structural validation.\n *\n * Throws:\n * - Everything `validateRiemannTensor` throws (PartialDerivativeIndexVarianceError,\n * MetricSignatureError, IndexLabelCollisionError) propagated from the\n * embedded Riemann check.\n *\n * Returns:\n * - `{ dim: [L⁻⁴], freeIndices: empty Map }` — scalar, no free indices.\n *\n * @public\n */\nexport function validateKretschmannScalar(\n node: KretschmannScalarNode,\n): KretschmannScalarValidationResult {\n // Re-validate the embedded Riemann. We pass node.riemann directly to\n // validateRiemannTensor (not via a callback, since KretschmannScalarNode\n // does not need to thread an infer() context for its sub-nodes — it only\n // needs the structural checks to fire, and the Riemann validator is\n // self-contained). Mirrors the validateRicciTensor invocation in\n // curvature.ts:validateRicciTensor.\n validateRiemannTensor(node.riemann);\n\n // K is a scalar: no free indices.\n return {\n dim: DIM_L_NEG4,\n freeIndices: new Map(),\n };\n}\n"]}