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":"canonical-json.js","sourceRoot":"","sources":["../../src/composition/canonical-json.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AA4BzC,SAAS,mBAAmB,CAAC,CAAU;IACrC,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;IACzE,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;QACxC,MAAM,CAAC,GAAG,CAA4B,CAAC;QACvC,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;aACtB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC;aACjC,IAAI,EAAE;aACN,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;aAC/D,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;IAClB,CAAC;IACD,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAW,CAAC;AACrC,CAAC;AAED,SAAS,iBAAiB,CAAC,KAAc;IACvC,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ;QAA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AK,EAAE;QACtB,cAAc,EAAE,MAAM,OAAO,CAAC,cAAc,EAAE;KAC/C,CAAC;AACJ,CAAC;AAaD,MAAM,UAAU,kBAAkB,CAChC,OAAkB,EAClB,OAAkC;IAElC,IAAI,OAAO,KAAK,QAAQ,EAAE,CAAC;QACzB,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC1B,MAAM,IAAI,SAAS,CAAC,oDAAoD,CAAC,CAAC;QAC5E,CAAC;QACD,OAAO,iBAAiB,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;IACD,OAAO;QACL,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,IAAI;QAC3B,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,IAAI,EAAE,OAAO,CAAC,IAAI;KACnB,CAAC;AACJ,CAAC","sourcesContent":["/**\n * One canonical-JSON serializer with two named profiles.\n *\n * `probe` keeps the Date-to-ISO rule and the undefined-hole-to-null rule.\n * `record` keeps the bytes the CLI experiment record hashed before this module\n * existed: a `Date` becomes `{}`, and an array hole stays a hole.\n *\n * `captureEnvironment` is the same split. The probe profile stores the Node\n * version, the platform, and the architecture. The record profile stores the\n * UPT version, the parser, the peers, and the constant-table hashes. The\n * record sources are arguments because this module does not import `cli`.\n *\n * @module composition/canonical-json\n */\n\nimport { createHash } from 'node:crypto';\nimport type { EnvironmentFingerprint } from './probe/types.js';\n\n/** Which caller’s bytes `canonicalJson` writes. */\nexport type JsonProfile = 'record' | 'probe';\n\n/** Values the record profile reads. The caller supplies them. */\nexport interface RecordEnvironmentSources {\n readonly uptVersion: string;\n readonly node: string;\n readonly formulaParser: () => Promise<string>;\n readonly simplifier: () => Promise<boolean>;\n readonly peers: () => Record<string, string | null>;\n readonly constantTables: () => Promise<\n Record<string, { values: Record<string, number | string | boolean>; sha256: string }>\n >;\n}\n\n/** The record profile’s environment object. */\nexport interface RecordEnvironmentSnapshot {\n uptVersion: string;\n node: string;\n formulaParser: string;\n simplifier: boolean;\n peers: Record<string, string | null>;\n constantTables: Record<string, { values: Record<string, number | string | boolean>; sha256: string }>;\n}\n\nfunction canonicalJsonRecord(v: unknown): string {\n if (Array.isArray(v)) return `[${v.map(canonicalJsonRecord).join(',')}]`;\n if (typeof v === 'object' && v !== null) {\n const o = v as Record<string, unknown>;\n return `{${Object.keys(o)\n .filter((k) => o[k] !== undefined)\n .sort()\n .map((k) => `${JSON.stringify(k)}:${canonicalJsonRecord(o[k])}`)\n .join(',')}}`;\n }\n return JSON.stringify(v) as string;\n}\n\nfunction probeCanonicalize(value: unknown): unknown {\n if (value === null || typeof value !== 'object') return value;\n if (value instanceof Date) return value.toISOString();\n if (Array.isArray(value)) {\n return value.map((item) => (item === undefined ? null : probeCanonicalize(item)));\n }\n const obj = value as Record<string, unknown>;\n const sorted: Record<string, unknown> = {};\n for (const key of Object.keys(obj).sort()) {\n const item = obj[key];\n if (item === undefined) continue;\n sorted[key] = probeCanonicalize(item);\n }\n return sorted;\n}\n\nfunction canonicalJsonProbe(value: unknown): string {\n const json = JSON.stringify(probeCanonicalize(value));\n return json === undefined ? 'null' : json;\n}\n\n/**\n * Deterministic JSON for one profile. The default profile is `probe`.\n *\n * @internal\n */\nexport function canonicalJson(value: unknown, profile: JsonProfile = 'probe'): string {\n return profile === 'record' ? canonicalJsonRecord(value) : canonicalJsonProbe(value);\n}\n\n/**\n * SHA-256 digest of `text` as lowercase hex.\n *\n * @internal\n */\nexport function sha256Hex(text: string): string {\n return createHash('sha256').update(text, 'utf8').digest('hex');\n}\n\n/**\n * SHA-256 of the probe profile of `value`.\n *\n * @internal\n */\nexport function hashCanonical(value: unknown): string {\n return sha256Hex(canonicalJson(value, 'probe'));\n}\n\nasync function recordEnvironment(sources: RecordEnvironmentSources): Promise<RecordEnvironmentSnapshot> {\n return {\n uptVersion: sources.uptVersion,\n node: sources.node,\n formulaParser: await sources.formulaParser(),\n simplifier: await sources.simplifier(),\n peers: sources.peers(),\n constantTables: await sources.constantTables(),\n };\n}\n\n/**\n * Host fingerprint for a probe run, or the toolchain fingerprint for a record.\n * The zero-argument call is the probe profile.\n *\n * @internal\n */\nexport function captureEnvironment(): EnvironmentFingerprint;\nexport function captureEnvironment(\n profile: 'record',\n sources: RecordEnvironmentSources,\n): Promise<RecordEnvironmentSnapshot>;\nexport function captureEnvironment(\n profile?: 'record',\n sources?: RecordEnvironmentSources,\n): EnvironmentFingerprint | Promise<RecordEnvironmentSnapshot> {\n if (profile === 'record') {\n if (sources === undefined) {\n throw new TypeError('captureEnvironment record profile requires sources');\n }\n return recordEnvironment(sources);\n }\n return {\n node: process.versions.node,\n platform: process.platform,\n arch: process.arch,\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canonical-prefactors.js","sourceRoot":"","sources":["../../src/composition/canonical-prefactors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,sGAAsG;AACtG,MAAM,eAAe,GAAgC,IAAI,GAAG,CAC1D,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,KAAK,CAAU,CAAC,CAAC,CAAC,CAC5G,CAAC;AAEF,4EAA4E;AAC5E,MAAM,UAAU,kBAAkB,CAAC,EAAU;IAC3C,OAAO,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AACjC,CAAC;AAgBD,kFAAkF;AAClF,MAAM,CAAC,MAAM,0BAA0B,GAAuC,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAC9G,CAAC,CAAC,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,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E,GAAG,CAAC,CAAC,cAAc,EAAE,CAAC,CAC1E,CAAC;AAEF,kGAAkG;AAClG,MAAM,UAAU,uBAAuB,CAAC,EAAU,EAAE,UAAkB;IACpE,MAAM,CAAC,GAAG,0BAA0B,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IAC9D,OAAO,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,GAAG,UAAU,IAAI,CAAC,CAAC,QAAQ,CAAC;AAChF,CAAC","sourcesContent":["/**\n * Sourced prefactors of canonical equations, projected from the entries.\n *\n * CE-pendulum-period is a monomial and CE-kinetic-energy's AST is `m·v²`, so a\n * user formula wrong by 2π or ½ could not be caught (persona findings L2, L7).\n * Each entry that records only dimensionally, or only up to a constant, states\n * its exact prefactor as `prefactor` with a verbatim quote and a revision-pinned\n * locator; a test holds that neither its AST nor its monomial carries a constant\n * of its own. The lookups here read those fields; the entry owns the fact, and\n * a caller that wants the quote or the locator reads the entry.\n *\n * A prefactor that depends on a dimensionless group the entry's dimensional\n * record does not carry (CE-sound-speed's √γ) is not a constant: it is the\n * entry's `groupPrefactor`, and `canonicalPrefactor` does not return it. Only\n * a caller that can bind the group uses `canonicalGroupPrefactor`.\n *\n * @module composition/canonical-prefactors\n */\n\nimport { CANONICAL_EQUATIONS } from '../canonical/registry.js';\n\n/** Entry id → the exact factor in front of its AST or monomial, read from the entry's `prefactor`. */\nconst PREFACTOR_BY_ID: ReadonlyMap<string, number> = new Map(\n CANONICAL_EQUATIONS.flatMap((e) => (e.prefactor === undefined ? [] : [[e.id, e.prefactor.value] as const])),\n);\n\n/** The sourced prefactor of a canonical entry, or `undefined`. @internal */\nexport function canonicalPrefactor(id: string): number | undefined {\n return PREFACTOR_BY_ID.get(id);\n}\n\n/**\n * A sourced prefactor that is a power of a dimensionless group: the factor in\n * front of the entry's AST or monomial is `coefficient · group^exponent`. @internal\n */\nexport interface CanonicalGroupPrefactor {\n readonly id: string;\n /** The group as the entry's formula names it (`'gamma'` for γ). */\n readonly group: string;\n readonly coefficient: number;\n readonly exponent: number;\n readonly quote: string;\n readonly locator: string;\n}\n\n/** The sourced group prefactors, one row per entry that records one. @internal */\nexport const CANONICAL_GROUP_PREFACTORS: readonly CanonicalGroupPrefactor[] = CANONICAL_EQUATIONS.flatMap((e) =>\n e.groupPrefactor === undefined ? [] : [{ id: e.id, ...e.groupPrefactor }],\n);\n\n/** The prefactor of a group-dependent entry at a value of its group, or `undefined`. @internal */\nexport function canonicalGroupPrefactor(id: string, groupValue: number): number | undefined {\n const p = CANONICAL_GROUP_PREFACTORS.find((q) => q.id === id);\n return p === undefined ? undefined : p.coefficient * groupValue ** p.exponent;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog-graph.d.ts","sourceRoot":"","sources":["../../src/composition/catalog-graph.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"catalog-graph.d.ts","sourceRoot":"","sources":["../../src/composition/catalog-graph.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAqC5C,wEAAwE;AACxE,eAAO,MAAM,aAAa,EAAE,SAAS,UAAU,EAAsC,CAAC;AAItF,2CAA2C;AAC3C,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,UAAU,CAIlD;AAED,yDAAyD;AACzD,wBAAgB,kBAAkB,IAAI;IACpC,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC;IAC9B,QAAQ,CAAC,aAAa,EAAE,UAAU,CAAC;IACnC,QAAQ,CAAC,gBAAgB,EAAE,UAAU,CAAC;CACvC,CAgBA"}
|
|
@@ -8,27 +8,13 @@ import { parseCatalogExpression } from '../bridges/expr-parse.js';
|
|
|
8
8
|
import { evaluateCatalogRelation, relationHolds } from '../bridges/relation-eval.js';
|
|
9
9
|
import { withBoundAliases } from './edge.js';
|
|
10
10
|
import { quantityByName } from './quantities.js';
|
|
11
|
-
|
|
12
|
-
const fromEntry = relation.catalogId === null ? undefined : catalogEntry(relation.catalogId)?.regime;
|
|
13
|
-
if (fromEntry !== undefined && relation.regime !== undefined && JSON.stringify(fromEntry) !== JSON.stringify(relation.regime)) {
|
|
14
|
-
throw new Error(`catalog ${relation.catalogId} regime disagrees with relation ${relation.id}`);
|
|
15
|
-
}
|
|
16
|
-
return fromEntry ?? relation.regime;
|
|
17
|
-
}
|
|
18
|
-
function inherited(relation, field) {
|
|
19
|
-
const fromRelation = relation[field];
|
|
20
|
-
const entry = relation.catalogId === null ? undefined : catalogEntry(relation.catalogId);
|
|
21
|
-
const fromEntry = entry?.[field];
|
|
22
|
-
if (fromRelation !== undefined && fromEntry !== undefined && JSON.stringify(fromRelation) !== JSON.stringify(fromEntry)) {
|
|
23
|
-
throw new Error(`catalog ${relation.catalogId} ${field} disagrees with relation ${relation.id}`);
|
|
24
|
-
}
|
|
25
|
-
return fromRelation ?? fromEntry;
|
|
26
|
-
}
|
|
11
|
+
/** The catalog row owns the relation contract, the regime, the conventions and the counterexamples; the edge reads them from it. */
|
|
27
12
|
function buildEdge(relation) {
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
13
|
+
const row = relation.catalogId === null ? undefined : catalogEntry(relation.catalogId);
|
|
14
|
+
const regime = row?.regime;
|
|
15
|
+
const contract = row?.relation;
|
|
16
|
+
const conventions = row?.conventions;
|
|
17
|
+
const counterexamples = row?.counterexamples;
|
|
32
18
|
const edge = {
|
|
33
19
|
id: relation.id,
|
|
34
20
|
beId: relation.catalogId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog-graph.js","sourceRoot":"","sources":["../../src/composition/catalog-graph.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAErF,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,SAAS,SAAS,CAAC,QAAqD;IACtE,MAAM,
|
|
1
|
+
{"version":3,"file":"catalog-graph.js","sourceRoot":"","sources":["../../src/composition/catalog-graph.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAErF,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,oIAAoI;AACpI,SAAS,SAAS,CAAC,QAAqD;IACtE,MAAM,GAAG,GAAG,QAAQ,CAAC,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IACvF,MAAM,MAAM,GAAG,GAAG,EAAE,MAAM,CAAC;IAC3B,MAAM,QAAQ,GAAG,GAAG,EAAE,QAAQ,CAAC;IAC/B,MAAM,WAAW,GAAG,GAAG,EAAE,WAAW,CAAC;IACrC,MAAM,eAAe,GAAG,GAAG,EAAE,eAAe,CAAC;IAC7C,MAAM,IAAI,GAAe;QACvB,EAAE,EAAE,QAAQ,CAAC,E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AAE,EAAE,CAAC,GAAG,CAAC,MAAM,KAAK,yBAAyB,CAAC,CAAC;IAC5F,MAAM,GAAG,GAAG,gBAAgB,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,KAAK,qBAAqB,IAAI,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC;IACnI,MAAM,GAAG,GAAG,gBAAgB,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,KAAK,IAAI,GAAG,CAAC,MAAM,KAAK,sBAAsB,CAAC,CAAC;IAC1G,IAAI,OAAO,KAAK,SAAS,IAAI,QAAQ,KAAK,SAAS,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QAC9F,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;IAC7E,CAAC;IACD,OAAO;QACL,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;QAChC,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAAC,EAAE,CAAC;QAClC,aAAa,EAAE,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC;QAClC,gBAAgB,EAAE,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC;KACtC,CAAC;AACJ,CAAC","sourcesContent":["/**\n * The composition graph is the relation projection of the bridge catalog.\n *\n * @module composition/catalog-graph\n */\n\nimport { catalogEntry, catalogRelations } from '../bridges/catalog-load.js';\nimport { parseCatalogExpression } from '../bridges/expr-parse.js';\nimport { evaluateCatalogRelation, relationHolds } from '../bridges/relation-eval.js';\nimport type { BridgeEdge } from './edge.js';\nimport { withBoundAliases } from './edge.js';\nimport { quantityByName } from './quantities.js';\n\n/** The catalog row owns the relation contract, the regime, the conventions and the counterexamples; the edge reads them from it. */\nfunction buildEdge(relation: ReturnType<typeof catalogRelations>[number]): BridgeEdge {\n const row = relation.catalogId === null ? undefined : catalogEntry(relation.catalogId);\n const regime = row?.regime;\n const contract = row?.relation;\n const conventions = row?.conventions;\n const counterexamples = row?.counterexamples;\n const edge: BridgeEdge = {\n id: relation.id,\n beId: relation.catalogId,\n kind: relation.kind,\n label: relation.label,\n sources: relation.sources.map((name) => quantityByName(name)),\n ...(Object.keys(relation.aliases).length > 0 ? { aliases: relation.aliases } : {}),\n target: quantityByName(relation.target),\n confidence: relation.confidence,\n domain: {\n description: relation.domain,\n predicate: (inputs) => relationHolds(relation, inputs),\n },\n evaluate: (inputs) => evaluateCatalogRelation(relation, inputs),\n symbolic: parseCatalogExpression(relation.expression),\n citation: relation.citation,\n ...(relation.coefficientUnset === true ? { coefficientUnset: true } : {}),\n ...(relation.formulaFactors !== undefined ? { formulaFactors: relation.formulaFactors } : {}),\n ...(contract !== undefined ? { relation: contract } : {}),\n ...(regime !== undefined ? { regime } : {}),\n ...(conventions !== undefined ? { conventions } : {}),\n ...(counterexamples !== undefined ? { counterexamples } : {}),\n };\n return withBoundAliases(edge);\n}\n\n/** Every catalog relation as a graph edge, in catalog order. @public */\nexport const CATALOG_GRAPH: readonly BridgeEdge[] = catalogRelations().map(buildEdge);\n\nconst BY_ID = new Map(CATALOG_GRAPH.map((edge) => [edge.id, edge]));\n\n/** The catalog edge with this graph id. */\nexport function catalogEdge(id: string): BridgeEdge {\n const edge = BY_ID.get(id);\n if (edge === undefined) throw new Error(`catalogEdge: no edge '${id}'`);\n return edge;\n}\n\n/** The two composition demonstrations the CLI prints. */\nexport function demonstrationEdges(): {\n readonly hawking: BridgeEdge;\n readonly landauer: BridgeEdge;\n readonly schwarzschild: BridgeEdge;\n readonly hawkingViaRadius: BridgeEdge;\n} {\n const hawking = catalogRelations().find(\n (row) => row.target === 'hawking-temperature' && row.sources.length === 1 && row.sources[0] === 'mass',\n );\n const landauer = catalogRelations().find((row) => row.target === 'landauer-erasure-energy');\n const via = catalogRelations().find((row) => row.target === 'hawking-temperature' && row.sources.includes('schwarzschild-radius'));\n const law = catalogRelations().find((row) => row.kind === 'law' && row.target === 'schwarzschild-radius');\n if (hawking === undefined || landauer === undefined || via === undefined || law === undefined) {\n throw new Error('demonstrationEdges: a demonstration relation is missing');\n }\n return {\n hawking: catalogEdge(hawking.id),\n landauer: catalogEdge(landauer.id),\n schwarzschild: catalogEdge(law.id),\n hawkingViaRadius: catalogEdge(via.id),\n };\n}\n"]}
|
|
@@ -38,6 +38,8 @@ export declare function compareChainEdgeIds(left: readonly string[], right: read
|
|
|
38
38
|
/**
|
|
39
39
|
* Total order of chain candidates. Returns a new array of the same
|
|
40
40
|
* objects. The input array is left as it was.
|
|
41
|
+
*
|
|
42
|
+
* @internal
|
|
41
43
|
*/
|
|
42
44
|
export declare function orderChainCandidates(candidates: readonly ChainCandidate[]): ChainCandidate[];
|
|
43
45
|
//# sourceMappingURL=chain-candidate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain-candidate.d.ts","sourceRoot":"","sources":["../../src/composition/chain-candidate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,gDAAgD;AAChD,MAAM,MAAM,kBAAkB,GAC1B,cAAc,GACd,aAAa,GACb,iBAAiB,GACjB,eAAe,CAAC;AAEpB;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;CACtB;AAeD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CASjG;AAED
|
|
1
|
+
{"version":3,"file":"chain-candidate.d.ts","sourceRoot":"","sources":["../../src/composition/chain-candidate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,gDAAgD;AAChD,MAAM,MAAM,kBAAkB,GAC1B,cAAc,GACd,aAAa,GACb,iBAAiB,GACjB,eAAe,CAAC;AAEpB;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;CACtB;AAeD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CASjG;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,SAAS,cAAc,EAAE,GAAG,cAAc,EAAE,CAM5F"}
|
|
@@ -44,6 +44,8 @@ export function compareChainEdgeIds(left, right) {
|
|
|
44
44
|
/**
|
|
45
45
|
* Total order of chain candidates. Returns a new array of the same
|
|
46
46
|
* objects. The input array is left as it was.
|
|
47
|
+
*
|
|
48
|
+
* @internal
|
|
47
49
|
*/
|
|
48
50
|
export function orderChainCandidates(candidates) {
|
|
49
51
|
return [...candidates].sort((a, b) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain-candidate.js","sourceRoot":"","sources":["../../src/composition/chain-candidate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AA0BH,SAAS,UAAU,CAAC,IAAwB;IAC1C,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,cAAc;YACjB,OAAO,CAAC,CAAC;QACX,KAAK,aAAa;YAChB,OAAO,CAAC,CAAC;QACX,KAAK,iBAAiB;YACpB,OAAO,CAAC,CAAC;QACX,KAAK,eAAe;YAClB,OAAO,CAAC,CAAC;IACb,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAuB,EAAE,KAAwB;IACnF,IAAI,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAW,CAAC;QAC5B,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAW,CAAC;QAC7B,IAAI,CAAC,GAAG,CAAC;YAAE,OAAO,CAAC,CAAC,CAAC;QACrB,IAAI,CAAC,GAAG,CAAC;YAAE,OAAO,CAAC,CAAC;IACtB,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"chain-candidate.js","sourceRoot":"","sources":["../../src/composition/chain-candidate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AA0BH,SAAS,UAAU,CAAC,IAAwB;IAC1C,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,cAAc;YACjB,OAAO,CAAC,CAAC;QACX,KAAK,aAAa;YAChB,OAAO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n * A chain candidate and the order the pipeline reads candidates in.\n *\n * Confirmation of a catalog id, then a restatement, then a unique\n * monomial, then a named PhysJS.Dimensional shape that leaves a\n * function or an exponent unfixed. A shorter chain comes before a\n * longer one. Equal lengths compare the ordered edge ids from the\n * left. Nothing here is written into the catalog.\n *\n * @internal\n * @module composition/chain-candidate\n */\n\n/** The four classes the order distinguishes. */\nexport type ChainCandidateKind =\n | 'confirmation'\n | 'restatement'\n | 'unique-monomial'\n | 'unfixed-shape';\n\n/**\n * One survivor of a chain of proved edges.\n *\n * `kind` and `edgeIds` are the order. `catalogId`, `canonicalId`,\n * `restatesBridge`, `theorem`, and `id` are carried data and are not\n * compared.\n */\nexport interface ChainCandidate {\n readonly kind: ChainCandidateKind;\n readonly edgeIds: readonly string[];\n readonly catalogId?: number;\n readonly canonicalId?: string;\n readonly restatesBridge?: string;\n readonly theorem?: string;\n readonly id?: string;\n}\n\nfunction classIndex(kind: ChainCandidateKind): number {\n switch (kind) {\n case 'confirmation':\n return 0;\n case 'restatement':\n return 1;\n case 'unique-monomial':\n return 2;\n case 'unfixed-shape':\n return 3;\n }\n}\n\n/**\n * Shorter chain first, then lexicographic edge ids.\n *\n * The regime-mismatch list uses this same comparison. It is not a class\n * inside {@link orderChainCandidates}.\n */\nexport function compareChainEdgeIds(left: readonly string[], right: readonly string[]): -1 | 0 | 1 {\n if (left.length !== right.length) return left.length < right.length ? -1 : 1;\n for (let i = 0; i < left.length; i++) {\n const a = left[i] as string;\n const b = right[i] as string;\n if (a < b) return -1;\n if (a > b) return 1;\n }\n return 0;\n}\n\n/**\n * Total order of chain candidates. Returns a new array of the same\n * objects. The input array is left as it was.\n *\n * @internal\n */\nexport function orderChainCandidates(candidates: readonly ChainCandidate[]): ChainCandidate[] {\n return [...candidates].sort((a, b) => {\n const byClass = classIndex(a.kind) - classIndex(b.kind);\n if (byClass !== 0) return byClass < 0 ? -1 : 1;\n return compareChainEdgeIds(a.edgeIds, b.edgeIds);\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain-match.js","sourceRoot":"","sources":["../../src/composition/chain-match.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,iBAAiB,GAElB,MAAM,4BAA4B,CAAC;AAEpC;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,IAAc,EAAE,OAA0B;IACnE,OAAO,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC1C,CAAC"}
|
|
1
|
+
{"version":3,"file":"chain-match.js","sourceRoot":"","sources":["../../src/composition/chain-match.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,iBAAiB,GAElB,MAAM,4BAA4B,CAAC;AAEpC;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,IAAc,EAAE,OAA0B;IACnE,OAAO,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["/**\n * Pipeline match for a chain of proved edges.\n *\n * Calls {@link classifyStructure}. A confirmation reports the catalog id.\n * A restatement reports the pre-declared canonical equation. Anything else\n * is a provisional `chain-` id. This function writes no catalog row, no\n * formal-reference overlay entry, and no evidence tag.\n *\n * @module composition/chain-match\n */\nimport type { ExprNode } from '../dimensional/validator.js';\nimport {\n classifyStructure,\n type ChainClassification,\n} from '../canonical/structural.js';\n\n/**\n * Classify one composed chain. `edgeIds` stay in chain order.\n *\n * @internal\n */\nexport function matchChain(expr: ExprNode, edgeIds: readonly string[]): ChainClassification {\n return classifyStructure(expr, edgeIds);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain-regime.js","sourceRoot":"","sources":["../../src/composition/chain-regime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EACL,oBAAoB,GAErB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;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OAAO,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,MAAM,CAAC,EAAE,CAAC;QAC9B,QAAQ;QACR,OAAO;KACR,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Regime gate for a chain that meets on a quantity name.\n *\n * The domain is the §VI.6.1 component of the catalog category of `beId`,\n * derived by `tensorIndexComponent`. Scale and force are the gated axes\n * on the two junction ports. A recorded `Regime` on both edges is\n * compared with `regimeOverlap`. Silence on a facet is not a mismatch.\n * The rule is `docs/planning/Regime-Aware-Join-Gate-Design.md`.\n *\n * This module does not write the catalog and does not call `deriveEvidence`.\n *\n * @module composition/chain-regime\n */\n\nimport { BRIDGE_EQUATIONS } from '../bridges/index.js';\nimport {\n tensorIndexComponent,\n type TensorIndexComponent,\n} from '../bridges/tensor-index.js';\nimport { regimeOverlap } from '../relations/regime.js';\nimport { GATE_AXES } from './axes.js';\nimport { QUANTITY_IDENTIFICATIONS } from './compose.js';\nimport type { BridgeEdge } from './edge.js';\nimport type { Quantity } from './quantity.js';\n\n/** The class a regime-incompatible join is recorded as. @internal */\nexport const REGIME_MISMATCH_KIND = 'rejected: regime mismatch' as const;\n\n/** A join the regime gate refused. Not a stub and not a catalog write. @internal */\nexport interface ChainRegimeMismatch {\n readonly kind: typeof REGIME_MISMATCH_KIND;\n readonly edgeIds: readonly [string, string];\n readonly quantity: string;\n readonly reasons: readonly string[];\n}\n\nfunction edgeDomain(edge: BridgeEdge): TensorIndexComponent | undefined {\n if (edge.beId === null) return undefined;\n const entry = BRIDGE_EQUATIONS.find((row) => row.id === edge.beId);\n if (entry === undefined) return undefined;\n const component = tensorIndexComponent(entry.category);\n if (component === 'unassigned') return undefined;\n return component;\n}\n\nfunction junctionPorts(\n first: BridgeEdge,\n second: BridgeEdge,\n): { quantity: string; producer: Quantity; consumer: Quantity } {\n const named = second.sources.find((src) => src.name === first.target.name);\n if (named !== undefined) {\n return { quantity: first.target.name, producer: first.target, consumer: named };\n }\n for (const ident of QUANTITY_IDENTIFICATIONS) {\n if (ident.from !== first.target.name) continue;\n const src = second.sources.find((candidate) => candidate.name === ident.to);\n if (src !== undefined) {\n return { quantity: first.target.name, producer: first.target, consumer: src };\n }\n }\n throw new Error(`chain regime gate: ${first.id} -> ${second.id} has no junction`);\n}\n\n/**\n * The regime mismatch of a pair, or `undefined` when every facet abstains\n * or agrees.\n *\n * Reasons, in order: a domain clash, then each clashing `GATE_AXES` axis,\n * then `regime: disjoint`. The producer value is written first.\n *\n * @internal\n */\nexport function joinRegimeMismatch(\n first: BridgeEdge,\n second: BridgeEdge,\n): ChainRegimeMismatch | undefined {\n const { quantity, producer, consumer } = junctionPorts(first, second);\n const reasons: string[] = [];\n const producerDomain = edgeDomain(first);\n const consumerDomain = edgeDomain(second);\n if (\n producerDomain !== undefined &&\n consumerDomain !== undefined &&\n producerDomain !== consumerDomain\n ) {\n reasons.push(`domain: ${producerDomain} ≠ ${consumerDomain}`);\n }\n const producerAttrs = producer.attributes as Record<string, string | undefined>;\n const consumerAttrs = consumer.attributes as Record<string, string | undefined>;\n for (const axis of GATE_AXES) {\n const left = producerAttrs[axis];\n const right = consumerAttrs[axis];\n if (left !== undefined && right !== undefined && left !== right) {\n reasons.push(`${axis}: ${left} ≠ ${right}`);\n }\n }\n if (\n first.regime !== undefined &&\n second.regime !== undefined &&\n regimeOverlap(first.regime, second.regime) === 'disjoint'\n ) {\n reasons.push('regime: disjoint');\n }\n if (reasons.length === 0) return undefined;\n return {\n kind: REGIME_MISMATCH_KIND,\n edgeIds: [first.id, second.id],\n quantity,\n reasons,\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain-result.js","sourceRoot":"","sources":["../../src/composition/chain-result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,EAAE,mBAAmB,EAA2B,MAAM,sBAAsB,CAAC;AAuBpF;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa,CAAC,MAAmB;IAC/C,IAAI,MAAM,CAAC,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MAAM,CAAC,cAAc,CAAC,IAAI,KAAK,cAAc;QAAE,OAAO,cAAc,CAAC;IACzE,IAAI,MAAM,CAAC,cAAc,CAAC,IAAI,KAAK,aAAa;QAAE,OAAO,aAAa,CAAC;IACvE,OAAO,MAAM,CAAC,OAAO,KAAK,kCAAkC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,eAAe,CAAC;AACrG,CAAC;AAED,SAAS,UAAU,CAAC,IAAwB;IAC1C,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,cAAc;YACjB,OAAO,CAAC,CAAC;QACX,KAAK,aAAa;YAChB,OAAO,CAAC,CAAC;QACX,KAAK,iBAAiB;YACpB,OAAO,CAAC,CAAC;QACX,KAAK,eAAe;YAClB,OAAO,CAAC,CAAC;IACb,CAAC;AACH,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAA+B;IAC/D,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAChC,MAAM,OAAO,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5E,IAAI,OAAO,KAAK,CAAC;YAAE,OAAO,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/C,OAAO,mBAAmB,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;IACnD,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["/**\n * One internal chain record.\n *\n * The classifier kind, the order key, the filter theorem, a regime\n * mismatch, and the edge ids live on this value. {@link chainOrderKey}\n * and the pipeline's renderer are functions of it. A confirmation and a\n * restatement do not become a rejection.\n *\n * @module composition/chain-result\n */\n\nimport type { ChainClassification } from '../canonical/structural.js';\nimport type { CompositionResult } from '../relations/composition-table.js';\nimport type { BuckinghamFilterRecord } from './buckingham-filter.js';\nimport { compareChainEdgeIds, type ChainCandidateKind } from './chain-candidate.js';\nimport type { ChainRegimeMismatch } from './chain-regime.js';\n\n/**\n * The pipeline's one chain value.\n *\n * `classification` is the structural result. `theorem` is the Buckingham\n * filter's named shape, or null when the filter named none. `mismatch`\n * is set only for a provisional chain the regime gate refused.\n * `categoryComposition` is the category claim for the two steps. It is\n * unset when the edges have no stored category object ids. A recorded\n * `no-composite-claim` does not change the order key.\n *\n * @internal\n */\nexport interface ChainRecord {\n readonly edgeIds: readonly string[];\n readonly classification: ChainClassification;\n readonly theorem: BuckinghamFilterRecord['theorem'];\n readonly mismatch: ChainRegimeMismatch | undefined;\n readonly categoryComposition: CompositionResult | undefined;\n}\n\n/**\n * The four-class order key of `record`.\n *\n * A confirmation stays a confirmation. A restatement stays a restatement.\n * A provisional chain whose filter theorem is `monomial_form` is a unique\n * monomial. Every other provisional chain is an unfixed shape. A mismatch\n * does not change the key.\n *\n * @internal\n */\nexport function chainOrderKey(record: ChainRecord): ChainCandidateKind {\n if (record.classification.kind === 'confirmation') return 'confirmation';\n if (record.classification.kind === 'restatement') return 'restatement';\n return record.theorem === 'PhysJS.Dimensional.monomial_form' ? 'unique-monomial' : 'unfixed-shape';\n}\n\nfunction classIndex(kind: ChainCandidateKind): number {\n switch (kind) {\n case 'confirmation':\n return 0;\n case 'restatement':\n return 1;\n case 'unique-monomial':\n return 2;\n case 'unfixed-shape':\n return 3;\n }\n}\n\n/**\n * Total order of chain records by {@link chainOrderKey}, then by edge ids.\n *\n * Returns a new array. The input array is left as it was. A rejection is\n * not a class in this order.\n *\n * @internal\n */\nexport function orderChainRecords(records: readonly ChainRecord[]): ChainRecord[] {\n return [...records].sort((a, b) => {\n const byClass = classIndex(chainOrderKey(a)) - classIndex(chainOrderKey(b));\n if (byClass !== 0) return byClass < 0 ? -1 : 1;\n return compareChainEdgeIds(a.edgeIds, b.edgeIds);\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose-surface.js","sourceRoot":"","sources":["../../src/composition/compose-surface.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"compose-surface.js","sourceRoot":"","sources":["../../src/composition/compose-surface.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC","sourcesContent":["/**\n * v0.11 surface barrel for the namespacing-gate symbols (keeps\n * src/index.ts one-import-per-area while the implementations live in\n * compose.ts / edge.ts / enumerate.ts).\n *\n * @module composition/compose-surface\n */\nexport { CompositionAliasError } from './edge.js';\nexport { SOURCE_ALIAS_DISPOSITIONS } from './compose.js';\nexport type { AliasDisposition } from './compose.js';\nexport type { DispositionRequired } from './enumerate.js';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose-symbolic.js","sourceRoot":"","sources":["../../src/composition/compose-symbolic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAKvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AA4BrE;oEACoE;AACpE,MAAM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,CAAC,CAAC,CAAC,iBAAiB,CAAC,QAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,MAAM;YAC9D,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAClC,CAAC;IACJ,CAAC;IAED,OAAO,cAAc,CACnB,MAAM,CAAC,MAAM,CAAC,IAAI,EAClB,MAAM,CAAC,MAAM,CAAC,MAAM,EACpB,MAAM,CAAC,MAAM,CAAC,GAAG,EACjB,IAAI,CACL,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Symbolic bridge composition (v0.12 — the Observable contract).\n *\n * Resolves the Part-IX §4 \"Observable contract\" deferral with a fourth\n * option the spec did not enumerate: an OPTIONAL `symbolic` ExprNode on a\n * bridge edge (leaves = source-quantity names + the `CONSTANTS` registry),\n * composed by AST SUBSTITUTION. `composeSymbolic(first, second)` substitutes\n * `first`'s symbolic form into the junction leaf of `second`'s, producing a\n * new ExprNode that is dimensionally validated and numerically evaluable —\n * not the black-box numeric closure `composeEdges` chains.\n *\n * Non-breaking (the field is optional), no per-pair adapters, and it retains\n * dimensional type-safety. Edges without a `symbolic` form fall back to\n * numeric `composeEdges` (unchanged).\n *\n * @module composition/compose-symbolic\n */\n\nimport { equals, format } from '../dimensional/algebra.js';\nimport { validate } from '../dimensional/validator.js';\nimport type { ExprNode } from '../dimensional/validator.js';\nimport type { Dimension } from '../dimensional/types.js';\nimport type { BridgeEdge } from './edge.js';\nimport type { QuantityIdentification } from './compose.js';\nimport { QUANTITY_IDENTIFICATIONS } from './compose.js';\nimport { substitute } from './expr-subst.js';\nimport { evalExpr, SymbolicEvalError } from './expr-eval.js';\nimport { CONSTANTS } from '../dimensional/symbolic-constants.js';\nimport { scalarSymbolsFromMathTs } from './mathts-scalar-symbols.js';\n\n/**\n * A composed quantity carrying its SYMBOLIC form and an executable\n * evaluator — the shared return contract Part-IX §4 said was missing.\n *\n * @public\n */\nexport interface Observable {\n /** Target quantity name (from `second.target`). */\n readonly name: string;\n /** Display symbol. */\n readonly symbol: string;\n /** Dimensionally-validated SI dimension. */\n readonly dim: Dimension;\n /** The composed (substituted) AST. */\n readonly expr: ExprNode;\n /** Free leaf symbols = the required inputs (constants/literals excluded). */\n readonly leaves: readonly string[];\n /**\n * Numerically evaluate the composed form. STRICT input (Eve EVE-1): every\n * `leaves` key must be supplied and no extra key is accepted. PURE symbolic\n * value — NOT domain-checked (unlike `composeEdges`, which throws\n * `DomainViolationError`); use `composeEdges` for domain-checked values.\n */\n evaluate(values: Readonly<Record<string, number>>): number;\n}\n\n/** Symbolic composition is undefined (no junction / missing `symbolic` /\n * zero-occurrence substitution / dimensional mismatch). @public */\nexport class SymbolicCompositionError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'SymbolicCompositionError';\n }\n}\n\n/** Options for {@link composeSymbolic}. @public */\nexport interface ComposeSymbolicOptions {\n /** Extra identifications consulted after the registered ones. */\n readonly identifications?: readonly QuantityIdentification[];\n}\n\n/** Find the junction source of `second` matching `first.target` (by name or\n * identification). Returns the source whose NAME is the substitution leaf —\n * `junction.name` is correct in BOTH the name-match and identification cases\n * (Eve EVE-4), avoiding the always-`ident.to` trap. */\nfunction findJunctionName(\n first: BridgeEdge,\n second: BridgeEdge,\n identifications: readonly QuantityIdentification[],\n): string {\n for (const src of second.sources) {\n if (src.name === first.target.name) return src.name;\n }\n for (const ident of identifications) {\n if (ident.from !== first.target.name) continue;\n for (const src of second.sources) {\n if (src.name === ident.to) return src.name;\n }\n }\n throw new SymbolicCompositionError(\n `Cannot symbolically compose ${first.id} -> ${second.id}: target ` +\n `'${first.target.name}' matches none of [${second.sources\n .map((s) => `'${s.name}'`)\n .join(', ')}] by name or registered identification.`,\n );\n}\n\n/** Free leaves = symbols that are neither registered constants nor numeric\n * literals (those are not inputs). The names are the MathTS symbol filter. */\nfunction freeLeaves(expr: ExprNode): string[] {\n return scalarSymbolsFromMathTs(expr)\n .map((leaf) => leaf.name)\n .filter((n) => !(n in CONSTANTS) && !Number.isFinite(Number(n)))\n .sort();\n}\n\n/**\n * Build an {@link Observable} from a composed/simplified expression: computes\n * the free `leaves` and a STRICT `evaluate` closure over THIS `expr` + leaves.\n * Shared by `composeSymbolic` and `simplifyObservable` so a simplified\n * Observable gets a fresh closure (never the stale unsimplified one).\n *\n * @internal\n */\nexport function makeObservable(\n name: string,\n symbol: string,\n dim: Dimension,\n expr: ExprNode,\n): Observable {\n const leaves = freeLeaves(expr);\n return {\n name,\n symbol,\n dim,\n expr,\n leaves,\n evaluate(values) {\n for (const leaf of leaves) {\n if (!Object.prototype.hasOwnProperty.call(values, leaf)) {\n throw new SymbolicEvalError(\n `Observable(${name}).evaluate: missing required input '${leaf}' ` +\n `(leaves: ${leaves.join(', ')}).`,\n );\n }\n }\n for (const key of Object.keys(values)) {\n if (!leaves.includes(key)) {\n throw new SymbolicEvalError(\n `Observable(${name}).evaluate: unexpected input '${key}' (this ` +\n `Observable's inputs are exactly: ${leaves.join(', ') || '(none)'}).`,\n );\n }\n }\n return evalExpr(expr, values);\n },\n };\n}\n\n/**\n * Compose two bridges SYMBOLICALLY: substitute `first`'s `symbolic` form into\n * the junction leaf of `second`'s, validate the composed AST's dimension, and\n * return an {@link Observable}. Both operands must carry a `symbolic` form\n * (else throws — fall back to `composeEdges` for numeric-only composition).\n *\n * @public\n */\nexport function composeSymbolic(\n first: BridgeEdge,\n second: BridgeEdge,\n opts: ComposeSymbolicOptions = {},\n): Observable {\n const identifications = [\n ...QUANTITY_IDENTIFICATIONS,\n ...(opts.identifications ?? []),\n ];\n\n if (!first.symbolic || !second.symbolic) {\n const missing = !first.symbolic ? first.id : second.id;\n throw new SymbolicCompositionError(\n `Cannot symbolically compose ${first.id} -> ${second.id}: edge ` +\n `'${missing}' has no symbolic form (numeric-only edge — use ` +\n `composeEdges).`,\n );\n }\n\n const junctionName = findJunctionName(first, second, identifications);\n const { expr, count } = substitute(\n second.symbolic,\n junctionName,\n first.symbolic,\n );\n\n if (count === 0) {\n throw new SymbolicCompositionError(\n `Cannot symbolically compose ${first.id} -> ${second.id}: junction ` +\n `'${junctionName}' does not appear as a leaf of ${second.id}'s ` +\n `symbolic form — substitution would silently ignore ${first.id}.`,\n );\n }\n\n const v = validate(expr);\n if (!v.ok || v.inferredDimension === null) {\n throw new SymbolicCompositionError(\n `Composed symbolic form of ${first.id} -> ${second.id} failed ` +\n `dimensional validation: ${v.violations[0]?.note ?? 'not homogeneous'}.`,\n );\n }\n if (!equals(v.inferredDimension, second.target.dim)) {\n throw new SymbolicCompositionError(\n `Composed symbolic form of ${first.id} -> ${second.id} has dimension ` +\n `${format(v.inferredDimension)} but ${second.target.name} is ` +\n `${format(second.target.dim)}.`,\n );\n }\n\n return makeObservable(\n second.target.name,\n second.target.symbol,\n second.target.dim,\n expr,\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/composition/compose.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/composition/compose.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAGzD,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,KAAK,EAAY,gBAAgB,EAAE,MAAM,eAAe,CAAC;AA0DhE;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAA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AAmB,GACxB,UAAU,CAwNZ"}
|
|
@@ -30,14 +30,20 @@
|
|
|
30
30
|
* @module composition/compose
|
|
31
31
|
*/
|
|
32
32
|
import { equals, format } from '../dimensional/algebra.js';
|
|
33
|
+
import { validate } from '../dimensional/validator.js';
|
|
34
|
+
import { regimeAttributesOf } from './quantity.js';
|
|
35
|
+
import { AXES } from './axes.js';
|
|
33
36
|
import { conventionFactor } from '../dimensional/unit-convention.js';
|
|
34
|
-
import { CompositionAliasError, CompositionDimensionError, CompositionJunctionError, UndefinedCompositionError, } from './edge.js';
|
|
37
|
+
import { assertCoefficientSet, CompositionAliasError, CompositionDimensionError, CompositionJunctionError, UndefinedCompositionError, } from './edge.js';
|
|
35
38
|
import { DomainViolationError } from '../bridges/evaluation-errors.js';
|
|
39
|
+
import { substitute } from './expr-subst.js';
|
|
40
|
+
import { monomialExponents } from './formula-shape.js';
|
|
36
41
|
// Atlas Phase 1 overlay. The composition table is a leaf module (pure, no
|
|
37
42
|
// registry reads, no import from `src/composition/`), so this does not close a
|
|
38
43
|
// cycle — same rule as the type-only atlas import in `./edge.ts`.
|
|
39
44
|
import { composeRelation, NO_COMPOSITE_CLAIM } from '../relations/composition-table.js';
|
|
40
45
|
import { checkConventions } from '../relations/conventions.js';
|
|
46
|
+
import { intersectRegimes } from '../relations/regime.js';
|
|
41
47
|
/**
|
|
42
48
|
* The `RelationContract` a composed edge carries, given the composite TYPE the
|
|
43
49
|
* table returned and the two operand contracts.
|
|
@@ -145,20 +151,18 @@ export function effectiveAttributes(name, attributesByName, idents = QUANTITY_ID
|
|
|
145
151
|
if (folded)
|
|
146
152
|
contributors.push(folded);
|
|
147
153
|
}
|
|
148
|
-
// One-value-agrees, zero-or-conflicting-values-abstain, per axis.
|
|
149
|
-
//
|
|
150
|
-
//
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
const
|
|
154
|
-
const
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
result.information = [...infos][0];
|
|
161
|
-
return result;
|
|
154
|
+
// One-value-agrees, zero-or-conflicting-values-abstain, per REGISTRY axis.
|
|
155
|
+
// The fold reads `AXES`, so an axis the registry carries is folded here: a
|
|
156
|
+
// hand list once named scale, force and information only, and the
|
|
157
|
+
// discrimination audit then measured symmetry, topology and statistics as
|
|
158
|
+
// `checked: 0` whatever the data said (9.0.0 audit §4 C2).
|
|
159
|
+
const folded = {};
|
|
160
|
+
for (const { name } of AXES) {
|
|
161
|
+
const values = new Set(contributors.map((c) => c[name]).filter((v) => v !== undefined));
|
|
162
|
+
if (values.size === 1)
|
|
163
|
+
folded[name] = [...values][0];
|
|
164
|
+
}
|
|
165
|
+
return regimeAttributesOf(folded, `effectiveAttributes(${name})`);
|
|
162
166
|
}
|
|
163
167
|
/**
|
|
164
168
|
* Registered alias dispositions, keyed by composed id
|
|
@@ -168,18 +172,14 @@ export function effectiveAttributes(name, attributesByName, idents = QUANTITY_ID
|
|
|
168
172
|
* @public
|
|
169
173
|
*/
|
|
170
174
|
export const SOURCE_ALIAS_DISPOSITIONS = {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
'the source of the Schwarzschild radius the photon grazes — ' +
|
|
180
|
-
'the sharing IS the stress-test physics (ST-2).',
|
|
181
|
-
},
|
|
182
|
-
],
|
|
175
|
+
// Empty. The one entry this table held, `law-schwarzschild-radius>>be-51`
|
|
176
|
+
// ("ST-2": one M is both the lens and the r_s source), keyed a composition
|
|
177
|
+
// no call can reach: the law's target `schwarzschild-radius` matches none
|
|
178
|
+
// of be-51's sources (`mass`, `impact-parameter`) by name or registered
|
|
179
|
+
// identification, so `composeEdges` throws `CompositionJunctionError`
|
|
180
|
+
// before the alias gate runs. The judgment was never applied. Retracted in
|
|
181
|
+
// the 9.0.0 audit (§4 C8); `tests/composition/compose.test.ts` now requires
|
|
182
|
+
// every key here to reach the gate.
|
|
183
183
|
};
|
|
184
184
|
const CONFIDENCE_RANK = {
|
|
185
185
|
established: 2,
|
|
@@ -196,17 +196,17 @@ export function minConfidence(a, b) {
|
|
|
196
196
|
return CONFIDENCE_RANK[a] <= CONFIDENCE_RANK[b] ? a : b;
|
|
197
197
|
}
|
|
198
198
|
function findJunction(first, second, identifications) {
|
|
199
|
-
for (const src of second.sources) {
|
|
199
|
+
for (const [index, src] of second.sources.entries()) {
|
|
200
200
|
if (src.name === first.target.name) {
|
|
201
|
-
return { junction: src, viaIdentification: null };
|
|
201
|
+
return { junction: src, index, viaIdentification: null };
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
for (const ident of identifications) {
|
|
205
205
|
if (ident.from !== first.target.name)
|
|
206
206
|
continue;
|
|
207
|
-
for (const src of second.sources) {
|
|
207
|
+
for (const [index, src] of second.sources.entries()) {
|
|
208
208
|
if (src.name === ident.to) {
|
|
209
|
-
return { junction: src, viaIdentification: ident };
|
|
209
|
+
return { junction: src, index, viaIdentification: ident };
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
}
|
|
@@ -243,7 +243,7 @@ export function composeEdges(first, second, opts = {}) {
|
|
|
243
243
|
...QUANTITY_IDENTIFICATIONS,
|
|
244
244
|
...(opts.identifications ?? []),
|
|
245
245
|
];
|
|
246
|
-
const { junction, viaIdentification } = findJunction(first, second, identifications);
|
|
246
|
+
const { junction, index: junctionIndex, viaIdentification } = findJunction(first, second, identifications);
|
|
247
247
|
if (!junctionDimensionsMatch(first.target.dim, junction.dim)) {
|
|
248
248
|
throw new CompositionDimensionError(`Cannot compose ${first.id} -> ${second.id}: junction dimension ` +
|
|
249
249
|
`mismatch — ${first.target.name} is ${format(first.target.dim)} ` +
|
|
@@ -252,7 +252,10 @@ export function composeEdges(first, second, opts = {}) {
|
|
|
252
252
|
const junctionScale = viaIdentification === null
|
|
253
253
|
? 1
|
|
254
254
|
: conventionFactor(first.target.name, junction.name);
|
|
255
|
-
|
|
255
|
+
// The pipe fills ONE slot of `second.sources`, the one `findJunction`
|
|
256
|
+
// returned. Removal by object identity would also drop a second slot that
|
|
257
|
+
// holds the same `Quantity` object, which a `shared` disposition produces.
|
|
258
|
+
const remainingSources = second.sources.filter((_, i) => i !== junctionIndex);
|
|
256
259
|
// v0.11 Option D (namespacing gate): pure name-collision rule across
|
|
257
260
|
// operands. Intra-operand duplicates (e.g. ['mass','mass'] inherited
|
|
258
261
|
// from a prior 'shared' disposition) are exempt by construction —
|
|
@@ -326,9 +329,8 @@ export function composeEdges(first, second, opts = {}) {
|
|
|
326
329
|
// ── Atlas Phase 1 (S1.2b): the relation overlay, and NOTHING else. ────────
|
|
327
330
|
// Entered only when BOTH operands carry a `relation`. An operand with no
|
|
328
331
|
// relation skips this block, and the composed edge then has no `relation`
|
|
329
|
-
// key.
|
|
330
|
-
//
|
|
331
|
-
// `be-51`, `be-52`, `be-55`, and `be-59` (`derivation`). Those nine stay.
|
|
332
|
+
// key. The catalog edges that carry one are the catalog's `relation` rows
|
|
333
|
+
// (`tests/composition/relation-refusal.test.ts` lists them); they stay.
|
|
332
334
|
// When both operands carry a relation, a silent table cell throws
|
|
333
335
|
// `UndefinedCompositionError`. The approximation cell throws the same
|
|
334
336
|
// error, because an edge relation carries no norm transport and this
|
|
@@ -390,12 +392,17 @@ export function composeEdges(first, second, opts = {}) {
|
|
|
390
392
|
throw new DomainViolationError(`${id}: inputs violate composed validity domain ` +
|
|
391
393
|
`(${composedDomain.description})`);
|
|
392
394
|
}
|
|
395
|
+
// Each operand's unset-coefficient gate is the one `evaluateEdge`
|
|
396
|
+
// applies to a primitive edge; an operand's monomial times an absent 1
|
|
397
|
+
// must not reach the caller as a number through the pipe.
|
|
398
|
+
assertCoefficientSet(first, inputs);
|
|
393
399
|
const intermediate = first.evaluate(inputs);
|
|
394
400
|
const pipedInputs = buildSecondInputs(inputs, intermediate);
|
|
395
401
|
if (!second.domain.predicate(pipedInputs)) {
|
|
396
402
|
throw new DomainViolationError(`${id}: inputs violate composed validity domain ` +
|
|
397
403
|
`(${composedDomain.description})`);
|
|
398
404
|
}
|
|
405
|
+
assertCoefficientSet(second, pipedInputs);
|
|
399
406
|
return second.evaluate(pipedInputs);
|
|
400
407
|
},
|
|
401
408
|
citation: `${first.citation} | ${second.citation}`,
|
|
@@ -406,6 +413,116 @@ export function composeEdges(first, second, opts = {}) {
|
|
|
406
413
|
? { aliasDispositionsUsed: dispositionsUsed }
|
|
407
414
|
: {}),
|
|
408
415
|
...relationOverlay,
|
|
416
|
+
...carriedClaims(first, second, junction, junctionScale, finalRemaining, renameMap),
|
|
409
417
|
};
|
|
410
418
|
}
|
|
419
|
+
/**
|
|
420
|
+
* The claims a composed edge carries from its operands (9.0.0 audit §4 C5).
|
|
421
|
+
* A composed edge that dropped them answered differently from its operands:
|
|
422
|
+
* the regime gate abstained on every chain longer than two, an unset
|
|
423
|
+
* coefficient became a number, an even input lost its magnitude reading,
|
|
424
|
+
* a count became a Buckingham governor, and an alias key stopped working.
|
|
425
|
+
*
|
|
426
|
+
* - `regime`: the one an operand states; two of one family intersect
|
|
427
|
+
* (`intersectRegimes`, which also refuses conflicting group definitions);
|
|
428
|
+
* two of different families refuse with `UndefinedCompositionError`, since
|
|
429
|
+
* this layer does not state where a cross-family chain applies.
|
|
430
|
+
* - `coefficientUnset`: either operand's. `evaluateEdge` then refuses the
|
|
431
|
+
* composite; a bound group lifts a primitive entry only, because the group
|
|
432
|
+
* row is keyed by the entry id, so a composite with an unset operand is
|
|
433
|
+
* refused by `evaluateEdge` whatever is bound (its own `evaluate` applies
|
|
434
|
+
* each operand's gate and does lift the operand whose group is bound).
|
|
435
|
+
* - `evenInputs`, `aliases`: the first operand's, plus the second's for its
|
|
436
|
+
* remaining sources under their composed names. The piped junction is not
|
|
437
|
+
* an input and is dropped. An alias key that two quantities would share is
|
|
438
|
+
* carried for neither.
|
|
439
|
+
* - `formulaFactors`: the second operand's for its remaining sources, exact.
|
|
440
|
+
* The first operand's counts enter through the pipe with their exponent
|
|
441
|
+
* times the junction's exponent in the second's monomial, so they are
|
|
442
|
+
* carried only when `second.symbolic` is a monomial that states it.
|
|
443
|
+
* - `symbolic`: the second's form with the junction leaf replaced by the
|
|
444
|
+
* first's, when both exist, the junction carries no convention factor, no
|
|
445
|
+
* source was renamed, the leaf occurs, and the result validates to the
|
|
446
|
+
* target dimension. Otherwise absent, as on a numeric-only edge.
|
|
447
|
+
*/
|
|
448
|
+
function carriedClaims(first, second, junction, junctionScale, finalRemaining, renameMap) {
|
|
449
|
+
const out = {};
|
|
450
|
+
if (first.regime !== undefined && second.regime !== undefined) {
|
|
451
|
+
if (first.regime.family !== second.regime.family) {
|
|
452
|
+
throw new UndefinedCompositionError(`Cannot compose ${first.id} -> ${second.id}: the regimes are of different ` +
|
|
453
|
+
`families ('${first.regime.family}', '${second.regime.family}'), and this ` +
|
|
454
|
+
`layer does not state where a cross-family chain applies.`);
|
|
455
|
+
}
|
|
456
|
+
try {
|
|
457
|
+
out.regime = intersectRegimes(first.regime, second.regime);
|
|
458
|
+
}
|
|
459
|
+
catch (e) {
|
|
460
|
+
// Conflicting definitions of one group name: the composite has no regime this
|
|
461
|
+
// layer can state, the same refusal as a cross-family chain.
|
|
462
|
+
throw new UndefinedCompositionError(`Cannot compose ${first.id} -> ${second.id}: ${e.message}`);
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
else if (first.regime !== undefined || second.regime !== undefined) {
|
|
466
|
+
out.regime = first.regime ?? second.regime;
|
|
467
|
+
}
|
|
468
|
+
if (first.coefficientUnset === true || second.coefficientUnset === true)
|
|
469
|
+
out.coefficientUnset = true;
|
|
470
|
+
// Operand-internal name → the name the composite exposes it under.
|
|
471
|
+
const composedName = new Map(Object.entries(renameMap).map(([renamed, original]) => [original, renamed]));
|
|
472
|
+
const exposed = (name) => composedName.get(name) ?? name;
|
|
473
|
+
const remainingNames = new Set(finalRemaining.map((s) => s.name));
|
|
474
|
+
const secondRemaining = (name) => name !== junction.name && remainingNames.has(exposed(name));
|
|
475
|
+
const even = [
|
|
476
|
+
...(first.evenInputs ?? []),
|
|
477
|
+
...(second.evenInputs ?? []).filter(secondRemaining).map(exposed),
|
|
478
|
+
];
|
|
479
|
+
if (even.length > 0)
|
|
480
|
+
out.evenInputs = even;
|
|
481
|
+
const factors = {};
|
|
482
|
+
const junctionExponent = monomialExponents(second.symbolic)?.get(junction.name);
|
|
483
|
+
if (first.formulaFactors !== undefined && junctionExponent !== undefined) {
|
|
484
|
+
for (const [name, exp] of Object.entries(first.formulaFactors))
|
|
485
|
+
factors[name] = exp * junctionExponent;
|
|
486
|
+
}
|
|
487
|
+
for (const [name, exp] of Object.entries(second.formulaFactors ?? {})) {
|
|
488
|
+
if (secondRemaining(name))
|
|
489
|
+
factors[exposed(name)] = exp;
|
|
490
|
+
}
|
|
491
|
+
if (Object.keys(factors).length > 0)
|
|
492
|
+
out.formulaFactors = factors;
|
|
493
|
+
const aliasOwner = new Map();
|
|
494
|
+
const shared = new Set();
|
|
495
|
+
const aliases = {};
|
|
496
|
+
const addAliases = (quantity, keys) => {
|
|
497
|
+
for (const key of keys) {
|
|
498
|
+
const owner = aliasOwner.get(key);
|
|
499
|
+
if (owner !== undefined && owner !== quantity)
|
|
500
|
+
shared.add(key);
|
|
501
|
+
aliasOwner.set(key, quantity);
|
|
502
|
+
(aliases[quantity] ??= []).push(key);
|
|
503
|
+
}
|
|
504
|
+
};
|
|
505
|
+
for (const [quantity, keys] of Object.entries(first.aliases ?? {}))
|
|
506
|
+
addAliases(quantity, keys);
|
|
507
|
+
for (const [quantity, keys] of Object.entries(second.aliases ?? {})) {
|
|
508
|
+
if (secondRemaining(quantity))
|
|
509
|
+
addAliases(exposed(quantity), keys);
|
|
510
|
+
}
|
|
511
|
+
const kept = Object.fromEntries(Object.entries(aliases)
|
|
512
|
+
.map(([quantity, keys]) => [quantity, keys.filter((k) => !shared.has(k))])
|
|
513
|
+
.filter(([, keys]) => keys.length > 0));
|
|
514
|
+
if (Object.keys(kept).length > 0)
|
|
515
|
+
out.aliases = kept;
|
|
516
|
+
if (first.symbolic !== undefined &&
|
|
517
|
+
second.symbolic !== undefined &&
|
|
518
|
+
junctionScale === 1 &&
|
|
519
|
+
Object.keys(renameMap).length === 0) {
|
|
520
|
+
const { expr, count } = substitute(second.symbolic, junction.name, first.symbolic);
|
|
521
|
+
const v = count > 0 ? validate(expr) : undefined;
|
|
522
|
+
if (v !== undefined && v.ok && v.inferredDimension !== null && equals(v.inferredDimension, second.target.dim)) {
|
|
523
|
+
out.symbolic = expr;
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
return out;
|
|
527
|
+
}
|
|
411
528
|
//# sourceMappingURL=compose.js.map
|