universal-physics-tensor 9.0.0 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -16
- package/data/atlas/atlas.json +55 -44
- package/data/atlas/atlas.jsonld +1 -1
- package/data/atlas/diffusion.json +19 -18
- package/data/atlas/oscillators.json +15 -10
- package/data/atlas/waves.json +23 -18
- package/data/bridge-catalog.json +886 -1473
- package/data/bridge-catalog.schema.json +349 -132
- package/data/quantities.json +53 -19
- package/data/schemas/atlas-record.v0.json +184 -46
- package/data/units.json +33 -4
- package/dist/atlas/applicability.d.ts.map +1 -1
- package/dist/atlas/applicability.js +14 -3
- package/dist/atlas/applicability.js.map +1 -1
- package/dist/atlas/association.js.map +1 -1
- package/dist/atlas/benchmark/backend-shapes.d.ts.map +1 -1
- package/dist/atlas/benchmark/backend-shapes.js +5 -1
- package/dist/atlas/benchmark/backend-shapes.js.map +1 -1
- package/dist/atlas/benchmark/baselines.d.ts.map +1 -1
- package/dist/atlas/benchmark/baselines.js +8 -0
- package/dist/atlas/benchmark/baselines.js.map +1 -1
- package/dist/atlas/benchmark/hybrid-retrieval.d.ts +3 -2
- package/dist/atlas/benchmark/hybrid-retrieval.d.ts.map +1 -1
- package/dist/atlas/benchmark/hybrid-retrieval.js +15 -8
- package/dist/atlas/benchmark/hybrid-retrieval.js.map +1 -1
- package/dist/atlas/benchmark/leakage.js.map +1 -1
- package/dist/atlas/benchmark/loader.js.map +1 -1
- package/dist/atlas/benchmark/run-atlas.d.ts.map +1 -1
- package/dist/atlas/benchmark/run-atlas.js +14 -2
- package/dist/atlas/benchmark/run-atlas.js.map +1 -1
- package/dist/atlas/benchmark/stats.d.ts +1 -1
- package/dist/atlas/benchmark/stats.d.ts.map +1 -1
- package/dist/atlas/benchmark/stats.js +1 -1
- package/dist/atlas/benchmark/stats.js.map +1 -1
- package/dist/atlas/benchmark/study.js.map +1 -1
- package/dist/atlas/benchmark/types.js.map +1 -1
- package/dist/atlas/bridge-record.d.ts +4 -4
- package/dist/atlas/bridge-record.d.ts.map +1 -1
- package/dist/atlas/bridge-record.js +6 -6
- package/dist/atlas/bridge-record.js.map +1 -1
- package/dist/atlas/catalog-formal-ref.js.map +1 -1
- package/dist/atlas/chain-pipeline.d.ts +0 -11
- package/dist/atlas/chain-pipeline.d.ts.map +1 -1
- package/dist/atlas/chain-pipeline.js +5 -16
- package/dist/atlas/chain-pipeline.js.map +1 -1
- package/dist/atlas/composition-table.js.map +1 -1
- package/dist/atlas/conventions.js.map +1 -1
- package/dist/atlas/coverage.d.ts +2 -2
- package/dist/atlas/coverage.js.map +1 -1
- package/dist/atlas/derivation.js.map +1 -1
- package/dist/atlas/derive-evidence.d.ts +6 -4
- package/dist/atlas/derive-evidence.d.ts.map +1 -1
- package/dist/atlas/derive-evidence.js +7 -2
- package/dist/atlas/derive-evidence.js.map +1 -1
- package/dist/atlas/diffusion/bridges-closure.d.ts.map +1 -1
- package/dist/atlas/diffusion/bridges-closure.js +0 -5
- package/dist/atlas/diffusion/bridges-closure.js.map +1 -1
- package/dist/atlas/diffusion/bridges.d.ts.map +1 -1
- package/dist/atlas/diffusion/bridges.js +0 -3
- package/dist/atlas/diffusion/bridges.js.map +1 -1
- package/dist/atlas/diffusion/dimensions.js.map +1 -1
- package/dist/atlas/diffusion/index.d.ts +1 -1
- package/dist/atlas/diffusion/index.d.ts.map +1 -1
- package/dist/atlas/diffusion/index.js.map +1 -1
- package/dist/atlas/diffusion/models.js.map +1 -1
- package/dist/atlas/diffusion/numerics.js.map +1 -1
- package/dist/atlas/error-algebra.d.ts +6 -0
- package/dist/atlas/error-algebra.d.ts.map +1 -1
- package/dist/atlas/error-algebra.js +26 -0
- package/dist/atlas/error-algebra.js.map +1 -1
- package/dist/atlas/export.d.ts +18 -2
- package/dist/atlas/export.d.ts.map +1 -1
- package/dist/atlas/export.js +9 -3
- package/dist/atlas/export.js.map +1 -1
- package/dist/atlas/families.d.ts +19 -2
- package/dist/atlas/families.d.ts.map +1 -1
- package/dist/atlas/families.js +26 -3
- package/dist/atlas/families.js.map +1 -1
- package/dist/atlas/family.d.ts +27 -0
- package/dist/atlas/family.d.ts.map +1 -0
- package/dist/atlas/family.js +12 -0
- package/dist/atlas/family.js.map +1 -0
- package/dist/atlas/index.d.ts +3 -2
- package/dist/atlas/index.d.ts.map +1 -1
- package/dist/atlas/index.js +2 -1
- package/dist/atlas/index.js.map +1 -1
- package/dist/atlas/link-prediction.d.ts +1 -1
- package/dist/atlas/link-prediction.d.ts.map +1 -1
- package/dist/atlas/link-prediction.js.map +1 -1
- package/dist/atlas/model.js.map +1 -1
- package/dist/atlas/oscillators/bridges-coarse.d.ts.map +1 -1
- package/dist/atlas/oscillators/bridges-coarse.js +0 -1
- package/dist/atlas/oscillators/bridges-coarse.js.map +1 -1
- package/dist/atlas/oscillators/bridges-exact.d.ts.map +1 -1
- package/dist/atlas/oscillators/bridges-exact.js +0 -3
- package/dist/atlas/oscillators/bridges-exact.js.map +1 -1
- package/dist/atlas/oscillators/bridges-limits.d.ts.map +1 -1
- package/dist/atlas/oscillators/bridges-limits.js +0 -2
- package/dist/atlas/oscillators/bridges-limits.js.map +1 -1
- package/dist/atlas/oscillators/dimensions.js.map +1 -1
- package/dist/atlas/oscillators/index.d.ts +1 -16
- package/dist/atlas/oscillators/index.d.ts.map +1 -1
- package/dist/atlas/oscillators/index.js.map +1 -1
- package/dist/atlas/oscillators/limit-witnesses.js.map +1 -1
- package/dist/atlas/oscillators/models.js.map +1 -1
- package/dist/atlas/oscillators/norm-transport-witness.js.map +1 -1
- package/dist/atlas/oscillators/norm-transport.js.map +1 -1
- package/dist/atlas/oscillators/norms.js.map +1 -1
- package/dist/atlas/oscillators/pendulum-motion.js.map +1 -1
- package/dist/atlas/oscillators/phase-carriage.js.map +1 -1
- package/dist/atlas/oscillators/phase-translation.js.map +1 -1
- package/dist/atlas/oscillators/position-translation.js.map +1 -1
- package/dist/atlas/oscillators/rejections.js.map +1 -1
- package/dist/atlas/path-bound.js.map +1 -1
- package/dist/atlas/physjs-entries.generated.js.map +1 -1
- package/dist/atlas/physjs-ref.d.ts +79 -45
- package/dist/atlas/physjs-ref.d.ts.map +1 -1
- package/dist/atlas/physjs-ref.js +143 -62
- package/dist/atlas/physjs-ref.js.map +1 -1
- package/dist/atlas/physjs-reviewed.d.ts +31 -0
- package/dist/atlas/physjs-reviewed.d.ts.map +1 -0
- package/dist/atlas/physjs-reviewed.js +194 -0
- package/dist/atlas/physjs-reviewed.js.map +1 -0
- package/dist/atlas/poster/associations.js.map +1 -1
- package/dist/atlas/poster/derivations.js.map +1 -1
- package/dist/atlas/poster/statements.js.map +1 -1
- package/dist/atlas/proof-target.js.map +1 -1
- package/dist/atlas/public.d.ts +2 -1
- package/dist/atlas/public.d.ts.map +1 -1
- package/dist/atlas/public.js +2 -1
- package/dist/atlas/public.js.map +1 -1
- package/dist/atlas/regime.js.map +1 -1
- package/dist/atlas/serialize.d.ts +18 -12
- package/dist/atlas/serialize.d.ts.map +1 -1
- package/dist/atlas/serialize.js +28 -18
- package/dist/atlas/serialize.js.map +1 -1
- package/dist/atlas/statement.js.map +1 -1
- package/dist/atlas/translation-registry.js.map +1 -1
- package/dist/atlas/translation.js.map +1 -1
- package/dist/atlas/types.d.ts +9 -2
- package/dist/atlas/types.d.ts.map +1 -1
- package/dist/atlas/types.js +1 -1
- package/dist/atlas/types.js.map +1 -1
- package/dist/atlas/waves/bridges-closure.d.ts.map +1 -1
- package/dist/atlas/waves/bridges-closure.js +0 -3
- package/dist/atlas/waves/bridges-closure.js.map +1 -1
- package/dist/atlas/waves/bridges.d.ts.map +1 -1
- package/dist/atlas/waves/bridges.js +0 -4
- package/dist/atlas/waves/bridges.js.map +1 -1
- package/dist/atlas/waves/index.d.ts +1 -1
- package/dist/atlas/waves/index.d.ts.map +1 -1
- package/dist/atlas/waves/index.js.map +1 -1
- package/dist/atlas/waves/models.js.map +1 -1
- package/dist/atlas/waves/numerics.js.map +1 -1
- package/dist/atlas/witness-artifact.js.map +1 -1
- package/dist/atlas/witness-dominance.d.ts +4 -3
- package/dist/atlas/witness-dominance.d.ts.map +1 -1
- package/dist/atlas/witness-dominance.js +15 -5
- package/dist/atlas/witness-dominance.js.map +1 -1
- package/dist/atlas/witness-numeric.d.ts +8 -4
- package/dist/atlas/witness-numeric.d.ts.map +1 -1
- package/dist/atlas/witness-numeric.js +27 -2
- package/dist/atlas/witness-numeric.js.map +1 -1
- package/dist/atlas/witness-result.d.ts +7 -1
- package/dist/atlas/witness-result.d.ts.map +1 -1
- package/dist/atlas/witness-result.js.map +1 -1
- package/dist/atlas/witness-specs.js.map +1 -1
- package/dist/atlas/witness-symbolic.js.map +1 -1
- package/dist/atlas/witnesses/quantum-support.js.map +1 -1
- package/dist/bridges/caller-table.d.ts +1 -1
- package/dist/bridges/caller-table.d.ts.map +1 -1
- package/dist/bridges/caller-table.js.map +1 -1
- package/dist/bridges/carrier-sign.d.ts.map +1 -1
- package/dist/bridges/carrier-sign.js +8 -3
- package/dist/bridges/carrier-sign.js.map +1 -1
- package/dist/bridges/catalog-adapter.d.ts +12 -3
- package/dist/bridges/catalog-adapter.d.ts.map +1 -1
- package/dist/bridges/catalog-adapter.js +17 -9
- package/dist/bridges/catalog-adapter.js.map +1 -1
- package/dist/bridges/catalog-load.d.ts +12 -2
- package/dist/bridges/catalog-load.d.ts.map +1 -1
- package/dist/bridges/catalog-load.js +171 -8
- package/dist/bridges/catalog-load.js.map +1 -1
- package/dist/bridges/catalog-types.d.ts +48 -24
- package/dist/bridges/catalog-types.d.ts.map +1 -1
- package/dist/bridges/catalog-types.js.map +1 -1
- package/dist/bridges/coefficient-statement.js +1 -5
- package/dist/bridges/coefficient-statement.js.map +1 -1
- package/dist/bridges/confrontation-coverage.js.map +1 -1
- package/dist/bridges/confrontations.d.ts +1 -1
- package/dist/bridges/confrontations.d.ts.map +1 -1
- package/dist/bridges/confrontations.js +1 -1
- package/dist/bridges/confrontations.js.map +1 -1
- package/dist/bridges/evaluation-errors.d.ts +15 -2
- package/dist/bridges/evaluation-errors.d.ts.map +1 -1
- package/dist/bridges/evaluation-errors.js +20 -2
- package/dist/bridges/evaluation-errors.js.map +1 -1
- package/dist/bridges/evaluator-inputs.js.map +1 -1
- package/dist/bridges/evaluators.d.ts +17 -2
- package/dist/bridges/evaluators.d.ts.map +1 -1
- package/dist/bridges/evaluators.js +49 -16
- package/dist/bridges/evaluators.js.map +1 -1
- package/dist/bridges/expr-parse.d.ts +27 -4
- package/dist/bridges/expr-parse.d.ts.map +1 -1
- package/dist/bridges/expr-parse.js +90 -10
- package/dist/bridges/expr-parse.js.map +1 -1
- package/dist/bridges/holds.d.ts +5 -1
- package/dist/bridges/holds.d.ts.map +1 -1
- package/dist/bridges/holds.js +18 -3
- package/dist/bridges/holds.js.map +1 -1
- package/dist/bridges/index.d.ts +15 -14
- package/dist/bridges/index.d.ts.map +1 -1
- package/dist/bridges/index.js +14 -15
- package/dist/bridges/index.js.map +1 -1
- package/dist/bridges/input-contract.js.map +1 -1
- package/dist/bridges/membership.d.ts +5 -3
- package/dist/bridges/membership.d.ts.map +1 -1
- package/dist/bridges/membership.js +5 -6
- package/dist/bridges/membership.js.map +1 -1
- package/dist/bridges/notices.js.map +1 -1
- package/dist/bridges/observations/types.js.map +1 -1
- package/dist/bridges/rejected.d.ts +11 -17
- package/dist/bridges/rejected.d.ts.map +1 -1
- package/dist/bridges/rejected.js +13 -68
- package/dist/bridges/rejected.js.map +1 -1
- package/dist/bridges/relation-eval.d.ts +5 -6
- package/dist/bridges/relation-eval.d.ts.map +1 -1
- package/dist/bridges/relation-eval.js +9 -38
- package/dist/bridges/relation-eval.js.map +1 -1
- package/dist/bridges/rhs-registry.js.map +1 -1
- package/dist/bridges/sensitivity.d.ts +11 -3
- package/dist/bridges/sensitivity.d.ts.map +1 -1
- package/dist/bridges/sensitivity.js +24 -10
- package/dist/bridges/sensitivity.js.map +1 -1
- package/dist/bridges/tensor-index.js.map +1 -1
- package/dist/bridges/types.d.ts +1 -7
- package/dist/bridges/types.d.ts.map +1 -1
- package/dist/bridges/types.js +1 -4
- package/dist/bridges/types.js.map +1 -1
- package/dist/canonical/canonical-equation.js.map +1 -1
- package/dist/canonical/dimensional-fields.js.map +1 -1
- package/dist/canonical/entries/_l1-build.js.map +1 -1
- package/dist/canonical/entries/atomic.js.map +1 -1
- package/dist/canonical/entries/condensed-matter.js +4 -4
- package/dist/canonical/entries/condensed-matter.js.map +1 -1
- package/dist/canonical/entries/dimensional-classics.js +2 -2
- package/dist/canonical/entries/dimensional-classics.js.map +1 -1
- package/dist/canonical/entries/electromagnetism.js +2 -2
- package/dist/canonical/entries/electromagnetism.js.map +1 -1
- package/dist/canonical/entries/fluids-waves.js.map +1 -1
- package/dist/canonical/entries/mechanics.js.map +1 -1
- package/dist/canonical/entries/nonmonomial.d.ts.map +1 -1
- package/dist/canonical/entries/nonmonomial.js +29 -22
- package/dist/canonical/entries/nonmonomial.js.map +1 -1
- package/dist/canonical/entries/relativity.js.map +1 -1
- package/dist/canonical/entries/statistical-mechanics.js +5 -5
- package/dist/canonical/entries/statistical-mechanics.js.map +1 -1
- package/dist/canonical/entries/thermo-nuclear-cosmo.js.map +1 -1
- package/dist/canonical/linkage.d.ts +29 -4
- package/dist/canonical/linkage.d.ts.map +1 -1
- package/dist/canonical/linkage.js +31 -29
- package/dist/canonical/linkage.js.map +1 -1
- package/dist/canonical/normal-form.d.ts +0 -8
- package/dist/canonical/normal-form.d.ts.map +1 -1
- package/dist/canonical/normal-form.js +17 -12
- package/dist/canonical/normal-form.js.map +1 -1
- package/dist/canonical/registry.js.map +1 -1
- package/dist/canonical/residual.js.map +1 -1
- package/dist/canonical/seed-l-layer.d.ts +7 -1
- package/dist/canonical/seed-l-layer.d.ts.map +1 -1
- package/dist/canonical/seed-l-layer.js +7 -1
- package/dist/canonical/seed-l-layer.js.map +1 -1
- package/dist/canonical/structural.d.ts +21 -0
- package/dist/canonical/structural.d.ts.map +1 -1
- package/dist/canonical/structural.js +24 -4
- package/dist/canonical/structural.js.map +1 -1
- package/dist/cases/brownian-sphere.js +4 -4
- package/dist/cases/brownian-sphere.js.map +1 -1
- package/dist/cases/damped-resonator.js +2 -2
- package/dist/cases/damped-resonator.js.map +1 -1
- package/dist/cases/index.js.map +1 -1
- package/dist/cases/kepler-rv.js.map +1 -1
- package/dist/cases/lumped-cooling.js +1 -1
- package/dist/cases/lumped-cooling.js.map +1 -1
- package/dist/cases/quadrature.js.map +1 -1
- package/dist/cases/resistor-noise.js +3 -3
- package/dist/cases/resistor-noise.js.map +1 -1
- package/dist/cases/skin-depth.js.map +1 -1
- package/dist/cases/types.js.map +1 -1
- package/dist/cli/args.d.ts +7 -2
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +18 -2
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/bindings.d.ts +13 -0
- package/dist/cli/bindings.d.ts.map +1 -0
- package/dist/cli/bindings.js +32 -0
- package/dist/cli/bindings.js.map +1 -0
- package/dist/cli/closed-form-range.js.map +1 -1
- package/dist/cli/command.js.map +1 -1
- package/dist/cli/commands/_atlas-map.d.ts +3 -3
- package/dist/cli/commands/_atlas-map.d.ts.map +1 -1
- package/dist/cli/commands/_atlas-map.js +43 -18
- package/dist/cli/commands/_atlas-map.js.map +1 -1
- package/dist/cli/commands/_atlas-route.js.map +1 -1
- package/dist/cli/commands/_discovery-opts.d.ts.map +1 -1
- package/dist/cli/commands/_discovery-opts.js +42 -7
- package/dist/cli/commands/_discovery-opts.js.map +1 -1
- package/dist/cli/commands/atlas.d.ts.map +1 -1
- package/dist/cli/commands/atlas.js +1 -3
- package/dist/cli/commands/atlas.js.map +1 -1
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/audit.js +13 -20
- package/dist/cli/commands/audit.js.map +1 -1
- package/dist/cli/commands/axes.js.map +1 -1
- package/dist/cli/commands/candidates.d.ts.map +1 -1
- package/dist/cli/commands/candidates.js +16 -8
- package/dist/cli/commands/candidates.js.map +1 -1
- package/dist/cli/commands/canonical.js.map +1 -1
- package/dist/cli/commands/chain.js +1 -1
- package/dist/cli/commands/chain.js.map +1 -1
- package/dist/cli/commands/confront.d.ts.map +1 -1
- package/dist/cli/commands/confront.js +22 -14
- package/dist/cli/commands/confront.js.map +1 -1
- package/dist/cli/commands/connectors.js.map +1 -1
- package/dist/cli/commands/coverage.js.map +1 -1
- package/dist/cli/commands/derive.d.ts.map +1 -1
- package/dist/cli/commands/derive.js +42 -17
- 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 +15 -9
- package/dist/cli/commands/discover.js.map +1 -1
- package/dist/cli/commands/eval.d.ts.map +1 -1
- package/dist/cli/commands/eval.js +13 -10
- package/dist/cli/commands/eval.js.map +1 -1
- package/dist/cli/commands/evaluate.d.ts.map +1 -1
- package/dist/cli/commands/evaluate.js +53 -31
- 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 +14 -7
- package/dist/cli/commands/explain.js.map +1 -1
- package/dist/cli/commands/frontier.js.map +1 -1
- package/dist/cli/commands/ground.d.ts.map +1 -1
- package/dist/cli/commands/ground.js +40 -10
- package/dist/cli/commands/ground.js.map +1 -1
- 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 +82 -89
- package/dist/cli/commands/map.js.map +1 -1
- package/dist/cli/commands/metric.d.ts.map +1 -1
- package/dist/cli/commands/metric.js +53 -18
- package/dist/cli/commands/metric.js.map +1 -1
- package/dist/cli/commands/path.js +4 -4
- package/dist/cli/commands/path.js.map +1 -1
- package/dist/cli/commands/predict.js.map +1 -1
- package/dist/cli/commands/priority.js.map +1 -1
- package/dist/cli/commands/probe.d.ts.map +1 -1
- package/dist/cli/commands/probe.js +50 -26
- package/dist/cli/commands/probe.js.map +1 -1
- package/dist/cli/commands/recover.js +1 -1
- package/dist/cli/commands/recover.js.map +1 -1
- package/dist/cli/commands/regime.d.ts +5 -4
- package/dist/cli/commands/regime.d.ts.map +1 -1
- package/dist/cli/commands/regime.js +24 -26
- package/dist/cli/commands/regime.js.map +1 -1
- package/dist/cli/commands/retrieve.d.ts.map +1 -1
- package/dist/cli/commands/retrieve.js +22 -14
- package/dist/cli/commands/retrieve.js.map +1 -1
- package/dist/cli/commands/search.d.ts.map +1 -1
- package/dist/cli/commands/search.js +8 -4
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/symbolic.d.ts.map +1 -1
- package/dist/cli/commands/symbolic.js +13 -9
- package/dist/cli/commands/symbolic.js.map +1 -1
- package/dist/cli/commands/testplan.js +1 -1
- package/dist/cli/commands/testplan.js.map +1 -1
- package/dist/cli/conventions.js.map +1 -1
- package/dist/cli/determination.js.map +1 -1
- package/dist/cli/errors.js.map +1 -1
- package/dist/cli/euler-guard.js.map +1 -1
- package/dist/cli/eval-numbers.js.map +1 -1
- package/dist/cli/expr-print.d.ts +29 -2
- package/dist/cli/expr-print.d.ts.map +1 -1
- package/dist/cli/expr-print.js +46 -2
- package/dist/cli/expr-print.js.map +1 -1
- package/dist/cli/flag-help.js.map +1 -1
- package/dist/cli/graphs.js.map +1 -1
- package/dist/cli/library-defaults.d.ts +19 -0
- package/dist/cli/library-defaults.d.ts.map +1 -0
- package/dist/cli/library-defaults.js +22 -0
- package/dist/cli/library-defaults.js.map +1 -0
- package/dist/cli/main.js +7 -3
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/map-evidence.js.map +1 -1
- package/dist/cli/output.d.ts +3 -6
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js.map +1 -1
- package/dist/cli/published-url.js.map +1 -1
- package/dist/cli/record-reach.d.ts +6 -0
- package/dist/cli/record-reach.d.ts.map +1 -1
- package/dist/cli/record-reach.js +16 -10
- package/dist/cli/record-reach.js.map +1 -1
- package/dist/cli/record-tables.js +1 -1
- package/dist/cli/record-tables.js.map +1 -1
- package/dist/cli/record.d.ts.map +1 -1
- package/dist/cli/record.js +31 -12
- package/dist/cli/record.js.map +1 -1
- package/dist/cli/search-index.d.ts +5 -0
- package/dist/cli/search-index.d.ts.map +1 -1
- package/dist/cli/search-index.js +12 -1
- package/dist/cli/search-index.js.map +1 -1
- package/dist/cli/statuses.js.map +1 -1
- package/dist/cli/top-level-help.js.map +1 -1
- package/dist/cli/version.js.map +1 -1
- package/dist/cli-api.d.ts +15 -9
- package/dist/cli-api.d.ts.map +1 -1
- package/dist/cli-api.js +14 -13
- package/dist/cli-api.js.map +1 -1
- package/dist/composition/adjudication.js.map +1 -1
- package/dist/composition/aliases.js.map +1 -1
- package/dist/composition/audit-coverage.d.ts +2 -0
- package/dist/composition/audit-coverage.d.ts.map +1 -1
- package/dist/composition/audit-coverage.js.map +1 -1
- package/dist/composition/axes.d.ts +12 -0
- package/dist/composition/axes.d.ts.map +1 -1
- package/dist/composition/axes.js +18 -6
- package/dist/composition/axes.js.map +1 -1
- package/dist/composition/axis-audit.js.map +1 -1
- package/dist/composition/bridge-analysis.d.ts +0 -18
- package/dist/composition/bridge-analysis.d.ts.map +1 -1
- package/dist/composition/bridge-analysis.js +57 -47
- package/dist/composition/bridge-analysis.js.map +1 -1
- package/dist/composition/bridge-prediction.d.ts +5 -1
- package/dist/composition/bridge-prediction.d.ts.map +1 -1
- package/dist/composition/bridge-prediction.js +12 -16
- package/dist/composition/bridge-prediction.js.map +1 -1
- package/dist/composition/buckingham-filter.js.map +1 -1
- package/dist/composition/canonical-compare.d.ts.map +1 -1
- package/dist/composition/canonical-compare.js +12 -2
- package/dist/composition/canonical-compare.js.map +1 -1
- package/dist/composition/canonical-graph.d.ts +8 -9
- package/dist/composition/canonical-graph.d.ts.map +1 -1
- package/dist/composition/canonical-graph.js +25 -67
- package/dist/composition/canonical-graph.js.map +1 -1
- package/dist/composition/canonical-json.js.map +1 -1
- package/dist/composition/canonical-prefactors.js.map +1 -1
- package/dist/composition/catalog-graph.d.ts.map +1 -1
- package/dist/composition/catalog-graph.js +6 -20
- package/dist/composition/catalog-graph.js.map +1 -1
- package/dist/composition/chain-candidate.d.ts +2 -0
- package/dist/composition/chain-candidate.d.ts.map +1 -1
- package/dist/composition/chain-candidate.js +2 -0
- package/dist/composition/chain-candidate.js.map +1 -1
- package/dist/composition/chain-match.js.map +1 -1
- package/dist/composition/chain-regime.js.map +1 -1
- package/dist/composition/chain-result.js.map +1 -1
- package/dist/composition/compose-surface.js.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 +153 -36
- package/dist/composition/compose.js.map +1 -1
- package/dist/composition/composition-recovery.js.map +1 -1
- package/dist/composition/consequence.d.ts.map +1 -1
- package/dist/composition/consequence.js +15 -6
- package/dist/composition/consequence.js.map +1 -1
- package/dist/composition/consistency.js.map +1 -1
- package/dist/composition/descriptor.d.ts +1 -1
- package/dist/composition/descriptor.d.ts.map +1 -1
- package/dist/composition/descriptor.js.map +1 -1
- package/dist/composition/dimension-adjacency.js.map +1 -1
- package/dist/composition/discovery.d.ts +21 -11
- package/dist/composition/discovery.d.ts.map +1 -1
- package/dist/composition/discovery.js +81 -21
- package/dist/composition/discovery.js.map +1 -1
- package/dist/composition/edge.d.ts +19 -8
- package/dist/composition/edge.d.ts.map +1 -1
- package/dist/composition/edge.js +24 -11
- package/dist/composition/edge.js.map +1 -1
- package/dist/composition/enumerate.d.ts +2 -2
- package/dist/composition/enumerate.d.ts.map +1 -1
- package/dist/composition/enumerate.js.map +1 -1
- package/dist/composition/evaluate-relation.js.map +1 -1
- package/dist/composition/explain.d.ts +14 -9
- package/dist/composition/explain.d.ts.map +1 -1
- package/dist/composition/explain.js +46 -13
- package/dist/composition/explain.js.map +1 -1
- package/dist/composition/expr-eval.js.map +1 -1
- package/dist/composition/expr-simplify.d.ts.map +1 -1
- package/dist/composition/expr-simplify.js +9 -39
- package/dist/composition/expr-simplify.js.map +1 -1
- package/dist/composition/expr-subst.js.map +1 -1
- package/dist/composition/formula-shape.d.ts +9 -0
- package/dist/composition/formula-shape.d.ts.map +1 -1
- package/dist/composition/formula-shape.js +54 -0
- package/dist/composition/formula-shape.js.map +1 -1
- package/dist/composition/frontier-account.d.ts +3 -2
- package/dist/composition/frontier-account.d.ts.map +1 -1
- package/dist/composition/frontier-account.js +7 -3
- package/dist/composition/frontier-account.js.map +1 -1
- package/dist/composition/graph-viz-svg.js.map +1 -1
- package/dist/composition/graph-viz.js.map +1 -1
- package/dist/composition/grounding.js.map +1 -1
- package/dist/composition/identifiability.js.map +1 -1
- package/dist/composition/index.d.ts +6 -4
- package/dist/composition/index.d.ts.map +1 -1
- package/dist/composition/index.js +4 -3
- package/dist/composition/index.js.map +1 -1
- package/dist/composition/mathts-quiet.d.ts +28 -0
- package/dist/composition/mathts-quiet.d.ts.map +1 -0
- package/dist/composition/mathts-quiet.js +56 -0
- package/dist/composition/mathts-quiet.js.map +1 -0
- package/dist/composition/mathts-scalar-symbols.d.ts.map +1 -1
- package/dist/composition/mathts-scalar-symbols.js +18 -34
- package/dist/composition/mathts-scalar-symbols.js.map +1 -1
- package/dist/composition/not-composable-seeds.d.ts +3 -1
- package/dist/composition/not-composable-seeds.d.ts.map +1 -1
- package/dist/composition/not-composable-seeds.js +2 -0
- package/dist/composition/not-composable-seeds.js.map +1 -1
- package/dist/composition/probe/backend-protocol.js.map +1 -1
- package/dist/composition/probe/candidate-store.js.map +1 -1
- package/dist/composition/probe/corpus.js.map +1 -1
- package/dist/composition/probe/dataset.js.map +1 -1
- package/dist/composition/probe/experiment-design.js.map +1 -1
- package/dist/composition/probe/expression-gaps.js.map +1 -1
- package/dist/composition/probe/falsify.d.ts +14 -3
- package/dist/composition/probe/falsify.d.ts.map +1 -1
- package/dist/composition/probe/falsify.js +14 -27
- package/dist/composition/probe/falsify.js.map +1 -1
- package/dist/composition/probe/fingerprint.js.map +1 -1
- package/dist/composition/probe/fit.d.ts +1 -1
- package/dist/composition/probe/fit.d.ts.map +1 -1
- package/dist/composition/probe/fit.js +2 -1
- package/dist/composition/probe/fit.js.map +1 -1
- package/dist/composition/probe/frontier.js.map +1 -1
- package/dist/composition/probe/generator.js.map +1 -1
- package/dist/composition/probe/index.d.ts +4 -2
- package/dist/composition/probe/index.d.ts.map +1 -1
- package/dist/composition/probe/index.js +4 -2
- package/dist/composition/probe/index.js.map +1 -1
- package/dist/composition/probe/limits.js.map +1 -1
- package/dist/composition/probe/metadata.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 +13 -6
- package/dist/composition/probe/pipeline.js.map +1 -1
- package/dist/composition/probe/problem.d.ts +8 -0
- package/dist/composition/probe/problem.d.ts.map +1 -1
- package/dist/composition/probe/problem.js +78 -12
- package/dist/composition/probe/problem.js.map +1 -1
- package/dist/composition/probe/report.js.map +1 -1
- package/dist/composition/probe/residual.js.map +1 -1
- package/dist/composition/probe/run-manifest.js +2 -2
- package/dist/composition/probe/run-manifest.js.map +1 -1
- package/dist/composition/probe/scoring.d.ts +2 -1
- package/dist/composition/probe/scoring.d.ts.map +1 -1
- package/dist/composition/probe/scoring.js +21 -7
- package/dist/composition/probe/scoring.js.map +1 -1
- package/dist/composition/probe/search-budget.js.map +1 -1
- package/dist/composition/probe/serialize.js.map +1 -1
- package/dist/composition/probe/structure.js.map +1 -1
- package/dist/composition/probe/study.d.ts +4 -3
- package/dist/composition/probe/study.d.ts.map +1 -1
- package/dist/composition/probe/study.js +5 -3
- package/dist/composition/probe/study.js.map +1 -1
- package/dist/composition/probe/types.d.ts +3 -1
- package/dist/composition/probe/types.d.ts.map +1 -1
- package/dist/composition/probe/types.js +2 -0
- package/dist/composition/probe/types.js.map +1 -1
- package/dist/composition/proposed-bridges.d.ts +11 -4
- package/dist/composition/proposed-bridges.d.ts.map +1 -1
- package/dist/composition/proposed-bridges.js +11 -4
- package/dist/composition/proposed-bridges.js.map +1 -1
- package/dist/composition/quantities.d.ts +0 -4
- package/dist/composition/quantities.d.ts.map +1 -1
- package/dist/composition/quantities.js +5 -5
- package/dist/composition/quantities.js.map +1 -1
- package/dist/composition/quantity.d.ts +18 -2
- package/dist/composition/quantity.d.ts.map +1 -1
- package/dist/composition/quantity.js +35 -6
- package/dist/composition/quantity.js.map +1 -1
- package/dist/composition/representative-values.js.map +1 -1
- package/dist/composition/retrodiction.d.ts +16 -6
- package/dist/composition/retrodiction.d.ts.map +1 -1
- package/dist/composition/retrodiction.js +34 -9
- package/dist/composition/retrodiction.js.map +1 -1
- package/dist/composition/uncertainty.js.map +1 -1
- package/dist/composition/user-equation.js.map +1 -1
- package/dist/core/axes-registry.d.ts +8 -5
- package/dist/core/axes-registry.d.ts.map +1 -1
- package/dist/core/axes-registry.js.map +1 -1
- package/dist/core/cell.js.map +1 -1
- package/dist/core/constants.d.ts +8 -8
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/constants.js +8 -10
- package/dist/core/constants.js.map +1 -1
- package/dist/core/data-file.js.map +1 -1
- package/dist/core/flux-rules.js +1 -1
- package/dist/core/flux-rules.js.map +1 -1
- package/dist/core/json-schema.d.ts +1 -1
- package/dist/core/json-schema.d.ts.map +1 -1
- package/dist/core/json-schema.js +31 -7
- package/dist/core/json-schema.js.map +1 -1
- package/dist/core/labeled-tensor.d.ts +6 -1
- package/dist/core/labeled-tensor.d.ts.map +1 -1
- package/dist/core/labeled-tensor.js +18 -8
- package/dist/core/labeled-tensor.js.map +1 -1
- package/dist/core/regime-registry.d.ts +6 -2
- package/dist/core/regime-registry.d.ts.map +1 -1
- package/dist/core/regime-registry.js.map +1 -1
- package/dist/core/regime-rule-install.js.map +1 -1
- package/dist/core/regimes-builtins.js.map +1 -1
- package/dist/core/tensor.d.ts +7 -4
- package/dist/core/tensor.d.ts.map +1 -1
- package/dist/core/tensor.js +40 -8
- package/dist/core/tensor.js.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/core/universal-index.js.map +1 -1
- package/dist/diff/bridge-ast-gradient.d.ts +4 -5
- package/dist/diff/bridge-ast-gradient.d.ts.map +1 -1
- package/dist/diff/bridge-ast-gradient.js +10 -6
- package/dist/diff/bridge-ast-gradient.js.map +1 -1
- package/dist/diff/bridge-gradient.d.ts +24 -80
- package/dist/diff/bridge-gradient.d.ts.map +1 -1
- package/dist/diff/bridge-gradient.js +21 -98
- package/dist/diff/bridge-gradient.js.map +1 -1
- package/dist/diff/bridge-specs.d.ts +16 -5
- package/dist/diff/bridge-specs.d.ts.map +1 -1
- package/dist/diff/bridge-specs.js +16 -4
- package/dist/diff/bridge-specs.js.map +1 -1
- package/dist/dimensional/algebra.js.map +1 -1
- package/dist/dimensional/ast-builders.d.ts +5 -4
- package/dist/dimensional/ast-builders.d.ts.map +1 -1
- package/dist/dimensional/ast-builders.js +6 -5
- package/dist/dimensional/ast-builders.js.map +1 -1
- package/dist/dimensional/ast-types.js.map +1 -1
- package/dist/dimensional/bridge-check.js.map +1 -1
- package/dist/dimensional/buckingham.js.map +1 -1
- package/dist/dimensional/connection-validators.d.ts +2 -1
- package/dist/dimensional/connection-validators.d.ts.map +1 -1
- package/dist/dimensional/connection-validators.js.map +1 -1
- package/dist/dimensional/connection.js.map +1 -1
- package/dist/dimensional/constant-rows.d.ts.map +1 -1
- package/dist/dimensional/constant-rows.js +9 -5
- package/dist/dimensional/constant-rows.js.map +1 -1
- package/dist/dimensional/constants.d.ts +5 -6
- package/dist/dimensional/constants.d.ts.map +1 -1
- package/dist/dimensional/constants.js +5 -6
- package/dist/dimensional/constants.js.map +1 -1
- package/dist/dimensional/curvature-composite.js.map +1 -1
- package/dist/dimensional/curvature-invariants.js.map +1 -1
- package/dist/dimensional/curvature.js.map +1 -1
- package/dist/dimensional/dimension-inference.js.map +1 -1
- package/dist/dimensional/dimension-spec.d.ts +13 -7
- package/dist/dimensional/dimension-spec.d.ts.map +1 -1
- package/dist/dimensional/dimension-spec.js +49 -23
- package/dist/dimensional/dimension-spec.js.map +1 -1
- package/dist/dimensional/einstein-equation.js.map +1 -1
- package/dist/dimensional/errors.d.ts +3 -1
- package/dist/dimensional/errors.d.ts.map +1 -1
- package/dist/dimensional/errors.js +2 -2
- package/dist/dimensional/errors.js.map +1 -1
- package/dist/dimensional/exact-scale.js.map +1 -1
- package/dist/dimensional/field-equation-helpers.js.map +1 -1
- package/dist/dimensional/formula-names.js.map +1 -1
- package/dist/dimensional/fresh-label.js.map +1 -1
- package/dist/dimensional/friedmann-equation.d.ts +3 -3
- package/dist/dimensional/friedmann-equation.js +3 -3
- package/dist/dimensional/friedmann-equation.js.map +1 -1
- package/dist/dimensional/gauge-field.d.ts +2 -3
- package/dist/dimensional/gauge-field.d.ts.map +1 -1
- package/dist/dimensional/gauge-field.js +0 -1
- package/dist/dimensional/gauge-field.js.map +1 -1
- package/dist/dimensional/hyphen-names.d.ts.map +1 -1
- package/dist/dimensional/hyphen-names.js +8 -0
- package/dist/dimensional/hyphen-names.js.map +1 -1
- package/dist/dimensional/killing-validators.js.map +1 -1
- package/dist/dimensional/klein-gordon-equation.js.map +1 -1
- package/dist/dimensional/metric-validators.d.ts +2 -1
- package/dist/dimensional/metric-validators.d.ts.map +1 -1
- package/dist/dimensional/metric-validators.js.map +1 -1
- package/dist/dimensional/metric.js.map +1 -1
- package/dist/dimensional/natural-units.js.map +1 -1
- package/dist/dimensional/quantity-registry.d.ts +13 -0
- package/dist/dimensional/quantity-registry.d.ts.map +1 -1
- package/dist/dimensional/quantity-registry.js +14 -6
- package/dist/dimensional/quantity-registry.js.map +1 -1
- package/dist/dimensional/rg-flow.js.map +1 -1
- package/dist/dimensional/stress-energy-validators.js.map +1 -1
- package/dist/dimensional/symbolic-constants.d.ts.map +1 -1
- package/dist/dimensional/symbolic-constants.js +7 -2
- package/dist/dimensional/symbolic-constants.js.map +1 -1
- package/dist/dimensional/tensor-trace.js.map +1 -1
- package/dist/dimensional/tensor.js.map +1 -1
- package/dist/dimensional/types.js.map +1 -1
- package/dist/dimensional/unit-convention.d.ts +0 -2
- package/dist/dimensional/unit-convention.d.ts.map +1 -1
- package/dist/dimensional/unit-convention.js +2 -2
- package/dist/dimensional/unit-convention.js.map +1 -1
- package/dist/dimensional/unit-data.d.ts.map +1 -1
- package/dist/dimensional/unit-data.js +9 -5
- package/dist/dimensional/unit-data.js.map +1 -1
- package/dist/dimensional/units.d.ts.map +1 -1
- package/dist/dimensional/units.js +38 -20
- package/dist/dimensional/units.js.map +1 -1
- package/dist/dimensional/validator-registry.js.map +1 -1
- package/dist/dimensional/validator.d.ts +0 -16
- package/dist/dimensional/validator.d.ts.map +1 -1
- package/dist/dimensional/validator.js +65 -29
- package/dist/dimensional/validator.js.map +1 -1
- package/dist/dimensional/weyl-validators.js.map +1 -1
- package/dist/index.d.ts +50 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -20
- package/dist/index.js.map +1 -1
- package/dist/numerical/bianchi-residual.js.map +1 -1
- package/dist/numerical/binding-value.d.ts +11 -6
- package/dist/numerical/binding-value.d.ts.map +1 -1
- package/dist/numerical/binding-value.js +126 -122
- package/dist/numerical/binding-value.js.map +1 -1
- package/dist/numerical/christoffel-flat.js.map +1 -1
- package/dist/numerical/connection-lowering-helpers.js.map +1 -1
- package/dist/numerical/covariant-eikonal.d.ts.map +1 -1
- package/dist/numerical/covariant-eikonal.js +2 -2
- package/dist/numerical/covariant-eikonal.js.map +1 -1
- package/dist/numerical/curvature-lowering-helpers.d.ts +20 -0
- package/dist/numerical/curvature-lowering-helpers.d.ts.map +1 -1
- package/dist/numerical/curvature-lowering-helpers.js +6 -3
- package/dist/numerical/curvature-lowering-helpers.js.map +1 -1
- package/dist/numerical/derivative-lowering.js.map +1 -1
- package/dist/numerical/einstein-equation.js.map +1 -1
- package/dist/numerical/engine-registry.js.map +1 -1
- package/dist/numerical/errors.d.ts +7 -3
- package/dist/numerical/errors.d.ts.map +1 -1
- package/dist/numerical/errors.js +5 -5
- package/dist/numerical/errors.js.map +1 -1
- package/dist/numerical/evaluator-uncertainty.d.ts.map +1 -1
- package/dist/numerical/evaluator-uncertainty.js +19 -2
- package/dist/numerical/evaluator-uncertainty.js.map +1 -1
- package/dist/numerical/formula-contract.d.ts +63 -7
- package/dist/numerical/formula-contract.d.ts.map +1 -1
- package/dist/numerical/formula-contract.js +61 -42
- package/dist/numerical/formula-contract.js.map +1 -1
- package/dist/numerical/formula-dimension.d.ts +8 -7
- package/dist/numerical/formula-dimension.d.ts.map +1 -1
- package/dist/numerical/formula-dimension.js +58 -36
- package/dist/numerical/formula-dimension.js.map +1 -1
- package/dist/numerical/formula-mathts.d.ts.map +1 -1
- package/dist/numerical/formula-mathts.js +5 -2
- package/dist/numerical/formula-mathts.js.map +1 -1
- package/dist/numerical/formula-registry.d.ts +13 -3
- package/dist/numerical/formula-registry.d.ts.map +1 -1
- package/dist/numerical/formula-registry.js +7 -2
- package/dist/numerical/formula-registry.js.map +1 -1
- package/dist/numerical/geodesic-integrator.js.map +1 -1
- package/dist/numerical/geometrized.js.map +1 -1
- package/dist/numerical/gl4-integrator.d.ts +28 -27
- package/dist/numerical/gl4-integrator.d.ts.map +1 -1
- package/dist/numerical/gl4-integrator.js +41 -42
- package/dist/numerical/gl4-integrator.js.map +1 -1
- package/dist/numerical/grid-field.js.map +1 -1
- package/dist/numerical/index.js.map +1 -1
- package/dist/numerical/input-validation.d.ts +3 -6
- package/dist/numerical/input-validation.d.ts.map +1 -1
- package/dist/numerical/input-validation.js +4 -8
- package/dist/numerical/input-validation.js.map +1 -1
- package/dist/numerical/killing.d.ts +8 -5
- package/dist/numerical/killing.d.ts.map +1 -1
- package/dist/numerical/killing.js.map +1 -1
- package/dist/numerical/klein-gordon.js.map +1 -1
- package/dist/numerical/kretschmann.js.map +1 -1
- package/dist/numerical/lowering-utils.js.map +1 -1
- package/dist/numerical/lowering.d.ts.map +1 -1
- package/dist/numerical/lowering.js +7 -17
- package/dist/numerical/lowering.js.map +1 -1
- package/dist/numerical/mathts-engine.d.ts.map +1 -1
- package/dist/numerical/mathts-engine.js +11 -6
- package/dist/numerical/mathts-engine.js.map +1 -1
- package/dist/numerical/metric-inverse.js.map +1 -1
- package/dist/numerical/null-ic.js.map +1 -1
- package/dist/numerical/null-ray-integrator.js +4 -4
- package/dist/numerical/null-ray-integrator.js.map +1 -1
- package/dist/numerical/painleve-gullstrand-metric.js.map +1 -1
- package/dist/numerical/pderiv.d.ts.map +1 -1
- package/dist/numerical/pderiv.js +9 -2
- package/dist/numerical/pderiv.js.map +1 -1
- package/dist/numerical/perihelion-finder.js.map +1 -1
- package/dist/numerical/quadrature.d.ts +5 -2
- package/dist/numerical/quadrature.d.ts.map +1 -1
- package/dist/numerical/quadrature.js +20 -3
- package/dist/numerical/quadrature.js.map +1 -1
- package/dist/numerical/spacetime-metrics.d.ts +13 -19
- package/dist/numerical/spacetime-metrics.d.ts.map +1 -1
- package/dist/numerical/spacetime-metrics.js +126 -248
- package/dist/numerical/spacetime-metrics.js.map +1 -1
- package/dist/numerical/strides.js.map +1 -1
- package/dist/numerical/tensor-engine.d.ts +9 -5
- package/dist/numerical/tensor-engine.d.ts.map +1 -1
- package/dist/numerical/tensor-engine.js.map +1 -1
- package/dist/numerical/types.js.map +1 -1
- package/dist/numerical/weyl-lowering.js.map +1 -1
- package/dist/relations/category.js.map +1 -1
- package/dist/relations/composition-table.d.ts +4 -4
- package/dist/relations/composition-table.js +4 -4
- package/dist/relations/composition-table.js.map +1 -1
- package/dist/relations/conventions.js.map +1 -1
- package/dist/relations/domain-regimes.js.map +1 -1
- package/dist/relations/regime-registration.js.map +1 -1
- package/dist/relations/regime-vocabularies.js.map +1 -1
- package/dist/relations/regime.d.ts +18 -8
- package/dist/relations/regime.d.ts.map +1 -1
- package/dist/relations/regime.js +26 -14
- package/dist/relations/regime.js.map +1 -1
- package/dist/relations/types.d.ts +18 -5
- package/dist/relations/types.d.ts.map +1 -1
- package/dist/relations/types.js +5 -3
- package/dist/relations/types.js.map +1 -1
- package/package.json +10 -14
- package/dist/bridges/registry.d.ts +0 -60
- package/dist/bridges/registry.d.ts.map +0 -1
- package/dist/bridges/registry.js +0 -87
- package/dist/bridges/registry.js.map +0 -1
- package/dist/cli/poster-source.d.ts +0 -154
- package/dist/cli/poster-source.d.ts.map +0 -1
- package/dist/cli/poster-source.js +0 -184
- package/dist/cli/poster-source.js.map +0 -1
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { validate } from '../dimensional/validator.js';
|
|
2
1
|
import { evalExpr } from '../composition/expr-eval.js';
|
|
3
2
|
import { CONSTANTS } from '../dimensional/symbolic-constants.js';
|
|
4
|
-
import { BRIDGE_RHS_BY_ID } from '../bridges/rhs-registry.js';
|
|
5
3
|
import { CANONICAL_EQUATIONS, canonicalById } from './registry.js';
|
|
6
4
|
import { canonicalQuantityName, normalForm } from './normal-form.js';
|
|
7
|
-
import { classifyStructure } from './structural.js';
|
|
5
|
+
import { bridgeShapes, classifyStructure } from './structural.js';
|
|
8
6
|
const isDimensionless = (d) => d.L === 0 &&
|
|
9
7
|
d.M === 0 &&
|
|
10
8
|
d.T === 0 &&
|
|
@@ -42,9 +40,22 @@ function collectLeaves(node, vars, dimless) {
|
|
|
42
40
|
return;
|
|
43
41
|
}
|
|
44
42
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
/**
|
|
44
|
+
* The sample points: variable `i` (in sorted canonical-name order) takes the
|
|
45
|
+
* value `(1.3 + 0.7·i)^p` at exponent `p`. Each variable has its own base, so
|
|
46
|
+
* the RATIOS between variables change from point to point too. One common
|
|
47
|
+
* scale factor would leave every ratio such as y/x fixed, and two homogeneous
|
|
48
|
+
* expressions of the same degree (`x + 2y` and `x + y`) would then pass as a
|
|
49
|
+
* constant ratio at every point: a recovery that could not fail (9.0.0 audit
|
|
50
|
+
* §4 C3). `canonical-compare.ts` uses the same scheme.
|
|
51
|
+
*/
|
|
52
|
+
const SAMPLE_EXPONENTS = [1, 1.3, 1.6];
|
|
53
|
+
/**
|
|
54
|
+
* Best-effort check that two ASTs agree up to a constant ratio.
|
|
55
|
+
*
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
58
|
+
export function numericalRecovery(canon, bridge) {
|
|
48
59
|
const vars = new Map();
|
|
49
60
|
const dimless = new Set();
|
|
50
61
|
collectLeaves(canon, vars, dimless);
|
|
@@ -54,10 +65,10 @@ function numericalRecovery(canon, bridge) {
|
|
|
54
65
|
const canonicals = [...new Set(vars.values())].sort();
|
|
55
66
|
const index = new Map(canonicals.map((n, i) => [n, i]));
|
|
56
67
|
const ratios = [];
|
|
57
|
-
for (const
|
|
68
|
+
for (const p of SAMPLE_EXPONENTS) {
|
|
58
69
|
const values = {};
|
|
59
70
|
for (const [raw, canonName] of vars) {
|
|
60
|
-
values[raw] = (1.3 + 0.7 * index.get(canonName))
|
|
71
|
+
values[raw] = Math.pow(1.3 + 0.7 * index.get(canonName), p);
|
|
61
72
|
}
|
|
62
73
|
// Hold unresolved dimensionless leaves fixed — recovery is "up to" them.
|
|
63
74
|
for (const n of dimless)
|
|
@@ -82,19 +93,12 @@ function numericalRecovery(canon, bridge) {
|
|
|
82
93
|
const maxRelErr = Math.max(...ratios.map((r) => Math.abs((r - r0) / r0)));
|
|
83
94
|
return { tested: true, maxRelErr };
|
|
84
95
|
}
|
|
85
|
-
/** Validate + normal-form a bridge RHS once. */
|
|
86
|
-
function precomputeBridge(rhs) {
|
|
87
|
-
const v = validate(rhs);
|
|
88
|
-
return {
|
|
89
|
-
rhs,
|
|
90
|
-
dim: v.ok ? v.inferredDimension : null,
|
|
91
|
-
normal: normalForm(rhs),
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
96
|
/**
|
|
95
97
|
* The comparison core, given a canonical entry (with its pre-computed
|
|
96
|
-
* normal-form) and a
|
|
97
|
-
*
|
|
98
|
+
* normal-form) and a bridge's shape from the process-wide `bridgeShapes`
|
|
99
|
+
* table (validated dimension and normal-form hash, computed once). Pure: no
|
|
100
|
+
* AST re-walks except the rare `numericalRecovery` that only fires on a
|
|
101
|
+
* structural match.
|
|
98
102
|
*/
|
|
99
103
|
function classifyAgainst(canon, canonAst, canonNormal, bridgeId, bridge) {
|
|
100
104
|
const relation = classifyStructure({
|
|
@@ -130,8 +134,8 @@ function classifyAgainst(canon, canonAst, canonNormal, bridgeId, bridge) {
|
|
|
130
134
|
/** Compare one canonical entry against one bridge. */
|
|
131
135
|
export function classifyLinkage(canonicalId, bridgeId) {
|
|
132
136
|
const canon = canonicalById(canonicalId);
|
|
133
|
-
const
|
|
134
|
-
if (!canon || !
|
|
137
|
+
const bridge = bridgeShapes().get(bridgeId);
|
|
138
|
+
if (!canon || !bridge || !canon.scalarAst) {
|
|
135
139
|
return {
|
|
136
140
|
canonicalId,
|
|
137
141
|
bridgeId,
|
|
@@ -141,22 +145,20 @@ export function classifyLinkage(canonicalId, bridgeId) {
|
|
|
141
145
|
classification: 'unrelated',
|
|
142
146
|
};
|
|
143
147
|
}
|
|
144
|
-
return classifyAgainst(canon, canon.scalarAst, normalForm(canon.scalarAst), bridgeId,
|
|
148
|
+
return classifyAgainst(canon, canon.scalarAst, normalForm(canon.scalarAst), bridgeId, bridge);
|
|
145
149
|
}
|
|
146
150
|
/**
|
|
147
151
|
* Scan every canonical entry (with a scalar-AST) against every bridge RHS, and
|
|
148
152
|
* return the non-`unrelated` results — the physicist's linkage worklist.
|
|
149
153
|
*
|
|
150
|
-
* Each bridge
|
|
151
|
-
* each canonical's normal-form is
|
|
152
|
-
* (bridge-invariant); the inner loop then
|
|
153
|
-
*
|
|
154
|
+
* Each bridge's shape comes from the process-wide `bridgeShapes` table
|
|
155
|
+
* (validated and normal-formed once), and each canonical's normal-form is
|
|
156
|
+
* computed once per outer iteration (bridge-invariant); the inner loop then
|
|
157
|
+
* only compares pre-computed strings and dimensions.
|
|
154
158
|
*/
|
|
155
159
|
export function scanLinkages() {
|
|
156
160
|
const results = [];
|
|
157
|
-
const bridges =
|
|
158
|
-
...BRIDGE_RHS_BY_ID,
|
|
159
|
-
].map(([id, rhs]) => [id, precomputeBridge(rhs)]);
|
|
161
|
+
const bridges = bridgeShapes();
|
|
160
162
|
for (const ce of CANONICAL_EQUATIONS) {
|
|
161
163
|
if (!ce.scalarAst)
|
|
162
164
|
continue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linkage.js","sourceRoot":"","sources":["../../src/canonical/linkage.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AA2BpD,MAAM,eAAe,GAAG,CAAC,CAAY,EAAW,EAAE,CAChD,CAAC,CAAC,CAAC,KAAK,CAAC;IACT,CAAC,CAAC,CAAC,KAAK,CAAC;IACT,CAAC,CAAC,CAAC,KAAK,CAAC;IACT,CAAC,CAAC,CAAC,KAAK,CAAC;IACT,CAAC,CAAC,KAAK,KAAK,CAAC;IACb,CAAC,CAAC,CAAC,KAAK,CAAC;IACT,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAEZ;;;;;GAKG;AACH,SAAS,aAAa,CACpB,IAAc,EACd,IAAyB,EACzB,OAAoB;IAEpB,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;QAClB,KAAK,QAAQ;YACX,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,SAAS,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE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;QAC5B,MAAM,WAAW,GAAG,UAAU,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC;QAC7C,KAAK,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;YACzC,MAAM,CAAC,GAAG,eAAe,CACvB,EAAE,EACF,EAAE,CAAC,SAAS,EACZ,WAAW,EACX,QAAQ,EACR,MAAM,CACP,CAAC;YACF,IAAI,CAAC,CAAC,cAAc,KAAK,WAAW;gBAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACxD,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["/**\n * Bridge↔canonical linkage (Sub-project B) — the \"validate against standard\n * physics\" engine. For a canonical equation with a scalar-AST and a bridge with\n * an RHS AST, it asks:\n * 1. do they share the same dimension? (necessary)\n * 2. are they the same relation up to dimensionless factors? (`normalForm`)\n * 3. (best-effort) do they agree numerically up to a constant ratio?\n *\n * The structural half — same dimension, `normalForm`, and the F4\n * `restatesBridge` guard — is `classifyStructure` in `structural.ts`. This\n * module calls that function and then runs numerical recovery. A structural\n * match is `restates-canonical` (a trivial X≡X, NOT a discovery) only when\n * the canonical entry's `restatesBridge` actually names that bridge. A\n * structural match the registry did NOT pre-declare is a genuine `recovers`\n * correspondence. Numerical agreement is not a confirmation.\n *\n * @module canonical/linkage\n */\nimport type { ExprNode } from '../dimensional/validator.js';\nimport type { Dimension } from '../dimensional/types.js';\nimport { evalExpr } from '../composition/expr-eval.js';\nimport { CONSTANTS } from '../dimensional/symbolic-constants.js';\nimport type { CanonicalEquation } from './canonical-equation.js';\nimport { CANONICAL_EQUATIONS, canonicalById } from './registry.js';\nimport { canonicalQuantityName, normalForm } from './normal-form.js';\nimport { bridgeShapes, classifyStructure } from './structural.js';\nimport type { BridgeShape } from './structural.js';\n\n/** Best-effort numerical-recovery outcome. */\nexport interface RecoveryOutcome {\n /** Both ASTs evaluated at every sample (no unresolved leaf). */\n readonly tested: boolean;\n /** Spread of the canonical/bridge value ratio across samples (0 ⇒ they agree\n * up to a single constant factor). `NaN` when not tested. */\n readonly maxRelErr: number;\n}\n\n/** One bridge↔canonical comparison. */\nexport interface LinkageResult {\n readonly canonicalId: string;\n readonly bridgeId: number;\n /** Inferred dimensions agree. */\n readonly dimMatch: boolean;\n /** Same relation up to dimensionless factors (`normalForm`). */\n readonly structuralMatch: boolean;\n readonly recovery: RecoveryOutcome | null;\n readonly classification:\n | 'restates-canonical'\n | 'recovers'\n | 'dimensional-only'\n | 'unrelated';\n}\n\nconst isDimensionless = (d: Dimension): boolean =>\n d.L === 0 &&\n d.M === 0 &&\n d.T === 0 &&\n d.I === 0 &&\n d.Theta === 0 &&\n d.N === 0 &&\n d.J === 0;\n\n/**\n * Collect leaves `evalExpr` can't resolve (not a registered constant, not a\n * numeric literal), split into physical `vars` (non-dimensionless — varied\n * across samples) and `dimless` (dimensionless — held fixed: they ARE the\n * constant factor \"up to\" which recovery is measured).\n */\nfunction collectLeaves(\n node: ExprNode,\n vars: Map<string, string>,\n dimless: Set<string>,\n): void {\n switch (node.kind) {\n case 'symbol':\n if (!(node.name in CONSTANTS) && Number.isNaN(Number(node.name))) {\n if (isDimensionless(node.dim)) dimless.add(node.name);\n else vars.set(node.name, canonicalQuantityName(node.name, node.dim));\n }\n return;\n case 'op':\n for (const a of node.args) collectLeaves(a, vars, dimless);\n return;\n case 'transcendental':\n collectLeaves(node.arg, vars, dimless);\n return;\n case 'abs':\n collectLeaves(node.arg, vars, dimless);\n return;\n default:\n return;\n }\n}\n\n/**\n * The sample points: variable `i` (in sorted canonical-name order) takes the\n * value `(1.3 + 0.7·i)^p` at exponent `p`. Each variable has its own base, so\n * the RATIOS between variables change from point to point too. One common\n * scale factor would leave every ratio such as y/x fixed, and two homogeneous\n * expressions of the same degree (`x + 2y` and `x + y`) would then pass as a\n * constant ratio at every point: a recovery that could not fail (9.0.0 audit\n * §4 C3). `canonical-compare.ts` uses the same scheme.\n */\nconst SAMPLE_EXPONENTS = [1, 1.3, 1.6];\n\n/**\n * Best-effort check that two ASTs agree up to a constant ratio.\n *\n * @internal\n */\nexport function numericalRecovery(canon: ExprNode, bridge: ExprNode): RecoveryOutcome {\n const vars = new Map<string, string>();\n const dimless = new Set<string>();\n collectLeaves(canon, vars, dimless);\n collectLeaves(bridge, vars, dimless);\n // `M` and `mass` are one quantity. They share a sample, or the ratio is a\n // float artifact of two independent draws of the same mass.\n const canonicals = [...new Set(vars.values())].sort();\n const index = new Map(canonicals.map((n, i) => [n, i]));\n const ratios: number[] = [];\n for (const p of SAMPLE_EXPONENTS) {\n const values: Record<string, number> = {};\n for (const [raw, canonName] of vars) {\n values[raw] = Math.pow(1.3 + 0.7 * index.get(canonName)!, p);\n }\n // Hold unresolved dimensionless leaves fixed — recovery is \"up to\" them.\n for (const n of dimless) values[n] = 1;\n let cv: number;\n let bv: number;\n try {\n cv = evalExpr(canon, values);\n bv = evalExpr(bridge, values);\n } catch {\n return { tested: false, maxRelErr: NaN };\n }\n // Guard cv===0 too: with cv===0 the ratio is 0 at every sample, so the\n // relative-spread denominator r0===0 ⇒ NaN — a false \"tested\" result.\n if (!Number.isFinite(cv) || !Number.isFinite(bv) || bv === 0 || cv === 0) {\n return { tested: false, maxRelErr: NaN };\n }\n ratios.push(cv / bv);\n }\n const r0 = ratios[0];\n const maxRelErr = Math.max(...ratios.map((r) => Math.abs((r - r0) / r0)));\n return { tested: true, maxRelErr };\n}\n\n/**\n * The comparison core, given a canonical entry (with its pre-computed\n * normal-form) and a bridge's shape from the process-wide `bridgeShapes`\n * table (validated dimension and normal-form hash, computed once). Pure: no\n * AST re-walks except the rare `numericalRecovery` that only fires on a\n * structural match.\n */\nfunction classifyAgainst(\n canon: CanonicalEquation,\n canonAst: ExprNode,\n canonNormal: string,\n bridgeId: number,\n bridge: BridgeShape,\n): LinkageResult {\n const relation = classifyStructure({\n left: canonAst,\n leftDim: canon.dimensional.target.dim,\n leftNormal: canonNormal,\n right: bridge.rhs,\n rightDim: bridge.dim,\n rightNormal: bridge.normal,\n restatesBridge: canon.restatesBridge,\n bridgeId: String(bridgeId),\n });\n const recovery = relation.structuralMatch ? numericalRecovery(canonAst, bridge.rhs) : null;\n\n let classification: LinkageResult['classification'];\n if (relation.structuralMatch) {\n classification = relation.restates ? 'restates-canonical' : 'recovers';\n } else if (relation.dimMatch) {\n classification = 'dimensional-only';\n } else {\n classification = 'unrelated';\n }\n\n return {\n canonicalId: canon.id,\n bridgeId,\n dimMatch: relation.dimMatch,\n structuralMatch: relation.structuralMatch,\n recovery,\n classification,\n };\n}\n\n/** Compare one canonical entry against one bridge. */\nexport function classifyLinkage(\n canonicalId: string,\n bridgeId: number,\n): LinkageResult {\n const canon = canonicalById(canonicalId);\n const bridge = bridgeShapes().get(bridgeId);\n\n if (!canon || !bridge || !canon.scalarAst) {\n return {\n canonicalId,\n bridgeId,\n dimMatch: false,\n structuralMatch: false,\n recovery: null,\n classification: 'unrelated',\n };\n }\n\n return classifyAgainst(\n canon,\n canon.scalarAst,\n normalForm(canon.scalarAst),\n bridgeId,\n bridge,\n );\n}\n\n/**\n * Scan every canonical entry (with a scalar-AST) against every bridge RHS, and\n * return the non-`unrelated` results — the physicist's linkage worklist.\n *\n * Each bridge's shape comes from the process-wide `bridgeShapes` table\n * (validated and normal-formed once), and each canonical's normal-form is\n * computed once per outer iteration (bridge-invariant); the inner loop then\n * only compares pre-computed strings and dimensions.\n */\nexport function scanLinkages(): LinkageResult[] {\n const results: LinkageResult[] = [];\n const bridges = bridgeShapes();\n\n for (const ce of CANONICAL_EQUATIONS) {\n if (!ce.scalarAst) continue;\n const canonNormal = normalForm(ce.scalarAst);\n for (const [bridgeId, bridge] of bridges) {\n const r = classifyAgainst(\n ce,\n ce.scalarAst,\n canonNormal,\n bridgeId,\n bridge,\n );\n if (r.classification !== 'unrelated') results.push(r);\n }\n }\n return results;\n}\n"]}
|
|
@@ -22,14 +22,6 @@
|
|
|
22
22
|
*/
|
|
23
23
|
import type { ExprNode } from '../dimensional/validator.js';
|
|
24
24
|
import type { Dimension } from '../dimensional/types.js';
|
|
25
|
-
/**
|
|
26
|
-
* A dimensionless symbol is a droppable "up to a constant" factor only when it
|
|
27
|
-
* is a numeric literal (`2`, `-1`, `0.5`), a registered named constant
|
|
28
|
-
* (`ln2`, `4pi`, …), or a spelled-out numeric constant (`6pi`, `ln_2_constant`).
|
|
29
|
-
* Any OTHER dimensionless symbol is a stub for an unknown dimensionless quantity
|
|
30
|
-
* (a parameter or a functional like `ln⟨exp(−βW)⟩`) and is structural —
|
|
31
|
-
* dropping it would conflate distinct interiors.
|
|
32
|
-
*/
|
|
33
25
|
/**
|
|
34
26
|
* Bridge ASTs still spell a governing quantity with the short symbol (`T`, `M`,
|
|
35
27
|
* `m_1`, `m_2`). The registry uses one name. The structural hash treats the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normal-form.d.ts","sourceRoot":"","sources":["../../src/canonical/normal-form.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"normal-form.d.ts","sourceRoot":"","sources":["../../src/canonical/normal-form.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AA4BzD;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,GAAG,MAAM,CAK1E;AAoDD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAiEjD;AAED,iFAAiF;AACjF,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,GAAG,OAAO,CAEnE"}
|
|
@@ -13,20 +13,13 @@ const UNIT = '1';
|
|
|
13
13
|
/**
|
|
14
14
|
* Spelled-out dimensionless numeric constants some encoders write as a named
|
|
15
15
|
* symbol rather than a literal — genuine constants the eval `CONSTANTS`
|
|
16
|
-
* registry
|
|
17
|
-
*
|
|
18
|
-
* of `ln 2`. These stay droppable;
|
|
19
|
-
* PARAMETER stub (`alpha`,
|
|
16
|
+
* registry does not list under that spelling (its own keys are the canonical
|
|
17
|
+
* rows of the constant registry; `piMultipleValue` reads `pi`/`2pi`/`6pi`/…).
|
|
18
|
+
* `ln_2_constant` is BE-16's spelling of `ln 2`. These stay droppable;
|
|
19
|
+
* everything else dimensionless-and-named is a PARAMETER stub (`alpha`,
|
|
20
|
+
* `lambda`, `g_dark`, `ln⟨e^−βW⟩`, …) and is kept.
|
|
20
21
|
*/
|
|
21
22
|
const NAMED_DIMENSIONLESS_CONSTANTS = new Set(['ln_2_constant']);
|
|
22
|
-
/**
|
|
23
|
-
* A dimensionless symbol is a droppable "up to a constant" factor only when it
|
|
24
|
-
* is a numeric literal (`2`, `-1`, `0.5`), a registered named constant
|
|
25
|
-
* (`ln2`, `4pi`, …), or a spelled-out numeric constant (`6pi`, `ln_2_constant`).
|
|
26
|
-
* Any OTHER dimensionless symbol is a stub for an unknown dimensionless quantity
|
|
27
|
-
* (a parameter or a functional like `ln⟨exp(−βW)⟩`) and is structural —
|
|
28
|
-
* dropping it would conflate distinct interiors.
|
|
29
|
-
*/
|
|
30
23
|
/**
|
|
31
24
|
* Bridge ASTs still spell a governing quantity with the short symbol (`T`, `M`,
|
|
32
25
|
* `m_1`, `m_2`). The registry uses one name. The structural hash treats the
|
|
@@ -42,6 +35,14 @@ export function canonicalQuantityName(name, dim) {
|
|
|
42
35
|
}
|
|
43
36
|
return quantityIdForSpelling(name) ?? name;
|
|
44
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* A dimensionless symbol is a droppable "up to a constant" factor only when it
|
|
40
|
+
* is a numeric literal (`2`, `-1`, `0.5`), a registered named constant
|
|
41
|
+
* (`ln2`, `4pi`, …), or a spelled-out numeric constant (`6pi`, `ln_2_constant`).
|
|
42
|
+
* Any OTHER dimensionless symbol is a stub for an unknown dimensionless quantity
|
|
43
|
+
* (a parameter or a functional like `ln⟨exp(−βW)⟩`) and is structural —
|
|
44
|
+
* dropping it would conflate distinct interiors.
|
|
45
|
+
*/
|
|
45
46
|
function isDroppableConstant(name) {
|
|
46
47
|
return (name in CONSTANTS ||
|
|
47
48
|
Number.isFinite(Number(name)) ||
|
|
@@ -124,6 +125,10 @@ export function normalForm(node) {
|
|
|
124
125
|
// dimensionless exponent is never dropped (symmetric for direct
|
|
125
126
|
// symbols and op sub-expressions alike).
|
|
126
127
|
const base = normalForm(node.args[0]);
|
|
128
|
+
// A dimensionless constant to any power is still a dimensionless constant (π², √(2π)),
|
|
129
|
+
// dropped as the constant is; the exponent is structural only on a dimensionful base.
|
|
130
|
+
if (base === UNIT)
|
|
131
|
+
return UNIT;
|
|
127
132
|
return `^(${base},${rawForm(node.args[1])})`;
|
|
128
133
|
}
|
|
129
134
|
case '+':
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normal-form.js","sourceRoot":"","sources":["../../src/canonical/normal-form.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC3F,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAElF,MAAM,eAAe,GAAG,CAAC,CAAY,EAAW,EAAE,CAChD,CAAC,CAAC,CAAC,KAAK,CAAC;IACT,CAAC,CAAC,CAAC,KAAK,CAAC;IACT,CAAC,CAAC,CAAC,KAAK,CAAC;IACT,CAAC,CAAC,CAAC,KAAK,CA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,CAAC,CAAC,CAAC,CAAC;AACzC,CAAC","sourcesContent":["/**\n * Normalized structural form of a scalar `ExprNode`, **up to dimensionless\n * multiplicative factors** — the hash the F4 circularity guard uses to decide\n * whether a bridge's RHS and a canonical equation encode the same relation.\n *\n * Two expressions hash equal when they differ only by:\n * - dimensionless multiplicative CONSTANTS (numeric literals + registered\n * named constants: ln2, 4π, …),\n * - product nesting (`(a·b)·c` vs `a·b·c`),\n * - commutative reordering of `*` / `+` operands.\n *\n * They hash DIFFERENT when an exponent differs (T⁴ ≠ T), the non-dimensionless\n * factor set differs, OR a dimensionless **stub** differs. A dimensionless\n * symbol that is NOT a recognized constant is a STUB for an unknown\n * dimensionless quantity (e.g. `ln⟨exp(−βW)⟩` in BE-29) — it is kept as a\n * distinct structural token, so Jarzynski's `ln⟨e^−βW⟩` and Landauer's `ln2`\n * no longer collapse to the same form (\"up to a *constant*\" must not absorb a\n * differing functional). Sums keep every term; `^` keeps its exponent; `/`\n * keeps the numerator/denominator split.\n *\n * @module canonical/normal-form\n */\nimport type { ExprNode } from '../dimensional/validator.js';\nimport type { Dimension } from '../dimensional/types.js';\nimport { equals } from '../dimensional/algebra.js';\nimport { DIMENSION_RENAMES, quantityIdForSpelling } from '../dimensional/formula-names.js';\nimport { CONSTANTS, piMultipleValue } from '../dimensional/symbolic-constants.js';\n\nconst isDimensionless = (d: Dimension): boolean =>\n d.L === 0 &&\n d.M === 0 &&\n d.T === 0 &&\n d.I === 0 &&\n d.Theta === 0 &&\n d.N === 0 &&\n d.J === 0;\n\n/** Token for a node that carries no structural content (a dimensionless factor). */\nconst UNIT = '1';\n\n/**\n * Spelled-out dimensionless numeric constants some encoders write as a named\n * symbol rather than a literal — genuine constants the eval `CONSTANTS`\n * registry does not list under that spelling (its own keys are the canonical\n * rows of the constant registry; `piMultipleValue` reads `pi`/`2pi`/`6pi`/…).\n * `ln_2_constant` is BE-16's spelling of `ln 2`. These stay droppable;\n * everything else dimensionless-and-named is a PARAMETER stub (`alpha`,\n * `lambda`, `g_dark`, `ln⟨e^−βW⟩`, …) and is kept.\n */\nconst NAMED_DIMENSIONLESS_CONSTANTS = new Set(['ln_2_constant']);\n\n/**\n * Bridge ASTs still spell a governing quantity with the short symbol (`T`, `M`,\n * `m_1`, `m_2`). The registry uses one name. The structural hash treats the\n * short spelling as that name when the dimension is the quantity's dimension,\n * so a time coordinate named `T` stays a different symbol.\n *\n * @internal\n */\nexport function canonicalQuantityName(name: string, dim: Dimension): string {\n for (const row of DIMENSION_RENAMES) {\n if (row.symbol === name && equals(dim, row.dimension)) return row.name;\n }\n return quantityIdForSpelling(name) ?? name;\n}\n\n/**\n * A dimensionless symbol is a droppable \"up to a constant\" factor only when it\n * is a numeric literal (`2`, `-1`, `0.5`), a registered named constant\n * (`ln2`, `4pi`, …), or a spelled-out numeric constant (`6pi`, `ln_2_constant`).\n * Any OTHER dimensionless symbol is a stub for an unknown dimensionless quantity\n * (a parameter or a functional like `ln⟨exp(−βW)⟩`) and is structural —\n * dropping it would conflate distinct interiors.\n */\nfunction isDroppableConstant(name: string): boolean {\n return (\n name in CONSTANTS ||\n Number.isFinite(Number(name)) ||\n NAMED_DIMENSIONLESS_CONSTANTS.has(name) ||\n piMultipleValue(name) !== undefined\n );\n}\n\n/**\n * Full structural serialization that NEVER drops dimensionless factors — used\n * for `^` exponents, which are structural (T⁴ ≠ T) and must not be treated\n * \"up to dimensionless factors\". Commutative operands are still sorted so the\n * exponent comparison is robust to reordering.\n */\nfunction rawForm(node: ExprNode): string {\n switch (node.kind) {\n case 'symbol':\n return `s:${node.name}`;\n case 'op': {\n const parts = node.args.map(rawForm);\n if (node.op === '*' || node.op === '+') parts.sort();\n return `${node.op}(${parts.join(',')})`;\n }\n case 'transcendental':\n return `${node.fn}[${rawForm(node.arg)}]`;\n case 'abs':\n return `abs[${rawForm(node.arg)}]`;\n default:\n return `${node.kind}:${JSON.stringify(node)}`;\n }\n}\n\n/** Collect the factors of a (possibly nested) `*` product. */\nfunction flattenProduct(node: ExprNode, out: ExprNode[]): void {\n if (node.kind === 'op' && node.op === '*') {\n for (const a of node.args) flattenProduct(a, out);\n } else {\n out.push(node);\n }\n}\n\n/**\n * The normalized structural form of `node`. Equal strings ⇒ same relation up to\n * dimensionless multiplicative factors.\n */\nexport function normalForm(node: ExprNode): string {\n switch (node.kind) {\n case 'symbol':\n // A non-dimensionless symbol is structural. A dimensionless symbol is a\n // droppable factor ONLY when it is a recognized constant; otherwise it is\n // a stub for an unknown dimensionless quantity and is kept (tagged) so two\n // different stubs do not collapse to the same form.\n if (!isDimensionless(node.dim)) return `sym:${canonicalQuantityName(node.name, node.dim)}`;\n return isDroppableConstant(node.name) ? UNIT : `stub:${node.name}`;\n\n case 'op': {\n switch (node.op) {\n case '*': {\n const factors: ExprNode[] = [];\n flattenProduct(node, factors);\n const kept = factors\n .map(normalForm)\n .filter((f) => f !== UNIT) // drop dimensionless factors\n .sort();\n if (kept.length === 0) return UNIT;\n if (kept.length === 1) return kept[0];\n return `*(${kept.join(',')})`;\n }\n case '/': {\n const num = normalForm(node.args[0]);\n const den = normalForm(node.args[1]);\n if (den === UNIT) return num; // ÷ dimensionless ⇒ the numerator\n return `/(${num},${den})`;\n }\n case '^': {\n // The exponent is structural (T⁴ ≠ T) and must NOT be reduced\n // \"up to dimensionless factors\" — serialize it with rawForm so a\n // dimensionless exponent is never dropped (symmetric for direct\n // symbols and op sub-expressions alike).\n const base = normalForm(node.args[0]);\n // A dimensionless constant to any power is still a dimensionless constant (π², √(2π)),\n // dropped as the constant is; the exponent is structural only on a dimensionful base.\n if (base === UNIT) return UNIT;\n return `^(${base},${rawForm(node.args[1])})`;\n }\n case '+':\n case '-': {\n const parts = node.args.map(normalForm);\n if (node.op === '+') parts.sort();\n return `${node.op}(${parts.join(',')})`;\n }\n default:\n return `op:${JSON.stringify(node)}`;\n }\n }\n\n case 'transcendental': {\n // ln(2) is the same dimensionless constant as the symbol `ln2`.\n const arg = normalForm(node.arg);\n if (arg === UNIT) return UNIT;\n return `${node.fn}(${arg})`;\n }\n\n case 'abs':\n return `abs(${normalForm(node.arg)})`;\n\n default:\n // integral / derivative / tensor arms: compare structurally by kind+shape.\n return `${node.kind}:${JSON.stringify(node)}`;\n }\n}\n\n/** Whether two scalar ASTs are the same relation up to dimensionless factors. */\nexport function structurallyEqual(a: ExprNode, b: ExprNode): boolean {\n return normalForm(a) === normalForm(b);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/canonical/registry.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAiC;IAC/D,GAAG,oBAAoB;IACvB,GAAG,UAAU;IACb,GAAG,SAAS;IACZ,GAAG,gBAAgB;IACnB,GAAG,YAAY;IACf,GAAG,oBAAoB;IACvB,GAAG,MAAM;IACT,GAAG,gBAAgB;IACnB,GAAG,qBAAqB;IACxB,GAAG,WAAW;CACf,CAAC;AAEF,kBAAkB;AAClB,MAAM,CAAC,MAAM,eAAe,GAC1B,M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C;SAClC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,CAAC","sourcesContent":["/**\n * The canonical-equation registry — the queryable index of the L-layer.\n * Seeded incrementally by `entries/*` modules (Tasks 2,4,5,9); this file owns\n * the assembled array, the id map, and the accessors.\n *\n * @module canonical/registry\n */\nimport type { CanonicalEquation, CanonicalDomain } from './canonical-equation.js';\nimport { BRIDGE_EQUATIONS } from '../bridges/index.js';\nimport { DIMENSIONAL_CLASSICS } from './entries/dimensional-classics.js';\nimport { RELATIVITY } from './entries/relativity.js';\nimport { MECHANICS } from './entries/mechanics.js';\nimport { ELECTROMAGNETISM } from './entries/electromagnetism.js';\nimport { FLUIDS_WAVES } from './entries/fluids-waves.js';\nimport { THERMO_NUCLEAR_COSMO } from './entries/thermo-nuclear-cosmo.js';\nimport { ATOMIC } from './entries/atomic.js';\nimport { CONDENSED_MATTER } from './entries/condensed-matter.js';\nimport { STATISTICAL_MECHANICS } from './entries/statistical-mechanics.js';\nimport { NONMONOMIAL } from './entries/nonmonomial.js';\n\n/**\n * Every canonical equation in the registry. The L1 entries are grouped by\n * physics domain (relativity / EM / thermo / atomic / …); the former\n * `l1-gravity-thermo` and `l1-quantum-em` batch files were folded into these\n * domain-named modules in the 2026-06-22 god-file split.\n */\nexport const CANONICAL_EQUATIONS: readonly CanonicalEquation[] = [\n ...DIMENSIONAL_CLASSICS,\n ...RELATIVITY,\n ...MECHANICS,\n ...ELECTROMAGNETISM,\n ...FLUIDS_WAVES,\n ...THERMO_NUCLEAR_COSMO,\n ...ATOMIC,\n ...CONDENSED_MATTER,\n ...STATISTICAL_MECHANICS,\n ...NONMONOMIAL,\n];\n\n/** Id → entry. */\nexport const CANONICAL_BY_ID: Readonly<Record<string, CanonicalEquation>> =\n Object.fromEntries(CANONICAL_EQUATIONS.map((e) => [e.id, e]));\n\n/** The entry with id `id`, or `undefined`. */\nexport function canonicalById(id: string): CanonicalEquation | undefined {\n return CANONICAL_BY_ID[id];\n}\n\n/** Every entry in `domain`. */\nexport function canonicalByDomain(\n domain: CanonicalDomain,\n): readonly CanonicalEquation[] {\n return CANONICAL_EQUATIONS.filter((e) => e.domain === domain);\n}\n\n/**\n * Canonical equations whose `dimensional.target.name` is `name`. Usually 0 or 1;\n * a length > 1 means the target quantity is shared (the caller must treat that as\n * ambiguous). Used by the identity-consequence surfacer to recover the source\n * equation behind a discovery candidate's endpoint.\n */\nexport function canonicalByTarget(\n name: string,\n): readonly CanonicalEquation[] {\n return CANONICAL_EQUATIONS.filter((e) => e.dimensional.target.name === name);\n}\n\n/** Catalog bridge ids (string form) that at least one canonical entry names as\n * a `partnerBridges` / `restatesBridge` correspondence. */\nexport function partneredBridgeIds(): Set<string> {\n const ids = new Set<string>();\n for (const e of CANONICAL_EQUATIONS) {\n for (const b of e.partnerBridges) ids.add(b);\n if (e.restatesBridge) ids.add(e.restatesBridge);\n }\n return ids;\n}\n\n/**\n * Catalog bridges with NO canonical correspondence partner yet — the explicit,\n * logged coverage gap (review finding F2). Sorted by numeric id. The count is\n * pinned by a test so shrinking it (adding a partner) is a deliberate act.\n */\nexport function bridgesWithoutCanonicalPartner(): string[] {\n const partnered = partneredBridgeIds();\n return BRIDGE_EQUATIONS.map((b) => String(b.id))\n .filter((id) => !partnered.has(id))\n .sort((a, b) => Number(a) - Number(b));\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"residual.js","sourceRoot":"","sources":["../../src/canonical/residual.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,CAAoB;IACpD,IAAI,CAAC,CAAC,SAAS,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAChD,MAAM,MAAM,GAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;IAC5G,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC;AAC9D,CAAC"}
|
|
1
|
+
{"version":3,"file":"residual.js","sourceRoot":"","sources":["../../src/canonical/residual.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,CAAoB;IACpD,IAAI,CAAC,CAAC,SAAS,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAChD,MAAM,MAAM,GAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;IAC5G,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC;AAC9D,CAAC","sourcesContent":["/**\n * Residual form of a canonical equation: `target − scalarAst`.\n *\n * A canonical entry stores the RIGHT-HAND SIDE of one target (`scalarAst`), for example `m·a` for\n * the target force. A claim, as a user or the benchmark writes it, is a RELATION: `F − m·a`. The\n * structural key of a residual and of a right-hand side can never be equal, so a structural search\n * that compares a claim with `scalarAst` never matches. The criterion 3 study measured this: 0 of\n * 11,125 query × record pairs (pre-registration Amendment 8). Putting the canonical entry in residual\n * form makes both sides the same kind of object.\n *\n * Symbol names are not unified here. The structural key renames every dimensioned symbol to its\n * dimension, so `F` and `force` compare equal there. Symbol overlap still sees the two naming\n * conventions (`k_B` against `boltzmann-constant`), and no alias map bridges them.\n *\n * @module canonical/residual\n * @internal\n */\n\nimport type { ExprNode } from '../dimensional/ast-types.js';\nimport type { CanonicalEquation } from './canonical-equation.js';\n\n/**\n * The residual `target − scalarAst` of a canonical entry, or `undefined` when the entry has no\n * `scalarAst`. The target becomes a symbol with its name and dimension; the right-hand side is the\n * entry's own `scalarAst`, not a copy.\n *\n * @internal\n */\nexport function canonicalResidual(e: CanonicalEquation): ExprNode | undefined {\n if (e.scalarAst === undefined) return undefined;\n const target: ExprNode = { kind: 'symbol', name: e.dimensional.target.name, dim: e.dimensional.target.dim };\n return { kind: 'op', op: '-', args: [target, e.scalarAst] };\n}\n"]}
|
|
@@ -9,7 +9,13 @@ import type { CanonicalEquation } from './canonical-equation.js';
|
|
|
9
9
|
import type { PhysicalLaw, TensorConfig } from '../core/types.js';
|
|
10
10
|
import { UniversalTensor } from '../core/tensor.js';
|
|
11
11
|
/** A `TensorConfig` whose axes cover every regime the canonical registry uses,
|
|
12
|
-
* so `seedCanonicalLaws` never trips axis-membership validation.
|
|
12
|
+
* so `seedCanonicalLaws` never trips axis-membership validation. The scale,
|
|
13
|
+
* force and symmetry lists are the tensor's own unions (`PhysicalScale`,
|
|
14
|
+
* `Force`, `Symmetry`), written here because the canonical layer may not
|
|
15
|
+
* import the composition layer's axis registry (`layer:check`);
|
|
16
|
+
* `tests/composition/axes.test.ts` compares them to that registry so the two
|
|
17
|
+
* cannot drift apart. The information measures are the tensor's camelCase
|
|
18
|
+
* vocabulary (`InformationMeasure`). */
|
|
13
19
|
export declare const CANONICAL_TENSOR_CONFIG: TensorConfig;
|
|
14
20
|
/** Map a canonical entry onto the `PhysicalLaw` shape the L-layer consumes.
|
|
15
21
|
* Canonical laws are ground truth → `confidence: 1`. Regime axes map to the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seed-l-layer.d.ts","sourceRoot":"","sources":["../../src/canonical/seed-l-layer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD;
|
|
1
|
+
{"version":3,"file":"seed-l-layer.d.ts","sourceRoot":"","sources":["../../src/canonical/seed-l-layer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD;;;;;;;yCAOyC;AACzC,eAAO,MAAM,uBAAuB,EAAE,YAMrC,CAAC;AAEF;;mFAEmF;AACnF,wBAAgB,cAAc,CAAC,EAAE,EAAE,iBAAiB,GAAG,WAAW,CAejE;AAED,iFAAiF;AACjF,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,eAAe,GAAG,MAAM,CAM5D"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { CANONICAL_EQUATIONS } from './registry.js';
|
|
2
2
|
/** A `TensorConfig` whose axes cover every regime the canonical registry uses,
|
|
3
|
-
* so `seedCanonicalLaws` never trips axis-membership validation.
|
|
3
|
+
* so `seedCanonicalLaws` never trips axis-membership validation. The scale,
|
|
4
|
+
* force and symmetry lists are the tensor's own unions (`PhysicalScale`,
|
|
5
|
+
* `Force`, `Symmetry`), written here because the canonical layer may not
|
|
6
|
+
* import the composition layer's axis registry (`layer:check`);
|
|
7
|
+
* `tests/composition/axes.test.ts` compares them to that registry so the two
|
|
8
|
+
* cannot drift apart. The information measures are the tensor's camelCase
|
|
9
|
+
* vocabulary (`InformationMeasure`). */
|
|
4
10
|
export const CANONICAL_TENSOR_CONFIG = {
|
|
5
11
|
rank: 6,
|
|
6
12
|
scales: ['quantum', 'mesoscopic', 'classical', 'cosmological'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seed-l-layer.js","sourceRoot":"","sources":["../../src/canonical/seed-l-layer.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpD;
|
|
1
|
+
{"version":3,"file":"seed-l-layer.js","sourceRoot":"","sources":["../../src/canonical/seed-l-layer.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpD;;;;;;;yCAOyC;AACzC,MAAM,CAAC,MAAM,uBAAuB,GAAiB;IACnD,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,CAAC,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,CAAC;IAC9D,MAAM,EAAE,CAAC,eAAe,EAAE,iBAAiB,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,CAAC;IAC1E,UAAU,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,CAAC;IAClE,mBAAmB,EAAE,CAAC,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,gBAAgB,CAAC;CAC/E,CAAC;AAEF;;mFAEmF;AACnF,MAAM,UAAU,cAAc,CAAC,EAAqB;IAClD,MAAM,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IACpB,OAAO;QACL,EAAE,EAAE,EAAE,CAAC,EAAE;QACT,IAAI,EAAE,EAAE,CAAC,IAAI;QACb,QAAQ,EAAE,EAAE,CAAC,aAAa;QAC1B,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;QAChC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;QAChC,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE;QAC1C,UAAU,EAAE,CAAC;QACb,mBAAmB,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS;QAChE,UAAU,EAAE,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS;QACjE,UAAU,EAAE,CAAC,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS;QAC/D,UAAU,EAAE,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC;KAC/B,CAAC;AACJ,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,iBAAiB,CAAC,CAAkB;IAClD,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,KAAK,MAAM,EAAE,IAAI,mBAAmB,EAAE,CAAC;QACrC,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;YAAE,KAAK,EAAE,CAAC;IAC5C,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["/**\n * Seed the canonical-equation registry into the tensor's L-layer (Π = L + B + E)\n * via the existing `addLaw` path. `canonicalToLaw` maps a registry entry onto the\n * `PhysicalLaw` shape; `seedCanonicalLaws` adds them all and returns the count.\n *\n * @module canonical/seed-l-layer\n */\nimport type { CanonicalEquation } from './canonical-equation.js';\nimport type { PhysicalLaw, TensorConfig } from '../core/types.js';\nimport { UniversalTensor } from '../core/tensor.js';\nimport { CANONICAL_EQUATIONS } from './registry.js';\n\n/** A `TensorConfig` whose axes cover every regime the canonical registry uses,\n * so `seedCanonicalLaws` never trips axis-membership validation. The scale,\n * force and symmetry lists are the tensor's own unions (`PhysicalScale`,\n * `Force`, `Symmetry`), written here because the canonical layer may not\n * import the composition layer's axis registry (`layer:check`);\n * `tests/composition/axes.test.ts` compares them to that registry so the two\n * cannot drift apart. The information measures are the tensor's camelCase\n * vocabulary (`InformationMeasure`). */\nexport const CANONICAL_TENSOR_CONFIG: TensorConfig = {\n rank: 6,\n scales: ['quantum', 'mesoscopic', 'classical', 'cosmological'],\n forces: ['gravitational', 'electromagnetic', 'weak', 'strong', 'emergent'],\n symmetries: ['poincare', 'gauge', 'conformal', 'susy', 'emergent'],\n informationMeasures: ['vonNeumann', 'shannon', 'kolmogorov', 'quantumDiscord'],\n};\n\n/** Map a canonical entry onto the `PhysicalLaw` shape the L-layer consumes.\n * Canonical laws are ground truth → `confidence: 1`. Regime axes map to the\n * law's single-valued axis arrays (empty when the regime leaves an axis open). */\nexport function canonicalToLaw(ce: CanonicalEquation): PhysicalLaw {\n const r = ce.regime;\n return {\n id: ce.id,\n name: ce.name,\n equation: ce.formula_latex,\n scales: r.scale ? [r.scale] : [],\n forces: r.force ? [r.force] : [],\n symmetries: r.symmetry ? [r.symmetry] : [],\n confidence: 1,\n informationMeasures: r.information ? [r.information] : undefined,\n dimensions: r.dimension !== undefined ? [r.dimension] : undefined,\n topologies: r.topology !== undefined ? [r.topology] : undefined,\n references: [...ce.references],\n };\n}\n\n/** Seed every canonical equation into `t`'s L-layer. Returns the count added. */\nexport function seedCanonicalLaws(t: UniversalTensor): number {\n let added = 0;\n for (const ce of CANONICAL_EQUATIONS) {\n if (t.addLaw(canonicalToLaw(ce))) added++;\n }\n return added;\n}\n"]}
|
|
@@ -70,6 +70,27 @@ export interface ChainProvisional {
|
|
|
70
70
|
}
|
|
71
71
|
/** Decision (a) for one chain. @internal */
|
|
72
72
|
export type ChainClassification = ChainConfirmation | ChainRestatement | ChainProvisional;
|
|
73
|
+
/**
|
|
74
|
+
* A bridge RHS reduced to its comparison-ready, canonical-invariant form: its
|
|
75
|
+
* validated dimension (`null` when validation failed) and its normal-form
|
|
76
|
+
* hash. Both depend only on the bridge.
|
|
77
|
+
*
|
|
78
|
+
* @internal
|
|
79
|
+
*/
|
|
80
|
+
export interface BridgeShape {
|
|
81
|
+
readonly rhs: ExprNode;
|
|
82
|
+
readonly dim: Dimension | null;
|
|
83
|
+
readonly normal: string;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Every bridge RHS, validated and normal-formed ONCE for the process.
|
|
87
|
+
* `BRIDGE_RHS_BY_ID` is static, so the table is computed on first use and
|
|
88
|
+
* kept; a chain classification and a linkage scan both read it instead of
|
|
89
|
+
* re-validating every entry per call (9.0.0 audit §4 Low).
|
|
90
|
+
*
|
|
91
|
+
* @internal
|
|
92
|
+
*/
|
|
93
|
+
export declare function bridgeShapes(): ReadonlyMap<number, BridgeShape>;
|
|
73
94
|
/**
|
|
74
95
|
* The structural classifier.
|
|
75
96
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structural.d.ts","sourceRoot":"","sources":["../../src/canonical/structural.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAMzD,yEAAyE;AACzE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAC5B,kEAAkE;IAClE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC;IACzB,qEAAqE;IACrE,QAAQ,CAAC,QAAQ,EAAE,SAAS,GAAG,IAAI,CAAC;IACpC,mEAAmE;IACnE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,+DAA+D;IAC/D,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5C,+EAA+E;I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AAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAED,4CAA4C;AAC5C,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,GAAG,gBAAgB,GAAG,gBAAgB,CAAC;AAiC1F;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;IACvB,QAAQ,CAAC,GAAG,EAAE,SAAS,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAID;;;;;;;GAOG;AACH,wBAAgB,YAAY,IAAI,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,CAU/D;AAyED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,cAAc,GAAG,kBAAkB,CAAC;AAC5E,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,mBAAmB,CAAC"}
|
|
@@ -27,6 +27,26 @@ function comparePair(pair) {
|
|
|
27
27
|
function bridgeRank(id) {
|
|
28
28
|
return /^\d+$/.test(id) ? Number(id) : Number.POSITIVE_INFINITY;
|
|
29
29
|
}
|
|
30
|
+
let bridgeShapeTable;
|
|
31
|
+
/**
|
|
32
|
+
* Every bridge RHS, validated and normal-formed ONCE for the process.
|
|
33
|
+
* `BRIDGE_RHS_BY_ID` is static, so the table is computed on first use and
|
|
34
|
+
* kept; a chain classification and a linkage scan both read it instead of
|
|
35
|
+
* re-validating every entry per call (9.0.0 audit §4 Low).
|
|
36
|
+
*
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
export function bridgeShapes() {
|
|
40
|
+
if (bridgeShapeTable === undefined) {
|
|
41
|
+
const table = new Map();
|
|
42
|
+
for (const [id, rhs] of BRIDGE_RHS_BY_ID) {
|
|
43
|
+
const v = validate(rhs);
|
|
44
|
+
table.set(id, { rhs, dim: v.ok ? v.inferredDimension : null, normal: normalForm(rhs) });
|
|
45
|
+
}
|
|
46
|
+
bridgeShapeTable = table;
|
|
47
|
+
}
|
|
48
|
+
return bridgeShapeTable;
|
|
49
|
+
}
|
|
30
50
|
/**
|
|
31
51
|
* Provisional id for a chain. The edge ids stay in the order the caller
|
|
32
52
|
* passed, which is the chain order. They are not sorted.
|
|
@@ -75,14 +95,14 @@ function classifyChain(expr, edgeIds) {
|
|
|
75
95
|
};
|
|
76
96
|
}
|
|
77
97
|
const confirmations = [];
|
|
78
|
-
for (const [id,
|
|
79
|
-
const bridge = validate(rhs);
|
|
98
|
+
for (const [id, bridge] of bridgeShapes()) {
|
|
80
99
|
const relation = comparePair({
|
|
81
100
|
left: expr,
|
|
82
101
|
leftDim,
|
|
83
102
|
leftNormal,
|
|
84
|
-
right: rhs,
|
|
85
|
-
rightDim: bridge.
|
|
103
|
+
right: bridge.rhs,
|
|
104
|
+
rightDim: bridge.dim,
|
|
105
|
+
rightNormal: bridge.normal,
|
|
86
106
|
restatesBridge: undefined,
|
|
87
107
|
bridgeId: String(id),
|
|
88
108
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structural.js","sourceRoot":"","sources":["../../src/canonical/structural.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AA4D9C,MAAM,QAAQ,GAAG,CAAC,CAAY,EAAE,CAAY,EAAW,EAAE,CACvD,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IACX,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IACX,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IACX,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IACX,CAAC,CAAC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AAQ,EAAE,MAAM,CAAC,GAAG;YACpB,WAAW,EAAE,MAAM,CAAC,MAAM;YAC1B,cAAc,EAAE,SAAS;YACzB,QAAQ,EAAE,MAAM,CAAC,EAAE,CAAC;SACrB,CAAC,CAAC;QACH,IAAI,QAAQ,CAAC,eAAe,IAAI,QAAQ,CAAC,QAAQ;YAAE,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC5E,CAAC;IACD,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACpC,MAAM,SAAS,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;IACnC,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC5B,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;IAC/D,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,EAAE,kBAAkB,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AACpF,CAAC;AAaD,MAAM,UAAU,iBAAiB,CAC/B,UAAqC,EACrC,OAA2B;IAE3B,IAAI,gBAAgB,CAAC,UAAU,CAAC;QAAE,OAAO,WAAW,CAAC,UAAU,CAAC,CAAC;IACjE,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,MAAM,IAAI,SAAS,CAAC,uDAAuD,CAAC,CAAC;IAC/E,CAAC;IACD,OAAO,aAAa,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AAC5C,CAAC","sourcesContent":["/**\n * Structural half of a bridge↔canonical comparison, shared with the chain\n * pipeline. Same dimension, `normalForm`, and the F4 `restatesBridge` guard.\n *\n * This module does not import `composition/expr-eval.ts`. Numerical agreement\n * is not a result here and is not a confirmation. `linkage.ts` calls\n * {@link classifyStructure} and then runs its own numerical recovery.\n *\n * A chain whose normal form matches a catalog right-hand side the registry\n * did not pre-declare confirms that catalog id. The call writes nothing.\n * A chain that matches a canonical equation the registry pre-declared with\n * `restatesBridge` is a restatement. Any other chain receives a provisional\n * id, `chain-` followed by the ordered edge ids. That id is not a catalog\n * id. It enters `BRIDGE_EQUATIONS` only after a vendored PhysJS proof, which\n * this function does not record.\n *\n * @module canonical/structural\n */\nimport type { ExprNode } from '../dimensional/validator.js';\nimport type { Dimension } from '../dimensional/types.js';\nimport { validate } from '../dimensional/validator.js';\nimport { BRIDGE_RHS_BY_ID } from '../bridges/rhs-registry.js';\nimport { CANONICAL_EQUATIONS } from './registry.js';\nimport { normalForm } from './normal-form.js';\n\n/** One side of a structural comparison, plus the F4 inputs. @internal */\nexport interface StructuralPair {\n readonly left: ExprNode;\n readonly leftDim: Dimension;\n /** Precomputed `normalForm(left)`. Computed here when omitted. */\n readonly leftNormal?: string;\n readonly right: ExprNode;\n /** Inferred dimension of `right`, or null when validation failed. */\n readonly rightDim: Dimension | null;\n /** Precomputed `normalForm(right)`. Computed here when omitted. */\n readonly rightNormal?: string;\n /** The canonical entry's `restatesBridge`, when it has one. */\n readonly restatesBridge: string | undefined;\n /** The bridge id this comparison is against, as `restatesBridge` spells it. */\n readonly bridgeId: string;\n}\n\n/** Dimension, normal form, and the F4 guard. No numerical recovery. @internal */\nexport interface StructuralRelation {\n readonly dimMatch: boolean;\n readonly structuralMatch: boolean;\n /**\n * True only when the normal forms match and `restatesBridge` names\n * `bridgeId`. A structural match the registry did not pre-declare is\n * not a restatement.\n */\n readonly restates: boolean;\n}\n\n/** A chain matched an existing catalog equation. Nothing was written. @internal */\nexport interface ChainConfirmation {\n readonly kind: 'confirmation';\n readonly catalogId: number;\n readonly edgeIds: readonly string[];\n}\n\n/** A chain matches a canonical equation the registry pre-declared. @internal */\nexport interface ChainRestatement {\n readonly kind: 'restatement';\n readonly canonicalId: string;\n readonly restatesBridge: string;\n readonly edgeIds: readonly string[];\n}\n\n/**\n * A chain that is neither a catalog confirmation nor a pre-declared\n * restatement. `id` is `chain-` plus the edge ids in chain order.\n * @internal\n */\nexport interface ChainProvisional {\n readonly kind: 'provisional';\n readonly id: string;\n readonly edgeIds: readonly string[];\n}\n\n/** Decision (a) for one chain. @internal */\nexport type ChainClassification = ChainConfirmation | ChainRestatement | ChainProvisional;\n\nconst dimEqual = (a: Dimension, b: Dimension): boolean =>\n a.L === b.L &&\n a.M === b.M &&\n a.T === b.T &&\n a.I === b.I &&\n a.Theta === b.Theta &&\n a.N === b.N &&\n a.J === b.J;\n\nfunction isStructuralPair(value: ExprNode | StructuralPair): value is StructuralPair {\n return !('kind' in value) && 'bridgeId' in value;\n}\n\nfunction comparePair(pair: StructuralPair): StructuralRelation {\n const leftNormal = pair.leftNormal ?? normalForm(pair.left);\n const rightNormal = pair.rightNormal ?? normalForm(pair.right);\n const structuralMatch = leftNormal === rightNormal;\n return {\n dimMatch: pair.rightDim != null && dimEqual(pair.rightDim, pair.leftDim),\n structuralMatch,\n restates:\n structuralMatch &&\n pair.restatesBridge !== undefined &&\n pair.restatesBridge === pair.bridgeId,\n };\n}\n\nfunction bridgeRank(id: string): number {\n return /^\\d+$/.test(id) ? Number(id) : Number.POSITIVE_INFINITY;\n}\n\n/**\n * A bridge RHS reduced to its comparison-ready, canonical-invariant form: its\n * validated dimension (`null` when validation failed) and its normal-form\n * hash. Both depend only on the bridge.\n *\n * @internal\n */\nexport interface BridgeShape {\n readonly rhs: ExprNode;\n readonly dim: Dimension | null;\n readonly normal: string;\n}\n\nlet bridgeShapeTable: ReadonlyMap<number, BridgeShape> | undefined;\n\n/**\n * Every bridge RHS, validated and normal-formed ONCE for the process.\n * `BRIDGE_RHS_BY_ID` is static, so the table is computed on first use and\n * kept; a chain classification and a linkage scan both read it instead of\n * re-validating every entry per call (9.0.0 audit §4 Low).\n *\n * @internal\n */\nexport function bridgeShapes(): ReadonlyMap<number, BridgeShape> {\n if (bridgeShapeTable === undefined) {\n const table = new Map<number, BridgeShape>();\n for (const [id, rhs] of BRIDGE_RHS_BY_ID) {\n const v = validate(rhs);\n table.set(id, { rhs, dim: v.ok ? v.inferredDimension : null, normal: normalForm(rhs) });\n }\n bridgeShapeTable = table;\n }\n return bridgeShapeTable;\n}\n\n/**\n * Provisional id for a chain. The edge ids stay in the order the caller\n * passed, which is the chain order. They are not sorted.\n */\nfunction provisionalChainId(edgeIds: readonly string[]): string {\n return `chain-${edgeIds.join('-')}`;\n}\n\nfunction classifyChain(expr: ExprNode, edgeIds: readonly string[]): ChainClassification {\n const ordered = [...edgeIds];\n const validated = validate(expr);\n const leftDim = validated.ok ? validated.inferredDimension : null;\n if (leftDim == null) {\n return { kind: 'provisional', id: provisionalChainId(ordered), edgeIds: ordered };\n }\n const leftNormal = normalForm(expr);\n\n const restatements: { canonicalId: string; restatesBridge: string }[] = [];\n for (const ce of CANONICAL_EQUATIONS) {\n if (ce.scalarAst === undefined || ce.restatesBridge === undefined) continue;\n const relation = comparePair({\n left: expr,\n leftDim,\n leftNormal,\n right: ce.scalarAst,\n rightDim: ce.dimensional.target.dim,\n restatesBridge: ce.restatesBridge,\n bridgeId: ce.restatesBridge,\n });\n if (relation.restates && relation.dimMatch) {\n restatements.push({ canonicalId: ce.id, restatesBridge: ce.restatesBridge });\n }\n }\n restatements.sort((a, b) => {\n const byBridge = bridgeRank(a.restatesBridge) - bridgeRank(b.restatesBridge);\n if (byBridge !== 0) return byBridge;\n return a.canonicalId < b.canonicalId ? -1 : a.canonicalId > b.canonicalId ? 1 : 0;\n });\n const restatement = restatements[0];\n if (restatement !== undefined) {\n return {\n kind: 'restatement',\n canonicalId: restatement.canonicalId,\n restatesBridge: restatement.restatesBridge,\n edgeIds: ordered,\n };\n }\n\n const confirmations: number[] = [];\n for (const [id, bridge] of bridgeShapes()) {\n const relation = comparePair({\n left: expr,\n leftDim,\n leftNormal,\n right: bridge.rhs,\n rightDim: bridge.dim,\n rightNormal: bridge.normal,\n restatesBridge: undefined,\n bridgeId: String(id),\n });\n if (relation.structuralMatch && relation.dimMatch) confirmations.push(id);\n }\n confirmations.sort((a, b) => a - b);\n const catalogId = confirmations[0];\n if (catalogId !== undefined) {\n return { kind: 'confirmation', catalogId, edgeIds: ordered };\n }\n\n return { kind: 'provisional', id: provisionalChainId(ordered), edgeIds: ordered };\n}\n\n/**\n * The structural classifier.\n *\n * A {@link StructuralPair} returns the dimension, normal-form, and F4\n * result `classifyLinkage` uses. An expression plus the chain's ordered\n * edge ids returns the chain classification. Both calls are this function.\n *\n * @internal\n */\nexport function classifyStructure(pair: StructuralPair): StructuralRelation;\nexport function classifyStructure(expr: ExprNode, edgeIds: readonly string[]): ChainClassification;\nexport function classifyStructure(\n exprOrPair: ExprNode | StructuralPair,\n edgeIds?: readonly string[],\n): StructuralRelation | ChainClassification {\n if (isStructuralPair(exprOrPair)) return comparePair(exprOrPair);\n if (edgeIds === undefined) {\n throw new TypeError('classifyStructure: a chain needs its ordered edge ids');\n }\n return classifyChain(exprOrPair, edgeIds);\n}\n"]}
|
|
@@ -201,10 +201,10 @@ export const BROWNIAN_SPHERE_CASE = {
|
|
|
201
201
|
unit: '',
|
|
202
202
|
meaning: "the memory force's own share: MSD_H against the Ornstein–Uhlenbeck MSD with the same τ_p (added mass, no memory)",
|
|
203
203
|
},
|
|
204
|
-
{ key: 'D_parallel_m2_per_s', symbol: 'D_∥', unit: 'm^2/s', meaning: 'D beside the wall, parallel to it: D·(Faxén series in a/h);
|
|
205
|
-
{ key: 'D_perp_m2_per_s', symbol: 'D_⊥', unit: 'm^2/s', meaning: 'D normal to the wall: D/λ, λ from Brenner\'s exact series;
|
|
206
|
-
{ key: 'MSD_wall_m2', symbol: '⟨|Δr|²⟩_w', unit: 'm^2', meaning: '2t(d_∥ D_∥ + d_⊥ D_⊥): the tracked horizontal axes parallel to the wall, a third one normal to it;
|
|
207
|
-
{ key: 'wall_deviation', symbol: 'MSD/MSD_w − 1', unit: '', meaning: signedRelativeDifference('unbounded-fluid MSD', 'wall-corrected one', '
|
|
204
|
+
{ key: 'D_parallel_m2_per_s', symbol: 'D_∥', unit: 'm^2/s', meaning: 'D beside the wall, parallel to it: D·(Faxén series in a/h); not defined without h_m' },
|
|
205
|
+
{ key: 'D_perp_m2_per_s', symbol: 'D_⊥', unit: 'm^2/s', meaning: 'D normal to the wall: D/λ, λ from Brenner\'s exact series; not defined without h_m' },
|
|
206
|
+
{ key: 'MSD_wall_m2', symbol: '⟨|Δr|²⟩_w', unit: 'm^2', meaning: '2t(d_∥ D_∥ + d_⊥ D_⊥): the tracked horizontal axes parallel to the wall, a third one normal to it; not defined without h_m' },
|
|
207
|
+
{ key: 'wall_deviation', symbol: 'MSD/MSD_w − 1', unit: '', meaning: signedRelativeDifference('unbounded-fluid MSD', 'wall-corrected one', 'not defined without h_m') },
|
|
208
208
|
],
|
|
209
209
|
comparison: {
|
|
210
210
|
reference: 'the parent Langevin model (bare mass, white noise; it has neither added mass nor hydrodynamic memory)',
|