universal-physics-tensor 8.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 +26 -21
- package/data/atlas/atlas.json +75 -64
- package/data/atlas/atlas.jsonld +1 -1
- package/data/atlas/diffusion.json +23 -22
- package/data/atlas/oscillators.json +21 -16
- package/data/atlas/waves.json +33 -28
- package/data/bridge-catalog.json +1356 -1791
- package/data/bridge-catalog.schema.json +789 -46
- package/data/quantities.json +280 -234
- package/data/quantities.schema.json +52 -0
- package/data/schemas/atlas-record.v0.json +184 -46
- package/data/units.json +1178 -0
- package/data/units.schema.json +124 -0
- 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.d.ts +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 +16 -12
- 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.d.ts +1601 -220
- package/dist/atlas/physjs-entries.generated.d.ts.map +1 -1
- package/dist/atlas/physjs-entries.generated.js +1854 -345
- package/dist/atlas/physjs-entries.generated.js.map +1 -1
- package/dist/atlas/physjs-ref.d.ts +151 -117
- package/dist/atlas/physjs-ref.d.ts.map +1 -1
- package/dist/atlas/physjs-ref.js +244 -211
- 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.d.ts +16 -8
- package/dist/atlas/proof-target.d.ts.map +1 -1
- package/dist/atlas/proof-target.js +34 -31
- 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 +22 -14
- package/dist/bridges/catalog-adapter.js.map +1 -1
- package/dist/bridges/catalog-load.d.ts +19 -2
- package/dist/bridges/catalog-load.d.ts.map +1 -1
- package/dist/bridges/catalog-load.js +233 -14
- package/dist/bridges/catalog-load.js.map +1 -1
- package/dist/bridges/catalog-types.d.ts +96 -27
- 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 +89 -0
- package/dist/bridges/evaluation-errors.d.ts.map +1 -0
- package/dist/bridges/evaluation-errors.js +136 -0
- package/dist/bridges/evaluation-errors.js.map +1 -0
- package/dist/bridges/evaluator-inputs.d.ts +5 -3
- package/dist/bridges/evaluator-inputs.d.ts.map +1 -1
- package/dist/bridges/evaluator-inputs.js +24 -24
- package/dist/bridges/evaluator-inputs.js.map +1 -1
- package/dist/bridges/evaluators.d.ts +48 -8
- package/dist/bridges/evaluators.d.ts.map +1 -1
- package/dist/bridges/evaluators.js +173 -38
- package/dist/bridges/evaluators.js.map +1 -1
- package/dist/bridges/expr-parse.d.ts +38 -7
- package/dist/bridges/expr-parse.d.ts.map +1 -1
- package/dist/bridges/expr-parse.js +129 -156
- package/dist/bridges/expr-parse.js.map +1 -1
- package/dist/bridges/holds.d.ts +16 -8
- package/dist/bridges/holds.d.ts.map +1 -1
- package/dist/bridges/holds.js +130 -236
- 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.d.ts +65 -0
- package/dist/bridges/input-contract.d.ts.map +1 -0
- package/dist/bridges/input-contract.js +97 -0
- package/dist/bridges/input-contract.js.map +1 -0
- 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.d.ts +11 -0
- package/dist/bridges/notices.d.ts.map +1 -0
- package/dist/bridges/notices.js +22 -0
- package/dist/bridges/notices.js.map +1 -0
- 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.d.ts +31 -0
- package/dist/canonical/canonical-equation.d.ts.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.d.ts.map +1 -1
- package/dist/canonical/entries/atomic.js +11 -1
- package/dist/canonical/entries/atomic.js.map +1 -1
- package/dist/canonical/entries/condensed-matter.d.ts.map +1 -1
- package/dist/canonical/entries/condensed-matter.js +7 -4
- package/dist/canonical/entries/condensed-matter.js.map +1 -1
- package/dist/canonical/entries/dimensional-classics.d.ts.map +1 -1
- package/dist/canonical/entries/dimensional-classics.js +50 -2
- package/dist/canonical/entries/dimensional-classics.js.map +1 -1
- package/dist/canonical/entries/electromagnetism.d.ts.map +1 -1
- package/dist/canonical/entries/electromagnetism.js +32 -2
- package/dist/canonical/entries/electromagnetism.js.map +1 -1
- package/dist/canonical/entries/fluids-waves.d.ts.map +1 -1
- package/dist/canonical/entries/fluids-waves.js +34 -0
- package/dist/canonical/entries/fluids-waves.js.map +1 -1
- package/dist/canonical/entries/mechanics.d.ts.map +1 -1
- package/dist/canonical/entries/mechanics.js +24 -0
- 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 +42 -24
- package/dist/canonical/entries/nonmonomial.js.map +1 -1
- package/dist/canonical/entries/relativity.d.ts.map +1 -1
- package/dist/canonical/entries/relativity.js +6 -0
- package/dist/canonical/entries/relativity.js.map +1 -1
- package/dist/canonical/entries/statistical-mechanics.d.ts.map +1 -1
- package/dist/canonical/entries/statistical-mechanics.js +24 -5
- package/dist/canonical/entries/statistical-mechanics.js.map +1 -1
- package/dist/canonical/entries/thermo-nuclear-cosmo.d.ts.map +1 -1
- package/dist/canonical/entries/thermo-nuclear-cosmo.js +15 -0
- 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.d.ts +9 -2
- package/dist/cases/index.d.ts.map +1 -1
- package/dist/cases/index.js +26 -7
- package/dist/cases/index.js.map +1 -1
- package/dist/cases/kepler-rv.js +6 -6
- 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 +2 -1
- package/dist/cli/commands/_discovery-opts.d.ts.map +1 -1
- package/dist/cli/commands/_discovery-opts.js +48 -18
- 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 +7 -12
- 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 -21
- 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.d.ts.map +1 -1
- package/dist/cli/commands/connectors.js +8 -9
- 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 +50 -26
- 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 +18 -13
- 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 +29 -26
- package/dist/cli/commands/eval.js.map +1 -1
- package/dist/cli/commands/evaluate.d.ts +1 -35
- package/dist/cli/commands/evaluate.d.ts.map +1 -1
- package/dist/cli/commands/evaluate.js +99 -208
- 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 +57 -45
- 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 +41 -11
- 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 +84 -92
- 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 -15
- 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 +25 -27
- 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 +14 -7
- package/dist/cli/commands/symbolic.js.map +1 -1
- package/dist/cli/commands/testplan.js +4 -4
- package/dist/cli/commands/testplan.js.map +1 -1
- package/dist/cli/conventions.d.ts +6 -7
- package/dist/cli/conventions.d.ts.map +1 -1
- package/dist/cli/conventions.js +19 -28
- 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.d.ts +13 -2
- package/dist/cli/euler-guard.d.ts.map +1 -1
- package/dist/cli/euler-guard.js +17 -3
- package/dist/cli/euler-guard.js.map +1 -1
- package/dist/cli/eval-numbers.d.ts +4 -9
- package/dist/cli/eval-numbers.d.ts.map +1 -1
- package/dist/cli/eval-numbers.js +11 -41
- 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.d.ts +2 -0
- package/dist/cli/published-url.d.ts.map +1 -1
- package/dist/cli/published-url.js +5 -0
- 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.d.ts +2 -1
- package/dist/cli/record-tables.d.ts.map +1 -1
- package/dist/cli/record-tables.js +8 -3
- 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 +57 -18
- package/dist/cli-api.d.ts.map +1 -1
- package/dist/cli-api.js +49 -21
- package/dist/cli-api.js.map +1 -1
- package/dist/composition/adjudication.d.ts +8 -30
- package/dist/composition/adjudication.d.ts.map +1 -1
- package/dist/composition/adjudication.js +15 -67
- package/dist/composition/adjudication.js.map +1 -1
- package/dist/composition/aliases.d.ts +1 -1
- package/dist/composition/aliases.d.ts.map +1 -1
- package/dist/composition/aliases.js +10 -20
- 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 -14
- package/dist/composition/bridge-analysis.d.ts.map +1 -1
- package/dist/composition/bridge-analysis.js +66 -57
- 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 +15 -18
- package/dist/composition/canonical-graph.d.ts.map +1 -1
- package/dist/composition/canonical-graph.js +59 -85
- package/dist/composition/canonical-graph.js.map +1 -1
- package/dist/composition/canonical-json.js.map +1 -1
- package/dist/composition/canonical-prefactors.d.ts +10 -29
- package/dist/composition/canonical-prefactors.d.ts.map +1 -1
- package/dist/composition/canonical-prefactors.js +15 -202
- 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 +154 -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 +67 -7
- package/dist/composition/discovery.d.ts.map +1 -1
- package/dist/composition/discovery.js +83 -23
- package/dist/composition/discovery.js.map +1 -1
- package/dist/composition/edge.d.ts +19 -22
- package/dist/composition/edge.d.ts.map +1 -1
- package/dist/composition/edge.js +25 -28
- 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.d.ts +29 -5
- package/dist/composition/evaluate-relation.d.ts.map +1 -1
- package/dist/composition/evaluate-relation.js +100 -72
- package/dist/composition/evaluate-relation.js.map +1 -1
- package/dist/composition/explain.d.ts +14 -4
- package/dist/composition/explain.d.ts.map +1 -1
- package/dist/composition/explain.js +53 -19
- package/dist/composition/explain.js.map +1 -1
- package/dist/composition/expr-eval.d.ts.map +1 -1
- package/dist/composition/expr-eval.js +2 -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 +9 -5
- package/dist/composition/index.d.ts.map +1 -1
- package/dist/composition/index.js +7 -4
- 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 +14 -6
- 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 +18 -0
- package/dist/composition/retrodiction.d.ts.map +1 -1
- package/dist/composition/retrodiction.js +37 -7
- package/dist/composition/retrodiction.js.map +1 -1
- package/dist/composition/uncertainty.js.map +1 -1
- package/dist/composition/user-equation.d.ts +11 -7
- package/dist/composition/user-equation.d.ts.map +1 -1
- package/dist/composition/user-equation.js +24 -26
- 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 +35 -12
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/constants.js +46 -15
- package/dist/core/constants.js.map +1 -1
- package/dist/core/data-file.d.ts +27 -0
- package/dist/core/data-file.d.ts.map +1 -0
- package/dist/core/data-file.js +48 -0
- package/dist/core/data-file.js.map +1 -0
- package/dist/core/flux-rules.js +1 -1
- package/dist/core/flux-rules.js.map +1 -1
- package/dist/core/json-schema.d.ts +27 -0
- package/dist/core/json-schema.d.ts.map +1 -0
- package/dist/core/json-schema.js +177 -0
- package/dist/core/json-schema.js.map +1 -0
- 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.d.ts +3 -2
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +16 -14
- 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 +16 -23
- 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 +18 -6
- package/dist/diff/bridge-specs.d.ts.map +1 -1
- package/dist/diff/bridge-specs.js +17 -5
- 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.d.ts.map +1 -1
- package/dist/dimensional/bridge-check.js +3 -5
- 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 +54 -0
- package/dist/dimensional/constant-rows.d.ts.map +1 -0
- package/dist/dimensional/constant-rows.js +115 -0
- package/dist/dimensional/constant-rows.js.map +1 -0
- package/dist/dimensional/constants.d.ts +7 -17
- package/dist/dimensional/constants.d.ts.map +1 -1
- package/dist/dimensional/constants.js +12 -21
- 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 +21 -6
- package/dist/dimensional/dimension-spec.d.ts.map +1 -1
- package/dist/dimensional/dimension-spec.js +150 -160
- 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.d.ts +79 -0
- package/dist/dimensional/exact-scale.d.ts.map +1 -0
- package/dist/dimensional/exact-scale.js +222 -0
- package/dist/dimensional/exact-scale.js.map +1 -0
- package/dist/dimensional/field-equation-helpers.js.map +1 -1
- package/dist/dimensional/formula-names.d.ts +13 -12
- package/dist/dimensional/formula-names.d.ts.map +1 -1
- package/dist/dimensional/formula-names.js +28 -51
- 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 +23 -1
- package/dist/dimensional/quantity-registry.d.ts.map +1 -1
- package/dist/dimensional/quantity-registry.js +55 -18
- 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 +63 -19
- package/dist/dimensional/symbolic-constants.d.ts.map +1 -1
- package/dist/dimensional/symbolic-constants.js +114 -92
- 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 +70 -0
- package/dist/dimensional/unit-data.d.ts.map +1 -0
- package/dist/dimensional/unit-data.js +139 -0
- package/dist/dimensional/unit-data.js.map +1 -0
- package/dist/dimensional/units.d.ts +87 -24
- package/dist/dimensional/units.d.ts.map +1 -1
- package/dist/dimensional/units.js +290 -295
- 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 +65 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -24
- package/dist/index.js.map +1 -1
- package/dist/numerical/bianchi-residual.js.map +1 -1
- package/dist/numerical/binding-value.d.ts +32 -7
- package/dist/numerical/binding-value.d.ts.map +1 -1
- package/dist/numerical/binding-value.js +218 -209
- 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 +34 -0
- package/dist/numerical/evaluator-uncertainty.d.ts.map +1 -0
- package/dist/numerical/evaluator-uncertainty.js +134 -0
- package/dist/numerical/evaluator-uncertainty.js.map +1 -0
- package/dist/numerical/formula-contract.d.ts +67 -7
- package/dist/numerical/formula-contract.d.ts.map +1 -1
- package/dist/numerical/formula-contract.js +68 -42
- package/dist/numerical/formula-contract.js.map +1 -1
- package/dist/numerical/formula-dimension.d.ts +17 -7
- package/dist/numerical/formula-dimension.d.ts.map +1 -1
- package/dist/numerical/formula-dimension.js +120 -44
- 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 +10 -3
- 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 +44 -45
- 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 +17 -19
- package/dist/numerical/spacetime-metrics.d.ts.map +1 -1
- package/dist/numerical/spacetime-metrics.js +158 -250
- 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 +26 -6
- package/dist/relations/types.d.ts.map +1 -1
- package/dist/relations/types.js +15 -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
|
@@ -49,6 +49,18 @@ export interface RetrodictionOptions {
|
|
|
49
49
|
/** Relative-error tolerance for reference scoring (default 1e-3). */
|
|
50
50
|
readonly referenceTolerance?: number;
|
|
51
51
|
}
|
|
52
|
+
/** One refused edge in a retrodiction, with the kind of refusal. @public */
|
|
53
|
+
export interface RetrodictionRefusal {
|
|
54
|
+
readonly edge: string;
|
|
55
|
+
/**
|
|
56
|
+
* `domain`: the validity domain rejected the point. `coefficient-unset`: the edge has no
|
|
57
|
+
* sourced prefactor, whatever the values. `carrier-sign`: the carrier charge and the
|
|
58
|
+
* mobility had opposite signs. `formula`: the relation's formula did not evaluate at the
|
|
59
|
+
* point (a 0/0, say). Four facts, kept apart (AGENTS law 4).
|
|
60
|
+
*/
|
|
61
|
+
readonly kind: 'domain' | 'coefficient-unset' | 'carrier-sign' | 'formula';
|
|
62
|
+
readonly reason: string;
|
|
63
|
+
}
|
|
52
64
|
/** The result of retrodicting one node. @public */
|
|
53
65
|
export interface RetrodictionResult {
|
|
54
66
|
readonly target: string;
|
|
@@ -58,6 +70,12 @@ export interface RetrodictionResult {
|
|
|
58
70
|
/** (max − min)/|mean| across predictions; 0 when fewer than two. */
|
|
59
71
|
readonly relativeSpread: number;
|
|
60
72
|
readonly tolerance: number;
|
|
73
|
+
/**
|
|
74
|
+
* Edges that refused the supplied values. `kind` keeps the refusals apart (AGENTS law 4):
|
|
75
|
+
* `domain`, `carrier-sign` and `formula` are the point (the edge does not fire there);
|
|
76
|
+
* `coefficient-unset` is the edge's own state (no sourced prefactor), whatever the values.
|
|
77
|
+
*/
|
|
78
|
+
readonly refusals?: readonly RetrodictionRefusal[];
|
|
61
79
|
/** `outcome !== 'inconsistent'` — the falsification gate. */
|
|
62
80
|
readonly pass: boolean;
|
|
63
81
|
/** Supplied external value, when scored. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retrodiction.d.ts","sourceRoot":"","sources":["../../src/composition/retrodiction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;
|
|
1
|
+
{"version":3,"file":"retrodiction.d.ts","sourceRoot":"","sources":["../../src/composition/retrodiction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAM5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAqB3D,gDAAgD;AAChD,MAAM,MAAM,mBAAmB,GAC3B,YAAY,GACZ,cAAc,GACd,QAAQ,GACR,eAAe,CAAC;AAEpB,kEAAkE;AAClE,MAAM,WAAW,sBAAsB;IACrC,4CAA4C;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,uCAAuC;AACvC,MAAM,WAAW,mBAAmB;IAClC,0EAA0E;IAC1E,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS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IAChD,6DAA6D;IAC7D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,yDAAyD;IACzD,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;CACjC;AAgBD;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,SAAS,UAAU,EAAE,EAC5B,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAC7C,MAAM,EAAE,SAAS,sBAAsB,EAAE,GACxC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CA+CrB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,SAAS,UAAU,EAAE,EAC5B,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAC7C,MAAM,EAAE,MAAM,EACd,IAAI,GAAE,mBAAwB,GAC7B,kBAAkB,CA0EpB;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,SAAS,UAAU,EAAE,EAC5B,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAC7C,IAAI,GAAE,mBAAwB,GAC7B,kBAAkB,CA2BpB"}
|
|
@@ -28,9 +28,11 @@
|
|
|
28
28
|
*
|
|
29
29
|
* @module composition/retrodiction
|
|
30
30
|
*/
|
|
31
|
-
import { CarrierSignError } from '../bridges/carrier-sign.js';
|
|
32
31
|
import { CANONICAL_GROUP_PREFACTORS } from './canonical-prefactors.js';
|
|
33
|
-
import { evaluateEdge } from './edge.js';
|
|
32
|
+
import { CoefficientUnsetError, evaluateEdge } from './edge.js';
|
|
33
|
+
import { DomainViolationError } from '../bridges/evaluation-errors.js';
|
|
34
|
+
import { CarrierSignError } from '../bridges/carrier-sign.js';
|
|
35
|
+
import { FormulaError } from '../numerical/formula-contract.js';
|
|
34
36
|
import { QUANTITY_IDENTIFICATIONS } from './compose.js';
|
|
35
37
|
import { conventionFactor } from '../dimensional/unit-convention.js';
|
|
36
38
|
import { classifyAll } from './identifiability.js';
|
|
@@ -51,6 +53,22 @@ function evaluationInputs(edge, values) {
|
|
|
51
53
|
}
|
|
52
54
|
return inputs;
|
|
53
55
|
}
|
|
56
|
+
/** The refusal an evaluator error is, or `undefined` when it is not a refusal at all. */
|
|
57
|
+
function refusalKind(err) {
|
|
58
|
+
if (err instanceof DomainViolationError)
|
|
59
|
+
return 'domain';
|
|
60
|
+
if (err instanceof CoefficientUnsetError)
|
|
61
|
+
return 'coefficient-unset';
|
|
62
|
+
if (err instanceof CarrierSignError)
|
|
63
|
+
return 'carrier-sign';
|
|
64
|
+
if (err instanceof FormulaError)
|
|
65
|
+
return 'formula';
|
|
66
|
+
return undefined;
|
|
67
|
+
}
|
|
68
|
+
/** True when the error says the edge does not fire here (or at all, for an unset coefficient). */
|
|
69
|
+
function refusesThePoint(err) {
|
|
70
|
+
return refusalKind(err) !== undefined;
|
|
71
|
+
}
|
|
54
72
|
/**
|
|
55
73
|
* Monotone forward EVALUATION: propagate values from `groundTruth` through
|
|
56
74
|
* the graph (domain-checked; identifications supply identified names;
|
|
@@ -96,8 +114,14 @@ export function forwardEvaluate(edges, groundTruth, idents) {
|
|
|
96
114
|
try {
|
|
97
115
|
v = evaluateEdge(e, inputs);
|
|
98
116
|
}
|
|
99
|
-
catch {
|
|
100
|
-
|
|
117
|
+
catch (err) {
|
|
118
|
+
// The edge refusing this point (a domain miss, opposite carrier signs, a formula
|
|
119
|
+
// that has no finite value there) or an unset coefficient is "the edge does not
|
|
120
|
+
// fire". Anything else (an alias conflict, a TypeError in an evaluator) is a
|
|
121
|
+
// different fact and is not hidden as a non-derivation (9.0.0 audit §4 C6).
|
|
122
|
+
if (!refusesThePoint(err))
|
|
123
|
+
throw err;
|
|
124
|
+
continue;
|
|
101
125
|
}
|
|
102
126
|
if (Number.isFinite(v)) {
|
|
103
127
|
values.set(e.target.name, v);
|
|
@@ -121,6 +145,7 @@ export function retrodictNode(edges, groundTruth, target, opts = {}) {
|
|
|
121
145
|
const edgesMinusIntoTarget = edges.filter((e) => e.target.name !== target);
|
|
122
146
|
const values = forwardEvaluate(edgesMinusIntoTarget, groundTruth, idents);
|
|
123
147
|
const predictions = [];
|
|
148
|
+
const refusals = [];
|
|
124
149
|
for (const e of edges) {
|
|
125
150
|
if (e.target.name !== target)
|
|
126
151
|
continue;
|
|
@@ -132,10 +157,14 @@ export function retrodictNode(edges, groundTruth, target, opts = {}) {
|
|
|
132
157
|
v = evaluateEdge(e, inputs);
|
|
133
158
|
}
|
|
134
159
|
catch (err) {
|
|
135
|
-
// A
|
|
136
|
-
//
|
|
137
|
-
|
|
160
|
+
// A refusal of the point or an unset coefficient is a recorded refusal of
|
|
161
|
+
// this edge, under its own kind. Any other error (an alias conflict, a
|
|
162
|
+
// TypeError in an evaluator) is a different fact and propagates instead of
|
|
163
|
+
// reading as "unrecoverable" (§4 C6).
|
|
164
|
+
const kind = refusalKind(err);
|
|
165
|
+
if (kind === undefined)
|
|
138
166
|
throw err;
|
|
167
|
+
refusals.push({ edge: e.id, kind, reason: err.message });
|
|
139
168
|
continue;
|
|
140
169
|
}
|
|
141
170
|
if (Number.isFinite(v))
|
|
@@ -167,6 +196,7 @@ export function retrodictNode(edges, groundTruth, target, opts = {}) {
|
|
|
167
196
|
predictions,
|
|
168
197
|
relativeSpread,
|
|
169
198
|
tolerance,
|
|
199
|
+
...(refusals.length > 0 ? { refusals } : {}),
|
|
170
200
|
pass: outcome !== 'inconsistent',
|
|
171
201
|
};
|
|
172
202
|
const ref = opts.references?.[target];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retrodiction.js","sourceRoot":"","sources":["../../src/composition/retrodiction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;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AC;IACxB,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACvE,MAAM,OAAO,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,cAAc,EAAE,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAExE,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAChC,aAAa,CAAC,KAAK,EAAE,WAAW,EAAE,CAAC,EAAE,IAAI,CAAC,CAC3C,CAAC;IAEF,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,YAAY,CAAC,CAAC,MAAM,CAAC;IAC5E,MAAM,YAAY,GAAG,OAAO,CAAC,MAAM,CACjC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,cAAc,CACpC,CAAC,MAAM,CAAC;IAET,OAAO;QACL,OAAO;QACP,OAAO,EAAE,UAAU,GAAG,YAAY;QAClC,UAAU;QACV,YAAY;QACZ,aAAa,EAAE,YAAY,KAAK,CAAC;KAClC,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Retrodiction harness (Consequence 2 of\n * docs/planning/Bridge-Inference-Epistemics-Note.md, designed in\n * docs/planning/Retrodiction-Harness-Design-Note.md).\n *\n * The framework's own falsification benchmark. Mask a quantity the graph\n * can compute, recompute it from ground-truth inputs via EACH independent\n * derivation, and check the predictions agree. This operationalizes the\n * identifiability classifier's OVER-DETERMINED verdict: the surplus\n * derivations of an over-determined node are PREDICTED to be consistency\n * constraints; the harness evaluates them and checks that numerically.\n *\n * - consistent — ≥2 derivations agree within tolerance.\n * - inconsistent — ≥2 derivations DISAGREE (a falsification: two\n * encodings of one quantity-name are not the same\n * physics).\n * - single — exactly one derivation fired (recovered, no check).\n * - unrecoverable — no derivation fired from the ground truth.\n *\n * \"Mask\" = compute source values over the graph with every edge INTO the\n * target removed (the classifier's target-removed closure — so the node\n * is genuinely hidden, never read back through its own derivation).\n * Forward evaluation honors `QUANTITY_IDENTIFICATIONS` and is\n * domain-checked (an edge that refuses its domain contributes no\n * prediction). The consistency check needs no external truth and is the\n * re-runnable core; an optional `references` map adds external-value\n * scoring. Pass bar pre-registered in the design note (spread ≤ 1e-6).\n *\n * @module composition/retrodiction\n */\n\nimport type { BridgeEdge } from './edge.js';\nimport { CANONICAL_GROUP_PREFACTORS } from './canonical-prefactors.js';\nimport { CoefficientUnsetError, evaluateEdge } from './edge.js';\nimport { DomainViolationError } from '../bridges/evaluation-errors.js';\nimport { CarrierSignError } from '../bridges/carrier-sign.js';\nimport { FormulaError } from '../numerical/formula-contract.js';\nimport type { QuantityIdentification } from './compose.js';\nimport { QUANTITY_IDENTIFICATIONS } from './compose.js';\nimport { conventionFactor } from '../dimensional/unit-convention.js';\nimport { classifyAll } from './identifiability.js';\n\n/**\n * Source values, plus a dimensionless group the edge multiplies when the\n * ground truth names it. The group is not a source: Buckingham cannot see\n * it, and a missing group is the unset coefficient, not a missing input.\n */\nfunction evaluationInputs(edge: BridgeEdge, values: ReadonlyMap<string, number>): Record<string, number> {\n const inputs: Record<string, number> = {};\n for (const s of edge.sources) inputs[s.name] = values.get(s.name)!;\n const group = CANONICAL_GROUP_PREFACTORS.find((g) => g.id === edge.id);\n if (group !== undefined) {\n const g = values.get(group.group);\n if (g !== undefined) inputs[group.group] = g;\n }\n return inputs;\n}\n\n/** Outcome of retrodicting one node. @public */\nexport type RetrodictionOutcome =\n | 'consistent'\n | 'inconsistent'\n | 'single'\n | 'unrecoverable';\n\n/** One derivation's recovered value for a masked node. @public */\nexport interface RetrodictionPrediction {\n /** The edge id that produced this value. */\n readonly edge: string;\n readonly value: number;\n}\n\n/** Options for the harness. @public */\nexport interface RetrodictionOptions {\n /** Identifications honored in forward evaluation (default registered). */\n readonly identifications?: readonly QuantityIdentification[];\n /** Relative-spread tolerance for `consistent` (default 1e-6). */\n readonly tolerance?: number;\n /** External (textbook) values to score recovered nodes against. */\n readonly references?: Readonly<Record<string, number>>;\n /** Relative-error tolerance for reference scoring (default 1e-3). */\n readonly referenceTolerance?: number;\n}\n\n/** One refused edge in a retrodiction, with the kind of refusal. @public */\nexport interface RetrodictionRefusal {\n readonly edge: string;\n /**\n * `domain`: the validity domain rejected the point. `coefficient-unset`: the edge has no\n * sourced prefactor, whatever the values. `carrier-sign`: the carrier charge and the\n * mobility had opposite signs. `formula`: the relation's formula did not evaluate at the\n * point (a 0/0, say). Four facts, kept apart (AGENTS law 4).\n */\n readonly kind: 'domain' | 'coefficient-unset' | 'carrier-sign' | 'formula';\n readonly reason: string;\n}\n\n/** The result of retrodicting one node. @public */\nexport interface RetrodictionResult {\n readonly target: string;\n readonly outcome: RetrodictionOutcome;\n /** Recovered values, one per derivation that fired. */\n readonly predictions: readonly RetrodictionPrediction[];\n /** (max − min)/|mean| across predictions; 0 when fewer than two. */\n readonly relativeSpread: number;\n readonly tolerance: number;\n /**\n * Edges that refused the supplied values. `kind` keeps the refusals apart (AGENTS law 4):\n * `domain`, `carrier-sign` and `formula` are the point (the edge does not fire there);\n * `coefficient-unset` is the edge's own state (no sourced prefactor), whatever the values.\n */\n readonly refusals?: readonly RetrodictionRefusal[];\n /** `outcome !== 'inconsistent'` — the falsification gate. */\n readonly pass: boolean;\n /** Supplied external value, when scored. */\n readonly referenceValue?: number;\n /** |mean(predictions) − reference| / |reference|, when scored. */\n readonly referenceRelError?: number;\n readonly referencePass?: boolean;\n}\n\n/** Aggregate report across the swept nodes. @public */\nexport interface RetrodictionReport {\n readonly results: readonly RetrodictionResult[];\n /** Nodes with ≥2 derivations (consistent + inconsistent). */\n readonly checked: number;\n readonly consistent: number;\n readonly inconsistent: number;\n /** The headline gate: no inconsistent node was found. */\n readonly allConsistent: boolean;\n}\n\n/** The refusal an evaluator error is, or `undefined` when it is not a refusal at all. */\nfunction refusalKind(err: unknown): RetrodictionRefusal['kind'] | undefined {\n if (err instanceof DomainViolationError) return 'domain';\n if (err instanceof CoefficientUnsetError) return 'coefficient-unset';\n if (err instanceof CarrierSignError) return 'carrier-sign';\n if (err instanceof FormulaError) return 'formula';\n return undefined;\n}\n\n/** True when the error says the edge does not fire here (or at all, for an unset coefficient). */\nfunction refusesThePoint(err: unknown): boolean {\n return refusalKind(err) !== undefined;\n}\n\n/**\n * Monotone forward EVALUATION: propagate values from `groundTruth` through\n * the graph (domain-checked; identifications supply identified names;\n * non-finite or domain-refused edges do not fire). Each node is assigned\n * the value of the first edge that fires for it.\n *\n * Exported `@internal` so the discovery magnitude-gate can read a quantity's\n * value AT THE REGISTERED ANCHOR when the static representative-value table\n * has no entry for it (graph-derived quantities like `schwarzschild-radius`).\n *\n * @internal\n */\nexport function forwardEvaluate(\n edges: readonly BridgeEdge[],\n groundTruth: Readonly<Record<string, number>>,\n idents: readonly QuantityIdentification[],\n): Map<string, number> {\n // Finite-seed guard (matches the computed-value guard below and the\n // library-wide finiteness discipline): a NaN/∞ seed would propagate silently\n // through the graph and spoof downstream magnitude/consistency checks.\n for (const [name, v] of Object.entries(groundTruth)) {\n if (!Number.isFinite(v)) {\n throw new TypeError(\n `forwardEvaluate: ground-truth seed '${name}' must be a finite number, got ${v}.`,\n );\n }\n }\n const values = new Map<string, number>(Object.entries(groundTruth));\n let changed = true;\n while (changed) {\n changed = false;\n for (const id of idents) {\n const fromVal = values.get(id.from);\n if (fromVal !== undefined && !values.has(id.to)) {\n const converted = fromVal * conventionFactor(id.from, id.to);\n if (Number.isFinite(converted)) {\n values.set(id.to, converted);\n changed = true;\n }\n }\n }\n for (const e of edges) {\n if (values.has(e.target.name)) continue;\n if (!e.sources.every((s) => values.has(s.name))) continue;\n const inputs = evaluationInputs(e, values);\n let v: number;\n try {\n v = evaluateEdge(e, inputs);\n } catch (err) {\n // The edge refusing this point (a domain miss, opposite carrier signs, a formula\n // that has no finite value there) or an unset coefficient is \"the edge does not\n // fire\". Anything else (an alias conflict, a TypeError in an evaluator) is a\n // different fact and is not hidden as a non-derivation (9.0.0 audit §4 C6).\n if (!refusesThePoint(err)) throw err;\n continue;\n }\n if (Number.isFinite(v)) {\n values.set(e.target.name, v);\n changed = true;\n }\n }\n }\n return values;\n}\n\n/**\n * Retrodict one node: mask it (source values from the target-removed\n * graph), recover it via each incoming edge, and score the spread.\n *\n * @public\n */\nexport function retrodictNode(\n edges: readonly BridgeEdge[],\n groundTruth: Readonly<Record<string, number>>,\n target: string,\n opts: RetrodictionOptions = {},\n): RetrodictionResult {\n const idents = opts.identifications ?? QUANTITY_IDENTIFICATIONS;\n const tolerance = opts.tolerance ?? 1e-6;\n\n // Masked source values: never let the target be assigned (so no\n // derivation reads it back — circular self-support excluded).\n const edgesMinusIntoTarget = edges.filter((e) => e.target.name !== target);\n const values = forwardEvaluate(edgesMinusIntoTarget, groundTruth, idents);\n\n const predictions: RetrodictionPrediction[] = [];\n const refusals: RetrodictionRefusal[] = [];\n for (const e of edges) {\n if (e.target.name !== target) continue;\n if (!e.sources.every((s) => values.has(s.name))) continue;\n const inputs = evaluationInputs(e, values);\n let v: number;\n try {\n v = evaluateEdge(e, inputs);\n } catch (err) {\n // A refusal of the point or an unset coefficient is a recorded refusal of\n // this edge, under its own kind. Any other error (an alias conflict, a\n // TypeError in an evaluator) is a different fact and propagates instead of\n // reading as \"unrecoverable\" (§4 C6).\n const kind = refusalKind(err);\n if (kind === undefined) throw err;\n refusals.push({ edge: e.id, kind, reason: (err as Error).message });\n continue;\n }\n if (Number.isFinite(v)) predictions.push({ edge: e.id, value: v });\n }\n\n let relativeSpread = 0;\n if (predictions.length >= 2) {\n const vals = predictions.map((p) => p.value);\n const max = Math.max(...vals);\n const min = Math.min(...vals);\n // Normalize the (max − min) span by the largest MAGNITUDE, not the mean:\n // opposite-sign predictions (e.g. +6 and −6) cancel in the mean → a ~0\n // denominator → spurious Infinity, even though the true relative spread is\n // finite (12/6 = 2). `maxAbs === 0` only when every value is 0 (max = min),\n // so the span is 0 too.\n const maxAbs = Math.max(...vals.map(Math.abs));\n relativeSpread = maxAbs > 0 ? (max - min) / maxAbs : 0;\n }\n\n let outcome: RetrodictionOutcome;\n if (predictions.length === 0) outcome = 'unrecoverable';\n else if (predictions.length === 1) outcome = 'single';\n else outcome = relativeSpread <= tolerance ? 'consistent' : 'inconsistent';\n\n const result: RetrodictionResult = {\n target,\n outcome,\n predictions,\n relativeSpread,\n tolerance,\n ...(refusals.length > 0 ? { refusals } : {}),\n pass: outcome !== 'inconsistent',\n };\n\n const ref = opts.references?.[target];\n if (ref !== undefined && predictions.length >= 1) {\n const mean =\n predictions.reduce((a, p) => a + p.value, 0) / predictions.length;\n const referenceRelError = Math.abs(mean - ref) / (Math.abs(ref) || 1);\n return {\n ...result,\n referenceValue: ref,\n referenceRelError,\n referencePass: referenceRelError <= (opts.referenceTolerance ?? 1e-3),\n };\n }\n\n return result;\n}\n\n/**\n * Sweep the graph: retrodict every over-determined node (the classifier\n * is the feeder), plus any node with a supplied reference value. Returns\n * the per-node results and the headline `allConsistent` gate.\n *\n * @public\n */\nexport function retrodict(\n edges: readonly BridgeEdge[],\n groundTruth: Readonly<Record<string, number>>,\n opts: RetrodictionOptions = {},\n): RetrodictionReport {\n const idents = opts.identifications ?? QUANTITY_IDENTIFICATIONS;\n const known = Object.keys(groundTruth);\n const classified = classifyAll(edges, known, { identifications: idents });\n\n const overDetermined = classified\n .filter((r) => r.verdict === 'over-determined')\n .map((r) => r.target);\n const refTargets = opts.references ? Object.keys(opts.references) : [];\n const targets = [...new Set([...overDetermined, ...refTargets])].sort();\n\n const results = targets.map((t) =>\n retrodictNode(edges, groundTruth, t, opts),\n );\n\n const consistent = results.filter((r) => r.outcome === 'consistent').length;\n const inconsistent = results.filter(\n (r) => r.outcome === 'inconsistent',\n ).length;\n\n return {\n results,\n checked: consistent + inconsistent,\n consistent,\n inconsistent,\n allConsistent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MAAM,KAAK,GAAG,IAAI,EAAE,KAAK,CAAC;IAC1B,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;IACpC,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC;QACrD,MAAM,IAAI,UAAU,CAClB,iEAAiE,KAAK,CAAC,KAAK,EAAE,CAC/E,CAAC;IACJ,CAAC;IACD,qEAAqE;IACrE,EAAE;IACF,4FAA4F;IAC5F,gGAAgG;IAChG,yFAAyF;IACzF,0FAA0F;IAC1F,0FAA0F;IAC1F,+FAA+F;IAC/F,iCAAiC;IACjC,EAAE;IACF,iGAAiG;IACjG,wEAAwE;IACxE,EAAE;IACF,iGAAiG;IACjG,iGAAiG;IACjG,iGAAiG;IACjG,gGAAgG;IAChG,kGAAkG;IAClG,mBAAmB;IACnB,OAAO;QACL,KAAK;QACL,KAAK;QACL,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,QAAQ;QACR,KAAK;KACN,CAAC;AACJ,CAAC","sourcesContent":["/**\n * First-order uncertainty propagation through composition edges\n * (v0.10.0 T4 — fulfills the improvement plan's G-3 carrier claim:\n * \"edges carry uncertainties, and uncertainty propagates through\n * composition\").\n *\n * σ_out² = Σᵢ (∂f/∂xᵢ · σᵢ)² (independent-input Gaussian,\n * first order)\n *\n * Partials are MathTS central differences with `relativeStep` `1e-6`\n * (`h = 1e-6·max(|xᵢ|, 1e-30)`). Because composed edges ARE `BridgeEdge`s\n * (design D-2 closure), chains need no extra machinery — propagate on\n * the composed edge directly.\n *\n * Scope honesty: independent inputs only (no covariance matrix), first\n * order only (no curvature term). Adequate for the scalar closed-form\n * edges in the graph today; revisit both if correlated observables or\n * strongly nonlinear edges land.\n *\n * @module composition/uncertainty\n */\n\nimport { propagateUncertainty as propagateScalarUncertainty } from '@danielsimonjr/mathts-functions';\nimport type { BridgeEdge } from './edge.js';\nimport { evaluateEdge } from './edge.js';\nimport type { ApproximationBound } from '../relations/types.js';\n\n/**\n * Optional extras for {@link propagateUncertainty}.\n *\n * INTERNAL, not public. Sprint 2's boundary is that nothing new reaches\n * `src/index.ts` before Phase 6. This shipped tagged public, which failed\n * `tests/api/public-tag-vs-index-invariant.test.ts`: a symbol advertised as\n * public but unreachable from the barrel is a promise the package cannot keep.\n *\n * @internal\n */\nexport interface UncertaintyOptions {\n /**\n * An approximation bound for the map the edge stands in for. Its `delta` —\n * the uniform model error in `bound.norm` — is added to the statistical\n * sigma IN QUADRATURE, on the usual independence assumption between input\n * noise and model error.\n *\n * `bound.K` is deliberately NOT used. The Lipschitz constant composes bounds\n * ALONG A PATH (`atlas/error-algebra`); applying it here would rescale a\n * sigma this edge already differentiates directly, double-counting the\n * sensitivity the partials measure.\n *\n * ⚠ The caller is asserting that `bound.norm` is commensurate with the\n * edge's output quantity. Nothing here can check that — no edge records a\n * norm — so supplying a bound whose norm is a RELATIVE error against an\n * absolute-valued edge produces a wrong number silently. Omit `bound` unless\n * the norms genuinely match.\n */\n readonly bound?: ApproximationBound;\n}\n\n/** Result of a propagation. @public */\nexport interface UncertaintyResult {\n /** Central value f(x) (domain-checked). */\n readonly value: number;\n /**\n * Propagated 1σ STATISTICAL standard deviation, from the input sigmas alone.\n *\n * This never includes `bound.delta`. A deterministic bias and a random spread are different\n * things and this field is only the second; see {@link UncertaintyResult.delta}.\n */\n readonly sigma: number;\n /**\n * The DETERMINISTIC model-error bound, present only when `opts.bound` was supplied — the echo of\n * `bound.delta`, surfaced beside `sigma` rather than folded into it.\n *\n * A caller needing a single envelope combines them and owns the coverage factor it chose:\n * `k * sigma + delta`. This function will not choose `k`.\n */\n readonly delta?: number;\n /** Per-input partial derivatives ∂f/∂xᵢ (central difference). */\n readonly partials: Readonly<Record<string, number>>;\n /** Echo of `opts.bound`, present only when one was supplied. */\n readonly bound?: ApproximationBound;\n}\n\n/**\n * Propagate independent 1σ input uncertainties through an edge.\n *\n * `sigmas` keys are source-quantity names; inputs absent from `sigmas`\n * (or with σ = 0) contribute no variance but still get a partial.\n * The central value is domain-checked (`evaluateEdge`); the stencil\n * evaluations use the raw evaluator — a ±h step that exits the\n * validity domain near its boundary would otherwise poison the\n * derivative with a thrown error rather than a number.\n *\n * `opts.bound` is the only way this function's output can differ from its\n * pre-Sprint-2 output: omit it and every field is byte-identical, including\n * the absence of `bound` on the result.\n *\n * @public\n */\nexport function propagateUncertainty(\n edge: BridgeEdge,\n inputs: Record<string, number>,\n sigmas: Record<string, number>,\n opts?: UncertaintyOptions,\n): UncertaintyResult {\n const value = evaluateEdge(edge, inputs);\n\n const point: Record<string, number> = {};\n const usedSigmas: Record<string, number> = {};\n for (const source of edge.sources) {\n const name = source.name;\n const x = inputs[name];\n if (!Number.isFinite(x)) {\n throw new RangeError(\n `propagateUncertainty: input '${name}' is not a finite number`,\n );\n }\n const sigma = sigmas[name] ?? 0;\n if (sigma < 0 || !Number.isFinite(sigma)) {\n throw new RangeError(\n `propagateUncertainty: sigma for '${name}' must be finite and ≥ 0`,\n );\n }\n point[name] = x;\n usedSigmas[name] = sigma;\n }\n\n // The stencil is the raw evaluator. `value` above is domain-checked.\n // `bound.delta` is not an input to this call: it stays a separate field.\n const stat = propagateScalarUncertainty(\n (vals) => edge.evaluate(vals),\n point,\n usedSigmas,\n { relativeStep: 1e-6 },\n );\n const partials = stat.partials;\n const sigma = stat.sigma;\n\n const bound = opts?.bound;\n if (bound === undefined) {\n return { value, sigma, partials };\n }\n if (!Number.isFinite(bound.delta) || bound.delta < 0) {\n throw new RangeError(\n `propagateUncertainty: bound.delta must be finite and ≥ 0, got ${bound.delta}`,\n );\n }\n // THE TWO ARE REPORTED SEPARATELY AND ARE DELIBERATELY NOT COMBINED.\n //\n // This previously returned `sqrt(variance + delta^2)`, justified by \"the usual independence\n // assumption between input noise and model error\". INDEPENDENCE DOES NOT LICENSE QUADRATURE FOR\n // A BIAS. `sigma` is a 1-sigma spread of a zero-mean random variable; `bound.delta` is a\n // DETERMINISTIC worst-case sup-norm offset. Adding them in quadrature treats a systematic\n // displacement as if it averaged out, which UNDERSTATES the envelope — and understates it\n // precisely when the model error is largest relative to the noise, which is when a caller most\n // needs the number to be honest.\n //\n // Raised independently by two reviews that did not see each other (an adversarial physics panel,\n // and Eve E2), which is the strongest signal this project has produced.\n //\n // WHY SEPARATE RATHER THAN ADDED. Collapsing to one number requires choosing a coverage factor —\n // `k*sigma + delta`, with k about 4.47 for 95% by Chebyshev, or k=1 for a 1-sigma semi-interval.\n // That choice belongs to the caller's risk posture, not to this library, and baking one in would\n // repeat the original error in a new costume: a defensible-looking number whose provenance is a\n // convention nobody stated. A caller who needs one value composes it from the two fields and owns\n // the k it picked.\n return {\n value,\n sigma,\n delta: bound.delta,\n partials,\n bound,\n };\n}\n"]}
|
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
* injected junction lands in a built {@link VizModel}.
|
|
6
6
|
*
|
|
7
7
|
* Free-form means no dimensions: source quantities are the RHS's free variables
|
|
8
|
-
* — extracted by the
|
|
9
|
-
*
|
|
10
|
-
* one; both already drop constants like `pi`/`tau`, numbers, and functions) —
|
|
8
|
+
* — extracted by the MathTS expression parser via {@link getFormulaParser},
|
|
9
|
+
* which already drops constants like `pi`/`tau`, numbers, and functions —
|
|
11
10
|
* minus the physics {@link CONSTANTS}. Multi-word quantities may be typed with
|
|
12
11
|
* underscores **or** the catalog's own hyphens (`planck-length`): before parse,
|
|
13
12
|
* {@link rewriteCatalogHyphens} rewrites kebab catalog names to underscores so
|
|
@@ -42,13 +41,18 @@ import { rewriteCatalogHyphens } from '../dimensional/hyphen-names.js';
|
|
|
42
41
|
/** Rewrite a catalog hyphenated name to underscores before the expression parse. */
|
|
43
42
|
export { rewriteCatalogHyphens };
|
|
44
43
|
/**
|
|
45
|
-
* When
|
|
46
|
-
*
|
|
47
|
-
*
|
|
44
|
+
* When the parse read a hyphen-joined run (`thermal-mass`) as a subtraction of
|
|
45
|
+
* its pieces, and the run read as one name is a catalog quantity, tell the user
|
|
46
|
+
* `-` is arithmetic here and to use underscores. Persona finding I2.
|
|
47
|
+
*
|
|
48
|
+
* Decided from the parse, not from an error's text: `variables` are the free
|
|
49
|
+
* variables the formula parser read from `rhs`. The parser has no hyphenated
|
|
50
|
+
* identifier, so a run whose underscored name is not a variable and whose
|
|
51
|
+
* pieces are was parsed as a subtraction.
|
|
48
52
|
*
|
|
49
53
|
* @internal
|
|
50
54
|
*/
|
|
51
|
-
export declare function hyphenSubtractHint(
|
|
55
|
+
export declare function hyphenSubtractHint(rhs: string, variables: readonly string[], catalogNames: ReadonlySet<string>): string | null;
|
|
52
56
|
/** Options for {@link analyzeUserEquation}. @internal */
|
|
53
57
|
export interface AnalyzeUserEquationOptions {
|
|
54
58
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-equation.d.ts","sourceRoot":"","sources":["../../src/composition/user-equation.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"user-equation.d.ts","sourceRoot":"","sources":["../../src/composition/user-equation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAOH,OAAO,EAA8B,KAAK,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAI5F,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAKzD,oFAAoF;AACpF,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,YAAY,OAAO,EAAE,MAAM,EAG1B;CACF;AAED;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,iEAAiE;IACjE,QAAQ,CAAC,IAAI,EAA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EAAE,OAAO,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;IACxC;;;;OAIG;IACH,QAAQ,CAAC,aAAa,EAAE,SAAS,YAAY,EAAE,CAAC;IAChD;;;;OAIG;IACH,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,4EAA4E;IAC5E,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CACvC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,CAAC,EAC3C,OAAO,CAAC,EAAE,0BAA0B,GACnC,OAAO,CAAC,gBAAgB,CAAC,CAgI3B"}
|
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
* injected junction lands in a built {@link VizModel}.
|
|
6
6
|
*
|
|
7
7
|
* Free-form means no dimensions: source quantities are the RHS's free variables
|
|
8
|
-
* — extracted by the
|
|
9
|
-
*
|
|
10
|
-
* one; both already drop constants like `pi`/`tau`, numbers, and functions) —
|
|
8
|
+
* — extracted by the MathTS expression parser via {@link getFormulaParser},
|
|
9
|
+
* which already drops constants like `pi`/`tau`, numbers, and functions —
|
|
11
10
|
* minus the physics {@link CONSTANTS}. Multi-word quantities may be typed with
|
|
12
11
|
* underscores **or** the catalog's own hyphens (`planck-length`): before parse,
|
|
13
12
|
* {@link rewriteCatalogHyphens} rewrites kebab catalog names to underscores so
|
|
@@ -55,28 +54,28 @@ const MAX_USER_EQUATION_LEN = 8192;
|
|
|
55
54
|
import { rewriteCatalogHyphens } from '../dimensional/hyphen-names.js';
|
|
56
55
|
/** Rewrite a catalog hyphenated name to underscores before the expression parse. */
|
|
57
56
|
export { rewriteCatalogHyphens };
|
|
57
|
+
/** A hyphen-joined run of names, `a-b` or `a-b-c`, not the exponent of `1e-5`. */
|
|
58
|
+
const HYPHEN_RUN = /(?<![A-Za-z0-9_.])[A-Za-z_][A-Za-z0-9_]*(?:-[A-Za-z0-9_]+)+/g;
|
|
58
59
|
/**
|
|
59
|
-
* When
|
|
60
|
-
*
|
|
61
|
-
*
|
|
60
|
+
* When the parse read a hyphen-joined run (`thermal-mass`) as a subtraction of
|
|
61
|
+
* its pieces, and the run read as one name is a catalog quantity, tell the user
|
|
62
|
+
* `-` is arithmetic here and to use underscores. Persona finding I2.
|
|
63
|
+
*
|
|
64
|
+
* Decided from the parse, not from an error's text: `variables` are the free
|
|
65
|
+
* variables the formula parser read from `rhs`. The parser has no hyphenated
|
|
66
|
+
* identifier, so a run whose underscored name is not a variable and whose
|
|
67
|
+
* pieces are was parsed as a subtraction.
|
|
62
68
|
*
|
|
63
69
|
* @internal
|
|
64
70
|
*/
|
|
65
|
-
export function hyphenSubtractHint(
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
const tokens = rhs.match(/[A-Za-z_][A-Za-z0-9_]*(?:-[A-Za-z0-9_]+)+/g) ?? [];
|
|
72
|
-
for (const t of tokens) {
|
|
73
|
-
if (catalogNames.has(t))
|
|
74
|
-
kebabs.push(t);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
if (kebabs.length === 0)
|
|
71
|
+
export function hyphenSubtractHint(rhs, variables, catalogNames) {
|
|
72
|
+
const read = new Set(variables);
|
|
73
|
+
const split = (rhs.match(HYPHEN_RUN) ?? []).filter((run) => !read.has(run.replace(/-/g, '_')) &&
|
|
74
|
+
run.split('-').some((piece) => read.has(piece)) &&
|
|
75
|
+
resolveQuantityName(run, catalogNames) !== null);
|
|
76
|
+
if (split.length === 0)
|
|
78
77
|
return null;
|
|
79
|
-
const example =
|
|
78
|
+
const example = split.sort((a, b) => b.length - a.length)[0];
|
|
80
79
|
return (`'-' is arithmetic here; multi-word catalog names use underscores ` +
|
|
81
80
|
`(${example} → ${example.replace(/-/g, '_')})`);
|
|
82
81
|
}
|
|
@@ -129,11 +128,8 @@ export async function parseUserEquation(equation, catalogNames) {
|
|
|
129
128
|
({ variables } = parser.parse(rhs));
|
|
130
129
|
}
|
|
131
130
|
catch (e) {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
? null
|
|
135
|
-
: hyphenSubtractHint(String(e.message), equation.slice(equation.indexOf('=') + 1), names);
|
|
136
|
-
throw new UserEquationError(hint ? `${base}. ${hint}` : base);
|
|
131
|
+
// No parse tree, so no subtraction was read: the hyphen hint needs the parsed variables.
|
|
132
|
+
throw new UserEquationError(`could not parse the right-hand side '${rhs}': ${e.message}`);
|
|
137
133
|
}
|
|
138
134
|
const sources = variables.filter((v) => !Object.prototype.hasOwnProperty.call(CONSTANTS, v));
|
|
139
135
|
// An all-constant right-hand side (the Planck length) is an equation about a catalog quantity
|
|
@@ -319,7 +315,9 @@ export async function analyzeUserEquation(equation, catalogDims, options) {
|
|
|
319
315
|
}
|
|
320
316
|
catch (e) {
|
|
321
317
|
const msg = e instanceof Error ? e.message : String(e);
|
|
322
|
-
|
|
318
|
+
// The formula parser already read this right-hand side (parseUserEquation), so its variables are the tree's.
|
|
319
|
+
const { variables } = (await getFormulaParser()).parse(rhsText);
|
|
320
|
+
const hint = hyphenSubtractHint(rhsText, variables, catalogNames);
|
|
323
321
|
parseError = hint ? `${msg}. ${hint}` : msg;
|
|
324
322
|
}
|
|
325
323
|
const resolvedTarget = resolve(eq.target);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-equation.js","sourceRoot":"","sources":["../../src/composition/user-equation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AACj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CAAC;AACJ,CAAC","sourcesContent":["/**\n * User-equation injection — turn a free-form `TARGET = EXPR` string into a graph\n * junction (a target quantity + its source quantities), resolve the user's\n * symbols onto the catalog vocabulary, suggest near-misses, and report where the\n * injected junction lands in a built {@link VizModel}.\n *\n * Free-form means no dimensions: source quantities are the RHS's free variables\n * — extracted by the MathTS expression parser via {@link getFormulaParser},\n * which already drops constants like `pi`/`tau`, numbers, and functions —\n * minus the physics {@link CONSTANTS}. Multi-word quantities may be typed with\n * underscores **or** the catalog's own hyphens (`planck-length`): before parse,\n * {@link rewriteCatalogHyphens} rewrites kebab catalog names to underscores so\n * `-` is not read as subtraction (persona finding W2). Resolution still tries\n * the literal form first, then the `_`↔`-` swap.\n *\n * Pure: no file I/O. The injected junction is rendered as an `extraJunction`\n * (status `'user'`) and is never written into the catalog.\n *\n * @module composition/user-equation\n */\n\nimport { getFormulaParser, parsePhysics } from '../numerical/formula-registry.js';\nimport { formulaSymbolDimension } from '../numerical/formula-dimension.js';\nimport { CONSTANT_SPELLINGS } from '../dimensional/dimension-spec.js';\nimport { CONSTANTS } from '../dimensional/symbolic-constants.js';\nimport { formulaNameDimensions } from '../dimensional/formula-names.js';\nimport { naturalNote, naturalPowers, type UnitMode } from '../dimensional/natural-units.js';\nimport { aliasesForTarget, editDistance } from './aliases.js';\nimport { resolveQuantityName } from '../dimensional/formula-names.js';\nimport { CATALOG_GRAPH } from './catalog-graph.js';\nimport type { VizModel, VizJunction } from './graph-viz.js';\nimport type { Dimension } from '../dimensional/types.js';\nimport { DIMENSIONLESS } from '../dimensional/types.js';\nimport { equals } from '../dimensional/algebra.js';\nimport { inferUnknownDimension } from '../dimensional/dimension-inference.js';\n\n/** Thrown when a user equation cannot be parsed into a target + sources. @public */\nexport class UserEquationError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'UserEquationError';\n }\n}\n\n/**\n * A parsed user equation: the target quantity and its source quantities, as\n * written (underscores preserved; constants/numbers/functions removed).\n *\n * @public\n */\nexport interface UserEquation {\n readonly target: string;\n readonly sources: readonly string[];\n /** The original `TARGET = EXPR` text, for the junction label. */\n readonly text: string;\n}\n\n/**\n * Parse `TARGET = EXPR` into `{ target, sources }`. The target is the text left\n * of the first `=`; the sources are the RHS's free variables minus the physics\n * constants.\n *\n * Uses the active formula parser (MathTS when installed, built-in otherwise) to\n * extract the RHS's free variables.\n *\n * @throws {UserEquationError} on a missing `=`, an empty target, an unparseable\n * RHS, or an RHS with no source quantities.\n * @public\n */\n/** Upper bound on user `--equation` text to keep hint computation bounded. */\nconst MAX_USER_EQUATION_LEN = 8192;\n\nimport { rewriteCatalogHyphens } from '../dimensional/hyphen-names.js';\n/** Rewrite a catalog hyphenated name to underscores before the expression parse. */\nexport { rewriteCatalogHyphens };\n\n/** A hyphen-joined run of names, `a-b` or `a-b-c`, not the exponent of `1e-5`. */\nconst HYPHEN_RUN = /(?<![A-Za-z0-9_.])[A-Za-z_][A-Za-z0-9_]*(?:-[A-Za-z0-9_]+)+/g;\n\n/**\n * When the parse read a hyphen-joined run (`thermal-mass`) as a subtraction of\n * its pieces, and the run read as one name is a catalog quantity, tell the user\n * `-` is arithmetic here and to use underscores. Persona finding I2.\n *\n * Decided from the parse, not from an error's text: `variables` are the free\n * variables the formula parser read from `rhs`. The parser has no hyphenated\n * identifier, so a run whose underscored name is not a variable and whose\n * pieces are was parsed as a subtraction.\n *\n * @internal\n */\nexport function hyphenSubtractHint(\n rhs: string,\n variables: readonly string[],\n catalogNames: ReadonlySet<string>,\n): string | null {\n const read = new Set(variables);\n const split = (rhs.match(HYPHEN_RUN) ?? []).filter(\n (run) =>\n !read.has(run.replace(/-/g, '_')) &&\n run.split('-').some((piece) => read.has(piece)) &&\n resolveQuantityName(run, catalogNames) !== null,\n );\n if (split.length === 0) return null;\n const example = split.sort((a, b) => b.length - a.length)[0]!;\n return (\n `'-' is arithmetic here; multi-word catalog names use underscores ` +\n `(${example} → ${example.replace(/-/g, '_')})`\n );\n}\n\n/**\n * Spellings that must not be a bare `e`. Constant aliases come from\n * {@link CONSTANT_SPELLINGS}. `1-eccentricity^2` is the perihelion factor\n * `one_minus_e_sq`.\n */\nfunction rewriteFormulaSpellings(text: string): string {\n let out = text;\n for (const { names } of CONSTANT_SPELLINGS) {\n const canonical = names[0]!;\n for (const alias of names.slice(1)) {\n if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(alias)) continue;\n out = out.replace(new RegExp(`(?<![A-Za-z0-9_])${alias}(?![A-Za-z0-9_])`, 'g'), canonical);\n }\n }\n return out.replace(\n /(?<![A-Za-z0-9_])1\\s*-\\s*eccentricity\\s*(?:\\^|\\*\\*)\\s*2(?![A-Za-z0-9_])/g,\n 'one_minus_e_sq',\n );\n}\n\n/** Options for {@link analyzeUserEquation}. @internal */\nexport interface AnalyzeUserEquationOptions {\n /**\n * Bind a one-letter token that is itself a catalog quantity (`a`, `r`, …).\n * Default false: the match is reported and not applied. The alias `T` →\n * `temperature` is not a one-letter catalog name and still binds.\n */\n readonly bindShortNames?: boolean;\n /** Reconcile a dimension difference by powers of c, ħ, and (geometrized) G. */\n readonly units?: Exclude<UnitMode, 'si'>;\n}\n\nfunction withFormulaNames(catalog: ReadonlyMap<string, Dimension>): Map<string, Dimension> {\n const out = new Map(catalog);\n for (const [name, dim] of formulaNameDimensions()) {\n if (!out.has(name)) out.set(name, dim);\n }\n return out;\n}\n\nexport async function parseUserEquation(\n equation: string,\n catalogNames?: ReadonlySet<string> | Iterable<string>,\n): Promise<UserEquation> {\n if (equation.length > MAX_USER_EQUATION_LEN) {\n throw new UserEquationError(\n `equation exceeds ${MAX_USER_EQUATION_LEN} characters (${equation.length})`,\n );\n }\n // Materialized once: an iterator (`map.keys()`) would be spent by the first use.\n const names = catalogNames === undefined ? undefined : new Set(catalogNames);\n const spelled = rewriteFormulaSpellings(equation);\n const rewritten = names === undefined ? spelled : rewriteCatalogHyphens(spelled, names);\n const eqIdx = rewritten.indexOf('=');\n if (eqIdx < 0) {\n throw new UserEquationError(\n `equation must be \"TARGET = EXPR\" (no \"=\" found in '${equation}')`,\n );\n }\n const target = rewritten.slice(0, eqIdx).trim();\n if (!target) throw new UserEquationError('equation has an empty target (left of \"=\")');\n const rhs = rewritten.slice(eqIdx + 1).trim();\n if (!rhs) throw new UserEquationError('equation has an empty right-hand side');\n\n let variables: readonly string[];\n try {\n const parser = await getFormulaParser();\n ({ variables } = parser.parse(rhs));\n } catch (e) {\n // No parse tree, so no subtraction was read: the hyphen hint needs the parsed variables.\n throw new UserEquationError(`could not parse the right-hand side '${rhs}': ${(e as Error).message}`);\n }\n const sources = variables.filter(\n (v) => !Object.prototype.hasOwnProperty.call(CONSTANTS, v),\n );\n // An all-constant right-hand side (the Planck length) is an equation about a catalog quantity\n // only when its target is one; otherwise it names nothing to check (persona finding W5).\n const targetIsCatalog = names !== undefined && resolveQuantityName(target, names) !== null;\n if (sources.length === 0 && !targetIsCatalog) {\n throw new UserEquationError(\n `no source quantities in '${rhs}' (only constants/numbers?)`,\n );\n }\n return { target, sources, text: rewritten.trim() };\n}\n\n/** Normalize for comparison: lowercase, `_`/`-` unified. */\nconst normalizeForCompare = (s: string): string => s.toLowerCase().replace(/[_-]/g, '-');\n\n/** The shortest name that counts as contained in another for the \"did you mean?\" ranking. */\nconst MIN_CONTAINED = 3;\n\n/**\n * The one \"did you mean?\" ranking, shared by {@link suggestQuantities} and\n * {@link suggestByDimension}: edit distance first, then containment (one name\n * inside the other), then length, then name. Edit distance leads so a one-edit\n * typo beats a substring: `hawkng-temperature` → `hawking-temperature` before\n * `temperature` (persona finding N5). `gate` keeps a candidate only if one name\n * contains the other (the contained one at least three characters long) or the\n * distance is small against the query length; the\n * dimension-based caller passes `false`, because there the dimension is the evidence.\n */\nfunction rankByName(name: string, candidates: Iterable<string>, gate: boolean): string[] {\n const needle = normalizeForCompare(name);\n // Without the gate, short catalog names (`a`, `nu`) are spurious \"matches\" for any typo.\n const maxDist = Math.max(1, Math.ceil(needle.length / 2));\n // A contained name counts only from MIN_CONTAINED characters: every one-letter name occurs inside\n // a long input (`schrodinger-equation` holds a, g, q, r), and that is not nearness (audit I5).\n const within = (outer: string, inner: string): boolean => inner.length >= MIN_CONTAINED && outer.includes(inner);\n return [...candidates]\n .map((cand) => {\n const hay = normalizeForCompare(cand);\n const contains = within(hay, needle) || within(needle, hay) ? 0 : 1;\n return { cand, contains, dist: editDistance(needle, hay) };\n })\n .filter((s) => !gate || s.contains === 0 || s.dist <= maxDist)\n .sort(\n (x, y) =>\n x.dist - y.dist ||\n x.contains - y.contains ||\n x.cand.length - y.cand.length ||\n x.cand.localeCompare(y.cand),\n )\n .map((s) => s.cand);\n}\n\n/**\n * Up to `k` catalog names most similar to `name` — the \"did you mean?\" set for an\n * unmatched user symbol. Ranked by edit distance first, then containment, then\n * length (the shared ranking of `upt map` and `upt explain`).\n *\n * @public\n */\nexport function suggestQuantities(\n name: string,\n catalogNames: Iterable<string>,\n k = 5,\n): string[] {\n return rankByName(name, catalogNames, true).slice(0, k);\n}\n\n/**\n * Catalog quantity names whose dimension equals `dim`, capped at `k` — the\n * dimension-based \"did you mean?\" set once an unknown symbol's dimension has\n * been inferred. With `near` (the unknown symbol) they are ranked by the same\n * edit-distance ranking as {@link suggestQuantities}, so `lenght` lists `length`\n * first (persona finding N2); without it they are sorted by name.\n *\n * @public\n */\nexport function suggestByDimension(\n dim: Dimension,\n catalogDims: ReadonlyMap<string, Dimension>,\n k = 5,\n near?: string,\n): string[] {\n const same = [...catalogDims.entries()].filter(([, d]) => equals(d, dim)).map(([name]) => name);\n return (near === undefined ? same.sort() : rankByName(near, same, false)).slice(0, k);\n}\n\n/**\n * Where the injected user junction landed, computed from a built `VizModel`.\n *\n * @public\n */\nexport interface EquationLanding {\n readonly isolated: boolean;\n /** Junctions in the user equation's connected component (including itself). */\n readonly clusterSize: number;\n /** The component holds a law/established junction (anchored to known physics). */\n readonly anchored: boolean;\n /** User-equation quantities that also appear in a neighbouring junction. */\n readonly sharedQuantities: readonly string[];\n /** Other junction ids in the user equation's component. */\n readonly connectedJunctionIds: readonly string[];\n}\n\n/**\n * Describe where `userJunctionId` sits in `model`: its component, the junctions it\n * connects to, and the quantities that link it to them.\n *\n * @public\n */\nexport function equationLanding(model: VizModel, userJunctionId: string): EquationLanding {\n const cluster = model.clusters.find((c) => c.junctionIds.includes(userJunctionId));\n const self = model.junctions.find((j) => j.id === userJunctionId);\n if (!cluster || !self) {\n return { isolated: true, clusterSize: 1, anchored: false, sharedQuantities: [], connectedJunctionIds: [] };\n }\n const connectedJunctionIds = cluster.junctionIds.filter((id) => id !== userJunctionId);\n const selfQuantities = new Set([...self.sources, self.target]);\n const neighbourQuantities = new Set<string>();\n for (const j of model.junctions) {\n if (j.id === userJunctionId || !cluster.junctionIds.includes(j.id)) continue;\n for (const qn of [...j.sources, j.target]) neighbourQuantities.add(qn);\n }\n const sharedQuantities = [...selfQuantities].filter((qn) => neighbourQuantities.has(qn)).sort();\n return {\n isolated: cluster.size === 1,\n clusterSize: cluster.size,\n anchored: cluster.anchored,\n sharedQuantities,\n connectedJunctionIds,\n };\n}\n\n/**\n * One or two lines summarising `connects to:` (persona findings W3 / I3).\n * Dumping ~100 edge ids next to a correct pendulum equation made shared\n * `length`/`temperature` look like a physics claim. Rank by overlap with the\n * user's shared quantities first, then textbook/law over bridges, then name.\n * When the list is long, state the structural caveat explicitly.\n *\n * @internal\n */\nexport function formatConnectedSummary(\n model: VizModel,\n landing: EquationLanding,\n maxShow = 5,\n): readonly string[] {\n const ids = landing.connectedJunctionIds;\n if (ids.length === 0) return [];\n const shared = new Set(landing.sharedQuantities);\n const byId = new Map(model.junctions.map((j) => [j.id, j]));\n const tier = (id: string): number =>\n id.startsWith('CE-') || id.startsWith('law-') ? 0 : id.startsWith('be-') ? 1 : 2;\n const overlap = (id: string): number => {\n const j = byId.get(id);\n if (!j) return 0;\n let n = 0;\n for (const qn of [...j.sources, j.target]) if (shared.has(qn)) n++;\n return n;\n };\n const ranked = [...ids].sort(\n (a, b) => overlap(b) - overlap(a) || tier(a) - tier(b) || a.localeCompare(b),\n );\n const shown = ranked.slice(0, maxShow);\n const more = ranked.length - shown.length;\n if (more <= 0) {\n return [` nearest equations: ${shown.join(', ')}`];\n }\n return [\n ` nearest equations: ${shown.join(', ')} (+${more} more)`,\n ' (shared-quantity connectivity, not a physics claim)',\n ];\n}\n\n/** A \"did you mean?\" suggestion for an unmatched symbol. */\nexport interface EquationHint {\n readonly name: string;\n readonly suggestions: readonly string[];\n /** True when the suggestions come from the symbol's INFERRED dimension. */\n readonly byDimension: boolean;\n /**\n * Registered constants that carry the symbol's inferred dimension (`sigma` → `sigma_sb`,\n * persona finding L5). Present only when a dimension was inferred and it is not dimensionless.\n */\n readonly constants?: readonly string[];\n}\n\n/** A one-letter user name bound to a catalog quantity (persona finding W6). */\nexport interface ShortBinding {\n readonly name: string;\n readonly quantity: string;\n readonly dim: Dimension;\n /**\n * Present and false when a one-letter catalog name was recognised and not\n * applied. Omitted when the name was bound.\n */\n readonly bound?: false;\n}\n\n/**\n * Full analysis of a user equation against a catalog name→dimension map: the\n * `user` junction (for the graph), the dimensional verdict (RHS dimension vs the\n * target's catalog dimension), and \"did you mean?\" hints (dimension-based when a\n * single unknown's dimension can be inferred, else name-similarity).\n *\n * Physics constants (`hbar`, `c`, `k_B`, …) are supplied to the parser with\n * their real dimensions (from `CONSTANTS`) so the dimensional check is correct.\n *\n * @public\n */\nexport interface EquationAnalysis {\n readonly junction: VizJunction;\n /** Set when the RHS is not dimensionally well-formed (then dims are null). */\n readonly parseError: string | null;\n readonly rhsDimension: Dimension | null;\n readonly targetDimension: Dimension | null;\n /** rhsDimension === targetDimension; null when unknowable or parse failed. */\n readonly consistent: boolean | null;\n readonly hints: readonly EquationHint[];\n /**\n * One-letter names that resolved to a catalog quantity. A one-letter name is the likeliest to\n * mean something else: the catalog's `a` is perihelion's semi-major axis, a length, and the\n * Unruh formula's `a` is an acceleration (persona finding W6).\n */\n readonly shortBindings: readonly ShortBinding[];\n /**\n * RHS names given a dimensionless placeholder because they did not resolve.\n * The reported RHS dimension treats them as dimensionless, so it is not a\n * check of the formula until they are bound.\n */\n readonly placeholders: readonly string[];\n /** Set when `--natural` / `--geometrized` reconciled the two dimensions. */\n readonly naturalNote?: string;\n}\n\n/**\n * Parse + dimensionally analyze a user `TARGET = EXPR` against `catalogDims`\n * (catalog quantity name → dimension). Throws {@link UserEquationError} on a\n * structurally malformed equation; reports a dimensional malformation via\n * `parseError`.\n *\n * @public\n */\nexport async function analyzeUserEquation(\n equation: string,\n catalogDims: ReadonlyMap<string, Dimension>,\n options?: AnalyzeUserEquationOptions,\n): Promise<EquationAnalysis> {\n const dimsIn = withFormulaNames(catalogDims);\n const catalogNames = new Set(dimsIn.keys());\n const bindShort = options?.bindShortNames === true;\n // W2: rewrite catalog kebabs before either parser sees `-` as subtraction.\n const eq = await parseUserEquation(equation, catalogNames);\n const literalShort = (n: string): string | null =>\n n.length === 1 && catalogNames.has(n) ? n : null;\n const resolveCatalog = (n: string): string | null => {\n if (!bindShort && literalShort(n) !== null) return null;\n return resolveQuantityName(n, catalogNames);\n };\n // Evaluate keys are aliases of this target's sources. `R` is reflectance\n // on radiation-pressure and is not a global name.\n const aliasMap = aliasesForTarget(CATALOG_GRAPH, resolveCatalog(eq.target) ?? '');\n const resolve = (n: string): string | null => {\n if (!bindShort && literalShort(n) !== null) return null;\n return resolveQuantityName(n, catalogNames, aliasMap);\n };\n\n // dims for parsePhysics: physics constants carry their REAL dimensions; matched\n // sources their catalog dimension; the (≤1) unmatched source a DIMENSIONLESS\n // placeholder so the RHS still parses.\n const dims: Record<string, Dimension> = {};\n for (const [name, c] of Object.entries(CONSTANTS)) dims[name] = c.dim;\n for (const s of eq.sources) {\n const r = resolve(s);\n dims[s] = r ? (dimsIn.get(r) as Dimension) : (formulaSymbolDimension(s) ?? DIMENSIONLESS);\n }\n // Use the rewritten equation's RHS (eq.text) so planck-length has already\n // become planck_length before dimensional parse.\n const rhsText = eq.text.slice(eq.text.indexOf('=') + 1);\n\n let rhsDimension: Dimension | null = null;\n let exprForInference: import('../dimensional/validator.js').ExprNode | null = null;\n let parseError: string | null = null;\n try {\n const parsed = await parsePhysics(rhsText, dims);\n rhsDimension = parsed.dimension;\n exprForInference = parsed.expr;\n } catch (e) {\n const msg = e instanceof Error ? e.message : String(e);\n // The formula parser already read this right-hand side (parseUserEquation), so its variables are the tree's.\n const { variables } = (await getFormulaParser()).parse(rhsText);\n const hint = hyphenSubtractHint(rhsText, variables, catalogNames);\n parseError = hint ? `${msg}. ${hint}` : msg;\n }\n\n const resolvedTarget = resolve(eq.target);\n const targetDimension = resolvedTarget ? (dimsIn.get(resolvedTarget) as Dimension) : null;\n\n const placeholders = eq.sources.filter((s) => !resolve(s));\n const hints: EquationHint[] = [];\n if (exprForInference) {\n const unmatchedSources = placeholders.filter((s) => bindShort || literalShort(s) === null);\n const totalUnmatched = placeholders.length + (resolvedTarget ? 0 : 1);\n for (const s of unmatchedSources) {\n let byDim: string[] | null = null;\n let constants: string[] = [];\n if (targetDimension && totalUnmatched === 1) {\n const inferred = inferUnknownDimension(exprForInference, s, targetDimension);\n if (inferred) {\n byDim = suggestByDimension(inferred, dimsIn, 5, s);\n if (!equals(inferred, DIMENSIONLESS)) {\n constants = Object.entries(CONSTANTS)\n .filter(([, c]) => equals(c.dim, inferred))\n .map(([name]) => name)\n .sort();\n }\n }\n }\n const withConstants = constants.length > 0 ? { constants } : {};\n hints.push(\n byDim\n ? { name: s, suggestions: byDim, byDimension: true, ...withConstants }\n : { name: s, suggestions: suggestQuantities(s, catalogNames, 5), byDimension: false, ...withConstants },\n );\n }\n if (!resolvedTarget && (bindShort || literalShort(eq.target) === null)) {\n hints.push({ name: eq.target, suggestions: suggestQuantities(eq.target, catalogNames, 5), byDimension: false });\n }\n }\n\n const declined = eq.sources\n .filter((s) => !bindShort && literalShort(s) !== null)\n .map((s) => ({ name: s, quantity: s, dim: dimsIn.get(s) as Dimension, bound: false as const }));\n const declinedTarget =\n !bindShort && literalShort(eq.target) !== null\n ? [{ name: eq.target, quantity: eq.target, dim: dimsIn.get(eq.target) as Dimension, bound: false as const }]\n : [];\n const boundShort = eq.sources\n .filter((s) => s.length === 1 && resolve(s) !== null)\n .map((s) => ({ name: s, quantity: resolve(s)!, dim: dimsIn.get(resolve(s)!) as Dimension }));\n\n let consistent = rhsDimension && targetDimension ? equals(rhsDimension, targetDimension) : null;\n let natural: string | undefined;\n if (\n consistent === false &&\n rhsDimension &&\n targetDimension &&\n options?.units !== undefined &&\n (hints.length === 0)\n ) {\n const powers = naturalPowers(rhsDimension, targetDimension, options.units);\n const note = powers === null ? null : naturalNote(powers, options.units);\n if (note) {\n consistent = true;\n natural = note;\n }\n }\n\n return {\n junction: {\n id: 'user-equation',\n label: eq.text,\n status: 'user',\n sources: eq.sources.map((s) => resolve(s) ?? s),\n target: resolvedTarget ?? eq.target,\n },\n parseError,\n rhsDimension,\n targetDimension,\n consistent,\n hints,\n shortBindings: [...declined, ...boundShort, ...declinedTarget],\n placeholders,\n ...(natural === undefined ? {} : { naturalNote: natural }),\n };\n}\n"]}
|
|
@@ -23,16 +23,20 @@
|
|
|
23
23
|
*/
|
|
24
24
|
import type { UniversalIndex } from './universal-index.js';
|
|
25
25
|
import type { PhysicalScale, Force, Symmetry, InformationMeasure } from './types.js';
|
|
26
|
-
|
|
26
|
+
/** The scale namespace of {@link AxesRegistry}: one index per `PhysicalScale`. @public */
|
|
27
|
+
export type ScaleAxes = {
|
|
27
28
|
readonly [K in PhysicalScale]: UniversalIndex<'scale'>;
|
|
28
29
|
};
|
|
29
|
-
|
|
30
|
+
/** The force namespace of {@link AxesRegistry}: one index per `Force`. @public */
|
|
31
|
+
export type ForceAxes = {
|
|
30
32
|
readonly [K in Force]: UniversalIndex<'force'>;
|
|
31
33
|
};
|
|
32
|
-
|
|
34
|
+
/** The symmetry namespace of {@link AxesRegistry}: one index per `Symmetry`. @public */
|
|
35
|
+
export type SymmetryAxes = {
|
|
33
36
|
readonly [K in Symmetry]: UniversalIndex<'symmetry'>;
|
|
34
37
|
};
|
|
35
|
-
|
|
38
|
+
/** The information namespace of {@link AxesRegistry}: one index per `InformationMeasure`. @public */
|
|
39
|
+
export type InformationAxes = {
|
|
36
40
|
readonly [K in InformationMeasure]: UniversalIndex<'information'>;
|
|
37
41
|
};
|
|
38
42
|
/**
|
|
@@ -63,5 +67,4 @@ export interface AxesRegistry {
|
|
|
63
67
|
* @public
|
|
64
68
|
*/
|
|
65
69
|
export declare const Axes: AxesRegistry;
|
|
66
|
-
export {};
|
|
67
70
|
//# sourceMappingURL=axes-registry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axes-registry.d.ts","sourceRoot":"","sources":["../../src/core/axes-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EACV,aAAa,EACb,KAAK,EACL,QAAQ,EACR,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAOpB,
|
|
1
|
+
{"version":3,"file":"axes-registry.d.ts","sourceRoot":"","sources":["../../src/core/axes-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EACV,aAAa,EACb,KAAK,EACL,QAAQ,EACR,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAOpB,0FAA0F;AAC1F,MAAM,MAAM,SAAS,GAAG;IAAE,QAAQ,EAAE,CAAC,IAAI,aAAa,GAAG,cAAc,CAAC,OAAO,CAAC;CAAE,CAAC;AACnF,kFAAkF;AAClF,MAAM,MAAM,SAAS,GAAG;IAAE,QAAQ,EAAE,CAAC,IAAI,KAAK,GAAG,cAAc,CAAC,OAAO,CAAC;CAAE,CAAC;AAC3E,wFAAwF;AACxF,MAAM,MAAM,YAAY,GAAG;IAAE,QAAQ,EAAE,CAAC,IAAI,QAAQ,GAAG,cAAc,CAAC,UAAU,CAAC;CAAE,CAAC;AACpF,qGAAqG;AACrG,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE,CAAC,IAAI,kBAAkB,GAAG,cAAc,CAAC,aAAa,CAAC;CAClE,CAAC;AAEF;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,WAAW,EAAE,eAAe,CAAC;CACvC;AAoCD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,IAAI,EAAE,YAKjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axes-registry.js","sourceRoot":"","sources":["../../src/core/axes-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"axes-registry.js","sourceRoot":"","sources":["../../src/core/axes-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAsCjD,8EAA8E;AAC9E,gEAAgE;AAChE,8EAA8E;AAE9E,MAAM,SAAS,GAAc,MAAM,CAAC,MAAM,CAAC;IACzC,OAAO,EAAE,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC;IACtC,UAAU,EAAE,SAAS,CAAC,OAAO,EAAE,YAAY,CAAC;IAC5C,SAAS,EAAE,SAAS,CAAC,OAAO,EAAE,WAAW,CAAC;IAC1C,YAAY,EAAE,SAAS,CAAC,OAAO,EAAE,cAAc,CAAC;CACjD,CAAC,CAAC;AAEH,MAAM,SAAS,GAAc,MAAM,CAAC,MAAM,CAAC;IACzC,aAAa,EAAE,SAAS,CAAC,OAAO,EAAE,eAAe,CAAC;IAClD,eAAe,EAAE,SAAS,CAAC,OAAO,EAAE,iBAAiB,CAAC;IACtD,IAAI,EAAE,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC;IAChC,MAAM,EAAE,SAAS,CAAC,OAAO,EAAE,QAAQ,CAAC;IACpC,QAAQ,EAAE,SAAS,CAAC,OAAO,EAAE,UAAU,CAAC;CACzC,CAAC,CAAC;AAEH,MAAM,YAAY,GAAiB,MAAM,CAAC,MAAM,CAAC;IAC/C,QAAQ,EAAE,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC;IAC3C,KAAK,EAAE,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC;IACrC,SAAS,EAAE,SAAS,CAAC,UAAU,EAAE,WAAW,CAAC;IAC7C,IAAI,EAAE,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC;IACnC,QAAQ,EAAE,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC;CAC5C,CAAC,CAAC;AAEH,MAAM,eAAe,GAAoB,MAAM,CAAC,MAAM,CAAC;IACrD,UAAU,EAAE,SAAS,CAAC,aAAa,EAAE,YAAY,CAAC;IAClD,OAAO,EAAE,SAAS,CAAC,aAAa,EAAE,SAAS,CAAC;IAC5C,UAAU,EAAE,SAAS,CAAC,aAAa,EAAE,YAAY,CAAC;IAClD,cAAc,EAAE,SAAS,CAAC,aAAa,EAAE,gBAAgB,CAAC;CAC3D,CAAC,CAAC;AAEH;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,IAAI,GAAiB,MAAM,CAAC,MAAM,CAAC;IAC9C,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,YAAY;IACtB,WAAW,EAAE,eAAe;CAC7B,CAAC,CAAC","sourcesContent":["/**\n * `Axes` singleton registry — module-load-stable `UniversalIndex`\n * references for every physics-axis value in `src/core/types.ts`.\n *\n * Phase 1 of v0.7 Proposal 1 (Intelligent Index Layer).\n *\n * Per Decision #4 (`docs/planning/v0.7-Proposal-1-Design.md`),\n * `Axes` is computed exactly once per Node process. Both the outer\n * namespace and each per-axis sub-object are `Object.freeze`d:\n * mutation attempts in strict mode throw `TypeError`. The values\n * inside are full `UniversalIndex<Axis>` objects (with stable\n * `id`s assigned at module load); same-object identity across\n * import sites is the load-bearing guarantee.\n *\n * Census basis: `docs/architecture/archive/v0.7-p1-baseline.md` Task 0.1.\n * - 4 scales × 5 forces × 5 symmetries × 4 information measures\n * = 18 stable references total\n * - dimension/topology axes are integer-valued and NOT enumerable\n * from `TensorConfig` — no `Axes.dimension` or `Axes.topology`\n * sub-namespace ships in v0.7.0\n *\n * @module core/axes-registry\n */\n\nimport { makeIndex } from './universal-index.js';\nimport type { UniversalIndex } from './universal-index.js';\nimport type {\n PhysicalScale,\n Force,\n Symmetry,\n InformationMeasure,\n} from './types.js';\n\n// ---------------------------------------------------------------------------\n// Per-namespace records — typed so consumers get autocompletion for\n// `Axes.scale.<quantum|mesoscopic|classical|cosmological>`, etc.\n// ---------------------------------------------------------------------------\n\n/** The scale namespace of {@link AxesRegistry}: one index per `PhysicalScale`. @public */\nexport type ScaleAxes = { readonly [K in PhysicalScale]: UniversalIndex<'scale'> };\n/** The force namespace of {@link AxesRegistry}: one index per `Force`. @public */\nexport type ForceAxes = { readonly [K in Force]: UniversalIndex<'force'> };\n/** The symmetry namespace of {@link AxesRegistry}: one index per `Symmetry`. @public */\nexport type SymmetryAxes = { readonly [K in Symmetry]: UniversalIndex<'symmetry'> };\n/** The information namespace of {@link AxesRegistry}: one index per `InformationMeasure`. @public */\nexport type InformationAxes = {\n readonly [K in InformationMeasure]: UniversalIndex<'information'>;\n};\n\n/**\n * Outer registry shape. Frozen at module load; per-namespace\n * sub-objects also frozen.\n *\n * @public\n */\nexport interface AxesRegistry {\n readonly scale: ScaleAxes;\n readonly force: ForceAxes;\n readonly symmetry: SymmetryAxes;\n readonly information: InformationAxes;\n}\n\n// ---------------------------------------------------------------------------\n// Registry construction — one makeIndex call per member, frozen\n// ---------------------------------------------------------------------------\n\nconst scaleAxes: ScaleAxes = Object.freeze({\n quantum: makeIndex('scale', 'quantum'),\n mesoscopic: makeIndex('scale', 'mesoscopic'),\n classical: makeIndex('scale', 'classical'),\n cosmological: makeIndex('scale', 'cosmological'),\n});\n\nconst forceAxes: ForceAxes = Object.freeze({\n gravitational: makeIndex('force', 'gravitational'),\n electromagnetic: makeIndex('force', 'electromagnetic'),\n weak: makeIndex('force', 'weak'),\n strong: makeIndex('force', 'strong'),\n emergent: makeIndex('force', 'emergent'),\n});\n\nconst symmetryAxes: SymmetryAxes = Object.freeze({\n poincare: makeIndex('symmetry', 'poincare'),\n gauge: makeIndex('symmetry', 'gauge'),\n conformal: makeIndex('symmetry', 'conformal'),\n susy: makeIndex('symmetry', 'susy'),\n emergent: makeIndex('symmetry', 'emergent'),\n});\n\nconst informationAxes: InformationAxes = Object.freeze({\n vonNeumann: makeIndex('information', 'vonNeumann'),\n shannon: makeIndex('information', 'shannon'),\n kolmogorov: makeIndex('information', 'kolmogorov'),\n quantumDiscord: makeIndex('information', 'quantumDiscord'),\n});\n\n/**\n * The canonical `Axes` registry. Same object across all import\n * sites; entry references stable across all reads.\n *\n * Usage:\n * import { Axes } from 'universal-physics-tensor';\n * const myIdx = Axes.scale.quantum; // UniversalIndex<'scale'>\n *\n * Two `LabeledTensor`s contracting on `Axes.scale.quantum` produce\n * a contraction. Two fresh `makeIndex('scale', 'quantum')` calls are\n * different ids: `contract` throws `IndexNameMismatchError` and names\n * both ids. Use the registry for shared identity (Decision #4).\n *\n * @public\n */\nexport const Axes: AxesRegistry = Object.freeze({\n scale: scaleAxes,\n force: forceAxes,\n symmetry: symmetryAxes,\n information: informationAxes,\n});\n"]}
|
package/dist/core/cell.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell.js","sourceRoot":"","sources":["../../src/core/cell.ts"],"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,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;IACpF,MAAM,WAAW,GAAG,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;IAEpF,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,EAAE,EAAE,CAAC,CAAC,EAAE;QACR,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,QAAQ;QACR,UAAU,EAAE,sBAAsB,CAAC,CAAC,CAAC,UAAU,CAAC;QAChD,KAAK,EAAE,CAAC,CAAC,KAAK;QACd,OAAO,EAAE,CAAC,CAAC,OAAO;QAClB,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACxC,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Typed `Cell` discriminated union for `UniversalTensor`'s cell storage.\n *\n * Three variants — `LawCell`, `BridgeCell`, `EmergenceCell` — each\n * carrying a `kind` discriminator that lets TypeScript narrow to the\n * specific variant at every consumption site. Mirrors the v0.6.1\n * validator-registry's discriminated-union pattern at\n * `src/dimensional/validator-registry.ts`.\n *\n * Design doc: `docs/planning/v0.7-Proposal-3-Design.md`.\n * Review findings: `docs/planning/v0.7-Proposal-3-Review-Findings.md`.\n *\n * Migration relationship to `src/core/types.ts`:\n * - `PhysicalLaw` ↔ `LawCell` (field-shape faithful; `confidence`\n * flips `number` → string-literal union)\n * - `BridgeEquation` ↔ `BridgeCell` (same migration)\n * - `EmergentPhenomenon` ↔ `EmergenceCell` (same migration)\n *\n * The old interfaces are NOT deleted and NOT `@deprecated`-tagged in\n * this sprint (per Eve-R2 + the Phase 0 consumer-import census:\n * 4 in-repo sites still use them). A future v0.7.x sprint migrates\n * those consumers and then adds `@deprecated`.\n *\n * **No `confidenceToStatus` adapter is shipped** (per Eve-R3). The\n * 42-bridge catalog has BOTH a numeric `confidence` AND a curated\n * string `status` field, set independently; an adapter would\n * produce labels that contradict the catalog curation\n * (e.g. `status: 'established'` + `confidence: 0.7` → adapter\n * returns `'speculative'`). Callers must pass the string explicitly\n * at cell-construction sites.\n *\n * @module core/cell\n */\n\nimport type {\n PhysicalScale,\n Force,\n Symmetry,\n InformationMeasure,\n TensorIndices,\n PhysicalLaw,\n BridgeEquation,\n EmergentPhenomenon,\n} from './types.js';\n\n/**\n * Epistemic confidence vocabulary for `Cell` variants. Matches the\n * `'established' | 'speculative' | 'highly-speculative'` portion of\n * `BridgeEquationStatus` from `src/bridges/index.ts:42-46`, minus\n * `'invalid'` — cells in the tensor are by definition active; invalid\n * catalog entries should not be added.\n *\n * @public\n */\nexport type CellConfidence =\n | 'established'\n | 'speculative'\n | 'highly-speculative';\n\n/**\n * Fields common to every `Cell` variant. Each variant extends this\n * with a `kind` discriminator and variant-specific fields. The\n * `equation` field carries LaTeX-formatted mathematical content\n * (matching the existing `PhysicalLaw.equation` / `BridgeEquation.\n * equation` convention).\n *\n * @public\n */\nexport interface CellBase {\n /** Unique identifier within the parent `UniversalTensor`. */\n readonly id: string;\n\n /** Epistemic confidence vocabulary (see `CellConfidence`). */\n readonly confidence: CellConfidence;\n\n /** Mathematical formulation (LaTeX). */\n readonly equation: string;\n}\n\n/**\n * Cell variant representing a known physical law. 1:1 field-shape\n * correspondence with `PhysicalLaw` from `src/core/types.ts:88`,\n * except `confidence` is the string vocabulary (not `number`) and\n * the discriminator `kind: 'law'` is added.\n *\n * @public\n */\nexport interface LawCell extends CellBase {\n readonly kind: 'law';\n readonly name: string;\n readonly scales: ReadonlyArray<PhysicalScale>;\n readonly forces: ReadonlyArray<Force>;\n readonly symmetries: ReadonlyArray<Symmetry>;\n readonly informationMeasures?: ReadonlyArray<InformationMeasure>;\n readonly dimensions?: ReadonlyArray<number>;\n readonly topologies?: ReadonlyArray<number>;\n readonly references?: ReadonlyArray<string>;\n}\n\n/**\n * Cell variant representing a bridge equation between regimes. 1:1\n * field-shape correspondence with `BridgeEquation` from\n * `src/core/types.ts:126`, except `confidence` is the string\n * vocabulary and the discriminator `kind: 'bridge'` is added.\n *\n * @public\n */\nexport interface BridgeCell extends CellBase {\n readonly kind: 'bridge';\n readonly name: string;\n readonly source: TensorIndices;\n readonly target: TensorIndices;\n readonly validated: boolean;\n readonly description: string;\n}\n\n/**\n * Cell variant representing an emergent phenomenon. 1:1 field-shape\n * correspondence with `EmergentPhenomenon` from `src/core/types.ts:155`,\n * except `confidence` is the string vocabulary and the discriminator\n * `kind: 'emergence'` is added. Note: the old interface uses\n * `description` for the mathematical content; `EmergenceCell` carries\n * it as both `equation` (inherited from `CellBase`, mandatory) and\n * `description` (kept for prose-context fidelity, optional).\n *\n * @public\n */\nexport interface EmergenceCell extends CellBase {\n readonly kind: 'emergence';\n readonly name: string;\n readonly order: number;\n readonly indices: ReadonlyArray<TensorIndices>;\n readonly description?: string;\n}\n\n/**\n * The disjoint union of all `Cell` variants. Consumers narrow via\n * `switch (cell.kind)` with an exhaustive `_exhaustive: never` arm.\n *\n * @public\n */\nexport type Cell = LawCell | BridgeCell | EmergenceCell;\n\n// ---------------------------------------------------------------------------\n// Inverse adapters (legacy interface → Cell variant)\n// ---------------------------------------------------------------------------\n// Used by UniversalTensor.populatedCells() (Phase 2 Task 2.1) to resolve\n// stored cell-IDs back to Cell objects. Counterparts to the forward\n// adapters (cellToLaw / cellToBridge / cellToEmergence) at tensor.ts.\n//\n// The numeric `confidence: number` from the legacy interfaces is bucketed\n// back into the string vocabulary via `numberToCellConfidence`. This is\n// the lossy direction Eve-R3 flagged — but in THIS direction, the call\n// site is \"we have a legacy entry that was already in the tensor; bucket\n// its numeric confidence into the closest string label\". Per Decision #6\n// fan-out semantics, this can only happen for entries that round-tripped\n// through `addCell` (where the original string was authoritative) OR\n// entries added via the legacy `addLaw`/`addBridge`/`addEmergence` paths\n// (where the consumer chose a number directly). The bucketing matches\n// the forward `statusToConfidenceNumber` in tensor.ts: 0.95→established,\n// 0.6→speculative, 0.3→highly-speculative; thresholds chosen to make\n// the standard round-trip exact.\n\n/**\n * Inverse of `statusToConfidenceNumber` at tensor.ts:48-58. Buckets a\n * numeric confidence in [0,1] back to the string vocabulary. Used by\n * the inverse adapters below.\n *\n * @internal\n */\nfunction numberToCellConfidence(n: number): CellConfidence {\n if (n >= 0.8) return 'established';\n if (n >= 0.4) return 'speculative';\n return 'highly-speculative';\n}\n\n/**\n * Adapter: `PhysicalLaw` (legacy) → `LawCell`. Used by\n * `UniversalTensor.populatedCells()`.\n *\n * @internal\n */\nexport function lawToCell(law: PhysicalLaw): LawCell {\n return {\n kind: 'law',\n id: law.id,\n name: law.name,\n equation: law.equation,\n confidence: numberToCellConfidence(law.confidence),\n scales: law.scales,\n forces: law.forces,\n symmetries: law.symmetries,\n ...(law.informationMeasures ? { informationMeasures: law.informationMeasures } : {}),\n ...(law.dimensions ? { dimensions: law.dimensions } : {}),\n ...(law.topologies ? { topologies: law.topologies } : {}),\n ...(law.references ? { references: law.references } : {}),\n };\n}\n\n/**\n * Adapter: `BridgeEquation` (legacy) → `BridgeCell`. Used by\n * `UniversalTensor.populatedCells()`.\n *\n * @internal\n */\nexport function bridgeToCell(b: BridgeEquation): BridgeCell {\n return {\n kind: 'bridge',\n id: b.id,\n name: b.name,\n equation: b.equation,\n confidence: numberToCellConfidence(b.confidence),\n source: b.source,\n target: b.target,\n validated: b.validated,\n description: b.description,\n };\n}\n\n/**\n * Adapter: `EmergentPhenomenon` (legacy) → `EmergenceCell`. The\n * legacy `description` field holds the mathematical content (LaTeX);\n * we surface it as `equation` and leave `description` undefined\n * unless the legacy entry had a \"math\\n\\nprose\" split (per the\n * forward `cellToEmergence` adapter convention).\n *\n * @internal\n */\nexport function emergenceToCell(p: EmergentPhenomenon): EmergenceCell {\n // Split convention: if description contains \"\\n\\n\", treat the part\n // before as equation and after as prose; otherwise the whole field\n // is the equation.\n const splitIdx = p.description.indexOf('\\n\\n');\n const equation = splitIdx === -1 ? p.description : p.description.slice(0, splitIdx);\n const description = splitIdx === -1 ? undefined : p.description.slice(splitIdx + 2);\n\n return {\n kind: 'emergence',\n id: p.id,\n name: p.name,\n equation,\n confidence: numberToCellConfidence(p.confidence),\n order: p.order,\n indices: p.indices,\n ...(description ? { description } : {}),\n };\n}\n"]}
|