universal-physics-tensor 0.4.5

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 (299) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +377 -0
  3. package/dist/bridges/equations/be-11-decoherence-master.d.ts +83 -0
  4. package/dist/bridges/equations/be-11-decoherence-master.d.ts.map +1 -0
  5. package/dist/bridges/equations/be-11-decoherence-master.js +116 -0
  6. package/dist/bridges/equations/be-11-decoherence-master.js.map +1 -0
  7. package/dist/bridges/equations/be-12-coherence-length.d.ts +80 -0
  8. package/dist/bridges/equations/be-12-coherence-length.d.ts.map +1 -0
  9. package/dist/bridges/equations/be-12-coherence-length.js +128 -0
  10. package/dist/bridges/equations/be-12-coherence-length.js.map +1 -0
  11. package/dist/bridges/equations/be-13-einstein-trace.d.ts +89 -0
  12. package/dist/bridges/equations/be-13-einstein-trace.d.ts.map +1 -0
  13. package/dist/bridges/equations/be-13-einstein-trace.js +143 -0
  14. package/dist/bridges/equations/be-13-einstein-trace.js.map +1 -0
  15. package/dist/bridges/equations/be-14-ryu-takayanagi.d.ts +67 -0
  16. package/dist/bridges/equations/be-14-ryu-takayanagi.d.ts.map +1 -0
  17. package/dist/bridges/equations/be-14-ryu-takayanagi.js +112 -0
  18. package/dist/bridges/equations/be-14-ryu-takayanagi.js.map +1 -0
  19. package/dist/bridges/equations/be-15-emergence.d.ts +164 -0
  20. package/dist/bridges/equations/be-15-emergence.d.ts.map +1 -0
  21. package/dist/bridges/equations/be-15-emergence.js +204 -0
  22. package/dist/bridges/equations/be-15-emergence.js.map +1 -0
  23. package/dist/bridges/equations/be-16-landauer.d.ts +180 -0
  24. package/dist/bridges/equations/be-16-landauer.d.ts.map +1 -0
  25. package/dist/bridges/equations/be-16-landauer.js +206 -0
  26. package/dist/bridges/equations/be-16-landauer.js.map +1 -0
  27. package/dist/bridges/equations/be-17-einstein-cartan.d.ts +245 -0
  28. package/dist/bridges/equations/be-17-einstein-cartan.d.ts.map +1 -0
  29. package/dist/bridges/equations/be-17-einstein-cartan.js +304 -0
  30. package/dist/bridges/equations/be-17-einstein-cartan.js.map +1 -0
  31. package/dist/bridges/equations/be-18-higgs-mass.d.ts +65 -0
  32. package/dist/bridges/equations/be-18-higgs-mass.d.ts.map +1 -0
  33. package/dist/bridges/equations/be-18-higgs-mass.js +86 -0
  34. package/dist/bridges/equations/be-18-higgs-mass.js.map +1 -0
  35. package/dist/bridges/equations/be-19-quantum-bounce.d.ts +72 -0
  36. package/dist/bridges/equations/be-19-quantum-bounce.d.ts.map +1 -0
  37. package/dist/bridges/equations/be-19-quantum-bounce.js +151 -0
  38. package/dist/bridges/equations/be-19-quantum-bounce.js.map +1 -0
  39. package/dist/bridges/equations/be-20-vacuum-energy.d.ts +72 -0
  40. package/dist/bridges/equations/be-20-vacuum-energy.d.ts.map +1 -0
  41. package/dist/bridges/equations/be-20-vacuum-energy.js +115 -0
  42. package/dist/bridges/equations/be-20-vacuum-energy.js.map +1 -0
  43. package/dist/bridges/equations/be-21-kss-bound.d.ts +72 -0
  44. package/dist/bridges/equations/be-21-kss-bound.d.ts.map +1 -0
  45. package/dist/bridges/equations/be-21-kss-bound.js +103 -0
  46. package/dist/bridges/equations/be-21-kss-bound.js.map +1 -0
  47. package/dist/bridges/equations/be-22-topological-entanglement.d.ts +90 -0
  48. package/dist/bridges/equations/be-22-topological-entanglement.d.ts.map +1 -0
  49. package/dist/bridges/equations/be-22-topological-entanglement.js +123 -0
  50. package/dist/bridges/equations/be-22-topological-entanglement.js.map +1 -0
  51. package/dist/bridges/equations/be-23-syk-planckian.d.ts +89 -0
  52. package/dist/bridges/equations/be-23-syk-planckian.d.ts.map +1 -0
  53. package/dist/bridges/equations/be-23-syk-planckian.js +155 -0
  54. package/dist/bridges/equations/be-23-syk-planckian.js.map +1 -0
  55. package/dist/bridges/equations/be-24-foerster-fret.d.ts +81 -0
  56. package/dist/bridges/equations/be-24-foerster-fret.d.ts.map +1 -0
  57. package/dist/bridges/equations/be-24-foerster-fret.js +121 -0
  58. package/dist/bridges/equations/be-24-foerster-fret.js.map +1 -0
  59. package/dist/bridges/equations/be-25-iit-phi.d.ts +220 -0
  60. package/dist/bridges/equations/be-25-iit-phi.d.ts.map +1 -0
  61. package/dist/bridges/equations/be-25-iit-phi.js +259 -0
  62. package/dist/bridges/equations/be-25-iit-phi.js.map +1 -0
  63. package/dist/bridges/equations/be-25-orch-or.d.ts +78 -0
  64. package/dist/bridges/equations/be-25-orch-or.d.ts.map +1 -0
  65. package/dist/bridges/equations/be-25-orch-or.js +121 -0
  66. package/dist/bridges/equations/be-25-orch-or.js.map +1 -0
  67. package/dist/bridges/equations/be-26-dna-tunneling.d.ts +75 -0
  68. package/dist/bridges/equations/be-26-dna-tunneling.d.ts.map +1 -0
  69. package/dist/bridges/equations/be-26-dna-tunneling.js +138 -0
  70. package/dist/bridges/equations/be-26-dna-tunneling.js.map +1 -0
  71. package/dist/bridges/equations/be-27-effective-temperature.d.ts +81 -0
  72. package/dist/bridges/equations/be-27-effective-temperature.d.ts.map +1 -0
  73. package/dist/bridges/equations/be-27-effective-temperature.js +120 -0
  74. package/dist/bridges/equations/be-27-effective-temperature.js.map +1 -0
  75. package/dist/bridges/equations/be-28-onsager-entropy-production.d.ts +175 -0
  76. package/dist/bridges/equations/be-28-onsager-entropy-production.d.ts.map +1 -0
  77. package/dist/bridges/equations/be-28-onsager-entropy-production.js +203 -0
  78. package/dist/bridges/equations/be-28-onsager-entropy-production.js.map +1 -0
  79. package/dist/bridges/equations/be-29-jarzynski.d.ts +86 -0
  80. package/dist/bridges/equations/be-29-jarzynski.d.ts.map +1 -0
  81. package/dist/bridges/equations/be-29-jarzynski.js +132 -0
  82. package/dist/bridges/equations/be-29-jarzynski.js.map +1 -0
  83. package/dist/bridges/equations/be-30-flm-first-law.d.ts +93 -0
  84. package/dist/bridges/equations/be-30-flm-first-law.d.ts.map +1 -0
  85. package/dist/bridges/equations/be-30-flm-first-law.js +109 -0
  86. package/dist/bridges/equations/be-30-flm-first-law.js.map +1 -0
  87. package/dist/bridges/equations/be-31-causal-set-bd.d.ts +96 -0
  88. package/dist/bridges/equations/be-31-causal-set-bd.d.ts.map +1 -0
  89. package/dist/bridges/equations/be-31-causal-set-bd.js +133 -0
  90. package/dist/bridges/equations/be-31-causal-set-bd.js.map +1 -0
  91. package/dist/bridges/equations/be-32-quantum-reference-frame.d.ts +113 -0
  92. package/dist/bridges/equations/be-32-quantum-reference-frame.d.ts.map +1 -0
  93. package/dist/bridges/equations/be-32-quantum-reference-frame.js +155 -0
  94. package/dist/bridges/equations/be-32-quantum-reference-frame.js.map +1 -0
  95. package/dist/bridges/equations/be-33-hertz-millis.d.ts +77 -0
  96. package/dist/bridges/equations/be-33-hertz-millis.d.ts.map +1 -0
  97. package/dist/bridges/equations/be-33-hertz-millis.js +113 -0
  98. package/dist/bridges/equations/be-33-hertz-millis.js.map +1 -0
  99. package/dist/bridges/equations/be-34-kibble-zurek.d.ts +76 -0
  100. package/dist/bridges/equations/be-34-kibble-zurek.d.ts.map +1 -0
  101. package/dist/bridges/equations/be-34-kibble-zurek.js +139 -0
  102. package/dist/bridges/equations/be-34-kibble-zurek.js.map +1 -0
  103. package/dist/bridges/equations/be-35-conformal-bootstrap.d.ts +117 -0
  104. package/dist/bridges/equations/be-35-conformal-bootstrap.d.ts.map +1 -0
  105. package/dist/bridges/equations/be-35-conformal-bootstrap.js +167 -0
  106. package/dist/bridges/equations/be-35-conformal-bootstrap.js.map +1 -0
  107. package/dist/bridges/equations/be-36-gw-speed-bound.d.ts +77 -0
  108. package/dist/bridges/equations/be-36-gw-speed-bound.d.ts.map +1 -0
  109. package/dist/bridges/equations/be-36-gw-speed-bound.js +107 -0
  110. package/dist/bridges/equations/be-36-gw-speed-bound.js.map +1 -0
  111. package/dist/bridges/equations/be-37-shapiro-delay.d.ts +260 -0
  112. package/dist/bridges/equations/be-37-shapiro-delay.d.ts.map +1 -0
  113. package/dist/bridges/equations/be-37-shapiro-delay.js +429 -0
  114. package/dist/bridges/equations/be-37-shapiro-delay.js.map +1 -0
  115. package/dist/bridges/equations/be-38-mond.d.ts +86 -0
  116. package/dist/bridges/equations/be-38-mond.d.ts.map +1 -0
  117. package/dist/bridges/equations/be-38-mond.js +122 -0
  118. package/dist/bridges/equations/be-38-mond.js.map +1 -0
  119. package/dist/bridges/equations/be-39-asymptotic-safety.d.ts +106 -0
  120. package/dist/bridges/equations/be-39-asymptotic-safety.d.ts.map +1 -0
  121. package/dist/bridges/equations/be-39-asymptotic-safety.js +155 -0
  122. package/dist/bridges/equations/be-39-asymptotic-safety.js.map +1 -0
  123. package/dist/bridges/equations/be-40-composite-higgs.d.ts +81 -0
  124. package/dist/bridges/equations/be-40-composite-higgs.d.ts.map +1 -0
  125. package/dist/bridges/equations/be-40-composite-higgs.js +149 -0
  126. package/dist/bridges/equations/be-40-composite-higgs.js.map +1 -0
  127. package/dist/bridges/equations/be-41-swampland.d.ts +67 -0
  128. package/dist/bridges/equations/be-41-swampland.d.ts.map +1 -0
  129. package/dist/bridges/equations/be-41-swampland.js +109 -0
  130. package/dist/bridges/equations/be-41-swampland.js.map +1 -0
  131. package/dist/bridges/equations/be-42-hawking-temperature.d.ts +67 -0
  132. package/dist/bridges/equations/be-42-hawking-temperature.d.ts.map +1 -0
  133. package/dist/bridges/equations/be-42-hawking-temperature.js +109 -0
  134. package/dist/bridges/equations/be-42-hawking-temperature.js.map +1 -0
  135. package/dist/bridges/equations/be-43-er-epr.d.ts +73 -0
  136. package/dist/bridges/equations/be-43-er-epr.d.ts.map +1 -0
  137. package/dist/bridges/equations/be-43-er-epr.js +114 -0
  138. package/dist/bridges/equations/be-43-er-epr.js.map +1 -0
  139. package/dist/bridges/equations/be-44-soft-hair.d.ts +151 -0
  140. package/dist/bridges/equations/be-44-soft-hair.d.ts.map +1 -0
  141. package/dist/bridges/equations/be-44-soft-hair.js +185 -0
  142. package/dist/bridges/equations/be-44-soft-hair.js.map +1 -0
  143. package/dist/bridges/equations/be-45-tcc.d.ts +116 -0
  144. package/dist/bridges/equations/be-45-tcc.d.ts.map +1 -0
  145. package/dist/bridges/equations/be-45-tcc.js +157 -0
  146. package/dist/bridges/equations/be-45-tcc.js.map +1 -0
  147. package/dist/bridges/equations/be-46-multiverse-measure.d.ts +163 -0
  148. package/dist/bridges/equations/be-46-multiverse-measure.d.ts.map +1 -0
  149. package/dist/bridges/equations/be-46-multiverse-measure.js +198 -0
  150. package/dist/bridges/equations/be-46-multiverse-measure.js.map +1 -0
  151. package/dist/bridges/equations/be-47-bbn-dark-sector.d.ts +72 -0
  152. package/dist/bridges/equations/be-47-bbn-dark-sector.d.ts.map +1 -0
  153. package/dist/bridges/equations/be-47-bbn-dark-sector.js +121 -0
  154. package/dist/bridges/equations/be-47-bbn-dark-sector.js.map +1 -0
  155. package/dist/bridges/equations/be-48-grw-localization.d.ts +84 -0
  156. package/dist/bridges/equations/be-48-grw-localization.d.ts.map +1 -0
  157. package/dist/bridges/equations/be-48-grw-localization.js +107 -0
  158. package/dist/bridges/equations/be-48-grw-localization.js.map +1 -0
  159. package/dist/bridges/equations/be-49-quantum-darwinism.d.ts +97 -0
  160. package/dist/bridges/equations/be-49-quantum-darwinism.d.ts.map +1 -0
  161. package/dist/bridges/equations/be-49-quantum-darwinism.js +129 -0
  162. package/dist/bridges/equations/be-49-quantum-darwinism.js.map +1 -0
  163. package/dist/bridges/equations/be-50-wheeler-feynman.d.ts +120 -0
  164. package/dist/bridges/equations/be-50-wheeler-feynman.d.ts.map +1 -0
  165. package/dist/bridges/equations/be-50-wheeler-feynman.js +151 -0
  166. package/dist/bridges/equations/be-50-wheeler-feynman.js.map +1 -0
  167. package/dist/bridges/gravitational-lensing.d.ts +52 -0
  168. package/dist/bridges/gravitational-lensing.d.ts.map +1 -0
  169. package/dist/bridges/gravitational-lensing.js +48 -0
  170. package/dist/bridges/gravitational-lensing.js.map +1 -0
  171. package/dist/bridges/index.d.ts +104 -0
  172. package/dist/bridges/index.d.ts.map +1 -0
  173. package/dist/bridges/index.js +1663 -0
  174. package/dist/bridges/index.js.map +1 -0
  175. package/dist/bridges/perihelion-precession.d.ts +62 -0
  176. package/dist/bridges/perihelion-precession.d.ts.map +1 -0
  177. package/dist/bridges/perihelion-precession.js +68 -0
  178. package/dist/bridges/perihelion-precession.js.map +1 -0
  179. package/dist/core/tensor.d.ts +135 -0
  180. package/dist/core/tensor.d.ts.map +1 -0
  181. package/dist/core/tensor.js +376 -0
  182. package/dist/core/tensor.js.map +1 -0
  183. package/dist/core/types.d.ts +131 -0
  184. package/dist/core/types.d.ts.map +1 -0
  185. package/dist/core/types.js +25 -0
  186. package/dist/core/types.js.map +1 -0
  187. package/dist/dimensional/algebra.d.ts +34 -0
  188. package/dist/dimensional/algebra.d.ts.map +1 -0
  189. package/dist/dimensional/algebra.js +90 -0
  190. package/dist/dimensional/algebra.js.map +1 -0
  191. package/dist/dimensional/bridge-check.d.ts +48 -0
  192. package/dist/dimensional/bridge-check.d.ts.map +1 -0
  193. package/dist/dimensional/bridge-check.js +137 -0
  194. package/dist/dimensional/bridge-check.js.map +1 -0
  195. package/dist/dimensional/connection-validators.d.ts +53 -0
  196. package/dist/dimensional/connection-validators.d.ts.map +1 -0
  197. package/dist/dimensional/connection-validators.js +84 -0
  198. package/dist/dimensional/connection-validators.js.map +1 -0
  199. package/dist/dimensional/connection.d.ts +40 -0
  200. package/dist/dimensional/connection.d.ts.map +1 -0
  201. package/dist/dimensional/connection.js +81 -0
  202. package/dist/dimensional/connection.js.map +1 -0
  203. package/dist/dimensional/constants.d.ts +30 -0
  204. package/dist/dimensional/constants.d.ts.map +1 -0
  205. package/dist/dimensional/constants.js +31 -0
  206. package/dist/dimensional/constants.js.map +1 -0
  207. package/dist/dimensional/errors.d.ts +161 -0
  208. package/dist/dimensional/errors.d.ts.map +1 -0
  209. package/dist/dimensional/errors.js +254 -0
  210. package/dist/dimensional/errors.js.map +1 -0
  211. package/dist/dimensional/fresh-label.d.ts +26 -0
  212. package/dist/dimensional/fresh-label.d.ts.map +1 -0
  213. package/dist/dimensional/fresh-label.js +31 -0
  214. package/dist/dimensional/fresh-label.js.map +1 -0
  215. package/dist/dimensional/metric-validators.d.ts +124 -0
  216. package/dist/dimensional/metric-validators.d.ts.map +1 -0
  217. package/dist/dimensional/metric-validators.js +141 -0
  218. package/dist/dimensional/metric-validators.js.map +1 -0
  219. package/dist/dimensional/metric.d.ts +67 -0
  220. package/dist/dimensional/metric.d.ts.map +1 -0
  221. package/dist/dimensional/metric.js +177 -0
  222. package/dist/dimensional/metric.js.map +1 -0
  223. package/dist/dimensional/tensor.d.ts +153 -0
  224. package/dist/dimensional/tensor.d.ts.map +1 -0
  225. package/dist/dimensional/tensor.js +138 -0
  226. package/dist/dimensional/tensor.js.map +1 -0
  227. package/dist/dimensional/types.d.ts +50 -0
  228. package/dist/dimensional/types.d.ts.map +1 -0
  229. package/dist/dimensional/types.js +66 -0
  230. package/dist/dimensional/types.js.map +1 -0
  231. package/dist/dimensional/validator.d.ts +84 -0
  232. package/dist/dimensional/validator.d.ts.map +1 -0
  233. package/dist/dimensional/validator.js +505 -0
  234. package/dist/dimensional/validator.js.map +1 -0
  235. package/dist/index.d.ts +25 -0
  236. package/dist/index.d.ts.map +1 -0
  237. package/dist/index.js +37 -0
  238. package/dist/index.js.map +1 -0
  239. package/dist/numerical/be37-covariant-eikonal.d.ts +90 -0
  240. package/dist/numerical/be37-covariant-eikonal.d.ts.map +1 -0
  241. package/dist/numerical/be37-covariant-eikonal.js +79 -0
  242. package/dist/numerical/be37-covariant-eikonal.js.map +1 -0
  243. package/dist/numerical/connection-lowering-helpers.d.ts +107 -0
  244. package/dist/numerical/connection-lowering-helpers.d.ts.map +1 -0
  245. package/dist/numerical/connection-lowering-helpers.js +315 -0
  246. package/dist/numerical/connection-lowering-helpers.js.map +1 -0
  247. package/dist/numerical/engine-registry.d.ts +50 -0
  248. package/dist/numerical/engine-registry.d.ts.map +1 -0
  249. package/dist/numerical/engine-registry.js +82 -0
  250. package/dist/numerical/engine-registry.js.map +1 -0
  251. package/dist/numerical/errors.d.ts +28 -0
  252. package/dist/numerical/errors.d.ts.map +1 -0
  253. package/dist/numerical/errors.js +39 -0
  254. package/dist/numerical/errors.js.map +1 -0
  255. package/dist/numerical/float64-engine.d.ts +53 -0
  256. package/dist/numerical/float64-engine.d.ts.map +1 -0
  257. package/dist/numerical/float64-engine.js +638 -0
  258. package/dist/numerical/float64-engine.js.map +1 -0
  259. package/dist/numerical/geodesic-integrator.d.ts +62 -0
  260. package/dist/numerical/geodesic-integrator.d.ts.map +1 -0
  261. package/dist/numerical/geodesic-integrator.js +103 -0
  262. package/dist/numerical/geodesic-integrator.js.map +1 -0
  263. package/dist/numerical/grid-field.d.ts +24 -0
  264. package/dist/numerical/grid-field.d.ts.map +1 -0
  265. package/dist/numerical/grid-field.js +2 -0
  266. package/dist/numerical/grid-field.js.map +1 -0
  267. package/dist/numerical/index.d.ts +80 -0
  268. package/dist/numerical/index.d.ts.map +1 -0
  269. package/dist/numerical/index.js +75 -0
  270. package/dist/numerical/index.js.map +1 -0
  271. package/dist/numerical/lowering.d.ts +48 -0
  272. package/dist/numerical/lowering.d.ts.map +1 -0
  273. package/dist/numerical/lowering.js +443 -0
  274. package/dist/numerical/lowering.js.map +1 -0
  275. package/dist/numerical/mathts-engine.d.ts +55 -0
  276. package/dist/numerical/mathts-engine.d.ts.map +1 -0
  277. package/dist/numerical/mathts-engine.js +164 -0
  278. package/dist/numerical/mathts-engine.js.map +1 -0
  279. package/dist/numerical/metric-inverse.d.ts +31 -0
  280. package/dist/numerical/metric-inverse.d.ts.map +1 -0
  281. package/dist/numerical/metric-inverse.js +68 -0
  282. package/dist/numerical/metric-inverse.js.map +1 -0
  283. package/dist/numerical/null-ray-integrator.d.ts +13 -0
  284. package/dist/numerical/null-ray-integrator.d.ts.map +1 -0
  285. package/dist/numerical/null-ray-integrator.js +53 -0
  286. package/dist/numerical/null-ray-integrator.js.map +1 -0
  287. package/dist/numerical/pderiv.d.ts +43 -0
  288. package/dist/numerical/pderiv.d.ts.map +1 -0
  289. package/dist/numerical/pderiv.js +121 -0
  290. package/dist/numerical/pderiv.js.map +1 -0
  291. package/dist/numerical/tensor-engine.d.ts +114 -0
  292. package/dist/numerical/tensor-engine.d.ts.map +1 -0
  293. package/dist/numerical/tensor-engine.js +64 -0
  294. package/dist/numerical/tensor-engine.js.map +1 -0
  295. package/dist/numerical/types.d.ts +37 -0
  296. package/dist/numerical/types.d.ts.map +1 -0
  297. package/dist/numerical/types.js +8 -0
  298. package/dist/numerical/types.js.map +1 -0
  299. package/package.json +72 -0
@@ -0,0 +1,175 @@
1
+ /**
2
+ * Bridge Equation 28 — Maximum Entropy Production Principle
3
+ * (Onsager linear-response entropy-production scalar reformulation).
4
+ *
5
+ * **Original (un-encodable) form.** The Dewar 2003/2005 variational
6
+ * formulation of MEPP:
7
+ *
8
+ * δ ∫ [dS/dt - λ Σᵢ Jᵢ Xᵢ - μ(∇·v)] dt = 0
9
+ *
10
+ * is not AST-encodable. It requires three grammar extensions: (1)
11
+ * variational δ-operator over functionals; (2) Lagrange multipliers
12
+ * λ, μ for constraint enforcement; (3) discrete-index sum primitive
13
+ * over species. MEPP itself is also a **contested principle** —
14
+ * Grinstein-Linsker 2007 *J. Phys. A* 40:9717 produced counterexamples
15
+ * to Dewar's information-theoretic derivation, and the principle
16
+ * conflicts with Prigogine's *minimum* entropy production principle
17
+ * for near-equilibrium systems.
18
+ *
19
+ * **Encoded reformulation (Onsager linear-response entropy production).**
20
+ * Wave Z-G (2026-05-11): per user-confirmed design choice after
21
+ * surfacing the relabeling concern, replace the MEPP variational
22
+ * formulation with the canonical **Onsager linear-response
23
+ * entropy-production scalar**:
24
+ *
25
+ * **σ = Σᵢ Jᵢ Xᵢ** (typed scalar with dim [entropy/time])
26
+ *
27
+ * where Jᵢ are generalized fluxes (heat, particle, charge) and Xᵢ
28
+ * are their conjugate generalized forces (∇T/T², chemical-potential
29
+ * gradients, electric field, etc.). The discrete index sum is
30
+ * collapsed into a single typed-stub symbol `force_flux_product` —
31
+ * the AST has no discrete-index sum primitive, so the sum-collapsed
32
+ * stub absorbs the multi-species content. Dim `[entropy / time]`
33
+ * = `[L² M T⁻³ Θ⁻¹]` = `[W/K]` (power per kelvin).
34
+ *
35
+ * **⚠ CRITICAL WARNING — Definiendum vs. principle (honest-claude
36
+ * scope, REQUIRED reading).** This reformulation **does NOT encode
37
+ * the Maximum Entropy Production Principle (MEPP).** The original
38
+ * MEPP is a contested **variational principle** asserting that
39
+ * non-equilibrium systems organize to *maximize* entropy production
40
+ * subject to constraints. Due to AST grammar limitations (no
41
+ * variational δ, no Lagrange multiplier, no discrete-index sum),
42
+ * that principle cannot be represented. This equation instead
43
+ * encodes the foundational Onsager / Prigogine **definition** of the
44
+ * entropy production rate (σ) as a sum of flux-force products. This
45
+ * bridge is retained under the BE-28 label for historical continuity,
46
+ * but it represents the *definiendum* of MEPP (the quantity MEPP
47
+ * makes a claim about), NOT the maximization conjecture itself.
48
+ *
49
+ * Wording owed to the Gemini Pro Wave-Z cross-validation
50
+ * consultation (2026-05-11), which independently confirmed the
51
+ * "DEFENSIBLE-WITH-CAVEATS" verdict and recommended this stronger
52
+ * warning prefix. Both OpenAI o3 and Gemini Pro agreed: the
53
+ * relabeling is acceptable *only* because the user explicitly
54
+ * accepted the trade-off via `AskUserQuestion` and the warning is
55
+ * prominent. See Wave Z-G notes in `src/bridges/index.ts` for the
56
+ * full discussion.
57
+ *
58
+ * The reformulation is closer in spirit to a **renaming** of BE-28
59
+ * (from MEPP → Onsager entropy production) than to the BE-25 /
60
+ * BE-16 / BE-37 reformulations, which preserved their bridge labels
61
+ * (consciousness ↔ information; information ↔ thermodynamics;
62
+ * modified light propagation). MEPP's bridge label "Why nature
63
+ * chooses specific NESS" is NOT preserved by Onsager. Wave Z-G is
64
+ * a project-internal decision to "close" BE-28 at the cost of the
65
+ * MEPP semantic content.
66
+ *
67
+ * **AST encoding pattern.** Single typed-stub for the force-flux
68
+ * sum. Dim: `[L² M T⁻³ Θ⁻¹]` (entropy per time, equivalently W/K).
69
+ *
70
+ * Bracket-checks (numerical evaluator):
71
+ * - σ = 1 W/K: entropy production at the rate of 1 joule of heat
72
+ * per second per kelvin. Typical of a small heat engine or
73
+ * dissipative process at room temperature.
74
+ * - σ ≥ 0: the Second Law in differential form (entropy
75
+ * production is non-negative for any irreversible process).
76
+ * The numerical evaluator enforces this with a RangeError.
77
+ *
78
+ * References:
79
+ * - Onsager 1931 *Phys. Rev.* 37:405 and 38:2265 (reciprocal
80
+ * relations — the foundational paper).
81
+ * - de Groot & Mazur 1962 *Non-Equilibrium Thermodynamics*
82
+ * (canonical textbook).
83
+ * - Dewar 2003 *J. Phys. A* 36:631 (MEPP information-theoretic
84
+ * derivation — the original-BE-28 source, now dropped).
85
+ * - Dewar 2005 *J. Phys. A* 38:L371 (MEPP follow-up).
86
+ * - Grinstein & Linsker 2007 *J. Phys. A* 40:9717 (MEPP
87
+ * rebuttal — counterexamples to Dewar's derivation; one of the
88
+ * reasons MEPP-as-variational-principle is contested).
89
+ * - Prigogine 1947 *Étude thermodynamique des phénomènes
90
+ * irréversibles* (minimum-entropy-production for near-
91
+ * equilibrium — the contrasting principle that conflicts with
92
+ * MEPP in the linear regime).
93
+ *
94
+ * Status: speculative.
95
+ *
96
+ * Honest-claude scope notes (extended):
97
+ * - Onsager linear-response is **already implicitly used** by
98
+ * BE-21 (KSS η/s bound), BE-23 (SYK Planckian resistivity), and
99
+ * BE-29 (Jarzynski free-energy equality). Encoding BE-28 as
100
+ * "Onsager force-flux entropy production" creates some content
101
+ * overlap with those bridges; the distinguishing feature is
102
+ * that BE-28 encodes the σ scalar itself, not a derived
103
+ * quantity (transport coefficient or fluctuation theorem).
104
+ * - The MEPP variational principle is NOT captured. Anyone reading
105
+ * the encoded scalar should understand that the encoding answers
106
+ * "what is the entropy production rate?" but NOT "why does
107
+ * nature select this rate?" — the latter is the actual MEPP
108
+ * content and remains an open research question (Dewar 2003,
109
+ * Grinstein-Linsker 2007 rebuttal, Endres 2017 follow-ups).
110
+ * - The discrete index sum Σᵢ over species is collapsed into a
111
+ * single typed-stub `force_flux_product`. A future grammar
112
+ * extension with explicit discrete-index sum primitive could
113
+ * unfold this stub into an explicit `J_heat·X_heat +
114
+ * J_particle·X_particle + J_charge·X_charge` expression.
115
+ * - σ ≥ 0 (Second Law) is enforced by the numerical evaluator but
116
+ * not by the AST type system — the dimension allows negative
117
+ * values; the non-negativity is a semantic property.
118
+ * - The dim [entropy/time] = [L² M T⁻³ Θ⁻¹] = [W/K] is the
119
+ * **total** entropy production rate (extensive quantity). The
120
+ * local entropy production density σ_local with dim
121
+ * [entropy/(volume · time)] = [L⁻¹ M T⁻³ Θ⁻¹] is a different
122
+ * scalar; the encoding choice is the **total** rate, consistent
123
+ * with the integral form ∫ J·X d³x = σ_total over the system.
124
+ *
125
+ * @see docs/specification/Part-II.md ("Bridge Equation 28")
126
+ * @see src/bridges/index.ts BRIDGE_EQUATIONS.find(e => e.id === 28)
127
+ * @module bridges/equations/be-28-onsager-entropy-production
128
+ */
129
+ import type { ExprNode, DimensionValidationReport } from '../../dimensional/validator.js';
130
+ /**
131
+ * Symbol for the index-collapsed force-flux product Σᵢ Jᵢ Xᵢ.
132
+ *
133
+ * The AST has no discrete-index sum primitive, so the multi-species
134
+ * sum is encoded as a single typed-stub with the dim of σ itself.
135
+ * Same idiom as BE-17 `T_torsion_squared` (typed-stub for a tensor
136
+ * contraction the AST cannot expand) and BE-46 `exp_factor` (typed-
137
+ * stub for an unexpressible transcendental subexpression).
138
+ *
139
+ * Dim `[entropy/time]` = `[W/K]`.
140
+ */
141
+ export declare const BE28_FORCE_FLUX_PRODUCT: ExprNode;
142
+ /**
143
+ * RHS of `σ = Σᵢ Jᵢ Xᵢ`:
144
+ *
145
+ * force_flux_product
146
+ *
147
+ * Encoded as a single typed-stub (no internal expansion in the AST).
148
+ * Dim `[entropy/time]`.
149
+ */
150
+ export declare const BE28_ENTROPY_PRODUCTION_RHS: ExprNode;
151
+ /** LHS: σ (total entropy production rate). Dim `[entropy/time]`. */
152
+ export declare const BE28_ENTROPY_PRODUCTION_LHS: ExprNode;
153
+ export interface OnsagerEntropyInputs {
154
+ /** Sum of force-flux products Σᵢ Jᵢ Xᵢ in SI units [W/K]. Must be finite and ≥ 0 (Second Law). */
155
+ force_flux_product_W_per_K: number;
156
+ }
157
+ /**
158
+ * Evaluate the Onsager linear-response entropy production rate:
159
+ *
160
+ * σ = Σᵢ Jᵢ Xᵢ
161
+ *
162
+ * The caller supplies the already-summed force-flux product as a
163
+ * scalar; the AST cannot expand the discrete-index sum, so the
164
+ * evaluator takes the sum as input.
165
+ *
166
+ * @returns σ in W/K (joule per second per kelvin). Must be ≥ 0
167
+ * by the Second Law.
168
+ */
169
+ export declare function evaluateOnsagerEntropyProduction(input: OnsagerEntropyInputs): number;
170
+ /**
171
+ * Run the AST through the dimensional analyzer; LHS and RHS should
172
+ * both be `[entropy/time]`.
173
+ */
174
+ export declare function validateBE28Dimensions(): DimensionValidationReport;
175
+ //# sourceMappingURL=be-28-onsager-entropy-production.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"be-28-onsager-entropy-production.d.ts","sourceRoot":"","sources":["../../../src/bridges/equations/be-28-onsager-entropy-production.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+HG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAqB1F;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB,EAAE,QAGrC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,EAAE,QAAkC,CAAC;AAE7E,oEAAoE;AACpE,eAAO,MAAM,2BAA2B,EAAE,QAAqC,CAAC;AAIhF,MAAM,WAAW,oBAAoB;IACnC,kGAAkG;IAClG,0BAA0B,EAAE,MAAM,CAAC;CACpC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,oBAAoB,GAAG,MAAM,CAepF;AAID;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,yBAAyB,CASlE"}
@@ -0,0 +1,203 @@
1
+ /**
2
+ * Bridge Equation 28 — Maximum Entropy Production Principle
3
+ * (Onsager linear-response entropy-production scalar reformulation).
4
+ *
5
+ * **Original (un-encodable) form.** The Dewar 2003/2005 variational
6
+ * formulation of MEPP:
7
+ *
8
+ * δ ∫ [dS/dt - λ Σᵢ Jᵢ Xᵢ - μ(∇·v)] dt = 0
9
+ *
10
+ * is not AST-encodable. It requires three grammar extensions: (1)
11
+ * variational δ-operator over functionals; (2) Lagrange multipliers
12
+ * λ, μ for constraint enforcement; (3) discrete-index sum primitive
13
+ * over species. MEPP itself is also a **contested principle** —
14
+ * Grinstein-Linsker 2007 *J. Phys. A* 40:9717 produced counterexamples
15
+ * to Dewar's information-theoretic derivation, and the principle
16
+ * conflicts with Prigogine's *minimum* entropy production principle
17
+ * for near-equilibrium systems.
18
+ *
19
+ * **Encoded reformulation (Onsager linear-response entropy production).**
20
+ * Wave Z-G (2026-05-11): per user-confirmed design choice after
21
+ * surfacing the relabeling concern, replace the MEPP variational
22
+ * formulation with the canonical **Onsager linear-response
23
+ * entropy-production scalar**:
24
+ *
25
+ * **σ = Σᵢ Jᵢ Xᵢ** (typed scalar with dim [entropy/time])
26
+ *
27
+ * where Jᵢ are generalized fluxes (heat, particle, charge) and Xᵢ
28
+ * are their conjugate generalized forces (∇T/T², chemical-potential
29
+ * gradients, electric field, etc.). The discrete index sum is
30
+ * collapsed into a single typed-stub symbol `force_flux_product` —
31
+ * the AST has no discrete-index sum primitive, so the sum-collapsed
32
+ * stub absorbs the multi-species content. Dim `[entropy / time]`
33
+ * = `[L² M T⁻³ Θ⁻¹]` = `[W/K]` (power per kelvin).
34
+ *
35
+ * **⚠ CRITICAL WARNING — Definiendum vs. principle (honest-claude
36
+ * scope, REQUIRED reading).** This reformulation **does NOT encode
37
+ * the Maximum Entropy Production Principle (MEPP).** The original
38
+ * MEPP is a contested **variational principle** asserting that
39
+ * non-equilibrium systems organize to *maximize* entropy production
40
+ * subject to constraints. Due to AST grammar limitations (no
41
+ * variational δ, no Lagrange multiplier, no discrete-index sum),
42
+ * that principle cannot be represented. This equation instead
43
+ * encodes the foundational Onsager / Prigogine **definition** of the
44
+ * entropy production rate (σ) as a sum of flux-force products. This
45
+ * bridge is retained under the BE-28 label for historical continuity,
46
+ * but it represents the *definiendum* of MEPP (the quantity MEPP
47
+ * makes a claim about), NOT the maximization conjecture itself.
48
+ *
49
+ * Wording owed to the Gemini Pro Wave-Z cross-validation
50
+ * consultation (2026-05-11), which independently confirmed the
51
+ * "DEFENSIBLE-WITH-CAVEATS" verdict and recommended this stronger
52
+ * warning prefix. Both OpenAI o3 and Gemini Pro agreed: the
53
+ * relabeling is acceptable *only* because the user explicitly
54
+ * accepted the trade-off via `AskUserQuestion` and the warning is
55
+ * prominent. See Wave Z-G notes in `src/bridges/index.ts` for the
56
+ * full discussion.
57
+ *
58
+ * The reformulation is closer in spirit to a **renaming** of BE-28
59
+ * (from MEPP → Onsager entropy production) than to the BE-25 /
60
+ * BE-16 / BE-37 reformulations, which preserved their bridge labels
61
+ * (consciousness ↔ information; information ↔ thermodynamics;
62
+ * modified light propagation). MEPP's bridge label "Why nature
63
+ * chooses specific NESS" is NOT preserved by Onsager. Wave Z-G is
64
+ * a project-internal decision to "close" BE-28 at the cost of the
65
+ * MEPP semantic content.
66
+ *
67
+ * **AST encoding pattern.** Single typed-stub for the force-flux
68
+ * sum. Dim: `[L² M T⁻³ Θ⁻¹]` (entropy per time, equivalently W/K).
69
+ *
70
+ * Bracket-checks (numerical evaluator):
71
+ * - σ = 1 W/K: entropy production at the rate of 1 joule of heat
72
+ * per second per kelvin. Typical of a small heat engine or
73
+ * dissipative process at room temperature.
74
+ * - σ ≥ 0: the Second Law in differential form (entropy
75
+ * production is non-negative for any irreversible process).
76
+ * The numerical evaluator enforces this with a RangeError.
77
+ *
78
+ * References:
79
+ * - Onsager 1931 *Phys. Rev.* 37:405 and 38:2265 (reciprocal
80
+ * relations — the foundational paper).
81
+ * - de Groot & Mazur 1962 *Non-Equilibrium Thermodynamics*
82
+ * (canonical textbook).
83
+ * - Dewar 2003 *J. Phys. A* 36:631 (MEPP information-theoretic
84
+ * derivation — the original-BE-28 source, now dropped).
85
+ * - Dewar 2005 *J. Phys. A* 38:L371 (MEPP follow-up).
86
+ * - Grinstein & Linsker 2007 *J. Phys. A* 40:9717 (MEPP
87
+ * rebuttal — counterexamples to Dewar's derivation; one of the
88
+ * reasons MEPP-as-variational-principle is contested).
89
+ * - Prigogine 1947 *Étude thermodynamique des phénomènes
90
+ * irréversibles* (minimum-entropy-production for near-
91
+ * equilibrium — the contrasting principle that conflicts with
92
+ * MEPP in the linear regime).
93
+ *
94
+ * Status: speculative.
95
+ *
96
+ * Honest-claude scope notes (extended):
97
+ * - Onsager linear-response is **already implicitly used** by
98
+ * BE-21 (KSS η/s bound), BE-23 (SYK Planckian resistivity), and
99
+ * BE-29 (Jarzynski free-energy equality). Encoding BE-28 as
100
+ * "Onsager force-flux entropy production" creates some content
101
+ * overlap with those bridges; the distinguishing feature is
102
+ * that BE-28 encodes the σ scalar itself, not a derived
103
+ * quantity (transport coefficient or fluctuation theorem).
104
+ * - The MEPP variational principle is NOT captured. Anyone reading
105
+ * the encoded scalar should understand that the encoding answers
106
+ * "what is the entropy production rate?" but NOT "why does
107
+ * nature select this rate?" — the latter is the actual MEPP
108
+ * content and remains an open research question (Dewar 2003,
109
+ * Grinstein-Linsker 2007 rebuttal, Endres 2017 follow-ups).
110
+ * - The discrete index sum Σᵢ over species is collapsed into a
111
+ * single typed-stub `force_flux_product`. A future grammar
112
+ * extension with explicit discrete-index sum primitive could
113
+ * unfold this stub into an explicit `J_heat·X_heat +
114
+ * J_particle·X_particle + J_charge·X_charge` expression.
115
+ * - σ ≥ 0 (Second Law) is enforced by the numerical evaluator but
116
+ * not by the AST type system — the dimension allows negative
117
+ * values; the non-negativity is a semantic property.
118
+ * - The dim [entropy/time] = [L² M T⁻³ Θ⁻¹] = [W/K] is the
119
+ * **total** entropy production rate (extensive quantity). The
120
+ * local entropy production density σ_local with dim
121
+ * [entropy/(volume · time)] = [L⁻¹ M T⁻³ Θ⁻¹] is a different
122
+ * scalar; the encoding choice is the **total** rate, consistent
123
+ * with the integral form ∫ J·X d³x = σ_total over the system.
124
+ *
125
+ * @see docs/specification/Part-II.md ("Bridge Equation 28")
126
+ * @see src/bridges/index.ts BRIDGE_EQUATIONS.find(e => e.id === 28)
127
+ * @module bridges/equations/be-28-onsager-entropy-production
128
+ */
129
+ import { validate, validateEquation } from '../../dimensional/validator.js';
130
+ const sym = (name, dim) => ({ kind: 'symbol', name, dim });
131
+ // --- Local dim constants ---
132
+ /**
133
+ * [L² M T⁻³ Θ⁻¹] = [entropy/time] = [W/K] — total entropy production
134
+ * rate. ENTROPY = {L:2, M:1, T:-2, Θ:-1}; dividing by TIME {T:1}
135
+ * gives this dim.
136
+ */
137
+ const ENTROPY_RATE = {
138
+ L: 2, M: 1, T: -3, I: 0, Theta: -1, N: 0, J: 0,
139
+ };
140
+ // --- Symbolic AST ---
141
+ /**
142
+ * Symbol for the index-collapsed force-flux product Σᵢ Jᵢ Xᵢ.
143
+ *
144
+ * The AST has no discrete-index sum primitive, so the multi-species
145
+ * sum is encoded as a single typed-stub with the dim of σ itself.
146
+ * Same idiom as BE-17 `T_torsion_squared` (typed-stub for a tensor
147
+ * contraction the AST cannot expand) and BE-46 `exp_factor` (typed-
148
+ * stub for an unexpressible transcendental subexpression).
149
+ *
150
+ * Dim `[entropy/time]` = `[W/K]`.
151
+ */
152
+ export const BE28_FORCE_FLUX_PRODUCT = sym('force_flux_product', ENTROPY_RATE);
153
+ /**
154
+ * RHS of `σ = Σᵢ Jᵢ Xᵢ`:
155
+ *
156
+ * force_flux_product
157
+ *
158
+ * Encoded as a single typed-stub (no internal expansion in the AST).
159
+ * Dim `[entropy/time]`.
160
+ */
161
+ export const BE28_ENTROPY_PRODUCTION_RHS = BE28_FORCE_FLUX_PRODUCT;
162
+ /** LHS: σ (total entropy production rate). Dim `[entropy/time]`. */
163
+ export const BE28_ENTROPY_PRODUCTION_LHS = sym('sigma', ENTROPY_RATE);
164
+ /**
165
+ * Evaluate the Onsager linear-response entropy production rate:
166
+ *
167
+ * σ = Σᵢ Jᵢ Xᵢ
168
+ *
169
+ * The caller supplies the already-summed force-flux product as a
170
+ * scalar; the AST cannot expand the discrete-index sum, so the
171
+ * evaluator takes the sum as input.
172
+ *
173
+ * @returns σ in W/K (joule per second per kelvin). Must be ≥ 0
174
+ * by the Second Law.
175
+ */
176
+ export function evaluateOnsagerEntropyProduction(input) {
177
+ const { force_flux_product_W_per_K } = input;
178
+ if (!Number.isFinite(force_flux_product_W_per_K)) {
179
+ throw new RangeError(`evaluateOnsagerEntropyProduction: force_flux_product_W_per_K must be finite, got ${force_flux_product_W_per_K}`);
180
+ }
181
+ if (force_flux_product_W_per_K < 0) {
182
+ throw new RangeError(`evaluateOnsagerEntropyProduction: σ ≥ 0 by the Second Law; got ${force_flux_product_W_per_K}. ` +
183
+ `If the input represents a fluctuation that can be negative on short timescales, ` +
184
+ `it is not an entropy production rate — check the sign convention or the choice of conjugate forces.`);
185
+ }
186
+ return force_flux_product_W_per_K;
187
+ }
188
+ // --- Self-validation ---
189
+ /**
190
+ * Run the AST through the dimensional analyzer; LHS and RHS should
191
+ * both be `[entropy/time]`.
192
+ */
193
+ export function validateBE28Dimensions() {
194
+ const eq = validateEquation(BE28_ENTROPY_PRODUCTION_LHS, BE28_ENTROPY_PRODUCTION_RHS);
195
+ const lhs = validate(BE28_ENTROPY_PRODUCTION_LHS);
196
+ const rhs = validate(BE28_ENTROPY_PRODUCTION_RHS);
197
+ return {
198
+ ok: eq.ok,
199
+ lhsDim: lhs.inferredDimension,
200
+ rhsDim: rhs.inferredDimension,
201
+ };
202
+ }
203
+ //# sourceMappingURL=be-28-onsager-entropy-production.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"be-28-onsager-entropy-production.js","sourceRoot":"","sources":["../../../src/bridges/equations/be-28-onsager-entropy-production.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+HG;AAGH,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAK5E,MAAM,GAAG,GAAG,CAAC,IAAY,EAAE,GAAc,EAAY,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;AAExF,8BAA8B;AAE9B;;;;GAIG;AACH,MAAM,YAAY,GAAc;IAC9B,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;CAC/C,CAAC;AAEF,uBAAuB;AAEvB;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAa,GAAG,CAClD,oBAAoB,EACpB,YAAY,CACb,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAa,uBAAuB,CAAC;AAE7E,oEAAoE;AACpE,MAAM,CAAC,MAAM,2BAA2B,GAAa,GAAG,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;AAShF;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,gCAAgC,CAAC,KAA2B;IAC1E,MAAM,EAAE,0BAA0B,EAAE,GAAG,KAAK,CAAC;IAC7C,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,0BAA0B,CAAC,EAAE,CAAC;QACjD,MAAM,IAAI,UAAU,CAClB,oFAAoF,0BAA0B,EAAE,CACjH,CAAC;IACJ,CAAC;IACD,IAAI,0BAA0B,GAAG,CAAC,EAAE,CAAC;QACnC,MAAM,IAAI,UAAU,CAClB,kEAAkE,0BAA0B,IAAI;YAC9F,kFAAkF;YAClF,qGAAqG,CACxG,CAAC;IACJ,CAAC;IACD,OAAO,0BAA0B,CAAC;AACpC,CAAC;AAED,0BAA0B;AAE1B;;;GAGG;AACH,MAAM,UAAU,sBAAsB;IACpC,MAAM,EAAE,GAAG,gBAAgB,CAAC,2BAA2B,EAAE,2BAA2B,CAAC,CAAC;IACtF,MAAM,GAAG,GAAG,QAAQ,CAAC,2BAA2B,CAAC,CAAC;IAClD,MAAM,GAAG,GAAG,QAAQ,CAAC,2BAA2B,CAAC,CAAC;IAClD,OAAO;QACL,EAAE,EAAE,EAAE,CAAC,EAAE;QACT,MAAM,EAAE,GAAG,CAAC,iBAAiB;QAC7B,MAAM,EAAE,GAAG,CAAC,iBAAiB;KAC9B,CAAC;AACJ,CAAC"}
@@ -0,0 +1,86 @@
1
+ /**
2
+ * Bridge Equation 29 — Jarzynski free-energy difference (canonical
3
+ * 1997 equality, post Wave Y reformulation).
4
+ *
5
+ * ΔF = −k_B T ln⟨exp(−W / (k_B T))⟩
6
+ *
7
+ * Reference: Jarzynski 1997 *Phys. Rev. Lett.* 78:2690 (canonical
8
+ * non-equilibrium free-energy equality; exact identity for any work
9
+ * protocol connecting two equilibrium states at temperature T).
10
+ *
11
+ * Status: speculative.
12
+ *
13
+ * Honest-claude scope notes:
14
+ * - The Jarzynski equality itself is canonical; the *bridge framing*
15
+ * — applying it to gravitational work in curved spacetime, the
16
+ * original BE-29 framing — is the speculative element. The
17
+ * gravitational-correction term `(β/(2c⁴)) ∫T^μν δg_μν √(-g) d⁴x`
18
+ * is dropped here as the AST-unencodable extension.
19
+ * - The AST has no `exp` primitive nor `ln` primitive; the average
20
+ * `⟨exp(-βW)⟩` is encoded as a single dimensionless symbol stub
21
+ * `'avg_exp_minus_betaW'`, with the exp argument β·W = W/(k_B T)
22
+ * exposed as a separate ExprNode `BE29_BETAW_ARG` (verifiable
23
+ * dimensionless via the dimensional analyzer).
24
+ * - Both sides have dim [energy]: ΔF [J]; k_B T [J]; ⟨exp(-βW)⟩
25
+ * dimensionless; ln(dimensionless) dimensionless; product [J]. ✓
26
+ *
27
+ * Numerical bracket: at quasi-static (reversible) work, W = W_rev and
28
+ * ⟨exp(-βW)⟩ = exp(-βW_rev), so ΔF = -k_BT · (-βW_rev) = W_rev. The
29
+ * Jarzynski equality reduces to the equilibrium identity in this limit.
30
+ *
31
+ * @see docs/specification/Part-II.md ("Bridge Equation 29")
32
+ * @see src/bridges/index.ts BRIDGE_EQUATIONS.find(e => e.id === 29)
33
+ * @module bridges/equations/be-29-jarzynski
34
+ */
35
+ import type { ExprNode, DimensionValidationReport } from '../../dimensional/validator.js';
36
+ /**
37
+ * Lemma AST: the exp-argument β·W = W/(k_B T), exposed for verification
38
+ * that the exponent is dimensionless.
39
+ *
40
+ * [W]/[k_B T] = [J]/[J] = [1] ✓
41
+ */
42
+ export declare const BE29_BETAW_ARG: ExprNode;
43
+ /**
44
+ * RHS of the Jarzynski equality: `−k_B T · ln⟨exp(-βW)⟩`.
45
+ *
46
+ * The AST has no `ln` primitive; we encode the relation as
47
+ * `ΔF = -k_B T · L`
48
+ * where `L` is a dimensionless symbol stub representing
49
+ * `ln⟨exp(-W/(k_B T))⟩`. The minus sign is captured by encoding the
50
+ * coefficient as `-1` (a dimensionless symbol stub named `-1`).
51
+ *
52
+ * Both terms multiplicatively combine to dim [energy] = [k_B T].
53
+ */
54
+ export declare const BE29_JARZYNSKI_RHS: ExprNode;
55
+ /** LHS: ΔF has dimension [energy]. */
56
+ export declare const BE29_JARZYNSKI_LHS: ExprNode;
57
+ export interface JarzynskiInputs {
58
+ /**
59
+ * Sample of work values W_i (joules) from N independent realizations
60
+ * of the non-equilibrium protocol (forward direction).
61
+ */
62
+ W_samples_J: ReadonlyArray<number>;
63
+ /** Temperature T (K). Must be > 0 and finite. */
64
+ T_K: number;
65
+ }
66
+ /**
67
+ * Evaluate the Jarzynski free-energy difference from a sample of work
68
+ * values:
69
+ *
70
+ * ΔF = −k_B T ln⟨exp(−W / (k_B T))⟩
71
+ *
72
+ * The ensemble average is approximated by the sample mean over the
73
+ * `W_samples_J` array. For a reliable estimate the sample size must be
74
+ * large enough to capture the rare-event tail; the Jarzynski estimator
75
+ * has well-known finite-sample bias for low-temperature / high-work-
76
+ * variance protocols (Park-Schulten 2003 *J. Chem. Phys.* 119:5946).
77
+ *
78
+ * @returns Free-energy difference ΔF in joules.
79
+ */
80
+ export declare function evaluateJarzynski(input: JarzynskiInputs): number;
81
+ /**
82
+ * Run the AST through the dimensional analyzer; both sides should be
83
+ * [energy].
84
+ */
85
+ export declare function validateBE29Dimensions(): DimensionValidationReport;
86
+ //# sourceMappingURL=be-29-jarzynski.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"be-29-jarzynski.d.ts","sourceRoot":"","sources":["../../../src/bridges/equations/be-29-jarzynski.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAa1F;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,QAY5B,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,EAAE,QAQhC,CAAC;AAEF,sCAAsC;AACtC,eAAO,MAAM,kBAAkB,EAAE,QAAiC,CAAC;AAInE,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,WAAW,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACnC,iDAAiD;IACjD,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,CA2BhE;AAID;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,yBAAyB,CASlE"}
@@ -0,0 +1,132 @@
1
+ /**
2
+ * Bridge Equation 29 — Jarzynski free-energy difference (canonical
3
+ * 1997 equality, post Wave Y reformulation).
4
+ *
5
+ * ΔF = −k_B T ln⟨exp(−W / (k_B T))⟩
6
+ *
7
+ * Reference: Jarzynski 1997 *Phys. Rev. Lett.* 78:2690 (canonical
8
+ * non-equilibrium free-energy equality; exact identity for any work
9
+ * protocol connecting two equilibrium states at temperature T).
10
+ *
11
+ * Status: speculative.
12
+ *
13
+ * Honest-claude scope notes:
14
+ * - The Jarzynski equality itself is canonical; the *bridge framing*
15
+ * — applying it to gravitational work in curved spacetime, the
16
+ * original BE-29 framing — is the speculative element. The
17
+ * gravitational-correction term `(β/(2c⁴)) ∫T^μν δg_μν √(-g) d⁴x`
18
+ * is dropped here as the AST-unencodable extension.
19
+ * - The AST has no `exp` primitive nor `ln` primitive; the average
20
+ * `⟨exp(-βW)⟩` is encoded as a single dimensionless symbol stub
21
+ * `'avg_exp_minus_betaW'`, with the exp argument β·W = W/(k_B T)
22
+ * exposed as a separate ExprNode `BE29_BETAW_ARG` (verifiable
23
+ * dimensionless via the dimensional analyzer).
24
+ * - Both sides have dim [energy]: ΔF [J]; k_B T [J]; ⟨exp(-βW)⟩
25
+ * dimensionless; ln(dimensionless) dimensionless; product [J]. ✓
26
+ *
27
+ * Numerical bracket: at quasi-static (reversible) work, W = W_rev and
28
+ * ⟨exp(-βW)⟩ = exp(-βW_rev), so ΔF = -k_BT · (-βW_rev) = W_rev. The
29
+ * Jarzynski equality reduces to the equilibrium identity in this limit.
30
+ *
31
+ * @see docs/specification/Part-II.md ("Bridge Equation 29")
32
+ * @see src/bridges/index.ts BRIDGE_EQUATIONS.find(e => e.id === 29)
33
+ * @module bridges/equations/be-29-jarzynski
34
+ */
35
+ import { validate, validateEquation } from '../../dimensional/validator.js';
36
+ import { DIMENSIONLESS, ENERGY, TEMPERATURE, } from '../../dimensional/types.js';
37
+ import { k_B as DIM_kB } from '../../dimensional/constants.js';
38
+ import { PhysicalConstants } from '../../core/types.js';
39
+ const sym = (name, dim) => ({ kind: 'symbol', name, dim });
40
+ /**
41
+ * Lemma AST: the exp-argument β·W = W/(k_B T), exposed for verification
42
+ * that the exponent is dimensionless.
43
+ *
44
+ * [W]/[k_B T] = [J]/[J] = [1] ✓
45
+ */
46
+ export const BE29_BETAW_ARG = {
47
+ kind: 'op', op: '/',
48
+ args: [
49
+ sym('W', ENERGY),
50
+ {
51
+ kind: 'op', op: '*',
52
+ args: [
53
+ sym('k_B', DIM_kB),
54
+ sym('T', TEMPERATURE),
55
+ ],
56
+ },
57
+ ],
58
+ };
59
+ /**
60
+ * RHS of the Jarzynski equality: `−k_B T · ln⟨exp(-βW)⟩`.
61
+ *
62
+ * The AST has no `ln` primitive; we encode the relation as
63
+ * `ΔF = -k_B T · L`
64
+ * where `L` is a dimensionless symbol stub representing
65
+ * `ln⟨exp(-W/(k_B T))⟩`. The minus sign is captured by encoding the
66
+ * coefficient as `-1` (a dimensionless symbol stub named `-1`).
67
+ *
68
+ * Both terms multiplicatively combine to dim [energy] = [k_B T].
69
+ */
70
+ export const BE29_JARZYNSKI_RHS = {
71
+ kind: 'op', op: '*',
72
+ args: [
73
+ sym('-1', DIMENSIONLESS),
74
+ sym('k_B', DIM_kB),
75
+ sym('T', TEMPERATURE),
76
+ sym('ln_avg_exp_minus_betaW', DIMENSIONLESS),
77
+ ],
78
+ };
79
+ /** LHS: ΔF has dimension [energy]. */
80
+ export const BE29_JARZYNSKI_LHS = sym('Delta_F', ENERGY);
81
+ /**
82
+ * Evaluate the Jarzynski free-energy difference from a sample of work
83
+ * values:
84
+ *
85
+ * ΔF = −k_B T ln⟨exp(−W / (k_B T))⟩
86
+ *
87
+ * The ensemble average is approximated by the sample mean over the
88
+ * `W_samples_J` array. For a reliable estimate the sample size must be
89
+ * large enough to capture the rare-event tail; the Jarzynski estimator
90
+ * has well-known finite-sample bias for low-temperature / high-work-
91
+ * variance protocols (Park-Schulten 2003 *J. Chem. Phys.* 119:5946).
92
+ *
93
+ * @returns Free-energy difference ΔF in joules.
94
+ */
95
+ export function evaluateJarzynski(input) {
96
+ const { W_samples_J, T_K } = input;
97
+ if (!Number.isFinite(T_K) || T_K <= 0) {
98
+ throw new RangeError(`evaluateJarzynski: T_K must be a finite positive number, got ${T_K}`);
99
+ }
100
+ if (!Array.isArray(W_samples_J) || W_samples_J.length === 0) {
101
+ throw new RangeError('evaluateJarzynski: W_samples_J must be a non-empty array');
102
+ }
103
+ for (const W of W_samples_J) {
104
+ if (!Number.isFinite(W)) {
105
+ throw new RangeError(`evaluateJarzynski: every W in W_samples_J must be finite, got ${W}`);
106
+ }
107
+ }
108
+ const { kB } = PhysicalConstants;
109
+ const beta = 1 / (kB * T_K);
110
+ let sum = 0;
111
+ for (const W of W_samples_J) {
112
+ sum += Math.exp(-beta * W);
113
+ }
114
+ const avg = sum / W_samples_J.length;
115
+ return -kB * T_K * Math.log(avg);
116
+ }
117
+ // --- Self-validation ---
118
+ /**
119
+ * Run the AST through the dimensional analyzer; both sides should be
120
+ * [energy].
121
+ */
122
+ export function validateBE29Dimensions() {
123
+ const eq = validateEquation(BE29_JARZYNSKI_LHS, BE29_JARZYNSKI_RHS);
124
+ const lhs = validate(BE29_JARZYNSKI_LHS);
125
+ const rhs = validate(BE29_JARZYNSKI_RHS);
126
+ return {
127
+ ok: eq.ok,
128
+ lhsDim: lhs.inferredDimension,
129
+ rhsDim: rhs.inferredDimension,
130
+ };
131
+ }
132
+ //# sourceMappingURL=be-29-jarzynski.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"be-29-jarzynski.js","sourceRoot":"","sources":["../../../src/bridges/equations/be-29-jarzynski.ts"],"names":[],"mappings":"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"}