universal-physics-tensor 0.5.1 → 0.7.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 (378) hide show
  1. package/README.md +66 -105
  2. package/dist/bridges/catalog-adapter.d.ts +116 -0
  3. package/dist/bridges/catalog-adapter.d.ts.map +1 -0
  4. package/dist/bridges/catalog-adapter.js +302 -0
  5. package/dist/bridges/catalog-adapter.js.map +1 -0
  6. package/dist/bridges/equations/_be-helpers.d.ts +145 -0
  7. package/dist/bridges/equations/_be-helpers.d.ts.map +1 -0
  8. package/dist/bridges/equations/_be-helpers.js +179 -0
  9. package/dist/bridges/equations/_be-helpers.js.map +1 -0
  10. package/dist/bridges/equations/be-11-decoherence-master.d.ts +1 -2
  11. package/dist/bridges/equations/be-11-decoherence-master.d.ts.map +1 -1
  12. package/dist/bridges/equations/be-11-decoherence-master.js +9 -20
  13. package/dist/bridges/equations/be-11-decoherence-master.js.map +1 -1
  14. package/dist/bridges/equations/be-12-coherence-length.d.ts +7 -1
  15. package/dist/bridges/equations/be-12-coherence-length.d.ts.map +1 -1
  16. package/dist/bridges/equations/be-12-coherence-length.js +8 -16
  17. package/dist/bridges/equations/be-12-coherence-length.js.map +1 -1
  18. package/dist/bridges/equations/be-13-einstein-trace.d.ts +51 -3
  19. package/dist/bridges/equations/be-13-einstein-trace.d.ts.map +1 -1
  20. package/dist/bridges/equations/be-13-einstein-trace.js +74 -17
  21. package/dist/bridges/equations/be-13-einstein-trace.js.map +1 -1
  22. package/dist/bridges/equations/be-14-ryu-takayanagi.d.ts +10 -4
  23. package/dist/bridges/equations/be-14-ryu-takayanagi.d.ts.map +1 -1
  24. package/dist/bridges/equations/be-14-ryu-takayanagi.js +6 -17
  25. package/dist/bridges/equations/be-14-ryu-takayanagi.js.map +1 -1
  26. package/dist/bridges/equations/be-15-emergence.d.ts +7 -1
  27. package/dist/bridges/equations/be-15-emergence.d.ts.map +1 -1
  28. package/dist/bridges/equations/be-15-emergence.js +12 -22
  29. package/dist/bridges/equations/be-15-emergence.js.map +1 -1
  30. package/dist/bridges/equations/be-16-landauer.d.ts +7 -1
  31. package/dist/bridges/equations/be-16-landauer.d.ts.map +1 -1
  32. package/dist/bridges/equations/be-16-landauer.js +5 -13
  33. package/dist/bridges/equations/be-16-landauer.js.map +1 -1
  34. package/dist/bridges/equations/be-17-einstein-cartan.d.ts +26 -13
  35. package/dist/bridges/equations/be-17-einstein-cartan.d.ts.map +1 -1
  36. package/dist/bridges/equations/be-17-einstein-cartan.js +28 -31
  37. package/dist/bridges/equations/be-17-einstein-cartan.js.map +1 -1
  38. package/dist/bridges/equations/be-18-higgs-mass.d.ts +7 -1
  39. package/dist/bridges/equations/be-18-higgs-mass.d.ts.map +1 -1
  40. package/dist/bridges/equations/be-18-higgs-mass.js +5 -16
  41. package/dist/bridges/equations/be-18-higgs-mass.js.map +1 -1
  42. package/dist/bridges/equations/be-19-quantum-bounce.d.ts +38 -3
  43. package/dist/bridges/equations/be-19-quantum-bounce.d.ts.map +1 -1
  44. package/dist/bridges/equations/be-19-quantum-bounce.js +69 -20
  45. package/dist/bridges/equations/be-19-quantum-bounce.js.map +1 -1
  46. package/dist/bridges/equations/be-20-vacuum-energy.d.ts +20 -1
  47. package/dist/bridges/equations/be-20-vacuum-energy.d.ts.map +1 -1
  48. package/dist/bridges/equations/be-20-vacuum-energy.js +36 -15
  49. package/dist/bridges/equations/be-20-vacuum-energy.js.map +1 -1
  50. package/dist/bridges/equations/be-21-kss-bound.d.ts +2 -0
  51. package/dist/bridges/equations/be-21-kss-bound.d.ts.map +1 -1
  52. package/dist/bridges/equations/be-21-kss-bound.js +4 -10
  53. package/dist/bridges/equations/be-21-kss-bound.js.map +1 -1
  54. package/dist/bridges/equations/be-22-topological-entanglement.d.ts +6 -9
  55. package/dist/bridges/equations/be-22-topological-entanglement.d.ts.map +1 -1
  56. package/dist/bridges/equations/be-22-topological-entanglement.js +9 -21
  57. package/dist/bridges/equations/be-22-topological-entanglement.js.map +1 -1
  58. package/dist/bridges/equations/be-23-syk-planckian.d.ts +7 -1
  59. package/dist/bridges/equations/be-23-syk-planckian.d.ts.map +1 -1
  60. package/dist/bridges/equations/be-23-syk-planckian.js +11 -25
  61. package/dist/bridges/equations/be-23-syk-planckian.js.map +1 -1
  62. package/dist/bridges/equations/be-24-foerster-fret.d.ts +7 -1
  63. package/dist/bridges/equations/be-24-foerster-fret.d.ts.map +1 -1
  64. package/dist/bridges/equations/be-24-foerster-fret.js +8 -16
  65. package/dist/bridges/equations/be-24-foerster-fret.js.map +1 -1
  66. package/dist/bridges/equations/be-25-iit-phi.d.ts +7 -1
  67. package/dist/bridges/equations/be-25-iit-phi.d.ts.map +1 -1
  68. package/dist/bridges/equations/be-25-iit-phi.js +12 -16
  69. package/dist/bridges/equations/be-25-iit-phi.js.map +1 -1
  70. package/dist/bridges/equations/be-25-orch-or.d.ts +6 -3
  71. package/dist/bridges/equations/be-25-orch-or.d.ts.map +1 -1
  72. package/dist/bridges/equations/be-25-orch-or.js +8 -17
  73. package/dist/bridges/equations/be-25-orch-or.js.map +1 -1
  74. package/dist/bridges/equations/be-26-dna-tunneling.d.ts +6 -3
  75. package/dist/bridges/equations/be-26-dna-tunneling.d.ts.map +1 -1
  76. package/dist/bridges/equations/be-26-dna-tunneling.js +11 -26
  77. package/dist/bridges/equations/be-26-dna-tunneling.js.map +1 -1
  78. package/dist/bridges/equations/be-27-effective-temperature.d.ts +7 -1
  79. package/dist/bridges/equations/be-27-effective-temperature.d.ts.map +1 -1
  80. package/dist/bridges/equations/be-27-effective-temperature.js +8 -16
  81. package/dist/bridges/equations/be-27-effective-temperature.js.map +1 -1
  82. package/dist/bridges/equations/be-28-onsager-entropy-production.d.ts +7 -1
  83. package/dist/bridges/equations/be-28-onsager-entropy-production.d.ts.map +1 -1
  84. package/dist/bridges/equations/be-28-onsager-entropy-production.js +9 -13
  85. package/dist/bridges/equations/be-28-onsager-entropy-production.js.map +1 -1
  86. package/dist/bridges/equations/be-29-jarzynski.d.ts +7 -1
  87. package/dist/bridges/equations/be-29-jarzynski.d.ts.map +1 -1
  88. package/dist/bridges/equations/be-29-jarzynski.js +8 -13
  89. package/dist/bridges/equations/be-29-jarzynski.js.map +1 -1
  90. package/dist/bridges/equations/be-30-flm-first-law.d.ts +11 -2
  91. package/dist/bridges/equations/be-30-flm-first-law.d.ts.map +1 -1
  92. package/dist/bridges/equations/be-30-flm-first-law.js +10 -21
  93. package/dist/bridges/equations/be-30-flm-first-law.js.map +1 -1
  94. package/dist/bridges/equations/be-31-causal-set-bd.d.ts +7 -1
  95. package/dist/bridges/equations/be-31-causal-set-bd.d.ts.map +1 -1
  96. package/dist/bridges/equations/be-31-causal-set-bd.js +11 -25
  97. package/dist/bridges/equations/be-31-causal-set-bd.js.map +1 -1
  98. package/dist/bridges/equations/be-32-quantum-reference-frame.d.ts +6 -9
  99. package/dist/bridges/equations/be-32-quantum-reference-frame.d.ts.map +1 -1
  100. package/dist/bridges/equations/be-32-quantum-reference-frame.js +8 -18
  101. package/dist/bridges/equations/be-32-quantum-reference-frame.js.map +1 -1
  102. package/dist/bridges/equations/be-33-hertz-millis.d.ts +53 -28
  103. package/dist/bridges/equations/be-33-hertz-millis.d.ts.map +1 -1
  104. package/dist/bridges/equations/be-33-hertz-millis.js +55 -51
  105. package/dist/bridges/equations/be-33-hertz-millis.js.map +1 -1
  106. package/dist/bridges/equations/be-34-kibble-zurek.d.ts +6 -3
  107. package/dist/bridges/equations/be-34-kibble-zurek.d.ts.map +1 -1
  108. package/dist/bridges/equations/be-34-kibble-zurek.js +15 -26
  109. package/dist/bridges/equations/be-34-kibble-zurek.js.map +1 -1
  110. package/dist/bridges/equations/be-35-conformal-bootstrap.d.ts +6 -9
  111. package/dist/bridges/equations/be-35-conformal-bootstrap.d.ts.map +1 -1
  112. package/dist/bridges/equations/be-35-conformal-bootstrap.js +9 -21
  113. package/dist/bridges/equations/be-35-conformal-bootstrap.js.map +1 -1
  114. package/dist/bridges/equations/be-36-gw-speed-bound.d.ts +7 -1
  115. package/dist/bridges/equations/be-36-gw-speed-bound.d.ts.map +1 -1
  116. package/dist/bridges/equations/be-36-gw-speed-bound.js +5 -13
  117. package/dist/bridges/equations/be-36-gw-speed-bound.js.map +1 -1
  118. package/dist/bridges/equations/be-37-shapiro-delay.d.ts +4 -2
  119. package/dist/bridges/equations/be-37-shapiro-delay.d.ts.map +1 -1
  120. package/dist/bridges/equations/be-37-shapiro-delay.js +15 -28
  121. package/dist/bridges/equations/be-37-shapiro-delay.js.map +1 -1
  122. package/dist/bridges/equations/be-38-mond.d.ts +7 -1
  123. package/dist/bridges/equations/be-38-mond.d.ts.map +1 -1
  124. package/dist/bridges/equations/be-38-mond.js +9 -19
  125. package/dist/bridges/equations/be-38-mond.js.map +1 -1
  126. package/dist/bridges/equations/be-39-asymptotic-safety.d.ts +66 -2
  127. package/dist/bridges/equations/be-39-asymptotic-safety.d.ts.map +1 -1
  128. package/dist/bridges/equations/be-39-asymptotic-safety.js +128 -20
  129. package/dist/bridges/equations/be-39-asymptotic-safety.js.map +1 -1
  130. package/dist/bridges/equations/be-40-composite-higgs.d.ts +7 -1
  131. package/dist/bridges/equations/be-40-composite-higgs.d.ts.map +1 -1
  132. package/dist/bridges/equations/be-40-composite-higgs.js +10 -22
  133. package/dist/bridges/equations/be-40-composite-higgs.js.map +1 -1
  134. package/dist/bridges/equations/be-41-swampland.d.ts +6 -3
  135. package/dist/bridges/equations/be-41-swampland.d.ts.map +1 -1
  136. package/dist/bridges/equations/be-41-swampland.js +11 -23
  137. package/dist/bridges/equations/be-41-swampland.js.map +1 -1
  138. package/dist/bridges/equations/be-42-hawking-temperature.d.ts +2 -0
  139. package/dist/bridges/equations/be-42-hawking-temperature.d.ts.map +1 -1
  140. package/dist/bridges/equations/be-42-hawking-temperature.js +5 -13
  141. package/dist/bridges/equations/be-42-hawking-temperature.js.map +1 -1
  142. package/dist/bridges/equations/be-43-er-epr.d.ts +7 -1
  143. package/dist/bridges/equations/be-43-er-epr.d.ts.map +1 -1
  144. package/dist/bridges/equations/be-43-er-epr.js +5 -13
  145. package/dist/bridges/equations/be-43-er-epr.js.map +1 -1
  146. package/dist/bridges/equations/be-44-soft-hair.d.ts +7 -1
  147. package/dist/bridges/equations/be-44-soft-hair.d.ts.map +1 -1
  148. package/dist/bridges/equations/be-44-soft-hair.js +5 -13
  149. package/dist/bridges/equations/be-44-soft-hair.js.map +1 -1
  150. package/dist/bridges/equations/be-45-tcc.d.ts +7 -1
  151. package/dist/bridges/equations/be-45-tcc.d.ts.map +1 -1
  152. package/dist/bridges/equations/be-45-tcc.js +10 -22
  153. package/dist/bridges/equations/be-45-tcc.js.map +1 -1
  154. package/dist/bridges/equations/be-46-multiverse-measure.d.ts +7 -1
  155. package/dist/bridges/equations/be-46-multiverse-measure.d.ts.map +1 -1
  156. package/dist/bridges/equations/be-46-multiverse-measure.js +9 -19
  157. package/dist/bridges/equations/be-46-multiverse-measure.js.map +1 -1
  158. package/dist/bridges/equations/be-47-bbn-dark-sector.d.ts +7 -1
  159. package/dist/bridges/equations/be-47-bbn-dark-sector.d.ts.map +1 -1
  160. package/dist/bridges/equations/be-47-bbn-dark-sector.js +14 -16
  161. package/dist/bridges/equations/be-47-bbn-dark-sector.js.map +1 -1
  162. package/dist/bridges/equations/be-48-grw-localization.d.ts +7 -1
  163. package/dist/bridges/equations/be-48-grw-localization.d.ts.map +1 -1
  164. package/dist/bridges/equations/be-48-grw-localization.js +15 -20
  165. package/dist/bridges/equations/be-48-grw-localization.js.map +1 -1
  166. package/dist/bridges/equations/be-49-quantum-darwinism.d.ts +7 -1
  167. package/dist/bridges/equations/be-49-quantum-darwinism.d.ts.map +1 -1
  168. package/dist/bridges/equations/be-49-quantum-darwinism.js +10 -22
  169. package/dist/bridges/equations/be-49-quantum-darwinism.js.map +1 -1
  170. package/dist/bridges/equations/be-50-wheeler-feynman.d.ts +42 -12
  171. package/dist/bridges/equations/be-50-wheeler-feynman.d.ts.map +1 -1
  172. package/dist/bridges/equations/be-50-wheeler-feynman.js +84 -20
  173. package/dist/bridges/equations/be-50-wheeler-feynman.js.map +1 -1
  174. package/dist/bridges/equations/be-53-yang-mills-beta.d.ts +158 -0
  175. package/dist/bridges/equations/be-53-yang-mills-beta.d.ts.map +1 -0
  176. package/dist/bridges/equations/be-53-yang-mills-beta.js +175 -0
  177. package/dist/bridges/equations/be-53-yang-mills-beta.js.map +1 -0
  178. package/dist/bridges/equations/be-54-randall-sundrum-brane.d.ts +117 -0
  179. package/dist/bridges/equations/be-54-randall-sundrum-brane.d.ts.map +1 -0
  180. package/dist/bridges/equations/be-54-randall-sundrum-brane.js +213 -0
  181. package/dist/bridges/equations/be-54-randall-sundrum-brane.js.map +1 -0
  182. package/dist/bridges/index.d.ts +40 -1
  183. package/dist/bridges/index.d.ts.map +1 -1
  184. package/dist/bridges/index.js +130 -48
  185. package/dist/bridges/index.js.map +1 -1
  186. package/dist/bridges/perihelion-precession-labeled.d.ts +46 -0
  187. package/dist/bridges/perihelion-precession-labeled.d.ts.map +1 -0
  188. package/dist/bridges/perihelion-precession-labeled.js +54 -0
  189. package/dist/bridges/perihelion-precession-labeled.js.map +1 -0
  190. package/dist/core/axes-registry.d.ts +67 -0
  191. package/dist/core/axes-registry.d.ts.map +1 -0
  192. package/dist/core/axes-registry.js +75 -0
  193. package/dist/core/axes-registry.js.map +1 -0
  194. package/dist/core/cell.d.ts +176 -0
  195. package/dist/core/cell.d.ts.map +1 -0
  196. package/dist/core/cell.js +166 -0
  197. package/dist/core/cell.js.map +1 -0
  198. package/dist/core/flux-rules.d.ts +176 -0
  199. package/dist/core/flux-rules.d.ts.map +1 -0
  200. package/dist/core/flux-rules.js +329 -0
  201. package/dist/core/flux-rules.js.map +1 -0
  202. package/dist/core/labeled-tensor.d.ts +143 -0
  203. package/dist/core/labeled-tensor.d.ts.map +1 -0
  204. package/dist/core/labeled-tensor.js +275 -0
  205. package/dist/core/labeled-tensor.js.map +1 -0
  206. package/dist/core/regime-registry.d.ts +169 -0
  207. package/dist/core/regime-registry.d.ts.map +1 -0
  208. package/dist/core/regime-registry.js +174 -0
  209. package/dist/core/regime-registry.js.map +1 -0
  210. package/dist/core/regime-rule-install.d.ts +26 -0
  211. package/dist/core/regime-rule-install.d.ts.map +1 -0
  212. package/dist/core/regime-rule-install.js +90 -0
  213. package/dist/core/regime-rule-install.js.map +1 -0
  214. package/dist/core/regimes-builtins.d.ts +22 -0
  215. package/dist/core/regimes-builtins.d.ts.map +1 -0
  216. package/dist/core/regimes-builtins.js +96 -0
  217. package/dist/core/regimes-builtins.js.map +1 -0
  218. package/dist/core/tensor.d.ts +112 -0
  219. package/dist/core/tensor.d.ts.map +1 -1
  220. package/dist/core/tensor.js +366 -0
  221. package/dist/core/tensor.js.map +1 -1
  222. package/dist/core/types.d.ts +7 -2
  223. package/dist/core/types.d.ts.map +1 -1
  224. package/dist/core/types.js.map +1 -1
  225. package/dist/core/universal-index.d.ts +97 -0
  226. package/dist/core/universal-index.d.ts.map +1 -0
  227. package/dist/core/universal-index.js +70 -0
  228. package/dist/core/universal-index.js.map +1 -0
  229. package/dist/diff/bridge-gradient.d.ts +94 -0
  230. package/dist/diff/bridge-gradient.d.ts.map +1 -0
  231. package/dist/diff/bridge-gradient.js +83 -0
  232. package/dist/diff/bridge-gradient.js.map +1 -0
  233. package/dist/diff/bridge-specs.d.ts +68 -0
  234. package/dist/diff/bridge-specs.d.ts.map +1 -0
  235. package/dist/diff/bridge-specs.js +96 -0
  236. package/dist/diff/bridge-specs.js.map +1 -0
  237. package/dist/dimensional/bridge-check.d.ts.map +1 -1
  238. package/dist/dimensional/bridge-check.js +8 -0
  239. package/dist/dimensional/bridge-check.js.map +1 -1
  240. package/dist/dimensional/connection-validators.d.ts +12 -5
  241. package/dist/dimensional/connection-validators.d.ts.map +1 -1
  242. package/dist/dimensional/connection-validators.js.map +1 -1
  243. package/dist/dimensional/curvature-composite.d.ts +90 -0
  244. package/dist/dimensional/curvature-composite.d.ts.map +1 -0
  245. package/dist/dimensional/curvature-composite.js +57 -0
  246. package/dist/dimensional/curvature-composite.js.map +1 -0
  247. package/dist/dimensional/curvature-invariants.d.ts +90 -0
  248. package/dist/dimensional/curvature-invariants.d.ts.map +1 -0
  249. package/dist/dimensional/curvature-invariants.js +64 -0
  250. package/dist/dimensional/curvature-invariants.js.map +1 -0
  251. package/dist/dimensional/curvature.d.ts +46 -30
  252. package/dist/dimensional/curvature.d.ts.map +1 -1
  253. package/dist/dimensional/curvature.js.map +1 -1
  254. package/dist/dimensional/einstein-equation.d.ts +126 -0
  255. package/dist/dimensional/einstein-equation.d.ts.map +1 -0
  256. package/dist/dimensional/einstein-equation.js +122 -0
  257. package/dist/dimensional/einstein-equation.js.map +1 -0
  258. package/dist/dimensional/field-equation-helpers.d.ts +82 -0
  259. package/dist/dimensional/field-equation-helpers.d.ts.map +1 -0
  260. package/dist/dimensional/field-equation-helpers.js +123 -0
  261. package/dist/dimensional/field-equation-helpers.js.map +1 -0
  262. package/dist/dimensional/friedmann-equation.d.ts +148 -0
  263. package/dist/dimensional/friedmann-equation.d.ts.map +1 -0
  264. package/dist/dimensional/friedmann-equation.js +150 -0
  265. package/dist/dimensional/friedmann-equation.js.map +1 -0
  266. package/dist/dimensional/gauge-field.d.ts +182 -0
  267. package/dist/dimensional/gauge-field.d.ts.map +1 -0
  268. package/dist/dimensional/gauge-field.js +134 -0
  269. package/dist/dimensional/gauge-field.js.map +1 -0
  270. package/dist/dimensional/killing-validators.d.ts +94 -0
  271. package/dist/dimensional/killing-validators.d.ts.map +1 -0
  272. package/dist/dimensional/killing-validators.js +66 -0
  273. package/dist/dimensional/killing-validators.js.map +1 -0
  274. package/dist/dimensional/klein-gordon-equation.d.ts +113 -0
  275. package/dist/dimensional/klein-gordon-equation.d.ts.map +1 -0
  276. package/dist/dimensional/klein-gordon-equation.js +98 -0
  277. package/dist/dimensional/klein-gordon-equation.js.map +1 -0
  278. package/dist/dimensional/rg-flow.d.ts +156 -0
  279. package/dist/dimensional/rg-flow.d.ts.map +1 -0
  280. package/dist/dimensional/rg-flow.js +150 -0
  281. package/dist/dimensional/rg-flow.js.map +1 -0
  282. package/dist/dimensional/stress-energy-validators.d.ts +74 -0
  283. package/dist/dimensional/stress-energy-validators.d.ts.map +1 -0
  284. package/dist/dimensional/stress-energy-validators.js +47 -0
  285. package/dist/dimensional/stress-energy-validators.js.map +1 -0
  286. package/dist/dimensional/tensor-trace.d.ts +128 -0
  287. package/dist/dimensional/tensor-trace.d.ts.map +1 -0
  288. package/dist/dimensional/tensor-trace.js +95 -0
  289. package/dist/dimensional/tensor-trace.js.map +1 -0
  290. package/dist/dimensional/tensor.d.ts +6 -8
  291. package/dist/dimensional/tensor.d.ts.map +1 -1
  292. package/dist/dimensional/tensor.js +3 -1
  293. package/dist/dimensional/tensor.js.map +1 -1
  294. package/dist/dimensional/validator-registry.d.ts +90 -0
  295. package/dist/dimensional/validator-registry.d.ts.map +1 -0
  296. package/dist/dimensional/validator-registry.js +131 -0
  297. package/dist/dimensional/validator-registry.js.map +1 -0
  298. package/dist/dimensional/validator.d.ts +12 -2
  299. package/dist/dimensional/validator.d.ts.map +1 -1
  300. package/dist/dimensional/validator.js +60 -75
  301. package/dist/dimensional/validator.js.map +1 -1
  302. package/dist/dimensional/weyl-validators.d.ts +84 -0
  303. package/dist/dimensional/weyl-validators.d.ts.map +1 -0
  304. package/dist/dimensional/weyl-validators.js +84 -0
  305. package/dist/dimensional/weyl-validators.js.map +1 -0
  306. package/dist/index.d.ts +37 -0
  307. package/dist/index.d.ts.map +1 -1
  308. package/dist/index.js +41 -0
  309. package/dist/index.js.map +1 -1
  310. package/dist/numerical/be37-covariant-eikonal.d.ts +19 -0
  311. package/dist/numerical/be37-covariant-eikonal.d.ts.map +1 -1
  312. package/dist/numerical/be37-covariant-eikonal.js +29 -9
  313. package/dist/numerical/be37-covariant-eikonal.js.map +1 -1
  314. package/dist/numerical/christoffel-flat.d.ts +49 -0
  315. package/dist/numerical/christoffel-flat.d.ts.map +1 -0
  316. package/dist/numerical/christoffel-flat.js +86 -0
  317. package/dist/numerical/christoffel-flat.js.map +1 -0
  318. package/dist/numerical/curvature-lowering-helpers.d.ts +49 -57
  319. package/dist/numerical/curvature-lowering-helpers.d.ts.map +1 -1
  320. package/dist/numerical/curvature-lowering-helpers.js +109 -4
  321. package/dist/numerical/curvature-lowering-helpers.js.map +1 -1
  322. package/dist/numerical/derivative-lowering.d.ts +67 -0
  323. package/dist/numerical/derivative-lowering.d.ts.map +1 -0
  324. package/dist/numerical/derivative-lowering.js +243 -0
  325. package/dist/numerical/derivative-lowering.js.map +1 -0
  326. package/dist/numerical/einstein-equation.d.ts +106 -0
  327. package/dist/numerical/einstein-equation.d.ts.map +1 -0
  328. package/dist/numerical/einstein-equation.js +172 -0
  329. package/dist/numerical/einstein-equation.js.map +1 -0
  330. package/dist/numerical/geodesic-integrator.d.ts +7 -4
  331. package/dist/numerical/geodesic-integrator.d.ts.map +1 -1
  332. package/dist/numerical/geodesic-integrator.js +5 -1
  333. package/dist/numerical/geodesic-integrator.js.map +1 -1
  334. package/dist/numerical/gl4-integrator.d.ts +4 -2
  335. package/dist/numerical/gl4-integrator.d.ts.map +1 -1
  336. package/dist/numerical/gl4-integrator.js +24 -8
  337. package/dist/numerical/gl4-integrator.js.map +1 -1
  338. package/dist/numerical/killing.d.ts +157 -0
  339. package/dist/numerical/killing.d.ts.map +1 -0
  340. package/dist/numerical/killing.js +242 -0
  341. package/dist/numerical/killing.js.map +1 -0
  342. package/dist/numerical/kretschmann.d.ts +62 -0
  343. package/dist/numerical/kretschmann.d.ts.map +1 -0
  344. package/dist/numerical/kretschmann.js +88 -0
  345. package/dist/numerical/kretschmann.js.map +1 -0
  346. package/dist/numerical/lowering-utils.d.ts +47 -0
  347. package/dist/numerical/lowering-utils.d.ts.map +1 -0
  348. package/dist/numerical/lowering-utils.js +64 -0
  349. package/dist/numerical/lowering-utils.js.map +1 -0
  350. package/dist/numerical/lowering.d.ts +1 -29
  351. package/dist/numerical/lowering.d.ts.map +1 -1
  352. package/dist/numerical/lowering.js +219 -415
  353. package/dist/numerical/lowering.js.map +1 -1
  354. package/dist/numerical/null-ic.d.ts +40 -0
  355. package/dist/numerical/null-ic.d.ts.map +1 -0
  356. package/dist/numerical/null-ic.js +50 -0
  357. package/dist/numerical/null-ic.js.map +1 -0
  358. package/dist/numerical/null-ray-integrator.d.ts +3 -2
  359. package/dist/numerical/null-ray-integrator.d.ts.map +1 -1
  360. package/dist/numerical/painleve-gullstrand-metric.d.ts +74 -0
  361. package/dist/numerical/painleve-gullstrand-metric.d.ts.map +1 -0
  362. package/dist/numerical/painleve-gullstrand-metric.js +121 -0
  363. package/dist/numerical/painleve-gullstrand-metric.js.map +1 -0
  364. package/dist/numerical/pderiv.d.ts +17 -9
  365. package/dist/numerical/pderiv.d.ts.map +1 -1
  366. package/dist/numerical/pderiv.js +6 -3
  367. package/dist/numerical/pderiv.js.map +1 -1
  368. package/dist/numerical/perihelion-finder.d.ts +30 -0
  369. package/dist/numerical/perihelion-finder.d.ts.map +1 -1
  370. package/dist/numerical/perihelion-finder.js +30 -0
  371. package/dist/numerical/perihelion-finder.js.map +1 -1
  372. package/dist/numerical/tensor-engine.d.ts +2 -2
  373. package/dist/numerical/tensor-engine.d.ts.map +1 -1
  374. package/dist/numerical/weyl-lowering.d.ts +60 -0
  375. package/dist/numerical/weyl-lowering.d.ts.map +1 -0
  376. package/dist/numerical/weyl-lowering.js +111 -0
  377. package/dist/numerical/weyl-lowering.js.map +1 -0
  378. package/package.json +9 -7
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Shared validation helpers for field-equation predicate AST nodes
3
+ * (`EinsteinFieldEquationNode`, and future `MaxwellEquationNode`,
4
+ * `KleinGordonEquationNode`, etc.).
5
+ *
6
+ * Per `docs/architecture/v0.7-tensor-equation-node-design-note.md`
7
+ * Phase 0 — extract the 3 invariant checks from
8
+ * `validateEinsteinFieldEquation` so future field equations get
9
+ * them for free, instead of copy-pasting the predicate bodies.
10
+ * Investment-upfront pattern: same shape as v0.6.1's
11
+ * validator-registry refactor.
12
+ *
13
+ * Three helpers, all behavior-preserving extractions:
14
+ *
15
+ * - `validateFreeIndexLabelMatch` — checks lhs and rhs carry
16
+ * the same free-index labels in the same order. Generic over
17
+ * rank (works for rank-1 Maxwell `∇_μ F^{μν}`, rank-2 EFE,
18
+ * etc.).
19
+ *
20
+ * - `validateComponentDimension` — checks a tensor's
21
+ * `componentDim` matches an expected `Dimension`. Generic
22
+ * over which tensor and what equation context.
23
+ *
24
+ * - `validateTensorSymmetry` — checks a tensor's `symmetry`
25
+ * field equals an expected value. Generic over tensor +
26
+ * equation context.
27
+ *
28
+ * @module dimensional/field-equation-helpers
29
+ */
30
+ import type { Dimension } from './types.js';
31
+ /**
32
+ * Assert that the LHS and RHS of a field-equation predicate carry
33
+ * the same free-index labels in the same order.
34
+ *
35
+ * Throws `Error` with `"index label"` in the message (matches the
36
+ * existing `validateEinsteinFieldEquation` error prose, so any
37
+ * test pattern-matching that string stays green).
38
+ *
39
+ * @param equationKind - Discriminator for the error message
40
+ * (e.g., `'EinsteinFieldEquationNode'`, `'MaxwellEquationNode'`).
41
+ * @param lhsName - Human label for the LHS in the error (e.g., `'G_μν'`).
42
+ * @param lhsLabels - Free-index labels from the LHS, in axis order.
43
+ * @param rhsName - Human label for the RHS (e.g., `'T_μν'`).
44
+ * @param rhsLabels - Free-index labels from the RHS, in axis order.
45
+ *
46
+ * @internal
47
+ */
48
+ export declare function validateFreeIndexLabelMatch(equationKind: string, lhsName: string, lhsLabels: ReadonlyArray<string>, rhsName: string, rhsLabels: ReadonlyArray<string>): void;
49
+ /**
50
+ * Assert that an `actual: Dimension` equals an `expected: Dimension`
51
+ * across all seven base SI axes (L, M, T, I, Theta, N, J).
52
+ *
53
+ * Throws `Error` with `"dimension"` in the message (matches the
54
+ * existing error prose convention).
55
+ *
56
+ * @param equationKind - Discriminator (e.g., `'EinsteinFieldEquationNode'`).
57
+ * @param tensorName - Human label for the tensor being checked
58
+ * (e.g., `'T_μν componentDim'`).
59
+ * @param actual - The actual `Dimension` from the AST node.
60
+ * @param expected - The expected `Dimension`.
61
+ * @param explanation - Optional trailing message explaining why
62
+ * this dimension is required (e.g., `"so that (8πG/c⁴)·T_μν ~ [L⁻²]"`).
63
+ *
64
+ * @internal
65
+ */
66
+ export declare function validateComponentDimension(equationKind: string, tensorName: string, actual: Dimension, expected: Dimension, explanation?: string): void;
67
+ /**
68
+ * Assert that a tensor's `symmetry` field equals `expected`.
69
+ *
70
+ * Throws `Error` with `"symmetry"` in the message.
71
+ *
72
+ * @param equationKind - Discriminator (e.g., `'EinsteinFieldEquationNode'`).
73
+ * @param tensorName - Human label (e.g., `'T_μν'`).
74
+ * @param actual - The tensor's actual `symmetry` value.
75
+ * @param expected - The required `symmetry` value (e.g., `'symmetric'`).
76
+ * @param explanation - Optional trailing message (e.g., `"Both sides of
77
+ * the EFE are symmetric in (μ,ν)"`).
78
+ *
79
+ * @internal
80
+ */
81
+ export declare function validateTensorSymmetry(equationKind: string, tensorName: string, actual: string, expected: string, explanation?: string): void;
82
+ //# sourceMappingURL=field-equation-helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field-equation-helpers.d.ts","sourceRoot":"","sources":["../../src/dimensional/field-equation-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAM5C;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,2BAA2B,CACzC,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,EAChC,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,GAC/B,IAAI,CAmBN;AAMD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,0BAA0B,CACxC,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,SAAS,EACjB,QAAQ,EAAE,SAAS,EACnB,WAAW,CAAC,EAAE,MAAM,GACnB,IAAI,CAgBN;AAMD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CACpC,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,WAAW,CAAC,EAAE,MAAM,GACnB,IAAI,CAQN"}
@@ -0,0 +1,123 @@
1
+ /**
2
+ * Shared validation helpers for field-equation predicate AST nodes
3
+ * (`EinsteinFieldEquationNode`, and future `MaxwellEquationNode`,
4
+ * `KleinGordonEquationNode`, etc.).
5
+ *
6
+ * Per `docs/architecture/v0.7-tensor-equation-node-design-note.md`
7
+ * Phase 0 — extract the 3 invariant checks from
8
+ * `validateEinsteinFieldEquation` so future field equations get
9
+ * them for free, instead of copy-pasting the predicate bodies.
10
+ * Investment-upfront pattern: same shape as v0.6.1's
11
+ * validator-registry refactor.
12
+ *
13
+ * Three helpers, all behavior-preserving extractions:
14
+ *
15
+ * - `validateFreeIndexLabelMatch` — checks lhs and rhs carry
16
+ * the same free-index labels in the same order. Generic over
17
+ * rank (works for rank-1 Maxwell `∇_μ F^{μν}`, rank-2 EFE,
18
+ * etc.).
19
+ *
20
+ * - `validateComponentDimension` — checks a tensor's
21
+ * `componentDim` matches an expected `Dimension`. Generic
22
+ * over which tensor and what equation context.
23
+ *
24
+ * - `validateTensorSymmetry` — checks a tensor's `symmetry`
25
+ * field equals an expected value. Generic over tensor +
26
+ * equation context.
27
+ *
28
+ * @module dimensional/field-equation-helpers
29
+ */
30
+ // ---------------------------------------------------------------------------
31
+ // Helper 1 — Free-index label agreement
32
+ // ---------------------------------------------------------------------------
33
+ /**
34
+ * Assert that the LHS and RHS of a field-equation predicate carry
35
+ * the same free-index labels in the same order.
36
+ *
37
+ * Throws `Error` with `"index label"` in the message (matches the
38
+ * existing `validateEinsteinFieldEquation` error prose, so any
39
+ * test pattern-matching that string stays green).
40
+ *
41
+ * @param equationKind - Discriminator for the error message
42
+ * (e.g., `'EinsteinFieldEquationNode'`, `'MaxwellEquationNode'`).
43
+ * @param lhsName - Human label for the LHS in the error (e.g., `'G_μν'`).
44
+ * @param lhsLabels - Free-index labels from the LHS, in axis order.
45
+ * @param rhsName - Human label for the RHS (e.g., `'T_μν'`).
46
+ * @param rhsLabels - Free-index labels from the RHS, in axis order.
47
+ *
48
+ * @internal
49
+ */
50
+ export function validateFreeIndexLabelMatch(equationKind, lhsName, lhsLabels, rhsName, rhsLabels) {
51
+ if (lhsLabels.length !== rhsLabels.length) {
52
+ throw new Error(`${equationKind}: index label rank mismatch — LHS ${lhsName} has ` +
53
+ `${lhsLabels.length} free indices (${lhsLabels.join(', ')}) but RHS ` +
54
+ `${rhsName} has ${rhsLabels.length} (${rhsLabels.join(', ')}). ` +
55
+ `Both sides must carry the same rank.`);
56
+ }
57
+ for (let i = 0; i < lhsLabels.length; i++) {
58
+ if (lhsLabels[i] !== rhsLabels[i]) {
59
+ throw new Error(`${equationKind}: index label mismatch — LHS ${lhsName} has free ` +
60
+ `indices (${lhsLabels.join(', ')}) but RHS ${rhsName} has ` +
61
+ `(${rhsLabels.join(', ')}). Both sides must carry the same lower ` +
62
+ `index labels in the same axis order.`);
63
+ }
64
+ }
65
+ }
66
+ // ---------------------------------------------------------------------------
67
+ // Helper 2 — Per-component dimensional equality
68
+ // ---------------------------------------------------------------------------
69
+ /**
70
+ * Assert that an `actual: Dimension` equals an `expected: Dimension`
71
+ * across all seven base SI axes (L, M, T, I, Theta, N, J).
72
+ *
73
+ * Throws `Error` with `"dimension"` in the message (matches the
74
+ * existing error prose convention).
75
+ *
76
+ * @param equationKind - Discriminator (e.g., `'EinsteinFieldEquationNode'`).
77
+ * @param tensorName - Human label for the tensor being checked
78
+ * (e.g., `'T_μν componentDim'`).
79
+ * @param actual - The actual `Dimension` from the AST node.
80
+ * @param expected - The expected `Dimension`.
81
+ * @param explanation - Optional trailing message explaining why
82
+ * this dimension is required (e.g., `"so that (8πG/c⁴)·T_μν ~ [L⁻²]"`).
83
+ *
84
+ * @internal
85
+ */
86
+ export function validateComponentDimension(equationKind, tensorName, actual, expected, explanation) {
87
+ if (actual.L !== expected.L ||
88
+ actual.M !== expected.M ||
89
+ actual.T !== expected.T ||
90
+ actual.I !== expected.I ||
91
+ actual.Theta !== expected.Theta ||
92
+ actual.N !== expected.N ||
93
+ actual.J !== expected.J) {
94
+ const tail = explanation ? ` ${explanation}` : '';
95
+ throw new Error(`${equationKind}: dimension mismatch — ${tensorName} must be ` +
96
+ `${JSON.stringify(expected)} but got ${JSON.stringify(actual)}.${tail}`);
97
+ }
98
+ }
99
+ // ---------------------------------------------------------------------------
100
+ // Helper 3 — Tensor symmetry agreement
101
+ // ---------------------------------------------------------------------------
102
+ /**
103
+ * Assert that a tensor's `symmetry` field equals `expected`.
104
+ *
105
+ * Throws `Error` with `"symmetry"` in the message.
106
+ *
107
+ * @param equationKind - Discriminator (e.g., `'EinsteinFieldEquationNode'`).
108
+ * @param tensorName - Human label (e.g., `'T_μν'`).
109
+ * @param actual - The tensor's actual `symmetry` value.
110
+ * @param expected - The required `symmetry` value (e.g., `'symmetric'`).
111
+ * @param explanation - Optional trailing message (e.g., `"Both sides of
112
+ * the EFE are symmetric in (μ,ν)"`).
113
+ *
114
+ * @internal
115
+ */
116
+ export function validateTensorSymmetry(equationKind, tensorName, actual, expected, explanation) {
117
+ if (actual !== expected) {
118
+ const tail = explanation ? ` ${explanation}` : '';
119
+ throw new Error(`${equationKind}: symmetry mismatch — ${tensorName} must have ` +
120
+ `symmetry: '${expected}' (got '${actual}').${tail}`);
121
+ }
122
+ }
123
+ //# sourceMappingURL=field-equation-helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field-equation-helpers.js","sourceRoot":"","sources":["../../src/dimensional/field-equation-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;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AAM,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC;QACvB,MAAM,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC;QACvB,MAAM,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK;QAC/B,MAAM,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC;QACvB,MAAM,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,EACvB,CAAC;QACD,MAAM,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAClD,MAAM,IAAI,KAAK,CACb,GAAG,YAAY,0BAA0B,UAAU,WAAW;YAC9D,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,YAAY,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CACxE,CAAC;IACJ,CAAC;AACH,CAAC;AAED,8EAA8E;AAC9E,uCAAuC;AACvC,8EAA8E;AAE9E;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,sBAAsB,CACpC,YAAoB,EACpB,UAAkB,EAClB,MAAc,EACd,QAAgB,EAChB,WAAoB;IAEpB,IAAI,MAAM,KAAK,QAAQ,EAAE,CAAC;QACxB,MAAM,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAClD,MAAM,IAAI,KAAK,CACb,GAAG,YAAY,yBAAyB,UAAU,aAAa;YAC/D,cAAc,QAAQ,WAAW,MAAM,MAAM,IAAI,EAAE,CACpD,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,148 @@
1
+ /**
2
+ * Friedmann equation AST node — modified-cosmology predicate.
3
+ *
4
+ * Per `docs/architecture/v0.7-be-x-reencoding-design-note.md`
5
+ * §"BE-19 — `FriedmannEquationNode` for modified-Friedmann
6
+ * predicates". Fourth of four BE-X structural re-encodings in the
7
+ * v0.7-series follow-up to the v0.6.0 deferred-bridges list.
8
+ *
9
+ * Represents the predicate
10
+ *
11
+ * H² = (8πG/3) · ρ · [correction]
12
+ *
13
+ * where H is the Hubble parameter, ρ the cosmic energy/mass-density,
14
+ * and `[correction]` is a variant-tagged extension term. The classical
15
+ * FRW form takes `correction = null`; modified-cosmology variants
16
+ * (LQC bounce, Randall-Sundrum brane, DGP, dRGT massive gravity)
17
+ * tag their correction with a `variant` discriminator so consumers
18
+ * can pattern-match on which cosmological regime the equation
19
+ * occupies.
20
+ *
21
+ * Discriminator vocabulary:
22
+ *
23
+ * - `'classical'` — canonical FRW `H² = (8πG/3) ρ` (the [-k/a²]
24
+ * and [Λ/3] terms ride along as additive scalars, not the
25
+ * `correction` slot). `correction` MUST be `null`.
26
+ * - `'lqc'` — Loop Quantum Cosmology bounce `(1 − ρ/ρ_crit)`. The
27
+ * correction is a DIMENSIONLESS multiplicative factor.
28
+ * - `'brane'` — Randall-Sundrum brane-tension `(1 + ρ/(2σ))`. Also
29
+ * dimensionless multiplicative.
30
+ * - `'dgp'` — Dvali-Gabadadze-Porrati 5D-crossover `±H/r_c`. The
31
+ * `correction` slot holds a stub for the additional scale; this
32
+ * variant signals "5D structure present" — fine-grained dim
33
+ * discipline left for future BE-NN landing.
34
+ * - `'massive'` — dRGT massive-gravity graviton-mass term. The
35
+ * `correction` slot holds the graviton-mass^2 contribution; dim
36
+ * discipline left for future BE-NN landing.
37
+ *
38
+ * The variant discriminator is the load-bearing structural fact:
39
+ * future modified-cosmology bridges (brane, DGP, dRGT) land as new
40
+ * `BridgeEquation` entries that produce `FriedmannEquationNode`s
41
+ * with the appropriate variant tag, instead of each inventing a
42
+ * separate AST primitive.
43
+ *
44
+ * References:
45
+ * - Mukhanov, *Physical Foundations of Cosmology* (2005), §2.1
46
+ * for the canonical FRW Friedmann equation derivation.
47
+ * - Ashtekar & Singh, *Loop Quantum Cosmology: A Status Report*
48
+ * (2011), arXiv:1108.0893 — for the LQC `(1 − ρ/ρ_crit)` bounce
49
+ * factor; the canonical reference for the `'lqc'` variant
50
+ * consumed by BE-19.
51
+ *
52
+ * Status: PREDICATE node like `EinsteinFieldEquationNode` and
53
+ * `KleinGordonEquationNode` — not a value-producing expression.
54
+ * Numerical evaluation of a specific FRW history is out of scope
55
+ * (numerical evaluators live alongside per-bridge encodings — e.g.
56
+ * `evaluateQuantumBounce` in `src/bridges/equations/be-19-quantum-bounce.ts`).
57
+ *
58
+ * @module dimensional/friedmann-equation
59
+ */
60
+ import type { Dimension } from './types.js';
61
+ import type { ScalarFieldNode } from './klein-gordon-equation.js';
62
+ /**
63
+ * Tag for the cosmological regime a `FriedmannEquationNode`
64
+ * represents. Each variant identifies a structural pattern of
65
+ * deviation from canonical FRW; consumers pattern-match on this
66
+ * discriminator to select regime-specific downstream logic.
67
+ *
68
+ * See the module docstring for the per-variant semantics.
69
+ *
70
+ * @public
71
+ */
72
+ export type FriedmannVariant = 'classical' | 'lqc' | 'brane' | 'dgp' | 'massive';
73
+ /**
74
+ * AST node for the modified Friedmann equation
75
+ *
76
+ * H² = (8πG/3) · ρ · [variant-specific correction]
77
+ *
78
+ * Fields:
79
+ * - `hubble` — H or H² as a `ScalarFieldNode`. Accepted dims
80
+ * are `[T^-1]` (H) or `[T^-2]` (H²); the validator
81
+ * does NOT square the field for you, it only
82
+ * checks the stated dim is one of the two.
83
+ * - `density` — ρ as a `ScalarFieldNode`, dim `[M·L^-3]`
84
+ * (mass-density convention, aligning with BE-19's
85
+ * existing `QUANTUM_BOUNCE_RHS` encoding).
86
+ * - `correction` — the variant-specific extension. `null` IFF
87
+ * `variant === 'classical'`. For `'lqc'`, the
88
+ * correction's dim is constrained to be
89
+ * dimensionless (the `(1 − ρ/ρ_crit)` factor).
90
+ * Other non-classical variants accept any dim
91
+ * (refinement deferred to per-bridge landing).
92
+ * - `variant` — the regime discriminator. See `FriedmannVariant`.
93
+ * - `coupling` — tag `'friedmann'` representing the symbolic
94
+ * `(8πG/3)` prefactor (no inline numeric).
95
+ *
96
+ * @public
97
+ */
98
+ export interface FriedmannEquationNode {
99
+ readonly kind: 'friedmann-equation';
100
+ readonly hubble: ScalarFieldNode;
101
+ readonly density: ScalarFieldNode;
102
+ readonly correction: ScalarFieldNode | null;
103
+ readonly variant: FriedmannVariant;
104
+ readonly coupling: 'friedmann';
105
+ }
106
+ /**
107
+ * Result of validating a `FriedmannEquationNode`. Mirrors
108
+ * `KleinGordonEquationValidationResult` shape.
109
+ *
110
+ * @public
111
+ */
112
+ export interface FriedmannEquationValidationResult {
113
+ /** Per-component dim of the equation — `[T^-2]` (H² shape). */
114
+ readonly dim: Dimension;
115
+ /** Empty free-indices map (rank-0 equation). */
116
+ readonly freeIndices: Map<string, {
117
+ upper: number;
118
+ lower: number;
119
+ }>;
120
+ /** Echo of the variant tag for downstream pattern-matching. */
121
+ readonly variant: FriedmannVariant;
122
+ }
123
+ /**
124
+ * Validate a `friedmann-equation` node.
125
+ *
126
+ * Predicates (mirroring the field-equation-helpers pattern):
127
+ *
128
+ * 1. **Variant discriminator** — `variant` must be one of the
129
+ * known tags. Throws with `"variant"` keyword on unknown values.
130
+ * 2. **Classical–correction consistency** — `variant === 'classical'`
131
+ * requires `correction === null`; any other variant requires
132
+ * `correction !== null`. Throws with `"variant"` keyword.
133
+ * 3. **Free-index agreement** — trivially passes (rank-0 equation).
134
+ * 4. **Per-component dim equality** — `hubble.dim` must be `[T^-2]`
135
+ * (H²) or `[T^-1]` (H); `density.dim` must be `[M·L^-3]`. For
136
+ * `variant === 'lqc'`, `correction.dim` must be dimensionless
137
+ * (the `(1 − ρ/ρ_crit)` bounce factor).
138
+ * 5. **Symmetry agreement** — all participants carry the trivial
139
+ * `'scalar'` marker.
140
+ *
141
+ * Errors carry the keywords `"dimension"` / `"symmetry"` (from the
142
+ * field-equation-helpers) and `"variant"` (for discriminator /
143
+ * classical-consistency violations).
144
+ *
145
+ * @public
146
+ */
147
+ export declare function validateFriedmannEquation(node: FriedmannEquationNode): FriedmannEquationValidationResult;
148
+ //# sourceMappingURL=friedmann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 * Friedmann equation AST node — modified-cosmology predicate.
3
+ *
4
+ * Per `docs/architecture/v0.7-be-x-reencoding-design-note.md`
5
+ * §"BE-19 — `FriedmannEquationNode` for modified-Friedmann
6
+ * predicates". Fourth of four BE-X structural re-encodings in the
7
+ * v0.7-series follow-up to the v0.6.0 deferred-bridges list.
8
+ *
9
+ * Represents the predicate
10
+ *
11
+ * H² = (8πG/3) · ρ · [correction]
12
+ *
13
+ * where H is the Hubble parameter, ρ the cosmic energy/mass-density,
14
+ * and `[correction]` is a variant-tagged extension term. The classical
15
+ * FRW form takes `correction = null`; modified-cosmology variants
16
+ * (LQC bounce, Randall-Sundrum brane, DGP, dRGT massive gravity)
17
+ * tag their correction with a `variant` discriminator so consumers
18
+ * can pattern-match on which cosmological regime the equation
19
+ * occupies.
20
+ *
21
+ * Discriminator vocabulary:
22
+ *
23
+ * - `'classical'` — canonical FRW `H² = (8πG/3) ρ` (the [-k/a²]
24
+ * and [Λ/3] terms ride along as additive scalars, not the
25
+ * `correction` slot). `correction` MUST be `null`.
26
+ * - `'lqc'` — Loop Quantum Cosmology bounce `(1 − ρ/ρ_crit)`. The
27
+ * correction is a DIMENSIONLESS multiplicative factor.
28
+ * - `'brane'` — Randall-Sundrum brane-tension `(1 + ρ/(2σ))`. Also
29
+ * dimensionless multiplicative.
30
+ * - `'dgp'` — Dvali-Gabadadze-Porrati 5D-crossover `±H/r_c`. The
31
+ * `correction` slot holds a stub for the additional scale; this
32
+ * variant signals "5D structure present" — fine-grained dim
33
+ * discipline left for future BE-NN landing.
34
+ * - `'massive'` — dRGT massive-gravity graviton-mass term. The
35
+ * `correction` slot holds the graviton-mass^2 contribution; dim
36
+ * discipline left for future BE-NN landing.
37
+ *
38
+ * The variant discriminator is the load-bearing structural fact:
39
+ * future modified-cosmology bridges (brane, DGP, dRGT) land as new
40
+ * `BridgeEquation` entries that produce `FriedmannEquationNode`s
41
+ * with the appropriate variant tag, instead of each inventing a
42
+ * separate AST primitive.
43
+ *
44
+ * References:
45
+ * - Mukhanov, *Physical Foundations of Cosmology* (2005), §2.1
46
+ * for the canonical FRW Friedmann equation derivation.
47
+ * - Ashtekar & Singh, *Loop Quantum Cosmology: A Status Report*
48
+ * (2011), arXiv:1108.0893 — for the LQC `(1 − ρ/ρ_crit)` bounce
49
+ * factor; the canonical reference for the `'lqc'` variant
50
+ * consumed by BE-19.
51
+ *
52
+ * Status: PREDICATE node like `EinsteinFieldEquationNode` and
53
+ * `KleinGordonEquationNode` — not a value-producing expression.
54
+ * Numerical evaluation of a specific FRW history is out of scope
55
+ * (numerical evaluators live alongside per-bridge encodings — e.g.
56
+ * `evaluateQuantumBounce` in `src/bridges/equations/be-19-quantum-bounce.ts`).
57
+ *
58
+ * @module dimensional/friedmann-equation
59
+ */
60
+ import { equals } from './algebra.js';
61
+ import { validateFreeIndexLabelMatch, validateComponentDimension, validateTensorSymmetry, } from './field-equation-helpers.js';
62
+ const KNOWN_VARIANTS = new Set([
63
+ 'classical',
64
+ 'lqc',
65
+ 'brane',
66
+ 'dgp',
67
+ 'massive',
68
+ ]);
69
+ // ---------------------------------------------------------------------------
70
+ // Expected dims
71
+ // ---------------------------------------------------------------------------
72
+ /** `[T^-2]`: dim of H² and of (8πG/3)·ρ in the canonical Friedmann form. */
73
+ const T_INV2 = { L: 0, M: 0, T: -2, I: 0, Theta: 0, N: 0, J: 0 };
74
+ /** `[T^-1]`: dim of the un-squared Hubble parameter H. */
75
+ const T_INV1 = { L: 0, M: 0, T: -1, I: 0, Theta: 0, N: 0, J: 0 };
76
+ /** `[M·L^-3]`: dim of mass-density ρ (canonical Friedmann convention). */
77
+ const MASS_DENSITY = { L: -3, M: 1, T: 0, I: 0, Theta: 0, N: 0, J: 0 };
78
+ /** `[]`: dimensionless (the LQC `(1 − ρ/ρ_crit)` correction factor). */
79
+ const DIMLESS = { L: 0, M: 0, T: 0, I: 0, Theta: 0, N: 0, J: 0 };
80
+ // ---------------------------------------------------------------------------
81
+ // Validator
82
+ // ---------------------------------------------------------------------------
83
+ /**
84
+ * Validate a `friedmann-equation` node.
85
+ *
86
+ * Predicates (mirroring the field-equation-helpers pattern):
87
+ *
88
+ * 1. **Variant discriminator** — `variant` must be one of the
89
+ * known tags. Throws with `"variant"` keyword on unknown values.
90
+ * 2. **Classical–correction consistency** — `variant === 'classical'`
91
+ * requires `correction === null`; any other variant requires
92
+ * `correction !== null`. Throws with `"variant"` keyword.
93
+ * 3. **Free-index agreement** — trivially passes (rank-0 equation).
94
+ * 4. **Per-component dim equality** — `hubble.dim` must be `[T^-2]`
95
+ * (H²) or `[T^-1]` (H); `density.dim` must be `[M·L^-3]`. For
96
+ * `variant === 'lqc'`, `correction.dim` must be dimensionless
97
+ * (the `(1 − ρ/ρ_crit)` bounce factor).
98
+ * 5. **Symmetry agreement** — all participants carry the trivial
99
+ * `'scalar'` marker.
100
+ *
101
+ * Errors carry the keywords `"dimension"` / `"symmetry"` (from the
102
+ * field-equation-helpers) and `"variant"` (for discriminator /
103
+ * classical-consistency violations).
104
+ *
105
+ * @public
106
+ */
107
+ export function validateFriedmannEquation(node) {
108
+ // Predicate 1: variant discriminator membership.
109
+ if (!KNOWN_VARIANTS.has(node.variant)) {
110
+ throw new Error(`FriedmannEquationNode: unknown variant '${node.variant}' — ` +
111
+ `must be one of 'classical' | 'lqc' | 'brane' | 'dgp' | 'massive'.`);
112
+ }
113
+ // Predicate 2: classical/correction consistency.
114
+ if (node.variant === 'classical' && node.correction !== null) {
115
+ throw new Error(`FriedmannEquationNode: variant 'classical' must carry ` +
116
+ `correction === null (the canonical FRW form has no ` +
117
+ `variant-specific correction term).`);
118
+ }
119
+ if (node.variant !== 'classical' && node.correction === null) {
120
+ throw new Error(`FriedmannEquationNode: variant '${node.variant}' requires a ` +
121
+ `non-null correction term (only the 'classical' variant accepts ` +
122
+ `correction === null).`);
123
+ }
124
+ // Predicate 3: free-index agreement (trivially: both rank-0).
125
+ validateFreeIndexLabelMatch('FriedmannEquationNode', 'H²', [], '(8πG/3)·ρ·correction', []);
126
+ // Predicate 4a: hubble dim must be [T^-2] or [T^-1].
127
+ if (!equals(node.hubble.dim, T_INV2) && !equals(node.hubble.dim, T_INV1)) {
128
+ throw new Error(`FriedmannEquationNode: dimension mismatch — hubble.dim must be ` +
129
+ `${JSON.stringify(T_INV2)} (H²) or ${JSON.stringify(T_INV1)} (H), ` +
130
+ `got ${JSON.stringify(node.hubble.dim)}.`);
131
+ }
132
+ // Predicate 4b: density dim must be [M·L^-3] (mass-density convention).
133
+ validateComponentDimension('FriedmannEquationNode', 'density ρ.dim', node.density.dim, MASS_DENSITY, 'ρ is the cosmic mass-density; Friedmann uses [M·L^-3] (so (8πG/3)·ρ ~ [T^-2]).');
134
+ // Predicate 4c: LQC correction must be dimensionless.
135
+ if (node.variant === 'lqc' && node.correction !== null) {
136
+ validateComponentDimension('FriedmannEquationNode', "lqc correction.dim", node.correction.dim, DIMLESS, 'LQC bounce factor (1 − ρ/ρ_crit) is dimensionless.');
137
+ }
138
+ // Predicate 5: symmetry agreement — all 'scalar'.
139
+ validateTensorSymmetry('FriedmannEquationNode', 'hubble', node.hubble.symmetry, 'scalar', 'Friedmann is a cosmological scalar equation.');
140
+ validateTensorSymmetry('FriedmannEquationNode', 'density', node.density.symmetry, 'scalar', 'ρ is a cosmological scalar.');
141
+ if (node.correction !== null) {
142
+ validateTensorSymmetry('FriedmannEquationNode', 'correction', node.correction.symmetry, 'scalar', 'Friedmann correction terms are encoded as scalar factors.');
143
+ }
144
+ return {
145
+ dim: T_INV2,
146
+ freeIndices: new Map(),
147
+ variant: node.variant,
148
+ };
149
+ }
150
+ //# sourceMappingURL=friedmann-equation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"friedmann-equation.js","sourceRoot":"","sources":["../../src/dimensional/friedmann-equation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AAIH,OAAO,EAAE,MAAM,EAAE,MAAM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