universal-physics-tensor 0.45.2 → 0.47.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.
- package/README.md +85 -66
- package/bin/upt.mjs +22 -22
- package/dist/atlas/applicability.d.ts +108 -0
- package/dist/atlas/applicability.d.ts.map +1 -0
- package/dist/atlas/applicability.js +301 -0
- package/dist/atlas/applicability.js.map +1 -0
- package/dist/atlas/association.d.ts +92 -0
- package/dist/atlas/association.d.ts.map +1 -0
- package/dist/atlas/association.js +112 -0
- package/dist/atlas/association.js.map +1 -0
- package/dist/atlas/benchmark/backend-shapes.d.ts +47 -0
- package/dist/atlas/benchmark/backend-shapes.d.ts.map +1 -0
- package/dist/atlas/benchmark/backend-shapes.js +58 -0
- package/dist/atlas/benchmark/backend-shapes.js.map +1 -0
- package/dist/atlas/benchmark/baselines.d.ts +64 -0
- package/dist/atlas/benchmark/baselines.d.ts.map +1 -0
- package/dist/atlas/benchmark/baselines.js +112 -0
- package/dist/atlas/benchmark/baselines.js.map +1 -0
- package/dist/atlas/benchmark/leakage.d.ts +56 -0
- package/dist/atlas/benchmark/leakage.d.ts.map +1 -0
- package/dist/atlas/benchmark/leakage.js +100 -0
- package/dist/atlas/benchmark/leakage.js.map +1 -0
- package/dist/atlas/benchmark/loader.d.ts +56 -0
- package/dist/atlas/benchmark/loader.d.ts.map +1 -0
- package/dist/atlas/benchmark/loader.js +104 -0
- package/dist/atlas/benchmark/loader.js.map +1 -0
- package/dist/atlas/benchmark/run-atlas.d.ts +72 -0
- package/dist/atlas/benchmark/run-atlas.d.ts.map +1 -0
- package/dist/atlas/benchmark/run-atlas.js +210 -0
- package/dist/atlas/benchmark/run-atlas.js.map +1 -0
- package/dist/atlas/benchmark/stats.d.ts +90 -0
- package/dist/atlas/benchmark/stats.d.ts.map +1 -0
- package/dist/atlas/benchmark/stats.js +159 -0
- package/dist/atlas/benchmark/stats.js.map +1 -0
- package/dist/atlas/benchmark/study.d.ts +120 -0
- package/dist/atlas/benchmark/study.d.ts.map +1 -0
- package/dist/atlas/benchmark/study.js +192 -0
- package/dist/atlas/benchmark/study.js.map +1 -0
- package/dist/atlas/benchmark/types.d.ts +79 -0
- package/dist/atlas/benchmark/types.d.ts.map +1 -0
- package/dist/atlas/benchmark/types.js +46 -0
- package/dist/atlas/benchmark/types.js.map +1 -0
- package/dist/atlas/composition-table.d.ts +55 -0
- package/dist/atlas/composition-table.d.ts.map +1 -0
- package/dist/atlas/composition-table.js +133 -0
- package/dist/atlas/composition-table.js.map +1 -0
- package/dist/atlas/conventions.d.ts +63 -0
- package/dist/atlas/conventions.d.ts.map +1 -0
- package/dist/atlas/conventions.js +93 -0
- package/dist/atlas/conventions.js.map +1 -0
- package/dist/atlas/coverage.d.ts +93 -0
- package/dist/atlas/coverage.d.ts.map +1 -0
- package/dist/atlas/coverage.js +69 -0
- package/dist/atlas/coverage.js.map +1 -0
- package/dist/atlas/derivation.d.ts +137 -0
- package/dist/atlas/derivation.d.ts.map +1 -0
- package/dist/atlas/derivation.js +190 -0
- package/dist/atlas/derivation.js.map +1 -0
- package/dist/atlas/derive-evidence.d.ts +218 -0
- package/dist/atlas/derive-evidence.d.ts.map +1 -0
- package/dist/atlas/derive-evidence.js +225 -0
- package/dist/atlas/derive-evidence.js.map +1 -0
- package/dist/atlas/diffusion/bridges-closure.d.ts +63 -0
- package/dist/atlas/diffusion/bridges-closure.d.ts.map +1 -0
- package/dist/atlas/diffusion/bridges-closure.js +350 -0
- package/dist/atlas/diffusion/bridges-closure.js.map +1 -0
- package/dist/atlas/diffusion/bridges.d.ts +36 -0
- package/dist/atlas/diffusion/bridges.d.ts.map +1 -0
- package/dist/atlas/diffusion/bridges.js +226 -0
- package/dist/atlas/diffusion/bridges.js.map +1 -0
- package/dist/atlas/diffusion/dimensions.d.ts +21 -0
- package/dist/atlas/diffusion/dimensions.d.ts.map +1 -0
- package/dist/atlas/diffusion/dimensions.js +21 -0
- package/dist/atlas/diffusion/dimensions.js.map +1 -0
- package/dist/atlas/diffusion/index.d.ts +16 -0
- package/dist/atlas/diffusion/index.d.ts.map +1 -0
- package/dist/atlas/diffusion/index.js +23 -0
- package/dist/atlas/diffusion/index.js.map +1 -0
- package/dist/atlas/diffusion/models.d.ts +24 -0
- package/dist/atlas/diffusion/models.d.ts.map +1 -0
- package/dist/atlas/diffusion/models.js +139 -0
- package/dist/atlas/diffusion/models.js.map +1 -0
- package/dist/atlas/diffusion/numerics.d.ts +181 -0
- package/dist/atlas/diffusion/numerics.d.ts.map +1 -0
- package/dist/atlas/diffusion/numerics.js +251 -0
- package/dist/atlas/diffusion/numerics.js.map +1 -0
- package/dist/atlas/error-algebra.d.ts +52 -0
- package/dist/atlas/error-algebra.d.ts.map +1 -0
- package/dist/atlas/error-algebra.js +55 -0
- package/dist/atlas/error-algebra.js.map +1 -0
- package/dist/atlas/export.d.ts +48 -0
- package/dist/atlas/export.d.ts.map +1 -0
- package/dist/atlas/export.js +106 -0
- package/dist/atlas/export.js.map +1 -0
- package/dist/atlas/families.d.ts +14 -0
- package/dist/atlas/families.d.ts.map +1 -0
- package/dist/atlas/families.js +20 -0
- package/dist/atlas/families.js.map +1 -0
- package/dist/atlas/index.d.ts +90 -0
- package/dist/atlas/index.d.ts.map +1 -0
- package/dist/atlas/index.js +69 -0
- package/dist/atlas/index.js.map +1 -0
- package/dist/atlas/link-prediction.d.ts +71 -0
- package/dist/atlas/link-prediction.d.ts.map +1 -0
- package/dist/atlas/link-prediction.js +128 -0
- package/dist/atlas/link-prediction.js.map +1 -0
- package/dist/atlas/model.d.ts +70 -0
- package/dist/atlas/model.d.ts.map +1 -0
- package/dist/atlas/model.js +26 -0
- package/dist/atlas/model.js.map +1 -0
- package/dist/atlas/oscillators/bridges-coarse.d.ts +71 -0
- package/dist/atlas/oscillators/bridges-coarse.d.ts.map +1 -0
- package/dist/atlas/oscillators/bridges-coarse.js +146 -0
- package/dist/atlas/oscillators/bridges-coarse.js.map +1 -0
- package/dist/atlas/oscillators/bridges-exact.d.ts +70 -0
- package/dist/atlas/oscillators/bridges-exact.d.ts.map +1 -0
- package/dist/atlas/oscillators/bridges-exact.js +230 -0
- package/dist/atlas/oscillators/bridges-exact.js.map +1 -0
- package/dist/atlas/oscillators/bridges-limits.d.ts +118 -0
- package/dist/atlas/oscillators/bridges-limits.d.ts.map +1 -0
- package/dist/atlas/oscillators/bridges-limits.js +345 -0
- package/dist/atlas/oscillators/bridges-limits.js.map +1 -0
- package/dist/atlas/oscillators/dimensions.d.ts +34 -0
- package/dist/atlas/oscillators/dimensions.d.ts.map +1 -0
- package/dist/atlas/oscillators/dimensions.js +34 -0
- package/dist/atlas/oscillators/dimensions.js.map +1 -0
- package/dist/atlas/oscillators/index.d.ts +38 -0
- package/dist/atlas/oscillators/index.d.ts.map +1 -0
- package/dist/atlas/oscillators/index.js +37 -0
- package/dist/atlas/oscillators/index.js.map +1 -0
- package/dist/atlas/oscillators/models.d.ts +25 -0
- package/dist/atlas/oscillators/models.d.ts.map +1 -0
- package/dist/atlas/oscillators/models.js +160 -0
- package/dist/atlas/oscillators/models.js.map +1 -0
- package/dist/atlas/oscillators/rejections.d.ts +21 -0
- package/dist/atlas/oscillators/rejections.d.ts.map +1 -0
- package/dist/atlas/oscillators/rejections.js +54 -0
- package/dist/atlas/oscillators/rejections.js.map +1 -0
- package/dist/atlas/path-bound.d.ts +143 -0
- package/dist/atlas/path-bound.d.ts.map +1 -0
- package/dist/atlas/path-bound.js +268 -0
- package/dist/atlas/path-bound.js.map +1 -0
- package/dist/atlas/poster/associations.d.ts +66 -0
- package/dist/atlas/poster/associations.d.ts.map +1 -0
- package/dist/atlas/poster/associations.js +90 -0
- package/dist/atlas/poster/associations.js.map +1 -0
- package/dist/atlas/poster/derivations.d.ts +156 -0
- package/dist/atlas/poster/derivations.d.ts.map +1 -0
- package/dist/atlas/poster/derivations.js +430 -0
- package/dist/atlas/poster/derivations.js.map +1 -0
- package/dist/atlas/poster/statements.d.ts +198 -0
- package/dist/atlas/poster/statements.d.ts.map +1 -0
- package/dist/atlas/poster/statements.js +365 -0
- package/dist/atlas/poster/statements.js.map +1 -0
- package/dist/atlas/public.d.ts +26 -0
- package/dist/atlas/public.d.ts.map +1 -0
- package/dist/atlas/public.js +21 -0
- package/dist/atlas/public.js.map +1 -0
- package/dist/atlas/regime.d.ts +171 -0
- package/dist/atlas/regime.d.ts.map +1 -0
- package/dist/atlas/regime.js +309 -0
- package/dist/atlas/regime.js.map +1 -0
- package/dist/atlas/serialize.d.ts +50 -0
- package/dist/atlas/serialize.d.ts.map +1 -0
- package/dist/atlas/serialize.js +180 -0
- package/dist/atlas/serialize.js.map +1 -0
- package/dist/atlas/statement.d.ts +165 -0
- package/dist/atlas/statement.d.ts.map +1 -0
- package/dist/atlas/statement.js +176 -0
- package/dist/atlas/statement.js.map +1 -0
- package/dist/atlas/types.d.ts +325 -0
- package/dist/atlas/types.d.ts.map +1 -0
- package/dist/atlas/types.js +61 -0
- package/dist/atlas/types.js.map +1 -0
- package/dist/atlas/waves/bridges-closure.d.ts +39 -0
- package/dist/atlas/waves/bridges-closure.d.ts.map +1 -0
- package/dist/atlas/waves/bridges-closure.js +226 -0
- package/dist/atlas/waves/bridges-closure.js.map +1 -0
- package/dist/atlas/waves/bridges.d.ts +49 -0
- package/dist/atlas/waves/bridges.d.ts.map +1 -0
- package/dist/atlas/waves/bridges.js +266 -0
- package/dist/atlas/waves/bridges.js.map +1 -0
- package/dist/atlas/waves/index.d.ts +16 -0
- package/dist/atlas/waves/index.d.ts.map +1 -0
- package/dist/atlas/waves/index.js +23 -0
- package/dist/atlas/waves/index.js.map +1 -0
- package/dist/atlas/waves/models.d.ts +29 -0
- package/dist/atlas/waves/models.d.ts.map +1 -0
- package/dist/atlas/waves/models.js +127 -0
- package/dist/atlas/waves/models.js.map +1 -0
- package/dist/atlas/waves/numerics.d.ts +149 -0
- package/dist/atlas/waves/numerics.d.ts.map +1 -0
- package/dist/atlas/waves/numerics.js +218 -0
- package/dist/atlas/waves/numerics.js.map +1 -0
- package/dist/atlas/witness-artifact.d.ts +65 -0
- package/dist/atlas/witness-artifact.d.ts.map +1 -0
- package/dist/atlas/witness-artifact.js +78 -0
- package/dist/atlas/witness-artifact.js.map +1 -0
- package/dist/atlas/witness-numeric.d.ts +81 -0
- package/dist/atlas/witness-numeric.d.ts.map +1 -0
- package/dist/atlas/witness-numeric.js +105 -0
- package/dist/atlas/witness-numeric.js.map +1 -0
- package/dist/atlas/witness-result.d.ts +77 -0
- package/dist/atlas/witness-result.d.ts.map +1 -0
- package/dist/atlas/witness-result.js +39 -0
- package/dist/atlas/witness-result.js.map +1 -0
- package/dist/atlas/witness-specs.d.ts +110 -0
- package/dist/atlas/witness-specs.d.ts.map +1 -0
- package/dist/atlas/witness-specs.js +372 -0
- package/dist/atlas/witness-specs.js.map +1 -0
- package/dist/atlas/witness-symbolic.d.ts +79 -0
- package/dist/atlas/witness-symbolic.d.ts.map +1 -0
- package/dist/atlas/witness-symbolic.js +140 -0
- package/dist/atlas/witness-symbolic.js.map +1 -0
- package/dist/atlas/witnesses/quantum-support.d.ts +50 -0
- package/dist/atlas/witnesses/quantum-support.d.ts.map +1 -0
- package/dist/atlas/witnesses/quantum-support.js +48 -0
- package/dist/atlas/witnesses/quantum-support.js.map +1 -0
- package/dist/bridges/be11-decoherence-confrontation.js.map +1 -1
- package/dist/bridges/be21-kss-confrontation.js.map +1 -1
- package/dist/bridges/be23-planckian-confrontation.js.map +1 -1
- package/dist/bridges/be35-bootstrap-confrontation.js.map +1 -1
- package/dist/bridges/be36-gw170817-confrontation.js.map +1 -1
- package/dist/bridges/be37-cassini-confrontation.js.map +1 -1
- package/dist/bridges/be48-collapse-confrontation.js.map +1 -1
- package/dist/bridges/be51-lensing-confrontation.d.ts.map +1 -1
- package/dist/bridges/be51-lensing-confrontation.js +5 -3
- package/dist/bridges/be51-lensing-confrontation.js.map +1 -1
- package/dist/bridges/be52-mercury-confrontation.d.ts.map +1 -1
- package/dist/bridges/be52-mercury-confrontation.js +4 -1
- package/dist/bridges/be52-mercury-confrontation.js.map +1 -1
- package/dist/bridges/be55-quantum-hall-confrontation.js.map +1 -1
- package/dist/bridges/be56-casimir-confrontation.js.map +1 -1
- package/dist/bridges/be58-johnson-nyquist-confrontation.js.map +1 -1
- package/dist/bridges/be59-ac-josephson-confrontation.js.map +1 -1
- package/dist/bridges/be60-fractional-qh-confrontation.js.map +1 -1
- package/dist/bridges/be61-wiedemann-franz-confrontation.js.map +1 -1
- package/dist/bridges/be62-bcs-gap-confrontation.js.map +1 -1
- package/dist/bridges/be63-chandrasekhar-mass-confrontation.js.map +1 -1
- package/dist/bridges/be64-eddington-luminosity-confrontation.js.map +1 -1
- package/dist/bridges/be65-jeans-mass-confrontation.js.map +1 -1
- package/dist/bridges/bridge-equations.d.ts +2 -2
- package/dist/bridges/bridge-equations.d.ts.map +1 -1
- package/dist/bridges/bridge-equations.js +2 -2
- package/dist/bridges/bridge-equations.js.map +1 -1
- package/dist/bridges/catalog-adapter.d.ts.map +1 -1
- package/dist/bridges/catalog-adapter.js.map +1 -1
- package/dist/bridges/confrontations.d.ts.map +1 -1
- package/dist/bridges/confrontations.js +7 -0
- package/dist/bridges/confrontations.js.map +1 -1
- package/dist/bridges/equations/_be-helpers.d.ts +2 -2
- package/dist/bridges/equations/_be-helpers.js +2 -2
- package/dist/bridges/equations/be-20-vacuum-energy.js.map +1 -1
- package/dist/bridges/equations/be-35-conformal-bootstrap.d.ts +59 -72
- package/dist/bridges/equations/be-35-conformal-bootstrap.d.ts.map +1 -1
- package/dist/bridges/equations/be-35-conformal-bootstrap.js +66 -98
- package/dist/bridges/equations/be-35-conformal-bootstrap.js.map +1 -1
- package/dist/bridges/equations/be-48-grw-localization.d.ts +9 -8
- package/dist/bridges/equations/be-48-grw-localization.d.ts.map +1 -1
- package/dist/bridges/equations/be-48-grw-localization.js +9 -8
- package/dist/bridges/equations/be-48-grw-localization.js.map +1 -1
- package/dist/bridges/gravitational-lensing.d.ts +10 -0
- package/dist/bridges/gravitational-lensing.d.ts.map +1 -1
- package/dist/bridges/gravitational-lensing.js.map +1 -1
- package/dist/bridges/index.d.ts +125 -7
- package/dist/bridges/index.d.ts.map +1 -1
- package/dist/bridges/index.js +483 -20
- package/dist/bridges/index.js.map +1 -1
- package/dist/bridges/observations/types.d.ts +14 -0
- package/dist/bridges/observations/types.d.ts.map +1 -1
- package/dist/bridges/observations/types.js.map +1 -1
- package/dist/bridges/perihelion-precession.d.ts +10 -0
- package/dist/bridges/perihelion-precession.d.ts.map +1 -1
- package/dist/bridges/perihelion-precession.js.map +1 -1
- package/dist/bridges/rhs-registry.js +2 -2
- package/dist/canonical/canonical-equation.d.ts +15 -0
- package/dist/canonical/canonical-equation.d.ts.map +1 -1
- package/dist/canonical/entries/_l1-build.d.ts +1 -1
- package/dist/canonical/entries/_l1-build.d.ts.map +1 -1
- package/dist/canonical/entries/atomic.d.ts.map +1 -1
- package/dist/canonical/entries/atomic.js +23 -0
- package/dist/canonical/entries/atomic.js.map +1 -1
- package/dist/canonical/entries/nonmonomial.d.ts.map +1 -1
- package/dist/canonical/entries/nonmonomial.js +93 -0
- package/dist/canonical/entries/nonmonomial.js.map +1 -1
- package/dist/canonical/normal-form.js.map +1 -1
- package/dist/canonical/residual.d.ts +28 -0
- package/dist/canonical/residual.d.ts.map +1 -0
- package/dist/canonical/residual.js +31 -0
- package/dist/canonical/residual.js.map +1 -0
- package/dist/cli/command.d.ts +8 -0
- package/dist/cli/command.d.ts.map +1 -1
- package/dist/cli/command.js +10 -0
- package/dist/cli/command.js.map +1 -1
- package/dist/cli/commands/atlas.d.ts +3 -0
- package/dist/cli/commands/atlas.d.ts.map +1 -0
- package/dist/cli/commands/atlas.js +158 -0
- package/dist/cli/commands/atlas.js.map +1 -0
- package/dist/cli/commands/audit.js +3 -3
- package/dist/cli/commands/candidates.js +3 -3
- package/dist/cli/commands/canonical.js +3 -3
- package/dist/cli/commands/confront.d.ts.map +1 -1
- package/dist/cli/commands/confront.js +8 -1
- package/dist/cli/commands/confront.js.map +1 -1
- package/dist/cli/commands/connectors.js +7 -7
- package/dist/cli/commands/coverage.js +3 -3
- package/dist/cli/commands/derive.d.ts.map +1 -1
- package/dist/cli/commands/derive.js +40 -9
- package/dist/cli/commands/derive.js.map +1 -1
- package/dist/cli/commands/discover.d.ts.map +1 -1
- package/dist/cli/commands/discover.js +46 -27
- package/dist/cli/commands/discover.js.map +1 -1
- package/dist/cli/commands/evaluate.d.ts.map +1 -1
- package/dist/cli/commands/evaluate.js +2 -1
- package/dist/cli/commands/evaluate.js.map +1 -1
- package/dist/cli/commands/explain.d.ts.map +1 -1
- package/dist/cli/commands/explain.js +19 -6
- package/dist/cli/commands/explain.js.map +1 -1
- package/dist/cli/commands/index.d.ts +3 -0
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +3 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/map.d.ts.map +1 -1
- package/dist/cli/commands/map.js +187 -36
- package/dist/cli/commands/map.js.map +1 -1
- package/dist/cli/commands/path.d.ts +3 -0
- package/dist/cli/commands/path.d.ts.map +1 -0
- package/dist/cli/commands/path.js +228 -0
- package/dist/cli/commands/path.js.map +1 -0
- package/dist/cli/commands/predict.js +4 -4
- package/dist/cli/commands/priority.js +2 -2
- package/dist/cli/commands/probe.d.ts.map +1 -1
- package/dist/cli/commands/probe.js +59 -2
- package/dist/cli/commands/probe.js.map +1 -1
- package/dist/cli/commands/recover.d.ts.map +1 -1
- package/dist/cli/commands/recover.js +25 -6
- package/dist/cli/commands/recover.js.map +1 -1
- package/dist/cli/commands/regime.d.ts +41 -0
- package/dist/cli/commands/regime.d.ts.map +1 -0
- package/dist/cli/commands/regime.js +243 -0
- package/dist/cli/commands/regime.js.map +1 -0
- package/dist/cli/commands/symbolic.js +5 -5
- package/dist/cli/errors.d.ts +13 -1
- package/dist/cli/errors.d.ts.map +1 -1
- package/dist/cli/errors.js +13 -1
- package/dist/cli/errors.js.map +1 -1
- package/dist/cli/graphs.d.ts.map +1 -1
- package/dist/cli/graphs.js +5 -1
- package/dist/cli/graphs.js.map +1 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +29 -2
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/output.d.ts +6 -1
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js.map +1 -1
- package/dist/cli/version.js.map +1 -1
- package/dist/cli-api.d.ts +21 -1
- package/dist/cli-api.d.ts.map +1 -1
- package/dist/cli-api.js +23 -1
- package/dist/cli-api.js.map +1 -1
- package/dist/composition/axis-audit.js.map +1 -1
- package/dist/composition/bridge-prediction.d.ts.map +1 -1
- package/dist/composition/bridge-prediction.js +0 -0
- package/dist/composition/bridge-prediction.js.map +1 -1
- package/dist/composition/canonical-compare.d.ts +65 -0
- package/dist/composition/canonical-compare.d.ts.map +1 -0
- package/dist/composition/canonical-compare.js +237 -0
- package/dist/composition/canonical-compare.js.map +1 -0
- package/dist/composition/canonical-graph.d.ts +2 -2
- package/dist/composition/canonical-graph.js +2 -2
- package/dist/composition/canonical-graph.js.map +1 -1
- package/dist/composition/canonical-prefactors.d.ts +32 -0
- package/dist/composition/canonical-prefactors.d.ts.map +1 -0
- package/dist/composition/canonical-prefactors.js +80 -0
- package/dist/composition/canonical-prefactors.js.map +1 -0
- package/dist/composition/compose-symbolic.d.ts.map +1 -1
- package/dist/composition/compose-symbolic.js.map +1 -1
- package/dist/composition/compose.d.ts.map +1 -1
- package/dist/composition/compose.js +80 -1
- package/dist/composition/compose.js.map +1 -1
- package/dist/composition/consequence.js.map +1 -1
- package/dist/composition/discovery.d.ts +20 -3
- package/dist/composition/discovery.d.ts.map +1 -1
- package/dist/composition/discovery.js +30 -4
- package/dist/composition/discovery.js.map +1 -1
- package/dist/composition/edge.d.ts +64 -0
- package/dist/composition/edge.d.ts.map +1 -1
- package/dist/composition/edge.js +29 -0
- package/dist/composition/edge.js.map +1 -1
- package/dist/composition/edges/calibration.d.ts.map +1 -1
- package/dist/composition/edges/calibration.js +46 -0
- package/dist/composition/edges/calibration.js.map +1 -1
- package/dist/composition/edges/catalog-quantum.d.ts.map +1 -1
- package/dist/composition/edges/catalog-quantum.js +9 -0
- package/dist/composition/edges/catalog-quantum.js.map +1 -1
- package/dist/composition/edges/catalog-tranche.d.ts.map +1 -1
- package/dist/composition/edges/catalog-tranche.js +18 -0
- package/dist/composition/edges/catalog-tranche.js.map +1 -1
- package/dist/composition/enumerate.js.map +1 -1
- package/dist/composition/explain.d.ts +9 -1
- package/dist/composition/explain.d.ts.map +1 -1
- package/dist/composition/explain.js +34 -8
- package/dist/composition/explain.js.map +1 -1
- package/dist/composition/expr-eval.d.ts.map +1 -1
- package/dist/composition/expr-eval.js.map +1 -1
- package/dist/composition/expr-simplify.d.ts +13 -0
- package/dist/composition/expr-simplify.d.ts.map +1 -1
- package/dist/composition/expr-simplify.js +25 -0
- package/dist/composition/expr-simplify.js.map +1 -1
- package/dist/composition/expr-subst.js.map +1 -1
- package/dist/composition/graph-viz-svg.d.ts.map +1 -1
- package/dist/composition/graph-viz.d.ts +118 -1
- package/dist/composition/graph-viz.d.ts.map +1 -1
- package/dist/composition/graph-viz.js +189 -6
- package/dist/composition/graph-viz.js.map +1 -1
- package/dist/composition/grounding.d.ts.map +1 -1
- package/dist/composition/grounding.js +6 -1
- package/dist/composition/grounding.js.map +1 -1
- package/dist/composition/identifiability.js.map +1 -1
- package/dist/composition/index.d.ts +4 -2
- package/dist/composition/index.d.ts.map +1 -1
- package/dist/composition/index.js +2 -1
- package/dist/composition/index.js.map +1 -1
- package/dist/composition/poster-source.d.ts +153 -0
- package/dist/composition/poster-source.d.ts.map +1 -0
- package/dist/composition/poster-source.js +183 -0
- package/dist/composition/poster-source.js.map +1 -0
- package/dist/composition/probe/backend-protocol.d.ts +34 -1
- package/dist/composition/probe/backend-protocol.d.ts.map +1 -1
- package/dist/composition/probe/backend-protocol.js +9 -2
- package/dist/composition/probe/backend-protocol.js.map +1 -1
- package/dist/composition/probe/candidate-store.d.ts.map +1 -1
- package/dist/composition/probe/corpus.d.ts +12 -0
- package/dist/composition/probe/corpus.d.ts.map +1 -1
- package/dist/composition/probe/corpus.js +100 -0
- package/dist/composition/probe/corpus.js.map +1 -1
- package/dist/composition/probe/generator.d.ts +14 -0
- package/dist/composition/probe/generator.d.ts.map +1 -1
- package/dist/composition/probe/generator.js +24 -2
- package/dist/composition/probe/generator.js.map +1 -1
- package/dist/composition/probe/limits.js.map +1 -1
- package/dist/composition/probe/pipeline.d.ts +5 -0
- package/dist/composition/probe/pipeline.d.ts.map +1 -1
- package/dist/composition/probe/pipeline.js +20 -3
- package/dist/composition/probe/pipeline.js.map +1 -1
- package/dist/composition/probe/problem.js.map +1 -1
- package/dist/composition/probe/report.d.ts.map +1 -1
- package/dist/composition/probe/report.js +2 -0
- package/dist/composition/probe/report.js.map +1 -1
- package/dist/composition/probe/residual.d.ts.map +1 -1
- package/dist/composition/probe/residual.js.map +1 -1
- package/dist/composition/probe/search-budget.js.map +1 -1
- package/dist/composition/proposed-bridges.d.ts +2 -2
- package/dist/composition/proposed-bridges.d.ts.map +1 -1
- package/dist/composition/proposed-bridges.js +1 -1
- package/dist/composition/proposed-bridges.js.map +1 -1
- package/dist/composition/retrodiction.js.map +1 -1
- package/dist/composition/uncertainty.d.ts +52 -2
- package/dist/composition/uncertainty.d.ts.map +1 -1
- package/dist/composition/uncertainty.js +38 -2
- package/dist/composition/uncertainty.js.map +1 -1
- package/dist/composition/user-equation.d.ts.map +1 -1
- package/dist/core/constants.d.ts +13 -0
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/constants.js +13 -0
- package/dist/core/constants.js.map +1 -1
- package/dist/core/flux-rules.d.ts.map +1 -1
- package/dist/core/flux-rules.js.map +1 -1
- package/dist/core/labeled-tensor.d.ts.map +1 -1
- package/dist/core/regime-registry.d.ts.map +1 -1
- package/dist/core/regime-rule-install.js.map +1 -1
- package/dist/core/tensor.d.ts.map +1 -1
- package/dist/core/tensor.js.map +1 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/diff/bridge-ast-gradient.js.map +1 -1
- package/dist/diff/bridge-gradient.d.ts +1 -1
- package/dist/diff/bridge-gradient.js +1 -1
- package/dist/dimensional/ast-types.d.ts +31 -1
- package/dist/dimensional/ast-types.d.ts.map +1 -1
- package/dist/dimensional/bridge-check.d.ts +1 -1
- package/dist/dimensional/bridge-check.js +1 -1
- package/dist/dimensional/buckingham.d.ts.map +1 -1
- package/dist/dimensional/connection.d.ts +2 -0
- package/dist/dimensional/connection.d.ts.map +1 -1
- package/dist/dimensional/connection.js +2 -0
- package/dist/dimensional/connection.js.map +1 -1
- package/dist/dimensional/curvature-composite.d.ts +5 -3
- package/dist/dimensional/curvature-composite.d.ts.map +1 -1
- package/dist/dimensional/curvature-composite.js +1 -0
- package/dist/dimensional/curvature-composite.js.map +1 -1
- package/dist/dimensional/curvature-invariants.d.ts +2 -0
- package/dist/dimensional/curvature-invariants.d.ts.map +1 -1
- package/dist/dimensional/curvature-invariants.js +2 -0
- package/dist/dimensional/curvature-invariants.js.map +1 -1
- package/dist/dimensional/dimension-spec.d.ts.map +1 -1
- package/dist/dimensional/einstein-equation.d.ts +3 -3
- package/dist/dimensional/einstein-equation.js +3 -3
- package/dist/dimensional/errors.d.ts.map +1 -1
- package/dist/dimensional/metric.d.ts +5 -2
- package/dist/dimensional/metric.d.ts.map +1 -1
- package/dist/dimensional/metric.js +5 -2
- package/dist/dimensional/metric.js.map +1 -1
- package/dist/dimensional/tensor-trace.js.map +1 -1
- package/dist/dimensional/validator-registry.js.map +1 -1
- package/dist/dimensional/validator.d.ts +3 -2
- package/dist/dimensional/validator.d.ts.map +1 -1
- package/dist/dimensional/validator.js +23 -4
- package/dist/dimensional/validator.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/numerical/curvature-lowering-helpers.d.ts.map +1 -1
- package/dist/numerical/curvature-lowering-helpers.js +104 -0
- package/dist/numerical/curvature-lowering-helpers.js.map +1 -1
- package/dist/numerical/errors.d.ts.map +1 -1
- package/dist/numerical/errors.js.map +1 -1
- package/dist/numerical/float64-engine.d.ts.map +1 -1
- package/dist/numerical/float64-engine.js +51 -24
- package/dist/numerical/float64-engine.js.map +1 -1
- package/dist/numerical/formula-dimension.d.ts.map +1 -1
- package/dist/numerical/formula-dimension.js.map +1 -1
- package/dist/numerical/formula.d.ts.map +1 -1
- package/dist/numerical/formula.js.map +1 -1
- package/dist/numerical/geometrized.d.ts.map +1 -1
- package/dist/numerical/gl4-integrator.d.ts +3 -3
- package/dist/numerical/gl4-integrator.js +3 -3
- package/dist/numerical/killing.d.ts +47 -5
- package/dist/numerical/killing.d.ts.map +1 -1
- package/dist/numerical/killing.js +41 -3
- package/dist/numerical/killing.js.map +1 -1
- package/dist/numerical/klein-gordon.d.ts +2 -2
- package/dist/numerical/klein-gordon.js +2 -2
- package/dist/numerical/lowering.d.ts +2 -2
- package/dist/numerical/lowering.d.ts.map +1 -1
- package/dist/numerical/lowering.js +5 -3
- package/dist/numerical/lowering.js.map +1 -1
- package/dist/numerical/mathts-engine.d.ts.map +1 -1
- package/dist/numerical/mathts-engine.js.map +1 -1
- package/dist/numerical/metric-inverse.js.map +1 -1
- package/dist/numerical/perihelion-finder.d.ts +15 -13
- package/dist/numerical/perihelion-finder.d.ts.map +1 -1
- package/dist/numerical/perihelion-finder.js +15 -13
- package/dist/numerical/perihelion-finder.js.map +1 -1
- package/dist/numerical/weyl-lowering.d.ts.map +1 -1
- package/dist/numerical/weyl-lowering.js +90 -40
- package/dist/numerical/weyl-lowering.js.map +1 -1
- package/package.json +163 -104
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Atlas Phase 3 — `Statement`, `Context`, and the CHECKED context union.
|
|
3
|
+
*
|
|
4
|
+
* A `Statement` is a claim IN A CONTEXT, not a string. Design note
|
|
5
|
+
* `docs/planning/Atlas-Phase-3-Design.md` §1: two statements that render
|
|
6
|
+
* identically can be claims about different things when their gauge, frame or
|
|
7
|
+
* assumption set differs, and the poster index will place exactly such pairs
|
|
8
|
+
* next to each other. `context` is therefore the reason this type exists at
|
|
9
|
+
* all rather than reusing `CanonicalEquation`.
|
|
10
|
+
*
|
|
11
|
+
* ## `ast?` is optional ON PURPOSE
|
|
12
|
+
*
|
|
13
|
+
* The poster's hidden supporting nodes — the action principle, Noether, the
|
|
14
|
+
* full Maxwell set, the Lorentz group, the central limit theorem — are
|
|
15
|
+
* valuable because they are NAMED and LINKED, not because they are evaluable.
|
|
16
|
+
* Requiring an `ast` would force either a fabricated encoding or their
|
|
17
|
+
* exclusion, and both are worse than an honest `sourceExpression` with no
|
|
18
|
+
* `ast` (design note §1). Do not make it required.
|
|
19
|
+
*
|
|
20
|
+
* ## The union is CHECKED, never computed
|
|
21
|
+
*
|
|
22
|
+
* {@link contextUnion} does not MERGE contexts. It asks whether a union
|
|
23
|
+
* EXISTS, and returns an explicit refusal when it does not. Two refusals
|
|
24
|
+
* matter, and neither is an error condition:
|
|
25
|
+
*
|
|
26
|
+
* 1. **Convention conflict** — delegated to `checkConventions`, whose contract
|
|
27
|
+
* is that `undefined` means UNKNOWN and is never a mismatch. An absent
|
|
28
|
+
* declaration must not read as agreement, so the asymmetry is preserved
|
|
29
|
+
* here rather than re-derived.
|
|
30
|
+
* 2. **Contradictory assumptions** — Blueprint v2 §5.2 step 2: incompatible
|
|
31
|
+
* assumptions are NEVER POOLED. A derivation whose premises assume mutually
|
|
32
|
+
* exclusive conditions has no context union, therefore no composite.
|
|
33
|
+
*
|
|
34
|
+
* The result is a DISCRIMINATED UNION, mirroring `boundPath`'s no-claim
|
|
35
|
+
* (`./path-bound.ts`): a caller cannot read `.context` off a refusal, because
|
|
36
|
+
* a refusal has no `.context`. That is the whole point — the refusal is
|
|
37
|
+
* enforced by the type, so no caller can read a conclusion off a union that
|
|
38
|
+
* was never formed.
|
|
39
|
+
*
|
|
40
|
+
* Pure: no I/O, no registry reads.
|
|
41
|
+
*
|
|
42
|
+
* @module atlas/statement
|
|
43
|
+
*/
|
|
44
|
+
import type { Conventions } from './types.js';
|
|
45
|
+
import type { ModelId } from './model.js';
|
|
46
|
+
import type { ExprNode } from '../dimensional/ast-types.js';
|
|
47
|
+
/** A {@link Statement} id — `'statement-noether'`, … . @internal */
|
|
48
|
+
export type StatementId = string;
|
|
49
|
+
/**
|
|
50
|
+
* The context a claim is made in: what it quantifies over, which choices it
|
|
51
|
+
* fixes, and what it assumes.
|
|
52
|
+
*
|
|
53
|
+
* Every field but `assumptions` and `excludes` is optional, and the SAME
|
|
54
|
+
* asymmetry `checkConventions` documents applies to each: a context that
|
|
55
|
+
* declares no `gauge` has not chosen the Lorenz gauge, it has not said.
|
|
56
|
+
* Absence is unknown, never disagreement.
|
|
57
|
+
*
|
|
58
|
+
* `assumptions` and `excludes` are required (possibly empty) because they are
|
|
59
|
+
* the pair that decides poolability, and an optional one would let a caller
|
|
60
|
+
* omit the field that makes a refusal possible.
|
|
61
|
+
*
|
|
62
|
+
* @internal
|
|
63
|
+
*/
|
|
64
|
+
export interface Context {
|
|
65
|
+
/** Canonical quantity types the claim ranges over — `['energy', 'time']`. */
|
|
66
|
+
readonly quantityTypes?: readonly string[];
|
|
67
|
+
/** `'Lorenz'`, `'Coulomb'` — a fixed gauge choice, when the claim depends on one. */
|
|
68
|
+
readonly gauge?: string;
|
|
69
|
+
/** `'comoving'`, `'lab'` — a fixed frame choice, when the claim depends on one. */
|
|
70
|
+
readonly frame?: string;
|
|
71
|
+
/** Sign and unit choices. Compared by `checkConventions`. */
|
|
72
|
+
readonly conventions?: Conventions;
|
|
73
|
+
/** Stated assumptions — `'isolated system'`, `'weak field'`. */
|
|
74
|
+
readonly assumptions: readonly string[];
|
|
75
|
+
/**
|
|
76
|
+
* Assumption strings this context is INCOMPATIBLE with.
|
|
77
|
+
*
|
|
78
|
+
* Declared per context rather than inferred, because no rule in this repo
|
|
79
|
+
* can decide that `'weak field'` and `'strong field'` exclude each other
|
|
80
|
+
* from the strings alone. A guess here would manufacture refusals out of
|
|
81
|
+
* vocabulary rather than physics.
|
|
82
|
+
*
|
|
83
|
+
* Matching is exact string equality against another context's
|
|
84
|
+
* `assumptions`, and it is SYMMETRIC in effect: it is enough for one side
|
|
85
|
+
* to declare the exclusion.
|
|
86
|
+
*/
|
|
87
|
+
readonly excludes: readonly string[];
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* A claim in a context.
|
|
91
|
+
*
|
|
92
|
+
* @internal
|
|
93
|
+
*/
|
|
94
|
+
export interface Statement {
|
|
95
|
+
/** `'statement-noether'`, `'statement-l1-maxwell'`, … */
|
|
96
|
+
readonly id: StatementId;
|
|
97
|
+
/** The load-bearing field — see the module note. */
|
|
98
|
+
readonly context: Context;
|
|
99
|
+
readonly model: ModelId;
|
|
100
|
+
/** OPTIONAL BY DESIGN — see the module note. Absent ⇒ named-and-linked only. */
|
|
101
|
+
readonly ast?: ExprNode;
|
|
102
|
+
/** `'dS = 0'` — the source form, always present even when `ast` is not. */
|
|
103
|
+
readonly sourceExpression: string;
|
|
104
|
+
/** Rendered form for the poster index. */
|
|
105
|
+
readonly display: string;
|
|
106
|
+
}
|
|
107
|
+
/** Why a set of contexts has NO union. @internal */
|
|
108
|
+
export type NoUnionReason =
|
|
109
|
+
/** Two contexts DECLARE different values for a convention key. */
|
|
110
|
+
'convention-conflict'
|
|
111
|
+
/** One context excludes an assumption another one states. */
|
|
112
|
+
| 'contradictory-assumptions'
|
|
113
|
+
/** Two contexts DECLARE different gauges or frames. */
|
|
114
|
+
| 'choice-conflict';
|
|
115
|
+
/** The contexts DO pool, and this is the pooled context. @internal */
|
|
116
|
+
export interface ContextUnionFormed {
|
|
117
|
+
readonly kind: 'union';
|
|
118
|
+
readonly context: Context;
|
|
119
|
+
}
|
|
120
|
+
/** The contexts do NOT pool, and this is why. @internal */
|
|
121
|
+
export interface ContextUnionRefused {
|
|
122
|
+
readonly kind: 'no-union';
|
|
123
|
+
readonly reason: NoUnionReason;
|
|
124
|
+
/** Human-readable specifics: which key, which assumption. */
|
|
125
|
+
readonly detail: string;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* The result of {@link contextUnion}: a pooled context, or an explicit refusal.
|
|
129
|
+
*
|
|
130
|
+
* @internal
|
|
131
|
+
*/
|
|
132
|
+
export type ContextUnionResult = ContextUnionFormed | ContextUnionRefused;
|
|
133
|
+
/**
|
|
134
|
+
* The union of `contexts`, or an explicit refusal.
|
|
135
|
+
*
|
|
136
|
+
* Three gates, in this order; the FIRST refusal found is the one reported.
|
|
137
|
+
*
|
|
138
|
+
* 1. **Conventions.** Every PAIR is compared with `checkConventions`. Pairwise
|
|
139
|
+
* rather than folded, because folding would compare each context against a
|
|
140
|
+
* running merge and a merge has already lost which side declared what —
|
|
141
|
+
* the exact information the `undefined`-is-unknown rule needs.
|
|
142
|
+
* 2. **Assumptions.** A context's `excludes` entry matching any context's
|
|
143
|
+
* stated `assumption` refuses the pool. Blueprint v2 §5.2 step 2.
|
|
144
|
+
* 3. **Gauge / frame.** Two DECLARED and different values refuse; one declared
|
|
145
|
+
* and one absent does not, mirroring gate 1's asymmetry.
|
|
146
|
+
*
|
|
147
|
+
* An empty list has no union: a union over nothing would be a context
|
|
148
|
+
* asserted about no claim, the same reason `boundPath` throws on an empty
|
|
149
|
+
* path. It is a `RangeError`, not a refusal, because it is a caller bug rather
|
|
150
|
+
* than a physical incompatibility.
|
|
151
|
+
*
|
|
152
|
+
* @throws RangeError when `contexts` is empty.
|
|
153
|
+
* @internal
|
|
154
|
+
*/
|
|
155
|
+
export declare function contextUnion(contexts: readonly Context[]): ContextUnionResult;
|
|
156
|
+
/**
|
|
157
|
+
* The context union of a set of STATEMENTS, by id, resolved through `registry`.
|
|
158
|
+
*
|
|
159
|
+
* @throws RangeError if an id does not resolve. An unresolved id silently
|
|
160
|
+
* dropped would narrow the union and could turn a refusal into a pool —
|
|
161
|
+
* precisely the direction that manufactures a false claim.
|
|
162
|
+
* @internal
|
|
163
|
+
*/
|
|
164
|
+
export declare function statementContextUnion(ids: readonly StatementId[], registry: ReadonlyMap<StatementId, Statement>): ContextUnionResult;
|
|
165
|
+
//# sourceMappingURL=statement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"statement.d.ts","sourceRoot":"","sources":["../../src/atlas/statement.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAE5D,oEAAoE;AACpE,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAEjC;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,OAAO;IACtB,6EAA6E;IAC7E,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C,qFAAqF;IACrF,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,mFAAmF;IACnF,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,6DAA6D;IAC7D,QAAQ,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC;IACnC,gEAAgE;IAChE,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC;AAED;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,EAAE,WAAW,CAAC;IACzB,oDAAoD;IACpD,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,gFAAgF;IAChF,QAAQ,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC;IACxB,2EAA2E;IAC3E,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,0CAA0C;IAC1C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,oDAAoD;AACpD,MAAM,MAAM,aAAa;AACvB,kEAAkE;AAChE,qBAAqB;AACvB,6DAA6D;GAC3D,2BAA2B;AAC7B,uDAAuD;GACrD,iBAAiB,CAAC;AAEtB,sEAAsE;AACtE,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED,2DAA2D;AAC3D,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,6DAA6D;IAC7D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,kBAAkB,GAAG,mBAAmB,CAAC;AAe1E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,kBAAkB,CAwF7E;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,SAAS,WAAW,EAAE,EAC3B,QAAQ,EAAE,WAAW,CAAC,WAAW,EAAE,SAAS,CAAC,GAC5C,kBAAkB,CAUpB"}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Atlas Phase 3 — `Statement`, `Context`, and the CHECKED context union.
|
|
3
|
+
*
|
|
4
|
+
* A `Statement` is a claim IN A CONTEXT, not a string. Design note
|
|
5
|
+
* `docs/planning/Atlas-Phase-3-Design.md` §1: two statements that render
|
|
6
|
+
* identically can be claims about different things when their gauge, frame or
|
|
7
|
+
* assumption set differs, and the poster index will place exactly such pairs
|
|
8
|
+
* next to each other. `context` is therefore the reason this type exists at
|
|
9
|
+
* all rather than reusing `CanonicalEquation`.
|
|
10
|
+
*
|
|
11
|
+
* ## `ast?` is optional ON PURPOSE
|
|
12
|
+
*
|
|
13
|
+
* The poster's hidden supporting nodes — the action principle, Noether, the
|
|
14
|
+
* full Maxwell set, the Lorentz group, the central limit theorem — are
|
|
15
|
+
* valuable because they are NAMED and LINKED, not because they are evaluable.
|
|
16
|
+
* Requiring an `ast` would force either a fabricated encoding or their
|
|
17
|
+
* exclusion, and both are worse than an honest `sourceExpression` with no
|
|
18
|
+
* `ast` (design note §1). Do not make it required.
|
|
19
|
+
*
|
|
20
|
+
* ## The union is CHECKED, never computed
|
|
21
|
+
*
|
|
22
|
+
* {@link contextUnion} does not MERGE contexts. It asks whether a union
|
|
23
|
+
* EXISTS, and returns an explicit refusal when it does not. Two refusals
|
|
24
|
+
* matter, and neither is an error condition:
|
|
25
|
+
*
|
|
26
|
+
* 1. **Convention conflict** — delegated to `checkConventions`, whose contract
|
|
27
|
+
* is that `undefined` means UNKNOWN and is never a mismatch. An absent
|
|
28
|
+
* declaration must not read as agreement, so the asymmetry is preserved
|
|
29
|
+
* here rather than re-derived.
|
|
30
|
+
* 2. **Contradictory assumptions** — Blueprint v2 §5.2 step 2: incompatible
|
|
31
|
+
* assumptions are NEVER POOLED. A derivation whose premises assume mutually
|
|
32
|
+
* exclusive conditions has no context union, therefore no composite.
|
|
33
|
+
*
|
|
34
|
+
* The result is a DISCRIMINATED UNION, mirroring `boundPath`'s no-claim
|
|
35
|
+
* (`./path-bound.ts`): a caller cannot read `.context` off a refusal, because
|
|
36
|
+
* a refusal has no `.context`. That is the whole point — the refusal is
|
|
37
|
+
* enforced by the type, so no caller can read a conclusion off a union that
|
|
38
|
+
* was never formed.
|
|
39
|
+
*
|
|
40
|
+
* Pure: no I/O, no registry reads.
|
|
41
|
+
*
|
|
42
|
+
* @module atlas/statement
|
|
43
|
+
*/
|
|
44
|
+
import { checkConventions } from './conventions.js';
|
|
45
|
+
/** Distinct declared values of one optional choice field, across contexts. */
|
|
46
|
+
function declaredChoices(contexts, key) {
|
|
47
|
+
const seen = new Set();
|
|
48
|
+
for (const c of contexts) {
|
|
49
|
+
const v = c[key];
|
|
50
|
+
if (v !== undefined)
|
|
51
|
+
seen.add(v);
|
|
52
|
+
}
|
|
53
|
+
return [...seen];
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The union of `contexts`, or an explicit refusal.
|
|
57
|
+
*
|
|
58
|
+
* Three gates, in this order; the FIRST refusal found is the one reported.
|
|
59
|
+
*
|
|
60
|
+
* 1. **Conventions.** Every PAIR is compared with `checkConventions`. Pairwise
|
|
61
|
+
* rather than folded, because folding would compare each context against a
|
|
62
|
+
* running merge and a merge has already lost which side declared what —
|
|
63
|
+
* the exact information the `undefined`-is-unknown rule needs.
|
|
64
|
+
* 2. **Assumptions.** A context's `excludes` entry matching any context's
|
|
65
|
+
* stated `assumption` refuses the pool. Blueprint v2 §5.2 step 2.
|
|
66
|
+
* 3. **Gauge / frame.** Two DECLARED and different values refuse; one declared
|
|
67
|
+
* and one absent does not, mirroring gate 1's asymmetry.
|
|
68
|
+
*
|
|
69
|
+
* An empty list has no union: a union over nothing would be a context
|
|
70
|
+
* asserted about no claim, the same reason `boundPath` throws on an empty
|
|
71
|
+
* path. It is a `RangeError`, not a refusal, because it is a caller bug rather
|
|
72
|
+
* than a physical incompatibility.
|
|
73
|
+
*
|
|
74
|
+
* @throws RangeError when `contexts` is empty.
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
export function contextUnion(contexts) {
|
|
78
|
+
if (contexts.length === 0) {
|
|
79
|
+
throw new RangeError('contextUnion: no contexts; a union over nothing states nothing');
|
|
80
|
+
}
|
|
81
|
+
// ── Gate 1: no DECLARED convention pair may disagree ──────────────────────
|
|
82
|
+
for (let i = 0; i < contexts.length; i++) {
|
|
83
|
+
for (let j = i + 1; j < contexts.length; j++) {
|
|
84
|
+
const clash = checkConventions(contexts[i].conventions, contexts[j].conventions);
|
|
85
|
+
if (clash.length > 0) {
|
|
86
|
+
return {
|
|
87
|
+
kind: 'no-union',
|
|
88
|
+
reason: 'convention-conflict',
|
|
89
|
+
detail: `contexts ${i} and ${j} declare different values for ` +
|
|
90
|
+
`${clash.map((k) => `'${k}'`).join(', ')}; they do not pool`,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
// ── Gate 2: incompatible assumptions are NEVER pooled ─────────────────────
|
|
96
|
+
const stated = new Map();
|
|
97
|
+
for (let i = 0; i < contexts.length; i++) {
|
|
98
|
+
for (const a of contexts[i].assumptions) {
|
|
99
|
+
if (!stated.has(a))
|
|
100
|
+
stated.set(a, i);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
for (let i = 0; i < contexts.length; i++) {
|
|
104
|
+
for (const x of contexts[i].excludes) {
|
|
105
|
+
const at = stated.get(x);
|
|
106
|
+
if (at !== undefined) {
|
|
107
|
+
return {
|
|
108
|
+
kind: 'no-union',
|
|
109
|
+
reason: 'contradictory-assumptions',
|
|
110
|
+
detail: `context ${i} excludes '${x}', which context ${at} assumes; ` +
|
|
111
|
+
'incompatible assumptions are never pooled',
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
// ── Gate 3: a declared gauge or frame may not be contradicted ─────────────
|
|
117
|
+
for (const key of ['gauge', 'frame']) {
|
|
118
|
+
const values = declaredChoices(contexts, key);
|
|
119
|
+
if (values.length > 1) {
|
|
120
|
+
return {
|
|
121
|
+
kind: 'no-union',
|
|
122
|
+
reason: 'choice-conflict',
|
|
123
|
+
detail: `the contexts declare ${values.length} different ${key}s ` +
|
|
124
|
+
`(${values.map((v) => `'${v}'`).join(', ')}); they do not pool`,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
// ── The pool ──────────────────────────────────────────────────────────────
|
|
129
|
+
// Conventions merge by KEY rather than by object, so a context silent on a
|
|
130
|
+
// key inherits another's declaration instead of erasing it. Gate 1 has
|
|
131
|
+
// already proved no two declarations disagree, so the order of assignment
|
|
132
|
+
// cannot change the result.
|
|
133
|
+
const conventions = {};
|
|
134
|
+
for (const c of contexts) {
|
|
135
|
+
for (const [k, v] of Object.entries(c.conventions ?? {})) {
|
|
136
|
+
if (v !== undefined)
|
|
137
|
+
conventions[k] = v;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
const quantityTypes = [...new Set(contexts.flatMap((c) => c.quantityTypes ?? []))];
|
|
141
|
+
const gauge = declaredChoices(contexts, 'gauge')[0];
|
|
142
|
+
const frame = declaredChoices(contexts, 'frame')[0];
|
|
143
|
+
return {
|
|
144
|
+
kind: 'union',
|
|
145
|
+
context: {
|
|
146
|
+
...(quantityTypes.length > 0 ? { quantityTypes } : {}),
|
|
147
|
+
...(gauge !== undefined ? { gauge } : {}),
|
|
148
|
+
...(frame !== undefined ? { frame } : {}),
|
|
149
|
+
...(Object.keys(conventions).length > 0
|
|
150
|
+
? { conventions: conventions }
|
|
151
|
+
: {}),
|
|
152
|
+
assumptions: [...stated.keys()],
|
|
153
|
+
excludes: [...new Set(contexts.flatMap((c) => c.excludes))],
|
|
154
|
+
},
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* The context union of a set of STATEMENTS, by id, resolved through `registry`.
|
|
159
|
+
*
|
|
160
|
+
* @throws RangeError if an id does not resolve. An unresolved id silently
|
|
161
|
+
* dropped would narrow the union and could turn a refusal into a pool —
|
|
162
|
+
* precisely the direction that manufactures a false claim.
|
|
163
|
+
* @internal
|
|
164
|
+
*/
|
|
165
|
+
export function statementContextUnion(ids, registry) {
|
|
166
|
+
const contexts = [];
|
|
167
|
+
for (const id of ids) {
|
|
168
|
+
const s = registry.get(id);
|
|
169
|
+
if (s === undefined) {
|
|
170
|
+
throw new RangeError(`statementContextUnion: unknown statement '${id}'`);
|
|
171
|
+
}
|
|
172
|
+
contexts.push(s.context);
|
|
173
|
+
}
|
|
174
|
+
return contextUnion(contexts);
|
|
175
|
+
}
|
|
176
|
+
//# sourceMappingURL=statement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"statement.js","sourceRoot":"","sources":["../../src/atlas/statement.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAmGpD,8EAA8E;AAC9E,SAAS,eAAe,CACtB,QAA4B,EAC5B,GAAsB;IAEtB,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,MAAM,CAAC,IAAI,QAAQ,EAAE,CAAC;QACzB,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;QACjB,IAAI,CAAC,KAAK,SAAS;YAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC;IACD,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;AACnB,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,YAAY,CAAC,QAA4B;IACvD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,UAAU,CAAC,gEAAgE,CAAC,CAAC;IACzF,CAAC;IAED,6EAA6E;IAC7E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACzC,KAAK,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAC7C,MAAM,KAA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