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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discovery.js","sourceRoot":"","sources":["../../src/composition/discovery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAIH,OAAO,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEnD,8EAA8E;AAC9E,oEAAoE;AACpE,oEAAoE;AACpE,4EAA4E;AAC5E,2EAA2E;AAC3E,0CAA0C;AAC1C;4DAC4D;AAC5D,MAAM,CAAC,MAAM,2BAA2B,GAA0C,IAAI,GAAG,CACvF,aAAa,EAAE,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,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O;QACP,KAAK;QACL,WAAW;QACX,WAAW;QACX,cAAc;QACd,gBAAgB;KACjB,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAC7B,KAA4B,EAC5B,IAAI,GAAqB,EAAE;IAE3B,MAAM,YAAY,GAA+C;QAC/D,SAAS,EAAE,CAAC;QACZ,KAAK,EAAE,CAAC;QACR,iBAAiB,EAAE,CAAC;QACpB,aAAa,EAAE,CAAC;QAChB,YAAY,EAAE,CAAC;KAChB,CAAC;IACF,MAAM,GAAG,GAAG,qBAAqB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAC/C,MAAM,UAAU,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;IAChD,MAAM,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;IAClE,MAAM,CAAC,IAAI,CACT,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACP,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC;QACjD,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK;QACjB,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;QACtB,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CACzB,CAAC;IACF,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["/**\n * Discovery loop — vet link candidates through the verification primitives\n * (Direction 2).\n *\n * `proposeLinkCandidates` surfaces cross-cluster quantity pairs that share a\n * dimension and hands the raw coincidences to a human (the counts at a given\n * catalog are measured by the tests and recorded in NOTES.md). This\n * module closes the loop: it HYPOTHESIZES each candidate identification\n * `a ≡ b` and tests it with the machinery that already exists —\n *\n * - mergesComponents — does identifying a≡b connect two previously\n * disconnected parts of the graph? (structural\n * significance)\n * - unlocksFromAnchor — what becomes determinable from an anchor input\n * set WITH the identification that was not before?\n * (`forwardClosure`)\n * - numericallyConsistent — does retrodiction over the graph stay\n * all-consistent once the identification is\n * added, or does it introduce a contradiction?\n * (`retrodict` — the STRONG filter)\n *\n * so the physicist adjudicates a handful of VETTED, provenance-traced\n * candidates instead of dimensional noise.\n *\n * ⚠ Still a REVIEW SURFACE, never automated discovery (Part-VI §XXVII-B). A\n * shared dimension is a weak prior; the weight is on the numeric and\n * structural signals, and the numeric check only exercises the part of the\n * graph reachable from the anchor. `promising` means \"worth a physicist's\n * minute\", not \"true\".\n *\n * INTERNAL — not on the public surface (mirrors bridge-analysis.ts);\n * surfaced via `upt discover`.\n *\n * @module composition/discovery\n */\n\nimport type { BridgeEdge } from './edge.js';\nimport type { QuantityIdentification } from './compose.js';\nimport { QUANTITY_IDENTIFICATIONS, effectiveAttributes } from './compose.js';\nimport { GATE_AXES } from './axes.js';\nimport type { RegimeAttributes } from './quantity.js';\nimport { classifyIdentifiability, forwardClosure } from './identifiability.js';\nimport { retrodict, retrodictNode, forwardEvaluate } from './retrodiction.js';\nimport { proposeLinkCandidates } from './bridge-analysis.js';\nimport type { LinkCandidate } from './bridge-analysis.js';\nimport { M_SUN_KG } from '../core/constants.js';\nimport { REPRESENTATIVE_VALUES } from './representative-values.js';\nimport type { RepresentativeValue } from './representative-values.js';\nimport { conventionScaleToSI } from '../dimensional/unit-convention.js';\nimport { allQuantities } from './quantities.js';\nimport { CANONICAL_EQUATIONS } from '../canonical/registry.js';\nimport { format } from '../dimensional/algebra.js';\n\n// ── registry-only attribute lookup (D1 axis gate; Option-A resolution) ─────\n// Built from the centralized `Quantity` nodes ONLY (never canonical\n// per-equation stamps — audit adjudication F1). Names that aren't a\n// registry node (most bare canonical-equation variables) are simply absent,\n// so they always abstain — the canonical-only axis-clash=0 invariant holds\n// by construction, not by a special case.\n/** The canonical quantity→attributes map (registry nodes + per-equation stamps).\n * Exported for the axis-discrimination audit. @internal */\nexport const REGISTRY_ATTRIBUTES_BY_NAME: ReadonlyMap<string, RegimeAttributes> = new Map(\n allQuantities().map((quantity) => [quantity.name, quantity.attributes]),\n);\n\n// The axes the D1 regime-label gate compares are `GATE_AXES`, imported from the\n// `axes.ts` registry (`AXES.filter(gated)`) at the top of this module. Currently\n// scale + force; the 2026-07-05 extensible-axis expansion added\n// symmetry/topology/statistics as UNGATED attributes (they only abstain until the\n// discrimination audit earns them a gate — flip `gated: true` in axes.ts).\n\n// ── canonical-kind indexes (Sub-project C) ──────────────────────────────────\n// Discovery quantity names and canonical variable names are different\n// namespaces; the alignable axis is the DIMENSION. These are informational\n// annotations on each candidate (no verdict/score effect): they give the\n// physicist standard-physics context, not a hard filter (the registry is small).\nconst CANONICAL_KINDS_BY_DIM: ReadonlyMap<string, readonly string[]> = (() => {\n const m = new Map<string, Set<string>>();\n for (const ce of CANONICAL_EQUATIONS) {\n const key = format(ce.dimensional.target.dim);\n (m.get(key) ?? m.set(key, new Set()).get(key)!).add(ce.domain);\n }\n return new Map([...m].map(([k, v]) => [k, [...v].sort()]));\n})();\n\nconst CANONICAL_QUANTITY_NAMES: ReadonlySet<string> = (() => {\n const s = new Set<string>();\n for (const ce of CANONICAL_EQUATIONS) {\n s.add(ce.dimensional.target.name);\n for (const g of ce.dimensional.governing) s.add(g.name);\n }\n return s;\n})();\n\n/** A candidate after vetting against the inference suite. @hypothesis @public */\nexport interface VettedCandidate {\n readonly a: string;\n readonly b: string;\n /** Shared SI dimension (from the proposer). */\n readonly dim: string;\n /** One endpoint is in the anchored (established) cluster. */\n readonly touchesCore: boolean;\n /** The names share a word token (same physical KIND). */\n readonly sameKind: boolean;\n /**\n * Identifying a≡b merges two distinct connected components of the\n * quantity graph — it connects physics the catalog keeps separate.\n */\n readonly mergesComponents: boolean;\n /**\n * Quantities newly determinable from the anchor known-set once the\n * identification is added (structural unlock). Sorted.\n */\n readonly unlocksFromAnchor: readonly string[];\n /**\n * Retrodiction over the graph WITH the hypothesized identification creates\n * no numerical contradiction in the anchor-reachable subgraph. The strong\n * filter. A node whose routes already disagree in the base graph is the\n * graph's finding (`retrodict` reports it) and does not make a candidate\n * inconsistent; only a disagreement the hypothesis CREATES does.\n */\n readonly numericallyConsistent: boolean;\n /** Nodes that became inconsistent under the identification and were not\n * inconsistent in the base graph (the falsification, when\n * `numericallyConsistent` is false). Sorted. */\n readonly inconsistentNodes: readonly string[];\n /**\n * Orders of magnitude between the representative values of a and b\n * (`|log10|va| − log10|vb||`), or `null` when either has no representative\n * value (the gate abstained — see `magnitudeChecked`).\n */\n readonly ordersApart: number | null;\n /** Both endpoints had a representative value, so the magnitude gate ran. */\n readonly magnitudeChecked: boolean;\n /** The magnitude gate read at least one endpoint value from the graph at\n * the anchor (no static table entry) rather than the sourced table. */\n readonly magnitudeUsedAnchor: boolean;\n /**\n * The magnitude comparison used an anchor-derived value, and the ratio of the\n * two magnitudes does NOT move when every anchor input is rescaled by\n * {@link ANCHOR_PROBE_FACTOR}. The graph then fixes the ratio at every\n * anchor, so agreement in magnitude is an identity of the graph and not\n * evidence for the identification. The case that exposed it: the anchor sets\n * the temperature to the Hawking temperature of the anchor mass M, and then\n * the thermal wavelength is exactly 4π ℓ_P for EVERY M. Its anchor-derived\n * magnitude is not a representative magnitude of the quantity at all.\n * A quantity whose value really is a constant belongs in the\n * representative-value table, where it is not anchor-derived.\n * A clash stays a clash (the graph itself fixes the two apart); only a pass is\n * withheld, in `describeGrounding`. Optional on the type so hand-built\n * candidates need not state it; the funnel always sets it.\n */\n readonly magnitudeAnchorInvariant?: boolean;\n /**\n * The endpoints with no representative magnitude (neither in the sourced\n * table nor valued at the anchor) — why the magnitude gate abstained. Empty\n * when it ran. Optional on the type; the funnel always sets it.\n */\n readonly magnitudeMissing?: readonly string[];\n /**\n * Per gate axis that abstained, the endpoints that state no value on it —\n * why the axis gate had nothing to compare. Optional; the funnel always sets it.\n */\n readonly axisUnstated?: readonly { readonly axis: string; readonly endpoints: readonly string[] }[];\n /**\n * One endpoint name's hyphen-token set is a strict subset of the other's\n * (`mass` ⊂ `reference-mass`) — a generic↔specific identification of the\n * same KIND. Near-tautological (identifying a generic quantity with one of\n * its own specializations), so it is barred from `promising`.\n */\n readonly subsuming: boolean;\n /**\n * - `magnitude-clash` — representative values differ by more than the\n * threshold N orders (an independent falsification the\n * single-anchor graph cannot make). Checked first.\n * - `contradictory` — breaks numerical consistency (a graph falsification).\n * - `axis-clash` — the identification's stated `scale`/`force` regime\n * attributes disagree. A regime-LABEL prior against a\n * literal identity (D1), not a physical test: it\n * compares catalog labels and runs no computation, so\n * it is never counted or described as a falsification.\n * - `promising` — consistent AND connects disconnected physics AND\n * unlocks ≥1 quantity. Worth physicist review.\n * - `inert` — consistent but structurally/numerically idle (a\n * dimensional coincidence with no consequence).\n */\n readonly verdict: 'promising' | 'inert' | 'contradictory' | 'magnitude-clash' | 'axis-clash';\n /** Composite ranking score (higher = more worth review). */\n readonly score: number;\n /**\n * At least one of the `scale`/`force` axes had a resolved (non-conflicting)\n * value on BOTH endpoints, so the axis-compatibility gate produced a real\n * comparison (whether or not it clashed). `false` means every gate axis\n * abstained (silent on one/both sides, or a fold conflict) — the gate had\n * nothing to check. Populated on EVERY candidate, independent of verdict.\n */\n readonly axisChecked: boolean;\n /**\n * Per-axis clash descriptions (`'scale: quantum ≠ cosmological'`), sorted.\n * Empty when no gate axis clashed — including when `axisChecked` is\n * `false`, and even when a stronger falsifier (magnitude/contradictory)\n * won the verdict (no falsifier shadows another's annotation).\n */\n readonly axisClashes: readonly string[];\n /**\n * Standard-physics domains whose canonical equation has a TARGET of this\n * candidate's dimension (Sub-project C). Informational context — an empty\n * list means no canonical equation targets this dimension.\n */\n readonly canonicalKinds: readonly string[];\n /** At least one endpoint name is a quantity a canonical equation uses\n * (weak name-based prior; informational). */\n readonly touchesCanonical: boolean;\n}\n\n/** Options for the discovery loop. @internal */\nexport interface DiscoveryOptions {\n /**\n * Numeric anchor for the consistency check (and the closure unlock).\n * Default `{ mass: M_sun }` — the pre-registered retrodiction anchor.\n */\n readonly groundTruth?: Readonly<Record<string, number>>;\n /** Extra identifications honored as the baseline (default registered). */\n readonly identifications?: readonly QuantityIdentification[];\n /**\n * Max orders of magnitude two identified quantities may differ before the\n * identification is falsified as a `magnitude-clash`. Default {@link DEFAULT_MAX_ORDERS_OF_MAGNITUDE} — generous\n * enough for O(1) dimensionless prefactors and unit-convention slack, strict\n * enough to kill the scale-clash decoys.\n */\n readonly maxOrdersOfMagnitude?: number;\n /**\n * Sourced order-of-magnitude values for the gate (default\n * `REPRESENTATIVE_VALUES`). Injectable for testing and so the future\n * canonical-equation registry can supply them centrally.\n */\n readonly representativeValues?: Readonly<Record<string, RepresentativeValue>>;\n /**\n * Registry-only `scale`/`force`/`information` attributes by quantity name,\n * for the D1 axis-compatibility gate (default: every centralized\n * `Quantity.attributes`). Injectable for testing — never canonical\n * per-equation stamps (Option-A resolution).\n */\n readonly quantityAttributes?: ReadonlyMap<string, RegimeAttributes>;\n}\n\n/** Union-find over quantity names; merges each edge's endpoints and every\n * identification's from↔to. Returns name → component-root. */\nfunction quantityComponents(\n edges: readonly BridgeEdge[],\n idents: readonly QuantityIdentification[],\n): Map<string, string> {\n const parent = new Map<string, string>();\n const find = (x: string): string => {\n if (!parent.has(x)) parent.set(x, x);\n let r = x;\n while (parent.get(r) !== r) r = parent.get(r)!;\n let cur = x;\n while (parent.get(cur) !== r) {\n const next = parent.get(cur)!;\n parent.set(cur, r);\n cur = next;\n }\n return r;\n };\n const union = (a: string, b: string) => {\n parent.set(find(a), find(b));\n };\n for (const e of edges) {\n const names = [...e.sources.map((s) => s.name), e.target.name];\n for (let i = 1; i < names.length; i++) union(names[0], names[i]);\n }\n for (const id of idents) union(id.from, id.to);\n const roots = new Map<string, string>();\n for (const name of parent.keys()) roots.set(name, find(name));\n return roots;\n}\n\n/**\n * The ground truth the funnel anchors magnitudes to when the caller gives none: one solar mass.\n * Exported so the CLI can print the anchor a result is relative to (audit I3).\n * @internal\n */\nexport const ANCHOR_DEFAULT: Readonly<Record<string, number>> = { mass: M_SUN_KG };\n\n/**\n * The magnitude-clash threshold when the caller gives none: how many orders of magnitude two\n * identified quantities may differ. Exported so the CLI states the default it runs with.\n * @internal\n */\nexport const DEFAULT_MAX_ORDERS_OF_MAGNITUDE = 3;\n\n/**\n * Factor every anchor input is multiplied by to probe whether a magnitude ratio\n * depends on the anchor at all (persona finding L3). Three decades moves any\n * log-ratio that depends on the anchor far beyond {@link ANCHOR_INVARIANCE_TOL}.\n * @internal\n */\nconst ANCHOR_PROBE_FACTOR = 1e3;\n\n/** Decades within which a log-ratio counts as unchanged by the probe. @internal */\nconst ANCHOR_INVARIANCE_TOL = 1e-9;\n\n/**\n * One name's hyphen-token set is a STRICT subset of the other's\n * (`mass` ⊂ `reference-mass`, `mass` ⊂ `planck-mass`) — i.e. identifying a\n * generic quantity with one of its own specializations of the same kind.\n * Such an identification is near-tautological (it asserts the specialization\n * IS its genus), not a discovered cross-cluster link, so it is barred from\n * `promising`. Returns false for equal token sets and for pairs sharing only\n * a partial token (`schwarzschild-radius` ⊄ `foerster-radius`).\n */\nfunction nameSubsumes(a: string, b: string): boolean {\n const ta = new Set(a.split('-'));\n const tb = new Set(b.split('-'));\n if (ta.size === tb.size) return false;\n const [small, big] = ta.size < tb.size ? [ta, tb] : [tb, ta];\n for (const t of small) if (!big.has(t)) return false;\n return true;\n}\n\n/**\n * Candidate-invariant state for the discovery funnel — everything in\n * `vetLinkCandidate` that depends only on `(edges, opts)`, not on the specific\n * candidate. Computed once by `buildDiscoveryContext` and shared across every\n * candidate so `rankDiscoveries` does loop-invariant work once instead of N\n * times. Holds read-only structures — `vetInContext` never mutates them, so\n * sharing is safe. `tests/composition/discovery.test.ts` pins that directly:\n * two builds are equal, and vetting every candidate leaves the context equal\n * to a snapshot taken before.\n *\n * @internal\n */\nexport interface DiscoveryContext {\n readonly baseIdents: readonly QuantityIdentification[];\n readonly groundTruth: Readonly<Record<string, number>>;\n /** `Object.keys(groundTruth)` — the anchor known-set names. */\n readonly anchor: readonly string[];\n readonly repVals: Readonly<Record<string, RepresentativeValue>>;\n readonly maxOrders: number;\n /** Registry-only attribute lookup for the D1 axis gate (opts override or\n * `REGISTRY_ATTRIBUTES_BY_NAME`). */\n readonly attributesByName: ReadonlyMap<string, RegimeAttributes>;\n /** `forwardEvaluate(edges, groundTruth, baseIdents)` — anchor magnitudes. */\n readonly anchorValues: ReadonlyMap<string, number>;\n /** The same evaluation with every anchor input times {@link ANCHOR_PROBE_FACTOR}. */\n readonly anchorValuesProbe: ReadonlyMap<string, number>;\n /** `quantityComponents(edges, baseIdents)` — base component roots. */\n readonly comps: ReadonlyMap<string, string>;\n /** `forwardClosure(edges, anchor, baseIdents)` — base determinable set. */\n readonly closureBase: ReadonlySet<string>;\n /**\n * The targets the retrodiction of the anchor finds inconsistent with no\n * hypothesized identification (empty when the base is consistent). An\n * identification of two quantities outside {@link closureBase} cannot fire,\n * so that candidate's numeric report is this one.\n */\n readonly baseInconsistentNodes: readonly string[];\n}\n\n/** Resolve options and compute the candidate-invariant discovery state once.\n * @internal */\nexport function buildDiscoveryContext(\n edges: readonly BridgeEdge[],\n opts: DiscoveryOptions,\n): DiscoveryContext {\n const baseIdents = opts.identifications ?? QUANTITY_IDENTIFICATIONS;\n const groundTruth = opts.groundTruth ?? ANCHOR_DEFAULT;\n const anchor = Object.keys(groundTruth);\n const baseReport = retrodict(edges, groundTruth, { identifications: baseIdents });\n return {\n baseIdents,\n groundTruth,\n anchor,\n repVals: opts.representativeValues ?? REPRESENTATIVE_VALUES,\n maxOrders: opts.maxOrdersOfMagnitude ?? DEFAULT_MAX_ORDERS_OF_MAGNITUDE,\n attributesByName: opts.quantityAttributes ?? REGISTRY_ATTRIBUTES_BY_NAME,\n // Candidate-invariant: the anchor's forward evaluation, the base component\n // partition, and the base forward closure all depend only on (edges, opts).\n anchorValues: forwardEvaluate(edges, groundTruth, baseIdents),\n anchorValuesProbe: forwardEvaluate(\n edges,\n Object.fromEntries(\n Object.entries(groundTruth).map(([k, v]) => [k, v * ANCHOR_PROBE_FACTOR]),\n ),\n baseIdents,\n ),\n comps: quantityComponents(edges, baseIdents),\n closureBase: forwardClosure(edges, anchor, baseIdents),\n baseInconsistentNodes: baseReport.results\n .filter((r) => r.outcome === 'inconsistent')\n .map((r) => r.target)\n .sort(),\n };\n}\n\n/**\n * The quantities whose value can depend on one of `seeds`: the seeds, every\n * `to` of an identification from the set, and every target of an edge with a\n * source in the set, to a fixed point. An over-approximation (an edge that\n * does not fire still lists its target), which is the safe side: a target\n * left out would keep its base retrodiction unexamined.\n */\nfunction dependents(\n edges: readonly BridgeEdge[],\n seeds: readonly string[],\n idents: readonly QuantityIdentification[],\n): Set<string> {\n const set = new Set<string>(seeds);\n let changed = true;\n while (changed) {\n changed = false;\n for (const id of idents) {\n if (set.has(id.from) && !set.has(id.to)) {\n set.add(id.to);\n changed = true;\n }\n }\n for (const e of edges) {\n if (set.has(e.target.name)) continue;\n if (e.sources.some((s) => set.has(s.name))) {\n set.add(e.target.name);\n changed = true;\n }\n }\n }\n return set;\n}\n\n/**\n * The nodes the hypothesis `a ≡ b` makes inconsistent that the base graph did\n * not already have: inconsistent(hypothesis) minus inconsistent(base). Only a\n * node downstream of `a` or `b` can change, so only those nodes are\n * classified and retrodicted, with the same over-determined rule and the\n * same tolerance `retrodict` applies to the whole graph. Sorted.\n */\nfunction newInconsistencies(\n edges: readonly BridgeEdge[],\n groundTruth: Readonly<Record<string, number>>,\n anchor: readonly string[],\n candidate: LinkCandidate,\n withHyp: readonly QuantityIdentification[],\n baseInconsistentNodes: readonly string[],\n): string[] {\n const base = new Set(baseInconsistentNodes);\n const nodes: string[] = [];\n for (const target of [...dependents(edges, [candidate.a, candidate.b], withHyp)].sort()) {\n if (base.has(target)) continue;\n const classified = classifyIdentifiability(edges, anchor, target, { identifications: withHyp });\n if (classified.verdict !== 'over-determined') continue;\n const result = retrodictNode(edges, groundTruth, target, { identifications: withHyp });\n if (result.outcome === 'inconsistent') nodes.push(target);\n }\n return nodes;\n}\n\n/**\n * Vet one link candidate by hypothesizing the identification a≡b and\n * measuring its structural and numerical consequences. See module docs.\n *\n * @internal\n */\nexport function vetLinkCandidate(\n edges: readonly BridgeEdge[],\n candidate: LinkCandidate,\n opts: DiscoveryOptions = {},\n): VettedCandidate {\n return vetInContext(edges, candidate, buildDiscoveryContext(edges, opts));\n}\n\n/**\n * The per-candidate vetting body, given pre-computed candidate-invariant\n * `ctx`. The hypothesis-augmented closure is per-candidate. Retrodiction is\n * per-candidate only when an endpoint is already in the anchor closure;\n * otherwise the identification cannot fire and the base report stands.\n *\n * @internal\n */\nexport function vetInContext(\n edges: readonly BridgeEdge[],\n candidate: LinkCandidate,\n ctx: DiscoveryContext,\n): VettedCandidate {\n const {\n baseIdents,\n groundTruth,\n anchor,\n repVals,\n maxOrders,\n anchorValues,\n anchorValuesProbe,\n comps,\n closureBase,\n attributesByName,\n baseInconsistentNodes,\n } = ctx;\n\n // Magnitude gate: an INDEPENDENT falsifier the single-anchor graph can't make.\n // Only fires when both endpoints have a representative value; abstains (and\n // never false-rejects) otherwise. A value comes from the sourced static table\n // first, else — for graph-derived quantities the table omits by design\n // (schwarzschild-radius, thermal-de-broglie-wavelength) — from the quantity's\n // value AT THE REGISTERED ANCHOR, which is a definite magnitude for this run.\n const magnitudeOf = (\n name: string,\n ): { value: number; fromAnchor: boolean } | undefined => {\n const rv = repVals[name];\n // Both paths apply the same finite-and-nonzero gate: a 0/∞/NaN magnitude\n // would make log10 blow up (log10(0) = -∞), spoofing or silently disabling\n // the falsifier. Symmetric validation across the table and anchor sources.\n if (rv !== undefined && Number.isFinite(rv.value) && rv.value !== 0)\n return { value: rv.value, fromAnchor: false };\n const av = anchorValues.get(name);\n if (av !== undefined) {\n const value = av * conventionScaleToSI(name);\n if (Number.isFinite(value) && value !== 0)\n return { value, fromAnchor: true };\n }\n return undefined;\n };\n const va = magnitudeOf(candidate.a);\n const vb = magnitudeOf(candidate.b);\n const magnitudeChecked = va !== undefined && vb !== undefined;\n const magnitudeUsedAnchor =\n magnitudeChecked && (va!.fromAnchor || vb!.fromAnchor);\n const ordersApart = magnitudeChecked\n ? Math.abs(Math.log10(Math.abs(va!.value)) - Math.log10(Math.abs(vb!.value)))\n : null;\n const magnitudeClash = ordersApart !== null && ordersApart > maxOrders;\n\n // Anchor-invariance probe: re-read each anchor-derived magnitude at the\n // rescaled anchor. A table value is a constant and does not move.\n const probeOf = (\n name: string,\n m: { value: number; fromAnchor: boolean },\n ): number | undefined => {\n if (!m.fromAnchor) return m.value;\n const probe = anchorValuesProbe.get(name);\n return probe === undefined ? undefined : probe * conventionScaleToSI(name);\n };\n let magnitudeAnchorInvariant = false;\n if (magnitudeUsedAnchor) {\n const pa = probeOf(candidate.a, va!);\n const pb = probeOf(candidate.b, vb!);\n if (pa !== undefined && pb !== undefined && pa !== 0 && pb !== 0 && Number.isFinite(pa) && Number.isFinite(pb)) {\n const la = Math.log10(Math.abs(va!.value));\n const lb = Math.log10(Math.abs(vb!.value));\n const lpa = Math.log10(Math.abs(pa));\n const lpb = Math.log10(Math.abs(pb));\n magnitudeAnchorInvariant = Math.abs((lpa - lpb) - (la - lb)) <= ANCHOR_INVARIANCE_TOL;\n }\n }\n\n // A generic↔specialization identification (mass ≟ reference-mass) is\n // near-tautological — barred from `promising` regardless of structure.\n const subsuming = nameSubsumes(candidate.a, candidate.b);\n\n // Axis-compatibility gate (D1): a literal identity cannot have endpoints\n // whose STATED scale/force regimes disagree. Either side silent on an\n // axis (including a fold-conflict, resolved as unstated by\n // `effectiveAttributes`) abstains that axis rather than clashing.\n // Populated on every candidate, independent of which verdict wins.\n const attrsA = effectiveAttributes(candidate.a, attributesByName, baseIdents);\n const attrsB = effectiveAttributes(candidate.b, attributesByName, baseIdents);\n const checkedAxes: string[] = [];\n const axisClashes: string[] = [];\n const axisUnstated: { axis: string; endpoints: string[] }[] = [];\n // GATE_AXES is registry-derived (string[]); every registry axis name is a\n // RegimeAttributes key whose value is a string union — read via a string record.\n const recA = attrsA as Record<string, string | undefined>;\n const recB = attrsB as Record<string, string | undefined>;\n for (const axis of GATE_AXES) {\n const av = recA[axis];\n const bv = recB[axis];\n if (av === undefined || bv === undefined) {\n axisUnstated.push({\n axis,\n endpoints: [av === undefined ? candidate.a : null, bv === undefined ? candidate.b : null].filter(\n (e): e is string => e !== null,\n ),\n });\n continue; // abstain\n }\n checkedAxes.push(axis);\n if (av !== bv) axisClashes.push(`${axis}: ${av} ≠ ${bv}`);\n }\n axisClashes.sort();\n const axisChecked = checkedAxes.length > 0;\n const axisClash = axisClashes.length > 0;\n\n // The hypothesized identification, added in both directions so a≡b is a\n // full merge (identifications are directional in the engine).\n const rationale = `HYPOTHESIS (unadjudicated): ${candidate.a} ≡ ${candidate.b} — same dimension ${candidate.dim}`;\n const hypothesis: QuantityIdentification[] = [\n { from: candidate.a, to: candidate.b, rationale },\n { from: candidate.b, to: candidate.a, rationale },\n ];\n const withHyp = [...baseIdents, ...hypothesis];\n\n // Structural: does a≡b merge two components? (base partition from ctx)\n const mergesComponents =\n comps.has(candidate.a) &&\n comps.has(candidate.b) &&\n comps.get(candidate.a) !== comps.get(candidate.b);\n\n // Neither endpoint in the anchor closure means the identification cannot\n // fire: `forwardClosure` copies a value across `a ≡ b` only from a\n // determinable side. The hypothesis closure is then the base closure, and no\n // value in the graph moves, so neither closure nor retrodiction is recomputed\n // (9.0.0 audit §4 C9: 4004 of 4196 catalog candidates are this case).\n const touchesClosure = closureBase.has(candidate.a) || closureBase.has(candidate.b);\n\n // Closure unlock: forward closure from the anchor, with vs without. The base\n // closure is candidate-invariant (ctx); only the hypothesis closure is fresh.\n const closureHyp = touchesClosure ? forwardClosure(edges, anchor, withHyp) : closureBase;\n const unlocksFromAnchor = [...closureHyp]\n .filter((q) => !closureBase.has(q))\n .sort();\n\n // Numeric: the hypothesis must not CREATE a disagreement. A node whose\n // routes already disagree in the base graph is the graph's finding\n // (`retrodict` reports it), not this candidate's, so the attribution is\n // inconsistent(hypothesis) minus inconsistent(base) (9.0.0 audit §4 C4).\n // Only a target downstream of `a` or `b` can change under the hypothesis;\n // every other target's retrodiction is the base one, so only those targets\n // are retrodicted (§4 C9).\n const inconsistentNodes = touchesClosure\n ? newInconsistencies(edges, groundTruth, anchor, candidate, withHyp, baseInconsistentNodes)\n : [];\n const numericallyConsistent = inconsistentNodes.length === 0;\n\n // Verdict precedence: a magnitude clash is the most decisive, most\n // interpretable falsification, checked before the graph contradiction;\n // the regime-label prior (axis-clash) is weaker than both numeric\n // falsifiers and is not one itself, but still outranks promising/inert (D1).\n let verdict: VettedCandidate['verdict'];\n if (magnitudeClash) verdict = 'magnitude-clash';\n else if (!numericallyConsistent) verdict = 'contradictory';\n else if (axisClash) verdict = 'axis-clash';\n else if (mergesComponents && unlocksFromAnchor.length > 0 && !subsuming)\n verdict = 'promising';\n else verdict = 'inert';\n\n // Score: all falsifications sink to the bottom; a subsuming (tautological)\n // identification sinks within `inert`; otherwise reward structural merges,\n // unlocks, and the proposer's weak priors.\n let score = 0;\n if (magnitudeClash || !numericallyConsistent || axisClash) {\n score = -1;\n } else if (subsuming) {\n score = 0;\n } else {\n score += mergesComponents ? 4 : 0;\n score += Math.min(unlocksFromAnchor.length, 4);\n score += candidate.touchesCore ? 1 : 0;\n score += candidate.sameKind ? 1 : 0;\n }\n\n const canonicalKinds = CANONICAL_KINDS_BY_DIM.get(candidate.dim) ?? [];\n const touchesCanonical =\n CANONICAL_QUANTITY_NAMES.has(candidate.a) ||\n CANONICAL_QUANTITY_NAMES.has(candidate.b);\n\n return {\n a: candidate.a,\n b: candidate.b,\n dim: candidate.dim,\n touchesCore: candidate.touchesCore,\n sameKind: candidate.sameKind,\n mergesComponents,\n unlocksFromAnchor,\n numericallyConsistent,\n inconsistentNodes,\n ordersApart,\n magnitudeChecked,\n magnitudeUsedAnchor,\n magnitudeAnchorInvariant,\n magnitudeMissing: [va === undefined ? candidate.a : null, vb === undefined ? candidate.b : null].filter(\n (e): e is string => e !== null,\n ),\n axisUnstated,\n subsuming,\n verdict,\n score,\n axisChecked,\n axisClashes,\n canonicalKinds,\n touchesCanonical,\n };\n}\n\n/**\n * Run the full discovery funnel: propose cross-cluster candidates, vet each\n * against the inference suite, and rank — `promising` first, then by score.\n * The output is the physicist's worklist (vetted, provenance-traced), not a\n * list of discoveries.\n *\n * @public\n */\nexport function rankDiscoveries(\n edges: readonly BridgeEdge[],\n opts: DiscoveryOptions = {},\n): VettedCandidate[] {\n const VERDICT_RANK: Record<VettedCandidate['verdict'], number> = {\n promising: 0,\n inert: 1,\n 'magnitude-clash': 2,\n contradictory: 3,\n 'axis-clash': 4,\n };\n const ctx = buildDiscoveryContext(edges, opts);\n const candidates = proposeLinkCandidates(edges);\n const vetted = candidates.map((c) => vetInContext(edges, c, ctx));\n vetted.sort(\n (x, y) =>\n VERDICT_RANK[x.verdict] - VERDICT_RANK[y.verdict] ||\n y.score - x.score ||\n x.a.localeCompare(y.a) ||\n x.b.localeCompare(y.b),\n );\n return vetted;\n}\n"]}
|
|
@@ -184,6 +184,16 @@ export declare class CoefficientUnsetError extends Error {
|
|
|
184
184
|
readonly formula: string;
|
|
185
185
|
constructor(id: string, formula: string);
|
|
186
186
|
}
|
|
187
|
+
/**
|
|
188
|
+
* The unset-coefficient gate: an edge whose coefficient is unset and whose
|
|
189
|
+
* group is not a finite input throws {@link CoefficientUnsetError}. This is
|
|
190
|
+
* the one rule; `evaluateEdge` applies it to the edge it is given, and a
|
|
191
|
+
* composed edge's evaluator applies it to each operand before calling it, so
|
|
192
|
+
* a monomial times an absent 1 never reaches a caller as a number.
|
|
193
|
+
*
|
|
194
|
+
* @internal
|
|
195
|
+
*/
|
|
196
|
+
export declare function assertCoefficientSet(edge: BridgeEdge, inputs: Record<string, number>): void;
|
|
187
197
|
/**
|
|
188
198
|
* Composition refused: the composed sources would contain a duplicate
|
|
189
199
|
* quantity NAME across operands without a recorded disposition (v0.11
|
|
@@ -207,15 +217,16 @@ export declare class CompositionAliasError extends Error {
|
|
|
207
217
|
* the composite is known to be false. The message names both edge ids AND both
|
|
208
218
|
* relation types, so the refused pair is identifiable without the table.
|
|
209
219
|
*
|
|
210
|
-
* Thrown
|
|
211
|
-
*
|
|
220
|
+
* Thrown when both operands carry a `relation` and the table is silent, or
|
|
221
|
+
* when both carry a `regime` of different families (this layer does not state
|
|
222
|
+
* where a cross-family chain applies). An edge with no relation overlay and no
|
|
223
|
+
* regime composes exactly as it did before Atlas Phase 1.
|
|
212
224
|
*
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
*
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
* the same commit — that snapshot caught this addition, which is it working.
|
|
225
|
+
* Internal, not public: nothing atlas-related joins the published
|
|
226
|
+
* surface before ROADMAP Phase 6. It is reachable from the
|
|
227
|
+
* `src/composition/index.ts` barrel, which is what internal consumers and
|
|
228
|
+
* tests use. Promoting it is a public-surface change and goes through
|
|
229
|
+
* `tests/api/public-surface.test.ts` like any other.
|
|
219
230
|
*
|
|
220
231
|
* @internal
|
|
221
232
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edge.d.ts","sourceRoot":"","sources":["../../src/composition/edge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAE5D,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EACd,MAAM,EACN,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAG/B;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B,uEAAuE;IACvE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,oDAAoD;IACpD,QAAQ,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,OAAO,CAAC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AAO,EAAE,MAAM,EAG1B;CACF;AAgDD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,UAAU,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,CAUjE;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC7B,MAAM,CASR"}
|
package/dist/composition/edge.js
CHANGED
|
@@ -53,6 +53,20 @@ function groupBound(edge, inputs) {
|
|
|
53
53
|
const value = inputs[group.group];
|
|
54
54
|
return value !== undefined && Number.isFinite(value);
|
|
55
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* The unset-coefficient gate: an edge whose coefficient is unset and whose
|
|
58
|
+
* group is not a finite input throws {@link CoefficientUnsetError}. This is
|
|
59
|
+
* the one rule; `evaluateEdge` applies it to the edge it is given, and a
|
|
60
|
+
* composed edge's evaluator applies it to each operand before calling it, so
|
|
61
|
+
* a monomial times an absent 1 never reaches a caller as a number.
|
|
62
|
+
*
|
|
63
|
+
* @internal
|
|
64
|
+
*/
|
|
65
|
+
export function assertCoefficientSet(edge, inputs) {
|
|
66
|
+
if (edge.coefficientUnset === true && !groupBound(edge, inputs)) {
|
|
67
|
+
throw new CoefficientUnsetError(edge.id, edge.label);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
56
70
|
/**
|
|
57
71
|
* Composition refused: the composed sources would contain a duplicate
|
|
58
72
|
* quantity NAME across operands without a recorded disposition (v0.11
|
|
@@ -79,15 +93,16 @@ export class CompositionAliasError extends Error {
|
|
|
79
93
|
* the composite is known to be false. The message names both edge ids AND both
|
|
80
94
|
* relation types, so the refused pair is identifiable without the table.
|
|
81
95
|
*
|
|
82
|
-
* Thrown
|
|
83
|
-
*
|
|
96
|
+
* Thrown when both operands carry a `relation` and the table is silent, or
|
|
97
|
+
* when both carry a `regime` of different families (this layer does not state
|
|
98
|
+
* where a cross-family chain applies). An edge with no relation overlay and no
|
|
99
|
+
* regime composes exactly as it did before Atlas Phase 1.
|
|
84
100
|
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
* the same commit — that snapshot caught this addition, which is it working.
|
|
101
|
+
* Internal, not public: nothing atlas-related joins the published
|
|
102
|
+
* surface before ROADMAP Phase 6. It is reachable from the
|
|
103
|
+
* `src/composition/index.ts` barrel, which is what internal consumers and
|
|
104
|
+
* tests use. Promoting it is a public-surface change and goes through
|
|
105
|
+
* `tests/api/public-surface.test.ts` like any other.
|
|
91
106
|
*
|
|
92
107
|
* @internal
|
|
93
108
|
*/
|
|
@@ -168,9 +183,7 @@ export function evaluateEdge(edge, inputs) {
|
|
|
168
183
|
if (!edge.domain.predicate(bound)) {
|
|
169
184
|
throw new DomainViolationError(`${edge.id}: inputs violate validity domain (${edge.domain.description})`);
|
|
170
185
|
}
|
|
171
|
-
|
|
172
|
-
throw new CoefficientUnsetError(edge.id, edge.label);
|
|
173
|
-
}
|
|
186
|
+
assertCoefficientSet(edge, bound);
|
|
174
187
|
return edge.evaluate(bound);
|
|
175
188
|
}
|
|
176
189
|
//# sourceMappingURL=edge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edge.js","sourceRoot":"","sources":["../../src/composition/edge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAOvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AA6JvE,gEAAgE;AAChE,MAAM,OAAO,wBAAyB,SAAQ,KAAK;IACjD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;IACzC,CAAC;CACF;AAED,6EAA6E;AAC7E,MAAM,OAAO,yBAA0B,SAAQ,KAAK;IAClD,YAAY,OAAe;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,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC","sourcesContent":["/**\n * Composition graph — edges (bridges and laws) + validity domains\n * (v0.8.0 T1+T2+T3, per docs/planning/v0.8.0-Design.md §3).\n *\n * A `BridgeEdge` is an edge in the composition graph: n-ary source\n * quantities → one target quantity, carrying a closed-form evaluator,\n * a first-class validity domain (G-8), a confidence grade, and a\n * literature citation. `kind: 'law'` marks diagonal-law edges (P-1) —\n * edges whose endpoints share regime attributes, serving as the\n * connective tissue composition chains pass through.\n *\n * @module composition/edge\n */\n\nimport type { Quantity } from './quantity.js';\nimport type { ExprNode } from '../dimensional/validator.js';\nimport { CANONICAL_GROUP_PREFACTORS } from './canonical-prefactors.js';\nimport type {\n Conventions,\n Counterexample,\n Regime,\n RelationContract,\n} from '../relations/types.js';\nimport { DomainViolationError } from '../bridges/evaluation-errors.js';\n\n/**\n * First-class validity domain (v0.8.0 G-8). The predicate receives the\n * same keyed inputs as `evaluate` and returns whether the edge's\n * formula applies there (e.g. weak-field, positive mass, bound orbit).\n *\n * @public\n */\nexport interface ValidityDomain {\n /** Human-readable statement, e.g. 'M > 0 and b ≫ r_s (weak field)'. */\n readonly description: string;\n /** Machine-checkable form of the same statement. */\n readonly predicate: (inputs: Record<string, number>) => boolean;\n}\n\n/**\n * Confidence grade — mirrors the catalog's status taxonomy. Composition\n * demotes via {@link minConfidence}; it never promotes.\n *\n * @public\n */\nexport type EdgeConfidence =\n | 'established'\n | 'speculative'\n | 'highly-speculative';\n\n/**\n * An edge in the composition graph.\n *\n * `evaluate` is keyed by source-quantity `name`s. For catalog-backed\n * edges, `beId` cross-references `BRIDGE_EQUATIONS`; diagonal-law\n * edges have `beId: null` (BE-1–10 are not individually catalogued).\n *\n * @public\n */\nexport interface BridgeEdge {\n /** Graph id, e.g. 'be-42', 'law-schwarzschild-radius'. */\n readonly id: string;\n /** Catalog cross-reference; null for diagonal laws. */\n readonly beId: number | null;\n /** Bridge (endpoints differ in regime) vs law (endpoints share regime). */\n readonly kind: 'bridge' | 'law';\n /** Human-readable label. */\n readonly label: string;\n /** Input quantities (n-ary). */\n readonly sources: readonly Quantity[];\n /**\n * Evaluator keys and the symbols a reader copies, keyed by source name.\n * `evaluate`, the domain predicate, and `evaluateEdge` copy an alias onto\n * that source name before the formula. Explain, search, map, and derive\n * read the same record.\n */\n readonly aliases?: Readonly<Record<string, readonly string[]>>;\n /** Output quantity. */\n readonly target: Quantity;\n readonly confidence: EdgeConfidence;\n readonly domain: ValidityDomain;\n /** Closed-form evaluator; keys are source-quantity names. */\n readonly evaluate: (inputs: Record<string, number>) => number;\n /**\n * OPTIONAL symbolic form of the target (v0.12 symbolic composition): an\n * `ExprNode` whose leaf symbols are EITHER this edge's source-quantity\n * NAMES (graph vocabulary, e.g. `'mass'`) or registered constant symbols\n * (`hbar`, `c`, `G`, `k_B`, `8pi`, `ln2`, …). When present, `composeSymbolic`\n * can thread it through a junction by AST substitution; a drift-guard test\n * binds it to `evaluate`. Absent on numeric-only edges (the default).\n */\n readonly symbolic?: ExprNode;\n readonly citation: string;\n /**\n * The canonical entry is dimensional and no sourced prefactor multiplies\n * the monomial. The evaluator's leading 1 is that absence. It is not a\n * recovered constant. Absent on catalog edges and on a dimensional entry\n * whose table already supplies the factor, including a sourced 1.\n */\n readonly coefficientUnset?: boolean;\n /**\n * Exponents of dimensionless counts the dimensional monomial cannot see.\n * A fully-quantitative scalar AST records them (`N` in `P = N k_B T/V`,\n * `one_minus_e_sq` in the Einstein perihelion formula). They are sources.\n * Buckingham drops them, so the audit multiplies these exponents back in.\n * Absent when the formula has no such count. A `scalar-up-to-constant`\n * stub is not one of these.\n */\n readonly formulaFactors?: Readonly<Record<string, number>>;\n /**\n * Source names the scalar formula is an even function of. The evaluator\n * takes the absolute value of each one. Buckingham still writes the\n * dimensional exponent, which is odd for `√(q²)` and for `|q|`. Explain\n * prints those names as magnitudes. Absent when no source is even.\n */\n readonly evenInputs?: readonly string[];\n /**\n * Provenance: the quantity identification the junction used, when a\n * composed edge was formed via `QUANTITY_IDENTIFICATIONS` rather than\n * a name match. Absent on primitive edges and name-matched\n * compositions. (v0.8.0 punch-list: surfaced from the previously\n * unused `findJunction` return.)\n */\n readonly identificationUsed?: {\n readonly from: string;\n readonly to: string;\n readonly rationale: string;\n readonly citation?: string;\n };\n /**\n * Provenance: alias dispositions consumed at composition (v0.11\n * Option D) — which duplicate-name collisions were resolved, and how.\n */\n readonly aliasDispositionsUsed?: ReadonlyArray<{\n readonly name: string;\n readonly treatAs: 'shared' | { readonly renameSecond: string };\n readonly rationale: string;\n readonly citation?: string;\n }>;\n\n // ── Atlas Phase 1 overlay (all OPTIONAL; an edge without them is unchanged) ──\n /** The typed relation this edge asserts, when one has been recorded. */\n readonly relation?: RelationContract;\n /**\n * Where in π-group space this edge is claimed to apply, when a regime has\n * been recorded (Atlas Phase 2).\n *\n * ADDITIVE, and it does NOT replace `domain`. The two are different claims:\n * `domain.predicate` is an opaque closure over RAW inputs that may encode\n * conditions no π-group captures — positivity, integer-ness, a branch cut —\n * while a `Regime` is declarative inequalities over DIMENSIONLESS groups,\n * traceable back to the dimension matrix. Replacing the predicate with a\n * regime would discard those conditions invisibly, because the result still\n * type-checks and still answers (design note §1).\n *\n * When both are present the validity domain is satisfied IFF\n * `predicate(rawInputs) === true` AND `regimeHolds(piGroups).ok === true`.\n * Logical AND, no precedence: neither side wins, and a `'unknown'` from\n * `regimeHolds` is a failure to confirm validity, never validity.\n *\n * A regime is stated over π-groups, so the CALLER supplies the group values.\n * Nothing in this library infers them from raw inputs — that would be a\n * silent, lossy guess at the mapping. An edge without this field behaves\n * exactly as it did before Phase 2.\n */\n readonly regime?: Regime;\n /** Sign/unit choices the edge depends on. */\n readonly conventions?: Conventions;\n /** Cases the edge does NOT cover, each with its witness. */\n readonly counterexamples?: readonly Counterexample[];\n /**\n * Provenance for a `relation` that `composeEdges` DERIVED from the\n * composition table, rather than one an author recorded: the ids of the two\n * operands, in composition order. Present only on composed edges whose BOTH\n * operands carried a `relation`; absent everywhere else, including on every\n * primitive catalog edge.\n */\n readonly relationDerivedFrom?: readonly [string, string];\n}\n\n/** Composition failed: no junction quantity matched. @public */\nexport class CompositionJunctionError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'CompositionJunctionError';\n }\n}\n\n/** Composition failed: junction dimensions are not exactly equal. @public */\nexport class CompositionDimensionError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'CompositionDimensionError';\n }\n}\n\n/**\n * The edge's coefficient has no sourced number and its group is unbound.\n *\n * `evaluateEdge` throws this. `evaluateRelation` records it as\n * `kind: 'unset'` and does not return a number.\n *\n * @public\n */\nexport class CoefficientUnsetError extends Error {\n readonly id: string;\n readonly formula: string;\n constructor(id: string, formula: string) {\n super(`evaluateEdge: ${id} coefficient is unset (${formula})`);\n this.name = 'CoefficientUnsetError';\n this.id = id;\n this.formula = formula;\n }\n}\n\n/** A group prefactor is sourced only when that group is a finite input. */\nfunction groupBound(edge: BridgeEdge, inputs: Record<string, number>): boolean {\n const group = CANONICAL_GROUP_PREFACTORS.find((row) => row.id === edge.id);\n if (group === undefined) return false;\n const value = inputs[group.group];\n return value !== undefined && Number.isFinite(value);\n}\n\n/**\n * The unset-coefficient gate: an edge whose coefficient is unset and whose\n * group is not a finite input throws {@link CoefficientUnsetError}. This is\n * the one rule; `evaluateEdge` applies it to the edge it is given, and a\n * composed edge's evaluator applies it to each operand before calling it, so\n * a monomial times an absent 1 never reaches a caller as a number.\n *\n * @internal\n */\nexport function assertCoefficientSet(edge: BridgeEdge, inputs: Record<string, number>): void {\n if (edge.coefficientUnset === true && !groupBound(edge, inputs)) {\n throw new CoefficientUnsetError(edge.id, edge.label);\n }\n}\n\n/**\n * Composition refused: the composed sources would contain a duplicate\n * quantity NAME across operands without a recorded disposition (v0.11\n * namespacing gate, Option D — pure name-collision rule per the Adam\n * vet A-1: object identity cannot distinguish wrong-physics aliasing\n * from deliberate sharing).\n *\n * @public\n */\nexport class CompositionAliasError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'CompositionAliasError';\n }\n}\n\n/**\n * Composition refused: BOTH operands carry a `relation`, and the composition\n * table (`src/atlas/composition-table.ts`) returns `'no-composite-claim'` for\n * that ordered pair — this library declines to assert what the chain relates.\n *\n * Silence, not a defect in the operands: the table is a deliberate\n * under-approximation (design note `docs/planning/Atlas-Phase-1-Design.md`\n * §2.2), so a refusal here means the composite type is unrecorded, never that\n * the composite is known to be false. The message names both edge ids AND both\n * relation types, so the refused pair is identifiable without the table.\n *\n * Thrown when both operands carry a `relation` and the table is silent, or\n * when both carry a `regime` of different families (this layer does not state\n * where a cross-family chain applies). An edge with no relation overlay and no\n * regime composes exactly as it did before Atlas Phase 1.\n *\n * Internal, not public: nothing atlas-related joins the published\n * surface before ROADMAP Phase 6. It is reachable from the\n * `src/composition/index.ts` barrel, which is what internal consumers and\n * tests use. Promoting it is a public-surface change and goes through\n * `tests/api/public-surface.test.ts` like any other.\n *\n * @internal\n */\nexport class UndefinedCompositionError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'UndefinedCompositionError';\n }\n}\n\n/**\n * Two keys for one source disagree. The formula is not run.\n * The message names the source and every key that was set.\n * @internal\n */\nclass AliasConflictError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'AliasConflictError';\n }\n}\n\n/**\n * Copy each present alias onto its source name. The caller's record is\n * not mutated. A source that is already set to the same number stays.\n * Two different numbers for one source throw {@link AliasConflictError}.\n * @internal\n */\nfunction bindAliasInputs(\n edge: BridgeEdge,\n inputs: Record<string, number>,\n): Record<string, number> {\n if (edge.aliases === undefined) return inputs;\n let out: Record<string, number> | undefined;\n for (const [quantity, keys] of Object.entries(edge.aliases)) {\n const named = Object.hasOwn(inputs, quantity);\n const present = keys.filter((key) => Object.hasOwn(inputs, key));\n if (!named && present.length === 0) continue;\n const values = [\n ...(named ? [{ key: quantity, value: inputs[quantity]! }] : []),\n ...present.map((key) => ({ key, value: inputs[key]! })),\n ];\n const first = values[0]!.value;\n if (values.some((row) => !Object.is(row.value, first))) {\n throw new AliasConflictError(\n `${edge.id}: ${values.map((row) => `${row.key}=${row.value}`).join(' and ')}; those keys name ${quantity}`,\n );\n }\n if (!named) {\n out ??= { ...inputs };\n out[quantity] = first;\n }\n }\n return out ?? inputs;\n}\n\n/**\n * The domain predicate and `evaluate` read source names. This copy reads\n * aliases first, so a CLI key reaches the same formula.\n * @internal\n */\nexport function withBoundAliases<E extends BridgeEdge>(edge: E): E {\n if (edge.aliases === undefined) return edge;\n return {\n ...edge,\n domain: {\n description: edge.domain.description,\n predicate: (inputs) => edge.domain.predicate(bindAliasInputs(edge, inputs)),\n },\n evaluate: (inputs) => edge.evaluate(bindAliasInputs(edge, inputs)),\n };\n}\n\n/**\n * Domain-checked evaluation: throws {@link DomainViolationError} when\n * `inputs` violate `edge.domain`, otherwise returns `edge.evaluate`.\n * An alias is copied onto its source name first. An unset coefficient\n * throws {@link CoefficientUnsetError} instead of a monomial times 1.\n *\n * @public\n */\nexport function evaluateEdge(\n edge: BridgeEdge,\n inputs: Record<string, number>,\n): number {\n const bound = bindAliasInputs(edge, inputs);\n if (!edge.domain.predicate(bound)) {\n throw new DomainViolationError(\n `${edge.id}: inputs violate validity domain (${edge.domain.description})`,\n );\n }\n assertCoefficientSet(edge, bound);\n return edge.evaluate(bound);\n}\n"]}
|
|
@@ -99,7 +99,8 @@ export interface EnumerationReport {
|
|
|
99
99
|
* @public
|
|
100
100
|
*/
|
|
101
101
|
export declare const REGISTERED_COMPOSITION_IDS: ReadonlySet<string>;
|
|
102
|
-
|
|
102
|
+
/** Options of {@link enumerateCompositions}: the compose options plus the registered and seed id sets. @public */
|
|
103
|
+
export type EnumerationOptions = ComposeOptions & {
|
|
103
104
|
readonly registeredIds?: ReadonlySet<string>;
|
|
104
105
|
/** When set, only these edge ids are walked, and symbolic pairs are split. */
|
|
105
106
|
readonly seedIds?: ReadonlySet<string>;
|
|
@@ -124,5 +125,4 @@ export declare function enumerateCompositions(edges: ReadonlyArray<BridgeEdge>,
|
|
|
124
125
|
* @internal
|
|
125
126
|
*/
|
|
126
127
|
export declare function enumerateCompositionsWithRefusals(edges: ReadonlyArray<BridgeEdge>, opts?: EnumerationOptions): EnumerationWithRefusals;
|
|
127
|
-
export {};
|
|
128
128
|
//# sourceMappingURL=enumerate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enumerate.d.ts","sourceRoot":"","sources":["../../src/composition/enumerate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAG5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAGnD,2EAA2E;AAC3E,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,oEAAoE;IACpE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,8DAA8D;IAC9D,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAuBD;;;;;;;GAOG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,mCAAmC;IACnC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;GAK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,KAAK,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;aACnC,CAAC,CAAC;YACH,IAAI,CAAC,MAAM;gBAAE,SAAS;YACtB,IAAI,CAAC;gBACH,YAAY,CAAC,IAAI,CAAC;oBAChB,KAAK;oBACL,MAAM;oBACN,IAAI,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,IAAI;iBAChD,CAAC,CAAC;YACL,CAAC;YAAC,MAAM,CAAC;gBACP,gBAAgB,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;YAC3C,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO;QACL,MAAM,EAAE;YACN,GAAG;YACH,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;YACvC,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;YACjC,mBAAmB;YACnB,YAAY;YACZ,gBAAgB;SACjB;QACD,gBAAgB;KACjB,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Phase-D novel-candidate enumeration (v0.10.0 T3 — Part-IX §6's\n * \"novel candidate generated for physicist review\").\n *\n * Enumerates every ordered pair of edges that `composeEdges` accepts\n * (junction by name or registered identification; exact dimension\n * functor; the same checks as hand-written compositions) and\n * partitions the results into REGISTERED (the pre-registered CT-*\n * compositions, by composed id) and NOVEL (everything else — the\n * candidates a physicist should look at).\n *\n * The enumerator PROPOSES; it never promotes. Per the Part-VI §XXVII-B\n * protocol, a novel candidate's only output path is human review —\n * `docs/research/v0.11.0-novel-candidates.md` is the current review\n * surface (v0.10.0 report superseded).\n *\n * @module composition/enumerate\n */\n\nimport type { ExprNode } from '../dimensional/validator.js';\nimport type { BridgeEdge } from './edge.js';\nimport { CompositionAliasError, UndefinedCompositionError } from './edge.js';\nimport { composeEdges } from './compose.js';\nimport type { ComposeOptions } from './compose.js';\nimport { composeSymbolic } from './compose-symbolic.js';\n\n/** One successful pairwise composition found by the enumerator. @public */\nexport interface CompositionCandidate {\n readonly first: BridgeEdge;\n readonly second: BridgeEdge;\n /** The composed edge (carries demoted confidence, piped domain). */\n readonly edge: BridgeEdge;\n /** True when the composed id is NOT in the registered set. */\n readonly novel: boolean;\n}\n\n/**\n * A pair that is junction- and dimension-compatible but whose composed\n * sources would collide on a quantity name without a recorded\n * disposition (v0.11 Option D) — the enumerator surfaces these for\n * human judgment instead of silently aliasing them.\n *\n * @public\n */\nexport interface DispositionRequired {\n readonly first: BridgeEdge;\n readonly second: BridgeEdge;\n readonly composedId: string;\n readonly message: string;\n}\n\n/**\n * A pair `composeSymbolic` accepts. The expression is the substituted\n * scalar formula. A pair that only `composeEdges` accepts is not one of\n * these. Inlined on {@link EnumerationReport} so the package barrel gains\n * no name.\n */\ninterface SymbolicProofTarget {\n readonly first: BridgeEdge;\n readonly second: BridgeEdge;\n readonly expr: ExprNode;\n}\n\n/**\n * A pair `composeEdges` accepts and `composeSymbolic` refuses. Unclassified:\n * the gap note owns the reading. Not a proof target.\n */\ninterface NotSubstitutablePair {\n readonly first: BridgeEdge;\n readonly second: BridgeEdge;\n}\n\n/**\n * A pair both of whose edges carry a relation, refused by the composition table.\n *\n * This is {@link UndefinedCompositionError} only. A dimension or junction\n * failure is not one of these, and neither is {@link CompositionAliasError}.\n *\n * @internal\n */\nexport interface RelationTableRefusal {\n readonly first: BridgeEdge;\n readonly second: BridgeEdge;\n /** `${first.id}>>${second.id}`. */\n readonly composedId: string;\n readonly message: string;\n}\n\n/**\n * The report {@link enumerateCompositions} returns, plus the table refusals\n * that report does not carry.\n *\n * @internal\n */\nexport interface EnumerationWithRefusals {\n readonly report: EnumerationReport;\n readonly relationRefusals: readonly RelationTableRefusal[];\n}\n\n/** Enumeration report. @public */\nexport interface EnumerationReport {\n readonly all: ReadonlyArray<CompositionCandidate>;\n readonly registered: ReadonlyArray<CompositionCandidate>;\n readonly novel: ReadonlyArray<CompositionCandidate>;\n /** v0.11: name-colliding pairs awaiting an AliasDisposition. */\n readonly requiresDisposition: ReadonlyArray<DispositionRequired>;\n /**\n * Pairs `composeSymbolic` accepts, when a seed set was supplied.\n * Empty on the default call.\n */\n readonly proofTargets: ReadonlyArray<{\n readonly first: BridgeEdge;\n readonly second: BridgeEdge;\n readonly expr: ExprNode;\n }>;\n /**\n * Pairs only `composeEdges` accepts, when a seed set was supplied.\n * Empty on the default call. Unclassified.\n */\n readonly notSubstitutable: ReadonlyArray<{\n readonly first: BridgeEdge;\n readonly second: BridgeEdge;\n }>;\n}\n\n/**\n * The pre-registered composed ids (the CT-* set at v0.10.0). CT-1b's\n * 3-edge chain appears pairwise as its two links.\n *\n * @public\n */\nexport const REGISTERED_COMPOSITION_IDS: ReadonlySet<string> = new Set([\n 'be-42>>be-16', // CT-1\n 'law-schwarzschild-radius>>be-42-via-rs', // CT-1b link 1\n 'be-42-via-rs>>be-16', // CT-1b link 2\n 'be-12>>be-11-zurek', // CT-3\n]);\n\n/** Options of {@link enumerateCompositions}: the compose options plus the registered and seed id sets. @public */\nexport type EnumerationOptions = ComposeOptions & {\n readonly registeredIds?: ReadonlySet<string>;\n /** When set, only these edge ids are walked, and symbolic pairs are split. */\n readonly seedIds?: ReadonlySet<string>;\n};\n\n/**\n * Enumerate all valid ordered pairwise compositions over `edges`.\n *\n * A table refusal is not in this report. {@link enumerateCompositionsWithRefusals}\n * returns the same report plus that list.\n *\n * @public\n */\nexport function enumerateCompositions(\n edges: ReadonlyArray<BridgeEdge>,\n opts: EnumerationOptions = {},\n): EnumerationReport {\n return enumerateCompositionsWithRefusals(edges, opts).report;\n}\n\n/**\n * The pairs {@link enumerateCompositions} returns, plus each\n * {@link UndefinedCompositionError} on its own list.\n *\n * `report.proofTargets` is that function's list. A refused pair is not\n * moved onto it. A dimension or junction failure stays a silent non-pair:\n * absent from `relationRefusals` and from `report`.\n *\n * @internal\n */\nexport function enumerateCompositionsWithRefusals(\n edges: ReadonlyArray<BridgeEdge>,\n opts: EnumerationOptions = {},\n): EnumerationWithRefusals {\n const registeredIds = opts.registeredIds ?? REGISTERED_COMPOSITION_IDS;\n const all: CompositionCandidate[] = [];\n const requiresDisposition: DispositionRequired[] = [];\n const relationRefusals: RelationTableRefusal[] = [];\n const proofTargets: SymbolicProofTarget[] = [];\n const notSubstitutable: NotSubstitutablePair[] = [];\n const seeded = opts.seedIds !== undefined;\n const inSeed = (edge: BridgeEdge): boolean =>\n opts.seedIds === undefined || opts.seedIds.has(edge.id);\n\n for (const first of edges) {\n if (!inSeed(first)) continue;\n for (const second of edges) {\n if (first === second) continue;\n if (!inSeed(second)) continue;\n let edge: BridgeEdge;\n try {\n edge = composeEdges(first, second, opts);\n } catch (err) {\n if (err instanceof CompositionAliasError) {\n // Junction + dimensions passed; only the name collision\n // blocks it — a human disposition unlocks this pair.\n requiresDisposition.push({\n first,\n second,\n composedId: `${first.id}>>${second.id}`,\n message: err.message,\n });\n } else if (err instanceof UndefinedCompositionError) {\n relationRefusals.push({\n first,\n second,\n composedId: `${first.id}>>${second.id}`,\n message: err.message,\n });\n }\n // A dimension or junction failure stays a silent non-pair.\n continue;\n }\n all.push({\n first,\n second,\n edge,\n novel: !registeredIds.has(edge.id),\n });\n if (!seeded) continue;\n try {\n proofTargets.push({\n first,\n second,\n expr: composeSymbolic(first, second, opts).expr,\n });\n } catch {\n notSubstitutable.push({ first, second });\n }\n }\n }\n\n return {\n report: {\n all,\n registered: all.filter((c) => !c.novel),\n novel: all.filter((c) => c.novel),\n requiresDisposition,\n proofTargets,\n notSubstitutable,\n },\n relationRefusals,\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluate-relation.js","sourceRoot":"","sources":["../../src/composition/evaluate-relation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,4BAA4B,EA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AAK,CAAC;IACzB,MAAM,OAAO,GAAG,WAAW,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,CAAC;IAChE,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,YAAY,CAAC,IAAI,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QACjD,0FAA0F;QAC1F,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;YAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;QAC3E,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;IAC9D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,qBAAqB;YAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;QAC7F,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC","sourcesContent":["/**\n * One public evaluation of a catalog id or a canonical id.\n *\n * A catalog id with a closed-form evaluator is that evaluator's `run`, the\n * same call `upt evaluate` makes, so the library and the CLI check the\n * bindings, the domain and the value in one place. A canonical id is its\n * graph edge, checked against the same {@link checkInputs} contract first.\n * A formula string is not parsed. An unset coefficient is `kind: 'unset'` and\n * is not a number.\n *\n * @module composition/evaluate-relation\n */\n\nimport { EXPECTED_DIMENSION_BY_BRIDGE } from '../dimensional/bridge-check.js';\nimport type { Dimension } from '../dimensional/types.js';\nimport { BRIDGE_EVALUATORS, type EvaluatorSpec } from '../bridges/evaluators.js';\nimport { checkInputs, inputContract, type InputContract } from '../bridges/input-contract.js';\nimport { catalogEdgeKey, parseBridgeId, primaryRelation } from '../bridges/catalog-load.js';\nimport { CANONICAL_EQUATIONS } from '../canonical/registry.js';\nimport { CANONICAL_GROUP_PREFACTORS } from './canonical-prefactors.js';\nimport { CANONICAL_GRAPH } from './canonical-graph.js';\nimport { CATALOG_GRAPH } from './catalog-graph.js';\nimport { CoefficientUnsetError, evaluateEdge, type BridgeEdge } from './edge.js';\n\n/**\n * A sourced number, or an unset coefficient.\n *\n * `dimension` is the edge target. `formula` is the edge label.\n *\n * @public\n */\nexport type Evaluation =\n | { readonly kind: 'value'; readonly value: number; readonly dimension: Dimension }\n | { readonly kind: 'unset'; readonly formula: string };\n\n/**\n * An id the library can evaluate: a graph edge, a closed-form evaluator, or both.\n * The CLI and {@link evaluateRelation} both call this. Neither looks the id up again.\n */\nexport interface Evaluable {\n readonly id: string;\n readonly edge?: BridgeEdge;\n readonly evaluator?: EvaluatorSpec;\n}\n\n/**\n * The output of a closed-form evaluator: the quantity it computes and that\n * quantity's dimension. An evaluator with no catalog dimension (a closed form\n * with no AST) names no dimension.\n */\nexport function evaluatorOutput(spec: EvaluatorSpec): { readonly name: string; readonly dimension?: Dimension } {\n const relation = primaryRelation(spec.bridgeId);\n const dimension = EXPECTED_DIMENSION_BY_BRIDGE.get(spec.bridgeId);\n return {\n name: relation?.target ?? 'value',\n ...(dimension === undefined ? {} : { dimension }),\n };\n}\n\n/**\n * Names a canonical id may be bound under besides its sources: the equation's\n * governing names (a registered constant may be overridden), its formula\n * factors, and a bound dimensionless group such as `gamma`.\n */\nfunction canonicalNames(id: string): string[] {\n const equation = CANONICAL_EQUATIONS.find((candidate) => candidate.id === id);\n return [\n ...(equation?.dimensional.governing.map((g) => g.name) ?? []),\n ...CANONICAL_GROUP_PREFACTORS.filter((group) => group.id === id).map((group) => group.group),\n ];\n}\n\n/**\n * The declared inputs of an edge with no evaluator: each source under its name\n * and aliases, required; and, optional, its formula factors, the canonical\n * equation's governing names and a bound dimensionless group. A name that\n * already spells a source binds that source, so it is not a second slot.\n */\nfunction edgeContract(id: string, edge: BridgeEdge): InputContract {\n const sourceSlots = edge.sources.map((source) => ({\n key: source.name,\n spellings: [source.name, ...(edge.aliases?.[source.name] ?? [])],\n alternates: [],\n optional: false,\n readBy: 'value' as const,\n listed: true,\n }));\n const spelled = new Set(sourceSlots.flatMap((slot) => slot.spellings));\n const optional = [...Object.keys(edge.formulaFactors ?? {}), ...canonicalNames(id)].filter((name) => !spelled.has(name));\n return inputContract(id, [\n ...sourceSlots,\n ...[...new Set(optional)].map((name) => ({ key: name, spellings: [name], alternates: [], optional: true, readBy: 'value' as const, listed: false })),\n ]);\n}\n\n/**\n * The declared inputs of an evaluable id: the closed-form evaluator's contract\n * when it has one, else its edge's. {@link evaluateRelation} checks bindings\n * against exactly this contract.\n * @internal\n */\nexport function evaluableContract(found: Evaluable): InputContract {\n if (found.evaluator !== undefined) return found.evaluator.contract;\n return edgeContract(found.id, found.edge!);\n}\n\nfunction idOf(id: string | number): { key: string; numeric: number | undefined } {\n if (typeof id === 'number') return { key: catalogEdgeKey(id), numeric: id };\n try {\n const numeric = parseBridgeId(id);\n return { key: catalogEdgeKey(numeric), numeric };\n } catch {\n return { key: id, numeric: undefined };\n }\n}\n\n/**\n * The edge and the closed-form evaluator for `id`, when either exists.\n * An unknown id throws. An id with an evaluator and no edge is not unknown.\n */\nexport function resolveEvaluable(id: string | number): Evaluable {\n const { key, numeric } = idOf(id);\n const edge = [...CATALOG_GRAPH, ...CANONICAL_GRAPH].find((candidate) => candidate.id === key);\n const evaluator = numeric === undefined ? undefined : BRIDGE_EVALUATORS.get(numeric);\n if (edge === undefined && evaluator === undefined) {\n throw new Error(`evaluateRelation: unknown id '${key}'`);\n }\n return {\n id: key,\n ...(edge === undefined ? {} : { edge }),\n ...(evaluator === undefined ? {} : { evaluator }),\n };\n}\n\n/**\n * The closed form's primary output, through the evaluator's `run`. A record's\n * `value` is the catalog signature; any other number it returns is an extra\n * output, named by `spec.outputs`. A non-finite value at finite inputs is an\n * unset result (a dropped factor, a singularity).\n */\nfunction closedFormEvaluation(\n spec: EvaluatorSpec,\n edge: BridgeEdge | undefined,\n bindings: Readonly<Record<string, number>>,\n): Evaluation {\n const { value } = spec.run(bindings, 'value');\n const dimension = edge?.target.dim ?? EXPECTED_DIMENSION_BY_BRIDGE.get(spec.bridgeId);\n if (dimension === undefined) {\n throw new Error(`evaluateRelation: be-${spec.bridgeId} has no catalog dimension`);\n }\n if (Number.isFinite(value)) return { kind: 'value', value, dimension };\n // `run` refused a non-finite input, so a non-finite value here comes from the closed form.\n return { kind: 'unset', formula: edge?.label ?? primaryRelation(spec.bridgeId)?.label ?? spec.name };\n}\n\n/**\n * Evaluate `id` at `bindings`.\n *\n * A catalog id is `be-70` or `70`. A canonical id is `CE-sound-speed`.\n * Binding keys are the inputs' keys, quantity names or aliases.\n * The bindings are checked before the domain: an unknown key throws\n * `UnknownInputError`, a non-number `InputTypeError` (a `TypeError`), a\n * `NaN` or an infinity `NonFiniteInputError`, a key given twice\n * `DuplicateInputError`, an absent input `MissingInputError`.\n * A domain failure throws `DomainViolationError`.\n * An unset coefficient returns `{ kind: 'unset', formula }` and no number.\n * A complete finite input whose closed form is not finite (a dropped factor,\n * a singularity) is the same unset result, not a missing input.\n *\n * @public\n */\nexport function evaluateRelation(\n id: string | number,\n bindings: Readonly<Record<string, number>>,\n): Evaluation {\n const found = resolveEvaluable(id);\n if (found.evaluator !== undefined) return closedFormEvaluation(found.evaluator, found.edge, bindings);\n const edge = found.edge!;\n const checked = checkInputs(evaluableContract(found), bindings);\n try {\n const value = evaluateEdge(edge, { ...checked });\n // `checkInputs` refused a non-finite input, so a non-finite value comes from the formula.\n if (!Number.isFinite(value)) return { kind: 'unset', formula: edge.label };\n return { kind: 'value', value, dimension: edge.target.dim };\n } catch (error) {\n if (error instanceof CoefficientUnsetError) return { kind: 'unset', formula: error.formula };\n throw error;\n }\n}\n"]}
|
|
@@ -29,12 +29,20 @@ import type { IdentifiabilityResult } from './identifiability.js';
|
|
|
29
29
|
import type { RetrodictionResult } from './retrodiction.js';
|
|
30
30
|
import type { Dimension } from '../dimensional/types.js';
|
|
31
31
|
/**
|
|
32
|
-
* Text form of a recovered quantity:
|
|
33
|
-
* evaluator input is already passed at
|
|
34
|
-
* the printed form. An integer stays an integer (`1`, not `1.0000e+0`).
|
|
32
|
+
* Text form of a recovered quantity: `digits` significant digits (15 by default, the precision an
|
|
33
|
+
* evaluator input is already passed at; a statistic such as a residual in σ asks for 3). JSON keeps
|
|
34
|
+
* the number; this is only the printed form. An integer stays an integer (`1`, not `1.0000e+0`).
|
|
35
|
+
* Every command prints a number through this function or through {@link formatExact}.
|
|
35
36
|
* @internal
|
|
36
37
|
*/
|
|
37
|
-
export declare function formatQuantity(value: number): string;
|
|
38
|
+
export declare function formatQuantity(value: number, digits?: number): string;
|
|
39
|
+
/**
|
|
40
|
+
* Text form of a computed value that a reader may need to reproduce bit for bit: the shortest
|
|
41
|
+
* decimal that round-trips to the same double (`upt evaluate`'s outputs). A recovered or compared
|
|
42
|
+
* quantity prints through {@link formatQuantity} instead.
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
export declare function formatExact(value: number): string;
|
|
38
46
|
import type { DimensionalDeterminationResult } from '../dimensional/buckingham.js';
|
|
39
47
|
/** One structural derivation of the target, with the recovered value when
|
|
40
48
|
* ground-truth values were supplied. @public */
|
|
@@ -103,11 +111,8 @@ export interface QuantityExplanation {
|
|
|
103
111
|
/** Whether the KNOWN set dimensionally fixes the target (Buckingham-π);
|
|
104
112
|
* absent when the target has no resolvable dimension. */
|
|
105
113
|
readonly dimensional?: DimensionalDeterminationResult;
|
|
106
|
-
/** Derivations that refused the given values
|
|
107
|
-
readonly refusals?:
|
|
108
|
-
readonly edge: string;
|
|
109
|
-
readonly reason: string;
|
|
110
|
-
}[];
|
|
114
|
+
/** Derivations that refused the given values, each under its own kind (`RetrodictionRefusal`). */
|
|
115
|
+
readonly refusals?: RetrodictionResult['refusals'];
|
|
111
116
|
/** Upstream gaps for an under-determined target (from the classifier). */
|
|
112
117
|
readonly blockingFrontier: readonly string[];
|
|
113
118
|
/** Plain-language synthesis of the above. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"explain.d.ts","sourceRoot":"","sources":["../../src/composition/explain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAE3D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAElE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAIzD;;;;;GAKG;AACH,wBAAgB,
|
|
1
|
+
{"version":3,"file":"explain.d.ts","sourceRoot":"","sources":["../../src/composition/explain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAE3D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAElE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAIzD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,SAAK,GAAG,MAAM,CAEjE;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEjD;AACD,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,8BAA8B,CAAC;AAKnF;iDACiD;AACjD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI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G,OAAO,GAAG,OAAO,CAAC;IACrD;8DAC0D;IAC1D,QAAQ,CAAC,WAAW,CAAC,EAAE,8BAA8B,CAAC;IACtD,kGAAkG;IAClG,QAAQ,CAAC,QAAQ,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;IACnD,0EAA0E;IAC1E,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7C,6CAA6C;IAC7C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAyRD;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,SAAS,UAAU,EAAE,EAC5B,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAC3D,IAAI,GAAE,cAAmB,GACxB,mBAAmB,CAoPrB"}
|
|
@@ -29,13 +29,23 @@ import { retrodictNode } from './retrodiction.js';
|
|
|
29
29
|
import { CANONICAL_GROUP_PREFACTORS } from './canonical-prefactors.js';
|
|
30
30
|
import { canonicalById } from '../canonical/registry.js';
|
|
31
31
|
/**
|
|
32
|
-
* Text form of a recovered quantity:
|
|
33
|
-
* evaluator input is already passed at
|
|
34
|
-
* the printed form. An integer stays an integer (`1`, not `1.0000e+0`).
|
|
32
|
+
* Text form of a recovered quantity: `digits` significant digits (15 by default, the precision an
|
|
33
|
+
* evaluator input is already passed at; a statistic such as a residual in σ asks for 3). JSON keeps
|
|
34
|
+
* the number; this is only the printed form. An integer stays an integer (`1`, not `1.0000e+0`).
|
|
35
|
+
* Every command prints a number through this function or through {@link formatExact}.
|
|
35
36
|
* @internal
|
|
36
37
|
*/
|
|
37
|
-
export function formatQuantity(value) {
|
|
38
|
-
return String(Number(value.toPrecision(
|
|
38
|
+
export function formatQuantity(value, digits = 15) {
|
|
39
|
+
return String(Number(value.toPrecision(digits)));
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Text form of a computed value that a reader may need to reproduce bit for bit: the shortest
|
|
43
|
+
* decimal that round-trips to the same double (`upt evaluate`'s outputs). A recovered or compared
|
|
44
|
+
* quantity prints through {@link formatQuantity} instead.
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
export function formatExact(value) {
|
|
48
|
+
return String(value);
|
|
39
49
|
}
|
|
40
50
|
import { dimensionallyDetermines } from '../dimensional/buckingham.js';
|
|
41
51
|
import { collapseSynonymGovernors } from './aliases.js';
|
|
@@ -202,7 +212,9 @@ function monomialWithFactors(monomial, factors, present) {
|
|
|
202
212
|
}
|
|
203
213
|
return merged;
|
|
204
214
|
}
|
|
205
|
-
function buildSummary(target, id, derivations, consistency, recoveredValue, dimensional, knownNames, formulaIsSum, encodedMatchesMonomial, unsetSentence, even
|
|
215
|
+
function buildSummary(target, id, derivations, consistency, recoveredValue, dimensional, knownNames, formulaIsSum, encodedMatchesMonomial, unsetSentence, even,
|
|
216
|
+
/** The identification that determines the target when no edge does. */
|
|
217
|
+
viaIdentification) {
|
|
206
218
|
const known = knownNames.length
|
|
207
219
|
? `{${knownNames.join(', ')}}`
|
|
208
220
|
: '{} (no inputs)';
|
|
@@ -226,12 +238,22 @@ function buildSummary(target, id, derivations, consistency, recoveredValue, dime
|
|
|
226
238
|
s += ` Knowing one of {${id.blockingFrontier.join(', ')}} would unblock it.`;
|
|
227
239
|
}
|
|
228
240
|
break;
|
|
229
|
-
case 'exactly-determined':
|
|
230
|
-
|
|
241
|
+
case 'exactly-determined': {
|
|
242
|
+
// No edge derives a target the identification alone determines; the
|
|
243
|
+
// sentence then names the identification, not an undefined edge
|
|
244
|
+
// (9.0.0 audit §4 C11).
|
|
245
|
+
const first = derivations[0];
|
|
246
|
+
s =
|
|
247
|
+
first !== undefined
|
|
248
|
+
? `'${target}' is determined from ${known} via ${first.edge} (${first.label}).`
|
|
249
|
+
: viaIdentification !== undefined
|
|
250
|
+
? `'${target}' is determined from ${known} by the identification ${viaIdentification.from} ≡ ${viaIdentification.to} (${viaIdentification.rationale}).`
|
|
251
|
+
: `'${target}' is determined from ${known}.`;
|
|
231
252
|
if (recoveredValue !== undefined) {
|
|
232
253
|
s += ` Recovered value: ${formatQuantity(recoveredValue)}.`;
|
|
233
254
|
}
|
|
234
255
|
break;
|
|
256
|
+
}
|
|
235
257
|
case 'over-determined':
|
|
236
258
|
default: {
|
|
237
259
|
// Independence is counted by BRIDGE, not by edge: be-42 and be-42-via-rs
|
|
@@ -280,8 +302,6 @@ function buildSummary(target, id, derivations, consistency, recoveredValue, dime
|
|
|
280
302
|
}
|
|
281
303
|
else if (dimensional?.determined && dimensional.monomial) {
|
|
282
304
|
s += ` Dimensionally, ${known} fix it up to a dimensionless constant: ${target} ∝ ${formatMonomial(dimensional.monomial, even)}.`;
|
|
283
|
-
if (unsetSentence !== undefined)
|
|
284
|
-
s += ` ${unsetSentence}`;
|
|
285
305
|
}
|
|
286
306
|
else if (dimensional?.outsideGoverningSpan && knownNames.length) {
|
|
287
307
|
s += ` Dimensionally, those inputs alone do not fix it — the encoded formula carries dimensionful constants.`;
|
|
@@ -289,6 +309,10 @@ function buildSummary(target, id, derivations, consistency, recoveredValue, dime
|
|
|
289
309
|
else if (dimensional && !dimensional.determined && knownNames.length) {
|
|
290
310
|
s += ` Dimensionally, those inputs alone do not fix a unique monomial.`;
|
|
291
311
|
}
|
|
312
|
+
// The unset factor is a fact about the edge, whatever the inputs span: it is said whether or
|
|
313
|
+
// not a ∝ line could be printed (a baked constant removes the ∝ line, not the unset factor).
|
|
314
|
+
if (unsetSentence !== undefined)
|
|
315
|
+
s += ` ${unsetSentence}`;
|
|
292
316
|
return s;
|
|
293
317
|
}
|
|
294
318
|
/**
|
|
@@ -474,10 +498,19 @@ export function explainQuantity(edges, target, known, opts = {}) {
|
|
|
474
498
|
: recoveredValue !== undefined
|
|
475
499
|
? 'sourced'
|
|
476
500
|
: undefined;
|
|
477
|
-
|
|
478
|
-
|
|
501
|
+
// A target with no derivation that is still determinable is reached by an
|
|
502
|
+
// identification whose `from` the known set determines.
|
|
503
|
+
const viaIdentification = identifiability.verdict === 'exactly-determined' && derivations.length === 0
|
|
504
|
+
? identifications.find((ident) => ident.to === target && determinable.has(ident.from))
|
|
505
|
+
: undefined;
|
|
506
|
+
const summary = buildSummary(target, identifiability, derivations, consistency, recoveredValue, dimensional, knownNames, formulaIsSum, encodedAgrees, unsetSentence, magnitudeNames(firedEdges), viaIdentification);
|
|
507
|
+
// A refusal of the point (a validity domain, opposite carrier signs, a formula with no
|
|
508
|
+
// finite value there) is a bad value and is named with the edge's own reason. An unset
|
|
509
|
+
// coefficient is not: `unsetSentence` already says it in words (AGENTS law 4).
|
|
510
|
+
const domainRefusals = (refusals ?? []).filter((r) => r.kind !== 'coefficient-unset');
|
|
511
|
+
const refusalSentence = domainRefusals.length === 0 || recoveredValue !== undefined
|
|
479
512
|
? ''
|
|
480
|
-
: ` No recovered value: ${
|
|
513
|
+
: ` No recovered value: ${domainRefusals.map((r) => r.reason).join('; ')}.`;
|
|
481
514
|
return {
|
|
482
515
|
target,
|
|
483
516
|
known: knownNames,
|