universal-physics-tensor 8.0.0 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (916) hide show
  1. package/README.md +26 -21
  2. package/data/atlas/atlas.json +75 -64
  3. package/data/atlas/atlas.jsonld +1 -1
  4. package/data/atlas/diffusion.json +23 -22
  5. package/data/atlas/oscillators.json +21 -16
  6. package/data/atlas/waves.json +33 -28
  7. package/data/bridge-catalog.json +1356 -1791
  8. package/data/bridge-catalog.schema.json +789 -46
  9. package/data/quantities.json +280 -234
  10. package/data/quantities.schema.json +52 -0
  11. package/data/schemas/atlas-record.v0.json +184 -46
  12. package/data/units.json +1178 -0
  13. package/data/units.schema.json +124 -0
  14. package/dist/atlas/applicability.d.ts.map +1 -1
  15. package/dist/atlas/applicability.js +14 -3
  16. package/dist/atlas/applicability.js.map +1 -1
  17. package/dist/atlas/association.d.ts +1 -1
  18. package/dist/atlas/association.js.map +1 -1
  19. package/dist/atlas/benchmark/backend-shapes.d.ts.map +1 -1
  20. package/dist/atlas/benchmark/backend-shapes.js +5 -1
  21. package/dist/atlas/benchmark/backend-shapes.js.map +1 -1
  22. package/dist/atlas/benchmark/baselines.d.ts.map +1 -1
  23. package/dist/atlas/benchmark/baselines.js +8 -0
  24. package/dist/atlas/benchmark/baselines.js.map +1 -1
  25. package/dist/atlas/benchmark/hybrid-retrieval.d.ts +3 -2
  26. package/dist/atlas/benchmark/hybrid-retrieval.d.ts.map +1 -1
  27. package/dist/atlas/benchmark/hybrid-retrieval.js +16 -12
  28. package/dist/atlas/benchmark/hybrid-retrieval.js.map +1 -1
  29. package/dist/atlas/benchmark/leakage.js.map +1 -1
  30. package/dist/atlas/benchmark/loader.js.map +1 -1
  31. package/dist/atlas/benchmark/run-atlas.d.ts.map +1 -1
  32. package/dist/atlas/benchmark/run-atlas.js +14 -2
  33. package/dist/atlas/benchmark/run-atlas.js.map +1 -1
  34. package/dist/atlas/benchmark/stats.d.ts +1 -1
  35. package/dist/atlas/benchmark/stats.d.ts.map +1 -1
  36. package/dist/atlas/benchmark/stats.js +1 -1
  37. package/dist/atlas/benchmark/stats.js.map +1 -1
  38. package/dist/atlas/benchmark/study.js.map +1 -1
  39. package/dist/atlas/benchmark/types.js.map +1 -1
  40. package/dist/atlas/bridge-record.d.ts +4 -4
  41. package/dist/atlas/bridge-record.d.ts.map +1 -1
  42. package/dist/atlas/bridge-record.js +6 -6
  43. package/dist/atlas/bridge-record.js.map +1 -1
  44. package/dist/atlas/catalog-formal-ref.js.map +1 -1
  45. package/dist/atlas/chain-pipeline.d.ts +0 -11
  46. package/dist/atlas/chain-pipeline.d.ts.map +1 -1
  47. package/dist/atlas/chain-pipeline.js +5 -16
  48. package/dist/atlas/chain-pipeline.js.map +1 -1
  49. package/dist/atlas/composition-table.js.map +1 -1
  50. package/dist/atlas/conventions.js.map +1 -1
  51. package/dist/atlas/coverage.d.ts +2 -2
  52. package/dist/atlas/coverage.js.map +1 -1
  53. package/dist/atlas/derivation.js.map +1 -1
  54. package/dist/atlas/derive-evidence.d.ts +6 -4
  55. package/dist/atlas/derive-evidence.d.ts.map +1 -1
  56. package/dist/atlas/derive-evidence.js +7 -2
  57. package/dist/atlas/derive-evidence.js.map +1 -1
  58. package/dist/atlas/diffusion/bridges-closure.d.ts.map +1 -1
  59. package/dist/atlas/diffusion/bridges-closure.js +0 -5
  60. package/dist/atlas/diffusion/bridges-closure.js.map +1 -1
  61. package/dist/atlas/diffusion/bridges.d.ts.map +1 -1
  62. package/dist/atlas/diffusion/bridges.js +0 -3
  63. package/dist/atlas/diffusion/bridges.js.map +1 -1
  64. package/dist/atlas/diffusion/dimensions.js.map +1 -1
  65. package/dist/atlas/diffusion/index.d.ts +1 -1
  66. package/dist/atlas/diffusion/index.d.ts.map +1 -1
  67. package/dist/atlas/diffusion/index.js.map +1 -1
  68. package/dist/atlas/diffusion/models.js.map +1 -1
  69. package/dist/atlas/diffusion/numerics.js.map +1 -1
  70. package/dist/atlas/error-algebra.d.ts +6 -0
  71. package/dist/atlas/error-algebra.d.ts.map +1 -1
  72. package/dist/atlas/error-algebra.js +26 -0
  73. package/dist/atlas/error-algebra.js.map +1 -1
  74. package/dist/atlas/export.d.ts +18 -2
  75. package/dist/atlas/export.d.ts.map +1 -1
  76. package/dist/atlas/export.js +9 -3
  77. package/dist/atlas/export.js.map +1 -1
  78. package/dist/atlas/families.d.ts +19 -2
  79. package/dist/atlas/families.d.ts.map +1 -1
  80. package/dist/atlas/families.js +26 -3
  81. package/dist/atlas/families.js.map +1 -1
  82. package/dist/atlas/family.d.ts +27 -0
  83. package/dist/atlas/family.d.ts.map +1 -0
  84. package/dist/atlas/family.js +12 -0
  85. package/dist/atlas/family.js.map +1 -0
  86. package/dist/atlas/index.d.ts +3 -2
  87. package/dist/atlas/index.d.ts.map +1 -1
  88. package/dist/atlas/index.js +2 -1
  89. package/dist/atlas/index.js.map +1 -1
  90. package/dist/atlas/link-prediction.d.ts +1 -1
  91. package/dist/atlas/link-prediction.d.ts.map +1 -1
  92. package/dist/atlas/link-prediction.js.map +1 -1
  93. package/dist/atlas/model.js.map +1 -1
  94. package/dist/atlas/oscillators/bridges-coarse.d.ts.map +1 -1
  95. package/dist/atlas/oscillators/bridges-coarse.js +0 -1
  96. package/dist/atlas/oscillators/bridges-coarse.js.map +1 -1
  97. package/dist/atlas/oscillators/bridges-exact.d.ts.map +1 -1
  98. package/dist/atlas/oscillators/bridges-exact.js +0 -3
  99. package/dist/atlas/oscillators/bridges-exact.js.map +1 -1
  100. package/dist/atlas/oscillators/bridges-limits.d.ts.map +1 -1
  101. package/dist/atlas/oscillators/bridges-limits.js +0 -2
  102. package/dist/atlas/oscillators/bridges-limits.js.map +1 -1
  103. package/dist/atlas/oscillators/dimensions.js.map +1 -1
  104. package/dist/atlas/oscillators/index.d.ts +1 -16
  105. package/dist/atlas/oscillators/index.d.ts.map +1 -1
  106. package/dist/atlas/oscillators/index.js.map +1 -1
  107. package/dist/atlas/oscillators/limit-witnesses.js.map +1 -1
  108. package/dist/atlas/oscillators/models.js.map +1 -1
  109. package/dist/atlas/oscillators/norm-transport-witness.js.map +1 -1
  110. package/dist/atlas/oscillators/norm-transport.js.map +1 -1
  111. package/dist/atlas/oscillators/norms.js.map +1 -1
  112. package/dist/atlas/oscillators/pendulum-motion.js.map +1 -1
  113. package/dist/atlas/oscillators/phase-carriage.js.map +1 -1
  114. package/dist/atlas/oscillators/phase-translation.js.map +1 -1
  115. package/dist/atlas/oscillators/position-translation.js.map +1 -1
  116. package/dist/atlas/oscillators/rejections.js.map +1 -1
  117. package/dist/atlas/path-bound.js.map +1 -1
  118. package/dist/atlas/physjs-entries.generated.d.ts +1601 -220
  119. package/dist/atlas/physjs-entries.generated.d.ts.map +1 -1
  120. package/dist/atlas/physjs-entries.generated.js +1854 -345
  121. package/dist/atlas/physjs-entries.generated.js.map +1 -1
  122. package/dist/atlas/physjs-ref.d.ts +151 -117
  123. package/dist/atlas/physjs-ref.d.ts.map +1 -1
  124. package/dist/atlas/physjs-ref.js +244 -211
  125. package/dist/atlas/physjs-ref.js.map +1 -1
  126. package/dist/atlas/physjs-reviewed.d.ts +31 -0
  127. package/dist/atlas/physjs-reviewed.d.ts.map +1 -0
  128. package/dist/atlas/physjs-reviewed.js +194 -0
  129. package/dist/atlas/physjs-reviewed.js.map +1 -0
  130. package/dist/atlas/poster/associations.js.map +1 -1
  131. package/dist/atlas/poster/derivations.js.map +1 -1
  132. package/dist/atlas/poster/statements.js.map +1 -1
  133. package/dist/atlas/proof-target.d.ts +16 -8
  134. package/dist/atlas/proof-target.d.ts.map +1 -1
  135. package/dist/atlas/proof-target.js +34 -31
  136. package/dist/atlas/proof-target.js.map +1 -1
  137. package/dist/atlas/public.d.ts +2 -1
  138. package/dist/atlas/public.d.ts.map +1 -1
  139. package/dist/atlas/public.js +2 -1
  140. package/dist/atlas/public.js.map +1 -1
  141. package/dist/atlas/regime.js.map +1 -1
  142. package/dist/atlas/serialize.d.ts +18 -12
  143. package/dist/atlas/serialize.d.ts.map +1 -1
  144. package/dist/atlas/serialize.js +28 -18
  145. package/dist/atlas/serialize.js.map +1 -1
  146. package/dist/atlas/statement.js.map +1 -1
  147. package/dist/atlas/translation-registry.js.map +1 -1
  148. package/dist/atlas/translation.js.map +1 -1
  149. package/dist/atlas/types.d.ts +9 -2
  150. package/dist/atlas/types.d.ts.map +1 -1
  151. package/dist/atlas/types.js +1 -1
  152. package/dist/atlas/types.js.map +1 -1
  153. package/dist/atlas/waves/bridges-closure.d.ts.map +1 -1
  154. package/dist/atlas/waves/bridges-closure.js +0 -3
  155. package/dist/atlas/waves/bridges-closure.js.map +1 -1
  156. package/dist/atlas/waves/bridges.d.ts.map +1 -1
  157. package/dist/atlas/waves/bridges.js +0 -4
  158. package/dist/atlas/waves/bridges.js.map +1 -1
  159. package/dist/atlas/waves/index.d.ts +1 -1
  160. package/dist/atlas/waves/index.d.ts.map +1 -1
  161. package/dist/atlas/waves/index.js.map +1 -1
  162. package/dist/atlas/waves/models.js.map +1 -1
  163. package/dist/atlas/waves/numerics.js.map +1 -1
  164. package/dist/atlas/witness-artifact.js.map +1 -1
  165. package/dist/atlas/witness-dominance.d.ts +4 -3
  166. package/dist/atlas/witness-dominance.d.ts.map +1 -1
  167. package/dist/atlas/witness-dominance.js +15 -5
  168. package/dist/atlas/witness-dominance.js.map +1 -1
  169. package/dist/atlas/witness-numeric.d.ts +8 -4
  170. package/dist/atlas/witness-numeric.d.ts.map +1 -1
  171. package/dist/atlas/witness-numeric.js +27 -2
  172. package/dist/atlas/witness-numeric.js.map +1 -1
  173. package/dist/atlas/witness-result.d.ts +7 -1
  174. package/dist/atlas/witness-result.d.ts.map +1 -1
  175. package/dist/atlas/witness-result.js.map +1 -1
  176. package/dist/atlas/witness-specs.js.map +1 -1
  177. package/dist/atlas/witness-symbolic.js.map +1 -1
  178. package/dist/atlas/witnesses/quantum-support.js.map +1 -1
  179. package/dist/bridges/caller-table.d.ts +1 -1
  180. package/dist/bridges/caller-table.d.ts.map +1 -1
  181. package/dist/bridges/caller-table.js.map +1 -1
  182. package/dist/bridges/carrier-sign.d.ts.map +1 -1
  183. package/dist/bridges/carrier-sign.js +8 -3
  184. package/dist/bridges/carrier-sign.js.map +1 -1
  185. package/dist/bridges/catalog-adapter.d.ts +12 -3
  186. package/dist/bridges/catalog-adapter.d.ts.map +1 -1
  187. package/dist/bridges/catalog-adapter.js +22 -14
  188. package/dist/bridges/catalog-adapter.js.map +1 -1
  189. package/dist/bridges/catalog-load.d.ts +19 -2
  190. package/dist/bridges/catalog-load.d.ts.map +1 -1
  191. package/dist/bridges/catalog-load.js +233 -14
  192. package/dist/bridges/catalog-load.js.map +1 -1
  193. package/dist/bridges/catalog-types.d.ts +96 -27
  194. package/dist/bridges/catalog-types.d.ts.map +1 -1
  195. package/dist/bridges/catalog-types.js.map +1 -1
  196. package/dist/bridges/coefficient-statement.js +1 -5
  197. package/dist/bridges/coefficient-statement.js.map +1 -1
  198. package/dist/bridges/confrontation-coverage.js.map +1 -1
  199. package/dist/bridges/confrontations.d.ts +1 -1
  200. package/dist/bridges/confrontations.d.ts.map +1 -1
  201. package/dist/bridges/confrontations.js +1 -1
  202. package/dist/bridges/confrontations.js.map +1 -1
  203. package/dist/bridges/evaluation-errors.d.ts +89 -0
  204. package/dist/bridges/evaluation-errors.d.ts.map +1 -0
  205. package/dist/bridges/evaluation-errors.js +136 -0
  206. package/dist/bridges/evaluation-errors.js.map +1 -0
  207. package/dist/bridges/evaluator-inputs.d.ts +5 -3
  208. package/dist/bridges/evaluator-inputs.d.ts.map +1 -1
  209. package/dist/bridges/evaluator-inputs.js +24 -24
  210. package/dist/bridges/evaluator-inputs.js.map +1 -1
  211. package/dist/bridges/evaluators.d.ts +48 -8
  212. package/dist/bridges/evaluators.d.ts.map +1 -1
  213. package/dist/bridges/evaluators.js +173 -38
  214. package/dist/bridges/evaluators.js.map +1 -1
  215. package/dist/bridges/expr-parse.d.ts +38 -7
  216. package/dist/bridges/expr-parse.d.ts.map +1 -1
  217. package/dist/bridges/expr-parse.js +129 -156
  218. package/dist/bridges/expr-parse.js.map +1 -1
  219. package/dist/bridges/holds.d.ts +16 -8
  220. package/dist/bridges/holds.d.ts.map +1 -1
  221. package/dist/bridges/holds.js +130 -236
  222. package/dist/bridges/holds.js.map +1 -1
  223. package/dist/bridges/index.d.ts +15 -14
  224. package/dist/bridges/index.d.ts.map +1 -1
  225. package/dist/bridges/index.js +14 -15
  226. package/dist/bridges/index.js.map +1 -1
  227. package/dist/bridges/input-contract.d.ts +65 -0
  228. package/dist/bridges/input-contract.d.ts.map +1 -0
  229. package/dist/bridges/input-contract.js +97 -0
  230. package/dist/bridges/input-contract.js.map +1 -0
  231. package/dist/bridges/membership.d.ts +5 -3
  232. package/dist/bridges/membership.d.ts.map +1 -1
  233. package/dist/bridges/membership.js +5 -6
  234. package/dist/bridges/membership.js.map +1 -1
  235. package/dist/bridges/notices.d.ts +11 -0
  236. package/dist/bridges/notices.d.ts.map +1 -0
  237. package/dist/bridges/notices.js +22 -0
  238. package/dist/bridges/notices.js.map +1 -0
  239. package/dist/bridges/observations/types.js.map +1 -1
  240. package/dist/bridges/rejected.d.ts +11 -17
  241. package/dist/bridges/rejected.d.ts.map +1 -1
  242. package/dist/bridges/rejected.js +13 -68
  243. package/dist/bridges/rejected.js.map +1 -1
  244. package/dist/bridges/relation-eval.d.ts +5 -6
  245. package/dist/bridges/relation-eval.d.ts.map +1 -1
  246. package/dist/bridges/relation-eval.js +9 -38
  247. package/dist/bridges/relation-eval.js.map +1 -1
  248. package/dist/bridges/rhs-registry.js.map +1 -1
  249. package/dist/bridges/sensitivity.d.ts +11 -3
  250. package/dist/bridges/sensitivity.d.ts.map +1 -1
  251. package/dist/bridges/sensitivity.js +24 -10
  252. package/dist/bridges/sensitivity.js.map +1 -1
  253. package/dist/bridges/tensor-index.js.map +1 -1
  254. package/dist/bridges/types.d.ts +1 -7
  255. package/dist/bridges/types.d.ts.map +1 -1
  256. package/dist/bridges/types.js +1 -4
  257. package/dist/bridges/types.js.map +1 -1
  258. package/dist/canonical/canonical-equation.d.ts +31 -0
  259. package/dist/canonical/canonical-equation.d.ts.map +1 -1
  260. package/dist/canonical/canonical-equation.js.map +1 -1
  261. package/dist/canonical/dimensional-fields.js.map +1 -1
  262. package/dist/canonical/entries/_l1-build.js.map +1 -1
  263. package/dist/canonical/entries/atomic.d.ts.map +1 -1
  264. package/dist/canonical/entries/atomic.js +11 -1
  265. package/dist/canonical/entries/atomic.js.map +1 -1
  266. package/dist/canonical/entries/condensed-matter.d.ts.map +1 -1
  267. package/dist/canonical/entries/condensed-matter.js +7 -4
  268. package/dist/canonical/entries/condensed-matter.js.map +1 -1
  269. package/dist/canonical/entries/dimensional-classics.d.ts.map +1 -1
  270. package/dist/canonical/entries/dimensional-classics.js +50 -2
  271. package/dist/canonical/entries/dimensional-classics.js.map +1 -1
  272. package/dist/canonical/entries/electromagnetism.d.ts.map +1 -1
  273. package/dist/canonical/entries/electromagnetism.js +32 -2
  274. package/dist/canonical/entries/electromagnetism.js.map +1 -1
  275. package/dist/canonical/entries/fluids-waves.d.ts.map +1 -1
  276. package/dist/canonical/entries/fluids-waves.js +34 -0
  277. package/dist/canonical/entries/fluids-waves.js.map +1 -1
  278. package/dist/canonical/entries/mechanics.d.ts.map +1 -1
  279. package/dist/canonical/entries/mechanics.js +24 -0
  280. package/dist/canonical/entries/mechanics.js.map +1 -1
  281. package/dist/canonical/entries/nonmonomial.d.ts.map +1 -1
  282. package/dist/canonical/entries/nonmonomial.js +42 -24
  283. package/dist/canonical/entries/nonmonomial.js.map +1 -1
  284. package/dist/canonical/entries/relativity.d.ts.map +1 -1
  285. package/dist/canonical/entries/relativity.js +6 -0
  286. package/dist/canonical/entries/relativity.js.map +1 -1
  287. package/dist/canonical/entries/statistical-mechanics.d.ts.map +1 -1
  288. package/dist/canonical/entries/statistical-mechanics.js +24 -5
  289. package/dist/canonical/entries/statistical-mechanics.js.map +1 -1
  290. package/dist/canonical/entries/thermo-nuclear-cosmo.d.ts.map +1 -1
  291. package/dist/canonical/entries/thermo-nuclear-cosmo.js +15 -0
  292. package/dist/canonical/entries/thermo-nuclear-cosmo.js.map +1 -1
  293. package/dist/canonical/linkage.d.ts +29 -4
  294. package/dist/canonical/linkage.d.ts.map +1 -1
  295. package/dist/canonical/linkage.js +31 -29
  296. package/dist/canonical/linkage.js.map +1 -1
  297. package/dist/canonical/normal-form.d.ts +0 -8
  298. package/dist/canonical/normal-form.d.ts.map +1 -1
  299. package/dist/canonical/normal-form.js +17 -12
  300. package/dist/canonical/normal-form.js.map +1 -1
  301. package/dist/canonical/registry.js.map +1 -1
  302. package/dist/canonical/residual.js.map +1 -1
  303. package/dist/canonical/seed-l-layer.d.ts +7 -1
  304. package/dist/canonical/seed-l-layer.d.ts.map +1 -1
  305. package/dist/canonical/seed-l-layer.js +7 -1
  306. package/dist/canonical/seed-l-layer.js.map +1 -1
  307. package/dist/canonical/structural.d.ts +21 -0
  308. package/dist/canonical/structural.d.ts.map +1 -1
  309. package/dist/canonical/structural.js +24 -4
  310. package/dist/canonical/structural.js.map +1 -1
  311. package/dist/cases/brownian-sphere.js +4 -4
  312. package/dist/cases/brownian-sphere.js.map +1 -1
  313. package/dist/cases/damped-resonator.js +2 -2
  314. package/dist/cases/damped-resonator.js.map +1 -1
  315. package/dist/cases/index.d.ts +9 -2
  316. package/dist/cases/index.d.ts.map +1 -1
  317. package/dist/cases/index.js +26 -7
  318. package/dist/cases/index.js.map +1 -1
  319. package/dist/cases/kepler-rv.js +6 -6
  320. package/dist/cases/kepler-rv.js.map +1 -1
  321. package/dist/cases/lumped-cooling.js +1 -1
  322. package/dist/cases/lumped-cooling.js.map +1 -1
  323. package/dist/cases/quadrature.js.map +1 -1
  324. package/dist/cases/resistor-noise.js +3 -3
  325. package/dist/cases/resistor-noise.js.map +1 -1
  326. package/dist/cases/skin-depth.js.map +1 -1
  327. package/dist/cases/types.js.map +1 -1
  328. package/dist/cli/args.d.ts +7 -2
  329. package/dist/cli/args.d.ts.map +1 -1
  330. package/dist/cli/args.js +18 -2
  331. package/dist/cli/args.js.map +1 -1
  332. package/dist/cli/bindings.d.ts +13 -0
  333. package/dist/cli/bindings.d.ts.map +1 -0
  334. package/dist/cli/bindings.js +32 -0
  335. package/dist/cli/bindings.js.map +1 -0
  336. package/dist/cli/closed-form-range.js.map +1 -1
  337. package/dist/cli/command.js.map +1 -1
  338. package/dist/cli/commands/_atlas-map.d.ts +3 -3
  339. package/dist/cli/commands/_atlas-map.d.ts.map +1 -1
  340. package/dist/cli/commands/_atlas-map.js +43 -18
  341. package/dist/cli/commands/_atlas-map.js.map +1 -1
  342. package/dist/cli/commands/_atlas-route.js.map +1 -1
  343. package/dist/cli/commands/_discovery-opts.d.ts +2 -1
  344. package/dist/cli/commands/_discovery-opts.d.ts.map +1 -1
  345. package/dist/cli/commands/_discovery-opts.js +48 -18
  346. package/dist/cli/commands/_discovery-opts.js.map +1 -1
  347. package/dist/cli/commands/atlas.d.ts.map +1 -1
  348. package/dist/cli/commands/atlas.js +7 -12
  349. package/dist/cli/commands/atlas.js.map +1 -1
  350. package/dist/cli/commands/audit.d.ts.map +1 -1
  351. package/dist/cli/commands/audit.js +13 -21
  352. package/dist/cli/commands/audit.js.map +1 -1
  353. package/dist/cli/commands/axes.js.map +1 -1
  354. package/dist/cli/commands/candidates.d.ts.map +1 -1
  355. package/dist/cli/commands/candidates.js +16 -8
  356. package/dist/cli/commands/candidates.js.map +1 -1
  357. package/dist/cli/commands/canonical.js.map +1 -1
  358. package/dist/cli/commands/chain.js +1 -1
  359. package/dist/cli/commands/chain.js.map +1 -1
  360. package/dist/cli/commands/confront.d.ts.map +1 -1
  361. package/dist/cli/commands/confront.js +22 -14
  362. package/dist/cli/commands/confront.js.map +1 -1
  363. package/dist/cli/commands/connectors.d.ts.map +1 -1
  364. package/dist/cli/commands/connectors.js +8 -9
  365. package/dist/cli/commands/connectors.js.map +1 -1
  366. package/dist/cli/commands/coverage.js.map +1 -1
  367. package/dist/cli/commands/derive.d.ts.map +1 -1
  368. package/dist/cli/commands/derive.js +50 -26
  369. package/dist/cli/commands/derive.js.map +1 -1
  370. package/dist/cli/commands/discover.d.ts.map +1 -1
  371. package/dist/cli/commands/discover.js +18 -13
  372. package/dist/cli/commands/discover.js.map +1 -1
  373. package/dist/cli/commands/eval.d.ts.map +1 -1
  374. package/dist/cli/commands/eval.js +29 -26
  375. package/dist/cli/commands/eval.js.map +1 -1
  376. package/dist/cli/commands/evaluate.d.ts +1 -35
  377. package/dist/cli/commands/evaluate.d.ts.map +1 -1
  378. package/dist/cli/commands/evaluate.js +99 -208
  379. package/dist/cli/commands/evaluate.js.map +1 -1
  380. package/dist/cli/commands/explain.d.ts.map +1 -1
  381. package/dist/cli/commands/explain.js +57 -45
  382. package/dist/cli/commands/explain.js.map +1 -1
  383. package/dist/cli/commands/frontier.js.map +1 -1
  384. package/dist/cli/commands/ground.d.ts.map +1 -1
  385. package/dist/cli/commands/ground.js +41 -11
  386. package/dist/cli/commands/ground.js.map +1 -1
  387. package/dist/cli/commands/index.js.map +1 -1
  388. package/dist/cli/commands/map.d.ts.map +1 -1
  389. package/dist/cli/commands/map.js +84 -92
  390. package/dist/cli/commands/map.js.map +1 -1
  391. package/dist/cli/commands/metric.d.ts.map +1 -1
  392. package/dist/cli/commands/metric.js +53 -15
  393. package/dist/cli/commands/metric.js.map +1 -1
  394. package/dist/cli/commands/path.js +4 -4
  395. package/dist/cli/commands/path.js.map +1 -1
  396. package/dist/cli/commands/predict.js.map +1 -1
  397. package/dist/cli/commands/priority.js.map +1 -1
  398. package/dist/cli/commands/probe.d.ts.map +1 -1
  399. package/dist/cli/commands/probe.js +50 -26
  400. package/dist/cli/commands/probe.js.map +1 -1
  401. package/dist/cli/commands/recover.js +1 -1
  402. package/dist/cli/commands/recover.js.map +1 -1
  403. package/dist/cli/commands/regime.d.ts +5 -4
  404. package/dist/cli/commands/regime.d.ts.map +1 -1
  405. package/dist/cli/commands/regime.js +25 -27
  406. package/dist/cli/commands/regime.js.map +1 -1
  407. package/dist/cli/commands/retrieve.d.ts.map +1 -1
  408. package/dist/cli/commands/retrieve.js +22 -14
  409. package/dist/cli/commands/retrieve.js.map +1 -1
  410. package/dist/cli/commands/search.d.ts.map +1 -1
  411. package/dist/cli/commands/search.js +8 -4
  412. package/dist/cli/commands/search.js.map +1 -1
  413. package/dist/cli/commands/symbolic.d.ts.map +1 -1
  414. package/dist/cli/commands/symbolic.js +14 -7
  415. package/dist/cli/commands/symbolic.js.map +1 -1
  416. package/dist/cli/commands/testplan.js +4 -4
  417. package/dist/cli/commands/testplan.js.map +1 -1
  418. package/dist/cli/conventions.d.ts +6 -7
  419. package/dist/cli/conventions.d.ts.map +1 -1
  420. package/dist/cli/conventions.js +19 -28
  421. package/dist/cli/conventions.js.map +1 -1
  422. package/dist/cli/determination.js.map +1 -1
  423. package/dist/cli/errors.js.map +1 -1
  424. package/dist/cli/euler-guard.d.ts +13 -2
  425. package/dist/cli/euler-guard.d.ts.map +1 -1
  426. package/dist/cli/euler-guard.js +17 -3
  427. package/dist/cli/euler-guard.js.map +1 -1
  428. package/dist/cli/eval-numbers.d.ts +4 -9
  429. package/dist/cli/eval-numbers.d.ts.map +1 -1
  430. package/dist/cli/eval-numbers.js +11 -41
  431. package/dist/cli/eval-numbers.js.map +1 -1
  432. package/dist/cli/expr-print.d.ts +29 -2
  433. package/dist/cli/expr-print.d.ts.map +1 -1
  434. package/dist/cli/expr-print.js +46 -2
  435. package/dist/cli/expr-print.js.map +1 -1
  436. package/dist/cli/flag-help.js.map +1 -1
  437. package/dist/cli/graphs.js.map +1 -1
  438. package/dist/cli/library-defaults.d.ts +19 -0
  439. package/dist/cli/library-defaults.d.ts.map +1 -0
  440. package/dist/cli/library-defaults.js +22 -0
  441. package/dist/cli/library-defaults.js.map +1 -0
  442. package/dist/cli/main.js +7 -3
  443. package/dist/cli/main.js.map +1 -1
  444. package/dist/cli/map-evidence.js.map +1 -1
  445. package/dist/cli/output.d.ts +3 -6
  446. package/dist/cli/output.d.ts.map +1 -1
  447. package/dist/cli/output.js.map +1 -1
  448. package/dist/cli/published-url.d.ts +2 -0
  449. package/dist/cli/published-url.d.ts.map +1 -1
  450. package/dist/cli/published-url.js +5 -0
  451. package/dist/cli/published-url.js.map +1 -1
  452. package/dist/cli/record-reach.d.ts +6 -0
  453. package/dist/cli/record-reach.d.ts.map +1 -1
  454. package/dist/cli/record-reach.js +16 -10
  455. package/dist/cli/record-reach.js.map +1 -1
  456. package/dist/cli/record-tables.d.ts +2 -1
  457. package/dist/cli/record-tables.d.ts.map +1 -1
  458. package/dist/cli/record-tables.js +8 -3
  459. package/dist/cli/record-tables.js.map +1 -1
  460. package/dist/cli/record.d.ts.map +1 -1
  461. package/dist/cli/record.js +31 -12
  462. package/dist/cli/record.js.map +1 -1
  463. package/dist/cli/search-index.d.ts +5 -0
  464. package/dist/cli/search-index.d.ts.map +1 -1
  465. package/dist/cli/search-index.js +12 -1
  466. package/dist/cli/search-index.js.map +1 -1
  467. package/dist/cli/statuses.js.map +1 -1
  468. package/dist/cli/top-level-help.js.map +1 -1
  469. package/dist/cli/version.js.map +1 -1
  470. package/dist/cli-api.d.ts +57 -18
  471. package/dist/cli-api.d.ts.map +1 -1
  472. package/dist/cli-api.js +49 -21
  473. package/dist/cli-api.js.map +1 -1
  474. package/dist/composition/adjudication.d.ts +8 -30
  475. package/dist/composition/adjudication.d.ts.map +1 -1
  476. package/dist/composition/adjudication.js +15 -67
  477. package/dist/composition/adjudication.js.map +1 -1
  478. package/dist/composition/aliases.d.ts +1 -1
  479. package/dist/composition/aliases.d.ts.map +1 -1
  480. package/dist/composition/aliases.js +10 -20
  481. package/dist/composition/aliases.js.map +1 -1
  482. package/dist/composition/audit-coverage.d.ts +2 -0
  483. package/dist/composition/audit-coverage.d.ts.map +1 -1
  484. package/dist/composition/audit-coverage.js.map +1 -1
  485. package/dist/composition/axes.d.ts +12 -0
  486. package/dist/composition/axes.d.ts.map +1 -1
  487. package/dist/composition/axes.js +18 -6
  488. package/dist/composition/axes.js.map +1 -1
  489. package/dist/composition/axis-audit.js.map +1 -1
  490. package/dist/composition/bridge-analysis.d.ts +0 -14
  491. package/dist/composition/bridge-analysis.d.ts.map +1 -1
  492. package/dist/composition/bridge-analysis.js +66 -57
  493. package/dist/composition/bridge-analysis.js.map +1 -1
  494. package/dist/composition/bridge-prediction.d.ts +5 -1
  495. package/dist/composition/bridge-prediction.d.ts.map +1 -1
  496. package/dist/composition/bridge-prediction.js +12 -16
  497. package/dist/composition/bridge-prediction.js.map +1 -1
  498. package/dist/composition/buckingham-filter.js.map +1 -1
  499. package/dist/composition/canonical-compare.d.ts.map +1 -1
  500. package/dist/composition/canonical-compare.js +12 -2
  501. package/dist/composition/canonical-compare.js.map +1 -1
  502. package/dist/composition/canonical-graph.d.ts +15 -18
  503. package/dist/composition/canonical-graph.d.ts.map +1 -1
  504. package/dist/composition/canonical-graph.js +59 -85
  505. package/dist/composition/canonical-graph.js.map +1 -1
  506. package/dist/composition/canonical-json.js.map +1 -1
  507. package/dist/composition/canonical-prefactors.d.ts +10 -29
  508. package/dist/composition/canonical-prefactors.d.ts.map +1 -1
  509. package/dist/composition/canonical-prefactors.js +15 -202
  510. package/dist/composition/canonical-prefactors.js.map +1 -1
  511. package/dist/composition/catalog-graph.d.ts.map +1 -1
  512. package/dist/composition/catalog-graph.js +6 -20
  513. package/dist/composition/catalog-graph.js.map +1 -1
  514. package/dist/composition/chain-candidate.d.ts +2 -0
  515. package/dist/composition/chain-candidate.d.ts.map +1 -1
  516. package/dist/composition/chain-candidate.js +2 -0
  517. package/dist/composition/chain-candidate.js.map +1 -1
  518. package/dist/composition/chain-match.js.map +1 -1
  519. package/dist/composition/chain-regime.js.map +1 -1
  520. package/dist/composition/chain-result.js.map +1 -1
  521. package/dist/composition/compose-surface.js.map +1 -1
  522. package/dist/composition/compose-symbolic.js.map +1 -1
  523. package/dist/composition/compose.d.ts.map +1 -1
  524. package/dist/composition/compose.js +154 -36
  525. package/dist/composition/compose.js.map +1 -1
  526. package/dist/composition/composition-recovery.js.map +1 -1
  527. package/dist/composition/consequence.d.ts.map +1 -1
  528. package/dist/composition/consequence.js +15 -6
  529. package/dist/composition/consequence.js.map +1 -1
  530. package/dist/composition/consistency.js.map +1 -1
  531. package/dist/composition/descriptor.d.ts +1 -1
  532. package/dist/composition/descriptor.d.ts.map +1 -1
  533. package/dist/composition/descriptor.js.map +1 -1
  534. package/dist/composition/dimension-adjacency.js.map +1 -1
  535. package/dist/composition/discovery.d.ts +67 -7
  536. package/dist/composition/discovery.d.ts.map +1 -1
  537. package/dist/composition/discovery.js +83 -23
  538. package/dist/composition/discovery.js.map +1 -1
  539. package/dist/composition/edge.d.ts +19 -22
  540. package/dist/composition/edge.d.ts.map +1 -1
  541. package/dist/composition/edge.js +25 -28
  542. package/dist/composition/edge.js.map +1 -1
  543. package/dist/composition/enumerate.d.ts +2 -2
  544. package/dist/composition/enumerate.d.ts.map +1 -1
  545. package/dist/composition/enumerate.js.map +1 -1
  546. package/dist/composition/evaluate-relation.d.ts +29 -5
  547. package/dist/composition/evaluate-relation.d.ts.map +1 -1
  548. package/dist/composition/evaluate-relation.js +100 -72
  549. package/dist/composition/evaluate-relation.js.map +1 -1
  550. package/dist/composition/explain.d.ts +14 -4
  551. package/dist/composition/explain.d.ts.map +1 -1
  552. package/dist/composition/explain.js +53 -19
  553. package/dist/composition/explain.js.map +1 -1
  554. package/dist/composition/expr-eval.d.ts.map +1 -1
  555. package/dist/composition/expr-eval.js +2 -1
  556. package/dist/composition/expr-eval.js.map +1 -1
  557. package/dist/composition/expr-simplify.d.ts.map +1 -1
  558. package/dist/composition/expr-simplify.js +9 -39
  559. package/dist/composition/expr-simplify.js.map +1 -1
  560. package/dist/composition/expr-subst.js.map +1 -1
  561. package/dist/composition/formula-shape.d.ts +9 -0
  562. package/dist/composition/formula-shape.d.ts.map +1 -1
  563. package/dist/composition/formula-shape.js +54 -0
  564. package/dist/composition/formula-shape.js.map +1 -1
  565. package/dist/composition/frontier-account.d.ts +3 -2
  566. package/dist/composition/frontier-account.d.ts.map +1 -1
  567. package/dist/composition/frontier-account.js +7 -3
  568. package/dist/composition/frontier-account.js.map +1 -1
  569. package/dist/composition/graph-viz-svg.js.map +1 -1
  570. package/dist/composition/graph-viz.js.map +1 -1
  571. package/dist/composition/grounding.js.map +1 -1
  572. package/dist/composition/identifiability.js.map +1 -1
  573. package/dist/composition/index.d.ts +9 -5
  574. package/dist/composition/index.d.ts.map +1 -1
  575. package/dist/composition/index.js +7 -4
  576. package/dist/composition/index.js.map +1 -1
  577. package/dist/composition/mathts-quiet.d.ts +28 -0
  578. package/dist/composition/mathts-quiet.d.ts.map +1 -0
  579. package/dist/composition/mathts-quiet.js +56 -0
  580. package/dist/composition/mathts-quiet.js.map +1 -0
  581. package/dist/composition/mathts-scalar-symbols.d.ts.map +1 -1
  582. package/dist/composition/mathts-scalar-symbols.js +18 -34
  583. package/dist/composition/mathts-scalar-symbols.js.map +1 -1
  584. package/dist/composition/not-composable-seeds.d.ts +3 -1
  585. package/dist/composition/not-composable-seeds.d.ts.map +1 -1
  586. package/dist/composition/not-composable-seeds.js +2 -0
  587. package/dist/composition/not-composable-seeds.js.map +1 -1
  588. package/dist/composition/probe/backend-protocol.js.map +1 -1
  589. package/dist/composition/probe/candidate-store.js.map +1 -1
  590. package/dist/composition/probe/corpus.js.map +1 -1
  591. package/dist/composition/probe/dataset.js.map +1 -1
  592. package/dist/composition/probe/experiment-design.js.map +1 -1
  593. package/dist/composition/probe/expression-gaps.js.map +1 -1
  594. package/dist/composition/probe/falsify.d.ts +14 -3
  595. package/dist/composition/probe/falsify.d.ts.map +1 -1
  596. package/dist/composition/probe/falsify.js +14 -27
  597. package/dist/composition/probe/falsify.js.map +1 -1
  598. package/dist/composition/probe/fingerprint.js.map +1 -1
  599. package/dist/composition/probe/fit.d.ts +1 -1
  600. package/dist/composition/probe/fit.d.ts.map +1 -1
  601. package/dist/composition/probe/fit.js +2 -1
  602. package/dist/composition/probe/fit.js.map +1 -1
  603. package/dist/composition/probe/frontier.js.map +1 -1
  604. package/dist/composition/probe/generator.js.map +1 -1
  605. package/dist/composition/probe/index.d.ts +4 -2
  606. package/dist/composition/probe/index.d.ts.map +1 -1
  607. package/dist/composition/probe/index.js +4 -2
  608. package/dist/composition/probe/index.js.map +1 -1
  609. package/dist/composition/probe/limits.js.map +1 -1
  610. package/dist/composition/probe/metadata.js.map +1 -1
  611. package/dist/composition/probe/pipeline.d.ts +5 -0
  612. package/dist/composition/probe/pipeline.d.ts.map +1 -1
  613. package/dist/composition/probe/pipeline.js +13 -6
  614. package/dist/composition/probe/pipeline.js.map +1 -1
  615. package/dist/composition/probe/problem.d.ts +8 -0
  616. package/dist/composition/probe/problem.d.ts.map +1 -1
  617. package/dist/composition/probe/problem.js +78 -12
  618. package/dist/composition/probe/problem.js.map +1 -1
  619. package/dist/composition/probe/report.js.map +1 -1
  620. package/dist/composition/probe/residual.js.map +1 -1
  621. package/dist/composition/probe/run-manifest.js +2 -2
  622. package/dist/composition/probe/run-manifest.js.map +1 -1
  623. package/dist/composition/probe/scoring.d.ts +2 -1
  624. package/dist/composition/probe/scoring.d.ts.map +1 -1
  625. package/dist/composition/probe/scoring.js +21 -7
  626. package/dist/composition/probe/scoring.js.map +1 -1
  627. package/dist/composition/probe/search-budget.js.map +1 -1
  628. package/dist/composition/probe/serialize.js.map +1 -1
  629. package/dist/composition/probe/structure.js.map +1 -1
  630. package/dist/composition/probe/study.d.ts +4 -3
  631. package/dist/composition/probe/study.d.ts.map +1 -1
  632. package/dist/composition/probe/study.js +5 -3
  633. package/dist/composition/probe/study.js.map +1 -1
  634. package/dist/composition/probe/types.d.ts +3 -1
  635. package/dist/composition/probe/types.d.ts.map +1 -1
  636. package/dist/composition/probe/types.js +2 -0
  637. package/dist/composition/probe/types.js.map +1 -1
  638. package/dist/composition/proposed-bridges.d.ts +11 -4
  639. package/dist/composition/proposed-bridges.d.ts.map +1 -1
  640. package/dist/composition/proposed-bridges.js +14 -6
  641. package/dist/composition/proposed-bridges.js.map +1 -1
  642. package/dist/composition/quantities.d.ts +0 -4
  643. package/dist/composition/quantities.d.ts.map +1 -1
  644. package/dist/composition/quantities.js +5 -5
  645. package/dist/composition/quantities.js.map +1 -1
  646. package/dist/composition/quantity.d.ts +18 -2
  647. package/dist/composition/quantity.d.ts.map +1 -1
  648. package/dist/composition/quantity.js +35 -6
  649. package/dist/composition/quantity.js.map +1 -1
  650. package/dist/composition/representative-values.js.map +1 -1
  651. package/dist/composition/retrodiction.d.ts +18 -0
  652. package/dist/composition/retrodiction.d.ts.map +1 -1
  653. package/dist/composition/retrodiction.js +37 -7
  654. package/dist/composition/retrodiction.js.map +1 -1
  655. package/dist/composition/uncertainty.js.map +1 -1
  656. package/dist/composition/user-equation.d.ts +11 -7
  657. package/dist/composition/user-equation.d.ts.map +1 -1
  658. package/dist/composition/user-equation.js +24 -26
  659. package/dist/composition/user-equation.js.map +1 -1
  660. package/dist/core/axes-registry.d.ts +8 -5
  661. package/dist/core/axes-registry.d.ts.map +1 -1
  662. package/dist/core/axes-registry.js.map +1 -1
  663. package/dist/core/cell.js.map +1 -1
  664. package/dist/core/constants.d.ts +35 -12
  665. package/dist/core/constants.d.ts.map +1 -1
  666. package/dist/core/constants.js +46 -15
  667. package/dist/core/constants.js.map +1 -1
  668. package/dist/core/data-file.d.ts +27 -0
  669. package/dist/core/data-file.d.ts.map +1 -0
  670. package/dist/core/data-file.js +48 -0
  671. package/dist/core/data-file.js.map +1 -0
  672. package/dist/core/flux-rules.js +1 -1
  673. package/dist/core/flux-rules.js.map +1 -1
  674. package/dist/core/json-schema.d.ts +27 -0
  675. package/dist/core/json-schema.d.ts.map +1 -0
  676. package/dist/core/json-schema.js +177 -0
  677. package/dist/core/json-schema.js.map +1 -0
  678. package/dist/core/labeled-tensor.d.ts +6 -1
  679. package/dist/core/labeled-tensor.d.ts.map +1 -1
  680. package/dist/core/labeled-tensor.js +18 -8
  681. package/dist/core/labeled-tensor.js.map +1 -1
  682. package/dist/core/regime-registry.d.ts +6 -2
  683. package/dist/core/regime-registry.d.ts.map +1 -1
  684. package/dist/core/regime-registry.js.map +1 -1
  685. package/dist/core/regime-rule-install.js.map +1 -1
  686. package/dist/core/regimes-builtins.js.map +1 -1
  687. package/dist/core/tensor.d.ts +7 -4
  688. package/dist/core/tensor.d.ts.map +1 -1
  689. package/dist/core/tensor.js +40 -8
  690. package/dist/core/tensor.js.map +1 -1
  691. package/dist/core/types.d.ts +3 -2
  692. package/dist/core/types.d.ts.map +1 -1
  693. package/dist/core/types.js +16 -14
  694. package/dist/core/types.js.map +1 -1
  695. package/dist/core/universal-index.js.map +1 -1
  696. package/dist/diff/bridge-ast-gradient.d.ts +4 -5
  697. package/dist/diff/bridge-ast-gradient.d.ts.map +1 -1
  698. package/dist/diff/bridge-ast-gradient.js +16 -23
  699. package/dist/diff/bridge-ast-gradient.js.map +1 -1
  700. package/dist/diff/bridge-gradient.d.ts +24 -80
  701. package/dist/diff/bridge-gradient.d.ts.map +1 -1
  702. package/dist/diff/bridge-gradient.js +21 -98
  703. package/dist/diff/bridge-gradient.js.map +1 -1
  704. package/dist/diff/bridge-specs.d.ts +18 -6
  705. package/dist/diff/bridge-specs.d.ts.map +1 -1
  706. package/dist/diff/bridge-specs.js +17 -5
  707. package/dist/diff/bridge-specs.js.map +1 -1
  708. package/dist/dimensional/algebra.js.map +1 -1
  709. package/dist/dimensional/ast-builders.d.ts +5 -4
  710. package/dist/dimensional/ast-builders.d.ts.map +1 -1
  711. package/dist/dimensional/ast-builders.js +6 -5
  712. package/dist/dimensional/ast-builders.js.map +1 -1
  713. package/dist/dimensional/ast-types.js.map +1 -1
  714. package/dist/dimensional/bridge-check.d.ts.map +1 -1
  715. package/dist/dimensional/bridge-check.js +3 -5
  716. package/dist/dimensional/bridge-check.js.map +1 -1
  717. package/dist/dimensional/buckingham.js.map +1 -1
  718. package/dist/dimensional/connection-validators.d.ts +2 -1
  719. package/dist/dimensional/connection-validators.d.ts.map +1 -1
  720. package/dist/dimensional/connection-validators.js.map +1 -1
  721. package/dist/dimensional/connection.js.map +1 -1
  722. package/dist/dimensional/constant-rows.d.ts +54 -0
  723. package/dist/dimensional/constant-rows.d.ts.map +1 -0
  724. package/dist/dimensional/constant-rows.js +115 -0
  725. package/dist/dimensional/constant-rows.js.map +1 -0
  726. package/dist/dimensional/constants.d.ts +7 -17
  727. package/dist/dimensional/constants.d.ts.map +1 -1
  728. package/dist/dimensional/constants.js +12 -21
  729. package/dist/dimensional/constants.js.map +1 -1
  730. package/dist/dimensional/curvature-composite.js.map +1 -1
  731. package/dist/dimensional/curvature-invariants.js.map +1 -1
  732. package/dist/dimensional/curvature.js.map +1 -1
  733. package/dist/dimensional/dimension-inference.js.map +1 -1
  734. package/dist/dimensional/dimension-spec.d.ts +21 -6
  735. package/dist/dimensional/dimension-spec.d.ts.map +1 -1
  736. package/dist/dimensional/dimension-spec.js +150 -160
  737. package/dist/dimensional/dimension-spec.js.map +1 -1
  738. package/dist/dimensional/einstein-equation.js.map +1 -1
  739. package/dist/dimensional/errors.d.ts +3 -1
  740. package/dist/dimensional/errors.d.ts.map +1 -1
  741. package/dist/dimensional/errors.js +2 -2
  742. package/dist/dimensional/errors.js.map +1 -1
  743. package/dist/dimensional/exact-scale.d.ts +79 -0
  744. package/dist/dimensional/exact-scale.d.ts.map +1 -0
  745. package/dist/dimensional/exact-scale.js +222 -0
  746. package/dist/dimensional/exact-scale.js.map +1 -0
  747. package/dist/dimensional/field-equation-helpers.js.map +1 -1
  748. package/dist/dimensional/formula-names.d.ts +13 -12
  749. package/dist/dimensional/formula-names.d.ts.map +1 -1
  750. package/dist/dimensional/formula-names.js +28 -51
  751. package/dist/dimensional/formula-names.js.map +1 -1
  752. package/dist/dimensional/fresh-label.js.map +1 -1
  753. package/dist/dimensional/friedmann-equation.d.ts +3 -3
  754. package/dist/dimensional/friedmann-equation.js +3 -3
  755. package/dist/dimensional/friedmann-equation.js.map +1 -1
  756. package/dist/dimensional/gauge-field.d.ts +2 -3
  757. package/dist/dimensional/gauge-field.d.ts.map +1 -1
  758. package/dist/dimensional/gauge-field.js +0 -1
  759. package/dist/dimensional/gauge-field.js.map +1 -1
  760. package/dist/dimensional/hyphen-names.d.ts.map +1 -1
  761. package/dist/dimensional/hyphen-names.js +8 -0
  762. package/dist/dimensional/hyphen-names.js.map +1 -1
  763. package/dist/dimensional/killing-validators.js.map +1 -1
  764. package/dist/dimensional/klein-gordon-equation.js.map +1 -1
  765. package/dist/dimensional/metric-validators.d.ts +2 -1
  766. package/dist/dimensional/metric-validators.d.ts.map +1 -1
  767. package/dist/dimensional/metric-validators.js.map +1 -1
  768. package/dist/dimensional/metric.js.map +1 -1
  769. package/dist/dimensional/natural-units.js.map +1 -1
  770. package/dist/dimensional/quantity-registry.d.ts +23 -1
  771. package/dist/dimensional/quantity-registry.d.ts.map +1 -1
  772. package/dist/dimensional/quantity-registry.js +55 -18
  773. package/dist/dimensional/quantity-registry.js.map +1 -1
  774. package/dist/dimensional/rg-flow.js.map +1 -1
  775. package/dist/dimensional/stress-energy-validators.js.map +1 -1
  776. package/dist/dimensional/symbolic-constants.d.ts +63 -19
  777. package/dist/dimensional/symbolic-constants.d.ts.map +1 -1
  778. package/dist/dimensional/symbolic-constants.js +114 -92
  779. package/dist/dimensional/symbolic-constants.js.map +1 -1
  780. package/dist/dimensional/tensor-trace.js.map +1 -1
  781. package/dist/dimensional/tensor.js.map +1 -1
  782. package/dist/dimensional/types.js.map +1 -1
  783. package/dist/dimensional/unit-convention.d.ts +0 -2
  784. package/dist/dimensional/unit-convention.d.ts.map +1 -1
  785. package/dist/dimensional/unit-convention.js +2 -2
  786. package/dist/dimensional/unit-convention.js.map +1 -1
  787. package/dist/dimensional/unit-data.d.ts +70 -0
  788. package/dist/dimensional/unit-data.d.ts.map +1 -0
  789. package/dist/dimensional/unit-data.js +139 -0
  790. package/dist/dimensional/unit-data.js.map +1 -0
  791. package/dist/dimensional/units.d.ts +87 -24
  792. package/dist/dimensional/units.d.ts.map +1 -1
  793. package/dist/dimensional/units.js +290 -295
  794. package/dist/dimensional/units.js.map +1 -1
  795. package/dist/dimensional/validator-registry.js.map +1 -1
  796. package/dist/dimensional/validator.d.ts +0 -16
  797. package/dist/dimensional/validator.d.ts.map +1 -1
  798. package/dist/dimensional/validator.js +65 -29
  799. package/dist/dimensional/validator.js.map +1 -1
  800. package/dist/dimensional/weyl-validators.js.map +1 -1
  801. package/dist/index.d.ts +65 -18
  802. package/dist/index.d.ts.map +1 -1
  803. package/dist/index.js +19 -24
  804. package/dist/index.js.map +1 -1
  805. package/dist/numerical/bianchi-residual.js.map +1 -1
  806. package/dist/numerical/binding-value.d.ts +32 -7
  807. package/dist/numerical/binding-value.d.ts.map +1 -1
  808. package/dist/numerical/binding-value.js +218 -209
  809. package/dist/numerical/binding-value.js.map +1 -1
  810. package/dist/numerical/christoffel-flat.js.map +1 -1
  811. package/dist/numerical/connection-lowering-helpers.js.map +1 -1
  812. package/dist/numerical/covariant-eikonal.d.ts.map +1 -1
  813. package/dist/numerical/covariant-eikonal.js +2 -2
  814. package/dist/numerical/covariant-eikonal.js.map +1 -1
  815. package/dist/numerical/curvature-lowering-helpers.d.ts +20 -0
  816. package/dist/numerical/curvature-lowering-helpers.d.ts.map +1 -1
  817. package/dist/numerical/curvature-lowering-helpers.js +6 -3
  818. package/dist/numerical/curvature-lowering-helpers.js.map +1 -1
  819. package/dist/numerical/derivative-lowering.js.map +1 -1
  820. package/dist/numerical/einstein-equation.js.map +1 -1
  821. package/dist/numerical/engine-registry.js.map +1 -1
  822. package/dist/numerical/errors.d.ts +7 -3
  823. package/dist/numerical/errors.d.ts.map +1 -1
  824. package/dist/numerical/errors.js +5 -5
  825. package/dist/numerical/errors.js.map +1 -1
  826. package/dist/numerical/evaluator-uncertainty.d.ts +34 -0
  827. package/dist/numerical/evaluator-uncertainty.d.ts.map +1 -0
  828. package/dist/numerical/evaluator-uncertainty.js +134 -0
  829. package/dist/numerical/evaluator-uncertainty.js.map +1 -0
  830. package/dist/numerical/formula-contract.d.ts +67 -7
  831. package/dist/numerical/formula-contract.d.ts.map +1 -1
  832. package/dist/numerical/formula-contract.js +68 -42
  833. package/dist/numerical/formula-contract.js.map +1 -1
  834. package/dist/numerical/formula-dimension.d.ts +17 -7
  835. package/dist/numerical/formula-dimension.d.ts.map +1 -1
  836. package/dist/numerical/formula-dimension.js +120 -44
  837. package/dist/numerical/formula-dimension.js.map +1 -1
  838. package/dist/numerical/formula-mathts.d.ts.map +1 -1
  839. package/dist/numerical/formula-mathts.js +10 -3
  840. package/dist/numerical/formula-mathts.js.map +1 -1
  841. package/dist/numerical/formula-registry.d.ts +13 -3
  842. package/dist/numerical/formula-registry.d.ts.map +1 -1
  843. package/dist/numerical/formula-registry.js +7 -2
  844. package/dist/numerical/formula-registry.js.map +1 -1
  845. package/dist/numerical/geodesic-integrator.js.map +1 -1
  846. package/dist/numerical/geometrized.js.map +1 -1
  847. package/dist/numerical/gl4-integrator.d.ts +28 -27
  848. package/dist/numerical/gl4-integrator.d.ts.map +1 -1
  849. package/dist/numerical/gl4-integrator.js +44 -45
  850. package/dist/numerical/gl4-integrator.js.map +1 -1
  851. package/dist/numerical/grid-field.js.map +1 -1
  852. package/dist/numerical/index.js.map +1 -1
  853. package/dist/numerical/input-validation.d.ts +3 -6
  854. package/dist/numerical/input-validation.d.ts.map +1 -1
  855. package/dist/numerical/input-validation.js +4 -8
  856. package/dist/numerical/input-validation.js.map +1 -1
  857. package/dist/numerical/killing.d.ts +8 -5
  858. package/dist/numerical/killing.d.ts.map +1 -1
  859. package/dist/numerical/killing.js.map +1 -1
  860. package/dist/numerical/klein-gordon.js.map +1 -1
  861. package/dist/numerical/kretschmann.js.map +1 -1
  862. package/dist/numerical/lowering-utils.js.map +1 -1
  863. package/dist/numerical/lowering.d.ts.map +1 -1
  864. package/dist/numerical/lowering.js +7 -17
  865. package/dist/numerical/lowering.js.map +1 -1
  866. package/dist/numerical/mathts-engine.d.ts.map +1 -1
  867. package/dist/numerical/mathts-engine.js +11 -6
  868. package/dist/numerical/mathts-engine.js.map +1 -1
  869. package/dist/numerical/metric-inverse.js.map +1 -1
  870. package/dist/numerical/null-ic.js.map +1 -1
  871. package/dist/numerical/null-ray-integrator.js +4 -4
  872. package/dist/numerical/null-ray-integrator.js.map +1 -1
  873. package/dist/numerical/painleve-gullstrand-metric.js.map +1 -1
  874. package/dist/numerical/pderiv.d.ts.map +1 -1
  875. package/dist/numerical/pderiv.js +9 -2
  876. package/dist/numerical/pderiv.js.map +1 -1
  877. package/dist/numerical/perihelion-finder.js.map +1 -1
  878. package/dist/numerical/quadrature.d.ts +5 -2
  879. package/dist/numerical/quadrature.d.ts.map +1 -1
  880. package/dist/numerical/quadrature.js +20 -3
  881. package/dist/numerical/quadrature.js.map +1 -1
  882. package/dist/numerical/spacetime-metrics.d.ts +17 -19
  883. package/dist/numerical/spacetime-metrics.d.ts.map +1 -1
  884. package/dist/numerical/spacetime-metrics.js +158 -250
  885. package/dist/numerical/spacetime-metrics.js.map +1 -1
  886. package/dist/numerical/strides.js.map +1 -1
  887. package/dist/numerical/tensor-engine.d.ts +9 -5
  888. package/dist/numerical/tensor-engine.d.ts.map +1 -1
  889. package/dist/numerical/tensor-engine.js.map +1 -1
  890. package/dist/numerical/types.js.map +1 -1
  891. package/dist/numerical/weyl-lowering.js.map +1 -1
  892. package/dist/relations/category.js.map +1 -1
  893. package/dist/relations/composition-table.d.ts +4 -4
  894. package/dist/relations/composition-table.js +4 -4
  895. package/dist/relations/composition-table.js.map +1 -1
  896. package/dist/relations/conventions.js.map +1 -1
  897. package/dist/relations/domain-regimes.js.map +1 -1
  898. package/dist/relations/regime-registration.js.map +1 -1
  899. package/dist/relations/regime-vocabularies.js.map +1 -1
  900. package/dist/relations/regime.d.ts +18 -8
  901. package/dist/relations/regime.d.ts.map +1 -1
  902. package/dist/relations/regime.js +26 -14
  903. package/dist/relations/regime.js.map +1 -1
  904. package/dist/relations/types.d.ts +26 -6
  905. package/dist/relations/types.d.ts.map +1 -1
  906. package/dist/relations/types.js +15 -3
  907. package/dist/relations/types.js.map +1 -1
  908. package/package.json +10 -14
  909. package/dist/bridges/registry.d.ts +0 -60
  910. package/dist/bridges/registry.d.ts.map +0 -1
  911. package/dist/bridges/registry.js +0 -87
  912. package/dist/bridges/registry.js.map +0 -1
  913. package/dist/cli/poster-source.d.ts +0 -154
  914. package/dist/cli/poster-source.d.ts.map +0 -1
  915. package/dist/cli/poster-source.js +0 -184
  916. package/dist/cli/poster-source.js.map +0 -1
@@ -8,48 +8,30 @@
8
8
  * `tests/atlas/physjs-manifest.test.ts` fails when the file and that table disagree
9
9
  * on the commit, a theorem, a key, or the coverage phrase.
10
10
  *
11
- * The commit is `PHYSJS_COMMIT`, copied from the manifest. The sentence that
12
- * the pin is PhysJS `main` `03e8bb77c952f720bdd2730af2afc6a7f2d36243` is the
13
- * record from before the table was generated.
14
- * PhysJS #63 stores each Lean file at `lean/<File>.lean`. The sentence that
15
- * the pin is `92f87257a1e3086a48cdc19fe4361cc1c5909d49` is the record from
16
- * before PhysJS #65. The sentence that the pin is
17
- * `ee753df77bd5b29b7207443181606b6004bfcf6a` is the record from
18
- * before PhysJS #64. The sentence that the pin is
19
- * `4ea35872513f8d4d12a01bfac225156bdddb87a9` and that the path is
20
- * `lean/PhysJS/<File>.lean` is the record from before that flatten. The
21
- * sentence that the pin is `3af15b49be09442350510e7c7f56f4aab92ea3bc` and
22
- * that the path is `PhysJS/<File>.lean` is the record from before PhysJS #61.
23
- * Theorem names of the earlier entries are unchanged. PhysJS #62 adds be-74,
24
- * be-75, and be-76. PhysJS #64 adds be-77 through be-87. PhysJS #65 adds
25
- * be-88 through be-102.
26
- * Milestone 1's six top-level theorems are unchanged. Milestone 2 adds four
27
- * atlas entries. Milestone 2b adds fifteen catalog entries. Bucket A adds
28
- * twenty-one counted catalog entries, keyed `be-<n>`. BE-20 is the nested
29
- * `corollary` on `be-13` and has no key. A counted covers line begins with
30
- * `reduction`, `limit`, or `derivation-step`. A labeled covers line begins
31
- * with `property` or `cross-check`. A nested object (`planeWave`, `oneLoop`,
32
- * `inversion`, `vacuum`, `corollary`, `friedmann`, `lengthMonomial`,
33
- * `torsionMonomial`, `coefficientNotFixed`, `unitCoefficient`, `scalingShape`,
34
- * `everyPower`, `perpendicularQuartic`, `tolmanRatio`) is recorded and is not
35
- * a `formalRef`. The sentence that those fourteen names are the whole nested
36
- * set is the record from before BE-103 through BE-125. That ingestion adds
37
- * `warmSound`, `cutoffL`, `whistlerLimit`, `equalTemperature`, `bohmGross`,
38
- * `referenceResistivity`, `lundquist`, and `bohmFlux`. PhysJS #66 adds
39
- * be-103 through be-125. The sentence that the pin is
40
- * `03e8bb77c952f720bdd2730af2afc6a7f2d36243` and that the table stops at
41
- * be-102 is the record from before that pin. PhysJS #67 adds be-126 through
42
- * be-133. The sentence that the pin is
43
- * `d519c2c6504e7fbbd2cf6932f9e52981ce595a0f` and that the table stops at
44
- * be-125 is the record from before that pin. PhysJS #68 adds be-134 through
45
- * be-146. The sentence that the pin is
46
- * `8515c621d1c6e6d31c2eea4467181eb85d58234b` and that the table stops at
47
- * be-133 is the record from before that pin. That ingestion adds
48
- * `heisenberg_fraction`.
11
+ * The commit is `PHYSJS_COMMIT`, copied from the manifest. Which PhysJS pull
12
+ * request added which keys, and what the pin was before, is history and lives
13
+ * in `NOTES.md` and `CHANGELOG.md`, not here.
14
+ *
15
+ * Each statement's `kind`, nested ones included, is the manifest's own field
16
+ * (schema `physjs-bridge-manifest/v2`), which PhysJS reads from the kind line
17
+ * of the Lean file that declares the theorem; this module keeps no override
18
+ * and does not parse the covers line for it. A field of a manifest entry
19
+ * outside the base fields is a nested statement: a second theorem on the same
20
+ * entry, named by the field, with no key. It is recorded and compared, and it
21
+ * is not a `formalRef`. The generator reads it by its shape, so a new nested
22
+ * name needs no edit here.
23
+ *
24
+ * A reference's `fidelity` is DERIVED here, never typed on a record:
25
+ * `physjsFidelity` reads the reviewed-row table (`physjs-reviewed.ts`) and the
26
+ * sanity-lemma key list, and a key ahead of the catalog, or whose row is not
27
+ * in that table, is `'unreviewed'`.
49
28
  *
50
29
  * @module atlas/physjs-ref
51
30
  */
52
- import { catalogEdgeKey } from '../bridges/catalog-load.js';
31
+ import { createHash } from 'node:crypto';
32
+ import { FORMAL_REF_KINDS } from '../relations/types.js';
33
+ import { catalogEntries, catalogIdNumber } from '../bridges/catalog-load.js';
34
+ import { PHYSJS_REVIEWED_ROWS, PHYSJS_SANITY_LEMMA_KEYS } from './physjs-reviewed.js';
53
35
  import { PHYSJS_COMMIT, PHYSJS_MATHLIB, PHYSJS_PHYS_LIB, PHYSJS_TOOLCHAIN, PHYSJS_ENTRIES as GENERATED_PHYSJS_ENTRIES, } from './physjs-entries.generated.js';
54
36
  /**
55
37
  * PhysJS commit the vendored manifest records.
@@ -62,52 +44,41 @@ export { PHYSJS_COMMIT } from './physjs-entries.generated.js';
62
44
  * `bound.delta` does not certify the regime, the horizon, or the side conditions.
63
45
  */
64
46
  const PHYSJS_COVERAGE = 'covers its statement only';
65
- /** Nested objects the manifest schema records. A new name is a problem. */
66
- const NESTED_FIELDS = [
67
- 'planeWave',
68
- 'oneLoop',
69
- 'inversion',
70
- 'vacuum',
71
- 'corollary',
72
- 'friedmann',
73
- 'lengthMonomial',
74
- 'torsionMonomial',
75
- 'coefficientNotFixed',
76
- 'unitCoefficient',
77
- 'scalingShape',
78
- 'everyPower',
79
- 'perpendicularQuartic',
80
- 'tolmanRatio',
81
- 'warmSound',
82
- 'cutoffL',
83
- 'whistlerLimit',
84
- 'equalTemperature',
85
- 'bohmGross',
86
- 'referenceResistivity',
87
- 'lundquist',
88
- 'bohmFlux',
89
- 'heisenberg_fraction',
90
- ];
91
- const ENTRY_FIELDS = new Set([
92
- 'key',
93
- 'bridgeId',
94
- 'theorem',
95
- 'covers',
96
- 'coverage',
97
- 'leanProof',
98
- 'axioms',
99
- 'imports',
100
- ...NESTED_FIELDS,
101
- ]);
102
- /** Counted catalog kinds. Not a property and not a cross-check. */
103
- const COUNTED_KIND = /^(reduction|limit|derivation-step): /;
104
47
  /**
105
- * Labeled catalog kinds. A reader tells them from a counted statement by
106
- * this word. They occupy a catalog `formalRef` and are not the counted kind.
48
+ * The axioms a complete Lean 4 proof over Mathlib may rest on. `#print axioms`
49
+ * of a proof with a `sorry` adds `sorryAx`, and Lean still exits 0 (TOOLS.md),
50
+ * so every statement's list is held to this set; PhysJS reports the list and
51
+ * this repository does not re-measure it.
52
+ */
53
+ const PHYSJS_ALLOWED_AXIOMS = new Set(['propext', 'Classical.choice', 'Quot.sound']);
54
+ /** The fields of a manifest entry. Any other field is a nested statement. */
55
+ const BASE_FIELDS = new Set(['key', 'bridgeId', 'theorem', 'kind', 'covers', 'coverage', 'leanProof', 'axioms', 'imports']);
56
+ /** The fields of a statement, sorted. A nested field with exactly these is a statement. */
57
+ const STATEMENT_FIELDS = ['axioms', 'coverage', 'covers', 'kind', 'leanProof', 'theorem'];
58
+ /**
59
+ * The nested statements of a manifest entry, in field order: every field
60
+ * outside the base fields whose value has exactly the statement fields. A
61
+ * field that is neither is returned in `problems`.
62
+ * @internal
107
63
  */
108
- const LABELED_KIND = /^(property|cross-check): /;
64
+ export function physjsNestedStatements(entry) {
65
+ const nested = [];
66
+ const problems = [];
67
+ for (const [field, value] of Object.entries(entry)) {
68
+ if (BASE_FIELDS.has(field))
69
+ continue;
70
+ const keys = typeof value === 'object' && value !== null && !Array.isArray(value) ? Object.keys(value).sort() : [];
71
+ if (keys.join() === STATEMENT_FIELDS.join())
72
+ nested.push({ name: field, ...value });
73
+ else
74
+ problems.push(`manifest entry '${entry.key}' has unexpected field '${field}'`);
75
+ }
76
+ return { nested, problems };
77
+ }
109
78
  const PHYSJS_ENTRIES = GENERATED_PHYSJS_ENTRIES;
110
79
  const entryByKey = new Map(PHYSJS_ENTRIES.map((entry) => [entry.key, entry]));
80
+ /** Theorem → its Lean file, for every statement of the compiled table, nested ones included. */
81
+ const FILE_BY_THEOREM = new Map(PHYSJS_ENTRIES.flatMap((entry) => [entry, ...entry.nested].map((statement) => [statement.theorem, statement.file])));
111
82
  /**
112
83
  * Theorem name on the compiled manifest copy for `key`.
113
84
  *
@@ -123,28 +94,22 @@ export function physjsTheorem(key) {
123
94
  function physjsVersion() {
124
95
  return `physjs@${PHYSJS_COMMIT} ${PHYSJS_TOOLCHAIN} mathlib:${PHYSJS_MATHLIB} physlib@${PHYSJS_PHYS_LIB}`;
125
96
  }
126
- /**
127
- * Namespaces whose theorems live in another Lean file at this pin.
128
- * `SpringLc` and `DampedRlc` are namespaces inside `lean/OscillatorDictionary.lean`,
129
- * not their own files. Rechecked at this pin.
130
- */
131
- const PHYSJS_FILE_BY_NAMESPACE = {
132
- SpringLc: 'OscillatorDictionary.lean',
133
- DampedRlc: 'OscillatorDictionary.lean',
134
- };
135
97
  /**
136
98
  * Lean file name that contains `theorem` at the pinned commit.
137
99
  *
138
- * `SpringLc` and `DampedRlc` are namespaces inside `OscillatorDictionary.lean`.
100
+ * Read from the compiled table, which copies `formal/physjs/theorem-files.json`:
101
+ * the file is where the theorem is declared, not its namespace
102
+ * (`PhysJS.Einstein.friedmann_corollary` is in `VacuumFriedmann.lean`;
103
+ * `PhysJS.SpringLc` is a namespace inside `OscillatorDictionary.lean`).
104
+ * Throws for a theorem the manifest does not name.
139
105
  *
140
106
  * @internal
141
107
  */
142
108
  export function physjsLeanFile(theorem) {
143
- const parts = theorem.split('.');
144
- if (parts.length < 3 || parts[0] !== 'PhysJS' || parts[1] === undefined) {
145
- throw new Error(`PhysJS theorem '${theorem}' is not PhysJS.<module>.<name>`);
146
- }
147
- return PHYSJS_FILE_BY_NAMESPACE[parts[1]] ?? `${parts[1]}.lean`;
109
+ const file = FILE_BY_THEOREM.get(theorem);
110
+ if (file === undefined)
111
+ throw new Error(`PhysJS theorem '${theorem}' is not a statement of the vendored manifest`);
112
+ return file;
148
113
  }
149
114
  /**
150
115
  * Permalink to one Lean file at the pinned commit.
@@ -161,63 +126,122 @@ export function physjsFileUrl(file) {
161
126
  function physjsStatementUrl(theorem) {
162
127
  return physjsFileUrl(physjsLeanFile(theorem));
163
128
  }
129
+ /** The highest id in the bridge catalog. */
130
+ const CATALOG_MAX_ID = Math.max(...catalogEntries().map((entry) => entry.id));
131
+ /**
132
+ * True when `key` is ahead of the catalog: PhysJS proved the statement for a
133
+ * catalog id the catalog has not reached yet. That is an id above the
134
+ * catalog's highest, with every id between them also a key of `keys` (the
135
+ * manifest's), so the ahead keys are one unbroken run that starts right after
136
+ * the catalog. Such an entry is vendored and compared, and it is not a seed
137
+ * and not a problem until the catalog entry exists. A missing id inside the
138
+ * catalog's range is not ahead, nor is an id past a gap in the run (a typo
139
+ * such as an extra digit), nor an atlas key.
140
+ *
141
+ * @internal
142
+ */
143
+ export function physjsAheadOfCatalog(key, keys = PHYSJS_ENTRIES.map((entry) => entry.key)) {
144
+ const id = catalogIdNumber(key);
145
+ if (id === undefined || id <= CATALOG_MAX_ID)
146
+ return false;
147
+ const ids = new Set(keys.map(catalogIdNumber));
148
+ for (let n = CATALOG_MAX_ID + 1; n < id; n++)
149
+ if (!ids.has(n))
150
+ return false;
151
+ return true;
152
+ }
164
153
  /**
165
- * Catalog keys whose theorem states the catalogued equation.
166
- * The PhysJS covers line still begins with `derivation-step`.
167
- * The kind is bridge because that equation is the theorem.
154
+ * Manifest keys of kind `bridge`, the theorem stating the equation its key
155
+ * names, that resolve to a bridge: every such atlas key, and every such
156
+ * catalog key whose catalog entry exists. The kind is the manifest's own
157
+ * field. A caller-supplied overlay entry is read the same way. The return
158
+ * value is not stored on a bridge.
159
+ *
160
+ * @internal
168
161
  */
169
- const CATALOG_EQUATION_KEYS = new Set([
170
- 12, 16, 21, 27, 33, 37, 40, 43, 50, 54, 55, 59, 60, 63, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
171
- ].map((id) => catalogEdgeKey(id)));
162
+ export function bridgeSeedKeys(entries = PHYSJS_ENTRIES) {
163
+ return entries.filter((entry) => entry.kind === 'bridge' && !physjsAheadOfCatalog(entry.key)).map((entry) => entry.key);
164
+ }
165
+ /** Every manifest key ahead of the catalog, in manifest order. @internal */
166
+ export function physjsKeysAheadOfCatalog() {
167
+ return PHYSJS_ENTRIES.filter((entry) => physjsAheadOfCatalog(entry.key)).map((entry) => entry.key);
168
+ }
172
169
  /**
173
- * Atlas keys are bridges. A catalog key whose theorem states the catalogued
174
- * equation is a bridge. BE-28 is a property of the defining sum. Every other
175
- * catalog key's kind is the covers prefix.
170
+ * The row of a manifest entry as PhysJS writes it, in the shape
171
+ * {@link physjsRowHash} reads. @internal
176
172
  */
177
- function formalRefKind(key, covers) {
178
- if (key.startsWith('ab-'))
179
- return 'bridge';
180
- if (CATALOG_EQUATION_KEYS.has(key))
181
- return 'bridge';
182
- if (key === catalogEdgeKey(28))
183
- return 'property';
184
- const word = covers.split(':')[0];
185
- if (word === 'property' ||
186
- word === 'cross-check' ||
187
- word === 'reduction' ||
188
- word === 'limit' ||
189
- word === 'derivation-step') {
190
- return word;
191
- }
192
- return undefined;
173
+ export function physjsManifestRow(entry) {
174
+ return {
175
+ key: entry.key,
176
+ theorem: entry.theorem,
177
+ kind: entry.kind,
178
+ covers: entry.covers,
179
+ leanProof: entry.leanProof,
180
+ axioms: entry.axioms,
181
+ nested: physjsNestedStatements(entry).nested.map((statement) => ({
182
+ name: statement.name,
183
+ theorem: statement.theorem,
184
+ kind: statement.kind,
185
+ covers: statement.covers,
186
+ leanProof: statement.leanProof,
187
+ axioms: statement.axioms,
188
+ })),
189
+ };
193
190
  }
194
191
  /**
195
- * Manifest keys whose derived kind is `bridge`.
192
+ * SHA-256 of one row: `[key, theorem, kind, covers, leanProof, axioms,
193
+ * nested[]]`, each nested statement as `[name, theorem, kind, covers,
194
+ * leanProof, axioms]`. A swapped theorem or key, a changed kind, a reworded
195
+ * covers line, a proof status, an axiom, or a nested statement changes it.
196
+ * This is what `physjs-reviewed.ts` pins per key.
196
197
  *
197
- * An `ab-` key is a bridge. A catalog key is a bridge when `formalRefKind`
198
- * says the theorem states the catalogued equation. A canonical id uses that
199
- * same function: it is a seed when this table, or a caller-supplied overlay
200
- * entry, has derived kind `bridge`. A textbook covers word is not a seed.
201
- * One function, so a second list cannot drift.
198
+ * @internal
199
+ */
200
+ export function physjsRowHash(row) {
201
+ const columns = [
202
+ row.key,
203
+ row.theorem,
204
+ row.kind,
205
+ row.covers,
206
+ row.leanProof,
207
+ [...row.axioms],
208
+ row.nested.map((n) => [n.name, n.theorem, n.kind, n.covers, n.leanProof, [...n.axioms]]),
209
+ ];
210
+ return createHash('sha256').update(JSON.stringify(columns)).digest('hex');
211
+ }
212
+ /**
213
+ * The fidelity a manifest key earns, derived from what checks it:
202
214
  *
203
- * `kind`, when supplied, is that derived kind for an overlay reference the
204
- * compiled table does not carry. The live call omits it. The return value
205
- * is not stored on a bridge.
215
+ * - `'unreviewed'` when the key is ahead of the catalog
216
+ * ({@link physjsAheadOfCatalog}): no bridge exists to read the row against;
217
+ * - `'unreviewed'` when the compiled row's hash is not the one
218
+ * `PHYSJS_REVIEWED_ROWS` records for the key, or the key has no entry there;
219
+ * - `'sanity-lemmas'` when the row is reviewed AND the key is in
220
+ * `PHYSJS_SANITY_LEMMA_KEYS`, whose statements
221
+ * `tests/atlas/formal-sanity.test.ts` instantiates on known cases;
222
+ * - `'reviewed-manifest'` when the row is reviewed and no sanity lemma exists.
223
+ *
224
+ * A key the manifest does not name throws, like {@link physjsFormalRef}.
206
225
  *
207
226
  * @internal
208
227
  */
209
- export function bridgeSeedKeys(entries = PHYSJS_ENTRIES) {
210
- const keys = [];
211
- for (const entry of entries) {
212
- const kind = entry.kind ?? formalRefKind(entry.key, entry.covers);
213
- if (kind === 'bridge')
214
- keys.push(entry.key);
215
- }
216
- return keys;
228
+ export function physjsFidelity(key,
229
+ /** Defaults to the generated table. A test passes a mutated copy. */
230
+ compiledEntries = PHYSJS_ENTRIES) {
231
+ const entry = compiledEntries.find((candidate) => candidate.key === key);
232
+ if (entry === undefined)
233
+ throw new Error(`PhysJS manifest has no entry for '${key}'`);
234
+ if (physjsAheadOfCatalog(key))
235
+ return 'unreviewed';
236
+ if (PHYSJS_REVIEWED_ROWS[key] !== physjsRowHash(entry))
237
+ return 'unreviewed';
238
+ return PHYSJS_SANITY_LEMMA_KEYS.includes(key) ? 'sanity-lemmas' : 'reviewed-manifest';
217
239
  }
218
240
  /**
219
- * The reviewed reference for a manifest key. Throws when the key is not an
220
- * entry, so a typo cannot ship a bridge with no reference.
241
+ * The reference for a manifest key, with its derived fidelity. Throws when
242
+ * the key is not an entry, so a typo cannot ship a bridge with no reference.
243
+ * A key ahead of the catalog, or whose row is not reviewed, is returned
244
+ * `'unreviewed'` and derives no proof tag.
221
245
  *
222
246
  * @internal
223
247
  */
@@ -225,46 +249,40 @@ export function physjsFormalRef(key) {
225
249
  const entry = entryByKey.get(key);
226
250
  if (entry === undefined)
227
251
  throw new Error(`PhysJS manifest has no entry for '${key}'`);
228
- const kind = formalRefKind(entry.key, entry.covers);
229
- if (kind === undefined)
230
- throw new Error(`PhysJS entry '${entry.key}' covers line has no catalog kind`);
231
252
  return {
232
253
  system: 'lean4-physjs',
233
254
  statement: entry.theorem,
234
255
  version: physjsVersion(),
235
256
  axioms: entry.axioms,
236
- fidelity: 'sanity-lemmas',
237
- kind,
257
+ fidelity: physjsFidelity(key),
258
+ kind: entry.kind,
238
259
  url: physjsStatementUrl(entry.theorem),
239
260
  covers: `${entry.covers} — ${entry.coverage}`,
240
261
  };
241
262
  }
263
+ /** The axioms of a statement that are outside {@link PHYSJS_ALLOWED_AXIOMS}. */
264
+ function disallowedAxioms(axioms) {
265
+ return axioms.filter((axiom) => !PHYSJS_ALLOWED_AXIOMS.has(axiom));
266
+ }
242
267
  function sameAxioms(recorded, manifest) {
243
268
  return recorded.length === manifest.length && recorded.every((axiom, i) => axiom === manifest[i]);
244
269
  }
245
- function sameNested(compiled, manifest) {
246
- if (compiled === undefined && manifest === undefined)
247
- return true;
248
- if (compiled === undefined || manifest === undefined)
249
- return false;
270
+ function sameStatement(compiled, manifest) {
250
271
  return (compiled.theorem === manifest.theorem &&
272
+ compiled.kind === manifest.kind &&
251
273
  compiled.covers === manifest.covers &&
252
274
  compiled.coverage === manifest.coverage &&
253
275
  compiled.leanProof === manifest.leanProof &&
254
276
  sameAxioms(compiled.axioms, manifest.axioms));
255
277
  }
256
- /**
257
- * A `be-` covers line begins with a counted kind or a labeled kind.
258
- * Atlas covers lines stay as milestone 1 and 2 wrote them.
259
- */
260
- function catalogCoversProblems(key, covers, where) {
261
- if (!key.startsWith('be-'))
262
- return [];
263
- if (COUNTED_KIND.test(covers) || LABELED_KIND.test(covers))
264
- return [];
265
- return [
266
- `${where} '${key}' covers line does not begin with a catalog kind (reduction, limit, derivation-step, property, or cross-check)`,
267
- ];
278
+ /** The compiled nested statements are the manifest's: the same names, in order, each the same statement. */
279
+ function sameNested(compiled, manifest) {
280
+ return (compiled.length === manifest.length &&
281
+ compiled.every((statement, i) => statement.name === manifest[i].name && sameStatement(statement, manifest[i])));
282
+ }
283
+ /** The kind of a manifest entry is one of the formal-reference kinds. */
284
+ function isFormalRefKind(kind) {
285
+ return typeof kind === 'string' && FORMAL_REF_KINDS.includes(kind);
268
286
  }
269
287
  /**
270
288
  * Problems in the vendored manifest against the bridges that claim to be keyed
@@ -275,17 +293,23 @@ function catalogCoversProblems(key, covers, where) {
275
293
  * entry with no bridge is a problem. A `lean4-physjs` reference with no entry
276
294
  * is a problem: the gate does not skip that system. A nested object is kept
277
295
  * and compared; naming it as the `formalRef` is a problem. The top-level
278
- * theorem stays the reference. A catalog entry whose covers line is a
279
- * `property` or a `cross-check` is a labeled reference: it resolves to a
280
- * `formalRef`, and it is not a counted kind.
296
+ * theorem stays the reference. The reference's kind is the entry's
297
+ * `kind`; a kind outside the formal-reference kinds is a problem. An axiom
298
+ * outside {@link PHYSJS_ALLOWED_AXIOMS} on any statement is a problem. A `be-`
299
+ * key in the unbroken run above the catalog's highest id is ahead of the
300
+ * catalog and is not a problem (`physjsAheadOfCatalog`); any other key with
301
+ * no bridge is. Every structural check (fields, kinds, coverage, proof
302
+ * status, axioms, Lean file, compiled copy) runs for every entry, ahead keys
303
+ * included; only the checks against a bridge's reference are skipped for a
304
+ * key that has no bridge yet.
281
305
  *
282
306
  * @internal
283
307
  */
284
308
  export function physjsManifestProblems(input) {
285
309
  const problems = [];
286
310
  const manifest = input.manifest;
287
- if (manifest.schema !== 'physjs-bridge-manifest/v1') {
288
- problems.push(`manifest schema is '${manifest.schema}', expected 'physjs-bridge-manifest/v1'`);
311
+ if (manifest.schema !== 'physjs-bridge-manifest/v2') {
312
+ problems.push(`manifest schema is '${manifest.schema}', expected 'physjs-bridge-manifest/v2'`);
289
313
  }
290
314
  if (manifest.commit !== PHYSJS_COMMIT) {
291
315
  problems.push(`manifest commit is '${manifest.commit}', expected '${PHYSJS_COMMIT}'`);
@@ -299,18 +323,19 @@ export function physjsManifestProblems(input) {
299
323
  if (manifest.physlib !== PHYSJS_PHYS_LIB) {
300
324
  problems.push(`manifest physlib is '${manifest.physlib}', expected '${PHYSJS_PHYS_LIB}'`);
301
325
  }
302
- const compiledByKey = new Map((input.compiledEntries ?? PHYSJS_ENTRIES).map((entry) => [entry.key, entry]));
326
+ const compiledEntries = input.compiledEntries ?? PHYSJS_ENTRIES;
327
+ const compiledByKey = new Map(compiledEntries.map((entry) => [entry.key, entry]));
328
+ /** Theorem → Lean file over the compiled table under test, nested statements included. */
329
+ const fileByTheorem = new Map(compiledEntries.flatMap((entry) => [entry, ...entry.nested].map((statement) => [statement.theorem, statement.file])));
303
330
  const byId = new Map(input.bridges.map((bridge) => [bridge.id, bridge]));
304
331
  const seen = new Set();
332
+ const manifestKeys = manifest.entries.map((entry) => entry.key);
305
333
  for (const entry of manifest.entries) {
306
334
  if (seen.has(entry.key))
307
335
  problems.push(`manifest key '${entry.key}' is duplicated`);
308
336
  seen.add(entry.key);
309
- for (const field of Object.keys(entry)) {
310
- if (!ENTRY_FIELDS.has(field)) {
311
- problems.push(`manifest entry '${entry.key}' has unexpected field '${field}'`);
312
- }
313
- }
337
+ const { nested, problems: fieldProblems } = physjsNestedStatements(entry);
338
+ problems.push(...fieldProblems);
314
339
  if (entry.key !== entry.bridgeId) {
315
340
  problems.push(`manifest key '${entry.key}' does not equal bridgeId '${entry.bridgeId}'`);
316
341
  }
@@ -320,23 +345,50 @@ export function physjsManifestProblems(input) {
320
345
  if (entry.leanProof !== 'complete') {
321
346
  problems.push(`leanProof for '${entry.key}' is '${entry.leanProof}', expected 'complete'`);
322
347
  }
323
- const coversProblems = catalogCoversProblems(entry.key, entry.covers, 'manifest key');
324
- problems.push(...coversProblems);
325
- for (const field of NESTED_FIELDS) {
326
- const nested = entry[field];
327
- if (nested === undefined)
328
- continue;
329
- if (nested.coverage !== PHYSJS_COVERAGE) {
330
- problems.push(`${field} coverage phrase for '${entry.key}' is '${nested.coverage}', expected '${PHYSJS_COVERAGE}'`);
348
+ if (!isFormalRefKind(entry.kind)) {
349
+ problems.push(`manifest key '${entry.key}' kind '${String(entry.kind)}' is not one of ${FORMAL_REF_KINDS.join(', ')}`);
350
+ }
351
+ if (disallowedAxioms(entry.axioms).length > 0) {
352
+ problems.push(`manifest key '${entry.key}' axioms [${entry.axioms.join(', ')}] are not a subset of [${[...PHYSJS_ALLOWED_AXIOMS].join(', ')}]`);
353
+ }
354
+ for (const statement of nested) {
355
+ if (!isFormalRefKind(statement.kind)) {
356
+ problems.push(`${statement.name} kind for '${entry.key}' is '${String(statement.kind)}', not one of ${FORMAL_REF_KINDS.join(', ')}`);
357
+ }
358
+ if (statement.coverage !== PHYSJS_COVERAGE) {
359
+ problems.push(`${statement.name} coverage phrase for '${entry.key}' is '${statement.coverage}', expected '${PHYSJS_COVERAGE}'`);
331
360
  }
332
- if (nested.leanProof !== 'complete') {
333
- problems.push(`${field} leanProof for '${entry.key}' is '${nested.leanProof}', expected 'complete'`);
361
+ if (statement.leanProof !== 'complete') {
362
+ problems.push(`${statement.name} leanProof for '${entry.key}' is '${statement.leanProof}', expected 'complete'`);
334
363
  }
335
- problems.push(...catalogCoversProblems(entry.key, nested.covers, `${field} covers`));
364
+ if (disallowedAxioms(statement.axioms).length > 0) {
365
+ problems.push(`${statement.name} axioms for '${entry.key}' [${statement.axioms.join(', ')}] are not a subset of [${[...PHYSJS_ALLOWED_AXIOMS].join(', ')}]`);
366
+ }
367
+ if (!fileByTheorem.has(statement.theorem)) {
368
+ problems.push(`manifest theorem '${statement.theorem}' (${entry.key}.${statement.name}) has no Lean file in formal/physjs/theorem-files.json`);
369
+ }
370
+ }
371
+ const file = fileByTheorem.get(entry.theorem);
372
+ if (file === undefined) {
373
+ problems.push(`manifest theorem '${entry.theorem}' has no Lean file in formal/physjs/theorem-files.json`);
374
+ }
375
+ const compiled = compiledByKey.get(entry.key);
376
+ if (compiled === undefined) {
377
+ problems.push(`manifest key '${entry.key}' is not in the compiled entry table`);
378
+ }
379
+ else if (compiled.theorem !== entry.theorem ||
380
+ compiled.kind !== entry.kind ||
381
+ compiled.covers !== entry.covers ||
382
+ compiled.coverage !== entry.coverage ||
383
+ compiled.leanProof !== entry.leanProof ||
384
+ !sameAxioms(compiled.axioms, entry.axioms) ||
385
+ !sameNested(compiled.nested, nested)) {
386
+ problems.push(`compiled entry for '${entry.key}' disagrees with the vendored manifest`);
336
387
  }
337
388
  const bridge = byId.get(entry.key);
338
389
  if (bridge === undefined) {
339
- problems.push(`manifest key '${entry.key}' does not resolve to a bridge`);
390
+ if (!physjsAheadOfCatalog(entry.key, manifestKeys))
391
+ problems.push(`manifest key '${entry.key}' does not resolve to a bridge`);
340
392
  continue;
341
393
  }
342
394
  const ref = bridge.formalRef;
@@ -344,15 +396,9 @@ export function physjsManifestProblems(input) {
344
396
  problems.push(`bridge '${entry.key}' has no lean4-physjs formalRef (system '${ref?.system ?? 'none'}')`);
345
397
  continue;
346
398
  }
347
- if (entry.planeWave !== undefined && ref.statement === entry.planeWave.theorem) {
348
- problems.push(`bridge '${entry.key}' formalRef names the nested planeWave theorem '${entry.planeWave.theorem}'; the top-level theorem stays the reference`);
349
- }
350
- for (const field of NESTED_FIELDS) {
351
- if (field === 'planeWave')
352
- continue;
353
- const nested = entry[field];
354
- if (nested !== undefined && ref.statement === nested.theorem) {
355
- problems.push(`bridge '${entry.key}' formalRef names the nested ${field} theorem '${nested.theorem}'; the top-level theorem stays the reference`);
399
+ for (const statement of nested) {
400
+ if (ref.statement === statement.theorem) {
401
+ problems.push(`bridge '${entry.key}' formalRef names the nested ${statement.name} theorem '${statement.theorem}'; the top-level theorem stays the reference`);
356
402
  }
357
403
  }
358
404
  if (ref.statement !== entry.theorem) {
@@ -361,7 +407,6 @@ export function physjsManifestProblems(input) {
361
407
  if (!sameAxioms(ref.axioms, entry.axioms)) {
362
408
  problems.push(`bridge '${entry.key}' axioms [${ref.axioms.join(', ')}] differ from the manifest [${entry.axioms.join(', ')}]`);
363
409
  }
364
- problems.push(...catalogCoversProblems(entry.key, ref.covers, 'formalRef covers'));
365
410
  if (!ref.covers.includes(PHYSJS_COVERAGE)) {
366
411
  problems.push(`bridge '${entry.key}' covers line does not say '${PHYSJS_COVERAGE}'`);
367
412
  }
@@ -374,23 +419,11 @@ export function physjsManifestProblems(input) {
374
419
  if (ref.fidelity === 'unreviewed') {
375
420
  problems.push(`bridge '${entry.key}' formalRef is unreviewed`);
376
421
  }
377
- const kind = formalRefKind(entry.key, entry.covers);
378
- if (kind !== undefined && ref.kind !== kind) {
379
- problems.push(`bridge '${entry.key}' kind is '${ref.kind}', expected '${kind}'`);
422
+ if (ref.kind !== entry.kind) {
423
+ problems.push(`bridge '${entry.key}' kind is '${ref.kind}', expected '${entry.kind}'`);
380
424
  }
381
- const url = physjsStatementUrl(entry.theorem);
382
- if (ref.url !== url) {
383
- problems.push(`bridge '${entry.key}' url is '${ref.url}', expected '${url}'`);
384
- }
385
- const compiled = compiledByKey.get(entry.key);
386
- if (compiled === undefined) {
387
- problems.push(`manifest key '${entry.key}' is not in the compiled entry table`);
388
- }
389
- else if (compiled.theorem !== entry.theorem ||
390
- compiled.covers !== entry.covers ||
391
- compiled.coverage !== entry.coverage ||
392
- NESTED_FIELDS.some((field) => !sameNested(compiled[field], entry[field]))) {
393
- problems.push(`compiled entry for '${entry.key}' disagrees with the vendored manifest`);
425
+ if (file !== undefined && ref.url !== physjsFileUrl(file)) {
426
+ problems.push(`bridge '${entry.key}' url is '${ref.url}', expected '${physjsFileUrl(file)}'`);
394
427
  }
395
428
  }
396
429
  for (const bridge of input.bridges) {