universal-physics-tensor 10.0.0 → 12.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 +39 -36
- package/bin/upt.mjs +13 -1
- package/data/applied-cases.json +1892 -0
- package/data/applied-cases.schema.json +194 -0
- 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 +389 -230
- package/data/bridge-catalog.schema.json +45 -7
- package/data/units.json +6 -25
- 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 +9 -15
- 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 +35 -25
- package/dist/atlas/physjs-entries.generated.d.ts.map +1 -1
- package/dist/atlas/physjs-entries.generated.js +37 -25
- 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/catalog-checks.d.ts +10 -0
- package/dist/cases/catalog-checks.d.ts.map +1 -0
- package/dist/cases/catalog-checks.js +241 -0
- package/dist/cases/catalog-checks.js.map +1 -0
- package/dist/cases/catalog.d.ts +83 -0
- package/dist/cases/catalog.d.ts.map +1 -0
- package/dist/cases/catalog.js +118 -0
- package/dist/cases/catalog.js.map +1 -0
- package/dist/cases/engine.d.ts +13 -0
- package/dist/cases/engine.d.ts.map +1 -0
- package/dist/cases/engine.js +179 -0
- package/dist/cases/engine.js.map +1 -0
- package/dist/cases/index.d.ts.map +1 -1
- package/dist/cases/index.js +5 -7
- package/dist/cases/index.js.map +1 -1
- package/dist/cases/methods.d.ts +215 -0
- package/dist/cases/methods.d.ts.map +1 -0
- package/dist/cases/methods.js +743 -0
- package/dist/cases/methods.js.map +1 -0
- 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/types.d.ts +12 -0
- package/dist/cases/types.d.ts.map +1 -1
- package/dist/cases/types.js.map +1 -1
- package/dist/cli/args.d.ts +25 -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 +11 -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 +1 -0
- package/dist/cli/commands/_discovery-opts.d.ts.map +1 -1
- package/dist/cli/commands/_discovery-opts.js +9 -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 +122 -73
- 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 +67 -39
- 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 +24 -3
- 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 +7 -1
- 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 +84 -11
- 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/determination.d.ts +1 -0
- package/dist/cli/determination.d.ts.map +1 -1
- package/dist/cli/determination.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/flag-help.d.ts +1 -0
- package/dist/cli/flag-help.d.ts.map +1 -1
- package/dist/cli/flag-help.js +1 -0
- package/dist/cli/flag-help.js.map +1 -1
- package/dist/cli/graphs.d.ts +2 -0
- package/dist/cli/graphs.d.ts.map +1 -1
- package/dist/cli/graphs.js +1 -0
- package/dist/cli/graphs.js.map +1 -1
- package/dist/cli/main.d.ts +8 -0
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +19 -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 +28 -0
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js +23 -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 +12 -9
- 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 +1 -0
- package/dist/cli/version.d.ts.map +1 -1
- package/dist/cli/version.js +8 -5
- package/dist/cli/version.js.map +1 -1
- package/dist/cli-api.d.ts +36 -5
- package/dist/cli-api.d.ts.map +1 -1
- package/dist/cli-api.js +30 -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 +3 -3
- package/dist/composition/canonical-graph.d.ts.map +1 -1
- package/dist/composition/canonical-graph.js +11 -38
- 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/consequence.d.ts +15 -5
- package/dist/composition/consequence.d.ts.map +1 -1
- package/dist/composition/consequence.js +6 -4
- package/dist/composition/consequence.js.map +1 -1
- package/dist/composition/discovery.d.ts +129 -9
- package/dist/composition/discovery.d.ts.map +1 -1
- package/dist/composition/discovery.js +171 -67
- 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 +1 -1
- package/dist/composition/expr-eval.d.ts.map +1 -1
- package/dist/composition/expr-eval.js +6 -15
- package/dist/composition/expr-eval.js.map +1 -1
- package/dist/composition/expr-simplify.d.ts +26 -14
- package/dist/composition/expr-simplify.d.ts.map +1 -1
- package/dist/composition/expr-simplify.js +64 -72
- 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/grounding.d.ts.map +1 -1
- package/dist/composition/grounding.js +19 -7
- package/dist/composition/grounding.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 +7 -8
- package/dist/composition/mathts-quiet.d.ts.map +1 -1
- package/dist/composition/mathts-quiet.js +7 -16
- 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/own-equation-magnitude.d.ts +95 -0
- package/dist/composition/own-equation-magnitude.d.ts.map +1 -0
- package/dist/composition/own-equation-magnitude.js +270 -0
- package/dist/composition/own-equation-magnitude.js.map +1 -0
- package/dist/composition/probe/backend-protocol.d.ts +3 -0
- package/dist/composition/probe/backend-protocol.d.ts.map +1 -1
- package/dist/composition/probe/backend-protocol.js.map +1 -1
- package/dist/composition/probe/candidate-store.d.ts +1 -0
- package/dist/composition/probe/candidate-store.d.ts.map +1 -1
- package/dist/composition/probe/candidate-store.js +1 -0
- package/dist/composition/probe/candidate-store.js.map +1 -1
- package/dist/composition/probe/corpus.d.ts +8 -4
- package/dist/composition/probe/corpus.d.ts.map +1 -1
- package/dist/composition/probe/corpus.js +23 -12
- package/dist/composition/probe/corpus.js.map +1 -1
- package/dist/composition/probe/dataset.d.ts +18 -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 +7 -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 +2 -0
- 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 +7 -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 +30 -1
- package/dist/composition/probe/generator.d.ts.map +1 -1
- package/dist/composition/probe/generator.js +58 -36
- 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 +25 -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 +5 -0
- package/dist/composition/probe/pipeline.d.ts.map +1 -1
- package/dist/composition/probe/pipeline.js +73 -24
- 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 +251 -0
- package/dist/composition/probe/power-law.js.map +1 -0
- package/dist/composition/probe/problem.d.ts +8 -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 +7 -1
- package/dist/composition/probe/residual.d.ts.map +1 -1
- package/dist/composition/probe/residual.js +10 -7
- package/dist/composition/probe/residual.js.map +1 -1
- package/dist/composition/probe/run-manifest.d.ts +1 -0
- package/dist/composition/probe/run-manifest.d.ts.map +1 -1
- package/dist/composition/probe/run-manifest.js.map +1 -1
- package/dist/composition/probe/scalar-search.d.ts +50 -0
- package/dist/composition/probe/scalar-search.d.ts.map +1 -0
- package/dist/composition/probe/scalar-search.js +169 -0
- package/dist/composition/probe/scalar-search.js.map +1 -0
- package/dist/composition/probe/scoring.d.ts +1 -0
- package/dist/composition/probe/scoring.d.ts.map +1 -1
- package/dist/composition/probe/scoring.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 +235 -184
- package/dist/composition/probe/study.js.map +1 -1
- package/dist/composition/probe/t-tail.d.ts +16 -0
- package/dist/composition/probe/t-tail.d.ts.map +1 -0
- package/dist/composition/probe/t-tail.js +29 -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 +52 -12
- package/dist/composition/proposed-bridges.d.ts.map +1 -1
- package/dist/composition/proposed-bridges.js +107 -60
- 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 +29 -0
- package/dist/composition/representative-values.js.map +1 -1
- package/dist/composition/retrodiction.d.ts +15 -0
- package/dist/composition/retrodiction.d.ts.map +1 -1
- package/dist/composition/retrodiction.js +12 -4
- package/dist/composition/retrodiction.js.map +1 -1
- package/dist/composition/user-equation.d.ts +1 -0
- package/dist/composition/user-equation.d.ts.map +1 -1
- package/dist/composition/user-equation.js +3 -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 +42 -41
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/constants.js +71 -51
- 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-ast-gradient.d.ts +27 -23
- package/dist/diff/bridge-ast-gradient.d.ts.map +1 -1
- package/dist/diff/bridge-ast-gradient.js +75 -173
- package/dist/diff/bridge-ast-gradient.js.map +1 -1
- 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/ast-types.d.ts +15 -0
- package/dist/dimensional/ast-types.d.ts.map +1 -1
- package/dist/dimensional/ast-types.js.map +1 -1
- 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/curvature-composite.d.ts +1 -1
- package/dist/dimensional/curvature-composite.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 +24 -11
- package/dist/dimensional/exact-scale.d.ts.map +1 -1
- package/dist/dimensional/exact-scale.js +122 -130
- 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/mathts-unit-delegation.d.ts +29 -0
- package/dist/dimensional/mathts-unit-delegation.d.ts.map +1 -0
- package/dist/dimensional/mathts-unit-delegation.js +187 -0
- package/dist/dimensional/mathts-unit-delegation.js.map +1 -0
- package/dist/dimensional/mathts-unit-wrapper.d.ts +33 -0
- package/dist/dimensional/mathts-unit-wrapper.d.ts.map +1 -0
- package/dist/dimensional/mathts-unit-wrapper.js +190 -0
- package/dist/dimensional/mathts-unit-wrapper.js.map +1 -0
- 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/scalar-lowering.d.ts +21 -0
- package/dist/dimensional/scalar-lowering.d.ts.map +1 -0
- package/dist/dimensional/scalar-lowering.js +45 -0
- package/dist/dimensional/scalar-lowering.js.map +1 -0
- 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.d.ts +5 -1
- package/dist/dimensional/unit-data.d.ts.map +1 -1
- package/dist/dimensional/unit-data.js +30 -6
- package/dist/dimensional/unit-data.js.map +1 -1
- package/dist/dimensional/units.d.ts +2 -0
- package/dist/dimensional/units.d.ts.map +1 -1
- package/dist/dimensional/units.js +59 -3
- package/dist/dimensional/units.js.map +1 -1
- package/dist/dimensional/validator.d.ts +2 -0
- package/dist/dimensional/validator.d.ts.map +1 -1
- package/dist/dimensional/validator.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/connection-lowering-helpers.d.ts +3 -1
- package/dist/numerical/connection-lowering-helpers.d.ts.map +1 -1
- package/dist/numerical/connection-lowering-helpers.js +11 -15
- 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 +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/pderiv.d.ts.map +1 -1
- package/dist/numerical/pderiv.js +2 -6
- package/dist/numerical/pderiv.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 +11 -13
- 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/strides.d.ts +3 -2
- package/dist/numerical/strides.d.ts.map +1 -1
- package/dist/numerical/strides.js +3 -10
- package/dist/numerical/strides.js.map +1 -1
- 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 +9 -12
- package/dist/cases/brownian-sphere.d.ts +0 -68
- package/dist/cases/brownian-sphere.d.ts.map +0 -1
- package/dist/cases/brownian-sphere.js +0 -354
- package/dist/cases/brownian-sphere.js.map +0 -1
- package/dist/cases/damped-resonator.d.ts +0 -23
- package/dist/cases/damped-resonator.d.ts.map +0 -1
- package/dist/cases/damped-resonator.js +0 -224
- package/dist/cases/damped-resonator.js.map +0 -1
- package/dist/cases/kepler-rv.d.ts +0 -13
- package/dist/cases/kepler-rv.d.ts.map +0 -1
- package/dist/cases/kepler-rv.js +0 -172
- package/dist/cases/kepler-rv.js.map +0 -1
- package/dist/cases/lumped-cooling.d.ts +0 -46
- package/dist/cases/lumped-cooling.d.ts.map +0 -1
- package/dist/cases/lumped-cooling.js +0 -261
- package/dist/cases/lumped-cooling.js.map +0 -1
- package/dist/cases/resistor-noise.d.ts +0 -14
- package/dist/cases/resistor-noise.d.ts.map +0 -1
- package/dist/cases/resistor-noise.js +0 -215
- package/dist/cases/resistor-noise.js.map +0 -1
- package/dist/cases/skin-depth.d.ts +0 -21
- package/dist/cases/skin-depth.d.ts.map +0 -1
- package/dist/cases/skin-depth.js +0 -174
- package/dist/cases/skin-depth.js.map +0 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Equality of two scalar expressions up to a dimensionless constant, decided
|
|
3
|
+
* by MathTS `simplify` (proposal 2).
|
|
4
|
+
*
|
|
5
|
+
* `normalForm` is the cheap structural key: it flattens products and drops
|
|
6
|
+
* dimensionless constants, but `a/(b/c)` and `a·c/b`, or `a·a` and `a²`, hash
|
|
7
|
+
* differently, and a chain that recovers a known law in another spelling was
|
|
8
|
+
* filed as provisional. This module answers the question the hash cannot: it
|
|
9
|
+
* renders both sides to the gensym string `expr-simplify.ts` uses (one gensym
|
|
10
|
+
* per leaf NAME, shared by both sides, so the same leaf cancels; a
|
|
11
|
+
* dimensionless registered constant becomes its number, as the hash drops
|
|
12
|
+
* it), asks `simplify` for `(A)/(B)`, and reads a constant node as "equal up
|
|
13
|
+
* to that constant". Anything else, a symbol left over, an arm the renderer
|
|
14
|
+
* does not carry, a throw inside the simplifier, is NOT SHOWN EQUAL: a
|
|
15
|
+
* negative answer here is an absence of proof, never a proof of difference.
|
|
16
|
+
*
|
|
17
|
+
* MathTS `symbolicEqual` is not used. Before `@danielsimonjr/mathts-functions`
|
|
18
|
+
* 0.68.4 it passed an empty rule list and compared every pair false; from
|
|
19
|
+
* 0.68.4 it simplifies with the default rules, and it is the same simplifier
|
|
20
|
+
* this step calls, so it would be the same method, not a second one.
|
|
21
|
+
*
|
|
22
|
+
* The first use runs inside the one console-silencing window
|
|
23
|
+
* `mathts-quiet.ts` describes, as `mathts-scalar-symbols.ts` does for its
|
|
24
|
+
* first parse; every later call runs with the console untouched.
|
|
25
|
+
*
|
|
26
|
+
* @module composition/algebraic-equivalence
|
|
27
|
+
*/
|
|
28
|
+
import type { ExprNode } from '../dimensional/validator.js';
|
|
29
|
+
/** The outcome: equal with the constant `A/B`, or not shown equal. @internal */
|
|
30
|
+
export type AlgebraicEquivalence = {
|
|
31
|
+
readonly equal: true;
|
|
32
|
+
readonly constant: number;
|
|
33
|
+
} | {
|
|
34
|
+
readonly equal: false;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Whether `a` and `b` are equal up to a dimensionless constant, and that
|
|
38
|
+
* constant (`a/b`). See the module docs for what a negative answer means.
|
|
39
|
+
*
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
export declare function equalUpToConstant(a: ExprNode, b: ExprNode): AlgebraicEquivalence;
|
|
43
|
+
//# sourceMappingURL=algebraic-equivalence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"algebraic-equivalence.d.ts","sourceRoot":"","sources":["../../src/composition/algebraic-equivalence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAQ5D,gFAAgF;AAChF,MAAM,MAAM,oBAAoB,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAA;CAAE,CAAC;AAuEnH;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,GAAG,oBAAoB,CAqBhF"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Equality of two scalar expressions up to a dimensionless constant, decided
|
|
3
|
+
* by MathTS `simplify` (proposal 2).
|
|
4
|
+
*
|
|
5
|
+
* `normalForm` is the cheap structural key: it flattens products and drops
|
|
6
|
+
* dimensionless constants, but `a/(b/c)` and `a·c/b`, or `a·a` and `a²`, hash
|
|
7
|
+
* differently, and a chain that recovers a known law in another spelling was
|
|
8
|
+
* filed as provisional. This module answers the question the hash cannot: it
|
|
9
|
+
* renders both sides to the gensym string `expr-simplify.ts` uses (one gensym
|
|
10
|
+
* per leaf NAME, shared by both sides, so the same leaf cancels; a
|
|
11
|
+
* dimensionless registered constant becomes its number, as the hash drops
|
|
12
|
+
* it), asks `simplify` for `(A)/(B)`, and reads a constant node as "equal up
|
|
13
|
+
* to that constant". Anything else, a symbol left over, an arm the renderer
|
|
14
|
+
* does not carry, a throw inside the simplifier, is NOT SHOWN EQUAL: a
|
|
15
|
+
* negative answer here is an absence of proof, never a proof of difference.
|
|
16
|
+
*
|
|
17
|
+
* MathTS `symbolicEqual` is not used. Before `@danielsimonjr/mathts-functions`
|
|
18
|
+
* 0.68.4 it passed an empty rule list and compared every pair false; from
|
|
19
|
+
* 0.68.4 it simplifies with the default rules, and it is the same simplifier
|
|
20
|
+
* this step calls, so it would be the same method, not a second one.
|
|
21
|
+
*
|
|
22
|
+
* The first use runs inside the one console-silencing window
|
|
23
|
+
* `mathts-quiet.ts` describes, as `mathts-scalar-symbols.ts` does for its
|
|
24
|
+
* first parse; every later call runs with the console untouched.
|
|
25
|
+
*
|
|
26
|
+
* @module composition/algebraic-equivalence
|
|
27
|
+
*/
|
|
28
|
+
import { parse as mathtsParse, simplify as mathtsSimplify } from '@danielsimonjr/mathts-functions';
|
|
29
|
+
import { mapScalarLeaves } from '../dimensional/ast-leaves.js';
|
|
30
|
+
import { equals } from '../dimensional/algebra.js';
|
|
31
|
+
import { DIMENSIONLESS } from '../dimensional/types.js';
|
|
32
|
+
import { CONSTANTS, isRegisteredConstant, piMultipleValue } from '../dimensional/symbolic-constants.js';
|
|
33
|
+
import { renderGensym } from './expr-simplify.js';
|
|
34
|
+
import { quietlySync } from './mathts-quiet.js';
|
|
35
|
+
const NOT_EQUAL = { equal: false };
|
|
36
|
+
let cached;
|
|
37
|
+
/**
|
|
38
|
+
* `simplify ∘ parse`, bound once, after a smoke test that it CANCELS
|
|
39
|
+
* (`(g0*g1)/(g1*g0)` must come back as the constant 1). A simplifier that
|
|
40
|
+
* fails the smoke is `null`, and every answer is then "not shown equal".
|
|
41
|
+
*/
|
|
42
|
+
function simplifier() {
|
|
43
|
+
if (cached !== undefined)
|
|
44
|
+
return cached;
|
|
45
|
+
cached = quietlySync(() => {
|
|
46
|
+
try {
|
|
47
|
+
const run = (text) => mathtsSimplify(mathtsParse(text));
|
|
48
|
+
const smoke = run('(g0*g1)/(g1*g0)');
|
|
49
|
+
return isConstant(smoke) && smoke.value === 1 ? run : null;
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
return cached;
|
|
56
|
+
}
|
|
57
|
+
/** A finite numeric constant node. */
|
|
58
|
+
function isConstant(node) {
|
|
59
|
+
return ((node.isConstantNode === true || node.type === 'ConstantNode') &&
|
|
60
|
+
typeof node.value === 'number' &&
|
|
61
|
+
Number.isFinite(node.value));
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The number a dimensionless leaf stands for when `normalForm` would drop it
|
|
65
|
+
* as a constant: a registered dimensionless constant, a spelled multiple of
|
|
66
|
+
* π, or BE-16's `ln_2_constant`. Undefined for every other leaf.
|
|
67
|
+
*/
|
|
68
|
+
function droppableConstantValue(name) {
|
|
69
|
+
if (name === 'ln_2_constant')
|
|
70
|
+
return Math.LN2;
|
|
71
|
+
if (isRegisteredConstant(name)) {
|
|
72
|
+
const c = CONSTANTS[name];
|
|
73
|
+
return equals(c.dim, DIMENSIONLESS) ? c.value : undefined;
|
|
74
|
+
}
|
|
75
|
+
return piMultipleValue(name);
|
|
76
|
+
}
|
|
77
|
+
/** Dimensionless named constants become literals, so the ratio of two forms that differ by one is a number. */
|
|
78
|
+
function constantsAsLiterals(expr) {
|
|
79
|
+
return mapScalarLeaves(expr, (leaf) => {
|
|
80
|
+
const value = droppableConstantValue(leaf.name);
|
|
81
|
+
return value === undefined ? leaf : { kind: 'symbol', name: String(value), dim: DIMENSIONLESS };
|
|
82
|
+
}, {});
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Whether `a` and `b` are equal up to a dimensionless constant, and that
|
|
86
|
+
* constant (`a/b`). See the module docs for what a negative answer means.
|
|
87
|
+
*
|
|
88
|
+
* @internal
|
|
89
|
+
*/
|
|
90
|
+
export function equalUpToConstant(a, b) {
|
|
91
|
+
const run = simplifier();
|
|
92
|
+
if (run === null)
|
|
93
|
+
return NOT_EQUAL;
|
|
94
|
+
const gensymOf = new Map();
|
|
95
|
+
const meta = new Map();
|
|
96
|
+
let text;
|
|
97
|
+
try {
|
|
98
|
+
// One gensym table for both sides: the same leaf name is the same symbol.
|
|
99
|
+
const left = renderGensym(constantsAsLiterals(a), gensymOf, meta);
|
|
100
|
+
const right = renderGensym(constantsAsLiterals(b), gensymOf, meta);
|
|
101
|
+
text = `(${left})/(${right})`;
|
|
102
|
+
}
|
|
103
|
+
catch {
|
|
104
|
+
return NOT_EQUAL; // an arm the renderer does not carry
|
|
105
|
+
}
|
|
106
|
+
let node;
|
|
107
|
+
try {
|
|
108
|
+
node = run(text);
|
|
109
|
+
}
|
|
110
|
+
catch {
|
|
111
|
+
return NOT_EQUAL; // the simplifier threw: not shown equal
|
|
112
|
+
}
|
|
113
|
+
return isConstant(node) ? { equal: true, constant: node.value } : NOT_EQUAL;
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=algebraic-equivalence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"algebraic-equivalence.js","sourceRoot":"","sources":["../../src/composition/algebraic-equivalence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,KAAK,IAAI,WAAW,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEnG,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACxG,OAAO,EAAE,YAAY,EAAiB,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAgBhD,MAAM,SAAS,GAAyB,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;AAEzD,IAAI,MAAqC,CAAC;AAE1C;;;;GAIG;AACH,SAAS,UAAU;IACjB,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC;IACxC,MAAM,GAAG,WAAW,CAAC,GAAG,EA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,SAAS,CAAC;AAC9E,CAAC","sourcesContent":["/**\n * Equality of two scalar expressions up to a dimensionless constant, decided\n * by MathTS `simplify` (proposal 2).\n *\n * `normalForm` is the cheap structural key: it flattens products and drops\n * dimensionless constants, but `a/(b/c)` and `a·c/b`, or `a·a` and `a²`, hash\n * differently, and a chain that recovers a known law in another spelling was\n * filed as provisional. This module answers the question the hash cannot: it\n * renders both sides to the gensym string `expr-simplify.ts` uses (one gensym\n * per leaf NAME, shared by both sides, so the same leaf cancels; a\n * dimensionless registered constant becomes its number, as the hash drops\n * it), asks `simplify` for `(A)/(B)`, and reads a constant node as \"equal up\n * to that constant\". Anything else, a symbol left over, an arm the renderer\n * does not carry, a throw inside the simplifier, is NOT SHOWN EQUAL: a\n * negative answer here is an absence of proof, never a proof of difference.\n *\n * MathTS `symbolicEqual` is not used. Before `@danielsimonjr/mathts-functions`\n * 0.68.4 it passed an empty rule list and compared every pair false; from\n * 0.68.4 it simplifies with the default rules, and it is the same simplifier\n * this step calls, so it would be the same method, not a second one.\n *\n * The first use runs inside the one console-silencing window\n * `mathts-quiet.ts` describes, as `mathts-scalar-symbols.ts` does for its\n * first parse; every later call runs with the console untouched.\n *\n * @module composition/algebraic-equivalence\n */\n\nimport { parse as mathtsParse, simplify as mathtsSimplify } from '@danielsimonjr/mathts-functions';\nimport type { ExprNode } from '../dimensional/validator.js';\nimport { mapScalarLeaves } from '../dimensional/ast-leaves.js';\nimport { equals } from '../dimensional/algebra.js';\nimport { DIMENSIONLESS } from '../dimensional/types.js';\nimport { CONSTANTS, isRegisteredConstant, piMultipleValue } from '../dimensional/symbolic-constants.js';\nimport { renderGensym, type LeafMeta } from './expr-simplify.js';\nimport { quietlySync } from './mathts-quiet.js';\n\n/** The outcome: equal with the constant `A/B`, or not shown equal. @internal */\nexport type AlgebraicEquivalence = { readonly equal: true; readonly constant: number } | { readonly equal: false };\n\n/** The bits of a simplified MathTS node this module reads. */\ninterface MathNode {\n readonly type?: string;\n readonly isConstantNode?: boolean;\n readonly value?: unknown;\n}\n\ninterface Simplifier {\n (text: string): MathNode;\n}\n\nconst NOT_EQUAL: AlgebraicEquivalence = { equal: false };\n\nlet cached: Simplifier | null | undefined;\n\n/**\n * `simplify ∘ parse`, bound once, after a smoke test that it CANCELS\n * (`(g0*g1)/(g1*g0)` must come back as the constant 1). A simplifier that\n * fails the smoke is `null`, and every answer is then \"not shown equal\".\n */\nfunction simplifier(): Simplifier | null {\n if (cached !== undefined) return cached;\n cached = quietlySync(() => {\n try {\n const run: Simplifier = (text) => mathtsSimplify(mathtsParse(text)) as unknown as MathNode;\n const smoke = run('(g0*g1)/(g1*g0)');\n return isConstant(smoke) && smoke.value === 1 ? run : null;\n } catch {\n return null;\n }\n });\n return cached;\n}\n\n/** A finite numeric constant node. */\nfunction isConstant(node: MathNode): node is MathNode & { readonly value: number } {\n return (\n (node.isConstantNode === true || node.type === 'ConstantNode') &&\n typeof node.value === 'number' &&\n Number.isFinite(node.value)\n );\n}\n\n/**\n * The number a dimensionless leaf stands for when `normalForm` would drop it\n * as a constant: a registered dimensionless constant, a spelled multiple of\n * π, or BE-16's `ln_2_constant`. Undefined for every other leaf.\n */\nfunction droppableConstantValue(name: string): number | undefined {\n if (name === 'ln_2_constant') return Math.LN2;\n if (isRegisteredConstant(name)) {\n const c = CONSTANTS[name]!;\n return equals(c.dim, DIMENSIONLESS) ? c.value : undefined;\n }\n return piMultipleValue(name);\n}\n\n/** Dimensionless named constants become literals, so the ratio of two forms that differ by one is a number. */\nfunction constantsAsLiterals(expr: ExprNode): ExprNode {\n return mapScalarLeaves(\n expr,\n (leaf) => {\n const value = droppableConstantValue(leaf.name);\n return value === undefined ? leaf : { kind: 'symbol', name: String(value), dim: DIMENSIONLESS };\n },\n {},\n );\n}\n\n/**\n * Whether `a` and `b` are equal up to a dimensionless constant, and that\n * constant (`a/b`). See the module docs for what a negative answer means.\n *\n * @internal\n */\nexport function equalUpToConstant(a: ExprNode, b: ExprNode): AlgebraicEquivalence {\n const run = simplifier();\n if (run === null) return NOT_EQUAL;\n const gensymOf = new Map<string, string>();\n const meta = new Map<string, LeafMeta>();\n let text: string;\n try {\n // One gensym table for both sides: the same leaf name is the same symbol.\n const left = renderGensym(constantsAsLiterals(a), gensymOf, meta);\n const right = renderGensym(constantsAsLiterals(b), gensymOf, meta);\n text = `(${left})/(${right})`;\n } catch {\n return NOT_EQUAL; // an arm the renderer does not carry\n }\n let node: MathNode;\n try {\n node = run(text);\n } catch {\n return NOT_EQUAL; // the simplifier threw: not shown equal\n }\n return isConstant(node) ? { equal: true, constant: node.value } : NOT_EQUAL;\n}\n"]}
|
|
@@ -34,14 +34,8 @@ export type StatisticsAxis = 'bosonic' | 'fermionic' | 'anyonic' | 'parastatisti
|
|
|
34
34
|
export declare const SCALE_AXIS_VALUES: readonly ScaleAxis[];
|
|
35
35
|
/** The force values. @internal */
|
|
36
36
|
export declare const FORCE_AXIS_VALUES: readonly ForceAxis[];
|
|
37
|
-
/** The information-measure values. @internal */
|
|
38
|
-
export declare const INFORMATION_AXIS_VALUES: readonly InformationAxis[];
|
|
39
37
|
/** The symmetry values. @internal */
|
|
40
38
|
export declare const SYMMETRY_AXIS_VALUES: readonly SymmetryAxis[];
|
|
41
|
-
/** The topology values. @internal */
|
|
42
|
-
export declare const TOPOLOGY_AXIS_VALUES: readonly TopologyAxis[];
|
|
43
|
-
/** The statistics values. @internal */
|
|
44
|
-
export declare const STATISTICS_AXIS_VALUES: readonly StatisticsAxis[];
|
|
45
39
|
/** A classification-axis specification. @internal */
|
|
46
40
|
export interface AxisSpec {
|
|
47
41
|
/** The axis key, matching the `RegimeAttributes` field name. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axes.d.ts","sourceRoot":"","sources":["../../src/composition/axes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4CAA4C;AAC5C,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,YAAY,GAAG,WAAW,GAAG,cAAc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AG,SAAS,GAAG,IAAI,GAAG,OAAO,CAAC;AAC5E,iFAAiF;AACjF,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,eAAe,CAAC;AAEnF,+FAA+F;AAC/F,eAAO,MAAM,iBAAiB,EAAE,SAAS,SAAS,EAA2D,CAAC;AAC9G,kCAAkC;AAClC,eAAO,MAAM,iBAAiB,EAAE,SAAS,SAAS,EAAuE,CAAC;AAG1H,qCAAqC;AACrC,eAAO,MAAM,oBAAoB,EAAE,SAAS,YAAY,EAA2D,CAAC;AAMpH,qDAAqD;AACrD,MAAM,WAAW,QAAQ;IACvB,gEAAgE;IAChE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,mFAAmF;IACnF,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,EAAE,SAAS,QAAQ,EAqCnC,CAAC;AAEF,6FAA6F;AAC7F,eAAO,MAAM,SAAS,EAAE,SAAS,MAAM,EAAmD,CAAC"}
|
package/dist/composition/axes.js
CHANGED
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
export const SCALE_AXIS_VALUES = ['quantum', 'mesoscopic', 'classical', 'cosmological'];
|
|
23
23
|
/** The force values. @internal */
|
|
24
24
|
export const FORCE_AXIS_VALUES = ['gravitational', 'electromagnetic', 'weak', 'strong', 'emergent'];
|
|
25
|
-
/** The information-measure values.
|
|
26
|
-
|
|
25
|
+
/** The information-measure values; read by its `AXES` row alone, so not exported. */
|
|
26
|
+
const INFORMATION_AXIS_VALUES = ['von-neumann', 'shannon', 'kolmogorov', 'discord'];
|
|
27
27
|
/** The symmetry values. @internal */
|
|
28
28
|
export const SYMMETRY_AXIS_VALUES = ['poincare', 'gauge', 'conformal', 'susy', 'emergent'];
|
|
29
|
-
/** The topology values.
|
|
30
|
-
|
|
31
|
-
/** The statistics values.
|
|
32
|
-
|
|
29
|
+
/** The topology values; read by its `AXES` row alone, so not exported. */
|
|
30
|
+
const TOPOLOGY_AXIS_VALUES = ['trivial', 'chern', 'winding', 'z2', 'berry'];
|
|
31
|
+
/** The statistics values; read by its `AXES` row alone, so not exported. */
|
|
32
|
+
const STATISTICS_AXIS_VALUES = ['bosonic', 'fermionic', 'anyonic', 'parastatistic'];
|
|
33
33
|
/**
|
|
34
34
|
* The classification-axis registry. `gated` reflects measured discrimination:
|
|
35
35
|
* scale/force fire on the current catalog; the rest abstain (too little attribute
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axes.js","sourceRoot":"","sources":["../../src/composition/axes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAoBH,+FAA+F;AAC/F,MAAM,CAAC,MAAM,iBAAiB,GAAyB,CAAC,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC;AAC9G,kCAAkC;AAClC,MAAM,CAAC,MAAM,iBAAiB,GAAyB,CAAC,eAAe,EAAE,iBAAiB,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;AAC1H,
|
|
1
|
+
{"version":3,"file":"axes.js","sourceRoot":"","sources":["../../src/composition/axes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAoBH,+FAA+F;AAC/F,MAAM,CAAC,MAAM,iBAAiB,GAAyB,CAAC,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC;AAC9G,kCAAkC;AAClC,MAAM,CAAC,MAAM,iBAAiB,GAAyB,CAAC,eAAe,EAAE,iBAAiB,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;AAC1H,qFAAqF;AACrF,MAAM,uBAAuB,GAA+B,CAAC,aAAa,EAAE,SAAS,EA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,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC","sourcesContent":["/**\n * The extensible tensor-axis registry — the single source for UPT's classification\n * axes (the regime/attribute layer the discovery funnel and quantities use).\n *\n * Each axis is BOTH a typed union (compile-time safety) AND an {@link AxisSpec}\n * registry entry (runtime — drives the discovery falsifier and the discrimination\n * audit). Adding an axis is one union + one registry line + tagging quantities;\n * enabling its falsifier gate is a one-line `gated: true` flip — but only after the\n * discrimination audit (`axis-audit.ts`) shows it actually fires. Rank grows on\n * measured physics, not vision — an axis that only ever abstains stays ungated.\n *\n * NOTE: the SI `Dimension` axis is deliberately NOT here — it is the complete 7-base\n * system in `dimensional/` (conflating it would break Buckingham-π). The tensor-config\n * types in `core/types.ts` (`PhysicalScale`/`Force`/… consumed by `UniversalTensor`)\n * are a separate concern; this registry is the discovery/attribute layer.\n *\n * Leaf module — no intra-`composition` imports (keeps the type-only cycle count at 0).\n *\n * @module composition/axes\n */\n\n/** Length/energy scale regime. @internal */\nexport type ScaleAxis = 'quantum' | 'mesoscopic' | 'classical' | 'cosmological';\n/** Fundamental interaction. @internal */\nexport type ForceAxis =\n | 'gravitational'\n | 'electromagnetic'\n | 'weak'\n | 'strong'\n | 'emergent';\n/** Information measure. @internal */\nexport type InformationAxis = 'von-neumann' | 'shannon' | 'kolmogorov' | 'discord';\n/** Symmetry class. @internal */\nexport type SymmetryAxis = 'poincare' | 'gauge' | 'conformal' | 'susy' | 'emergent';\n/** Topological classification (invariant type). @internal */\nexport type TopologyAxis = 'trivial' | 'chern' | 'winding' | 'z2' | 'berry';\n/** Quantum statistics (the 7th axis — orthogonal to the other six). @internal */\nexport type StatisticsAxis = 'bosonic' | 'fermionic' | 'anyonic' | 'parastatistic';\n\n/** The scale values, the one list the registry row and every typed consumer read. @internal */\nexport const SCALE_AXIS_VALUES: readonly ScaleAxis[] = ['quantum', 'mesoscopic', 'classical', 'cosmological'];\n/** The force values. @internal */\nexport const FORCE_AXIS_VALUES: readonly ForceAxis[] = ['gravitational', 'electromagnetic', 'weak', 'strong', 'emergent'];\n/** The information-measure values; read by its `AXES` row alone, so not exported. */\nconst INFORMATION_AXIS_VALUES: readonly InformationAxis[] = ['von-neumann', 'shannon', 'kolmogorov', 'discord'];\n/** The symmetry values. @internal */\nexport const SYMMETRY_AXIS_VALUES: readonly SymmetryAxis[] = ['poincare', 'gauge', 'conformal', 'susy', 'emergent'];\n/** The topology values; read by its `AXES` row alone, so not exported. */\nconst TOPOLOGY_AXIS_VALUES: readonly TopologyAxis[] = ['trivial', 'chern', 'winding', 'z2', 'berry'];\n/** The statistics values; read by its `AXES` row alone, so not exported. */\nconst STATISTICS_AXIS_VALUES: readonly StatisticsAxis[] = ['bosonic', 'fermionic', 'anyonic', 'parastatistic'];\n\n/** A classification-axis specification. @internal */\nexport interface AxisSpec {\n /** The axis key, matching the `RegimeAttributes` field name. */\n readonly name: string;\n /** The axis's allowed values at runtime (must equal the typed union's members). */\n readonly values: readonly string[];\n /**\n * Whether the discovery axis-falsifier gates on this axis. Flipped to `true`\n * ONLY when `auditAxisDiscrimination` shows the axis actually clashes on real\n * candidates — never on vision alone.\n */\n readonly gated: boolean;\n readonly description: string;\n}\n\n/**\n * The classification-axis registry. `gated` reflects measured discrimination:\n * scale/force fire on the current catalog; the rest abstain (too little attribute\n * coverage yet) and stay ungated until the branch expansion + audit earn them a gate.\n *\n * @internal\n */\nexport const AXES: readonly AxisSpec[] = [\n {\n name: 'scale',\n values: SCALE_AXIS_VALUES,\n gated: true,\n description: 'Length/energy-scale regime (quantum → cosmological).',\n },\n {\n name: 'force',\n values: FORCE_AXIS_VALUES,\n gated: true,\n description: 'Fundamental (or emergent effective) interaction.',\n },\n {\n name: 'information',\n values: INFORMATION_AXIS_VALUES,\n gated: false,\n description: 'Information measure — authored, not gated (see discovery precision calibration).',\n },\n {\n name: 'symmetry',\n values: SYMMETRY_AXIS_VALUES,\n gated: false,\n description: 'Symmetry class — first-class attribute; ungated until coverage + audit earn it.',\n },\n {\n name: 'topology',\n values: TOPOLOGY_AXIS_VALUES,\n gated: false,\n description: 'Topological invariant type — populates the rank-6 Topology axis; ungated until audit.',\n },\n {\n name: 'statistics',\n values: STATISTICS_AXIS_VALUES,\n gated: false,\n description: 'Quantum statistics (the 7th axis). NOTE: spin-statistics ties it to symmetry — the audit must confirm it discriminates independently before gating.',\n },\n];\n\n/** The axis names the discovery falsifier gates on (derived from the registry). @internal */\nexport const GATE_AXES: readonly string[] = AXES.filter((a) => a.gated).map((a) => a.name);\n"]}
|
|
@@ -1,23 +1,36 @@
|
|
|
1
|
+
import type { BridgeEdge } from './edge.js';
|
|
2
|
+
import type { RegimeAttributes } from './quantity.js';
|
|
3
|
+
import type { QuantityIdentification } from './compose.js';
|
|
4
|
+
import type { DiscoveryOptions } from './discovery.js';
|
|
1
5
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* EVERY registry axis (gated or not), measures how often the axis FIRES (both
|
|
8
|
-
* endpoints carry the attribute and they differ → an axis-clash), ABSTAINS (at
|
|
9
|
-
* least one endpoint lacks the attribute), and is CHECKED (both carry it).
|
|
6
|
+
* The level at which an axis is `earned`: 0.05, the conventional two-sided level, fixed before
|
|
7
|
+
* any table was read. Six axes are audited at once, so a reader who wants a family-wise level
|
|
8
|
+
* divides by six (0.0083); the flag is per axis and says so here rather than hiding a
|
|
9
|
+
* correction. Small tables (about twenty magnitude clashes on the catalog) are why the test is
|
|
10
|
+
* exact and not a χ².
|
|
10
11
|
*
|
|
11
|
-
*
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export declare const AUDIT_ALPHA = 0.05;
|
|
15
|
+
/**
|
|
16
|
+
* Fisher's exact evidence of one axis against the magnitude falsifier, over the candidates
|
|
17
|
+
* where BOTH gates ran (both endpoints carry the axis, and both have a magnitude).
|
|
15
18
|
*
|
|
16
|
-
* @
|
|
19
|
+
* @internal
|
|
17
20
|
*/
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
export interface AxisEvidence {
|
|
22
|
+
/**
|
|
23
|
+
* `[[fires ∧ clash, fires ∧ no clash], [silent ∧ clash, silent ∧ no clash]]`: rows are the
|
|
24
|
+
* axis's verdict, columns the magnitude falsifier's.
|
|
25
|
+
*/
|
|
26
|
+
readonly table: readonly [readonly [number, number], readonly [number, number]];
|
|
27
|
+
/** Sample odds ratio `ad/bc`, as MathTS reports it; `null` when a zero cell leaves it undefined. */
|
|
28
|
+
readonly oddsRatio: number | null;
|
|
29
|
+
/** Two-sided Fisher exact p; 1 when a margin is zero (only one table is possible). */
|
|
30
|
+
readonly pValue: number;
|
|
31
|
+
/** Candidates where both gates ran (the table's total). */
|
|
32
|
+
readonly n: number;
|
|
33
|
+
}
|
|
21
34
|
/** Per-axis discrimination measurement over the candidate funnel. @internal */
|
|
22
35
|
export interface AxisDiscrimination {
|
|
23
36
|
readonly axis: string;
|
|
@@ -32,15 +45,29 @@ export interface AxisDiscrimination {
|
|
|
32
45
|
/** fires / checked (0 when nothing is checked). */
|
|
33
46
|
readonly clashRate: number;
|
|
34
47
|
/**
|
|
35
|
-
*
|
|
36
|
-
* = inert (do not gate); `false` on a gated axis = a regression to investigate.
|
|
48
|
+
* The registry's criterion: a gate is EARNED when the axis fires at all. `false` here on an
|
|
49
|
+
* ungated axis = inert (do not gate); `false` on a gated axis = a regression to investigate.
|
|
50
|
+
* Not changed by `evidence`.
|
|
37
51
|
*/
|
|
38
52
|
readonly discriminates: boolean;
|
|
53
|
+
/** Fisher's exact test of the axis's fires against the magnitude falsifier's clashes. */
|
|
54
|
+
readonly evidence: AxisEvidence;
|
|
55
|
+
/**
|
|
56
|
+
* The axis's fires coincide with the independent falsifier's clashes more often than chance:
|
|
57
|
+
* `evidence.pValue < AUDIT_ALPHA` AND the association is positive (`a·d > b·c`; an axis whose
|
|
58
|
+
* fires avoid the clashes is not earned, however small its p). Reported beside
|
|
59
|
+
* `discriminates`; it changes no gate.
|
|
60
|
+
*/
|
|
61
|
+
readonly earned: boolean;
|
|
39
62
|
}
|
|
63
|
+
/** The inputs of the magnitude gate an audit may override (a synthetic table for a test). @internal */
|
|
64
|
+
export type AxisAuditOptions = Pick<DiscoveryOptions, 'representativeValues' | 'groundTruth' | 'maxOrdersOfMagnitude'>;
|
|
40
65
|
/**
|
|
41
|
-
* Audit every registry axis's discrimination over the discovery candidate funnel
|
|
66
|
+
* Audit every registry axis's discrimination over the discovery candidate funnel, with Fisher
|
|
67
|
+
* evidence against the magnitude falsifier. The magnitude gate runs once per candidate from one
|
|
68
|
+
* discovery context (`buildDiscoveryContext`), not the whole funnel.
|
|
42
69
|
*
|
|
43
70
|
* @internal
|
|
44
71
|
*/
|
|
45
|
-
export declare function auditAxisDiscrimination(edges: readonly BridgeEdge[], attributesByName?: ReadonlyMap<string, RegimeAttributes>, identifications?: readonly QuantityIdentification[]): AxisDiscrimination[];
|
|
72
|
+
export declare function auditAxisDiscrimination(edges: readonly BridgeEdge[], attributesByName?: ReadonlyMap<string, RegimeAttributes>, identifications?: readonly QuantityIdentification[], options?: AxisAuditOptions): AxisDiscrimination[];
|
|
46
73
|
//# sourceMappingURL=axis-audit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axis-audit.d.ts","sourceRoot":"","sources":["../../src/composition/axis-audit.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"axis-audit.d.ts","sourceRoot":"","sources":["../../src/composition/axis-audit.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAK3D,OAAO,KAAK,EAAE,gBAAg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AgB,GAAE,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAA+B,EACrF,eAAe,GAAE,SAAS,sBAAsB,EAA6B,EAC7E,OAAO,GAAE,gBAAqB,GAC7B,kBAAkB,EAAE,CAuDtB"}
|
|
@@ -1,31 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Axis-discrimination audit — the anti-inert-metadata gate for the extensible
|
|
3
|
+
* axis registry (`axes.ts`).
|
|
4
|
+
*
|
|
5
|
+
* A classification axis is only load-bearing when it actually SEPARATES real
|
|
6
|
+
* candidates. This audit runs the discovery link-candidate enumeration and, for
|
|
7
|
+
* EVERY registry axis (gated or not), measures how often the axis FIRES (both
|
|
8
|
+
* endpoints carry the attribute and they differ → an axis-clash), ABSTAINS (at
|
|
9
|
+
* least one endpoint lacks the attribute), and is CHECKED (both carry it).
|
|
10
|
+
*
|
|
11
|
+
* Beside the firing count, each axis carries EVIDENCE: Fisher's exact test (MathTS
|
|
12
|
+
* `fisherExact`) of its fires against the clashes of the INDEPENDENT magnitude falsifier
|
|
13
|
+
* (`discovery.ts`, `magnitudeGate`) over the candidates where both gates ran, and an `earned`
|
|
14
|
+
* flag at {@link AUDIT_ALPHA}. Firing is activity; agreeing with an independent falsifier more
|
|
15
|
+
* often than chance is evidence. The `discriminates` flag (fires > 0) is the registry's current
|
|
16
|
+
* criterion and is not changed by the evidence; `GATE_AXES` reads the registry, not this audit.
|
|
17
|
+
*
|
|
18
|
+
* Use: an axis stays `gated: false` in the registry until this audit shows it
|
|
19
|
+
* fires; an axis that only ever abstains is inert and must not be gated. As the
|
|
20
|
+
* catalog grows into new branches of physics, re-run this and flip the gates the
|
|
21
|
+
* measurement earns. Rank grows on evidence, not vision.
|
|
22
|
+
*
|
|
23
|
+
* @module composition/axis-audit
|
|
24
|
+
*/
|
|
25
|
+
import { fisherExact } from '@danielsimonjr/mathts-functions';
|
|
1
26
|
import { AXES } from './axes.js';
|
|
2
27
|
import { proposeLinkCandidates } from './bridge-analysis.js';
|
|
3
28
|
import { effectiveAttributes, QUANTITY_IDENTIFICATIONS } from './compose.js';
|
|
4
|
-
import { REGISTRY_ATTRIBUTES_BY_NAME } from './discovery.js';
|
|
29
|
+
import { buildDiscoveryContext, magnitudeGate, REGISTRY_ATTRIBUTES_BY_NAME } from './discovery.js';
|
|
30
|
+
/**
|
|
31
|
+
* The level at which an axis is `earned`: 0.05, the conventional two-sided level, fixed before
|
|
32
|
+
* any table was read. Six axes are audited at once, so a reader who wants a family-wise level
|
|
33
|
+
* divides by six (0.0083); the flag is per axis and says so here rather than hiding a
|
|
34
|
+
* correction. Small tables (about twenty magnitude clashes on the catalog) are why the test is
|
|
35
|
+
* exact and not a χ².
|
|
36
|
+
*
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
export const AUDIT_ALPHA = 0.05;
|
|
40
|
+
/** The one Fisher call, read back for what MathTS returns: a number or `null` odds ratio, a number p. */
|
|
41
|
+
function fisher(table) {
|
|
42
|
+
const r = fisherExact([[...table[0]], [...table[1]]]);
|
|
43
|
+
const oddsRatio = r.oddsRatio;
|
|
44
|
+
const pValue = r.pValue;
|
|
45
|
+
if (typeof pValue !== 'number' || !(pValue >= 0 && pValue <= 1)) {
|
|
46
|
+
throw new TypeError(`fisherExact returned p = ${String(pValue)} for ${JSON.stringify(table)}`);
|
|
47
|
+
}
|
|
48
|
+
return { oddsRatio: typeof oddsRatio === 'number' && Number.isFinite(oddsRatio) ? oddsRatio : null, pValue };
|
|
49
|
+
}
|
|
5
50
|
/**
|
|
6
|
-
* Audit every registry axis's discrimination over the discovery candidate funnel
|
|
51
|
+
* Audit every registry axis's discrimination over the discovery candidate funnel, with Fisher
|
|
52
|
+
* evidence against the magnitude falsifier. The magnitude gate runs once per candidate from one
|
|
53
|
+
* discovery context (`buildDiscoveryContext`), not the whole funnel.
|
|
7
54
|
*
|
|
8
55
|
* @internal
|
|
9
56
|
*/
|
|
10
|
-
export function auditAxisDiscrimination(edges, attributesByName = REGISTRY_ATTRIBUTES_BY_NAME, identifications = QUANTITY_IDENTIFICATIONS) {
|
|
57
|
+
export function auditAxisDiscrimination(edges, attributesByName = REGISTRY_ATTRIBUTES_BY_NAME, identifications = QUANTITY_IDENTIFICATIONS, options = {}) {
|
|
11
58
|
const candidates = proposeLinkCandidates(edges);
|
|
59
|
+
const ctx = buildDiscoveryContext(edges, { ...options, identifications, quantityAttributes: attributesByName });
|
|
60
|
+
const magnitudes = candidates.map((c) => magnitudeGate(c, ctx));
|
|
12
61
|
return AXES.map((spec) => {
|
|
13
62
|
let checked = 0;
|
|
14
63
|
let fires = 0;
|
|
15
64
|
let abstains = 0;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
65
|
+
// The 2×2 table over candidates where both gates ran.
|
|
66
|
+
let a = 0; // fires ∧ clash
|
|
67
|
+
let b = 0; // fires ∧ no clash
|
|
68
|
+
let c = 0; // silent ∧ clash
|
|
69
|
+
let d = 0; // silent ∧ no clash
|
|
70
|
+
candidates.forEach((cand, i) => {
|
|
71
|
+
const attrsA = effectiveAttributes(cand.a, attributesByName, identifications);
|
|
72
|
+
const attrsB = effectiveAttributes(cand.b, attributesByName, identifications);
|
|
19
73
|
const av = attrsA[spec.name];
|
|
20
74
|
const bv = attrsB[spec.name];
|
|
21
75
|
if (av === undefined || bv === undefined) {
|
|
22
76
|
abstains++;
|
|
23
|
-
|
|
77
|
+
return;
|
|
24
78
|
}
|
|
25
79
|
checked++;
|
|
26
|
-
|
|
80
|
+
const fired = av !== bv;
|
|
81
|
+
if (fired)
|
|
27
82
|
fires++;
|
|
28
|
-
|
|
83
|
+
const gate = magnitudes[i];
|
|
84
|
+
if (!gate.checked)
|
|
85
|
+
return; // the falsifier abstained: no row for this candidate
|
|
86
|
+
if (fired && gate.clash)
|
|
87
|
+
a++;
|
|
88
|
+
else if (fired)
|
|
89
|
+
b++;
|
|
90
|
+
else if (gate.clash)
|
|
91
|
+
c++;
|
|
92
|
+
else
|
|
93
|
+
d++;
|
|
94
|
+
});
|
|
95
|
+
const table = [
|
|
96
|
+
[a, b],
|
|
97
|
+
[c, d],
|
|
98
|
+
];
|
|
99
|
+
const { oddsRatio, pValue } = fisher(table);
|
|
29
100
|
return {
|
|
30
101
|
axis: spec.name,
|
|
31
102
|
gated: spec.gated,
|
|
@@ -34,6 +105,8 @@ export function auditAxisDiscrimination(edges, attributesByName = REGISTRY_ATTRI
|
|
|
34
105
|
abstains,
|
|
35
106
|
clashRate: checked > 0 ? fires / checked : 0,
|
|
36
107
|
discriminates: fires > 0,
|
|
108
|
+
evidence: { table, oddsRatio, pValue, n: a + b + c + d },
|
|
109
|
+
earned: pValue < AUDIT_ALPHA && a * d > b * c,
|
|
37
110
|
};
|
|
38
111
|
});
|
|
39
112
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axis-audit.js","sourceRoot":"","sources":["../../src/composition/axis-audit.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAsB7D;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CACrC,KAA4B,EAC5B,gBAAgB,GAA0C,2BAA2B,EACrF,eAAe,GAAsC,wBAAwB;IAE7E,MAAM,UAAU,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;IAChD,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACvB,IAAI,OAAO,GAAG,CAAC,CAAC;QAChB,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,IAAI,QAAQ,GAAG,CAAC,CAAC;QACjB,KAAK,MAAM,CAAC,IAAI,UAAU,EAAE,CAAC;YAC3B,MAAM,MAAM,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,eAAe,CAGxE,CAAC;YACF,MAAM,MAAM,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,eAAe,CAGxE,CAAC;YACF,MAAM,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC7B,MAAM,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC7B,IAAI,EAAE,KAAK,SAAS,IAAI,EAAE,KAAK,SAAS,EAAE,CAAC;gBACzC,QAAQ,EAAE,CAAC;gBACX,SAAS;YACX,CAAC;YACD,OAAO,EAAE,CAAC;YACV,IAAI,EAAE,KAAK,EAAE;gBAAE,KAAK,EAAE,CAAC;QACzB,CAAC;QACD,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,OAAO;YACP,KAAK;YACL,QAAQ;YACR,SAAS,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YAC5C,aAAa,EAAE,KAAK,GAAG,CAAC;SACzB,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["/**\n * Axis-discrimination audit — the anti-inert-metadata gate for the extensible\n * axis registry (`axes.ts`).\n *\n * A classification axis is only load-bearing when it actually SEPARATES real\n * candidates. This audit runs the discovery link-candidate enumeration and, for\n * EVERY registry axis (gated or not), measures how often the axis FIRES (both\n * endpoints carry the attribute and they differ → an axis-clash), ABSTAINS (at\n * least one endpoint lacks the attribute), and is CHECKED (both carry it).\n *\n * Use: an axis stays `gated: false` in the registry until this audit shows it\n * fires; an axis that only ever abstains is inert and must not be gated. As the\n * catalog grows into new branches of physics, re-run this and flip the gates the\n * measurement earns. Rank grows on evidence, not vision.\n *\n * @module composition/axis-audit\n */\nimport type { BridgeEdge } from './edge.js';\nimport type { RegimeAttributes } from './quantity.js';\nimport type { QuantityIdentification } from './compose.js';\nimport { AXES } from './axes.js';\nimport { proposeLinkCandidates } from './bridge-analysis.js';\nimport { effectiveAttributes, QUANTITY_IDENTIFICATIONS } from './compose.js';\nimport { REGISTRY_ATTRIBUTES_BY_NAME } from './discovery.js';\n\n/** Per-axis discrimination measurement over the candidate funnel. @internal */\nexport interface AxisDiscrimination {\n readonly axis: string;\n /** The registry's current gate flag for this axis. */\n readonly gated: boolean;\n /** Candidate pairs where BOTH endpoints carry the attribute. */\n readonly checked: number;\n /** Of the checked pairs, how many DIFFER (the axis fires → a clash). */\n readonly fires: number;\n /** Pairs where at least one endpoint lacks the attribute (the axis abstains). */\n readonly abstains: number;\n /** fires / checked (0 when nothing is checked). */\n readonly clashRate: number;\n /**\n * A gate is EARNED when the axis fires at all. `false` here on an ungated axis\n * = inert (do not gate); `false` on a gated axis = a regression to investigate.\n */\n readonly discriminates: boolean;\n}\n\n/**\n * Audit every registry axis's discrimination over the discovery candidate funnel.\n *\n * @internal\n */\nexport function auditAxisDiscrimination(\n edges: readonly BridgeEdge[],\n attributesByName: ReadonlyMap<string, RegimeAttributes> = REGISTRY_ATTRIBUTES_BY_NAME,\n identifications: readonly QuantityIdentification[] = QUANTITY_IDENTIFICATIONS,\n): AxisDiscrimination[] {\n const candidates = proposeLinkCandidates(edges);\n return AXES.map((spec) => {\n let checked = 0;\n let fires = 0;\n let abstains = 0;\n for (const c of candidates) {\n const attrsA = effectiveAttributes(c.a, attributesByName, identifications) as Record<\n string,\n string | undefined\n >;\n const attrsB = effectiveAttributes(c.b, attributesByName, identifications) as Record<\n string,\n string | undefined\n >;\n const av = attrsA[spec.name];\n const bv = attrsB[spec.name];\n if (av === undefined || bv === undefined) {\n abstains++;\n continue;\n }\n checked++;\n if (av !== bv) fires++;\n }\n return {\n axis: spec.name,\n gated: spec.gated,\n checked,\n fires,\n abstains,\n clashRate: checked > 0 ? fires / checked : 0,\n discriminates: fires > 0,\n };\n });\n}\n"]}
|
|
1
|
+
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cesContent":["/**\n * Axis-discrimination audit — the anti-inert-metadata gate for the extensible\n * axis registry (`axes.ts`).\n *\n * A classification axis is only load-bearing when it actually SEPARATES real\n * candidates. This audit runs the discovery link-candidate enumeration and, for\n * EVERY registry axis (gated or not), measures how often the axis FIRES (both\n * endpoints carry the attribute and they differ → an axis-clash), ABSTAINS (at\n * least one endpoint lacks the attribute), and is CHECKED (both carry it).\n *\n * Beside the firing count, each axis carries EVIDENCE: Fisher's exact test (MathTS\n * `fisherExact`) of its fires against the clashes of the INDEPENDENT magnitude falsifier\n * (`discovery.ts`, `magnitudeGate`) over the candidates where both gates ran, and an `earned`\n * flag at {@link AUDIT_ALPHA}. Firing is activity; agreeing with an independent falsifier more\n * often than chance is evidence. The `discriminates` flag (fires > 0) is the registry's current\n * criterion and is not changed by the evidence; `GATE_AXES` reads the registry, not this audit.\n *\n * Use: an axis stays `gated: false` in the registry until this audit shows it\n * fires; an axis that only ever abstains is inert and must not be gated. As the\n * catalog grows into new branches of physics, re-run this and flip the gates the\n * measurement earns. Rank grows on evidence, not vision.\n *\n * @module composition/axis-audit\n */\nimport { fisherExact } from '@danielsimonjr/mathts-functions';\nimport type { BridgeEdge } from './edge.js';\nimport type { RegimeAttributes } from './quantity.js';\nimport type { QuantityIdentification } from './compose.js';\nimport { AXES } from './axes.js';\nimport { proposeLinkCandidates } from './bridge-analysis.js';\nimport { effectiveAttributes, QUANTITY_IDENTIFICATIONS } from './compose.js';\nimport { buildDiscoveryContext, magnitudeGate, REGISTRY_ATTRIBUTES_BY_NAME } from './discovery.js';\nimport type { DiscoveryOptions } from './discovery.js';\n\n/**\n * The level at which an axis is `earned`: 0.05, the conventional two-sided level, fixed before\n * any table was read. Six axes are audited at once, so a reader who wants a family-wise level\n * divides by six (0.0083); the flag is per axis and says so here rather than hiding a\n * correction. Small tables (about twenty magnitude clashes on the catalog) are why the test is\n * exact and not a χ².\n *\n * @internal\n */\nexport const AUDIT_ALPHA = 0.05;\n\n/**\n * Fisher's exact evidence of one axis against the magnitude falsifier, over the candidates\n * where BOTH gates ran (both endpoints carry the axis, and both have a magnitude).\n *\n * @internal\n */\nexport interface AxisEvidence {\n /**\n * `[[fires ∧ clash, fires ∧ no clash], [silent ∧ clash, silent ∧ no clash]]`: rows are the\n * axis's verdict, columns the magnitude falsifier's.\n */\n readonly table: readonly [readonly [number, number], readonly [number, number]];\n /** Sample odds ratio `ad/bc`, as MathTS reports it; `null` when a zero cell leaves it undefined. */\n readonly oddsRatio: number | null;\n /** Two-sided Fisher exact p; 1 when a margin is zero (only one table is possible). */\n readonly pValue: number;\n /** Candidates where both gates ran (the table's total). */\n readonly n: number;\n}\n\n/** Per-axis discrimination measurement over the candidate funnel. @internal */\nexport interface AxisDiscrimination {\n readonly axis: string;\n /** The registry's current gate flag for this axis. */\n readonly gated: boolean;\n /** Candidate pairs where BOTH endpoints carry the attribute. */\n readonly checked: number;\n /** Of the checked pairs, how many DIFFER (the axis fires → a clash). */\n readonly fires: number;\n /** Pairs where at least one endpoint lacks the attribute (the axis abstains). */\n readonly abstains: number;\n /** fires / checked (0 when nothing is checked). */\n readonly clashRate: number;\n /**\n * The registry's criterion: a gate is EARNED when the axis fires at all. `false` here on an\n * ungated axis = inert (do not gate); `false` on a gated axis = a regression to investigate.\n * Not changed by `evidence`.\n */\n readonly discriminates: boolean;\n /** Fisher's exact test of the axis's fires against the magnitude falsifier's clashes. */\n readonly evidence: AxisEvidence;\n /**\n * The axis's fires coincide with the independent falsifier's clashes more often than chance:\n * `evidence.pValue < AUDIT_ALPHA` AND the association is positive (`a·d > b·c`; an axis whose\n * fires avoid the clashes is not earned, however small its p). Reported beside\n * `discriminates`; it changes no gate.\n */\n readonly earned: boolean;\n}\n\n/** The inputs of the magnitude gate an audit may override (a synthetic table for a test). @internal */\nexport type AxisAuditOptions = Pick<DiscoveryOptions, 'representativeValues' | 'groundTruth' | 'maxOrdersOfMagnitude'>;\n\n/** The one Fisher call, read back for what MathTS returns: a number or `null` odds ratio, a number p. */\nfunction fisher(table: AxisEvidence['table']): Pick<AxisEvidence, 'oddsRatio' | 'pValue'> {\n const r = fisherExact([[...table[0]], [...table[1]]]);\n const oddsRatio: unknown = r.oddsRatio;\n const pValue: unknown = r.pValue;\n if (typeof pValue !== 'number' || !(pValue >= 0 && pValue <= 1)) {\n throw new TypeError(`fisherExact returned p = ${String(pValue)} for ${JSON.stringify(table)}`);\n }\n return { oddsRatio: typeof oddsRatio === 'number' && Number.isFinite(oddsRatio) ? oddsRatio : null, pValue };\n}\n\n/**\n * Audit every registry axis's discrimination over the discovery candidate funnel, with Fisher\n * evidence against the magnitude falsifier. The magnitude gate runs once per candidate from one\n * discovery context (`buildDiscoveryContext`), not the whole funnel.\n *\n * @internal\n */\nexport function auditAxisDiscrimination(\n edges: readonly BridgeEdge[],\n attributesByName: ReadonlyMap<string, RegimeAttributes> = REGISTRY_ATTRIBUTES_BY_NAME,\n identifications: readonly QuantityIdentification[] = QUANTITY_IDENTIFICATIONS,\n options: AxisAuditOptions = {},\n): AxisDiscrimination[] {\n const candidates = proposeLinkCandidates(edges);\n const ctx = buildDiscoveryContext(edges, { ...options, identifications, quantityAttributes: attributesByName });\n const magnitudes = candidates.map((c) => magnitudeGate(c, ctx));\n return AXES.map((spec) => {\n let checked = 0;\n let fires = 0;\n let abstains = 0;\n // The 2×2 table over candidates where both gates ran.\n let a = 0; // fires ∧ clash\n let b = 0; // fires ∧ no clash\n let c = 0; // silent ∧ clash\n let d = 0; // silent ∧ no clash\n candidates.forEach((cand, i) => {\n const attrsA = effectiveAttributes(cand.a, attributesByName, identifications) as Record<\n string,\n string | undefined\n >;\n const attrsB = effectiveAttributes(cand.b, attributesByName, identifications) as Record<\n string,\n string | undefined\n >;\n const av = attrsA[spec.name];\n const bv = attrsB[spec.name];\n if (av === undefined || bv === undefined) {\n abstains++;\n return;\n }\n checked++;\n const fired = av !== bv;\n if (fired) fires++;\n const gate = magnitudes[i];\n if (!gate.checked) return; // the falsifier abstained: no row for this candidate\n if (fired && gate.clash) a++;\n else if (fired) b++;\n else if (gate.clash) c++;\n else d++;\n });\n const table: AxisEvidence['table'] = [\n [a, b],\n [c, d],\n ];\n const { oddsRatio, pValue } = fisher(table);\n return {\n axis: spec.name,\n gated: spec.gated,\n checked,\n fires,\n abstains,\n clashRate: checked > 0 ? fires / checked : 0,\n discriminates: fires > 0,\n evidence: { table, oddsRatio, pValue, n: a + b + c + d },\n earned: pValue < AUDIT_ALPHA && a * d > b * c,\n };\n });\n}\n"]}
|
|
@@ -30,6 +30,21 @@ import type { BridgeEdge } from './edge.js';
|
|
|
30
30
|
* dimensionless statement (monomial or decoy); k = monomial × F(k ratios).
|
|
31
31
|
*/
|
|
32
32
|
export declare function dimensionalFreedom(e: BridgeEdge): number;
|
|
33
|
+
/**
|
|
34
|
+
* The exact form of a clean dimensionless prefactor, or `undefined` when
|
|
35
|
+
* the number is not one. A prefactor `r` is clean when `r = p / (π^a · ln2^b)`
|
|
36
|
+
* for `a ∈ −2..2`, `b ∈ −1..1` and a rational `p` with denominator at most
|
|
37
|
+
* 720, and numerator at most 720, that reproduces it to the relative 1e-9 the
|
|
38
|
+
* derivation fit uses; or
|
|
39
|
+
* when `r²` is, which names `√π`, `√(2π)` and their kin. The simplest
|
|
40
|
+
* `(a, b)` that fits is the one reported, so `2` is `2` and not `2π/π`.
|
|
41
|
+
* The rule replaces a list of seventeen constants matched at 1e-3; `9/8`
|
|
42
|
+
* (be-80) and `π/ln 2` (be-84) were not on it, and `π²/60`, the
|
|
43
|
+
* Stefan–Boltzmann closed form, is a hit under this rule.
|
|
44
|
+
*
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
export declare function cleanPrefactorForm(p: number): string | undefined;
|
|
33
48
|
/**
|
|
34
49
|
* The outcome of trying to derive a bridge dimensionally + verify it.
|
|
35
50
|
* `not-a-monomial` means the encoded formula adds dimensionful terms, so a
|
|
@@ -43,6 +58,8 @@ interface DerivationResult {
|
|
|
43
58
|
readonly prefactor?: number;
|
|
44
59
|
/** True when derived AND the prefactor is a recognizable constant. */
|
|
45
60
|
readonly cleanPrefactor?: boolean;
|
|
61
|
+
/** The exact form of a clean prefactor (`9/8`, `π/ln 2`); absent when it is not clean. */
|
|
62
|
+
readonly prefactorForm?: string;
|
|
46
63
|
}
|
|
47
64
|
/**
|
|
48
65
|
* Attempt to derive a bridge: the first constant-subset that dimensionally
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge-analysis.d.ts","sourceRoot":"","sources":["../../src/composition/bridge-analysis.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;
|
|
1
|
+
{"version":3,"file":"bridge-analysis.d.ts","sourceRoot":"","sources":["../../src/composition/bridge-analysis.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AASH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAyE5C;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,UAAU,GAAG,MAAM,CAOxD;AA4FD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAkBhE;AAuBD;;;;GAIG;AACH,KAAK,gBAAgB,GACjB,SAAS,GACT,OAAO,GACP,MAAM,GACN,YAAY,GACZ,gBAAgB,GAChB,mBAAmB,CAAC;AACxB,UAAU,gBAAgB;IACxB,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAClC,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACrD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,sEAAsE;IACtE,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC,0FAA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