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,160 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The nine oscillator models of design note §3.
|
|
3
|
+
*
|
|
4
|
+
* Each model's `regime` carries the π-groups `deriveRegimeGroups` produces
|
|
5
|
+
* from its own parameters and dimensionless inputs. `inequalities` is EMPTY
|
|
6
|
+
* on every model: Phase 0 states its inequalities on the BRIDGES (which carry
|
|
7
|
+
* the regime of validity), and the design note fixes no per-model inequality.
|
|
8
|
+
* An invented one would be a fabricated constraint, so none is written.
|
|
9
|
+
*
|
|
10
|
+
* The Phase 3 fields `boundaryData`, `initialData` and `symmetryGroup`
|
|
11
|
+
* (`../model.ts`) are ABSENT on all nine for the same reason `inequalities`
|
|
12
|
+
* is empty: no source records them for these ODE models, and an absent field
|
|
13
|
+
* says "not recorded" where a present empty one would claim "there are none".
|
|
14
|
+
*
|
|
15
|
+
* `canonicalRefs` are restricted to ids that exist in `CANONICAL_EQUATIONS`;
|
|
16
|
+
* `tests/atlas/models.test.ts` resolves every one of them.
|
|
17
|
+
*
|
|
18
|
+
* @module atlas/oscillators/models
|
|
19
|
+
*/
|
|
20
|
+
import { ACCELERATION, LENGTH, MASS, VELOCITY, } from '../../dimensional/types.js';
|
|
21
|
+
import { deriveRegimeGroups } from '../regime.js';
|
|
22
|
+
import { CAPACITANCE, CUBIC_STIFFNESS, DAMPING, INDUCTANCE, RESISTANCE, SPRING_CONSTANT, } from './dimensions.js';
|
|
23
|
+
const FAMILY = 'oscillators';
|
|
24
|
+
function model(spec) {
|
|
25
|
+
return {
|
|
26
|
+
...spec,
|
|
27
|
+
family: FAMILY,
|
|
28
|
+
regime: {
|
|
29
|
+
family: FAMILY,
|
|
30
|
+
inequalities: [],
|
|
31
|
+
groupDefinitions: deriveRegimeGroups(FAMILY, spec.parameters, spec.dimensionlessInputs),
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
/** The nine Phase 0 oscillator models, in design-note §3 order. @internal */
|
|
36
|
+
export const ATLAS_MODELS = [
|
|
37
|
+
model({
|
|
38
|
+
id: 'model-spring',
|
|
39
|
+
stateSpace: '(x, x′) ∈ ℝ²',
|
|
40
|
+
dynamics: 'm x″ + k x = 0',
|
|
41
|
+
observables: ['x', 'x′', 'energy'],
|
|
42
|
+
parameters: [
|
|
43
|
+
{ name: 'm', dim: MASS },
|
|
44
|
+
{ name: 'k', dim: SPRING_CONSTANT },
|
|
45
|
+
],
|
|
46
|
+
dimensionlessInputs: [],
|
|
47
|
+
canonicalRefs: [
|
|
48
|
+
'CE-simple-harmonic-frequency',
|
|
49
|
+
'CE-spring-potential-energy',
|
|
50
|
+
'CE-oscillator-energy',
|
|
51
|
+
],
|
|
52
|
+
}),
|
|
53
|
+
model({
|
|
54
|
+
id: 'model-lc',
|
|
55
|
+
stateSpace: '(q, q′) ∈ ℝ²',
|
|
56
|
+
dynamics: 'L q″ + q/C = 0',
|
|
57
|
+
observables: ['q', 'q′', 'energy'],
|
|
58
|
+
parameters: [
|
|
59
|
+
{ name: 'L', dim: INDUCTANCE },
|
|
60
|
+
{ name: 'C', dim: CAPACITANCE },
|
|
61
|
+
],
|
|
62
|
+
dimensionlessInputs: [],
|
|
63
|
+
canonicalRefs: ['CE-lc-resonance'],
|
|
64
|
+
}),
|
|
65
|
+
model({
|
|
66
|
+
id: 'model-damped-spring',
|
|
67
|
+
stateSpace: '(x, x′) ∈ ℝ²',
|
|
68
|
+
dynamics: 'm x″ + b x′ + k x = 0',
|
|
69
|
+
observables: ['x', 'x′'],
|
|
70
|
+
parameters: [
|
|
71
|
+
{ name: 'm', dim: MASS },
|
|
72
|
+
{ name: 'b', dim: DAMPING },
|
|
73
|
+
{ name: 'k', dim: SPRING_CONSTANT },
|
|
74
|
+
],
|
|
75
|
+
dimensionlessInputs: [],
|
|
76
|
+
canonicalRefs: [],
|
|
77
|
+
}),
|
|
78
|
+
model({
|
|
79
|
+
id: 'model-rlc',
|
|
80
|
+
stateSpace: '(q, q′) ∈ ℝ²',
|
|
81
|
+
dynamics: 'L q″ + R q′ + q/C = 0',
|
|
82
|
+
observables: ['q', 'q′'],
|
|
83
|
+
parameters: [
|
|
84
|
+
{ name: 'L', dim: INDUCTANCE },
|
|
85
|
+
{ name: 'R', dim: RESISTANCE },
|
|
86
|
+
{ name: 'C', dim: CAPACITANCE },
|
|
87
|
+
],
|
|
88
|
+
dimensionlessInputs: [],
|
|
89
|
+
canonicalRefs: [],
|
|
90
|
+
}),
|
|
91
|
+
model({
|
|
92
|
+
id: 'model-pendulum',
|
|
93
|
+
stateSpace: '(θ, θ′) ∈ S¹ × ℝ',
|
|
94
|
+
dynamics: 'θ″ + (g/ℓ) sin θ = 0',
|
|
95
|
+
observables: ['theta', 'theta′', 'period'],
|
|
96
|
+
parameters: [
|
|
97
|
+
{ name: 'g', dim: ACCELERATION },
|
|
98
|
+
{ name: 'ell', dim: LENGTH },
|
|
99
|
+
],
|
|
100
|
+
dimensionlessInputs: ['theta0'],
|
|
101
|
+
canonicalRefs: [],
|
|
102
|
+
}),
|
|
103
|
+
model({
|
|
104
|
+
id: 'model-chain',
|
|
105
|
+
stateSpace: '(u_n, u_n′) ∈ ℝ^N × ℝ^N',
|
|
106
|
+
dynamics: 'm u_n″ = κ(u_{n+1} − 2u_n + u_{n−1})',
|
|
107
|
+
observables: ['u_n', 'u_n′', 'dispersion'],
|
|
108
|
+
parameters: [
|
|
109
|
+
{ name: 'm', dim: MASS },
|
|
110
|
+
{ name: 'kappa', dim: SPRING_CONSTANT },
|
|
111
|
+
{ name: 'a', dim: LENGTH },
|
|
112
|
+
],
|
|
113
|
+
dimensionlessInputs: ['qa'],
|
|
114
|
+
canonicalRefs: [],
|
|
115
|
+
}),
|
|
116
|
+
model({
|
|
117
|
+
id: 'model-wave-1d',
|
|
118
|
+
stateSpace: 'u(x, t), a field on ℝ × ℝ',
|
|
119
|
+
dynamics: 'u_tt = c² u_xx',
|
|
120
|
+
observables: ['u', 'u_t', 'dispersion'],
|
|
121
|
+
parameters: [{ name: 'c', dim: VELOCITY }],
|
|
122
|
+
dimensionlessInputs: [],
|
|
123
|
+
canonicalRefs: ['CE-wave-speed'],
|
|
124
|
+
}),
|
|
125
|
+
model({
|
|
126
|
+
id: 'model-cubic-spring',
|
|
127
|
+
stateSpace: '(x, x′) ∈ ℝ²',
|
|
128
|
+
dynamics: 'm x″ + k x + β x³ = 0',
|
|
129
|
+
observables: ['x', 'x′', 'amplitude-dependent period'],
|
|
130
|
+
parameters: [
|
|
131
|
+
{ name: 'm', dim: MASS },
|
|
132
|
+
{ name: 'k', dim: SPRING_CONSTANT },
|
|
133
|
+
{ name: 'beta', dim: CUBIC_STIFFNESS },
|
|
134
|
+
{ name: 'x0', dim: LENGTH },
|
|
135
|
+
],
|
|
136
|
+
dimensionlessInputs: [],
|
|
137
|
+
canonicalRefs: [],
|
|
138
|
+
}),
|
|
139
|
+
model({
|
|
140
|
+
id: 'model-first-order',
|
|
141
|
+
stateSpace: 'x ∈ ℝ',
|
|
142
|
+
dynamics: 'b x′ + k x = 0',
|
|
143
|
+
observables: ['x'],
|
|
144
|
+
parameters: [
|
|
145
|
+
{ name: 'b', dim: DAMPING },
|
|
146
|
+
{ name: 'k', dim: SPRING_CONSTANT },
|
|
147
|
+
],
|
|
148
|
+
dimensionlessInputs: [],
|
|
149
|
+
canonicalRefs: [],
|
|
150
|
+
}),
|
|
151
|
+
];
|
|
152
|
+
const BY_ID = new Map(ATLAS_MODELS.map((m) => [m.id, m]));
|
|
153
|
+
/** Look up a model by id, throwing on an unknown one. @internal */
|
|
154
|
+
export function getAtlasModel(id) {
|
|
155
|
+
const found = BY_ID.get(id);
|
|
156
|
+
if (found === undefined)
|
|
157
|
+
throw new Error(`unknown atlas model id: ${id}`);
|
|
158
|
+
return found;
|
|
159
|
+
}
|
|
160
|
+
//# sourceMappingURL=models.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/atlas/oscillators/models.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EACL,YAAY,EACZ,MAAM,EACN,IAAI,EACJ,QAAQ,GACT,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAG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;QACJ,EAAE,EAAE,mBAAmB;QACvB,UAAU,EAAE,OAAO;QACnB,QAAQ,EAAE,gBAAgB;QAC1B,WAAW,EAAE,CAAC,GAAG,CAAC;QAClB,UAAU,EAAE;YACV,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE;YAC3B,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,eAAe,EAAE;SACpC;QACD,mBAAmB,EAAE,EAAE;QACvB,aAAa,EAAE,EAAE;KAClB,CAAC;CACH,CAAC;AAEF,MAAM,KAAK,GAAoC,IAAI,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAE3F,mEAAmE;AACnE,MAAM,UAAU,aAAa,CAAC,EAAU;IACtC,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC5B,IAAI,KAAK,KAAK,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,EAAE,EAAE,CAAC,CAAC;IAC1E,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Phase 0 REJECTION record: a claimed bridge the atlas records as refuted,
|
|
3
|
+
* together with the witness that refutes it.
|
|
4
|
+
*
|
|
5
|
+
* `ax-cubic-spring-lc` claims the cubic (Duffing-type) spring
|
|
6
|
+
* `m x″ + k x + β x³ = 0` is exactly equivalent to the LC circuit
|
|
7
|
+
* `L q″ + q/C = 0`. It is not. The cubic spring's variable set
|
|
8
|
+
* {m, k, β, x0} carries exactly ONE dimensionless group, `β x0² / k`, which
|
|
9
|
+
* measures the nonlinearity and has no counterpart on the LC side: the LC
|
|
10
|
+
* variable set is dimensionally independent and admits no group at all. A
|
|
11
|
+
* surviving group with no image cannot be matched by any change of variables,
|
|
12
|
+
* so no exact equivalence exists.
|
|
13
|
+
*
|
|
14
|
+
* @module atlas/oscillators/rejections
|
|
15
|
+
*/
|
|
16
|
+
import type { AtlasRejection } from '../types.js';
|
|
17
|
+
/** The rejected bridges of the oscillator pilot. @internal */
|
|
18
|
+
export declare const ATLAS_REJECTIONS: readonly AtlasRejection[];
|
|
19
|
+
/** Look up a rejection by id, throwing on an unknown one. @internal */
|
|
20
|
+
export declare function getAtlasRejection(id: string): AtlasRejection;
|
|
21
|
+
//# sourceMappingURL=rejections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rejections.d.ts","sourceRoot":"","sources":["../../../src/atlas/oscillators/rejections.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,8DAA8D;AAC9D,eAAO,MAAM,gBAAgB,EAAE,SAAS,cAAc,EA8BrD,CAAC;AAEF,uEAAuE;AACvE,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,cAAc,CAI5D"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Phase 0 REJECTION record: a claimed bridge the atlas records as refuted,
|
|
3
|
+
* together with the witness that refutes it.
|
|
4
|
+
*
|
|
5
|
+
* `ax-cubic-spring-lc` claims the cubic (Duffing-type) spring
|
|
6
|
+
* `m x″ + k x + β x³ = 0` is exactly equivalent to the LC circuit
|
|
7
|
+
* `L q″ + q/C = 0`. It is not. The cubic spring's variable set
|
|
8
|
+
* {m, k, β, x0} carries exactly ONE dimensionless group, `β x0² / k`, which
|
|
9
|
+
* measures the nonlinearity and has no counterpart on the LC side: the LC
|
|
10
|
+
* variable set is dimensionally independent and admits no group at all. A
|
|
11
|
+
* surviving group with no image cannot be matched by any change of variables,
|
|
12
|
+
* so no exact equivalence exists.
|
|
13
|
+
*
|
|
14
|
+
* @module atlas/oscillators/rejections
|
|
15
|
+
*/
|
|
16
|
+
/** The rejected bridges of the oscillator pilot. @internal */
|
|
17
|
+
export const ATLAS_REJECTIONS = [
|
|
18
|
+
{
|
|
19
|
+
id: 'ax-cubic-spring-lc',
|
|
20
|
+
claimed: 'exact-equivalence',
|
|
21
|
+
premises: ['model-cubic-spring'],
|
|
22
|
+
conclusion: 'model-lc',
|
|
23
|
+
reason: 'The cubic spring retains one dimensionless group, β x0² / k, that measures ' +
|
|
24
|
+
'its nonlinearity, and the LC variable set has none (W3). A surviving group ' +
|
|
25
|
+
'is necessary evidence, not sufficient. The decisive fact is isochrony: the ' +
|
|
26
|
+
'LC period is the same at every amplitude, the cubic spring period is not ' +
|
|
27
|
+
'(W3b), and a change of variables that rescales time by a constant multiplies ' +
|
|
28
|
+
'every period by the same factor. So no such change of variables makes the two ' +
|
|
29
|
+
'models exactly equivalent.',
|
|
30
|
+
survivingGroup: 'β x0² / k',
|
|
31
|
+
witnesses: [
|
|
32
|
+
{
|
|
33
|
+
id: 'W3',
|
|
34
|
+
kind: 'symbolic',
|
|
35
|
+
test: 'tests/atlas/oscillators-coarse.test.ts',
|
|
36
|
+
tolerance: 'exact integer π-group exponents; LC verdict dimensionally-independent',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: 'W3b',
|
|
40
|
+
kind: 'numeric',
|
|
41
|
+
test: 'tests/atlas/oscillators-coarse.test.ts',
|
|
42
|
+
tolerance: 'linear period 2π within 1e-6 at A = 0.5, 1, 2; cubic-spring periods spread by more than 10% at β x0²/k = 0.1',
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
/** Look up a rejection by id, throwing on an unknown one. @internal */
|
|
48
|
+
export function getAtlasRejection(id) {
|
|
49
|
+
const found = ATLAS_REJECTIONS.find((r) => r.id === id);
|
|
50
|
+
if (found === undefined)
|
|
51
|
+
throw new Error(`unknown atlas rejection id: ${id}`);
|
|
52
|
+
return found;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=rejections.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rejections.js","sourceRoot":"","sources":["../../../src/atlas/oscillators/rejections.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,8DAA8D;AAC9D,MAAM,CAAC,MAAM,gBAAgB,GAA8B;IACzD;QACE,EAAE,EAAE,oBAAoB;QACxB,OAAO,EAAE,mBAAmB;QAC5B,QAAQ,EAAE,CAAC,oBAAoB,CAAC;QAChC,UAAU,EAAE,UAAU;QACtB,MAAM,EACJ,6EAA6E;YAC7E,6EAA6E;YAC7E,6EAA6E;YAC7E,2EAA2E;YAC3E,+EAA+E;YAC/E,gFAAgF;YAChF,4BAA4B;QAC9B,cAAc,EAAE,WAAW;QAC3B,SAAS,EAAE;YACT;gBACE,EAAE,EAAE,IAAI;gBACR,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,wCAAwC;gBAC9C,SAAS,EAAE,uEAAuE;aACnF;YACD;gBACE,EAAE,EAAE,KAAK;gBACT,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,wCAAwC;gBAC9C,SAAS,EAAE,8GAA8G;aAC1H;SACF;KACF;CACF,CAAC;AAEF,uEAAuE;AACvE,MAAM,UAAU,iBAAiB,CAAC,EAAU;IAC1C,MAAM,KAAK,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IACxD,IAAI,KAAK,KAAK,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,+BAA+B,EAAE,EAAE,CAAC,CAAC;IAC9E,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Routes through an atlas family, and the error bound a route carries.
|
|
3
|
+
*
|
|
4
|
+
* Two functions, and the second is the one that can do damage:
|
|
5
|
+
*
|
|
6
|
+
* - {@link findPath} is pure graph search. It answers "is there a chain of
|
|
7
|
+
* bridges from A to B", and nothing more. A path existing says NOTHING about
|
|
8
|
+
* whether that path supports a claim.
|
|
9
|
+
* - {@link boundPath} answers "what error bound does this chain carry", and its
|
|
10
|
+
* default answer is NO BOUND. `docs/planning/Atlas-Phase-2-Design.md` §3:
|
|
11
|
+
*
|
|
12
|
+
* > A path containing any edge whose relation composes to
|
|
13
|
+
* > `'no-composite-claim'` has NO bound. It must return an explicit no-claim,
|
|
14
|
+
* > never a number. A composed number over an undefined composite would be
|
|
15
|
+
* > the most dangerous output this library could produce: precise-looking and
|
|
16
|
+
* > unfounded.
|
|
17
|
+
*
|
|
18
|
+
* So {@link boundPath} returns a DISCRIMINATED UNION, not a number. A caller
|
|
19
|
+
* cannot read `.bound` off a no-claim, because a no-claim has no `.bound` — the
|
|
20
|
+
* refusal is enforced by the type rather than by a documented convention.
|
|
21
|
+
*
|
|
22
|
+
* ## Norms — why an exact edge does not compose for free
|
|
23
|
+
*
|
|
24
|
+
* `./error-algebra.ts` states the rule this module obeys, and it is narrower
|
|
25
|
+
* than it first reads:
|
|
26
|
+
*
|
|
27
|
+
* > An exact equivalence contributes `IDENTITY_BOUND` **in the norms these
|
|
28
|
+
* > Phase 0 bridges state** — not in every norm.
|
|
29
|
+
*
|
|
30
|
+
* An `exact-equivalence` bridge carries no `bound`, hence states no `norm`. It
|
|
31
|
+
* therefore contributes `IDENTITY_BOUND` in NO norm, and a path that mixes it
|
|
32
|
+
* with a normed bound cannot claim the composite holds in that norm. That is a
|
|
33
|
+
* `'norm-not-stated'` no-claim. The composed NUMBER would be unchanged —
|
|
34
|
+
* composing with the identity is arithmetically a no-op — which is exactly what
|
|
35
|
+
* makes the error invisible without this gate: the danger is not a wrong
|
|
36
|
+
* magnitude, it is a right magnitude attached to the wrong norm.
|
|
37
|
+
*
|
|
38
|
+
* ⚠ **Correction to the S2.2 brief.** The brief states that no field records a
|
|
39
|
+
* norm and that Phase 2 must add `norm?` to `ApproximationBound`. That is
|
|
40
|
+
* out of date: `ApproximationBound.norm` already exists as a MANDATORY
|
|
41
|
+
* `string` (Phase 0, `./types.ts`). No type change was needed, and this module
|
|
42
|
+
* reads the field that is already there.
|
|
43
|
+
*
|
|
44
|
+
* **Uniformity is gated here, at use.** `ApproximationBound.uniformity` may
|
|
45
|
+
* be `null` (or empty — the same state) so a real bound can be recorded
|
|
46
|
+
* before anyone has analysed what the error is uniform in. Composing such a
|
|
47
|
+
* bound would attach a number to an unanalysed claim, so {@link boundPath}
|
|
48
|
+
* returns `'uniformity-unanalysed'` and does not compute one.
|
|
49
|
+
* `propagateUncertainty` does not read the field and does not fold `delta`
|
|
50
|
+
* into `sigma`: it stays a statistical-sigma function.
|
|
51
|
+
*
|
|
52
|
+
* Pure: no I/O, no registry reads.
|
|
53
|
+
*
|
|
54
|
+
* @module atlas/path-bound
|
|
55
|
+
*/
|
|
56
|
+
import { IDENTITY_BOUND } from './error-algebra.js';
|
|
57
|
+
import type { BoundPair } from './error-algebra.js';
|
|
58
|
+
import type { AtlasBridge, RelationType } from './types.js';
|
|
59
|
+
/**
|
|
60
|
+
* Shortest chain of bridges from `from` to `to`, or `null` if none exists.
|
|
61
|
+
*
|
|
62
|
+
* Breadth-first, so the result is a shortest path by edge count. Ties are
|
|
63
|
+
* broken by `family.bridges` order, which is the design note's order and is
|
|
64
|
+
* therefore stable across runs.
|
|
65
|
+
*
|
|
66
|
+
* A returned path is a ROUTE, not a warrant: ask {@link boundPath} what the
|
|
67
|
+
* route supports.
|
|
68
|
+
*
|
|
69
|
+
* @throws RangeError if `family` is not a known family, or an endpoint is not
|
|
70
|
+
* one of its models. An unknown endpoint returning `null` would be
|
|
71
|
+
* indistinguishable from a genuinely disconnected pair.
|
|
72
|
+
* @internal
|
|
73
|
+
*/
|
|
74
|
+
export declare function findPath(family: string, from: string, to: string): readonly AtlasBridge[] | null;
|
|
75
|
+
/** Why a path supports no bound. @internal */
|
|
76
|
+
export type NoClaimReason =
|
|
77
|
+
/** The relations along the path do not compose to a relation at all. */
|
|
78
|
+
'no-composite-claim'
|
|
79
|
+
/** An edge on the path states no norm, so the composite holds in none. */
|
|
80
|
+
| 'norm-not-stated'
|
|
81
|
+
/** Two edges state DIFFERENT norms; composing across norms is unsound. */
|
|
82
|
+
| 'norm-mismatch'
|
|
83
|
+
/**
|
|
84
|
+
* A bound on the path has `uniformity === null` or an empty list: what the
|
|
85
|
+
* error is uniform in has not been analysed, so no number is stated.
|
|
86
|
+
*/
|
|
87
|
+
| 'uniformity-unanalysed';
|
|
88
|
+
/** A path that DOES carry a bound. @internal */
|
|
89
|
+
export interface PathBoundClaim {
|
|
90
|
+
readonly kind: 'bound';
|
|
91
|
+
readonly bound: BoundPair;
|
|
92
|
+
/** True when the path ended on a step with no Lipschitz constant. */
|
|
93
|
+
readonly terminal: boolean;
|
|
94
|
+
/** The relation the chain asserts, from {@link composeRelation}. */
|
|
95
|
+
readonly relation: RelationType;
|
|
96
|
+
/**
|
|
97
|
+
* The single norm every bound on the path states, or `null` when the path
|
|
98
|
+
* carries no bound at all and the claim is the vacuous `terminal` identity
|
|
99
|
+
* over an empty prefix.
|
|
100
|
+
*/
|
|
101
|
+
readonly norm: string | null;
|
|
102
|
+
}
|
|
103
|
+
/** A path that carries NO bound, and the reason. @internal */
|
|
104
|
+
export interface PathNoClaim {
|
|
105
|
+
readonly kind: 'no-claim';
|
|
106
|
+
readonly reason: NoClaimReason;
|
|
107
|
+
/** Human-readable specifics: which edge, which norms. */
|
|
108
|
+
readonly detail: string;
|
|
109
|
+
}
|
|
110
|
+
/** The result of {@link boundPath}: a bound, or an explicit refusal. @internal */
|
|
111
|
+
export type PathBoundResult = PathBoundClaim | PathNoClaim;
|
|
112
|
+
/**
|
|
113
|
+
* The error bound a chain of bridges carries — or an explicit no-claim.
|
|
114
|
+
*
|
|
115
|
+
* Four gates, in this order. Each one is a reason to refuse, and the FIRST
|
|
116
|
+
* reason found is the one reported; none of them is skippable by a caller.
|
|
117
|
+
*
|
|
118
|
+
* 1. **Relation.** `composeRelation` is folded along the path. The moment the
|
|
119
|
+
* running composite is `'no-composite-claim'`, the path has no bound. This
|
|
120
|
+
* is design note §3 constraint 1 and it is checked before any arithmetic,
|
|
121
|
+
* so no number is ever computed for a path that cannot carry one.
|
|
122
|
+
* 2. **Uniformity.** Any bound whose `uniformity` is `null` or empty is not
|
|
123
|
+
* yet analysed. The path returns `'uniformity-unanalysed'` and no Lipschitz
|
|
124
|
+
* arithmetic runs. An edge with no `bound` — an exact equivalence, or an
|
|
125
|
+
* unbounded coarse-graining — does not fail this gate.
|
|
126
|
+
* 3. **Lipschitz.** `composeBoundPath` folds the per-edge pairs. A `null` — an
|
|
127
|
+
* edge that is neither bounded nor exact — is tolerated only as the LAST
|
|
128
|
+
* entry, where it terminates the claim (`terminal: true`); anywhere else it
|
|
129
|
+
* throws `MissingLipschitzError` rather than inventing a constant.
|
|
130
|
+
* 4. **Norm.** Every stated norm on the path must be the SAME norm, and no
|
|
131
|
+
* unnormed exact map may carry a normed claim. An `exact-equivalence`
|
|
132
|
+
* states no norm (it has no `bound`), so a path mixing one with a normed
|
|
133
|
+
* bound is `'norm-not-stated'` — see the module note.
|
|
134
|
+
*
|
|
135
|
+
* @throws RangeError on an empty path. Returning `IDENTITY_BOUND` for "no
|
|
136
|
+
* edges" would be a bound asserted about nothing.
|
|
137
|
+
* @throws MissingLipschitzError via {@link composeBoundPath}; see gate 3.
|
|
138
|
+
* @internal
|
|
139
|
+
*/
|
|
140
|
+
export declare function boundPath(bridges: readonly AtlasBridge[]): PathBoundResult;
|
|
141
|
+
/** Re-exported so a caller need not reach into the algebra module. @internal */
|
|
142
|
+
export { IDENTITY_BOUND };
|
|
143
|
+
//# sourceMappingURL=path-bound.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-bound.d.ts","sourceRoot":"","sources":["../../src/atlas/path-bound.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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gFAAgF;AAChF,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Routes through an atlas family, and the error bound a route carries.
|
|
3
|
+
*
|
|
4
|
+
* Two functions, and the second is the one that can do damage:
|
|
5
|
+
*
|
|
6
|
+
* - {@link findPath} is pure graph search. It answers "is there a chain of
|
|
7
|
+
* bridges from A to B", and nothing more. A path existing says NOTHING about
|
|
8
|
+
* whether that path supports a claim.
|
|
9
|
+
* - {@link boundPath} answers "what error bound does this chain carry", and its
|
|
10
|
+
* default answer is NO BOUND. `docs/planning/Atlas-Phase-2-Design.md` §3:
|
|
11
|
+
*
|
|
12
|
+
* > A path containing any edge whose relation composes to
|
|
13
|
+
* > `'no-composite-claim'` has NO bound. It must return an explicit no-claim,
|
|
14
|
+
* > never a number. A composed number over an undefined composite would be
|
|
15
|
+
* > the most dangerous output this library could produce: precise-looking and
|
|
16
|
+
* > unfounded.
|
|
17
|
+
*
|
|
18
|
+
* So {@link boundPath} returns a DISCRIMINATED UNION, not a number. A caller
|
|
19
|
+
* cannot read `.bound` off a no-claim, because a no-claim has no `.bound` — the
|
|
20
|
+
* refusal is enforced by the type rather than by a documented convention.
|
|
21
|
+
*
|
|
22
|
+
* ## Norms — why an exact edge does not compose for free
|
|
23
|
+
*
|
|
24
|
+
* `./error-algebra.ts` states the rule this module obeys, and it is narrower
|
|
25
|
+
* than it first reads:
|
|
26
|
+
*
|
|
27
|
+
* > An exact equivalence contributes `IDENTITY_BOUND` **in the norms these
|
|
28
|
+
* > Phase 0 bridges state** — not in every norm.
|
|
29
|
+
*
|
|
30
|
+
* An `exact-equivalence` bridge carries no `bound`, hence states no `norm`. It
|
|
31
|
+
* therefore contributes `IDENTITY_BOUND` in NO norm, and a path that mixes it
|
|
32
|
+
* with a normed bound cannot claim the composite holds in that norm. That is a
|
|
33
|
+
* `'norm-not-stated'` no-claim. The composed NUMBER would be unchanged —
|
|
34
|
+
* composing with the identity is arithmetically a no-op — which is exactly what
|
|
35
|
+
* makes the error invisible without this gate: the danger is not a wrong
|
|
36
|
+
* magnitude, it is a right magnitude attached to the wrong norm.
|
|
37
|
+
*
|
|
38
|
+
* ⚠ **Correction to the S2.2 brief.** The brief states that no field records a
|
|
39
|
+
* norm and that Phase 2 must add `norm?` to `ApproximationBound`. That is
|
|
40
|
+
* out of date: `ApproximationBound.norm` already exists as a MANDATORY
|
|
41
|
+
* `string` (Phase 0, `./types.ts`). No type change was needed, and this module
|
|
42
|
+
* reads the field that is already there.
|
|
43
|
+
*
|
|
44
|
+
* **Uniformity is gated here, at use.** `ApproximationBound.uniformity` may
|
|
45
|
+
* be `null` (or empty — the same state) so a real bound can be recorded
|
|
46
|
+
* before anyone has analysed what the error is uniform in. Composing such a
|
|
47
|
+
* bound would attach a number to an unanalysed claim, so {@link boundPath}
|
|
48
|
+
* returns `'uniformity-unanalysed'` and does not compute one.
|
|
49
|
+
* `propagateUncertainty` does not read the field and does not fold `delta`
|
|
50
|
+
* into `sigma`: it stays a statistical-sigma function.
|
|
51
|
+
*
|
|
52
|
+
* Pure: no I/O, no registry reads.
|
|
53
|
+
*
|
|
54
|
+
* @module atlas/path-bound
|
|
55
|
+
*/
|
|
56
|
+
import { composeBoundPath, IDENTITY_BOUND } from './error-algebra.js';
|
|
57
|
+
import { composeRelation, NO_COMPOSITE_CLAIM } from './composition-table.js';
|
|
58
|
+
import { ATLAS_FAMILIES } from './families.js';
|
|
59
|
+
/**
|
|
60
|
+
* Families {@link findPath} can search: every registered family. This was the
|
|
61
|
+
* oscillator family alone, which made the diffusion and wave families
|
|
62
|
+
* unsearchable once they existed. A route stays INSIDE one family: a bridge
|
|
63
|
+
* that ends in another family's model is not followed across (stated, not
|
|
64
|
+
* hidden — cross-family routes are out of this function's scope).
|
|
65
|
+
*
|
|
66
|
+
* @internal
|
|
67
|
+
*/
|
|
68
|
+
const FAMILIES = Object.fromEntries(ATLAS_FAMILIES.map((f) => [f.family, f]));
|
|
69
|
+
/** Expand a family's bridges into directed edges. Single-premise chains only. */
|
|
70
|
+
function directedEdges(family) {
|
|
71
|
+
const edges = [];
|
|
72
|
+
for (const bridge of family.bridges) {
|
|
73
|
+
// Sprint 2 scope: a multi-premise bridge is a JOIN, not a link in a chain,
|
|
74
|
+
// and is skipped rather than silently reduced to its first premise.
|
|
75
|
+
if (bridge.premises.length !== 1)
|
|
76
|
+
continue;
|
|
77
|
+
const from = bridge.premises[0];
|
|
78
|
+
edges.push({ from, to: bridge.conclusion, bridge });
|
|
79
|
+
if (bridge.relation === 'exact-equivalence') {
|
|
80
|
+
edges.push({ from: bridge.conclusion, to: from, bridge });
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return edges;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Shortest chain of bridges from `from` to `to`, or `null` if none exists.
|
|
87
|
+
*
|
|
88
|
+
* Breadth-first, so the result is a shortest path by edge count. Ties are
|
|
89
|
+
* broken by `family.bridges` order, which is the design note's order and is
|
|
90
|
+
* therefore stable across runs.
|
|
91
|
+
*
|
|
92
|
+
* A returned path is a ROUTE, not a warrant: ask {@link boundPath} what the
|
|
93
|
+
* route supports.
|
|
94
|
+
*
|
|
95
|
+
* @throws RangeError if `family` is not a known family, or an endpoint is not
|
|
96
|
+
* one of its models. An unknown endpoint returning `null` would be
|
|
97
|
+
* indistinguishable from a genuinely disconnected pair.
|
|
98
|
+
* @internal
|
|
99
|
+
*/
|
|
100
|
+
export function findPath(family, from, to) {
|
|
101
|
+
const fam = FAMILIES[family];
|
|
102
|
+
if (fam === undefined) {
|
|
103
|
+
throw new RangeError(`findPath: unknown family '${family}'`);
|
|
104
|
+
}
|
|
105
|
+
const models = new Set(fam.models.map((m) => m.id));
|
|
106
|
+
for (const endpoint of [from, to]) {
|
|
107
|
+
if (!models.has(endpoint)) {
|
|
108
|
+
throw new RangeError(`findPath: '${endpoint}' is not a model of family '${family}'`);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
if (from === to)
|
|
112
|
+
return [];
|
|
113
|
+
const outgoing = new Map();
|
|
114
|
+
for (const edge of directedEdges(fam)) {
|
|
115
|
+
const bucket = outgoing.get(edge.from);
|
|
116
|
+
if (bucket === undefined)
|
|
117
|
+
outgoing.set(edge.from, [edge]);
|
|
118
|
+
else
|
|
119
|
+
bucket.push(edge);
|
|
120
|
+
}
|
|
121
|
+
const cameBy = new Map();
|
|
122
|
+
const seen = new Set([from]);
|
|
123
|
+
const queue = [from];
|
|
124
|
+
while (queue.length > 0) {
|
|
125
|
+
const node = queue.shift();
|
|
126
|
+
for (const edge of outgoing.get(node) ?? []) {
|
|
127
|
+
if (seen.has(edge.to))
|
|
128
|
+
continue;
|
|
129
|
+
seen.add(edge.to);
|
|
130
|
+
cameBy.set(edge.to, edge);
|
|
131
|
+
if (edge.to === to) {
|
|
132
|
+
const path = [];
|
|
133
|
+
for (let at = to; at !== from;) {
|
|
134
|
+
const step = cameBy.get(at);
|
|
135
|
+
path.unshift(step.bridge);
|
|
136
|
+
at = step.from;
|
|
137
|
+
}
|
|
138
|
+
return path;
|
|
139
|
+
}
|
|
140
|
+
queue.push(edge.to);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
return null;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* The error bound a chain of bridges carries — or an explicit no-claim.
|
|
147
|
+
*
|
|
148
|
+
* Four gates, in this order. Each one is a reason to refuse, and the FIRST
|
|
149
|
+
* reason found is the one reported; none of them is skippable by a caller.
|
|
150
|
+
*
|
|
151
|
+
* 1. **Relation.** `composeRelation` is folded along the path. The moment the
|
|
152
|
+
* running composite is `'no-composite-claim'`, the path has no bound. This
|
|
153
|
+
* is design note §3 constraint 1 and it is checked before any arithmetic,
|
|
154
|
+
* so no number is ever computed for a path that cannot carry one.
|
|
155
|
+
* 2. **Uniformity.** Any bound whose `uniformity` is `null` or empty is not
|
|
156
|
+
* yet analysed. The path returns `'uniformity-unanalysed'` and no Lipschitz
|
|
157
|
+
* arithmetic runs. An edge with no `bound` — an exact equivalence, or an
|
|
158
|
+
* unbounded coarse-graining — does not fail this gate.
|
|
159
|
+
* 3. **Lipschitz.** `composeBoundPath` folds the per-edge pairs. A `null` — an
|
|
160
|
+
* edge that is neither bounded nor exact — is tolerated only as the LAST
|
|
161
|
+
* entry, where it terminates the claim (`terminal: true`); anywhere else it
|
|
162
|
+
* throws `MissingLipschitzError` rather than inventing a constant.
|
|
163
|
+
* 4. **Norm.** Every stated norm on the path must be the SAME norm, and no
|
|
164
|
+
* unnormed exact map may carry a normed claim. An `exact-equivalence`
|
|
165
|
+
* states no norm (it has no `bound`), so a path mixing one with a normed
|
|
166
|
+
* bound is `'norm-not-stated'` — see the module note.
|
|
167
|
+
*
|
|
168
|
+
* @throws RangeError on an empty path. Returning `IDENTITY_BOUND` for "no
|
|
169
|
+
* edges" would be a bound asserted about nothing.
|
|
170
|
+
* @throws MissingLipschitzError via {@link composeBoundPath}; see gate 3.
|
|
171
|
+
* @internal
|
|
172
|
+
*/
|
|
173
|
+
export function boundPath(bridges) {
|
|
174
|
+
if (bridges.length === 0) {
|
|
175
|
+
throw new RangeError('boundPath: an empty path composes nothing; there is no bound to state');
|
|
176
|
+
}
|
|
177
|
+
// ── Gate 1: the relation must compose all the way along ───────────────────
|
|
178
|
+
let relation = bridges[0].relation;
|
|
179
|
+
for (let i = 1; i < bridges.length; i++) {
|
|
180
|
+
const next = bridges[i];
|
|
181
|
+
// The loop RETURNS on the first silent cell, so `relation` is always a
|
|
182
|
+
// real `RelationType` here — no re-check is needed, and TypeScript proves
|
|
183
|
+
// it (a guard here is flagged as having no overlap).
|
|
184
|
+
relation = composeRelation(relation, next.relation);
|
|
185
|
+
if (relation === NO_COMPOSITE_CLAIM) {
|
|
186
|
+
return {
|
|
187
|
+
kind: 'no-claim',
|
|
188
|
+
reason: NO_COMPOSITE_CLAIM,
|
|
189
|
+
detail: `'${bridges[i - 1].id}' (${bridges[i - 1].relation}) then '${next.id}' ` +
|
|
190
|
+
`(${next.relation}) composes to no relation, so the path carries no bound`,
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
// ── Gate 2: an unanalysed uniformity yields no number ─────────────────────
|
|
195
|
+
// Before any Lipschitz arithmetic. `null` and `[]` are the same state: an
|
|
196
|
+
// empty list is a universal over nothing, and counting it as analysed is
|
|
197
|
+
// the convention-checked empty-object defect. An edge with no bound states
|
|
198
|
+
// no error, so it does not fail this gate.
|
|
199
|
+
for (const bridge of bridges) {
|
|
200
|
+
if (bridge.bound === undefined)
|
|
201
|
+
continue;
|
|
202
|
+
const uniformity = bridge.bound.uniformity;
|
|
203
|
+
if (uniformity === null || uniformity.length === 0) {
|
|
204
|
+
const how = uniformity === null ? 'null' : 'empty';
|
|
205
|
+
return {
|
|
206
|
+
kind: 'no-claim',
|
|
207
|
+
reason: 'uniformity-unanalysed',
|
|
208
|
+
detail: `'${bridge.id}' has uniformity ${how} (not yet analysed), so the path carries no numeric bound`,
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
// ── Collect the per-edge pairs the remaining gates read ───────────────────
|
|
213
|
+
// What each edge contributes. The split that matters: an `exact-equivalence`
|
|
214
|
+
// with no `bound` is EXACT — it contributes `IDENTITY_BOUND`, not an unknown
|
|
215
|
+
// constant. Any OTHER relation with no bound has an unknown Lipschitz
|
|
216
|
+
// constant, and `null` is what says so. Conflating the two would either
|
|
217
|
+
// invent a constant for a lossy map or throw on an exact one.
|
|
218
|
+
const pairs = [];
|
|
219
|
+
const norms = new Set();
|
|
220
|
+
const unnormedIdentities = [];
|
|
221
|
+
for (const bridge of bridges) {
|
|
222
|
+
if (bridge.bound !== undefined) {
|
|
223
|
+
pairs.push({ K: bridge.bound.K, delta: bridge.bound.delta });
|
|
224
|
+
norms.add(bridge.bound.norm);
|
|
225
|
+
}
|
|
226
|
+
else if (bridge.relation === 'exact-equivalence') {
|
|
227
|
+
pairs.push(IDENTITY_BOUND);
|
|
228
|
+
unnormedIdentities.push(bridge.id);
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
pairs.push(null);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
// ── Gate 3: an unknown Lipschitz constant, anywhere but last, is fatal ────
|
|
235
|
+
// Delegated to `composeBoundPath`, which throws `MissingLipschitzError`
|
|
236
|
+
// rather than inventing a constant. Run BEFORE the norm gate: an unbounded
|
|
237
|
+
// composite is a harder failure than an unstatable norm, and reporting the
|
|
238
|
+
// softer one would mask it.
|
|
239
|
+
const composed = composeBoundPath(pairs);
|
|
240
|
+
// ── Gate 4: one norm, and no unnormed map carrying a normed claim ─────────
|
|
241
|
+
if (norms.size > 1) {
|
|
242
|
+
return {
|
|
243
|
+
kind: 'no-claim',
|
|
244
|
+
reason: 'norm-mismatch',
|
|
245
|
+
detail: `the path states ${norms.size} different norms (${[...norms].map((n) => `'${n}'`).join(', ')}); ` +
|
|
246
|
+
'bounds in different norms do not compose',
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
if (unnormedIdentities.length > 0 && norms.size > 0) {
|
|
250
|
+
return {
|
|
251
|
+
kind: 'no-claim',
|
|
252
|
+
reason: 'norm-not-stated',
|
|
253
|
+
detail: `${unnormedIdentities.map((id) => `'${id}'`).join(', ')} state no norm, so they ` +
|
|
254
|
+
`contribute IDENTITY_BOUND in no norm; the composite cannot be claimed in ` +
|
|
255
|
+
`'${[...norms][0]}'`,
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
return {
|
|
259
|
+
kind: 'bound',
|
|
260
|
+
bound: composed.bound,
|
|
261
|
+
terminal: composed.terminal,
|
|
262
|
+
relation,
|
|
263
|
+
norm: [...norms][0] ?? null,
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
/** Re-exported so a caller need not reach into the algebra module. @internal */
|
|
267
|
+
export { IDENTITY_BOUND };
|
|
268
|
+
//# sourceMappingURL=path-bound.js.map
|