universal-physics-tensor 0.5.1 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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,128 @@
1
+ /**
2
+ * TensorTraceNode — structural tensor-trace operator for rank-2 tensors.
3
+ *
4
+ * Per `docs/architecture/v0.7-be-x-reencoding-design-note.md` §"BE-13 —
5
+ * TensorTraceNode for the Einstein trace". First of four BE-X re-encoding
6
+ * primitives planned for the v0.7 sprint.
7
+ *
8
+ * Represents the contraction
9
+ *
10
+ * T = T^μ_μ = g^μν T_μν
11
+ *
12
+ * where `g^μν` is the inverse metric (upper-upper, dimensionless) and
13
+ * `T_μν` is a rank-2 lower-lower tensor (e.g., the stress-energy tensor).
14
+ * The result is a scalar whose SI dimension equals the component dimension
15
+ * of the tensor being traced (the inverse metric is dimensionless, so it
16
+ * passes the tensor's dimension through unchanged).
17
+ *
18
+ * This node is a PREDICATE node in the same family as
19
+ * `EinsteinFieldEquationNode` and `KleinGordonEquationNode` — not a
20
+ * value-producing expression. It documents the structural relationship
21
+ * "this scalar arose by contracting a rank-2 tensor with the inverse
22
+ * metric" so that downstream symbolic consumers (bridge cross-validators,
23
+ * dimensional-signature catalog round-trips) can inspect the trace
24
+ * structure rather than treating it as an opaque stub symbol.
25
+ *
26
+ * @module dimensional/tensor-trace
27
+ */
28
+ import type { Dimension } from './types.js';
29
+ import type { MetricTensorNode } from './metric-validators.js';
30
+ /**
31
+ * Minimal interface for rank-2 tensors that can be traced via
32
+ * `TensorTraceNode`. Any rank-2 lower-lower node satisfies this:
33
+ * `TensorSymbolNode` (with `.dim` aliased to `componentDim` by callers),
34
+ * `StressEnergyTensorNode`, or custom rank-2 nodes.
35
+ *
36
+ * Fields:
37
+ * - `indices` — Exactly two index slots; each must carry `variance: 'lower'`.
38
+ * - `componentDim` — SI dimension of a single component of the tensor.
39
+ * - `symmetry` — Symmetry tag (`'symmetric'`, `'antisymmetric'`,
40
+ * `'none'`, or other string). Checked to be
41
+ * `'symmetric'` by `validateTensorTrace`'s default
42
+ * predicate (physical stress-energy and Ricci tensors
43
+ * are symmetric; caller may override via the options
44
+ * argument if tracing a non-symmetric rank-2 tensor).
45
+ *
46
+ * @public
47
+ */
48
+ export interface TracableTensorNode {
49
+ readonly indices: ReadonlyArray<{
50
+ readonly variance: string;
51
+ }>;
52
+ readonly componentDim: Dimension;
53
+ readonly symmetry: string;
54
+ }
55
+ /**
56
+ * AST node for the trace operation `T = g^μν T_μν`.
57
+ *
58
+ * Fields:
59
+ * - `tensor` — The rank-2 lower-lower tensor being traced (e.g., `T_μν`).
60
+ * - `metric` — The inverse metric `g^μν` (rank-2 upper-upper,
61
+ * dimensionless) used for the contraction.
62
+ *
63
+ * The resulting scalar has `dim = tensor.componentDim` (the inverse metric
64
+ * is dimensionless, so the trace carries the tensor's component dimension
65
+ * unchanged).
66
+ *
67
+ * @public
68
+ */
69
+ export interface TensorTraceNode {
70
+ /** Discriminator: 'tensor-trace'. */
71
+ readonly kind: 'tensor-trace';
72
+ /** The rank-2 lower-lower tensor being traced. */
73
+ readonly tensor: TracableTensorNode;
74
+ /** The inverse metric `g^μν` supplying the upper-upper contraction. */
75
+ readonly metric: MetricTensorNode;
76
+ }
77
+ /**
78
+ * Result of validating a `TensorTraceNode`. The trace collapses all
79
+ * free indices — the result is a scalar.
80
+ *
81
+ * @public
82
+ */
83
+ export interface TensorTraceValidationResult {
84
+ /** SI dimension of the resulting scalar. Equals `tensor.componentDim`. */
85
+ readonly dim: Dimension;
86
+ /** Empty free-indices map (trace is rank-0). */
87
+ readonly freeIndices: Map<string, {
88
+ upper: number;
89
+ lower: number;
90
+ }>;
91
+ }
92
+ /**
93
+ * Options for `validateTensorTrace`.
94
+ *
95
+ * @public
96
+ */
97
+ export interface TensorTraceOptions {
98
+ /**
99
+ * Expected symmetry of the tensor being traced. Defaults to
100
+ * `'symmetric'` (appropriate for T_μν, R_μν, G_μν, etc.). Pass a
101
+ * different value if tracing a non-symmetric rank-2 tensor.
102
+ */
103
+ readonly expectedTensorSymmetry?: string;
104
+ }
105
+ /**
106
+ * Validate a `tensor-trace` node.
107
+ *
108
+ * Three structural predicates (using the field-equation-helpers pattern):
109
+ *
110
+ * 1. **Index variance** — `tensor.indices` must be exactly 2, each
111
+ * `variance === 'lower'` (rank-2 lower-lower). Error keyword: `"index"`.
112
+ * 2. **Metric variance** — `metric.indices` must be exactly 2, each
113
+ * `variance === 'upper'` (rank-2 upper-upper inverse form). The metric
114
+ * must be dimensionless; error keyword: `"dimension"`.
115
+ * 3. **Tensor symmetry** — `tensor.symmetry` must equal the expected
116
+ * symmetry (default `'symmetric'`). Error keyword: `"symmetry"`.
117
+ *
118
+ * Returns the scalar result dimension (`tensor.componentDim`) with an
119
+ * empty `freeIndices` map.
120
+ *
121
+ * Errors carry the keywords `"index"`, `"dimension"`, or `"symmetry"` per
122
+ * the field-equation-helpers error-vocabulary convention, so consumer
123
+ * pattern-matching on those strings stays consistent across equation nodes.
124
+ *
125
+ * @public
126
+ */
127
+ export declare function validateTensorTrace(node: TensorTraceNode, options?: TensorTraceOptions): TensorTraceValidationResult;
128
+ //# sourceMappingURL=tensor-trace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tensor-trace.d.ts","sourceRoot":"","sources":["../../src/dimensional/tensor-trace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAU/D;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;QAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/D,QAAQ,CAAC,YAAY,EAAE,SAAS,CAAC;IACjC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAMD;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,eAAe;IAC9B,qCAAqC;IACrC,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,kDAAkD;IAClD,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IACpC,uEAAuE;IACvE,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;CACnC;AAMD;;;;;GAKG;AACH,MAAM,WAAW,2BAA2B;IAC1C,0EAA0E;IAC1E,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC;IACxB,gDAAgD;IAChD,QAAQ,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACrE;AAMD;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,QAAQ,CAAC,sBAAsB,CAAC,EAAE,MAAM,CAAC;CAC1C;AAOD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,eAAe,EACrB,OAAO,GAAE,kBAAuB,GAC/B,2BAA2B,CAkE7B"}
@@ -0,0 +1,95 @@
1
+ /**
2
+ * TensorTraceNode — structural tensor-trace operator for rank-2 tensors.
3
+ *
4
+ * Per `docs/architecture/v0.7-be-x-reencoding-design-note.md` §"BE-13 —
5
+ * TensorTraceNode for the Einstein trace". First of four BE-X re-encoding
6
+ * primitives planned for the v0.7 sprint.
7
+ *
8
+ * Represents the contraction
9
+ *
10
+ * T = T^μ_μ = g^μν T_μν
11
+ *
12
+ * where `g^μν` is the inverse metric (upper-upper, dimensionless) and
13
+ * `T_μν` is a rank-2 lower-lower tensor (e.g., the stress-energy tensor).
14
+ * The result is a scalar whose SI dimension equals the component dimension
15
+ * of the tensor being traced (the inverse metric is dimensionless, so it
16
+ * passes the tensor's dimension through unchanged).
17
+ *
18
+ * This node is a PREDICATE node in the same family as
19
+ * `EinsteinFieldEquationNode` and `KleinGordonEquationNode` — not a
20
+ * value-producing expression. It documents the structural relationship
21
+ * "this scalar arose by contracting a rank-2 tensor with the inverse
22
+ * metric" so that downstream symbolic consumers (bridge cross-validators,
23
+ * dimensional-signature catalog round-trips) can inspect the trace
24
+ * structure rather than treating it as an opaque stub symbol.
25
+ *
26
+ * @module dimensional/tensor-trace
27
+ */
28
+ import { validateComponentDimension, validateTensorSymmetry, } from './field-equation-helpers.js';
29
+ /** The SI dimension of a dimensionless metric g^μν: all zeros. */
30
+ const DIMENSIONLESS_DIM = {
31
+ L: 0, M: 0, T: 0, I: 0, Theta: 0, N: 0, J: 0,
32
+ };
33
+ /**
34
+ * Validate a `tensor-trace` node.
35
+ *
36
+ * Three structural predicates (using the field-equation-helpers pattern):
37
+ *
38
+ * 1. **Index variance** — `tensor.indices` must be exactly 2, each
39
+ * `variance === 'lower'` (rank-2 lower-lower). Error keyword: `"index"`.
40
+ * 2. **Metric variance** — `metric.indices` must be exactly 2, each
41
+ * `variance === 'upper'` (rank-2 upper-upper inverse form). The metric
42
+ * must be dimensionless; error keyword: `"dimension"`.
43
+ * 3. **Tensor symmetry** — `tensor.symmetry` must equal the expected
44
+ * symmetry (default `'symmetric'`). Error keyword: `"symmetry"`.
45
+ *
46
+ * Returns the scalar result dimension (`tensor.componentDim`) with an
47
+ * empty `freeIndices` map.
48
+ *
49
+ * Errors carry the keywords `"index"`, `"dimension"`, or `"symmetry"` per
50
+ * the field-equation-helpers error-vocabulary convention, so consumer
51
+ * pattern-matching on those strings stays consistent across equation nodes.
52
+ *
53
+ * @public
54
+ */
55
+ export function validateTensorTrace(node, options = {}) {
56
+ const expectedSymmetry = options.expectedTensorSymmetry ?? 'symmetric';
57
+ // Predicate 1a: tensor must be rank-2.
58
+ if (node.tensor.indices.length !== 2) {
59
+ throw new Error(`TensorTraceNode: index rank error — tensor must be rank-2 ` +
60
+ `(got rank-${node.tensor.indices.length}). ` +
61
+ `Only rank-2 lower-lower tensors can be traced via g^μν contraction.`);
62
+ }
63
+ // Predicate 1b: both tensor index slots must be lower.
64
+ for (let i = 0; i < node.tensor.indices.length; i++) {
65
+ const idx = node.tensor.indices[i];
66
+ if (idx.variance !== 'lower') {
67
+ throw new Error(`TensorTraceNode: index variance error — tensor.indices[${i}] ` +
68
+ `must have variance 'lower' (got '${idx.variance}'). ` +
69
+ `The trace g^μν T_μν requires T to be lower-lower.`);
70
+ }
71
+ }
72
+ // Predicate 2a: metric must be rank-2.
73
+ if (node.metric.indices.length !== 2) {
74
+ throw new Error(`TensorTraceNode: index rank error — metric must be rank-2 ` +
75
+ `(got rank-${node.metric.indices.length}).`);
76
+ }
77
+ // Predicate 2b: both metric index slots must be upper.
78
+ for (let i = 0; i < node.metric.indices.length; i++) {
79
+ const idx = node.metric.indices[i];
80
+ if (idx.variance !== 'upper') {
81
+ throw new Error(`TensorTraceNode: index variance error — metric.indices[${i}] ` +
82
+ `must have variance 'upper' (got '${idx.variance}'). ` +
83
+ `The inverse metric g^μν must be upper-upper for the contraction.`);
84
+ }
85
+ }
86
+ // Predicate 2c: the inverse metric must be dimensionless.
87
+ validateComponentDimension('TensorTraceNode', 'metric (g^μν) dim', node.metric.dim, DIMENSIONLESS_DIM, 'The inverse metric g^μν is dimensionless; the trace dimension equals the tensor component dimension.');
88
+ // Predicate 3: tensor symmetry check.
89
+ validateTensorSymmetry('TensorTraceNode', 'tensor', node.tensor.symmetry, expectedSymmetry, `Physical rank-2 tensors eligible for Einstein-trace contraction are ${expectedSymmetry}.`);
90
+ return {
91
+ dim: node.tensor.componentDim,
92
+ freeIndices: new Map(),
93
+ };
94
+ }
95
+ //# sourceMappingURL=tensor-trace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tensor-trace.js","sourceRoot":"","sources":["../../src/dimensional/tensor-trace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAIH,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,6BAA6B,CAAC;AA4FrC,kEAAkE;AAClE,MAAM,iBAAiB,GAAc;IACnC,CAAC,EAAE,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;CAC7C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,mBAAmB,CACjC,IAAqB,EACrB,UAA8B,EAAE;IAEhC,MAAM,gBAAgB,GA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AC/D,oCAAoC,GAAG,CAAC,QAAQ,MAAM;gBACtD,kEAAkE,CACnE,CAAC;QACJ,CAAC;IACH,CAAC;IAED,0DAA0D;IAC1D,0BAA0B,CACxB,iBAAiB,EACjB,mBAAmB,EACnB,IAAI,CAAC,MAAM,CAAC,GAAG,EACf,iBAAiB,EACjB,sGAAsG,CACvG,CAAC;IAEF,sCAAsC;IACtC,sBAAsB,CACpB,iBAAiB,EACjB,QAAQ,EACR,IAAI,CAAC,MAAM,CAAC,QAAQ,EACpB,gBAAgB,EAChB,uEAAuE,gBAAgB,GAAG,CAC3F,CAAC;IAEF,OAAO;QACL,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,YAAY;QAC7B,WAAW,EAAE,IAAI,GAAG,EAAE;KACvB,CAAC;AACJ,CAAC"}
@@ -41,11 +41,6 @@ export interface TensorProductNode {
41
41
  readonly kind: 'tensor-product';
42
42
  readonly args: ReadonlyArray<ExprNode>;
43
43
  }
44
- /**
45
- * The kind tags this module contributes to the ExprNode union. Used by
46
- * validator.ts to compose the full discriminated union via re-export.
47
- */
48
- export type TensorExprNode = TensorSymbolNode | TensorProductNode;
49
44
  /**
50
45
  * Result shape returned by `validateTensorSymbol`. A minimal carrier for
51
46
  * the inferred per-component dimension plus the free-indices map built
@@ -53,7 +48,7 @@ export type TensorExprNode = TensorSymbolNode | TensorProductNode;
53
48
  * into its `Dimension | null` return shape and merges `freeIndices` into
54
49
  * the outer accumulator.
55
50
  */
56
- export interface TensorSymbolValidationResult {
51
+ interface TensorSymbolValidationResult {
57
52
  readonly dim: Dimension;
58
53
  readonly freeIndices: Map<string, {
59
54
  upper: number;
@@ -82,7 +77,7 @@ export declare function validateTensorSymbol(node: TensorSymbolNode): TensorSymb
82
77
  * the returned `contractionPairs` with its own einsum-pattern compiler,
83
78
  * and multiply concrete numerical tensors using its dimensions.
84
79
  */
85
- export interface ContractionResult {
80
+ interface ContractionResult {
86
81
  /** Resulting per-component dimension (product of operand dims). */
87
82
  readonly dim: Dimension;
88
83
  /** Free indices remaining after Einstein contraction. */
@@ -144,10 +139,13 @@ export interface ChildValidationResult {
144
139
  export declare function computeContraction(args: ReadonlyArray<ExprNode>, validateChild: (node: ExprNode) => ChildValidationResult): ContractionResult;
145
140
  /** Construct a tensor-symbol node. */
146
141
  export declare function tsym(name: string, indices: ReadonlyArray<TensorIndex>, dim: Dimension, role?: Role, numericalForm?: 'symbolic' | 'numerical-fn' | 'grid'): TensorSymbolNode;
147
- /** Scale a tensor by a scalar coefficient. Returns a tensor-product. */
142
+ /** Scale a tensor by a scalar coefficient. Returns a tensor-product.
143
+ *
144
+ * @public */
148
145
  export declare function scale(scalar: ExprNode, tensor: ExprNode): TensorProductNode;
149
146
  /** Contract any number of operands. Returns a tensor-product. */
150
147
  export declare function contract(...args: ExprNode[]): TensorProductNode;
151
148
  /** Tensor sum via op '+'. Validator enforces matching free indices. */
152
149
  export declare function tsum(...args: ExprNode[]): ExprNode;
150
+ export {};
153
151
  //# sourceMappingURL=tensor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tensor.d.ts","sourceRoot":"","sources":["../../src/dimensional/tensor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAO5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAO/C,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;AACzC,MAAM,MAAM,IAAI,GAAG,YAAY,GAAG,OAAO,GAAG,UAAU,CAAC;AAEvD,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;CAC7B;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CA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AAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC7D;AAED;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC,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;CACrE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,aAAa,CAAC,QAAQ,CAAC,EAC7B,aAAa,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,qBAAqB,GACvD,iBAAiB,CAkDnB;AAED,sCAAsC;AACtC,wBAAgB,IAAI,CAClB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC,EACnC,GAAG,EAAE,SAAS,EACd,IAAI,CAAC,EAAE,IAAI,EACX,aAAa,CAAC,EAAE,UAAU,GAAG,cAAc,GAAG,MAAM,GACnD,gBAAgB,CAYlB;AAED;;cAEc;AACd,wBAAgB,KAAK,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,GAAG,iBAAiB,CAE3E;AAED,iEAAiE;AACjE,wBAAgB,QAAQ,CAAC,GAAG,IAAI,EAAE,QAAQ,EAAE,GAAG,iBAAiB,CAE/D;AAED,uEAAuE;AACvE,wBAAgB,IAAI,CAAC,GAAG,IAAI,EAAE,QAAQ,EAAE,GAAG,QAAQ,CAElD"}
@@ -128,7 +128,9 @@ export function tsym(name, indices, dim, role, numericalForm) {
128
128
  node.numericalForm = numericalForm;
129
129
  return node;
130
130
  }
131
- /** Scale a tensor by a scalar coefficient. Returns a tensor-product. */
131
+ /** Scale a tensor by a scalar coefficient. Returns a tensor-product.
132
+ *
133
+ * @public */
132
134
  export function scale(scalar, tensor) {
133
135
  return { kind: 'tensor-product', args: [scalar, t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from `validator.ts`'s `infer()` switch in v0.6.1 Phase 2.
5
+ * Eleven `infer()` arms — `riemann-tensor`, `ricci-tensor`, `einstein-
6
+ * tensor`, `bianchi-residual`, `killing-vector`, `conserved-charge`,
7
+ * `stress-energy`, `cosmological-constant`, `einstein-equation`,
8
+ * `weyl-tensor`, `kretschmann-scalar` — all follow the same shape
9
+ * (call a `validateX(...)` function, then either propagate the
10
+ * returned `freeIndices` into the parent context or skip the merge
11
+ * for scalar kinds). Capturing that shape in a registry eliminates
12
+ * 11×~10 LOC of boilerplate in `validator.ts` and makes the per-arm
13
+ * pattern explicit at the registry-definition site.
14
+ *
15
+ * **Three patterns**, per the Adam+Eve adversarial review of the
16
+ * v0.6.1 Design (S2): a naive `propagateFreeIndices: boolean` flag is
17
+ * insufficient — three arms (`ricci-tensor`, `einstein-tensor`,
18
+ * `bianchi-residual`) pass a riemann-child closure into their
19
+ * validator, while the other eight do not. The pattern tag captures
20
+ * this asymmetry exhaustively:
21
+ *
22
+ * - **Pattern A** — `validateX(node)`, propagate freeIndices.
23
+ * Used by: `riemann-tensor`, `killing-vector`, `stress-energy`,
24
+ * `einstein-equation`, `weyl-tensor`.
25
+ *
26
+ * - **Pattern B** — `validateX(node, riemannCallback)`, propagate
27
+ * freeIndices. Used by: `ricci-tensor`, `einstein-tensor`,
28
+ * `bianchi-residual`. The callback re-validates an embedded
29
+ * Riemann sub-node so its signature checks fire while only the
30
+ * outer (post-contraction) free indices propagate to the parent.
31
+ *
32
+ * - **Pattern C** — `validateX(node)`, freeIndices is empty (scalar
33
+ * result); skip the merge loop entirely. Used by:
34
+ * `conserved-charge`, `cosmological-constant`, `kretschmann-scalar`.
35
+ *
36
+ * The discriminated union type below makes adding a new GR-object
37
+ * node-kind a compile-time decision: the new entry must explicitly
38
+ * declare its pattern, or TypeScript will fail to typecheck the
39
+ * registry. This guards against the v0.5.0 ricci-slot-bug shape
40
+ * (silent miscompute when a new arm follows the "wrong" pattern by
41
+ * default).
42
+ *
43
+ * @module dimensional/validator-registry
44
+ */
45
+ import type { Dimension } from './types.js';
46
+ import { type RiemannChildCallback } from './curvature.js';
47
+ /** Shape of every `validateX` result the registry dispatches over. */
48
+ type ValidatorResult = {
49
+ readonly dim: Dimension;
50
+ readonly freeIndices: Map<string, {
51
+ upper: number;
52
+ lower: number;
53
+ }>;
54
+ };
55
+ /** Discriminated-union entry per node-kind. */
56
+ type ValidatorEntry = {
57
+ pattern: 'A';
58
+ validator: (node: never) => ValidatorResult;
59
+ } | {
60
+ pattern: 'B';
61
+ validator: (node: never, cb: RiemannChildCallback) => ValidatorResult;
62
+ } | {
63
+ pattern: 'C';
64
+ validator: (node: never) => ValidatorResult;
65
+ };
66
+ /**
67
+ * Look up the registry entry for a node-kind, returning `undefined`
68
+ * for kinds not covered by this registry (the caller falls through
69
+ * to its own switch arms or the default exhaustiveness guard).
70
+ */
71
+ export declare function lookupValidatorEntry(kind: string): ValidatorEntry | undefined;
72
+ /**
73
+ * Apply the registry-dispatched validator to a node. The caller
74
+ * (validator.ts's `infer()`) is responsible for merging the returned
75
+ * `freeIndices` into its context.
76
+ *
77
+ * Returns the validator's full result so the caller can decide
78
+ * whether to merge or skip per the pattern tag. (Pattern C's result
79
+ * still has a `freeIndices` field — empty Map — for shape uniformity;
80
+ * the merge loop is a no-op rather than a missing field.)
81
+ */
82
+ export declare function dispatchValidator(entry: ValidatorEntry, node: unknown): ValidatorResult;
83
+ /**
84
+ * Returns true if the entry's pattern propagates freeIndices to the
85
+ * parent context. Patterns A and B propagate; pattern C skips
86
+ * (scalar result).
87
+ */
88
+ export declare function shouldPropagateFreeIndices(entry: ValidatorEntry): boolean;
89
+ export {};
90
+ //# sourceMappingURL=validator-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validator-registry.d.ts","sourceRoot":"","sources":["../../src/dimensional/validator-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,gBAAgB,CAAC;AAOxB,sEAAsE;AACtE,KAAK,eAAe,GAAG;IACrB,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;CACrE,CAAC;AAqCF,+CAA+C;AAC/C,KAAK,cAAc,GACf;IAAE,OAAO,EAAE,GAAG,CAAC;IAAC,SAAS,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,eAAe,CAAA;CAAE,GAC7D;IAAE,OAAO,EAAE,GAAG,CAAC;IAAC,SAAS,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,oBAAoB,KAAK,eAAe,CAAA;CAAE,GACvF;IAAE,OAAO,EAAE,GAAG,CAAC;IAAC,SAAS,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,eAAe,CAAA;CAAE,CAAC;AA0BlE;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAE7E;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,cAAc,EACrB,IAAI,EAAE,OAAO,GACZ,eAAe,CAejB;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAEzE"}
@@ -0,0 +1,131 @@
1
+ /**
2
+ * Validator registry for curvature- and GR-object node kinds.
3
+ *
4
+ * Extracted from `validator.ts`'s `infer()` switch in v0.6.1 Phase 2.
5
+ * Eleven `infer()` arms — `riemann-tensor`, `ricci-tensor`, `einstein-
6
+ * tensor`, `bianchi-residual`, `killing-vector`, `conserved-charge`,
7
+ * `stress-energy`, `cosmological-constant`, `einstein-equation`,
8
+ * `weyl-tensor`, `kretschmann-scalar` — all follow the same shape
9
+ * (call a `validateX(...)` function, then either propagate the
10
+ * returned `freeIndices` into the parent context or skip the merge
11
+ * for scalar kinds). Capturing that shape in a registry eliminates
12
+ * 11×~10 LOC of boilerplate in `validator.ts` and makes the per-arm
13
+ * pattern explicit at the registry-definition site.
14
+ *
15
+ * **Three patterns**, per the Adam+Eve adversarial review of the
16
+ * v0.6.1 Design (S2): a naive `propagateFreeIndices: boolean` flag is
17
+ * insufficient — three arms (`ricci-tensor`, `einstein-tensor`,
18
+ * `bianchi-residual`) pass a riemann-child closure into their
19
+ * validator, while the other eight do not. The pattern tag captures
20
+ * this asymmetry exhaustively:
21
+ *
22
+ * - **Pattern A** — `validateX(node)`, propagate freeIndices.
23
+ * Used by: `riemann-tensor`, `killing-vector`, `stress-energy`,
24
+ * `einstein-equation`, `weyl-tensor`.
25
+ *
26
+ * - **Pattern B** — `validateX(node, riemannCallback)`, propagate
27
+ * freeIndices. Used by: `ricci-tensor`, `einstein-tensor`,
28
+ * `bianchi-residual`. The callback re-validates an embedded
29
+ * Riemann sub-node so its signature checks fire while only the
30
+ * outer (post-contraction) free indices propagate to the parent.
31
+ *
32
+ * - **Pattern C** — `validateX(node)`, freeIndices is empty (scalar
33
+ * result); skip the merge loop entirely. Used by:
34
+ * `conserved-charge`, `cosmological-constant`, `kretschmann-scalar`.
35
+ *
36
+ * The discriminated union type below makes adding a new GR-object
37
+ * node-kind a compile-time decision: the new entry must explicitly
38
+ * declare its pattern, or TypeScript will fail to typecheck the
39
+ * registry. This guards against the v0.5.0 ricci-slot-bug shape
40
+ * (silent miscompute when a new arm follows the "wrong" pattern by
41
+ * default).
42
+ *
43
+ * @module dimensional/validator-registry
44
+ */
45
+ import { validateRiemannTensor } from './connection-validators.js';
46
+ import { validateRicciTensor, validateEinsteinTensor, validateBianchiResidual, } from './curvature.js';
47
+ import { validateKillingVector, validateConservedCharge } from './killing-validators.js';
48
+ import { validateStressEnergyTensor, validateCosmologicalConstant } from './stress-energy-validators.js';
49
+ import { validateEinsteinFieldEquation } from './einstein-equation.js';
50
+ import { validateWeylTensor } from './weyl-validators.js';
51
+ import { validateKretschmannScalar } from './curvature-invariants.js';
52
+ /**
53
+ * The canonical riemann-child callback used by all pattern-B
54
+ * validators. Re-validates an embedded Riemann sub-node so its
55
+ * structural checks fire, and forwards the result as
56
+ * `{dim, freeIndices}` (without the result's `violations` list,
57
+ * because pattern-B validators handle merging themselves).
58
+ *
59
+ * Uses the `RiemannChildCallback` type re-exported from
60
+ * `curvature.ts` (v0.7.1 Phase 4 Task 4.2 — consolidates the
61
+ * three identical inline callback shapes across the pattern-B
62
+ * validators into a single named alias).
63
+ */
64
+ const riemannChildCallback = (riemannChild) => {
65
+ const rr = validateRiemannTensor(riemannChild);
66
+ return { dim: rr.dim, freeIndices: rr.freeIndices };
67
+ };
68
+ /**
69
+ * The registry. Indexed by `node.kind` for the 11 curvature/GR
70
+ * arms; misses are handled by the caller (validator.ts's `infer()`
71
+ * has a `default` arm for unknown kinds).
72
+ */
73
+ const VALIDATOR_REGISTRY = {
74
+ // Pattern A — single-arg validator, propagate freeIndices.
75
+ 'riemann-tensor': { pattern: 'A', validator: validateRiemannTensor },
76
+ 'killing-vector': { pattern: 'A', validator: validateKillingVector },
77
+ 'stress-energy': { pattern: 'A', validator: validateStressEnergyTensor },
78
+ 'einstein-equation': { pattern: 'A', validator: validateEinsteinFieldEquation },
79
+ 'weyl-tensor': { pattern: 'A', validator: validateWeylTensor },
80
+ // Pattern B — two-arg validator with riemann-child callback, propagate freeIndices.
81
+ 'ricci-tensor': { pattern: 'B', validator: validateRicciTensor },
82
+ 'einstein-tensor': { pattern: 'B', validator: validateEinsteinTensor },
83
+ 'bianchi-residual': { pattern: 'B', validator: validateBianchiResidual },
84
+ // Pattern C — single-arg validator, scalar (skip freeIndices merge).
85
+ 'conserved-charge': { pattern: 'C', validator: validateConservedCharge },
86
+ 'cosmological-constant': { pattern: 'C', validator: validateCosmologicalConstant },
87
+ 'kretschmann-scalar': { pattern: 'C', validator: validateKretschmannScalar },
88
+ };
89
+ /**
90
+ * Look up the registry entry for a node-kind, returning `undefined`
91
+ * for kinds not covered by this registry (the caller falls through
92
+ * to its own switch arms or the default exhaustiveness guard).
93
+ */
94
+ export function lookupValidatorEntry(kind) {
95
+ return VALIDATOR_REGISTRY[kind];
96
+ }
97
+ /**
98
+ * Apply the registry-dispatched validator to a node. The caller
99
+ * (validator.ts's `infer()`) is responsible for merging the returned
100
+ * `freeIndices` into its context.
101
+ *
102
+ * Returns the validator's full result so the caller can decide
103
+ * whether to merge or skip per the pattern tag. (Pattern C's result
104
+ * still has a `freeIndices` field — empty Map — for shape uniformity;
105
+ * the merge loop is a no-op rather than a missing field.)
106
+ */
107
+ export function dispatchValidator(entry, node) {
108
+ switch (entry.pattern) {
109
+ case 'A':
110
+ return entry.validator(node);
111
+ case 'B':
112
+ return entry.validator(node, riemannChildCallback);
113
+ case 'C':
114
+ return entry.validator(node);
115
+ default: {
116
+ // Exhaustiveness guard
117
+ const _exhaustive = entry;
118
+ void _exhaustive;
119
+ throw new Error(`validator-registry: unknown pattern in entry`);
120
+ }
121
+ }
122
+ }
123
+ /**
124
+ * Returns true if the entry's pattern propagates freeIndices to the
125
+ * parent context. Patterns A and B propagate; pattern C skips
126
+ * (scalar result).
127
+ */
128
+ export function shouldPropagateFreeIndices(entry) {
129
+ return entry.pattern === 'A' || entry.pattern === 'B';
130
+ }
131
+ //# sourceMappingURL=validator-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validator-registry.js","sourceRoot":"","sources":["../../src/dimensional/validator-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAGH,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,GAExB,MAAM,gBAA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F,EAAE;IAE1I,qEAAqE;IACrE,kBAAkB,EAAM,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,uBAA2D,EAAE;IAChH,uBAAuB,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,4BAAgE,EAAE;IACtH,oBAAoB,EAAI,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,yBAA6D,EAAE;CACnH,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,OAAQ,kBAAqD,CAAC,IAAI,CAAC,CAAC;AACtE,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,iBAAiB,CAC/B,KAAqB,EACrB,IAAa;IAEb,QAAQ,KAAK,CAAC,OAAO,EAAE,CAAC;QACtB,KAAK,GAAG;YACN,OAAO,KAAK,CAAC,SAAS,CAAC,IAAa,CAAC,CAAC;QACxC,KAAK,GAAG;YACN,OAAO,KAAK,CAAC,SAAS,CAAC,IAAa,EAAE,oBAAoB,CAAC,CAAC;QAC9D,KAAK,GAAG;YACN,OAAO,KAAK,CAAC,SAAS,CAAC,IAAa,CAAC,CAAC;QACxC,OAAO,CAAC,CAAC,CAAC;YACR,uBAAuB;YACvB,MAAM,WAAW,GAAU,KAAK,CAAC;YACjC,KAAK,WAAW,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;QAClE,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CAAC,KAAqB;IAC9D,OAAO,KAAK,CAAC,OAAO,KAAK,GAAG,IAAI,KAAK,CAAC,OAAO,KAAK,GAAG,CAAC;AACxD,CAAC"}
@@ -15,6 +15,11 @@ import type { TensorSymbolNode, TensorProductNode } from './tensor.js';
15
15
  import type { MetricTensorNode, KroneckerDeltaNode, TensorPartialDerivativeNode } from './metric-validators.js';
16
16
  import type { CovariantDerivativeNode, RiemannTensorNode } from './connection-validators.js';
17
17
  import type { RicciTensorNode, EinsteinTensorNode, BianchiResidualNode } from './curvature.js';
18
+ import type { KillingVectorNode, ConservedChargeNode } from './killing-validators.js';
19
+ import type { StressEnergyTensorNode, CosmologicalConstantNode } from './stress-energy-validators.js';
20
+ import type { EinsteinFieldEquationNode } from './einstein-equation.js';
21
+ import type { WeylTensorNode } from './weyl-validators.js';
22
+ import type { KretschmannScalarNode } from './curvature-invariants.js';
18
23
  export type ExprNode = {
19
24
  kind: 'symbol';
20
25
  name: string;
@@ -31,11 +36,16 @@ export type ExprNode = {
31
36
  kind: 'derivative';
32
37
  of: ExprNode;
33
38
  wrt: ExprNode;
34
- } | TensorSymbolNode | TensorProductNode | MetricTensorNode | KroneckerDeltaNode | TensorPartialDerivativeNode | CovariantDerivativeNode | RiemannTensorNode | RicciTensorNode | EinsteinTensorNode | BianchiResidualNode;
35
- export type { TensorSymbolNode, TensorProductNode, TensorExprNode } from './tensor.js';
39
+ } | TensorSymbolNode | TensorProductNode | MetricTensorNode | KroneckerDeltaNode | TensorPartialDerivativeNode | CovariantDerivativeNode | RiemannTensorNode | RicciTensorNode | EinsteinTensorNode | BianchiResidualNode | KillingVectorNode | ConservedChargeNode | StressEnergyTensorNode | CosmologicalConstantNode | EinsteinFieldEquationNode | WeylTensorNode | KretschmannScalarNode;
40
+ export type { TensorSymbolNode, TensorProductNode } from './tensor.js';
36
41
  export type { MetricTensorNode, KroneckerDeltaNode, TensorPartialDerivativeNode, } from './metric-validators.js';
37
42
  export type { CovariantDerivativeNode, RiemannTensorNode, UpperIndex } from './connection-validators.js';
38
43
  export type { RicciTensorNode, EinsteinTensorNode, BianchiResidualNode } from './curvature.js';
44
+ export type { KillingVectorNode, ConservedChargeNode } from './killing-validators.js';
45
+ export type { StressEnergyTensorNode, CosmologicalConstantNode } from './stress-energy-validators.js';
46
+ export type { EinsteinFieldEquationNode } from './einstein-equation.js';
47
+ export type { WeylTensorNode } from './weyl-validators.js';
48
+ export type { KretschmannScalarNode } from './curvature-invariants.js';
39
49
  export interface Violation {
40
50
  /** Tree path, e.g. "args[1].args[0]". Empty string for the root. */
41
51
  location: string;
@@ -1 +1 @@
1
- {"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../src/dimensional/validator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,SAAS,EAEV,MAAM,YAAY,CAAC;AAgBpB,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAyB,MAAM,aAAa,CAAC;AAE9F,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,2BAA2B,EAE5B,MAAM,wBAAwB,CAAC;AAOhC,OAAO,KAAK,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE7F,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAG/F,MAAM,MAAM,QAAQ,GAChB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,SAAS,CAAA;CAAE,GAChD;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,EAAE,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IAAC,IAAI,EAAE,QAAQ,EAAE,CAAA;CAAE,GACjE;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,SAAS,EAAE,QAAQ,CAAA;CAAE,GACzD;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,EAAE,EAAE,QAAQ,CAAC;IAAC,GAAG,EAAE,QAAQ,CAAA;CAAE,GACnD,gBAAgB,GAChB,iBAAiB,GACjB,gBAAgB,GAChB,kBAAkB,GAClB,2BAA2B,GAC3B,uBAAuB,GACvB,iBAAiB,GACjB,eAAe,GACf,kBAAkB,GAClB,mBAAmB,CAAC;AAGxB,YAAY,EAAE,gBAA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