universal-physics-tensor 10.0.0 → 11.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 +4 -3
- package/bin/upt.mjs +13 -1
- package/data/atlas/atlas.json +25 -25
- package/data/atlas/atlas.jsonld +1 -1
- package/data/atlas/diffusion.json +6 -6
- package/data/atlas/oscillators.json +7 -7
- package/data/atlas/waves.json +14 -14
- package/data/atlas/witness-results.json +11 -11
- package/data/bridge-catalog.json +371 -228
- package/data/bridge-catalog.schema.json +45 -7
- package/dist/atlas/applicability.d.ts.map +1 -1
- package/dist/atlas/applicability.js +21 -15
- package/dist/atlas/applicability.js.map +1 -1
- package/dist/atlas/benchmark/hybrid-retrieval.d.ts +9 -1
- package/dist/atlas/benchmark/hybrid-retrieval.d.ts.map +1 -1
- package/dist/atlas/benchmark/hybrid-retrieval.js +15 -13
- package/dist/atlas/benchmark/hybrid-retrieval.js.map +1 -1
- package/dist/atlas/benchmark/loader.js +2 -2
- package/dist/atlas/benchmark/loader.js.map +1 -1
- package/dist/atlas/benchmark/stats.d.ts +2 -2
- package/dist/atlas/benchmark/stats.d.ts.map +1 -1
- package/dist/atlas/benchmark/stats.js +15 -7
- package/dist/atlas/benchmark/stats.js.map +1 -1
- package/dist/atlas/catalog-formal-ref.d.ts +26 -3
- package/dist/atlas/catalog-formal-ref.d.ts.map +1 -1
- package/dist/atlas/catalog-formal-ref.js +52 -5
- package/dist/atlas/catalog-formal-ref.js.map +1 -1
- package/dist/atlas/chain-pipeline.d.ts.map +1 -1
- package/dist/atlas/chain-pipeline.js +7 -8
- package/dist/atlas/chain-pipeline.js.map +1 -1
- package/dist/atlas/diffusion/bridges-closure.d.ts +0 -4
- package/dist/atlas/diffusion/bridges-closure.d.ts.map +1 -1
- package/dist/atlas/diffusion/bridges-closure.js +8 -12
- 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 +27 -39
- package/dist/atlas/diffusion/bridges.js.map +1 -1
- package/dist/atlas/diffusion/dimensions.d.ts +6 -14
- package/dist/atlas/diffusion/dimensions.d.ts.map +1 -1
- package/dist/atlas/diffusion/dimensions.js +8 -16
- package/dist/atlas/diffusion/dimensions.js.map +1 -1
- package/dist/atlas/diffusion/models.d.ts +3 -3
- package/dist/atlas/diffusion/models.d.ts.map +1 -1
- package/dist/atlas/diffusion/models.js +5 -10
- package/dist/atlas/diffusion/models.js.map +1 -1
- package/dist/atlas/diffusion/numerics.d.ts +16 -4
- package/dist/atlas/diffusion/numerics.d.ts.map +1 -1
- package/dist/atlas/diffusion/numerics.js +38 -24
- package/dist/atlas/diffusion/numerics.js.map +1 -1
- package/dist/atlas/link-prediction.d.ts +106 -3
- package/dist/atlas/link-prediction.d.ts.map +1 -1
- package/dist/atlas/link-prediction.js +212 -66
- package/dist/atlas/link-prediction.js.map +1 -1
- package/dist/atlas/oscillators/bridges-coarse.d.ts.map +1 -1
- package/dist/atlas/oscillators/bridges-coarse.js +7 -11
- 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 +6 -7
- package/dist/atlas/oscillators/bridges-exact.js.map +1 -1
- package/dist/atlas/oscillators/bridges-limits.d.ts +3 -16
- package/dist/atlas/oscillators/bridges-limits.d.ts.map +1 -1
- package/dist/atlas/oscillators/bridges-limits.js +23 -34
- package/dist/atlas/oscillators/bridges-limits.js.map +1 -1
- package/dist/atlas/oscillators/dimensions.d.ts +9 -21
- package/dist/atlas/oscillators/dimensions.d.ts.map +1 -1
- package/dist/atlas/oscillators/dimensions.js +9 -21
- package/dist/atlas/oscillators/dimensions.js.map +1 -1
- package/dist/atlas/oscillators/limit-witnesses.d.ts +2 -2
- package/dist/atlas/oscillators/limit-witnesses.d.ts.map +1 -1
- package/dist/atlas/oscillators/limit-witnesses.js +17 -15
- package/dist/atlas/oscillators/limit-witnesses.js.map +1 -1
- package/dist/atlas/oscillators/models.d.ts.map +1 -1
- package/dist/atlas/oscillators/models.js +2 -6
- package/dist/atlas/oscillators/models.js.map +1 -1
- package/dist/atlas/oscillators/pendulum-motion.d.ts +29 -6
- package/dist/atlas/oscillators/pendulum-motion.d.ts.map +1 -1
- package/dist/atlas/oscillators/pendulum-motion.js +60 -40
- package/dist/atlas/oscillators/pendulum-motion.js.map +1 -1
- package/dist/atlas/oscillators/phase-translation.d.ts +0 -11
- package/dist/atlas/oscillators/phase-translation.d.ts.map +1 -1
- package/dist/atlas/oscillators/phase-translation.js +3 -4
- package/dist/atlas/oscillators/phase-translation.js.map +1 -1
- package/dist/atlas/oscillators/position-translation.d.ts +68 -7
- package/dist/atlas/oscillators/position-translation.d.ts.map +1 -1
- package/dist/atlas/oscillators/position-translation.js +123 -12
- package/dist/atlas/oscillators/position-translation.js.map +1 -1
- package/dist/atlas/oscillators/rejections.d.ts +0 -2
- package/dist/atlas/oscillators/rejections.d.ts.map +1 -1
- package/dist/atlas/oscillators/rejections.js +0 -7
- package/dist/atlas/oscillators/rejections.js.map +1 -1
- package/dist/atlas/physjs-entries.generated.d.ts +25 -24
- package/dist/atlas/physjs-entries.generated.d.ts.map +1 -1
- package/dist/atlas/physjs-entries.generated.js +25 -24
- package/dist/atlas/physjs-entries.generated.js.map +1 -1
- package/dist/atlas/physjs-ref.d.ts +34 -31
- package/dist/atlas/physjs-ref.d.ts.map +1 -1
- package/dist/atlas/physjs-ref.js +55 -53
- package/dist/atlas/physjs-ref.js.map +1 -1
- package/dist/atlas/physjs-reviewed.d.ts +1 -1
- package/dist/atlas/physjs-reviewed.js +15 -15
- package/dist/atlas/physjs-reviewed.js.map +1 -1
- package/dist/atlas/poster/statements.d.ts +0 -19
- package/dist/atlas/poster/statements.d.ts.map +1 -1
- package/dist/atlas/poster/statements.js +1 -1
- package/dist/atlas/poster/statements.js.map +1 -1
- package/dist/atlas/proof-target.d.ts +1 -1
- package/dist/atlas/proof-target.js +1 -1
- package/dist/atlas/proof-target.js.map +1 -1
- package/dist/atlas/regime.d.ts +1 -1
- package/dist/atlas/regime.d.ts.map +1 -1
- package/dist/atlas/regime.js +1 -1
- package/dist/atlas/regime.js.map +1 -1
- package/dist/atlas/text-overlap.d.ts +23 -0
- package/dist/atlas/text-overlap.d.ts.map +1 -0
- package/dist/atlas/text-overlap.js +41 -0
- package/dist/atlas/text-overlap.js.map +1 -0
- package/dist/atlas/waves/bridges-closure.d.ts.map +1 -1
- package/dist/atlas/waves/bridges-closure.js +2 -6
- 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 +32 -48
- package/dist/atlas/waves/bridges.js.map +1 -1
- package/dist/atlas/waves/models.d.ts +5 -6
- package/dist/atlas/waves/models.d.ts.map +1 -1
- package/dist/atlas/waves/models.js +7 -13
- package/dist/atlas/waves/models.js.map +1 -1
- package/dist/atlas/waves/numerics.d.ts.map +1 -1
- package/dist/atlas/waves/numerics.js +10 -3
- package/dist/atlas/waves/numerics.js.map +1 -1
- package/dist/atlas/witness-numeric.d.ts +30 -0
- package/dist/atlas/witness-numeric.d.ts.map +1 -1
- package/dist/atlas/witness-numeric.js +53 -0
- package/dist/atlas/witness-numeric.js.map +1 -1
- package/dist/atlas/witness-specs.d.ts.map +1 -1
- package/dist/atlas/witness-specs.js +19 -0
- package/dist/atlas/witness-specs.js.map +1 -1
- package/dist/atlas/witness-symbolic.d.ts +75 -3
- package/dist/atlas/witness-symbolic.d.ts.map +1 -1
- package/dist/atlas/witness-symbolic.js +116 -10
- package/dist/atlas/witness-symbolic.js.map +1 -1
- package/dist/bridges/catalog-load.d.ts.map +1 -1
- package/dist/bridges/catalog-load.js +13 -8
- package/dist/bridges/catalog-load.js.map +1 -1
- package/dist/bridges/catalog-types.d.ts +26 -2
- package/dist/bridges/catalog-types.d.ts.map +1 -1
- package/dist/bridges/catalog-types.js +11 -1
- package/dist/bridges/catalog-types.js.map +1 -1
- package/dist/bridges/evaluation-errors.d.ts +31 -1
- package/dist/bridges/evaluation-errors.d.ts.map +1 -1
- package/dist/bridges/evaluation-errors.js +20 -2
- package/dist/bridges/evaluation-errors.js.map +1 -1
- package/dist/bridges/evaluator-inputs.d.ts.map +1 -1
- package/dist/bridges/evaluator-inputs.js +7 -5
- package/dist/bridges/evaluator-inputs.js.map +1 -1
- package/dist/bridges/evaluators.d.ts.map +1 -1
- package/dist/bridges/evaluators.js +27 -12
- package/dist/bridges/evaluators.js.map +1 -1
- package/dist/bridges/expr-parse.d.ts +11 -0
- package/dist/bridges/expr-parse.d.ts.map +1 -1
- package/dist/bridges/expr-parse.js +14 -5
- package/dist/bridges/expr-parse.js.map +1 -1
- package/dist/bridges/holds.d.ts +35 -3
- package/dist/bridges/holds.d.ts.map +1 -1
- package/dist/bridges/holds.js +117 -23
- package/dist/bridges/holds.js.map +1 -1
- package/dist/bridges/notices.d.ts.map +1 -1
- package/dist/bridges/notices.js +5 -5
- package/dist/bridges/notices.js.map +1 -1
- package/dist/bridges/relation-eval.d.ts +4 -4
- package/dist/bridges/relation-eval.d.ts.map +1 -1
- package/dist/bridges/relation-eval.js +15 -16
- package/dist/bridges/relation-eval.js.map +1 -1
- package/dist/bridges/sensitivity.d.ts.map +1 -1
- package/dist/bridges/sensitivity.js +3 -3
- package/dist/bridges/sensitivity.js.map +1 -1
- package/dist/bridges/validity.d.ts +33 -0
- package/dist/bridges/validity.d.ts.map +1 -0
- package/dist/bridges/validity.js +67 -0
- package/dist/bridges/validity.js.map +1 -0
- package/dist/canonical/entries/atomic.js +1 -3
- 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 +4 -5
- 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 +3 -4
- 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 +4 -10
- 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 +3 -7
- 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 +4 -6
- 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 +9 -17
- 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 -6
- package/dist/canonical/entries/relativity.js.map +1 -1
- package/dist/canonical/entries/thermo-nuclear-cosmo.d.ts.map +1 -1
- package/dist/canonical/entries/thermo-nuclear-cosmo.js +6 -10
- package/dist/canonical/entries/thermo-nuclear-cosmo.js.map +1 -1
- package/dist/canonical/fixed-points.d.ts +94 -0
- package/dist/canonical/fixed-points.d.ts.map +1 -0
- package/dist/canonical/fixed-points.js +81 -0
- package/dist/canonical/fixed-points.js.map +1 -0
- package/dist/canonical/linkage.d.ts.map +1 -1
- package/dist/canonical/linkage.js +25 -44
- package/dist/canonical/linkage.js.map +1 -1
- package/dist/canonical/normal-form.d.ts.map +1 -1
- package/dist/canonical/normal-form.js +5 -11
- package/dist/canonical/normal-form.js.map +1 -1
- package/dist/canonical/structural.d.ts +21 -21
- package/dist/canonical/structural.d.ts.map +1 -1
- package/dist/canonical/structural.js +40 -19
- package/dist/canonical/structural.js.map +1 -1
- package/dist/cases/brownian-sphere.d.ts +3 -3
- package/dist/cases/brownian-sphere.d.ts.map +1 -1
- package/dist/cases/brownian-sphere.js +6 -5
- package/dist/cases/brownian-sphere.js.map +1 -1
- package/dist/cases/damped-resonator.d.ts.map +1 -1
- package/dist/cases/damped-resonator.js +6 -9
- package/dist/cases/damped-resonator.js.map +1 -1
- package/dist/cases/kepler-rv.d.ts +1 -1
- package/dist/cases/kepler-rv.d.ts.map +1 -1
- package/dist/cases/kepler-rv.js +3 -2
- package/dist/cases/kepler-rv.js.map +1 -1
- package/dist/cases/lumped-cooling.d.ts +8 -3
- package/dist/cases/lumped-cooling.d.ts.map +1 -1
- package/dist/cases/lumped-cooling.js +21 -23
- package/dist/cases/lumped-cooling.js.map +1 -1
- package/dist/cases/quadrature.d.ts +7 -9
- package/dist/cases/quadrature.d.ts.map +1 -1
- package/dist/cases/quadrature.js +28 -32
- package/dist/cases/quadrature.js.map +1 -1
- package/dist/cases/resistor-noise.js +4 -4
- package/dist/cases/resistor-noise.js.map +1 -1
- package/dist/cases/skin-depth.d.ts +0 -4
- package/dist/cases/skin-depth.d.ts.map +1 -1
- package/dist/cases/skin-depth.js +3 -7
- package/dist/cases/skin-depth.js.map +1 -1
- package/dist/cli/args.d.ts +23 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +30 -8
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/bindings.d.ts.map +1 -1
- package/dist/cli/bindings.js +5 -4
- package/dist/cli/bindings.js.map +1 -1
- package/dist/cli/command.d.ts +8 -1
- package/dist/cli/command.d.ts.map +1 -1
- package/dist/cli/command.js.map +1 -1
- package/dist/cli/commands/_atlas-map.d.ts +0 -9
- package/dist/cli/commands/_atlas-map.d.ts.map +1 -1
- package/dist/cli/commands/_atlas-map.js +8 -18
- package/dist/cli/commands/_atlas-map.js.map +1 -1
- package/dist/cli/commands/_atlas-route.d.ts.map +1 -1
- package/dist/cli/commands/_atlas-route.js +6 -2
- package/dist/cli/commands/_atlas-route.js.map +1 -1
- package/dist/cli/commands/_discovery-opts.d.ts.map +1 -1
- package/dist/cli/commands/_discovery-opts.js +8 -9
- 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 +8 -5
- 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 +8 -1
- package/dist/cli/commands/audit.js.map +1 -1
- package/dist/cli/commands/axes.d.ts.map +1 -1
- package/dist/cli/commands/axes.js +20 -1
- package/dist/cli/commands/axes.js.map +1 -1
- package/dist/cli/commands/confront.d.ts.map +1 -1
- package/dist/cli/commands/confront.js +8 -14
- package/dist/cli/commands/confront.js.map +1 -1
- package/dist/cli/commands/derive.d.ts.map +1 -1
- package/dist/cli/commands/derive.js +22 -22
- 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 +6 -2
- 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 +1 -0
- package/dist/cli/commands/eval.js.map +1 -1
- package/dist/cli/commands/evaluate.d.ts.map +1 -1
- package/dist/cli/commands/evaluate.js +65 -37
- 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 +2 -1
- package/dist/cli/commands/explain.js.map +1 -1
- package/dist/cli/commands/ground.d.ts.map +1 -1
- package/dist/cli/commands/ground.js +1 -0
- package/dist/cli/commands/ground.js.map +1 -1
- package/dist/cli/commands/map.d.ts.map +1 -1
- package/dist/cli/commands/map.js +75 -5
- 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 +12 -9
- package/dist/cli/commands/metric.js.map +1 -1
- package/dist/cli/commands/path.d.ts +10 -0
- package/dist/cli/commands/path.d.ts.map +1 -1
- package/dist/cli/commands/path.js +25 -3
- package/dist/cli/commands/path.js.map +1 -1
- package/dist/cli/commands/probe.d.ts.map +1 -1
- package/dist/cli/commands/probe.js +59 -16
- package/dist/cli/commands/probe.js.map +1 -1
- package/dist/cli/commands/regime.d.ts.map +1 -1
- package/dist/cli/commands/regime.js +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +19 -28
- package/dist/cli/commands/symbolic.js.map +1 -1
- package/dist/cli/commands/testplan.d.ts.map +1 -1
- package/dist/cli/commands/testplan.js +4 -2
- package/dist/cli/commands/testplan.js.map +1 -1
- package/dist/cli/expr-print.d.ts +0 -2
- package/dist/cli/expr-print.d.ts.map +1 -1
- package/dist/cli/expr-print.js +7 -31
- package/dist/cli/expr-print.js.map +1 -1
- package/dist/cli/main.d.ts +7 -0
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +18 -3
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/numeric-flag.d.ts +12 -0
- package/dist/cli/numeric-flag.d.ts.map +1 -0
- package/dist/cli/numeric-flag.js +44 -0
- package/dist/cli/numeric-flag.js.map +1 -0
- package/dist/cli/output.d.ts +20 -0
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js +15 -0
- package/dist/cli/output.js.map +1 -1
- package/dist/cli/record-reach.js +2 -2
- package/dist/cli/record-reach.js.map +1 -1
- package/dist/cli/record-tables.d.ts.map +1 -1
- package/dist/cli/record-tables.js +6 -5
- package/dist/cli/record-tables.js.map +1 -1
- package/dist/cli/record.d.ts +1 -5
- package/dist/cli/record.d.ts.map +1 -1
- package/dist/cli/record.js +9 -8
- package/dist/cli/record.js.map +1 -1
- package/dist/cli/search-index.d.ts.map +1 -1
- package/dist/cli/search-index.js +7 -6
- package/dist/cli/search-index.js.map +1 -1
- package/dist/cli/statuses.d.ts +0 -2
- package/dist/cli/statuses.d.ts.map +1 -1
- package/dist/cli/statuses.js +0 -7
- package/dist/cli/statuses.js.map +1 -1
- package/dist/cli/stored-results.d.ts +7 -0
- package/dist/cli/stored-results.d.ts.map +1 -0
- package/dist/cli/stored-results.js +23 -0
- package/dist/cli/stored-results.js.map +1 -0
- package/dist/cli/version.d.ts.map +1 -1
- package/dist/cli/version.js +7 -5
- package/dist/cli/version.js.map +1 -1
- package/dist/cli-api.d.ts +34 -5
- package/dist/cli-api.d.ts.map +1 -1
- package/dist/cli-api.js +28 -4
- package/dist/cli-api.js.map +1 -1
- package/dist/composition/algebraic-equivalence.d.ts +43 -0
- package/dist/composition/algebraic-equivalence.d.ts.map +1 -0
- package/dist/composition/algebraic-equivalence.js +115 -0
- package/dist/composition/algebraic-equivalence.js.map +1 -0
- package/dist/composition/axes.d.ts +0 -6
- package/dist/composition/axes.d.ts.map +1 -1
- package/dist/composition/axes.js +6 -6
- package/dist/composition/axes.js.map +1 -1
- package/dist/composition/axis-audit.d.ts +47 -20
- package/dist/composition/axis-audit.d.ts.map +1 -1
- package/dist/composition/axis-audit.js +82 -9
- package/dist/composition/axis-audit.js.map +1 -1
- package/dist/composition/bridge-analysis.d.ts +17 -0
- package/dist/composition/bridge-analysis.d.ts.map +1 -1
- package/dist/composition/bridge-analysis.js +102 -55
- package/dist/composition/bridge-analysis.js.map +1 -1
- package/dist/composition/canonical-compare.d.ts +40 -0
- package/dist/composition/canonical-compare.d.ts.map +1 -1
- package/dist/composition/canonical-compare.js +122 -24
- package/dist/composition/canonical-compare.js.map +1 -1
- package/dist/composition/canonical-graph.d.ts +1 -1
- package/dist/composition/canonical-graph.d.ts.map +1 -1
- package/dist/composition/canonical-graph.js +9 -36
- package/dist/composition/canonical-graph.js.map +1 -1
- package/dist/composition/canonical-json.js +2 -2
- package/dist/composition/canonical-json.js.map +1 -1
- package/dist/composition/catalog-graph.d.ts.map +1 -1
- package/dist/composition/catalog-graph.js +2 -5
- package/dist/composition/catalog-graph.js.map +1 -1
- package/dist/composition/chain-candidate.d.ts +8 -0
- package/dist/composition/chain-candidate.d.ts.map +1 -1
- package/dist/composition/chain-candidate.js +9 -2
- package/dist/composition/chain-candidate.js.map +1 -1
- package/dist/composition/chain-match.d.ts +6 -3
- package/dist/composition/chain-match.d.ts.map +1 -1
- package/dist/composition/chain-match.js +4 -1
- package/dist/composition/chain-match.js.map +1 -1
- package/dist/composition/chain-result.d.ts.map +1 -1
- package/dist/composition/chain-result.js +2 -14
- package/dist/composition/chain-result.js.map +1 -1
- package/dist/composition/compose-symbolic.d.ts.map +1 -1
- package/dist/composition/compose-symbolic.js +3 -2
- package/dist/composition/compose-symbolic.js.map +1 -1
- package/dist/composition/compose.d.ts.map +1 -1
- package/dist/composition/compose.js +13 -5
- package/dist/composition/compose.js.map +1 -1
- package/dist/composition/composition-recovery.d.ts.map +1 -1
- package/dist/composition/composition-recovery.js +4 -7
- package/dist/composition/composition-recovery.js.map +1 -1
- package/dist/composition/discovery.d.ts +56 -0
- package/dist/composition/discovery.d.ts.map +1 -1
- package/dist/composition/discovery.js +114 -60
- package/dist/composition/discovery.js.map +1 -1
- package/dist/composition/edge.d.ts +21 -2
- package/dist/composition/edge.d.ts.map +1 -1
- package/dist/composition/edge.js +23 -1
- package/dist/composition/edge.js.map +1 -1
- package/dist/composition/enumerate.d.ts.map +1 -1
- package/dist/composition/enumerate.js +18 -3
- package/dist/composition/enumerate.js.map +1 -1
- package/dist/composition/evaluate-relation.d.ts +35 -11
- package/dist/composition/evaluate-relation.d.ts.map +1 -1
- package/dist/composition/evaluate-relation.js +60 -39
- package/dist/composition/evaluate-relation.js.map +1 -1
- package/dist/composition/explain.d.ts +3 -12
- package/dist/composition/explain.d.ts.map +1 -1
- package/dist/composition/explain.js +7 -20
- 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 -11
- package/dist/composition/expr-eval.js.map +1 -1
- package/dist/composition/expr-simplify.d.ts +16 -0
- package/dist/composition/expr-simplify.d.ts.map +1 -1
- package/dist/composition/expr-simplify.js +15 -20
- package/dist/composition/expr-simplify.js.map +1 -1
- package/dist/composition/formula-shape.d.ts +23 -4
- package/dist/composition/formula-shape.d.ts.map +1 -1
- package/dist/composition/formula-shape.js +57 -17
- package/dist/composition/formula-shape.js.map +1 -1
- package/dist/composition/graph-structure.d.ts +98 -0
- package/dist/composition/graph-structure.d.ts.map +1 -0
- package/dist/composition/graph-structure.js +167 -0
- package/dist/composition/graph-structure.js.map +1 -0
- package/dist/composition/graph-viz-svg.d.ts.map +1 -1
- package/dist/composition/graph-viz-svg.js +1 -1
- package/dist/composition/graph-viz-svg.js.map +1 -1
- package/dist/composition/graph-viz.d.ts.map +1 -1
- package/dist/composition/graph-viz.js +8 -37
- package/dist/composition/graph-viz.js.map +1 -1
- package/dist/composition/identifiability.d.ts +91 -4
- package/dist/composition/identifiability.d.ts.map +1 -1
- package/dist/composition/identifiability.js +363 -6
- package/dist/composition/identifiability.js.map +1 -1
- package/dist/composition/index.d.ts +8 -4
- package/dist/composition/index.d.ts.map +1 -1
- package/dist/composition/index.js +3 -2
- package/dist/composition/index.js.map +1 -1
- package/dist/composition/mathts-quiet.d.ts +4 -3
- package/dist/composition/mathts-quiet.d.ts.map +1 -1
- package/dist/composition/mathts-quiet.js +4 -3
- package/dist/composition/mathts-quiet.js.map +1 -1
- package/dist/composition/mathts-scalar-symbols.d.ts.map +1 -1
- package/dist/composition/mathts-scalar-symbols.js +2 -1
- package/dist/composition/mathts-scalar-symbols.js.map +1 -1
- package/dist/composition/probe/corpus.d.ts +4 -2
- package/dist/composition/probe/corpus.d.ts.map +1 -1
- package/dist/composition/probe/corpus.js +20 -9
- package/dist/composition/probe/corpus.js.map +1 -1
- package/dist/composition/probe/dataset.d.ts +17 -0
- package/dist/composition/probe/dataset.d.ts.map +1 -1
- package/dist/composition/probe/dataset.js +95 -50
- package/dist/composition/probe/dataset.js.map +1 -1
- package/dist/composition/probe/experiment-design.d.ts +5 -1
- package/dist/composition/probe/experiment-design.d.ts.map +1 -1
- package/dist/composition/probe/experiment-design.js +44 -24
- package/dist/composition/probe/experiment-design.js.map +1 -1
- package/dist/composition/probe/falsify.d.ts.map +1 -1
- package/dist/composition/probe/falsify.js +2 -0
- package/dist/composition/probe/falsify.js.map +1 -1
- package/dist/composition/probe/fit.d.ts +6 -0
- package/dist/composition/probe/fit.d.ts.map +1 -1
- package/dist/composition/probe/fit.js +46 -22
- package/dist/composition/probe/fit.js.map +1 -1
- package/dist/composition/probe/frontier.d.ts.map +1 -1
- package/dist/composition/probe/frontier.js +33 -15
- package/dist/composition/probe/frontier.js.map +1 -1
- package/dist/composition/probe/generator.d.ts +27 -1
- package/dist/composition/probe/generator.d.ts.map +1 -1
- package/dist/composition/probe/generator.js +53 -30
- package/dist/composition/probe/generator.js.map +1 -1
- package/dist/composition/probe/index.d.ts +14 -0
- package/dist/composition/probe/index.d.ts.map +1 -1
- package/dist/composition/probe/index.js +6 -0
- package/dist/composition/probe/index.js.map +1 -1
- package/dist/composition/probe/limits.d.ts +24 -1
- package/dist/composition/probe/limits.d.ts.map +1 -1
- package/dist/composition/probe/limits.js +53 -11
- package/dist/composition/probe/limits.js.map +1 -1
- package/dist/composition/probe/pipeline.d.ts.map +1 -1
- package/dist/composition/probe/pipeline.js +10 -4
- package/dist/composition/probe/pipeline.js.map +1 -1
- package/dist/composition/probe/power-law.d.ts +121 -0
- package/dist/composition/probe/power-law.d.ts.map +1 -0
- package/dist/composition/probe/power-law.js +255 -0
- package/dist/composition/probe/power-law.js.map +1 -0
- package/dist/composition/probe/problem.d.ts +7 -4
- package/dist/composition/probe/problem.d.ts.map +1 -1
- package/dist/composition/probe/problem.js +177 -49
- package/dist/composition/probe/problem.js.map +1 -1
- package/dist/composition/probe/report.js +1 -1
- package/dist/composition/probe/report.js.map +1 -1
- package/dist/composition/probe/residual.d.ts +6 -1
- package/dist/composition/probe/residual.d.ts.map +1 -1
- package/dist/composition/probe/residual.js +9 -7
- package/dist/composition/probe/residual.js.map +1 -1
- package/dist/composition/probe/structure.d.ts +82 -17
- package/dist/composition/probe/structure.d.ts.map +1 -1
- package/dist/composition/probe/structure.js +129 -55
- package/dist/composition/probe/structure.js.map +1 -1
- package/dist/composition/probe/study.d.ts +31 -9
- package/dist/composition/probe/study.d.ts.map +1 -1
- package/dist/composition/probe/study.js +236 -181
- package/dist/composition/probe/study.js.map +1 -1
- package/dist/composition/probe/t-tail.d.ts +17 -0
- package/dist/composition/probe/t-tail.d.ts.map +1 -0
- package/dist/composition/probe/t-tail.js +32 -0
- package/dist/composition/probe/t-tail.js.map +1 -0
- package/dist/composition/probe/types.d.ts +3 -0
- package/dist/composition/probe/types.d.ts.map +1 -1
- package/dist/composition/probe/types.js.map +1 -1
- package/dist/composition/proposed-bridges.d.ts +41 -10
- package/dist/composition/proposed-bridges.d.ts.map +1 -1
- package/dist/composition/proposed-bridges.js +100 -55
- package/dist/composition/proposed-bridges.js.map +1 -1
- package/dist/composition/quantity-clusters.d.ts +48 -0
- package/dist/composition/quantity-clusters.d.ts.map +1 -0
- package/dist/composition/quantity-clusters.js +98 -0
- package/dist/composition/quantity-clusters.js.map +1 -0
- package/dist/composition/rational-exponent.d.ts +40 -0
- package/dist/composition/rational-exponent.d.ts.map +1 -0
- package/dist/composition/rational-exponent.js +65 -0
- package/dist/composition/rational-exponent.js.map +1 -0
- package/dist/composition/representative-values.d.ts +22 -0
- package/dist/composition/representative-values.d.ts.map +1 -1
- package/dist/composition/representative-values.js +23 -0
- package/dist/composition/representative-values.js.map +1 -1
- package/dist/composition/retrodiction.d.ts.map +1 -1
- package/dist/composition/retrodiction.js +2 -1
- package/dist/composition/retrodiction.js.map +1 -1
- package/dist/composition/user-equation.d.ts.map +1 -1
- package/dist/composition/user-equation.js +2 -2
- package/dist/composition/user-equation.js.map +1 -1
- package/dist/core/assignment.d.ts +19 -0
- package/dist/core/assignment.d.ts.map +1 -0
- package/dist/core/assignment.js +19 -0
- package/dist/core/assignment.js.map +1 -0
- package/dist/core/compare.d.ts +32 -0
- package/dist/core/compare.d.ts.map +1 -0
- package/dist/core/compare.js +46 -0
- package/dist/core/compare.js.map +1 -0
- package/dist/core/constants.d.ts +30 -30
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/constants.js +47 -30
- package/dist/core/constants.js.map +1 -1
- package/dist/core/data-file.d.ts +7 -0
- package/dist/core/data-file.d.ts.map +1 -1
- package/dist/core/data-file.js +17 -0
- package/dist/core/data-file.js.map +1 -1
- package/dist/core/format.d.ts +36 -0
- package/dist/core/format.d.ts.map +1 -0
- package/dist/core/format.js +39 -0
- package/dist/core/format.js.map +1 -0
- package/dist/core/hash.d.ts +14 -0
- package/dist/core/hash.d.ts.map +1 -0
- package/dist/core/hash.js +17 -0
- package/dist/core/hash.js.map +1 -0
- package/dist/core/json-schema.d.ts +2 -0
- package/dist/core/json-schema.d.ts.map +1 -1
- package/dist/core/json-schema.js +14 -13
- package/dist/core/json-schema.js.map +1 -1
- package/dist/core/labeled-tensor.d.ts.map +1 -1
- package/dist/core/labeled-tensor.js +0 -8
- package/dist/core/labeled-tensor.js.map +1 -1
- package/dist/core/mathts-read.d.ts +25 -0
- package/dist/core/mathts-read.d.ts.map +1 -0
- package/dist/core/mathts-read.js +51 -0
- package/dist/core/mathts-read.js.map +1 -0
- package/dist/core/tensor.d.ts.map +1 -1
- package/dist/core/tensor.js +24 -0
- package/dist/core/tensor.js.map +1 -1
- package/dist/core/types.d.ts +5 -5
- package/dist/diff/bridge-gradient.d.ts +19 -6
- package/dist/diff/bridge-gradient.d.ts.map +1 -1
- package/dist/diff/bridge-gradient.js +19 -11
- package/dist/diff/bridge-gradient.js.map +1 -1
- package/dist/diff/bridge-specs.d.ts.map +1 -1
- package/dist/diff/bridge-specs.js +3 -0
- package/dist/diff/bridge-specs.js.map +1 -1
- package/dist/dimensional/algebra.d.ts +18 -0
- package/dist/dimensional/algebra.d.ts.map +1 -1
- package/dist/dimensional/algebra.js +41 -1
- package/dist/dimensional/algebra.js.map +1 -1
- package/dist/dimensional/ast-builders.d.ts +7 -0
- package/dist/dimensional/ast-builders.d.ts.map +1 -1
- package/dist/dimensional/ast-builders.js +11 -0
- package/dist/dimensional/ast-builders.js.map +1 -1
- package/dist/dimensional/ast-leaves.d.ts +81 -0
- package/dist/dimensional/ast-leaves.d.ts.map +1 -0
- package/dist/dimensional/ast-leaves.js +146 -0
- package/dist/dimensional/ast-leaves.js.map +1 -0
- package/dist/dimensional/buckingham.d.ts.map +1 -1
- package/dist/dimensional/buckingham.js +15 -27
- package/dist/dimensional/buckingham.js.map +1 -1
- package/dist/dimensional/constant-rows.js +9 -9
- package/dist/dimensional/constant-rows.js.map +1 -1
- package/dist/dimensional/dimension-inference.d.ts.map +1 -1
- package/dist/dimensional/dimension-inference.js +1 -2
- package/dist/dimensional/dimension-inference.js.map +1 -1
- package/dist/dimensional/errors.d.ts +1 -1
- package/dist/dimensional/errors.d.ts.map +1 -1
- package/dist/dimensional/errors.js +1 -15
- package/dist/dimensional/errors.js.map +1 -1
- package/dist/dimensional/exact-scale.d.ts +0 -17
- package/dist/dimensional/exact-scale.d.ts.map +1 -1
- package/dist/dimensional/exact-scale.js +8 -8
- package/dist/dimensional/exact-scale.js.map +1 -1
- package/dist/dimensional/gauge-field.d.ts.map +1 -1
- package/dist/dimensional/gauge-field.js +2 -2
- package/dist/dimensional/gauge-field.js.map +1 -1
- package/dist/dimensional/hyphen-names.d.ts +12 -2
- package/dist/dimensional/hyphen-names.d.ts.map +1 -1
- package/dist/dimensional/hyphen-names.js +44 -19
- package/dist/dimensional/hyphen-names.js.map +1 -1
- package/dist/dimensional/metric.d.ts.map +1 -1
- package/dist/dimensional/metric.js +0 -1
- package/dist/dimensional/metric.js.map +1 -1
- package/dist/dimensional/symbolic-constants.d.ts +9 -0
- package/dist/dimensional/symbolic-constants.d.ts.map +1 -1
- package/dist/dimensional/symbolic-constants.js +13 -1
- package/dist/dimensional/symbolic-constants.js.map +1 -1
- package/dist/dimensional/types.d.ts +36 -0
- package/dist/dimensional/types.d.ts.map +1 -1
- package/dist/dimensional/types.js +45 -7
- package/dist/dimensional/types.js.map +1 -1
- package/dist/dimensional/unit-data.js +2 -2
- package/dist/dimensional/unit-data.js.map +1 -1
- package/dist/index.d.ts +9 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/dist/numerical/christoffel-flat.d.ts.map +1 -1
- package/dist/numerical/christoffel-flat.js +3 -2
- package/dist/numerical/christoffel-flat.js.map +1 -1
- package/dist/numerical/covariant-eikonal.d.ts.map +1 -1
- package/dist/numerical/covariant-eikonal.js +34 -11
- package/dist/numerical/covariant-eikonal.js.map +1 -1
- package/dist/numerical/curvature-lowering-helpers.js +3 -2
- package/dist/numerical/curvature-lowering-helpers.js.map +1 -1
- package/dist/numerical/errors.d.ts.map +1 -1
- package/dist/numerical/errors.js +0 -3
- package/dist/numerical/errors.js.map +1 -1
- package/dist/numerical/finite-difference.d.ts +22 -0
- package/dist/numerical/finite-difference.d.ts.map +1 -0
- package/dist/numerical/finite-difference.js +27 -0
- package/dist/numerical/finite-difference.js.map +1 -0
- package/dist/numerical/geodesic-integrator.d.ts.map +1 -1
- package/dist/numerical/geodesic-integrator.js +22 -14
- package/dist/numerical/geodesic-integrator.js.map +1 -1
- package/dist/numerical/geometrized.d.ts.map +1 -1
- package/dist/numerical/geometrized.js +0 -1
- package/dist/numerical/geometrized.js.map +1 -1
- package/dist/numerical/mathts-engine.d.ts.map +1 -1
- package/dist/numerical/mathts-engine.js +10 -24
- package/dist/numerical/mathts-engine.js.map +1 -1
- package/dist/numerical/metric-inverse.d.ts.map +1 -1
- package/dist/numerical/metric-inverse.js +83 -46
- package/dist/numerical/metric-inverse.js.map +1 -1
- package/dist/numerical/null-ray-integrator.d.ts +2 -1
- package/dist/numerical/null-ray-integrator.d.ts.map +1 -1
- package/dist/numerical/null-ray-integrator.js +12 -12
- package/dist/numerical/null-ray-integrator.js.map +1 -1
- package/dist/numerical/painleve-gullstrand-metric.js +2 -2
- package/dist/numerical/painleve-gullstrand-metric.js.map +1 -1
- package/dist/numerical/perihelion-finder.d.ts +0 -36
- package/dist/numerical/perihelion-finder.d.ts.map +1 -1
- package/dist/numerical/perihelion-finder.js +41 -87
- package/dist/numerical/perihelion-finder.js.map +1 -1
- package/dist/numerical/quadrature.d.ts.map +1 -1
- package/dist/numerical/quadrature.js +8 -10
- package/dist/numerical/quadrature.js.map +1 -1
- package/dist/numerical/rk4-trajectory.d.ts +10 -0
- package/dist/numerical/rk4-trajectory.d.ts.map +1 -0
- package/dist/numerical/rk4-trajectory.js +37 -0
- package/dist/numerical/rk4-trajectory.js.map +1 -0
- package/dist/numerical/schwarzschild.d.ts +14 -0
- package/dist/numerical/schwarzschild.d.ts.map +1 -0
- package/dist/numerical/schwarzschild.js +17 -0
- package/dist/numerical/schwarzschild.js.map +1 -0
- package/dist/numerical/spacetime-metrics.d.ts +12 -0
- package/dist/numerical/spacetime-metrics.d.ts.map +1 -1
- package/dist/numerical/spacetime-metrics.js +72 -56
- package/dist/numerical/spacetime-metrics.js.map +1 -1
- package/dist/numerical/statistics.d.ts +24 -0
- package/dist/numerical/statistics.d.ts.map +1 -0
- package/dist/numerical/statistics.js +52 -0
- package/dist/numerical/statistics.js.map +1 -0
- package/dist/numerical/tensor-engine.d.ts +21 -0
- package/dist/numerical/tensor-engine.d.ts.map +1 -1
- package/dist/numerical/tensor-engine.js +12 -0
- package/dist/numerical/tensor-engine.js.map +1 -1
- package/dist/relations/regime.d.ts +10 -0
- package/dist/relations/regime.d.ts.map +1 -1
- package/dist/relations/regime.js +18 -1
- package/dist/relations/regime.js.map +1 -1
- package/package.json +7 -7
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The two-sided tail of Student's t, computed directly.
|
|
3
|
+
*
|
|
4
|
+
* MathTS `linearRegression.pValue` and `ols.pValues` are `2·(1 − studentTCDF)`
|
|
5
|
+
* and round a far tail to 0 (TOOLS.md), so a probe never consumes them. The
|
|
6
|
+
* tail here is the regularized incomplete beta `I_{ν/(ν+t²)}(ν/2, 1/2)`, MathTS
|
|
7
|
+
* `betainc`, which is the two-sided probability itself and resolves where
|
|
8
|
+
* `1 − CDF` cannot.
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* P(|T_ν| ≥ |t|) for Student's t with ν degrees of freedom: `I_{ν/(ν+t²)}(ν/2, 1/2)`.
|
|
14
|
+
* `t = 0` is 1, an infinite `t` is 0. @throws RangeError when ν is not positive. @internal
|
|
15
|
+
*/
|
|
16
|
+
export declare function studentTwoSidedP(t: number, df: number): number;
|
|
17
|
+
//# sourceMappingURL=t-tail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"t-tail.d.ts","sourceRoot":"","sources":["../../../src/composition/probe/t-tail.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAS9D"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The two-sided tail of Student's t, computed directly.
|
|
3
|
+
*
|
|
4
|
+
* MathTS `linearRegression.pValue` and `ols.pValues` are `2·(1 − studentTCDF)`
|
|
5
|
+
* and round a far tail to 0 (TOOLS.md), so a probe never consumes them. The
|
|
6
|
+
* tail here is the regularized incomplete beta `I_{ν/(ν+t²)}(ν/2, 1/2)`, MathTS
|
|
7
|
+
* `betainc`, which is the two-sided probability itself and resolves where
|
|
8
|
+
* `1 − CDF` cannot.
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
import { betainc } from '@danielsimonjr/mathts-functions';
|
|
13
|
+
/**
|
|
14
|
+
* P(|T_ν| ≥ |t|) for Student's t with ν degrees of freedom: `I_{ν/(ν+t²)}(ν/2, 1/2)`.
|
|
15
|
+
* `t = 0` is 1, an infinite `t` is 0. @throws RangeError when ν is not positive. @internal
|
|
16
|
+
*/
|
|
17
|
+
export function studentTwoSidedP(t, df) {
|
|
18
|
+
if (!(df > 0))
|
|
19
|
+
throw new RangeError('studentTwoSidedP: degrees of freedom must be positive');
|
|
20
|
+
if (Number.isNaN(t))
|
|
21
|
+
throw new RangeError('studentTwoSidedP: t is NaN');
|
|
22
|
+
if (t === 0)
|
|
23
|
+
return 1;
|
|
24
|
+
if (!Number.isFinite(t))
|
|
25
|
+
return 0;
|
|
26
|
+
const x = df / (df + t * t);
|
|
27
|
+
const v = betainc(df / 2, 0.5, x);
|
|
28
|
+
if (typeof v !== 'number')
|
|
29
|
+
throw new TypeError('betainc did not return a number for number arguments');
|
|
30
|
+
return Math.min(1, Math.max(0, v));
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=t-tail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"t-tail.js","sourceRoot":"","sources":["../../../src/composition/probe/t-tail.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAE1D;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,CAAS,EAAE,EAAU;IACpD,IAAI,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,uDAAuD,CAAC,CAAC;IAC7F,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,4BAA4B,CAAC,CAAC;IACxE,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IACtB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;QAAE,OAAO,CAAC,CAAC;IAClC,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,MAAM,CAAC,GAAY,OAAO,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;IAC3C,IAAI,OAAO,CAAC,KAAK,QAAQ;QAAE,MAAM,IAAI,SAAS,CAAC,sDAAsD,CAAC,CAAC;IACvG,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AACrC,CAAC","sourcesContent":["/**\n * The two-sided tail of Student's t, computed directly.\n *\n * MathTS `linearRegression.pValue` and `ols.pValues` are `2·(1 − studentTCDF)`\n * and round a far tail to 0 (TOOLS.md), so a probe never consumes them. The\n * tail here is the regularized incomplete beta `I_{ν/(ν+t²)}(ν/2, 1/2)`, MathTS\n * `betainc`, which is the two-sided probability itself and resolves where\n * `1 − CDF` cannot.\n *\n * @internal\n */\n\nimport { betainc } from '@danielsimonjr/mathts-functions';\n\n/**\n * P(|T_ν| ≥ |t|) for Student's t with ν degrees of freedom: `I_{ν/(ν+t²)}(ν/2, 1/2)`.\n * `t = 0` is 1, an infinite `t` is 0. @throws RangeError when ν is not positive. @internal\n */\nexport function studentTwoSidedP(t: number, df: number): number {\n if (!(df > 0)) throw new RangeError('studentTwoSidedP: degrees of freedom must be positive');\n if (Number.isNaN(t)) throw new RangeError('studentTwoSidedP: t is NaN');\n if (t === 0) return 1;\n if (!Number.isFinite(t)) return 0;\n const x = df / (df + t * t);\n const v: unknown = betainc(df / 2, 0.5, x);\n if (typeof v !== 'number') throw new TypeError('betainc did not return a number for number arguments');\n return Math.min(1, Math.max(0, v));\n}\n"]}
|
|
@@ -65,7 +65,10 @@ export interface IdentifiabilityAssessment {
|
|
|
65
65
|
readonly status: 'identifiable' | 'partially-identifiable' | 'non-identifiable' | 'unknown';
|
|
66
66
|
readonly rank?: number;
|
|
67
67
|
readonly nParameters?: number;
|
|
68
|
+
/** The rank of the log-design over the exploratory rows: what the rows can identify, not how many there are. */
|
|
68
69
|
readonly nIndependentObservations?: number;
|
|
70
|
+
/** The raw exploratory row count, under its own name. */
|
|
71
|
+
readonly nObservations?: number;
|
|
69
72
|
readonly reasons: readonly string[];
|
|
70
73
|
};
|
|
71
74
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/composition/probe/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE,sDAAsD;AACtD,eAAO,MAAM,cAAc,MAAM,CAAC;AAClC,iDAAiD;AACjD,eAAO,MAAM,oBAAoB,MAAiB,CAAC;AAEnD,iGAAiG;AACjG,MAAM,MAAM,oBAAoB,GAC5B,WAAW,GAAG,oBAAoB,GAAG,iBAAiB,GAAG,mBAAmB,GAC5E,wBAAwB,GAAG,wBAAwB,GAAG,UAAU,GAAG,WAAW,GAC9E,kBAAkB,GAAG,uBAAuB,CAAC;AAEjD,+EAA+E;AAC/E,MAAM,MAAM,YAAY,GACpB,YAAY,GAAG,oBAAoB,GAAG,iBAAiB,GAAG,eAAe,GACzE,oBAAoB,GAAG,2BAA2B,GAAG,yBAAyB,GAC9E,sBAAsB,GAAG,yBAAyB,CAAC;AAEvD,wDAAwD;AACxD,MAAM,MAAM,UAAU,GAClB,UAAU,GAAG,oBAAoB,GAAG,iBAAiB,GAAG,SAAS,GAAG,gBAAgB,CAAC;AAEzF,kEAAkE;AAClE,MAAM,MAAM,eAAe,GACvB,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,cAAc,GAAG,YAAY,GACrE,QAAQ,GAAG,QAAQ,GAAG,gBAAgB,GAAG,UAAU,GAAG,QAAQ,CAAC;A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AAW,EAAE,kBAAkB,CAAC;IACzC,QAAQ,CAAC,cAAc,EAAE,kBAAkB,CAAC;IAC5C,QAAQ,CAAC,iBAAiB,EAAE,kBAAkB,CAAC;CAChD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/composition/probe/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,sDAAsD;AACtD,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAC;AAClC,iDAAiD;AACjD,MAAM,CAAC,MAAM,oBAAoB,GAAG,cAAc,CAAC;AAsDnD,kDAAkD;AAClD,MAAM,CAAC,MAAM,qBAAqB,GAAiB;IACjD,aAAa,EAAE,IAAI;IACnB,WAAW,EAAE,CAAC;IACd,YAAY,EAAE,EAAE;IAChB,kBAAkB,EAAE,CAAC;IACrB,cAAc,EAAE,KAAK;IACrB,cAAc,EAAE,IAAI;IACpB,sBAAsB,EAAE,GAAG,GAAG,IAAI,GAAG,IAAI;IACzC,oBAAoB,EAAE,CAAC;CACxB,CAAC;AAEF,wFAAwF;AACxF,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC","sourcesContent":["/**\n * Product B (expression / residual search) experimental types.\n * Orthogonal to Product A quantity identification (`discovery.ts`).\n * Not re-exported from `src/index.ts`.\n *\n * @module composition/probe/types\n */\n\nimport type { Dimension } from '../../dimensional/types.js';\nimport type { ExprNode } from '../../dimensional/ast-types.js';\nimport type { IdentifiabilityResult } from '../identifiability.js';\n\n/** Experimental probe JSON schema major. @internal */\nexport const SCHEMA_VERSION = '0';\n/** Alias of {@link SCHEMA_VERSION}. @internal */\nexport const PROBE_SCHEMA_VERSION = SCHEMA_VERSION;\n\n/** Conservative Product B candidate lifecycle. Orthogonal to `AdjudicationVerdict`. @internal */\nexport type ProbeCandidateStatus =\n | 'generated' | 'structurally-valid' | 'empirically-fit' | 'heldout-supported'\n | 'falsification-survivor' | 'expert-review-required' | 'rejected' | 'falsified'\n | 'equivalent-known' | 'insufficient-evidence';\n\n/** Kind of a named scientific relation this overlay may point at. @internal */\nexport type RelationKind =\n | 'definition' | 'canonical-equation' | 'bridge-equation' | 'approximation'\n | 'effective-relation' | 'phenomenological-relation' | 'computational-predicate'\n | 'candidate-hypothesis' | 'quantity-identification';\n\n/** Audit completeness of a metadata claim. @internal */\nexport type AuditState =\n | 'verified' | 'partially-verified' | 'not-yet-audited' | 'unknown' | 'not-applicable';\n\n/** Mathematical meaning of a residual / discrepancy. @internal */\nexport type DiscrepancyKind =\n | 'additive' | 'relative' | 'log-ratio' | 'standardized' | 'likelihood'\n | 'vector' | 'tensor' | 'distributional' | 'operator' | 'custom';\n\n/** How a dataset may be used. Holdout must not influence generation. @internal */\nexport type DatasetRole =\n | 'exploratory-fit' | 'validation-holdout' | 'external-replication' | 'falsification-only';\n\n/** Why a bounded search terminated. `no-credible-candidate` is a success. @internal */\nexport type SearchStopReason =\n | 'exhausted-space' | 'candidate-limit' | 'evaluation-limit' | 'time-limit'\n | 'memory-limit' | 'cancelled' | 'sufficient-candidates' | 'non-identifiable'\n | 'no-credible-candidate';\n\n/** Typed frontier gap. `relation-link` wraps Product A; residual is Product B. @internal */\nexport type FrontierGapKind =\n | 'prediction-residual' | 'relation-link' | 'regime-transition' | 'parameter-tension'\n | 'assumption-conflict' | 'missing-operator' | 'unexplained-observation'\n | 'model-disagreement' | 'causal-mechanism' | 'other';\n\n/** Graph-structural vs parametric (Jacobian / design-matrix) identifiability. @internal */\nexport type IdentifiabilityKind = 'graph-structural' | 'parametric';\n\n/** Hard caps on a Product B search. No search is unbounded. @internal */\nexport interface SearchBudget {\n readonly maxCandidates: number;\n readonly maxAstDepth: number;\n readonly maxOperators: number;\n readonly maxDerivativeOrder: number;\n readonly maxEvaluations: number;\n readonly maxWallClockMs: number;\n readonly maxResidentMemoryBytes?: number;\n readonly maxExternalProcesses?: number;\n}\n\n/** Default native-enumerator budget. @internal */\nexport const DEFAULT_SEARCH_BUDGET: SearchBudget = {\n maxCandidates: 1000,\n maxAstDepth: 6,\n maxOperators: 12,\n maxDerivativeOrder: 2,\n maxEvaluations: 10000,\n maxWallClockMs: 5000,\n maxResidentMemoryBytes: 256 * 1024 * 1024,\n maxExternalProcesses: 1,\n};\n\n/** Relative holdout RMSE cap a candidate must meet when a run states none. @internal */\nexport const DEFAULT_HOLDOUT_TOL = 0.15;\n\n/** Explicit residual semantics for a run or correction. @internal */\nexport interface DiscrepancyDefinition {\n readonly kind: DiscrepancyKind;\n readonly observableIds: readonly string[];\n readonly covarianceRef?: string;\n readonly implementationRef?: string;\n}\n\n/** Pointer at an existing relation; not a registry. @internal */\nexport interface ScientificRelationRef {\n readonly kind: RelationKind;\n readonly id: string;\n}\n\n/** Identifiability of a gap — two different questions; do not translate. @internal */\nexport interface IdentifiabilityAssessment {\n readonly kind: IdentifiabilityKind;\n /** Product A / relation-link: reuse `classifyIdentifiability()`. */\n readonly graph?: IdentifiabilityResult;\n /** Product B: Jacobian / design-matrix rank vs locked observations. */\n readonly parametric?: {\n readonly status: 'identifiable' | 'partially-identifiable' | 'non-identifiable' | 'unknown';\n readonly rank?: number;\n readonly nParameters?: number;\n readonly nIndependentObservations?: number;\n readonly reasons: readonly string[];\n };\n}\n\n/** Whether an expensive search is even warranted. @internal */\nexport interface SearchabilityAssessment {\n readonly searchable: boolean;\n readonly reasons: readonly string[];\n}\n\n/** Human-readable gap evidence with source ids. @internal */\nexport interface GapEvidence {\n readonly summary: string;\n readonly sourceIds: readonly string[];\n}\n\n/** Typed scientific gap (`fg-*`). Most `relation-link` / regime gaps wrap Product A. @internal */\nexport interface FrontierGap {\n readonly id: string;\n readonly kind: FrontierGapKind;\n readonly participants: readonly ScientificRelationRef[];\n readonly observations: readonly string[];\n readonly regimes: readonly string[];\n readonly assumptions: readonly string[];\n readonly constraints: readonly string[];\n readonly discrepancy?: DiscrepancyDefinition;\n readonly evidence: GapEvidence;\n readonly identifiability: IdentifiabilityAssessment;\n readonly searchability: SearchabilityAssessment;\n readonly status: 'identified' | 'searchable' | 'underdetermined' | 'resolved' | 'retired';\n}\n\n/** How a probe candidate entered the store. @internal */\nexport type ProbeCandidateOrigin =\n | { readonly kind: 'grammar-enumerator'; readonly runId: string }\n | { readonly kind: 'external-backend'; readonly backendId: string; readonly runId: string }\n | { readonly kind: 'human-authored'; readonly source: string };\n\n/** Discriminated candidate payload. Identifications stay `VettedCandidate`. @internal */\nexport type ProbeCandidateBody =\n | { readonly kind: 'scalar-expr'; readonly expression: ExprNode }\n | {\n readonly kind: 'correction';\n readonly baselineRef: ScientificRelationRef;\n readonly correction: ExprNode;\n readonly discrepancy: DiscrepancyDefinition;\n };\n\n/** Append-only status transition. Reloading uses last `to`. @internal */\nexport interface StatusEvent {\n readonly at: string;\n readonly from: ProbeCandidateStatus | 'none';\n readonly to: ProbeCandidateStatus;\n readonly reason: string;\n readonly runId: string;\n}\n\n/** Cheap-to-strong fingerprint layers for equivalence / rejection. @internal */\nexport interface CandidateFingerprint {\n readonly syntaxHash: string;\n readonly canonicalAstHash: string;\n readonly dimensionalSignature: string;\n readonly regimeSignature: string;\n readonly assumptionSignature: string;\n}\n\n/** Parsimony / complexity of a candidate expression. @internal */\nexport interface ComplexityMetrics {\n readonly astNodes: number;\n readonly operators: number;\n readonly freeParameters: number;\n readonly derivativeOrder: number;\n readonly tensorRank?: number;\n readonly descriptionLength?: number;\n}\n\n/** Persisted Product B candidate (`h-*`). Status is the last history `to`. @internal */\nexport interface ProbeCandidateRecord {\n readonly id: string;\n readonly gapId: string;\n readonly body: ProbeCandidateBody;\n readonly origin: ProbeCandidateOrigin;\n readonly assumptions: readonly string[];\n readonly status: ProbeCandidateStatus;\n readonly statusHistory: readonly StatusEvent[];\n readonly evaluations: readonly string[];\n readonly fingerprint: CandidateFingerprint;\n readonly complexity: ComplexityMetrics;\n readonly schemaVersion: string;\n}\n\n/** Negative-result memory keyed by fingerprint + evaluation context. @internal */\nexport interface ProbeRejectionRecord {\n readonly fingerprint: CandidateFingerprint;\n readonly reason: string;\n readonly counterexample?: {\n readonly predicted: number;\n readonly expected: number;\n readonly tolerance: number;\n readonly point: Readonly<Record<string, number>>;\n };\n readonly context: string;\n readonly timestamp: string;\n}\n\n/** Untrusted worker identity. Capabilities are opaque strings. @internal */\nexport interface DiscoveryBackendDescriptor {\n readonly protocolVersion: string;\n readonly backendId: string;\n readonly backendVersion: string;\n readonly capabilities: readonly string[];\n readonly deterministic: 'yes' | 'seeded' | 'no' | 'unknown';\n}\n\n/** Host environment captured in a run manifest. @internal */\nexport interface EnvironmentFingerprint {\n readonly node: string;\n readonly platform: string;\n readonly arch: string;\n}\n\n/** Declared source of non-bitwise reproducibility. @internal */\nexport interface NondeterminismSource {\n readonly kind: string;\n readonly detail: string;\n}\n\n/** Reproducible Product B search artifact (`dr-*`). @internal */\nexport interface DiscoveryRunManifest {\n readonly schemaVersion: string;\n readonly runId: string;\n readonly repositoryCommit: string;\n readonly problemHash: string;\n readonly datasetHashes: readonly string[];\n readonly backendDescriptors: readonly DiscoveryBackendDescriptor[];\n readonly randomSeeds: Readonly<Record<string, string | number>>;\n readonly tolerances: Readonly<Record<string, number>>;\n readonly environment: EnvironmentFingerprint;\n readonly searchBudget: SearchBudget;\n readonly startedAt: string;\n readonly completedAt?: string;\n readonly stopReason?: SearchStopReason;\n readonly nondeterminism: readonly NondeterminismSource[];\n}\n\n/** Named SI-dimensioned variable in a search problem. @internal */\nexport interface DimensionalVariableRef {\n readonly name: string;\n readonly dim: Dimension;\n}\n\n/** One numeric observation keyed by variable name. @internal */\nexport type ObservationRow = Readonly<Record<string, number>>;\n\n/** In-memory probe dataset. Not a rewrite of `upt confront` observations. @internal */\nexport interface ProbeDataset {\n readonly id: string;\n readonly role: DatasetRole;\n readonly rows: readonly ObservationRow[];\n readonly observable: string;\n readonly sigma?: number;\n readonly schemaVersion: string;\n}\n\n/** Inputs to a bounded Product B search. @internal */\nexport interface SearchProblem {\n readonly gap: FrontierGap;\n readonly target: DimensionalVariableRef;\n readonly governing: readonly DimensionalVariableRef[];\n readonly exploratory?: ProbeDataset;\n readonly holdout?: ProbeDataset;\n readonly baseline?: ExprNode;\n readonly discrepancy?: DiscrepancyDefinition;\n readonly assumptions?: readonly string[];\n readonly regimeSignature?: string;\n /** Declared limits; failed limits are fatal only in a claimed domain. */\n readonly limits?: readonly DeclaredLimit[];\n /** Regime the candidate claims, used for limit fatality. */\n readonly claimedRegimes?: Readonly<Record<string, string>>;\n readonly observationalBoundIds?: readonly string[];\n}\n\n/** Named regime restriction a candidate may claim. @internal */\nexport interface DeclaredLimit {\n readonly id: string;\n readonly regime: Readonly<Record<string, string>>;\n readonly description?: string;\n}\n\n/** One falsification battery name. @internal */\nexport type FalsificationBattery =\n | 'dimensional'\n | 'finiteness'\n | 'limits';\n\n/** Outcome of one falsification battery. @internal */\nexport interface FalsificationRecord {\n readonly battery: FalsificationBattery;\n readonly outcome: 'pass' | 'fail' | 'inconclusive';\n readonly detail: string;\n}\n\n/** Optional overlay metadata — not a registry, not imported by `canonical/`. @internal */\nexport interface ScientificRelationRecord {\n readonly ref: ScientificRelationRef;\n readonly evidence?: EvidenceProfile;\n readonly audit?: AuditState;\n readonly notes?: string;\n}\n\n/** Pareto scores on [0, 1]; not a single magic ranking. @internal */\nexport interface ScoreVector {\n readonly validity: number;\n readonly empirical: number;\n readonly parsimony: number;\n readonly corpusDistance: number;\n readonly robustness: number;\n}\n\n/** One evidence axis. Never a substitute for a quantitative residual. @internal */\nexport interface EvidenceAssessment {\n readonly state: 'supported' | 'mixed' | 'unsupported' | 'unknown' | 'not-applicable';\n readonly rationale?: string;\n readonly sourceIds?: readonly string[];\n}\n\n/** Vector evidence profile for overlay metadata. @internal */\nexport interface EvidenceProfile {\n readonly theoretical: EvidenceAssessment;\n readonly empirical: EvidenceAssessment;\n readonly replication: EvidenceAssessment;\n readonly regimeCoverage: EvidenceAssessment;\n readonly provenanceQuality: EvidenceAssessment;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/composition/probe/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,sDAAsD;AACtD,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAC;AAClC,iDAAiD;AACjD,MAAM,CAAC,MAAM,oBAAoB,GAAG,cAAc,CAAC;AAsDnD,kDAAkD;AAClD,MAAM,CAAC,MAAM,qBAAqB,GAAiB;IACjD,aAAa,EAAE,IAAI;IACnB,WAAW,EAAE,CAAC;IACd,YAAY,EAAE,EAAE;IAChB,kBAAkB,EAAE,CAAC;IACrB,cAAc,EAAE,KAAK;IACrB,cAAc,EAAE,IAAI;IACpB,sBAAsB,EAAE,GAAG,GAAG,IAAI,GAAG,IAAI;IACzC,oBAAoB,EAAE,CAAC;CACxB,CAAC;AAEF,wFAAwF;AACxF,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC","sourcesContent":["/**\n * Product B (expression / residual search) experimental types.\n * Orthogonal to Product A quantity identification (`discovery.ts`).\n * Not re-exported from `src/index.ts`.\n *\n * @module composition/probe/types\n */\n\nimport type { Dimension } from '../../dimensional/types.js';\nimport type { ExprNode } from '../../dimensional/ast-types.js';\nimport type { IdentifiabilityResult } from '../identifiability.js';\n\n/** Experimental probe JSON schema major. @internal */\nexport const SCHEMA_VERSION = '0';\n/** Alias of {@link SCHEMA_VERSION}. @internal */\nexport const PROBE_SCHEMA_VERSION = SCHEMA_VERSION;\n\n/** Conservative Product B candidate lifecycle. Orthogonal to `AdjudicationVerdict`. @internal */\nexport type ProbeCandidateStatus =\n | 'generated' | 'structurally-valid' | 'empirically-fit' | 'heldout-supported'\n | 'falsification-survivor' | 'expert-review-required' | 'rejected' | 'falsified'\n | 'equivalent-known' | 'insufficient-evidence';\n\n/** Kind of a named scientific relation this overlay may point at. @internal */\nexport type RelationKind =\n | 'definition' | 'canonical-equation' | 'bridge-equation' | 'approximation'\n | 'effective-relation' | 'phenomenological-relation' | 'computational-predicate'\n | 'candidate-hypothesis' | 'quantity-identification';\n\n/** Audit completeness of a metadata claim. @internal */\nexport type AuditState =\n | 'verified' | 'partially-verified' | 'not-yet-audited' | 'unknown' | 'not-applicable';\n\n/** Mathematical meaning of a residual / discrepancy. @internal */\nexport type DiscrepancyKind =\n | 'additive' | 'relative' | 'log-ratio' | 'standardized' | 'likelihood'\n | 'vector' | 'tensor' | 'distributional' | 'operator' | 'custom';\n\n/** How a dataset may be used. Holdout must not influence generation. @internal */\nexport type DatasetRole =\n | 'exploratory-fit' | 'validation-holdout' | 'external-replication' | 'falsification-only';\n\n/** Why a bounded search terminated. `no-credible-candidate` is a success. @internal */\nexport type SearchStopReason =\n | 'exhausted-space' | 'candidate-limit' | 'evaluation-limit' | 'time-limit'\n | 'memory-limit' | 'cancelled' | 'sufficient-candidates' | 'non-identifiable'\n | 'no-credible-candidate';\n\n/** Typed frontier gap. `relation-link` wraps Product A; residual is Product B. @internal */\nexport type FrontierGapKind =\n | 'prediction-residual' | 'relation-link' | 'regime-transition' | 'parameter-tension'\n | 'assumption-conflict' | 'missing-operator' | 'unexplained-observation'\n | 'model-disagreement' | 'causal-mechanism' | 'other';\n\n/** Graph-structural vs parametric (Jacobian / design-matrix) identifiability. @internal */\nexport type IdentifiabilityKind = 'graph-structural' | 'parametric';\n\n/** Hard caps on a Product B search. No search is unbounded. @internal */\nexport interface SearchBudget {\n readonly maxCandidates: number;\n readonly maxAstDepth: number;\n readonly maxOperators: number;\n readonly maxDerivativeOrder: number;\n readonly maxEvaluations: number;\n readonly maxWallClockMs: number;\n readonly maxResidentMemoryBytes?: number;\n readonly maxExternalProcesses?: number;\n}\n\n/** Default native-enumerator budget. @internal */\nexport const DEFAULT_SEARCH_BUDGET: SearchBudget = {\n maxCandidates: 1000,\n maxAstDepth: 6,\n maxOperators: 12,\n maxDerivativeOrder: 2,\n maxEvaluations: 10000,\n maxWallClockMs: 5000,\n maxResidentMemoryBytes: 256 * 1024 * 1024,\n maxExternalProcesses: 1,\n};\n\n/** Relative holdout RMSE cap a candidate must meet when a run states none. @internal */\nexport const DEFAULT_HOLDOUT_TOL = 0.15;\n\n/** Explicit residual semantics for a run or correction. @internal */\nexport interface DiscrepancyDefinition {\n readonly kind: DiscrepancyKind;\n readonly observableIds: readonly string[];\n readonly covarianceRef?: string;\n readonly implementationRef?: string;\n}\n\n/** Pointer at an existing relation; not a registry. @internal */\nexport interface ScientificRelationRef {\n readonly kind: RelationKind;\n readonly id: string;\n}\n\n/** Identifiability of a gap — two different questions; do not translate. @internal */\nexport interface IdentifiabilityAssessment {\n readonly kind: IdentifiabilityKind;\n /** Product A / relation-link: reuse `classifyIdentifiability()`. */\n readonly graph?: IdentifiabilityResult;\n /** Product B: Jacobian / design-matrix rank vs locked observations. */\n readonly parametric?: {\n readonly status: 'identifiable' | 'partially-identifiable' | 'non-identifiable' | 'unknown';\n readonly rank?: number;\n readonly nParameters?: number;\n /** The rank of the log-design over the exploratory rows: what the rows can identify, not how many there are. */\n readonly nIndependentObservations?: number;\n /** The raw exploratory row count, under its own name. */\n readonly nObservations?: number;\n readonly reasons: readonly string[];\n };\n}\n\n/** Whether an expensive search is even warranted. @internal */\nexport interface SearchabilityAssessment {\n readonly searchable: boolean;\n readonly reasons: readonly string[];\n}\n\n/** Human-readable gap evidence with source ids. @internal */\nexport interface GapEvidence {\n readonly summary: string;\n readonly sourceIds: readonly string[];\n}\n\n/** Typed scientific gap (`fg-*`). Most `relation-link` / regime gaps wrap Product A. @internal */\nexport interface FrontierGap {\n readonly id: string;\n readonly kind: FrontierGapKind;\n readonly participants: readonly ScientificRelationRef[];\n readonly observations: readonly string[];\n readonly regimes: readonly string[];\n readonly assumptions: readonly string[];\n readonly constraints: readonly string[];\n readonly discrepancy?: DiscrepancyDefinition;\n readonly evidence: GapEvidence;\n readonly identifiability: IdentifiabilityAssessment;\n readonly searchability: SearchabilityAssessment;\n readonly status: 'identified' | 'searchable' | 'underdetermined' | 'resolved' | 'retired';\n}\n\n/** How a probe candidate entered the store. @internal */\nexport type ProbeCandidateOrigin =\n | { readonly kind: 'grammar-enumerator'; readonly runId: string }\n | { readonly kind: 'external-backend'; readonly backendId: string; readonly runId: string }\n | { readonly kind: 'human-authored'; readonly source: string };\n\n/** Discriminated candidate payload. Identifications stay `VettedCandidate`. @internal */\nexport type ProbeCandidateBody =\n | { readonly kind: 'scalar-expr'; readonly expression: ExprNode }\n | {\n readonly kind: 'correction';\n readonly baselineRef: ScientificRelationRef;\n readonly correction: ExprNode;\n readonly discrepancy: DiscrepancyDefinition;\n };\n\n/** Append-only status transition. Reloading uses last `to`. @internal */\nexport interface StatusEvent {\n readonly at: string;\n readonly from: ProbeCandidateStatus | 'none';\n readonly to: ProbeCandidateStatus;\n readonly reason: string;\n readonly runId: string;\n}\n\n/** Cheap-to-strong fingerprint layers for equivalence / rejection. @internal */\nexport interface CandidateFingerprint {\n readonly syntaxHash: string;\n readonly canonicalAstHash: string;\n readonly dimensionalSignature: string;\n readonly regimeSignature: string;\n readonly assumptionSignature: string;\n}\n\n/** Parsimony / complexity of a candidate expression. @internal */\nexport interface ComplexityMetrics {\n readonly astNodes: number;\n readonly operators: number;\n readonly freeParameters: number;\n readonly derivativeOrder: number;\n readonly tensorRank?: number;\n readonly descriptionLength?: number;\n}\n\n/** Persisted Product B candidate (`h-*`). Status is the last history `to`. @internal */\nexport interface ProbeCandidateRecord {\n readonly id: string;\n readonly gapId: string;\n readonly body: ProbeCandidateBody;\n readonly origin: ProbeCandidateOrigin;\n readonly assumptions: readonly string[];\n readonly status: ProbeCandidateStatus;\n readonly statusHistory: readonly StatusEvent[];\n readonly evaluations: readonly string[];\n readonly fingerprint: CandidateFingerprint;\n readonly complexity: ComplexityMetrics;\n readonly schemaVersion: string;\n}\n\n/** Negative-result memory keyed by fingerprint + evaluation context. @internal */\nexport interface ProbeRejectionRecord {\n readonly fingerprint: CandidateFingerprint;\n readonly reason: string;\n readonly counterexample?: {\n readonly predicted: number;\n readonly expected: number;\n readonly tolerance: number;\n readonly point: Readonly<Record<string, number>>;\n };\n readonly context: string;\n readonly timestamp: string;\n}\n\n/** Untrusted worker identity. Capabilities are opaque strings. @internal */\nexport interface DiscoveryBackendDescriptor {\n readonly protocolVersion: string;\n readonly backendId: string;\n readonly backendVersion: string;\n readonly capabilities: readonly string[];\n readonly deterministic: 'yes' | 'seeded' | 'no' | 'unknown';\n}\n\n/** Host environment captured in a run manifest. @internal */\nexport interface EnvironmentFingerprint {\n readonly node: string;\n readonly platform: string;\n readonly arch: string;\n}\n\n/** Declared source of non-bitwise reproducibility. @internal */\nexport interface NondeterminismSource {\n readonly kind: string;\n readonly detail: string;\n}\n\n/** Reproducible Product B search artifact (`dr-*`). @internal */\nexport interface DiscoveryRunManifest {\n readonly schemaVersion: string;\n readonly runId: string;\n readonly repositoryCommit: string;\n readonly problemHash: string;\n readonly datasetHashes: readonly string[];\n readonly backendDescriptors: readonly DiscoveryBackendDescriptor[];\n readonly randomSeeds: Readonly<Record<string, string | number>>;\n readonly tolerances: Readonly<Record<string, number>>;\n readonly environment: EnvironmentFingerprint;\n readonly searchBudget: SearchBudget;\n readonly startedAt: string;\n readonly completedAt?: string;\n readonly stopReason?: SearchStopReason;\n readonly nondeterminism: readonly NondeterminismSource[];\n}\n\n/** Named SI-dimensioned variable in a search problem. @internal */\nexport interface DimensionalVariableRef {\n readonly name: string;\n readonly dim: Dimension;\n}\n\n/** One numeric observation keyed by variable name. @internal */\nexport type ObservationRow = Readonly<Record<string, number>>;\n\n/** In-memory probe dataset. Not a rewrite of `upt confront` observations. @internal */\nexport interface ProbeDataset {\n readonly id: string;\n readonly role: DatasetRole;\n readonly rows: readonly ObservationRow[];\n readonly observable: string;\n readonly sigma?: number;\n readonly schemaVersion: string;\n}\n\n/** Inputs to a bounded Product B search. @internal */\nexport interface SearchProblem {\n readonly gap: FrontierGap;\n readonly target: DimensionalVariableRef;\n readonly governing: readonly DimensionalVariableRef[];\n readonly exploratory?: ProbeDataset;\n readonly holdout?: ProbeDataset;\n readonly baseline?: ExprNode;\n readonly discrepancy?: DiscrepancyDefinition;\n readonly assumptions?: readonly string[];\n readonly regimeSignature?: string;\n /** Declared limits; failed limits are fatal only in a claimed domain. */\n readonly limits?: readonly DeclaredLimit[];\n /** Regime the candidate claims, used for limit fatality. */\n readonly claimedRegimes?: Readonly<Record<string, string>>;\n readonly observationalBoundIds?: readonly string[];\n}\n\n/** Named regime restriction a candidate may claim. @internal */\nexport interface DeclaredLimit {\n readonly id: string;\n readonly regime: Readonly<Record<string, string>>;\n readonly description?: string;\n}\n\n/** One falsification battery name. @internal */\nexport type FalsificationBattery =\n | 'dimensional'\n | 'finiteness'\n | 'limits';\n\n/** Outcome of one falsification battery. @internal */\nexport interface FalsificationRecord {\n readonly battery: FalsificationBattery;\n readonly outcome: 'pass' | 'fail' | 'inconclusive';\n readonly detail: string;\n}\n\n/** Optional overlay metadata — not a registry, not imported by `canonical/`. @internal */\nexport interface ScientificRelationRecord {\n readonly ref: ScientificRelationRef;\n readonly evidence?: EvidenceProfile;\n readonly audit?: AuditState;\n readonly notes?: string;\n}\n\n/** Pareto scores on [0, 1]; not a single magic ranking. @internal */\nexport interface ScoreVector {\n readonly validity: number;\n readonly empirical: number;\n readonly parsimony: number;\n readonly corpusDistance: number;\n readonly robustness: number;\n}\n\n/** One evidence axis. Never a substitute for a quantitative residual. @internal */\nexport interface EvidenceAssessment {\n readonly state: 'supported' | 'mixed' | 'unsupported' | 'unknown' | 'not-applicable';\n readonly rationale?: string;\n readonly sourceIds?: readonly string[];\n}\n\n/** Vector evidence profile for overlay metadata. @internal */\nexport interface EvidenceProfile {\n readonly theoretical: EvidenceAssessment;\n readonly empirical: EvidenceAssessment;\n readonly replication: EvidenceAssessment;\n readonly regimeCoverage: EvidenceAssessment;\n readonly provenanceQuality: EvidenceAssessment;\n}\n"]}
|
|
@@ -30,17 +30,24 @@
|
|
|
30
30
|
*
|
|
31
31
|
* @module composition/proposed-bridges
|
|
32
32
|
*/
|
|
33
|
+
import { Fraction } from '@danielsimonjr/mathts-core';
|
|
33
34
|
import type { ExprNode } from '../dimensional/validator.js';
|
|
34
35
|
import type { Dimension } from '../dimensional/types.js';
|
|
35
36
|
import type { DimensionalVariable } from '../dimensional/buckingham.js';
|
|
36
37
|
import type { BridgeEquationStatus } from '../bridges/index.js';
|
|
37
38
|
import type { KnownIssue } from '../bridges/index.js';
|
|
38
39
|
import type { VettedCandidate } from './discovery.js';
|
|
39
|
-
/**
|
|
40
|
-
*
|
|
41
|
-
|
|
40
|
+
/**
|
|
41
|
+
* A flat monomial: leaf name → its dimension and signed exact exponent.
|
|
42
|
+
* `k_B·T·ln2 / h` ⇒ {k_B:+1, T:+1, ln2:+1, h:-1}. The exponent is a core
|
|
43
|
+
* `Fraction`, so solving for a cubed leaf carries `1/3`, not
|
|
44
|
+
* `0.3333333333333333`, and a cancellation is an exact zero.
|
|
45
|
+
*
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
export type Mono = Map<string, {
|
|
42
49
|
dim: Dimension;
|
|
43
|
-
exp:
|
|
50
|
+
exp: Fraction;
|
|
44
51
|
}>;
|
|
45
52
|
/** Thrown when an AST is not a product / quotient / integer-power of symbols. @internal */
|
|
46
53
|
export declare class NotAMonomialError extends Error {
|
|
@@ -55,7 +62,15 @@ export declare class NotAMonomialError extends Error {
|
|
|
55
62
|
*/
|
|
56
63
|
export declare function toMonomial(ast: ExprNode): Mono;
|
|
57
64
|
/** Rebuild a flat-monomial `ExprNode` from a leaf→exponent map (numerator =
|
|
58
|
-
* positive exponents, denominator = negative). Zero exponents drop out.
|
|
65
|
+
* positive exponents, denominator = negative). Zero exponents drop out. The
|
|
66
|
+
* exponent literal is the double built from the fraction (`1/3` is written
|
|
67
|
+
* `0.3333333333333333`), so one rational is always one spelling.
|
|
68
|
+
*
|
|
69
|
+
* This is not merged with `monomialToExpr` (composition/probe/generator.ts),
|
|
70
|
+
* which writes one product with negative exponents in code-unit name order;
|
|
71
|
+
* this one orders names by `localeCompare` and splits a quotient. The
|
|
72
|
+
* proposals' printed formulas and the IC dedup key read this tree, so one
|
|
73
|
+
* builder would move them. Both build each factor with `symbolPower`.
|
|
59
74
|
* @internal */
|
|
60
75
|
export declare function fromMonomial(m: Mono): ExprNode;
|
|
61
76
|
/**
|
|
@@ -98,6 +113,21 @@ export interface ProposedBridge {
|
|
|
98
113
|
* free `governing` leaves (e.g. `{ T: 300 }`). */
|
|
99
114
|
evaluate(values: Readonly<Record<string, number>>): number;
|
|
100
115
|
}
|
|
116
|
+
/** One leaf of a monomial with its exact exponent. @internal */
|
|
117
|
+
export interface MonoLeaf {
|
|
118
|
+
readonly name: string;
|
|
119
|
+
readonly dim: Dimension;
|
|
120
|
+
readonly exp: Fraction;
|
|
121
|
+
}
|
|
122
|
+
/** The LaTeX of a monomial, exponents rendered from their fractions (`y^{1/3}`). @internal */
|
|
123
|
+
export declare function latexFromMono(m: Mono): string;
|
|
124
|
+
/**
|
|
125
|
+
* Isolate `solveFor` from `m1 = m2`: `solveFor^e = m1 / (m2 without solveFor)`,
|
|
126
|
+
* every exponent divided by `e`, exactly. `m2` must hold `solveFor`.
|
|
127
|
+
*
|
|
128
|
+
* @internal
|
|
129
|
+
*/
|
|
130
|
+
export declare function isolateLeaf(m1: Mono, m2: Mono, solveFor: MonoLeaf): Mono;
|
|
101
131
|
/**
|
|
102
132
|
* An admissible source for the elimination: a target name backed by a flat
|
|
103
133
|
* monomial `scalarAst` whose prefactor is a closed constant. Canonical equations
|
|
@@ -144,11 +174,12 @@ export declare function resolveSources(name: string): EquationSource[];
|
|
|
144
174
|
export declare function deriveProposedBridges(candidates?: readonly VettedCandidate[]): readonly ProposedBridge[];
|
|
145
175
|
/**
|
|
146
176
|
* Collapse proposals that derive the SAME relation — equal `normalForm` (up to
|
|
147
|
-
* dimensionless constants) AND equal target dimension —
|
|
148
|
-
* the others' identifications in
|
|
149
|
-
* collapse (e.g. Landauer's dropped
|
|
150
|
-
*
|
|
151
|
-
* produce (Design §9 #2).
|
|
177
|
+
* dimensionless constants) of the exact monomial AND equal target dimension —
|
|
178
|
+
* into the first, recording the others' identifications in
|
|
179
|
+
* `alsoDerivableFrom`. Distinct stubs do NOT collapse (e.g. Landauer's dropped
|
|
180
|
+
* `ln2` vs an operator stub hash differently), so this only merges genuine
|
|
181
|
+
* structural twins that a wider candidate scope can produce (Design §9 #2).
|
|
182
|
+
* Deterministic: input order is preserved.
|
|
152
183
|
*
|
|
153
184
|
* @internal
|
|
154
185
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proposed-bridges.d.ts","sourceRoot":"","sources":["../../src/composition/proposed-bridges.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAG5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAGzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"proposed-bridges.d.ts","sourceRoot":"","sources":["../../src/composition/proposed-bridges.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAG5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAGzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAQtD,OAAO,KA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E,CAAC;IAC7C,QAAQ,CAAC,WAAW,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;IACpD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAaD,yFAAyF;AACzF,wBAAgB,eAAe,CAAC,CAAC,EAAE,cAAc,GAAG,mBAAmB,CA6CtE;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,mBAAmB,EACb,CAAC"}
|
|
@@ -30,19 +30,26 @@
|
|
|
30
30
|
*
|
|
31
31
|
* @module composition/proposed-bridges
|
|
32
32
|
*/
|
|
33
|
+
import { Fraction } from '@danielsimonjr/mathts-core';
|
|
33
34
|
import { validate } from '../dimensional/validator.js';
|
|
34
|
-
import { sym } from '../dimensional/ast-builders.js';
|
|
35
|
+
import { sym, symbolPower } from '../dimensional/ast-builders.js';
|
|
35
36
|
import { DIMENSIONLESS } from '../dimensional/types.js';
|
|
36
37
|
import { equals, format } from '../dimensional/algebra.js';
|
|
37
38
|
import { canonicalByTarget, canonicalById } from '../canonical/registry.js';
|
|
38
39
|
import { BRIDGE_EQUATIONS } from '../bridges/index.js';
|
|
39
40
|
import { catalogIdNumber } from '../bridges/catalog-load.js';
|
|
40
41
|
import { normalForm } from '../canonical/normal-form.js';
|
|
41
|
-
import {
|
|
42
|
+
import { isRegisteredConstant } from '../dimensional/symbolic-constants.js';
|
|
43
|
+
import { forEachScalarLeaf, isDecimalLiteral, mapScalarLeaves } from '../dimensional/ast-leaves.js';
|
|
42
44
|
import { evalExpr } from './expr-eval.js';
|
|
43
45
|
import { rankDiscoveries } from './discovery.js';
|
|
44
46
|
import { CANONICAL_GRAPH } from './canonical-graph.js';
|
|
45
47
|
import { CATALOG_GRAPH } from './catalog-graph.js';
|
|
48
|
+
import { rationalExponentOf } from './formula-shape.js';
|
|
49
|
+
import { equalUpToConstant } from './algebraic-equivalence.js';
|
|
50
|
+
import { formatRational, fractionToNumber } from './rational-exponent.js';
|
|
51
|
+
const ONE = new Fraction(1);
|
|
52
|
+
const MINUS_ONE = new Fraction(-1);
|
|
46
53
|
/** Thrown when an AST is not a product / quotient / integer-power of symbols. @internal */
|
|
47
54
|
export class NotAMonomialError extends Error {
|
|
48
55
|
constructor(message) {
|
|
@@ -54,13 +61,13 @@ function mergeInto(into, from, scale) {
|
|
|
54
61
|
for (const [name, { dim, exp }] of from) {
|
|
55
62
|
const cur = into.get(name);
|
|
56
63
|
if (cur === undefined) {
|
|
57
|
-
into.set(name, { dim, exp: exp
|
|
64
|
+
into.set(name, { dim, exp: exp.multiply(scale) });
|
|
58
65
|
}
|
|
59
66
|
else {
|
|
60
67
|
if (!equals(cur.dim, dim)) {
|
|
61
68
|
throw new NotAMonomialError(`leaf '${name}' appears with inconsistent dimensions`);
|
|
62
69
|
}
|
|
63
|
-
cur.exp
|
|
70
|
+
cur.exp = cur.exp.add(exp.multiply(scale));
|
|
64
71
|
}
|
|
65
72
|
}
|
|
66
73
|
}
|
|
@@ -75,19 +82,19 @@ export function toMonomial(ast) {
|
|
|
75
82
|
const out = new Map();
|
|
76
83
|
switch (ast.kind) {
|
|
77
84
|
case 'symbol':
|
|
78
|
-
out.set(ast.name, { dim: ast.dim, exp:
|
|
85
|
+
out.set(ast.name, { dim: ast.dim, exp: ONE });
|
|
79
86
|
return out;
|
|
80
87
|
case 'op':
|
|
81
88
|
switch (ast.op) {
|
|
82
89
|
case '*':
|
|
83
90
|
for (const a of ast.args)
|
|
84
|
-
mergeInto(out, toMonomial(a),
|
|
91
|
+
mergeInto(out, toMonomial(a), ONE);
|
|
85
92
|
return out;
|
|
86
93
|
case '/': {
|
|
87
94
|
const [num, ...dens] = ast.args;
|
|
88
|
-
mergeInto(out, toMonomial(num),
|
|
95
|
+
mergeInto(out, toMonomial(num), ONE);
|
|
89
96
|
for (const d of dens)
|
|
90
|
-
mergeInto(out, toMonomial(d),
|
|
97
|
+
mergeInto(out, toMonomial(d), MINUS_ONE);
|
|
91
98
|
return out;
|
|
92
99
|
}
|
|
93
100
|
case '^': {
|
|
@@ -95,8 +102,8 @@ export function toMonomial(ast) {
|
|
|
95
102
|
if (expNode.kind !== 'symbol') {
|
|
96
103
|
throw new NotAMonomialError('non-literal exponent');
|
|
97
104
|
}
|
|
98
|
-
const n =
|
|
99
|
-
if (
|
|
105
|
+
const n = rationalExponentOf(expNode.name);
|
|
106
|
+
if (n === undefined) {
|
|
100
107
|
throw new NotAMonomialError(`non-numeric exponent '${expNode.name}'`);
|
|
101
108
|
}
|
|
102
109
|
mergeInto(out, toMonomial(base), n);
|
|
@@ -110,21 +117,27 @@ export function toMonomial(ast) {
|
|
|
110
117
|
}
|
|
111
118
|
}
|
|
112
119
|
/** Rebuild a flat-monomial `ExprNode` from a leaf→exponent map (numerator =
|
|
113
|
-
* positive exponents, denominator = negative). Zero exponents drop out.
|
|
120
|
+
* positive exponents, denominator = negative). Zero exponents drop out. The
|
|
121
|
+
* exponent literal is the double built from the fraction (`1/3` is written
|
|
122
|
+
* `0.3333333333333333`), so one rational is always one spelling.
|
|
123
|
+
*
|
|
124
|
+
* This is not merged with `monomialToExpr` (composition/probe/generator.ts),
|
|
125
|
+
* which writes one product with negative exponents in code-unit name order;
|
|
126
|
+
* this one orders names by `localeCompare` and splits a quotient. The
|
|
127
|
+
* proposals' printed formulas and the IC dedup key read this tree, so one
|
|
128
|
+
* builder would move them. Both build each factor with `symbolPower`.
|
|
114
129
|
* @internal */
|
|
115
130
|
export function fromMonomial(m) {
|
|
116
|
-
const factor = (name, dim, e) =>
|
|
117
|
-
? sym(name, dim)
|
|
118
|
-
: { kind: 'op', op: '^', args: [sym(name, dim), sym(String(e), DIMENSIONLESS)] };
|
|
131
|
+
const factor = (name, dim, e) => symbolPower(sym(name, dim), fractionToNumber(e));
|
|
119
132
|
const num = [];
|
|
120
133
|
const den = [];
|
|
121
134
|
for (const [name, { dim, exp }] of [...m].sort((a, b) => a[0].localeCompare(b[0]))) {
|
|
122
|
-
if (exp
|
|
135
|
+
if (exp.isZero())
|
|
123
136
|
continue;
|
|
124
|
-
if (exp >
|
|
137
|
+
if (exp.numerator > 0n)
|
|
125
138
|
num.push(factor(name, dim, exp));
|
|
126
139
|
else
|
|
127
|
-
den.push(factor(name, dim,
|
|
140
|
+
den.push(factor(name, dim, exp.abs()));
|
|
128
141
|
}
|
|
129
142
|
const product = (xs) => xs.length === 1 ? xs[0] : { kind: 'op', op: '*', args: xs };
|
|
130
143
|
const numerator = num.length === 0 ? sym('1', DIMENSIONLESS) : product(num);
|
|
@@ -132,7 +145,7 @@ export function fromMonomial(m) {
|
|
|
132
145
|
return numerator;
|
|
133
146
|
return { kind: 'op', op: '/', args: [numerator, product(den)] };
|
|
134
147
|
}
|
|
135
|
-
const isConstant =
|
|
148
|
+
const isConstant = isRegisteredConstant;
|
|
136
149
|
/** The single non-constant leaf of a monomial, or null if 0 or >1. */
|
|
137
150
|
function uniqueNonConstantLeaf(m) {
|
|
138
151
|
const free = [...m].filter(([name]) => !isConstant(name));
|
|
@@ -141,18 +154,38 @@ function uniqueNonConstantLeaf(m) {
|
|
|
141
154
|
const [name, { dim, exp }] = free[0];
|
|
142
155
|
return { name, dim, exp };
|
|
143
156
|
}
|
|
144
|
-
|
|
157
|
+
/** The LaTeX of a monomial, exponents rendered from their fractions (`y^{1/3}`). @internal */
|
|
158
|
+
export function latexFromMono(m) {
|
|
145
159
|
const num = [];
|
|
146
160
|
const den = [];
|
|
147
161
|
for (const [name, { exp }] of [...m].sort((a, b) => a[0].localeCompare(b[0]))) {
|
|
148
|
-
if (exp
|
|
162
|
+
if (exp.isZero())
|
|
149
163
|
continue;
|
|
150
|
-
const
|
|
151
|
-
|
|
164
|
+
const magnitude = exp.abs();
|
|
165
|
+
const tok = magnitude.equals(ONE) ? name : `${name}^{${formatRational(magnitude)}}`;
|
|
166
|
+
(exp.numerator > 0n ? num : den).push(tok);
|
|
152
167
|
}
|
|
153
168
|
const n = num.join(' \\cdot ') || '1';
|
|
154
169
|
return den.length ? `\\frac{${n}}{${den.join(' \\cdot ')}}` : n;
|
|
155
170
|
}
|
|
171
|
+
/**
|
|
172
|
+
* Isolate `solveFor` from `m1 = m2`: `solveFor^e = m1 / (m2 without solveFor)`,
|
|
173
|
+
* every exponent divided by `e`, exactly. `m2` must hold `solveFor`.
|
|
174
|
+
*
|
|
175
|
+
* @internal
|
|
176
|
+
*/
|
|
177
|
+
export function isolateLeaf(m1, m2, solveFor) {
|
|
178
|
+
const result = new Map();
|
|
179
|
+
mergeInto(result, m1, ONE);
|
|
180
|
+
const m2NoSolve = new Map(m2);
|
|
181
|
+
m2NoSolve.delete(solveFor.name);
|
|
182
|
+
mergeInto(result, m2NoSolve, MINUS_ONE);
|
|
183
|
+
if (!solveFor.exp.equals(ONE)) {
|
|
184
|
+
for (const v of result.values())
|
|
185
|
+
v.exp = v.exp.divide(solveFor.exp);
|
|
186
|
+
}
|
|
187
|
+
return result;
|
|
188
|
+
}
|
|
156
189
|
// ── leaf-name canonicalization ──────────────────────────────────────────────
|
|
157
190
|
// A canonical equation's `scalarAst` uses private symbols (`T`) while its
|
|
158
191
|
// `dimensional.governing` and the whole composition graph (and bridge `symbolic`
|
|
@@ -160,14 +193,10 @@ function latexFromMono(m) {
|
|
|
160
193
|
// governing names lets a derivation from a canonical equation and one from a
|
|
161
194
|
// bridge edge of the SAME physics collapse under `dedupByNormalForm`.
|
|
162
195
|
function collectLeafDims(ast, into) {
|
|
163
|
-
|
|
164
|
-
if (!into.has(
|
|
165
|
-
into.set(
|
|
166
|
-
}
|
|
167
|
-
else if (ast.kind === 'op') {
|
|
168
|
-
for (const a of ast.args)
|
|
169
|
-
collectLeafDims(a, into);
|
|
170
|
-
}
|
|
196
|
+
forEachScalarLeaf(ast, (leaf) => {
|
|
197
|
+
if (!into.has(leaf.name))
|
|
198
|
+
into.set(leaf.name, leaf.dim);
|
|
199
|
+
}, {});
|
|
171
200
|
}
|
|
172
201
|
/** Map each non-constant `scalarAst` leaf to the governing quantity of equal
|
|
173
202
|
* dimension, when that match is unique (else leave it — never guess). */
|
|
@@ -177,7 +206,7 @@ function leafCanonMap(scalarAst, governing) {
|
|
|
177
206
|
const govFree = governing.filter((g) => !isConstant(g.name));
|
|
178
207
|
const map = new Map();
|
|
179
208
|
for (const [leaf, dim] of leaves) {
|
|
180
|
-
if (isConstant(leaf) ||
|
|
209
|
+
if (isConstant(leaf) || isDecimalLiteral(leaf))
|
|
181
210
|
continue;
|
|
182
211
|
if (govFree.some((g) => g.name === leaf))
|
|
183
212
|
continue; // already a graph name
|
|
@@ -190,14 +219,10 @@ function leafCanonMap(scalarAst, governing) {
|
|
|
190
219
|
function renameLeaves(ast, map) {
|
|
191
220
|
if (map.size === 0)
|
|
192
221
|
return ast;
|
|
193
|
-
|
|
194
|
-
const r = map.get(
|
|
195
|
-
return r ? { ...
|
|
196
|
-
}
|
|
197
|
-
if (ast.kind === 'op') {
|
|
198
|
-
return { ...ast, args: ast.args.map((a) => renameLeaves(a, map)) };
|
|
199
|
-
}
|
|
200
|
-
return ast;
|
|
222
|
+
return mapScalarLeaves(ast, (leaf) => {
|
|
223
|
+
const r = map.get(leaf.name);
|
|
224
|
+
return r ? { ...leaf, name: r } : leaf;
|
|
225
|
+
}, {});
|
|
201
226
|
}
|
|
202
227
|
/** True if the monomial carries a dimensionless leaf that is neither a known
|
|
203
228
|
* constant, a numeric literal, NOR a declared input quantity — i.e. an
|
|
@@ -207,7 +232,7 @@ function hasNonConstantStub(m, inputs) {
|
|
|
207
232
|
for (const [name, { dim }] of m) {
|
|
208
233
|
if (equals(dim, DIMENSIONLESS) &&
|
|
209
234
|
!isConstant(name) &&
|
|
210
|
-
!
|
|
235
|
+
!isDecimalLiteral(name) &&
|
|
211
236
|
!inputs.has(name)) {
|
|
212
237
|
return true;
|
|
213
238
|
}
|
|
@@ -327,15 +352,7 @@ function derivePair(cand, t0, t1, E1, E2) {
|
|
|
327
352
|
if (m1.has(solveFor.name))
|
|
328
353
|
return null; // degenerate overlap (Design §5.2)
|
|
329
354
|
// Isolate solveFor from `m1 = m2`: solveFor^e = m1 / (m2 without solveFor).
|
|
330
|
-
const result =
|
|
331
|
-
mergeInto(result, m1, 1);
|
|
332
|
-
const m2NoSolve = new Map(m2);
|
|
333
|
-
m2NoSolve.delete(solveFor.name);
|
|
334
|
-
mergeInto(result, m2NoSolve, -1);
|
|
335
|
-
if (solveFor.exp !== 1) {
|
|
336
|
-
for (const v of result.values())
|
|
337
|
-
v.exp /= solveFor.exp;
|
|
338
|
-
}
|
|
355
|
+
const result = isolateLeaf(m1, m2, solveFor);
|
|
339
356
|
const scalarAst = fromMonomial(result);
|
|
340
357
|
const dim = validate(scalarAst).inferredDimension;
|
|
341
358
|
if (!dim || !equals(dim, solveFor.dim))
|
|
@@ -376,13 +393,31 @@ function disambiguateIds(proposals) {
|
|
|
376
393
|
? { ...p, id: `${p.id}--${p.derivedFrom.sourceEquationIds.join('+')}` }
|
|
377
394
|
: p);
|
|
378
395
|
}
|
|
396
|
+
/**
|
|
397
|
+
* The hash a proposal dedupes under: `normalForm` of its monomial rebuilt
|
|
398
|
+
* from the exact exponents (so `0.3333333333333333` and
|
|
399
|
+
* `0.33333333333333337` are one `1/3`), or of the AST itself when it is not
|
|
400
|
+
* a monomial.
|
|
401
|
+
*/
|
|
402
|
+
function dedupKey(p) {
|
|
403
|
+
let canonical = p.scalarAst;
|
|
404
|
+
try {
|
|
405
|
+
canonical = fromMonomial(toMonomial(p.scalarAst));
|
|
406
|
+
}
|
|
407
|
+
catch (err) {
|
|
408
|
+
if (!(err instanceof NotAMonomialError))
|
|
409
|
+
throw err;
|
|
410
|
+
}
|
|
411
|
+
return `${normalForm(canonical)}::${p.dimensionalSignature}`;
|
|
412
|
+
}
|
|
379
413
|
/**
|
|
380
414
|
* Collapse proposals that derive the SAME relation — equal `normalForm` (up to
|
|
381
|
-
* dimensionless constants) AND equal target dimension —
|
|
382
|
-
* the others' identifications in
|
|
383
|
-
* collapse (e.g. Landauer's dropped
|
|
384
|
-
*
|
|
385
|
-
* produce (Design §9 #2).
|
|
415
|
+
* dimensionless constants) of the exact monomial AND equal target dimension —
|
|
416
|
+
* into the first, recording the others' identifications in
|
|
417
|
+
* `alsoDerivableFrom`. Distinct stubs do NOT collapse (e.g. Landauer's dropped
|
|
418
|
+
* `ln2` vs an operator stub hash differently), so this only merges genuine
|
|
419
|
+
* structural twins that a wider candidate scope can produce (Design §9 #2).
|
|
420
|
+
* Deterministic: input order is preserved.
|
|
386
421
|
*
|
|
387
422
|
* @internal
|
|
388
423
|
*/
|
|
@@ -391,7 +426,17 @@ export function dedupByNormalForm(proposals) {
|
|
|
391
426
|
const order = [];
|
|
392
427
|
const extras = new Map();
|
|
393
428
|
for (const p of proposals) {
|
|
394
|
-
|
|
429
|
+
let key = dedupKey(p);
|
|
430
|
+
// On a hash miss, the algebraic step: a kept proposal of the same dimension
|
|
431
|
+
// that is this one up to a constant owns the key (`a/(b/c)` for `a·c/b`).
|
|
432
|
+
if (!byKey.has(key)) {
|
|
433
|
+
const twin = order.find((k) => {
|
|
434
|
+
const candidate = byKey.get(k);
|
|
435
|
+
return candidate.dimensionalSignature === p.dimensionalSignature && equalUpToConstant(candidate.scalarAst, p.scalarAst).equal;
|
|
436
|
+
});
|
|
437
|
+
if (twin !== undefined)
|
|
438
|
+
key = twin;
|
|
439
|
+
}
|
|
395
440
|
const kept = byKey.get(key);
|
|
396
441
|
if (kept === undefined) {
|
|
397
442
|
byKey.set(key, p);
|