universal-physics-tensor 9.0.0 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -17
- package/bin/upt.mjs +13 -1
- package/data/atlas/atlas.json +79 -68
- package/data/atlas/atlas.jsonld +1 -1
- package/data/atlas/diffusion.json +24 -23
- package/data/atlas/oscillators.json +21 -16
- package/data/atlas/waves.json +36 -31
- package/data/atlas/witness-results.json +11 -11
- package/data/bridge-catalog.json +1192 -1636
- package/data/bridge-catalog.schema.json +390 -135
- package/data/quantities.json +53 -19
- package/data/schemas/atlas-record.v0.json +184 -46
- package/data/units.json +33 -4
- package/dist/atlas/applicability.d.ts.map +1 -1
- package/dist/atlas/applicability.js +35 -18
- package/dist/atlas/applicability.js.map +1 -1
- package/dist/atlas/association.js.map +1 -1
- package/dist/atlas/benchmark/backend-shapes.d.ts.map +1 -1
- package/dist/atlas/benchmark/backend-shapes.js +5 -1
- package/dist/atlas/benchmark/backend-shapes.js.map +1 -1
- package/dist/atlas/benchmark/baselines.d.ts.map +1 -1
- package/dist/atlas/benchmark/baselines.js +8 -0
- package/dist/atlas/benchmark/baselines.js.map +1 -1
- package/dist/atlas/benchmark/hybrid-retrieval.d.ts +12 -3
- package/dist/atlas/benchmark/hybrid-retrieval.d.ts.map +1 -1
- package/dist/atlas/benchmark/hybrid-retrieval.js +30 -21
- package/dist/atlas/benchmark/hybrid-retrieval.js.map +1 -1
- package/dist/atlas/benchmark/leakage.js.map +1 -1
- package/dist/atlas/benchmark/loader.js +2 -2
- package/dist/atlas/benchmark/loader.js.map +1 -1
- package/dist/atlas/benchmark/run-atlas.d.ts.map +1 -1
- package/dist/atlas/benchmark/run-atlas.js +14 -2
- package/dist/atlas/benchmark/run-atlas.js.map +1 -1
- package/dist/atlas/benchmark/stats.d.ts +3 -3
- package/dist/atlas/benchmark/stats.d.ts.map +1 -1
- package/dist/atlas/benchmark/stats.js +16 -8
- package/dist/atlas/benchmark/stats.js.map +1 -1
- package/dist/atlas/benchmark/study.js.map +1 -1
- package/dist/atlas/benchmark/types.js.map +1 -1
- package/dist/atlas/bridge-record.d.ts +4 -4
- package/dist/atlas/bridge-record.d.ts.map +1 -1
- package/dist/atlas/bridge-record.js +6 -6
- package/dist/atlas/bridge-record.js.map +1 -1
- package/dist/atlas/catalog-formal-ref.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 +0 -11
- package/dist/atlas/chain-pipeline.d.ts.map +1 -1
- package/dist/atlas/chain-pipeline.js +12 -24
- package/dist/atlas/chain-pipeline.js.map +1 -1
- package/dist/atlas/composition-table.js.map +1 -1
- package/dist/atlas/conventions.js.map +1 -1
- package/dist/atlas/coverage.d.ts +2 -2
- package/dist/atlas/coverage.js.map +1 -1
- package/dist/atlas/derivation.js.map +1 -1
- package/dist/atlas/derive-evidence.d.ts +6 -4
- package/dist/atlas/derive-evidence.d.ts.map +1 -1
- package/dist/atlas/derive-evidence.js +7 -2
- package/dist/atlas/derive-evidence.js.map +1 -1
- package/dist/atlas/diffusion/bridges-closure.d.ts +0 -4
- package/dist/atlas/diffusion/bridges-closure.d.ts.map +1 -1
- package/dist/atlas/diffusion/bridges-closure.js +8 -17
- 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 -42
- 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/index.d.ts +1 -1
- package/dist/atlas/diffusion/index.d.ts.map +1 -1
- package/dist/atlas/diffusion/index.js.map +1 -1
- package/dist/atlas/diffusion/models.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/error-algebra.d.ts +6 -0
- package/dist/atlas/error-algebra.d.ts.map +1 -1
- package/dist/atlas/error-algebra.js +26 -0
- package/dist/atlas/error-algebra.js.map +1 -1
- package/dist/atlas/export.d.ts +18 -2
- package/dist/atlas/export.d.ts.map +1 -1
- package/dist/atlas/export.js +9 -3
- package/dist/atlas/export.js.map +1 -1
- package/dist/atlas/families.d.ts +19 -2
- package/dist/atlas/families.d.ts.map +1 -1
- package/dist/atlas/families.js +26 -3
- package/dist/atlas/families.js.map +1 -1
- package/dist/atlas/family.d.ts +27 -0
- package/dist/atlas/family.d.ts.map +1 -0
- package/dist/atlas/family.js +12 -0
- package/dist/atlas/family.js.map +1 -0
- package/dist/atlas/index.d.ts +3 -2
- package/dist/atlas/index.d.ts.map +1 -1
- package/dist/atlas/index.js +2 -1
- package/dist/atlas/index.js.map +1 -1
- package/dist/atlas/link-prediction.d.ts +107 -4
- 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/model.js.map +1 -1
- package/dist/atlas/oscillators/bridges-coarse.d.ts.map +1 -1
- package/dist/atlas/oscillators/bridges-coarse.js +7 -12
- 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 -10
- 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 -36
- 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/index.d.ts +1 -16
- package/dist/atlas/oscillators/index.d.ts.map +1 -1
- package/dist/atlas/oscillators/index.js.map +1 -1
- package/dist/atlas/oscillators/limit-witnesses.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/norm-transport-witness.js.map +1 -1
- package/dist/atlas/oscillators/norm-transport.js.map +1 -1
- package/dist/atlas/oscillators/norms.js.map +1 -1
- package/dist/atlas/oscillators/pendulum-motion.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-carriage.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/path-bound.js.map +1 -1
- package/dist/atlas/physjs-entries.generated.d.ts +25 -24
- package/dist/atlas/physjs-entries.generated.d.ts.map +1 -1
- package/dist/atlas/physjs-entries.generated.js +25 -24
- package/dist/atlas/physjs-entries.generated.js.map +1 -1
- package/dist/atlas/physjs-ref.d.ts +107 -70
- package/dist/atlas/physjs-ref.d.ts.map +1 -1
- package/dist/atlas/physjs-ref.js +184 -101
- package/dist/atlas/physjs-ref.js.map +1 -1
- package/dist/atlas/physjs-reviewed.d.ts +31 -0
- package/dist/atlas/physjs-reviewed.d.ts.map +1 -0
- package/dist/atlas/physjs-reviewed.js +194 -0
- package/dist/atlas/physjs-reviewed.js.map +1 -0
- package/dist/atlas/poster/associations.js.map +1 -1
- package/dist/atlas/poster/derivations.js.map +1 -1
- package/dist/atlas/poster/statements.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/public.d.ts +2 -1
- package/dist/atlas/public.d.ts.map +1 -1
- package/dist/atlas/public.js +2 -1
- package/dist/atlas/public.js.map +1 -1
- package/dist/atlas/regime.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/serialize.d.ts +18 -12
- package/dist/atlas/serialize.d.ts.map +1 -1
- package/dist/atlas/serialize.js +28 -18
- package/dist/atlas/serialize.js.map +1 -1
- package/dist/atlas/statement.js.map +1 -1
- package/dist/atlas/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/translation-registry.js.map +1 -1
- package/dist/atlas/translation.js.map +1 -1
- package/dist/atlas/types.d.ts +9 -2
- package/dist/atlas/types.d.ts.map +1 -1
- package/dist/atlas/types.js +1 -1
- package/dist/atlas/types.js.map +1 -1
- package/dist/atlas/waves/bridges-closure.d.ts.map +1 -1
- package/dist/atlas/waves/bridges-closure.js +2 -9
- 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 -52
- package/dist/atlas/waves/bridges.js.map +1 -1
- package/dist/atlas/waves/index.d.ts +1 -1
- package/dist/atlas/waves/index.d.ts.map +1 -1
- package/dist/atlas/waves/index.js.map +1 -1
- package/dist/atlas/waves/models.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-artifact.js.map +1 -1
- package/dist/atlas/witness-dominance.d.ts +4 -3
- package/dist/atlas/witness-dominance.d.ts.map +1 -1
- package/dist/atlas/witness-dominance.js +15 -5
- package/dist/atlas/witness-dominance.js.map +1 -1
- package/dist/atlas/witness-numeric.d.ts +38 -4
- package/dist/atlas/witness-numeric.d.ts.map +1 -1
- package/dist/atlas/witness-numeric.js +80 -2
- package/dist/atlas/witness-numeric.js.map +1 -1
- package/dist/atlas/witness-result.d.ts +7 -1
- package/dist/atlas/witness-result.d.ts.map +1 -1
- package/dist/atlas/witness-result.js.map +1 -1
- package/dist/atlas/witness-specs.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/atlas/witnesses/quantum-support.js.map +1 -1
- package/dist/bridges/caller-table.d.ts +1 -1
- package/dist/bridges/caller-table.d.ts.map +1 -1
- package/dist/bridges/caller-table.js.map +1 -1
- package/dist/bridges/carrier-sign.d.ts.map +1 -1
- package/dist/bridges/carrier-sign.js +8 -3
- package/dist/bridges/carrier-sign.js.map +1 -1
- package/dist/bridges/catalog-adapter.d.ts +12 -3
- package/dist/bridges/catalog-adapter.d.ts.map +1 -1
- package/dist/bridges/catalog-adapter.js +17 -9
- package/dist/bridges/catalog-adapter.js.map +1 -1
- package/dist/bridges/catalog-load.d.ts +12 -2
- package/dist/bridges/catalog-load.d.ts.map +1 -1
- package/dist/bridges/catalog-load.js +181 -13
- package/dist/bridges/catalog-load.js.map +1 -1
- package/dist/bridges/catalog-types.d.ts +74 -26
- 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/coefficient-statement.js +1 -5
- package/dist/bridges/coefficient-statement.js.map +1 -1
- package/dist/bridges/confrontation-coverage.js.map +1 -1
- package/dist/bridges/confrontations.d.ts +1 -1
- package/dist/bridges/confrontations.d.ts.map +1 -1
- package/dist/bridges/confrontations.js +1 -1
- package/dist/bridges/confrontations.js.map +1 -1
- package/dist/bridges/evaluation-errors.d.ts +46 -3
- package/dist/bridges/evaluation-errors.d.ts.map +1 -1
- package/dist/bridges/evaluation-errors.js +40 -4
- 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 +17 -2
- package/dist/bridges/evaluators.d.ts.map +1 -1
- package/dist/bridges/evaluators.js +76 -28
- package/dist/bridges/evaluators.js.map +1 -1
- package/dist/bridges/expr-parse.d.ts +38 -4
- package/dist/bridges/expr-parse.d.ts.map +1 -1
- package/dist/bridges/expr-parse.js +101 -12
- package/dist/bridges/expr-parse.js.map +1 -1
- package/dist/bridges/holds.d.ts +40 -4
- package/dist/bridges/holds.d.ts.map +1 -1
- package/dist/bridges/holds.js +128 -19
- package/dist/bridges/holds.js.map +1 -1
- package/dist/bridges/index.d.ts +15 -14
- package/dist/bridges/index.d.ts.map +1 -1
- package/dist/bridges/index.js +14 -15
- package/dist/bridges/index.js.map +1 -1
- package/dist/bridges/input-contract.js.map +1 -1
- package/dist/bridges/membership.d.ts +5 -3
- package/dist/bridges/membership.d.ts.map +1 -1
- package/dist/bridges/membership.js +5 -6
- package/dist/bridges/membership.js.map +1 -1
- package/dist/bridges/notices.d.ts.map +1 -1
- package/dist/bridges/notices.js +5 -5
- package/dist/bridges/notices.js.map +1 -1
- package/dist/bridges/observations/types.js.map +1 -1
- package/dist/bridges/rejected.d.ts +11 -17
- package/dist/bridges/rejected.d.ts.map +1 -1
- package/dist/bridges/rejected.js +13 -68
- package/dist/bridges/rejected.js.map +1 -1
- package/dist/bridges/relation-eval.d.ts +6 -7
- package/dist/bridges/relation-eval.d.ts.map +1 -1
- package/dist/bridges/relation-eval.js +20 -50
- package/dist/bridges/relation-eval.js.map +1 -1
- package/dist/bridges/rhs-registry.js.map +1 -1
- package/dist/bridges/sensitivity.d.ts +11 -3
- package/dist/bridges/sensitivity.d.ts.map +1 -1
- package/dist/bridges/sensitivity.js +27 -13
- package/dist/bridges/sensitivity.js.map +1 -1
- package/dist/bridges/tensor-index.js.map +1 -1
- package/dist/bridges/types.d.ts +1 -7
- package/dist/bridges/types.d.ts.map +1 -1
- package/dist/bridges/types.js +1 -4
- package/dist/bridges/types.js.map +1 -1
- package/dist/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/canonical-equation.js.map +1 -1
- package/dist/canonical/dimensional-fields.js.map +1 -1
- package/dist/canonical/entries/_l1-build.js.map +1 -1
- package/dist/canonical/entries/atomic.js +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 +8 -9
- 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 +5 -6
- 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 +6 -12
- 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 +38 -39
- 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/statistical-mechanics.js +5 -5
- package/dist/canonical/entries/statistical-mechanics.js.map +1 -1
- package/dist/canonical/entries/thermo-nuclear-cosmo.d.ts.map +1 -1
- package/dist/canonical/entries/thermo-nuclear-cosmo.js +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 +29 -4
- package/dist/canonical/linkage.d.ts.map +1 -1
- package/dist/canonical/linkage.js +47 -64
- package/dist/canonical/linkage.js.map +1 -1
- package/dist/canonical/normal-form.d.ts +0 -8
- package/dist/canonical/normal-form.d.ts.map +1 -1
- package/dist/canonical/normal-form.js +22 -23
- package/dist/canonical/normal-form.js.map +1 -1
- package/dist/canonical/registry.js.map +1 -1
- package/dist/canonical/residual.js.map +1 -1
- package/dist/canonical/seed-l-layer.d.ts +7 -1
- package/dist/canonical/seed-l-layer.d.ts.map +1 -1
- package/dist/canonical/seed-l-layer.js +7 -1
- package/dist/canonical/seed-l-layer.js.map +1 -1
- package/dist/canonical/structural.d.ts +42 -21
- package/dist/canonical/structural.d.ts.map +1 -1
- package/dist/canonical/structural.js +64 -23
- package/dist/canonical/structural.js.map +1 -1
- package/dist/cases/brownian-sphere.d.ts +3 -3
- package/dist/cases/brownian-sphere.d.ts.map +1 -1
- package/dist/cases/brownian-sphere.js +10 -9
- package/dist/cases/brownian-sphere.js.map +1 -1
- package/dist/cases/damped-resonator.d.ts.map +1 -1
- package/dist/cases/damped-resonator.js +8 -11
- package/dist/cases/damped-resonator.js.map +1 -1
- package/dist/cases/index.js.map +1 -1
- package/dist/cases/kepler-rv.d.ts +1 -1
- package/dist/cases/kepler-rv.d.ts.map +1 -1
- package/dist/cases/kepler-rv.js +3 -2
- package/dist/cases/kepler-rv.js.map +1 -1
- package/dist/cases/lumped-cooling.d.ts +8 -3
- package/dist/cases/lumped-cooling.d.ts.map +1 -1
- package/dist/cases/lumped-cooling.js +22 -24
- package/dist/cases/lumped-cooling.js.map +1 -1
- package/dist/cases/quadrature.d.ts +7 -9
- package/dist/cases/quadrature.d.ts.map +1 -1
- package/dist/cases/quadrature.js +28 -32
- package/dist/cases/quadrature.js.map +1 -1
- package/dist/cases/resistor-noise.js +7 -7
- package/dist/cases/resistor-noise.js.map +1 -1
- package/dist/cases/skin-depth.d.ts +0 -4
- package/dist/cases/skin-depth.d.ts.map +1 -1
- package/dist/cases/skin-depth.js +3 -7
- package/dist/cases/skin-depth.js.map +1 -1
- package/dist/cases/types.js.map +1 -1
- package/dist/cli/args.d.ts +30 -3
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +47 -9
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/bindings.d.ts +13 -0
- package/dist/cli/bindings.d.ts.map +1 -0
- package/dist/cli/bindings.js +33 -0
- package/dist/cli/bindings.js.map +1 -0
- package/dist/cli/closed-form-range.js.map +1 -1
- package/dist/cli/command.d.ts +8 -1
- package/dist/cli/command.d.ts.map +1 -1
- package/dist/cli/command.js.map +1 -1
- package/dist/cli/commands/_atlas-map.d.ts +2 -11
- package/dist/cli/commands/_atlas-map.d.ts.map +1 -1
- package/dist/cli/commands/_atlas-map.js +50 -35
- package/dist/cli/commands/_atlas-map.js.map +1 -1
- package/dist/cli/commands/_atlas-route.d.ts.map +1 -1
- package/dist/cli/commands/_atlas-route.js +6 -2
- package/dist/cli/commands/_atlas-route.js.map +1 -1
- package/dist/cli/commands/_discovery-opts.d.ts.map +1 -1
- package/dist/cli/commands/_discovery-opts.js +48 -14
- 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 +9 -8
- 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 +20 -20
- 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/candidates.d.ts.map +1 -1
- package/dist/cli/commands/candidates.js +16 -8
- package/dist/cli/commands/candidates.js.map +1 -1
- package/dist/cli/commands/canonical.js.map +1 -1
- package/dist/cli/commands/chain.js +1 -1
- package/dist/cli/commands/chain.js.map +1 -1
- package/dist/cli/commands/confront.d.ts.map +1 -1
- package/dist/cli/commands/confront.js +22 -20
- package/dist/cli/commands/confront.js.map +1 -1
- package/dist/cli/commands/connectors.js.map +1 -1
- package/dist/cli/commands/coverage.js.map +1 -1
- package/dist/cli/commands/derive.d.ts.map +1 -1
- package/dist/cli/commands/derive.js +60 -35
- 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 +20 -10
- 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 +14 -10
- package/dist/cli/commands/eval.js.map +1 -1
- package/dist/cli/commands/evaluate.d.ts.map +1 -1
- package/dist/cli/commands/evaluate.js +108 -58
- 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 +16 -8
- package/dist/cli/commands/explain.js.map +1 -1
- package/dist/cli/commands/frontier.js.map +1 -1
- package/dist/cli/commands/ground.d.ts.map +1 -1
- package/dist/cli/commands/ground.js +41 -10
- package/dist/cli/commands/ground.js.map +1 -1
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/map.d.ts.map +1 -1
- package/dist/cli/commands/map.js +155 -92
- package/dist/cli/commands/map.js.map +1 -1
- package/dist/cli/commands/metric.d.ts.map +1 -1
- package/dist/cli/commands/metric.js +58 -20
- 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 +29 -7
- package/dist/cli/commands/path.js.map +1 -1
- package/dist/cli/commands/predict.js.map +1 -1
- package/dist/cli/commands/priority.js.map +1 -1
- package/dist/cli/commands/probe.d.ts.map +1 -1
- package/dist/cli/commands/probe.js +105 -38
- package/dist/cli/commands/probe.js.map +1 -1
- package/dist/cli/commands/recover.js +1 -1
- package/dist/cli/commands/recover.js.map +1 -1
- package/dist/cli/commands/regime.d.ts +5 -4
- package/dist/cli/commands/regime.d.ts.map +1 -1
- package/dist/cli/commands/regime.js +25 -26
- package/dist/cli/commands/regime.js.map +1 -1
- package/dist/cli/commands/retrieve.d.ts.map +1 -1
- package/dist/cli/commands/retrieve.js +23 -14
- package/dist/cli/commands/retrieve.js.map +1 -1
- package/dist/cli/commands/search.d.ts.map +1 -1
- package/dist/cli/commands/search.js +9 -4
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/symbolic.js +31 -36
- 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 +5 -3
- package/dist/cli/commands/testplan.js.map +1 -1
- package/dist/cli/conventions.js.map +1 -1
- package/dist/cli/determination.js.map +1 -1
- package/dist/cli/errors.js.map +1 -1
- package/dist/cli/euler-guard.js.map +1 -1
- package/dist/cli/eval-numbers.js.map +1 -1
- package/dist/cli/expr-print.d.ts +28 -3
- package/dist/cli/expr-print.d.ts.map +1 -1
- package/dist/cli/expr-print.js +42 -22
- package/dist/cli/expr-print.js.map +1 -1
- package/dist/cli/flag-help.js.map +1 -1
- package/dist/cli/graphs.js.map +1 -1
- package/dist/cli/library-defaults.d.ts +19 -0
- package/dist/cli/library-defaults.d.ts.map +1 -0
- package/dist/cli/library-defaults.js +22 -0
- package/dist/cli/library-defaults.js.map +1 -0
- package/dist/cli/main.d.ts +7 -0
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +25 -6
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/map-evidence.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 +23 -6
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js +15 -0
- package/dist/cli/output.js.map +1 -1
- package/dist/cli/published-url.js.map +1 -1
- package/dist/cli/record-reach.d.ts +6 -0
- package/dist/cli/record-reach.d.ts.map +1 -1
- package/dist/cli/record-reach.js +17 -11
- 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 +7 -6
- 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 +40 -20
- package/dist/cli/record.js.map +1 -1
- package/dist/cli/search-index.d.ts +5 -0
- package/dist/cli/search-index.d.ts.map +1 -1
- package/dist/cli/search-index.js +19 -7
- package/dist/cli/search-index.js.map +1 -1
- package/dist/cli/statuses.d.ts +0 -2
- package/dist/cli/statuses.d.ts.map +1 -1
- package/dist/cli/statuses.js +0 -7
- package/dist/cli/statuses.js.map +1 -1
- package/dist/cli/stored-results.d.ts +7 -0
- package/dist/cli/stored-results.d.ts.map +1 -0
- package/dist/cli/stored-results.js +23 -0
- package/dist/cli/stored-results.js.map +1 -0
- package/dist/cli/top-level-help.js.map +1 -1
- package/dist/cli/version.d.ts.map +1 -1
- package/dist/cli/version.js +7 -5
- package/dist/cli/version.js.map +1 -1
- package/dist/cli-api.d.ts +49 -14
- package/dist/cli-api.d.ts.map +1 -1
- package/dist/cli-api.js +42 -17
- package/dist/cli-api.js.map +1 -1
- package/dist/composition/adjudication.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/aliases.js.map +1 -1
- package/dist/composition/audit-coverage.d.ts +2 -0
- package/dist/composition/audit-coverage.d.ts.map +1 -1
- package/dist/composition/audit-coverage.js.map +1 -1
- package/dist/composition/axes.d.ts +6 -0
- package/dist/composition/axes.d.ts.map +1 -1
- package/dist/composition/axes.js +18 -6
- package/dist/composition/axes.js.map +1 -1
- package/dist/composition/axis-audit.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 +14 -15
- package/dist/composition/bridge-analysis.d.ts.map +1 -1
- package/dist/composition/bridge-analysis.js +148 -91
- package/dist/composition/bridge-analysis.js.map +1 -1
- package/dist/composition/bridge-prediction.d.ts +5 -1
- package/dist/composition/bridge-prediction.d.ts.map +1 -1
- package/dist/composition/bridge-prediction.js +12 -16
- package/dist/composition/bridge-prediction.js.map +1 -1
- package/dist/composition/buckingham-filter.js.map +1 -1
- package/dist/composition/canonical-compare.d.ts +40 -0
- package/dist/composition/canonical-compare.d.ts.map +1 -1
- package/dist/composition/canonical-compare.js +134 -26
- package/dist/composition/canonical-compare.js.map +1 -1
- package/dist/composition/canonical-graph.d.ts +9 -10
- package/dist/composition/canonical-graph.d.ts.map +1 -1
- package/dist/composition/canonical-graph.js +33 -102
- 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/canonical-prefactors.js.map +1 -1
- package/dist/composition/catalog-graph.d.ts.map +1 -1
- package/dist/composition/catalog-graph.js +8 -25
- package/dist/composition/catalog-graph.js.map +1 -1
- package/dist/composition/chain-candidate.d.ts +10 -0
- package/dist/composition/chain-candidate.d.ts.map +1 -1
- package/dist/composition/chain-candidate.js +11 -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-regime.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-surface.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 +166 -41
- 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.map +1 -1
- package/dist/composition/consequence.js +15 -6
- package/dist/composition/consequence.js.map +1 -1
- package/dist/composition/consistency.js.map +1 -1
- package/dist/composition/descriptor.d.ts +1 -1
- package/dist/composition/descriptor.d.ts.map +1 -1
- package/dist/composition/descriptor.js.map +1 -1
- package/dist/composition/dimension-adjacency.js.map +1 -1
- package/dist/composition/discovery.d.ts +77 -11
- package/dist/composition/discovery.d.ts.map +1 -1
- package/dist/composition/discovery.js +194 -80
- package/dist/composition/discovery.js.map +1 -1
- package/dist/composition/edge.d.ts +40 -10
- package/dist/composition/edge.d.ts.map +1 -1
- package/dist/composition/edge.js +47 -12
- package/dist/composition/edge.js.map +1 -1
- package/dist/composition/enumerate.d.ts +2 -2
- package/dist/composition/enumerate.d.ts.map +1 -1
- package/dist/composition/enumerate.js +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 +5 -9
- package/dist/composition/explain.d.ts.map +1 -1
- package/dist/composition/explain.js +38 -18
- package/dist/composition/explain.js.map +1 -1
- package/dist/composition/expr-eval.d.ts.map +1 -1
- package/dist/composition/expr-eval.js +2 -11
- package/dist/composition/expr-eval.js.map +1 -1
- package/dist/composition/expr-simplify.d.ts +16 -0
- package/dist/composition/expr-simplify.d.ts.map +1 -1
- package/dist/composition/expr-simplify.js +24 -59
- package/dist/composition/expr-simplify.js.map +1 -1
- package/dist/composition/expr-subst.js.map +1 -1
- package/dist/composition/formula-shape.d.ts +28 -0
- package/dist/composition/formula-shape.d.ts.map +1 -1
- package/dist/composition/formula-shape.js +96 -2
- package/dist/composition/formula-shape.js.map +1 -1
- package/dist/composition/frontier-account.d.ts +3 -2
- package/dist/composition/frontier-account.d.ts.map +1 -1
- package/dist/composition/frontier-account.js +7 -3
- package/dist/composition/frontier-account.js.map +1 -1
- package/dist/composition/graph-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.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 +14 -8
- package/dist/composition/index.d.ts.map +1 -1
- package/dist/composition/index.js +7 -5
- package/dist/composition/index.js.map +1 -1
- package/dist/composition/mathts-quiet.d.ts +29 -0
- package/dist/composition/mathts-quiet.d.ts.map +1 -0
- package/dist/composition/mathts-quiet.js +57 -0
- package/dist/composition/mathts-quiet.js.map +1 -0
- package/dist/composition/mathts-scalar-symbols.d.ts.map +1 -1
- package/dist/composition/mathts-scalar-symbols.js +20 -35
- package/dist/composition/mathts-scalar-symbols.js.map +1 -1
- package/dist/composition/not-composable-seeds.d.ts +3 -1
- package/dist/composition/not-composable-seeds.d.ts.map +1 -1
- package/dist/composition/not-composable-seeds.js +2 -0
- package/dist/composition/not-composable-seeds.js.map +1 -1
- package/dist/composition/probe/backend-protocol.js.map +1 -1
- package/dist/composition/probe/candidate-store.js.map +1 -1
- package/dist/composition/probe/corpus.d.ts +4 -2
- package/dist/composition/probe/corpus.d.ts.map +1 -1
- package/dist/composition/probe/corpus.js +20 -9
- package/dist/composition/probe/corpus.js.map +1 -1
- package/dist/composition/probe/dataset.d.ts +17 -0
- package/dist/composition/probe/dataset.d.ts.map +1 -1
- package/dist/composition/probe/dataset.js +95 -50
- package/dist/composition/probe/dataset.js.map +1 -1
- package/dist/composition/probe/experiment-design.d.ts +5 -1
- package/dist/composition/probe/experiment-design.d.ts.map +1 -1
- package/dist/composition/probe/experiment-design.js +44 -24
- package/dist/composition/probe/experiment-design.js.map +1 -1
- package/dist/composition/probe/expression-gaps.js.map +1 -1
- package/dist/composition/probe/falsify.d.ts +14 -3
- package/dist/composition/probe/falsify.d.ts.map +1 -1
- package/dist/composition/probe/falsify.js +16 -27
- package/dist/composition/probe/falsify.js.map +1 -1
- package/dist/composition/probe/fingerprint.js.map +1 -1
- package/dist/composition/probe/fit.d.ts +7 -1
- package/dist/composition/probe/fit.d.ts.map +1 -1
- package/dist/composition/probe/fit.js +48 -23
- package/dist/composition/probe/fit.js.map +1 -1
- package/dist/composition/probe/frontier.d.ts.map +1 -1
- package/dist/composition/probe/frontier.js +33 -15
- package/dist/composition/probe/frontier.js.map +1 -1
- package/dist/composition/probe/generator.d.ts +27 -1
- package/dist/composition/probe/generator.d.ts.map +1 -1
- package/dist/composition/probe/generator.js +53 -30
- package/dist/composition/probe/generator.js.map +1 -1
- package/dist/composition/probe/index.d.ts +18 -2
- package/dist/composition/probe/index.d.ts.map +1 -1
- package/dist/composition/probe/index.js +10 -2
- package/dist/composition/probe/index.js.map +1 -1
- package/dist/composition/probe/limits.d.ts +24 -1
- package/dist/composition/probe/limits.d.ts.map +1 -1
- package/dist/composition/probe/limits.js +53 -11
- package/dist/composition/probe/limits.js.map +1 -1
- package/dist/composition/probe/metadata.js.map +1 -1
- package/dist/composition/probe/pipeline.d.ts +5 -0
- package/dist/composition/probe/pipeline.d.ts.map +1 -1
- package/dist/composition/probe/pipeline.js +22 -9
- package/dist/composition/probe/pipeline.js.map +1 -1
- package/dist/composition/probe/power-law.d.ts +121 -0
- package/dist/composition/probe/power-law.d.ts.map +1 -0
- package/dist/composition/probe/power-law.js +255 -0
- package/dist/composition/probe/power-law.js.map +1 -0
- package/dist/composition/probe/problem.d.ts +12 -1
- package/dist/composition/probe/problem.d.ts.map +1 -1
- package/dist/composition/probe/problem.js +242 -48
- package/dist/composition/probe/problem.js.map +1 -1
- package/dist/composition/probe/report.js +1 -1
- package/dist/composition/probe/report.js.map +1 -1
- package/dist/composition/probe/residual.d.ts +6 -1
- package/dist/composition/probe/residual.d.ts.map +1 -1
- package/dist/composition/probe/residual.js +9 -7
- package/dist/composition/probe/residual.js.map +1 -1
- package/dist/composition/probe/run-manifest.js +2 -2
- package/dist/composition/probe/run-manifest.js.map +1 -1
- package/dist/composition/probe/scoring.d.ts +2 -1
- package/dist/composition/probe/scoring.d.ts.map +1 -1
- package/dist/composition/probe/scoring.js +21 -7
- package/dist/composition/probe/scoring.js.map +1 -1
- package/dist/composition/probe/search-budget.js.map +1 -1
- package/dist/composition/probe/serialize.js.map +1 -1
- package/dist/composition/probe/structure.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 +35 -12
- package/dist/composition/probe/study.d.ts.map +1 -1
- package/dist/composition/probe/study.js +241 -184
- package/dist/composition/probe/study.js.map +1 -1
- package/dist/composition/probe/t-tail.d.ts +17 -0
- package/dist/composition/probe/t-tail.d.ts.map +1 -0
- package/dist/composition/probe/t-tail.js +32 -0
- package/dist/composition/probe/t-tail.js.map +1 -0
- package/dist/composition/probe/types.d.ts +6 -1
- package/dist/composition/probe/types.d.ts.map +1 -1
- package/dist/composition/probe/types.js +2 -0
- package/dist/composition/probe/types.js.map +1 -1
- package/dist/composition/proposed-bridges.d.ts +51 -13
- package/dist/composition/proposed-bridges.d.ts.map +1 -1
- package/dist/composition/proposed-bridges.js +110 -58
- package/dist/composition/proposed-bridges.js.map +1 -1
- package/dist/composition/quantities.d.ts +0 -4
- package/dist/composition/quantities.d.ts.map +1 -1
- package/dist/composition/quantities.js +5 -5
- package/dist/composition/quantities.js.map +1 -1
- package/dist/composition/quantity-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/quantity.d.ts +18 -2
- package/dist/composition/quantity.d.ts.map +1 -1
- package/dist/composition/quantity.js +35 -6
- package/dist/composition/quantity.js.map +1 -1
- package/dist/composition/rational-exponent.d.ts +40 -0
- package/dist/composition/rational-exponent.d.ts.map +1 -0
- package/dist/composition/rational-exponent.js +65 -0
- package/dist/composition/rational-exponent.js.map +1 -0
- package/dist/composition/representative-values.d.ts +22 -0
- package/dist/composition/representative-values.d.ts.map +1 -1
- package/dist/composition/representative-values.js +23 -0
- package/dist/composition/representative-values.js.map +1 -1
- package/dist/composition/retrodiction.d.ts +16 -6
- package/dist/composition/retrodiction.d.ts.map +1 -1
- package/dist/composition/retrodiction.js +36 -10
- package/dist/composition/retrodiction.js.map +1 -1
- package/dist/composition/uncertainty.js.map +1 -1
- package/dist/composition/user-equation.d.ts.map +1 -1
- package/dist/composition/user-equation.js +2 -2
- package/dist/composition/user-equation.js.map +1 -1
- package/dist/core/assignment.d.ts +19 -0
- package/dist/core/assignment.d.ts.map +1 -0
- package/dist/core/assignment.js +19 -0
- package/dist/core/assignment.js.map +1 -0
- package/dist/core/axes-registry.d.ts +8 -5
- package/dist/core/axes-registry.d.ts.map +1 -1
- package/dist/core/axes-registry.js.map +1 -1
- package/dist/core/cell.js.map +1 -1
- package/dist/core/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 +35 -35
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/constants.js +52 -37
- 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/flux-rules.js +1 -1
- package/dist/core/flux-rules.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 +3 -1
- package/dist/core/json-schema.d.ts.map +1 -1
- package/dist/core/json-schema.js +41 -16
- package/dist/core/json-schema.js.map +1 -1
- package/dist/core/labeled-tensor.d.ts +6 -1
- package/dist/core/labeled-tensor.d.ts.map +1 -1
- package/dist/core/labeled-tensor.js +18 -16
- 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/regime-registry.d.ts +6 -2
- package/dist/core/regime-registry.d.ts.map +1 -1
- package/dist/core/regime-registry.js.map +1 -1
- package/dist/core/regime-rule-install.js.map +1 -1
- package/dist/core/regimes-builtins.js.map +1 -1
- package/dist/core/tensor.d.ts +7 -4
- package/dist/core/tensor.d.ts.map +1 -1
- package/dist/core/tensor.js +64 -8
- package/dist/core/tensor.js.map +1 -1
- package/dist/core/types.d.ts +5 -5
- package/dist/core/types.js.map +1 -1
- package/dist/core/universal-index.js.map +1 -1
- package/dist/diff/bridge-ast-gradient.d.ts +4 -5
- package/dist/diff/bridge-ast-gradient.d.ts.map +1 -1
- package/dist/diff/bridge-ast-gradient.js +10 -6
- package/dist/diff/bridge-ast-gradient.js.map +1 -1
- package/dist/diff/bridge-gradient.d.ts +43 -86
- package/dist/diff/bridge-gradient.d.ts.map +1 -1
- package/dist/diff/bridge-gradient.js +40 -109
- package/dist/diff/bridge-gradient.js.map +1 -1
- package/dist/diff/bridge-specs.d.ts +16 -5
- package/dist/diff/bridge-specs.d.ts.map +1 -1
- package/dist/diff/bridge-specs.js +19 -4
- 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 +12 -4
- package/dist/dimensional/ast-builders.d.ts.map +1 -1
- package/dist/dimensional/ast-builders.js +17 -5
- 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.js.map +1 -1
- package/dist/dimensional/bridge-check.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/connection-validators.d.ts +2 -1
- package/dist/dimensional/connection-validators.d.ts.map +1 -1
- package/dist/dimensional/connection-validators.js.map +1 -1
- package/dist/dimensional/connection.js.map +1 -1
- package/dist/dimensional/constant-rows.d.ts.map +1 -1
- package/dist/dimensional/constant-rows.js +17 -13
- package/dist/dimensional/constant-rows.js.map +1 -1
- package/dist/dimensional/constants.d.ts +5 -6
- package/dist/dimensional/constants.d.ts.map +1 -1
- package/dist/dimensional/constants.js +5 -6
- package/dist/dimensional/constants.js.map +1 -1
- package/dist/dimensional/curvature-composite.js.map +1 -1
- package/dist/dimensional/curvature-invariants.js.map +1 -1
- package/dist/dimensional/curvature.js.map +1 -1
- package/dist/dimensional/dimension-inference.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/dimension-spec.d.ts +13 -7
- package/dist/dimensional/dimension-spec.d.ts.map +1 -1
- package/dist/dimensional/dimension-spec.js +49 -23
- package/dist/dimensional/dimension-spec.js.map +1 -1
- package/dist/dimensional/einstein-equation.js.map +1 -1
- package/dist/dimensional/errors.d.ts +4 -2
- package/dist/dimensional/errors.d.ts.map +1 -1
- package/dist/dimensional/errors.js +3 -17
- package/dist/dimensional/errors.js.map +1 -1
- package/dist/dimensional/exact-scale.d.ts +0 -17
- package/dist/dimensional/exact-scale.d.ts.map +1 -1
- package/dist/dimensional/exact-scale.js +8 -8
- package/dist/dimensional/exact-scale.js.map +1 -1
- package/dist/dimensional/field-equation-helpers.js.map +1 -1
- package/dist/dimensional/formula-names.js.map +1 -1
- package/dist/dimensional/fresh-label.js.map +1 -1
- package/dist/dimensional/friedmann-equation.d.ts +3 -3
- package/dist/dimensional/friedmann-equation.js +3 -3
- package/dist/dimensional/friedmann-equation.js.map +1 -1
- package/dist/dimensional/gauge-field.d.ts +2 -3
- package/dist/dimensional/gauge-field.d.ts.map +1 -1
- package/dist/dimensional/gauge-field.js +2 -3
- 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 +45 -12
- package/dist/dimensional/hyphen-names.js.map +1 -1
- package/dist/dimensional/killing-validators.js.map +1 -1
- package/dist/dimensional/klein-gordon-equation.js.map +1 -1
- package/dist/dimensional/metric-validators.d.ts +2 -1
- package/dist/dimensional/metric-validators.d.ts.map +1 -1
- package/dist/dimensional/metric-validators.js.map +1 -1
- package/dist/dimensional/metric.d.ts.map +1 -1
- package/dist/dimensional/metric.js +0 -1
- package/dist/dimensional/metric.js.map +1 -1
- package/dist/dimensional/natural-units.js.map +1 -1
- package/dist/dimensional/quantity-registry.d.ts +13 -0
- package/dist/dimensional/quantity-registry.d.ts.map +1 -1
- package/dist/dimensional/quantity-registry.js +14 -6
- package/dist/dimensional/quantity-registry.js.map +1 -1
- package/dist/dimensional/rg-flow.js.map +1 -1
- package/dist/dimensional/stress-energy-validators.js.map +1 -1
- package/dist/dimensional/symbolic-constants.d.ts +9 -0
- package/dist/dimensional/symbolic-constants.d.ts.map +1 -1
- package/dist/dimensional/symbolic-constants.js +20 -3
- package/dist/dimensional/symbolic-constants.js.map +1 -1
- package/dist/dimensional/tensor-trace.js.map +1 -1
- package/dist/dimensional/tensor.js.map +1 -1
- package/dist/dimensional/types.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-convention.d.ts +0 -2
- package/dist/dimensional/unit-convention.d.ts.map +1 -1
- package/dist/dimensional/unit-convention.js +2 -2
- package/dist/dimensional/unit-convention.js.map +1 -1
- package/dist/dimensional/unit-data.d.ts.map +1 -1
- package/dist/dimensional/unit-data.js +11 -7
- package/dist/dimensional/unit-data.js.map +1 -1
- package/dist/dimensional/units.d.ts.map +1 -1
- package/dist/dimensional/units.js +38 -20
- package/dist/dimensional/units.js.map +1 -1
- package/dist/dimensional/validator-registry.js.map +1 -1
- package/dist/dimensional/validator.d.ts +0 -16
- package/dist/dimensional/validator.d.ts.map +1 -1
- package/dist/dimensional/validator.js +65 -29
- package/dist/dimensional/validator.js.map +1 -1
- package/dist/dimensional/weyl-validators.js.map +1 -1
- package/dist/index.d.ts +59 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -24
- package/dist/index.js.map +1 -1
- package/dist/numerical/bianchi-residual.js.map +1 -1
- package/dist/numerical/binding-value.d.ts +11 -6
- package/dist/numerical/binding-value.d.ts.map +1 -1
- package/dist/numerical/binding-value.js +126 -122
- package/dist/numerical/binding-value.js.map +1 -1
- package/dist/numerical/christoffel-flat.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.js.map +1 -1
- package/dist/numerical/covariant-eikonal.d.ts.map +1 -1
- package/dist/numerical/covariant-eikonal.js +36 -13
- package/dist/numerical/covariant-eikonal.js.map +1 -1
- package/dist/numerical/curvature-lowering-helpers.d.ts +20 -0
- package/dist/numerical/curvature-lowering-helpers.d.ts.map +1 -1
- package/dist/numerical/curvature-lowering-helpers.js +9 -5
- package/dist/numerical/curvature-lowering-helpers.js.map +1 -1
- package/dist/numerical/derivative-lowering.js.map +1 -1
- package/dist/numerical/einstein-equation.js.map +1 -1
- package/dist/numerical/engine-registry.js.map +1 -1
- package/dist/numerical/errors.d.ts +7 -3
- package/dist/numerical/errors.d.ts.map +1 -1
- package/dist/numerical/errors.js +5 -8
- package/dist/numerical/errors.js.map +1 -1
- package/dist/numerical/evaluator-uncertainty.d.ts.map +1 -1
- package/dist/numerical/evaluator-uncertainty.js +19 -2
- package/dist/numerical/evaluator-uncertainty.js.map +1 -1
- package/dist/numerical/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/formula-contract.d.ts +63 -7
- package/dist/numerical/formula-contract.d.ts.map +1 -1
- package/dist/numerical/formula-contract.js +61 -42
- package/dist/numerical/formula-contract.js.map +1 -1
- package/dist/numerical/formula-dimension.d.ts +8 -7
- package/dist/numerical/formula-dimension.d.ts.map +1 -1
- package/dist/numerical/formula-dimension.js +58 -36
- package/dist/numerical/formula-dimension.js.map +1 -1
- package/dist/numerical/formula-mathts.d.ts.map +1 -1
- package/dist/numerical/formula-mathts.js +5 -2
- package/dist/numerical/formula-mathts.js.map +1 -1
- package/dist/numerical/formula-registry.d.ts +13 -3
- package/dist/numerical/formula-registry.d.ts.map +1 -1
- package/dist/numerical/formula-registry.js +7 -2
- package/dist/numerical/formula-registry.js.map +1 -1
- package/dist/numerical/geodesic-integrator.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/gl4-integrator.d.ts +28 -27
- package/dist/numerical/gl4-integrator.d.ts.map +1 -1
- package/dist/numerical/gl4-integrator.js +41 -42
- package/dist/numerical/gl4-integrator.js.map +1 -1
- package/dist/numerical/grid-field.js.map +1 -1
- package/dist/numerical/index.js.map +1 -1
- package/dist/numerical/input-validation.d.ts +3 -6
- package/dist/numerical/input-validation.d.ts.map +1 -1
- package/dist/numerical/input-validation.js +4 -8
- package/dist/numerical/input-validation.js.map +1 -1
- package/dist/numerical/killing.d.ts +8 -5
- package/dist/numerical/killing.d.ts.map +1 -1
- package/dist/numerical/killing.js.map +1 -1
- package/dist/numerical/klein-gordon.js.map +1 -1
- package/dist/numerical/kretschmann.js.map +1 -1
- package/dist/numerical/lowering-utils.js.map +1 -1
- package/dist/numerical/lowering.d.ts.map +1 -1
- package/dist/numerical/lowering.js +7 -17
- package/dist/numerical/lowering.js.map +1 -1
- package/dist/numerical/mathts-engine.d.ts.map +1 -1
- package/dist/numerical/mathts-engine.js +16 -25
- 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-ic.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 +9 -2
- 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 +5 -2
- package/dist/numerical/quadrature.d.ts.map +1 -1
- package/dist/numerical/quadrature.js +19 -4
- 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 +25 -19
- package/dist/numerical/spacetime-metrics.d.ts.map +1 -1
- package/dist/numerical/spacetime-metrics.js +180 -286
- 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.js.map +1 -1
- package/dist/numerical/tensor-engine.d.ts +30 -5
- 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/numerical/types.js.map +1 -1
- package/dist/numerical/weyl-lowering.js.map +1 -1
- package/dist/relations/category.js.map +1 -1
- package/dist/relations/composition-table.d.ts +4 -4
- package/dist/relations/composition-table.js +4 -4
- package/dist/relations/composition-table.js.map +1 -1
- package/dist/relations/conventions.js.map +1 -1
- package/dist/relations/domain-regimes.js.map +1 -1
- package/dist/relations/regime-registration.js.map +1 -1
- package/dist/relations/regime-vocabularies.js.map +1 -1
- package/dist/relations/regime.d.ts +28 -8
- package/dist/relations/regime.d.ts.map +1 -1
- package/dist/relations/regime.js +44 -15
- package/dist/relations/regime.js.map +1 -1
- package/dist/relations/types.d.ts +18 -5
- package/dist/relations/types.d.ts.map +1 -1
- package/dist/relations/types.js +5 -3
- package/dist/relations/types.js.map +1 -1
- package/package.json +16 -20
- package/dist/bridges/registry.d.ts +0 -60
- package/dist/bridges/registry.d.ts.map +0 -1
- package/dist/bridges/registry.js +0 -87
- package/dist/bridges/registry.js.map +0 -1
- package/dist/cli/poster-source.d.ts +0 -154
- package/dist/cli/poster-source.d.ts.map +0 -1
- package/dist/cli/poster-source.js +0 -184
- package/dist/cli/poster-source.js.map +0 -1
|
@@ -1,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"}
|
|
1
|
+
{"version":3,"file":"axis-audit.js","sourceRoot":"","sources":["../../src/composition/axis-audit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAI9D,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,qBAAqB,EAAE,aAAa,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAGnG;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC;AAuDhC,yGAAyG;AACzG,SAAS,MAAM,CAAC,KAA4B;IAC1C,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACtD,MAAM,SAAS,GAAY,CAAC,CAAC,SAAS,CAAC;IACvC,MAAM,MAAM,GAAY,CAAC,CAAC,MAAM,CAAC;IACjC,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,CAAC;QAChE,MAAM,IAAI,SAAS,CAAC,4BAA4B,MAAM,CAAC,MAAM,CAAC,QAAQ,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACjG,CAAC;IACD,OAAO,EAAE,SAAS,EAAE,OAAO,SAAS,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;AAC/G,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CACrC,KAA4B,EAC5B,gBAAgB,GAA0C,2BAA2B,EACrF,eAAe,GAAsC,wBAAwB,EAC7E,OAAO,GAAqB,EAAE;IAE9B,MAAM,UAAU,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;IAChD,MAAM,GAAG,GAAG,qBAAqB,CAAC,KAAK,EAAE,EAAE,GAAG,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,CAAC,CAAC;IAChH,MAAM,UAAU,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;IAChE,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,sDAAsD;QACtD,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,gBAAgB;QAC3B,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,mBAAmB;QAC9B,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,iBAAiB;QAC5B,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,oBAAoB;QAC/B,UAAU,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE;YAC7B,MAAM,MAAM,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC,EAAE,gBAAgB,EAAE,eAAe,CAG3E,CAAC;YACF,MAAM,MAAM,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC,EAAE,gBAAgB,EAAE,eAAe,CAG3E,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,OAAO;YACT,CAAC;YACD,OAAO,EAAE,CAAC;YACV,MAAM,KAAK,GAAG,EAAE,KAAK,EAAE,CAAC;YACxB,IAAI,KAAK;gBAAE,KAAK,EAAE,CAAC;YACnB,MAAM,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;YAC3B,IAAI,CAAC,IAAI,CAAC,OAAO;gBAAE,OAAO,CAAC,qDAAqD;YAChF,IAAI,KAAK,IAAI,IAAI,CAAC,KAAK;gBAAE,CAAC,EAAE,CAAC;iBACxB,IAAI,KAAK;gBAAE,CAAC,EAAE,CAAC;iBACf,IAAI,IAAI,CAAC,KAAK;gBAAE,CAAC,EAAE,CAAC;;gBACpB,CAAC,EAAE,CAAC;QACX,CAAC,CAAC,CAAC;QACH,MAAM,KAAK,GAA0B;YACnC,CAAC,CAAC,EAAE,CAAC,CAAC;YACN,CAAC,CAAC,EAAE,CAAC,CAAC;SACP,CAAC;QACF,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5C,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;YACxB,QAAQ,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;YACxD,MAAM,EAAE,MAAM,GAAG,WAAW,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC;SAC9C,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 * 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"]}
|
|
@@ -31,17 +31,20 @@ import type { BridgeEdge } from './edge.js';
|
|
|
31
31
|
*/
|
|
32
32
|
export declare function dimensionalFreedom(e: BridgeEdge): number;
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* `
|
|
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
|
+
*
|
|
42
45
|
* @internal
|
|
43
46
|
*/
|
|
44
|
-
export declare function
|
|
47
|
+
export declare function cleanPrefactorForm(p: number): string | undefined;
|
|
45
48
|
/**
|
|
46
49
|
* The outcome of trying to derive a bridge dimensionally + verify it.
|
|
47
50
|
* `not-a-monomial` means the encoded formula adds dimensionful terms, so a
|
|
@@ -55,18 +58,14 @@ interface DerivationResult {
|
|
|
55
58
|
readonly prefactor?: number;
|
|
56
59
|
/** True when derived AND the prefactor is a recognizable constant. */
|
|
57
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;
|
|
58
63
|
}
|
|
59
64
|
/**
|
|
60
65
|
* Attempt to derive a bridge: the first constant-subset that dimensionally
|
|
61
66
|
* closes the target AND reproduces the evaluator up to a constant ratio.
|
|
62
67
|
*/
|
|
63
68
|
export declare function attemptDerivation(e: BridgeEdge): DerivationResult;
|
|
64
|
-
/**
|
|
65
|
-
* Graph distance from a bridge's quantities to the established-confidence
|
|
66
|
-
* core (BFS over quantity co-occurrence). 0 = shares a quantity with an
|
|
67
|
-
* established edge; Infinity = structurally isolated from it.
|
|
68
|
-
*/
|
|
69
|
-
export declare function anchoringDistance(edges: readonly BridgeEdge[], e: BridgeEdge): number;
|
|
70
69
|
/** How grounded the equation is, as a structural signal. */
|
|
71
70
|
type Grounding = 'grounded' | 'empirical' | 'decoy' | 'open';
|
|
72
71
|
/** Review-priority tier (1 = highest structural decidability). */
|
|
@@ -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":"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"}
|
|
@@ -23,18 +23,23 @@
|
|
|
23
23
|
*
|
|
24
24
|
* @module composition/bridge-analysis
|
|
25
25
|
*/
|
|
26
|
-
import { ALPHA } from '../core/constants.js';
|
|
27
26
|
import { constantRecord } from '../dimensional/symbolic-constants.js';
|
|
27
|
+
import { constantRatio, fixedPoint } from '../canonical/fixed-points.js';
|
|
28
|
+
import { rationalize } from './rational-exponent.js';
|
|
28
29
|
import { buckinghamPi, dimensionallyDetermines } from '../dimensional/buckingham.js';
|
|
29
30
|
import { DIMENSIONLESS } from '../dimensional/types.js';
|
|
30
31
|
import { equals, format } from '../dimensional/algebra.js';
|
|
31
32
|
import { formulaShape } from './formula-shape.js';
|
|
32
33
|
import { BRIDGE_EQUATIONS } from '../bridges/index.js';
|
|
33
|
-
import { QUANTITY_IDENTIFICATIONS } from './compose.js';
|
|
34
34
|
import { enumerateCompositions } from './enumerate.js';
|
|
35
35
|
import { DATA_CONFRONTED_IDS } from '../bridges/confrontation-coverage.js';
|
|
36
|
+
import { clusterBySharedKeys, quantityCanonicalizer } from './quantity-clusters.js';
|
|
36
37
|
/** ℏ, c, G, k_B, e — the constants the audit/triage may invoke, from the registry. */
|
|
37
|
-
|
|
38
|
+
// The constants a canonical or catalog relation bakes: a closure is searched over every subset.
|
|
39
|
+
// `epsilon_0` and `m_e` joined on 2026-10-09, when the canonical entries that spelled them as
|
|
40
|
+
// governing inputs (`vacuum-permittivity`, `electron-mass`) started baking them like every other
|
|
41
|
+
// constant; without them CE-plasma-frequency read as a reconstruction mismatch.
|
|
42
|
+
const FUNDAMENTAL_CONSTANTS = ['ℏ', 'c', 'G', 'k_B', 'e', 'epsilon_0', 'm_e'].map((name) => {
|
|
38
43
|
const record = constantRecord(name);
|
|
39
44
|
return { name, dim: record.dim, si: record.value };
|
|
40
45
|
});
|
|
@@ -94,74 +99,149 @@ export function dimensionalFreedom(e) {
|
|
|
94
99
|
}
|
|
95
100
|
return Infinity;
|
|
96
101
|
}
|
|
97
|
-
/**
|
|
102
|
+
/**
|
|
103
|
+
* Deterministic, domain-valid input sets with per-source variation.
|
|
104
|
+
*
|
|
105
|
+
* Each magnitude set is tried with every source positive first, then with
|
|
106
|
+
* each single source negated: a domain that holds only for a negative input
|
|
107
|
+
* (a signed charge, a potential below zero) once got positives only and was
|
|
108
|
+
* reported `no-samples` (9.0.0 audit §4 Low). The first sign pattern the
|
|
109
|
+
* domain admits is kept for that magnitude set, so a domain that admits the
|
|
110
|
+
* positives is sampled exactly as before.
|
|
111
|
+
*/
|
|
98
112
|
function makeInputs(e) {
|
|
99
113
|
if (e.sources.length === 0)
|
|
100
114
|
return [{}];
|
|
101
115
|
const sets = [];
|
|
102
|
-
|
|
103
|
-
const inp = {};
|
|
104
|
-
e.sources.forEach((s, i) => {
|
|
105
|
-
inp[s.name] = Math.pow(1.6 + i, 1 + 0.27 * j);
|
|
106
|
-
});
|
|
116
|
+
const inDomain = (inp) => {
|
|
107
117
|
try {
|
|
108
|
-
|
|
109
|
-
sets.push(inp);
|
|
118
|
+
return e.domain.predicate(inp);
|
|
110
119
|
}
|
|
111
120
|
catch {
|
|
112
|
-
|
|
121
|
+
return false;
|
|
113
122
|
}
|
|
123
|
+
};
|
|
124
|
+
const finite = (inp) => {
|
|
125
|
+
try {
|
|
126
|
+
return Number.isFinite(e.evaluate(inp));
|
|
127
|
+
}
|
|
128
|
+
catch {
|
|
129
|
+
return false;
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
for (let j = 0; j < 3; j++) {
|
|
133
|
+
// Source i takes (1.6 + i)^(1 + 0.27 j): this audit's own scheme, stated here.
|
|
134
|
+
const magnitudes = fixedPoint(e.sources.map((s) => s.name), 1 + 0.27 * j, { base: 1.6, step: 1 });
|
|
135
|
+
// A negated source is tried only when the DOMAIN refuses the positive point (a carrier
|
|
136
|
+
// charge that must be negative). A positive point the domain admits but the evaluator
|
|
137
|
+
// cannot finish (an exponential that overflows, be-82) is a degenerate sample and not a
|
|
138
|
+
// reason to look for a sign at which the function happens to be flat: a monomial fitted
|
|
139
|
+
// on a saturated regime is not a derivation.
|
|
140
|
+
if (inDomain(magnitudes)) {
|
|
141
|
+
if (finite(magnitudes))
|
|
142
|
+
sets.push(magnitudes);
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
const negated = e.sources
|
|
146
|
+
.map((s) => ({ ...magnitudes, [s.name]: -magnitudes[s.name] }))
|
|
147
|
+
.find((inp) => inDomain(inp) && finite(inp));
|
|
148
|
+
if (negated !== undefined)
|
|
149
|
+
sets.push(negated);
|
|
114
150
|
}
|
|
115
151
|
return sets;
|
|
116
152
|
}
|
|
117
|
-
/**
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
];
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
153
|
+
/** The denominator cap of a clean rational: the Buckingham enumerator's. */
|
|
154
|
+
const CLEAN_MAX_DENOMINATOR = 720;
|
|
155
|
+
/** The relative tolerance of a clean hit: the one the derivation fit uses. */
|
|
156
|
+
const CLEAN_TOLERANCE = 1e-9;
|
|
157
|
+
/** The (a, b) pairs of π^a · ln2^b, the simplest first. */
|
|
158
|
+
const CLEAN_EXPONENT_PAIRS = (() => {
|
|
159
|
+
const pairs = [];
|
|
160
|
+
for (let a = -2; a <= 2; a++)
|
|
161
|
+
for (let b = -1; b <= 1; b++)
|
|
162
|
+
pairs.push([a, b]);
|
|
163
|
+
pairs.sort((x, y) => Math.abs(x[0]) + Math.abs(x[1]) - (Math.abs(y[0]) + Math.abs(y[1])) || Math.abs(x[0]) - Math.abs(y[0]));
|
|
164
|
+
return pairs;
|
|
165
|
+
})();
|
|
166
|
+
/** `π`, `π²`, `ln 2`, `(ln 2)²`, as a product string. */
|
|
167
|
+
function symbolicFactor(a, b) {
|
|
168
|
+
const parts = [];
|
|
169
|
+
if (a === 1)
|
|
170
|
+
parts.push('π');
|
|
171
|
+
else if (a === 2)
|
|
172
|
+
parts.push('π²');
|
|
173
|
+
if (b === 1)
|
|
174
|
+
parts.push('ln 2');
|
|
175
|
+
else if (b === 2)
|
|
176
|
+
parts.push('(ln 2)²');
|
|
177
|
+
return parts.join(' ');
|
|
178
|
+
}
|
|
179
|
+
/** `r = p / (π^a · ln2^b)`, with `p = n/d`, as the exact form string. */
|
|
180
|
+
function renderCleanForm(n, d, a, b, root) {
|
|
181
|
+
// Negative exponents put the symbol in the numerator.
|
|
182
|
+
const numSym = symbolicFactor(a < 0 ? -a : 0, b < 0 ? -b : 0);
|
|
183
|
+
const denSym = symbolicFactor(a > 0 ? a : 0, b > 0 ? b : 0);
|
|
184
|
+
const numParts = [...(n === 1n && numSym !== '' ? [] : [n.toString()]), ...(numSym === '' ? [] : [numSym])];
|
|
185
|
+
const denParts = [...(d === 1n ? [] : [d.toString()]), ...(denSym === '' ? [] : [denSym])];
|
|
186
|
+
// `2π` stays joined; a number before `ln 2` is spaced (`2 ln 2`), as `π ln 2` is.
|
|
187
|
+
const join = (parts) => parts.reduce((acc, part) => (acc === '' ? part : part.startsWith('ln') || part.startsWith('(ln') ? `${acc} ${part}` : acc + part), '');
|
|
188
|
+
const numerator = join(numParts);
|
|
189
|
+
if (denParts.length === 0)
|
|
190
|
+
return root ? (numerator === 'π' ? '√π' : /^[0-9]+$/.test(numerator) && numParts.length === 1 ? `√${numerator}` : `√(${numerator})`) : numerator;
|
|
191
|
+
const denominator = denParts.length === 1 ? denParts[0] : `(${join(denParts)})`;
|
|
192
|
+
const form = `${numerator}/${denominator}`;
|
|
193
|
+
return root ? `√(${form})` : form;
|
|
194
|
+
}
|
|
129
195
|
/**
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
196
|
+
* The exact form of a clean dimensionless prefactor, or `undefined` when
|
|
197
|
+
* the number is not one. A prefactor `r` is clean when `r = p / (π^a · ln2^b)`
|
|
198
|
+
* for `a ∈ −2..2`, `b ∈ −1..1` and a rational `p` with denominator at most
|
|
199
|
+
* 720, and numerator at most 720, that reproduces it to the relative 1e-9 the
|
|
200
|
+
* derivation fit uses; or
|
|
201
|
+
* when `r²` is, which names `√π`, `√(2π)` and their kin. The simplest
|
|
202
|
+
* `(a, b)` that fits is the one reported, so `2` is `2` and not `2π/π`.
|
|
203
|
+
* The rule replaces a list of seventeen constants matched at 1e-3; `9/8`
|
|
204
|
+
* (be-80) and `π/ln 2` (be-84) were not on it, and `π²/60`, the
|
|
205
|
+
* Stefan–Boltzmann closed form, is a hit under this rule.
|
|
206
|
+
*
|
|
134
207
|
* @internal
|
|
135
208
|
*/
|
|
136
|
-
export function
|
|
137
|
-
if (
|
|
138
|
-
return
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
209
|
+
export function cleanPrefactorForm(p) {
|
|
210
|
+
if (!Number.isFinite(p) || p === 0)
|
|
211
|
+
return undefined;
|
|
212
|
+
const sign = p < 0 ? '-' : '';
|
|
213
|
+
const r = Math.abs(p);
|
|
214
|
+
for (const root of [false, true]) {
|
|
215
|
+
const value = root ? r * r : r;
|
|
216
|
+
for (const [a, b] of CLEAN_EXPONENT_PAIRS) {
|
|
217
|
+
const scaled = value * Math.pow(Math.PI, a) * Math.pow(Math.LN2, b);
|
|
218
|
+
const q = rationalize(scaled, { maxDenominator: CLEAN_MAX_DENOMINATOR, tolerance: CLEAN_TOLERANCE });
|
|
219
|
+
// The cap bounds the numerator too. With it free, every integer-valued double
|
|
220
|
+
// (a G-closure of 3.6e21) is a rational over 1, and 21791/563 reproduced the
|
|
221
|
+
// BCS ratio 1.7639 to 1e-9 by chance: a small rational has a small numerator.
|
|
222
|
+
if (q !== undefined && (q.numerator < 0n ? -q.numerator : q.numerator) <= BigInt(CLEAN_MAX_DENOMINATOR)) {
|
|
223
|
+
return sign + renderCleanForm(q.numerator, q.denominator, a, b, root);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
return undefined;
|
|
142
228
|
}
|
|
229
|
+
const isCleanPrefactor = (p) => cleanPrefactorForm(p) !== undefined;
|
|
143
230
|
/**
|
|
144
231
|
* A canonical closure more than ten times away from 1 is not a recovered
|
|
145
|
-
* prefactor.
|
|
146
|
-
* window and
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
* outside the window. `ALPHA` is the fine-structure constant declared above.
|
|
232
|
+
* prefactor. Wien (≈1.265, 2π over the root of a transcendental equation)
|
|
233
|
+
* stays inside that window and keeps the empirical/tuned mark;
|
|
234
|
+
* Stefan–Boltzmann's π²/60 is a clean form under `cleanPrefactorForm`. A
|
|
235
|
+
* G-closure of an atomic law (10^21–10^25) does not pass. A recognized
|
|
236
|
+
* constant (2π, ln 2, 4π, 1/(6π), …) stays even when it sits outside the
|
|
237
|
+
* window. The search includes ε₀, so the
|
|
238
|
+
* field energy density derives on {ε₀} with its sourced ½; the {ℏ, c, e}
|
|
239
|
+
* stand-in it once closed on, μ0 rewritten through α, no longer arises, and
|
|
240
|
+
* the guard that rejected it is gone (it changed no row of either graph).
|
|
155
241
|
*/
|
|
156
|
-
function recoveredCanonicalPrefactor(id, prefactor
|
|
242
|
+
function recoveredCanonicalPrefactor(id, prefactor) {
|
|
157
243
|
if (!id.startsWith('CE-') || isCleanPrefactor(prefactor))
|
|
158
244
|
return true;
|
|
159
|
-
if (subset.includes('ℏ') &&
|
|
160
|
-
subset.includes('c') &&
|
|
161
|
-
subset.includes('e') &&
|
|
162
|
-
isCleanPrefactor(Math.abs(prefactor) * ALPHA)) {
|
|
163
|
-
return false;
|
|
164
|
-
}
|
|
165
245
|
const mag = Math.abs(prefactor);
|
|
166
246
|
if (!(mag > 0) || !Number.isFinite(mag))
|
|
167
247
|
return false;
|
|
@@ -207,16 +287,17 @@ export function attemptDerivation(e) {
|
|
|
207
287
|
cand *= Math.pow(i[name], exp);
|
|
208
288
|
return e.evaluate(i) / cand;
|
|
209
289
|
});
|
|
210
|
-
|
|
211
|
-
const
|
|
212
|
-
|
|
213
|
-
|
|
290
|
+
// The coefficient of variation under 1e-9: this audit's own statistic and tolerance.
|
|
291
|
+
const decided = constantRatio(ratios, 1e-9, { statistic: 'cv' });
|
|
292
|
+
if (decided.constant && recoveredCanonicalPrefactor(e.id, decided.value)) {
|
|
293
|
+
const form = cleanPrefactorForm(decided.value);
|
|
214
294
|
return {
|
|
215
295
|
status: 'derived',
|
|
216
296
|
subset: S.map((x) => x.name),
|
|
217
297
|
monomial: r.monomial,
|
|
218
|
-
prefactor:
|
|
219
|
-
cleanPrefactor:
|
|
298
|
+
prefactor: decided.value,
|
|
299
|
+
cleanPrefactor: form !== undefined,
|
|
300
|
+
...(form === undefined ? {} : { prefactorForm: form }),
|
|
220
301
|
};
|
|
221
302
|
}
|
|
222
303
|
}
|
|
@@ -227,9 +308,10 @@ export function attemptDerivation(e) {
|
|
|
227
308
|
/**
|
|
228
309
|
* Graph distance from a bridge's quantities to the established-confidence
|
|
229
310
|
* core (BFS over quantity co-occurrence). 0 = shares a quantity with an
|
|
230
|
-
* established edge; Infinity = structurally isolated from it.
|
|
311
|
+
* established edge; Infinity = structurally isolated from it. Read by
|
|
312
|
+
* `bridgePriority` only; it was exported with no caller outside this file.
|
|
231
313
|
*/
|
|
232
|
-
|
|
314
|
+
function anchoringDistance(edges, e) {
|
|
233
315
|
const adj = new Map();
|
|
234
316
|
const link = (a, b) => {
|
|
235
317
|
mapGetOrInsert(adj, a, () => new Set()).add(b);
|
|
@@ -317,17 +399,10 @@ export function bridgePriority(edges) {
|
|
|
317
399
|
// ---------------------------------------------------------------------------
|
|
318
400
|
// Catalog linkage map — how the equations connect via shared quantities.
|
|
319
401
|
// ---------------------------------------------------------------------------
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
* `proposeLinkCandidates`. NOTE: `anchoringDistance` deliberately does NOT
|
|
325
|
-
* use this — it links on raw names (its distance-0/∞ contract is pinned).
|
|
326
|
-
*/
|
|
327
|
-
function quantityCanonicalizer() {
|
|
328
|
-
const alias = new Map(QUANTITY_IDENTIFICATIONS.map((id) => [id.from, id.to]));
|
|
329
|
-
return (n) => alias.get(n) ?? n;
|
|
330
|
-
}
|
|
402
|
+
// The quantity-name canonicalizer (`QUANTITY_IDENTIFICATIONS`) and the component partition are
|
|
403
|
+
// `quantity-clusters.ts`, the one owner shared with the visual map and the discovery funnel.
|
|
404
|
+
// NOTE: `anchoringDistance` deliberately does NOT canonicalize — it links on raw names (its
|
|
405
|
+
// distance-0/∞ contract is pinned).
|
|
331
406
|
/** An edge's distinct (canonical) quantity names — sources ∪ target. */
|
|
332
407
|
function quantitiesOf(e, canon) {
|
|
333
408
|
return [...new Set([...e.sources.map((s) => canon(s.name)), canon(e.target.name)])];
|
|
@@ -346,26 +421,9 @@ function quantitiesOf(e, canon) {
|
|
|
346
421
|
function clusterMap(edges) {
|
|
347
422
|
const statusOf = new Map(BRIDGE_EQUATIONS.map((b) => [b.id, b.status]));
|
|
348
423
|
const canon = quantityCanonicalizer();
|
|
349
|
-
//
|
|
350
|
-
|
|
351
|
-
const
|
|
352
|
-
const union = (a, b) => { parent[find(a)] = find(b); };
|
|
353
|
-
const qToEdges = new Map();
|
|
354
|
-
edges.forEach((e, i) => {
|
|
355
|
-
for (const q of quantitiesOf(e, canon)) {
|
|
356
|
-
mapGetOrInsert(qToEdges, q, () => []).push(i);
|
|
357
|
-
}
|
|
358
|
-
});
|
|
359
|
-
for (const idxs of qToEdges.values()) {
|
|
360
|
-
for (let k = 1; k < idxs.length; k++)
|
|
361
|
-
union(idxs[0], idxs[k]);
|
|
362
|
-
}
|
|
363
|
-
const groups = new Map();
|
|
364
|
-
edges.forEach((_, i) => {
|
|
365
|
-
mapGetOrInsert(groups, find(i), () => []).push(i);
|
|
366
|
-
});
|
|
367
|
-
const clusters = [...groups.values()].map((idxs) => {
|
|
368
|
-
const es = idxs.map((i) => edges[i]);
|
|
424
|
+
// Edges sharing a (canonical) quantity are one cluster: the shared partition, already in
|
|
425
|
+
// the order this map always had (largest first, then by first edge id; input order inside).
|
|
426
|
+
const clusters = clusterBySharedKeys(edges, (e) => quantitiesOf(e, canon), (e) => e.id).map((es) => {
|
|
369
427
|
const statusMix = {};
|
|
370
428
|
const qcount = {};
|
|
371
429
|
for (const e of es) {
|
|
@@ -382,7 +440,6 @@ function clusterMap(edges) {
|
|
|
382
440
|
hubs: Object.entries(qcount).filter(([, c]) => c >= 2).map(([q]) => q).sort(),
|
|
383
441
|
};
|
|
384
442
|
});
|
|
385
|
-
clusters.sort((a, b) => b.size - a.size || a.edges[0].localeCompare(b.edges[0]));
|
|
386
443
|
return {
|
|
387
444
|
clusters,
|
|
388
445
|
componentCount: clusters.length,
|