gdp-wired 0.47.0 → 0.49.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 +17 -6
- package/dist/core/bmc.js +10 -7
- package/dist/core/carry.d.ts +15 -0
- package/dist/core/carry.js +651 -0
- package/dist/core/check.js +7 -2
- package/dist/core/cli.d.ts +3 -1
- package/dist/core/cli.js +28 -8
- package/dist/core/count-attempt-work.d.ts +29 -0
- package/dist/core/count-attempt-work.js +96 -0
- package/dist/core/count-boolean-partition.d.ts +5 -0
- package/dist/core/count-boolean-partition.js +47 -0
- package/dist/core/count-bounded-quotient.d.ts +2 -0
- package/dist/core/count-bounded-quotient.js +13 -0
- package/dist/core/count-case-compose.d.ts +20 -0
- package/dist/core/count-case-compose.js +289 -0
- package/dist/core/count-cases.d.ts +24 -0
- package/dist/core/count-cases.js +321 -0
- package/dist/core/count-cert-grow.d.ts +4 -0
- package/dist/core/count-cert-grow.js +37 -0
- package/dist/core/count-cert-rename.d.ts +10 -0
- package/dist/core/count-cert-rename.js +69 -0
- package/dist/core/count-cert-transport.d.ts +11 -0
- package/dist/core/count-cert-transport.js +109 -0
- package/dist/core/count-certificate-minimize.d.ts +57 -0
- package/dist/core/count-certificate-minimize.js +263 -0
- package/dist/core/count-closed-family.d.ts +32 -0
- package/dist/core/count-closed-family.js +143 -0
- package/dist/core/count-closing-budget.d.ts +10 -0
- package/dist/core/count-closing-budget.js +49 -0
- package/dist/core/count-closing-needs.d.ts +5 -0
- package/dist/core/count-closing-needs.js +9 -0
- package/dist/core/count-completion.d.ts +9 -0
- package/dist/core/count-completion.js +27 -0
- package/dist/core/count-component-budget.d.ts +5 -0
- package/dist/core/count-component-budget.js +9 -0
- package/dist/core/count-copy-shape.d.ts +11 -0
- package/dist/core/count-copy-shape.js +40 -0
- package/dist/core/count-cubes.d.ts +8 -0
- package/dist/core/count-cubes.js +69 -0
- package/dist/core/count-demand.d.ts +37 -0
- package/dist/core/count-demand.js +361 -0
- package/dist/core/count-disjoint-funding.d.ts +75 -0
- package/dist/core/count-disjoint-funding.js +284 -0
- package/dist/core/count-emitter-frame-pool.d.ts +23 -0
- package/dist/core/count-emitter-frame-pool.js +87 -0
- package/dist/core/count-facts.d.ts +52 -0
- package/dist/core/count-facts.js +247 -0
- package/dist/core/count-final-step.d.ts +5 -0
- package/dist/core/count-final-step.js +20 -0
- package/dist/core/count-fixed-frame.d.ts +4 -0
- package/dist/core/count-fixed-frame.js +30 -0
- package/dist/core/count-focus-proof.d.ts +8 -0
- package/dist/core/count-focus-proof.js +140 -0
- package/dist/core/count-focused.d.ts +22 -0
- package/dist/core/count-focused.js +676 -0
- package/dist/core/count-frames.d.ts +25 -0
- package/dist/core/count-frames.js +118 -0
- package/dist/core/count-frozen-guard.d.ts +2 -0
- package/dist/core/count-frozen-guard.js +31 -0
- package/dist/core/count-generation-phase.d.ts +7 -0
- package/dist/core/count-generation-phase.js +33 -0
- package/dist/core/count-guard-composition.d.ts +12 -0
- package/dist/core/count-guard-composition.js +48 -0
- package/dist/core/count-guard-context.d.ts +11 -0
- package/dist/core/count-guard-context.js +50 -0
- package/dist/core/count-guard-facts.d.ts +50 -0
- package/dist/core/count-guard-facts.js +97 -0
- package/dist/core/count-guard-proposals.d.ts +7 -0
- package/dist/core/count-guard-proposals.js +106 -0
- package/dist/core/count-guard-shape.d.ts +18 -0
- package/dist/core/count-guard-shape.js +100 -0
- package/dist/core/count-guard-tree.d.ts +17 -0
- package/dist/core/count-guard-tree.js +125 -0
- package/dist/core/count-leader-facts.d.ts +10 -0
- package/dist/core/count-leader-facts.js +52 -0
- package/dist/core/count-leader.d.ts +10 -0
- package/dist/core/count-leader.js +331 -0
- package/dist/core/count-lemma-transport.d.ts +8 -0
- package/dist/core/count-lemma-transport.js +47 -0
- package/dist/core/count-lifted-budget.d.ts +54 -0
- package/dist/core/count-lifted-budget.js +97 -0
- package/dist/core/count-lifted-copy.d.ts +3 -0
- package/dist/core/count-lifted-copy.js +166 -0
- package/dist/core/count-lifted-increment.d.ts +3 -0
- package/dist/core/count-lifted-increment.js +146 -0
- package/dist/core/count-lifted-load.d.ts +5 -0
- package/dist/core/count-lifted-load.js +179 -0
- package/dist/core/count-lifted-prerequisite.d.ts +14 -0
- package/dist/core/count-lifted-prerequisite.js +53 -0
- package/dist/core/count-lifted-replacement.d.ts +3 -0
- package/dist/core/count-lifted-replacement.js +540 -0
- package/dist/core/count-lifted-shape.d.ts +63 -0
- package/dist/core/count-lifted-shape.js +115 -0
- package/dist/core/count-lifted-strategy.d.ts +7 -0
- package/dist/core/count-lifted-strategy.js +226 -0
- package/dist/core/count-lifted-transports.d.ts +32 -0
- package/dist/core/count-lifted-transports.js +293 -0
- package/dist/core/count-load-shape.d.ts +17 -0
- package/dist/core/count-load-shape.js +67 -0
- package/dist/core/count-minimal-view.d.ts +26 -0
- package/dist/core/count-minimal-view.js +46 -0
- package/dist/core/count-operation-observation.d.ts +9 -0
- package/dist/core/count-operation-observation.js +22 -0
- package/dist/core/count-operation-order.d.ts +5 -0
- package/dist/core/count-operation-order.js +4 -0
- package/dist/core/count-phase.d.ts +9 -0
- package/dist/core/count-phase.js +127 -0
- package/dist/core/count-premise-search.d.ts +9 -0
- package/dist/core/count-premise-search.js +41 -0
- package/dist/core/count-premise-view.d.ts +19 -0
- package/dist/core/count-premise-view.js +220 -0
- package/dist/core/count-prerequisite-components.d.ts +67 -0
- package/dist/core/count-prerequisite-components.js +239 -0
- package/dist/core/count-prerequisite-memory.d.ts +24 -0
- package/dist/core/count-prerequisite-memory.js +37 -0
- package/dist/core/count-prerequisite-plan.d.ts +12 -0
- package/dist/core/count-prerequisite-plan.js +88 -0
- package/dist/core/count-primitive-budget.d.ts +1 -0
- package/dist/core/count-primitive-budget.js +8 -0
- package/dist/core/count-project-free.d.ts +3 -0
- package/dist/core/count-project-free.js +24 -0
- package/dist/core/count-project-witness.d.ts +4 -0
- package/dist/core/count-project-witness.js +48 -0
- package/dist/core/count-proof-rescope.d.ts +14 -0
- package/dist/core/count-proof-rescope.js +71 -0
- package/dist/core/count-proof-scope.d.ts +68 -0
- package/dist/core/count-proof-scope.js +333 -0
- package/dist/core/count-prune-owned-root.d.ts +5 -0
- package/dist/core/count-prune-owned-root.js +27 -0
- package/dist/core/count-query-context.d.ts +3 -0
- package/dist/core/count-query-context.js +7 -0
- package/dist/core/count-query.d.ts +15 -0
- package/dist/core/count-query.js +59 -0
- package/dist/core/count-quorum-leaf.d.ts +9 -0
- package/dist/core/count-quorum-leaf.js +38 -0
- package/dist/core/count-ranges.d.ts +5 -0
- package/dist/core/count-ranges.js +65 -0
- package/dist/core/count-reachability-budget.d.ts +1 -0
- package/dist/core/count-reachability-budget.js +7 -0
- package/dist/core/count-reachability-reconcile.d.ts +11 -0
- package/dist/core/count-reachability-reconcile.js +19 -0
- package/dist/core/count-reachability.d.ts +50 -0
- package/dist/core/count-reachability.js +351 -0
- package/dist/core/count-rebase-path.d.ts +9 -0
- package/dist/core/count-rebase-path.js +68 -0
- package/dist/core/count-recipe-context.d.ts +45 -0
- package/dist/core/count-recipe-context.js +71 -0
- package/dist/core/count-recipe-controller.d.ts +115 -0
- package/dist/core/count-recipe-controller.js +417 -0
- package/dist/core/count-recipe-graph.d.ts +36 -0
- package/dist/core/count-recipe-graph.js +211 -0
- package/dist/core/count-recovery/action-guard.d.ts +5 -0
- package/dist/core/count-recovery/action-guard.js +51 -0
- package/dist/core/count-recovery/boolean-core.d.ts +16 -0
- package/dist/core/count-recovery/boolean-core.js +258 -0
- package/dist/core/count-recovery/carried-case.d.ts +2 -0
- package/dist/core/count-recovery/carried-case.js +24 -0
- package/dist/core/count-recovery/conditional-check-cache.d.ts +23 -0
- package/dist/core/count-recovery/conditional-check-cache.js +131 -0
- package/dist/core/count-recovery/conditional-cuts.d.ts +6 -0
- package/dist/core/count-recovery/conditional-cuts.js +319 -0
- package/dist/core/count-recovery/conditional-proof.d.ts +53 -0
- package/dist/core/count-recovery/conditional-proof.js +348 -0
- package/dist/core/count-recovery/derivability-closure.d.ts +14 -0
- package/dist/core/count-recovery/derivability-closure.js +534 -0
- package/dist/core/count-recovery/empty-count-source.d.ts +2 -0
- package/dist/core/count-recovery/empty-count-source.js +40 -0
- package/dist/core/count-recovery/field-bound-lemmas.d.ts +23 -0
- package/dist/core/count-recovery/field-bound-lemmas.js +640 -0
- package/dist/core/count-recovery/field-case.d.ts +5 -0
- package/dist/core/count-recovery/field-case.js +89 -0
- package/dist/core/count-recovery/field-demand.d.ts +46 -0
- package/dist/core/count-recovery/field-demand.js +47 -0
- package/dist/core/count-recovery/field-only.d.ts +3 -0
- package/dist/core/count-recovery/field-only.js +18 -0
- package/dist/core/count-recovery/fold-path.d.ts +6 -0
- package/dist/core/count-recovery/fold-path.js +35 -0
- package/dist/core/count-recovery/frame-lemmas.d.ts +9 -0
- package/dist/core/count-recovery/frame-lemmas.js +120 -0
- package/dist/core/count-recovery/guard-cases.d.ts +12 -0
- package/dist/core/count-recovery/guard-cases.js +139 -0
- package/dist/core/count-recovery/key-closure.d.ts +14 -0
- package/dist/core/count-recovery/key-closure.js +62 -0
- package/dist/core/count-recovery/leaf-allowance.d.ts +4 -0
- package/dist/core/count-recovery/leaf-allowance.js +7 -0
- package/dist/core/count-recovery/lift-count-proxies.d.ts +6 -0
- package/dist/core/count-recovery/lift-count-proxies.js +175 -0
- package/dist/core/count-recovery/live-dependencies.d.ts +6 -0
- package/dist/core/count-recovery/live-dependencies.js +76 -0
- package/dist/core/count-recovery/member-inclusions.d.ts +11 -0
- package/dist/core/count-recovery/member-inclusions.js +168 -0
- package/dist/core/count-recovery/member-premises.d.ts +29 -0
- package/dist/core/count-recovery/member-premises.js +114 -0
- package/dist/core/count-recovery/natural-cases.d.ts +6 -0
- package/dist/core/count-recovery/natural-cases.js +59 -0
- package/dist/core/count-recovery/ops.d.ts +6 -0
- package/dist/core/count-recovery/ops.js +8 -0
- package/dist/core/count-recovery/pre-state-source.d.ts +8 -0
- package/dist/core/count-recovery/pre-state-source.js +18 -0
- package/dist/core/count-recovery/rebase-path.d.ts +9 -0
- package/dist/core/count-recovery/rebase-path.js +70 -0
- package/dist/core/count-recovery/reframe-tree.d.ts +2 -0
- package/dist/core/count-recovery/reframe-tree.js +24 -0
- package/dist/core/count-recovery/rename-proof.d.ts +2 -0
- package/dist/core/count-recovery/rename-proof.js +102 -0
- package/dist/core/count-recovery/replay-linear-skeleton.d.ts +2 -0
- package/dist/core/count-recovery/replay-linear-skeleton.js +28 -0
- package/dist/core/count-recovery/row-cases.d.ts +16 -0
- package/dist/core/count-recovery/row-cases.js +292 -0
- package/dist/core/count-recovery/scalar-guards.d.ts +7 -0
- package/dist/core/count-recovery/scalar-guards.js +291 -0
- package/dist/core/count-recovery/source-memo.d.ts +12 -0
- package/dist/core/count-recovery/source-memo.js +67 -0
- package/dist/core/count-rejection-budget.d.ts +8 -0
- package/dist/core/count-rejection-budget.js +15 -0
- package/dist/core/count-replacement.d.ts +5 -0
- package/dist/core/count-replacement.js +129 -0
- package/dist/core/count-replay-diagnostic.d.ts +21 -0
- package/dist/core/count-replay-diagnostic.js +49 -0
- package/dist/core/count-replay-skeleton.d.ts +4 -0
- package/dist/core/count-replay-skeleton.js +28 -0
- package/dist/core/count-rescope-funding.d.ts +3 -0
- package/dist/core/count-rescope-funding.js +17 -0
- package/dist/core/count-restrictions.d.ts +11 -0
- package/dist/core/count-restrictions.js +31 -0
- package/dist/core/count-retry-budget.d.ts +67 -0
- package/dist/core/count-retry-budget.js +114 -0
- package/dist/core/count-retry-round.d.ts +24 -0
- package/dist/core/count-retry-round.js +44 -0
- package/dist/core/count-row-agreement.d.ts +35 -0
- package/dist/core/count-row-agreement.js +270 -0
- package/dist/core/count-row-aliases.d.ts +3 -0
- package/dist/core/count-row-aliases.js +59 -0
- package/dist/core/count-row-composition.d.ts +6 -0
- package/dist/core/count-row-composition.js +55 -0
- package/dist/core/count-row-copy-linear.d.ts +4 -0
- package/dist/core/count-row-copy-linear.js +83 -0
- package/dist/core/count-row-copy.d.ts +4 -0
- package/dist/core/count-row-copy.js +94 -0
- package/dist/core/count-row-policy.d.ts +3 -0
- package/dist/core/count-row-policy.js +56 -0
- package/dist/core/count-row-reindex.d.ts +11 -0
- package/dist/core/count-row-reindex.js +126 -0
- package/dist/core/count-row-support.d.ts +9 -0
- package/dist/core/count-row-support.js +42 -0
- package/dist/core/count-row-symmetry.d.ts +7 -0
- package/dist/core/count-row-symmetry.js +100 -0
- package/dist/core/count-scope-hyps.d.ts +2 -0
- package/dist/core/count-scope-hyps.js +163 -0
- package/dist/core/count-scope-row-reuse.d.ts +3 -0
- package/dist/core/count-scope-row-reuse.js +92 -0
- package/dist/core/count-search-allowance.d.ts +1 -0
- package/dist/core/count-search-allowance.js +17 -0
- package/dist/core/count-select.d.ts +16 -0
- package/dist/core/count-select.js +24 -0
- package/dist/core/count-stabilize-tree.d.ts +9 -0
- package/dist/core/count-stabilize-tree.js +35 -0
- package/dist/core/count-stage-trace.d.ts +8 -0
- package/dist/core/count-stage-trace.js +45 -0
- package/dist/core/count-strategies.d.ts +16 -0
- package/dist/core/count-strategies.js +155 -0
- package/dist/core/count-strategy-premises.d.ts +5 -0
- package/dist/core/count-strategy-premises.js +14 -0
- package/dist/core/count-strategy.d.ts +41 -0
- package/dist/core/count-strategy.js +76 -0
- package/dist/core/count-support.d.ts +598 -0
- package/dist/core/count-support.js +2081 -0
- package/dist/core/count-tier-budget.d.ts +14 -0
- package/dist/core/count-tier-budget.js +64 -0
- package/dist/core/count-unions.d.ts +2 -0
- package/dist/core/count-unions.js +139 -0
- package/dist/core/count-unwritten-prefix.d.ts +24 -0
- package/dist/core/count-unwritten-prefix.js +97 -0
- package/dist/core/count-witness-flags.d.ts +9 -0
- package/dist/core/count-witness-flags.js +37 -0
- package/dist/core/count-write-frames.d.ts +12 -0
- package/dist/core/count-write-frames.js +206 -0
- package/dist/core/count-write-shape.d.ts +15 -0
- package/dist/core/count-write-shape.js +73 -0
- package/dist/core/counts.d.ts +49 -7
- package/dist/core/counts.js +1679 -165
- package/dist/core/cycles.js +5 -4
- package/dist/core/cyclic.js +11 -10
- package/dist/core/data.js +16 -15
- package/dist/core/dsl-deadline.d.ts +3 -0
- package/dist/core/dsl-deadline.js +27 -0
- package/dist/core/dsl.d.ts +59 -6
- package/dist/core/dsl.js +459 -112
- package/dist/core/effect.js +8 -1
- package/dist/core/evaluation-admission.d.ts +1 -0
- package/dist/core/evaluation-admission.js +3 -0
- package/dist/core/exists.d.ts +7 -2
- package/dist/core/exists.js +131 -24
- package/dist/core/extract-check.d.ts +7 -1
- package/dist/core/extract-check.js +130 -13
- package/dist/core/extract-read.d.ts +22 -8
- package/dist/core/extract-read.js +29 -11
- package/dist/core/extract-shapes.js +122 -41
- package/dist/core/extract-standalone.js +53 -9
- package/dist/core/extract.js +9 -3
- package/dist/core/field-laws.d.ts +4 -0
- package/dist/core/field-laws.js +238 -0
- package/dist/core/finite-frontiers.d.ts +5 -0
- package/dist/core/finite-frontiers.js +116 -0
- package/dist/core/finite-houdini.d.ts +58 -0
- package/dist/core/finite-houdini.js +502 -0
- package/dist/core/finite-model.d.ts +13 -0
- package/dist/core/finite-model.js +68 -0
- package/dist/core/finite-tiny.d.ts +72 -0
- package/dist/core/finite-tiny.js +1080 -0
- package/dist/core/fixtures/count-completion/paxos-decision.json +1 -0
- package/dist/core/fresh.js +5 -1
- package/dist/core/infer.d.ts +1 -1
- package/dist/core/infer.js +76 -38
- package/dist/core/kind.js +2 -1
- package/dist/core/laws.d.ts +2 -1
- package/dist/core/laws.js +47 -14
- package/dist/core/lemma-cuts.d.ts +38 -0
- package/dist/core/lemma-cuts.js +366 -0
- package/dist/core/linear-admission.d.ts +14 -0
- package/dist/core/linear-admission.js +151 -0
- package/dist/core/machine.d.ts +44 -4
- package/dist/core/machine.js +342 -63
- package/dist/core/meter.d.ts +22 -0
- package/dist/core/meter.js +34 -0
- package/dist/core/mutate.d.ts +55 -0
- package/dist/core/mutate.js +210 -0
- package/dist/core/native-domain.d.ts +6 -0
- package/dist/core/native-domain.js +114 -0
- package/dist/core/native-law.d.ts +3 -0
- package/dist/core/native-law.js +174 -0
- package/dist/core/nonterm.js +4 -3
- package/dist/core/prover-row-budget.d.ts +3 -0
- package/dist/core/prover-row-budget.js +106 -0
- package/dist/core/quorum-laws.d.ts +25 -0
- package/dist/core/quorum-laws.js +263 -0
- package/dist/core/rationals.js +3 -2
- package/dist/core/rejection-discovery.d.ts +34 -0
- package/dist/core/rejection-discovery.js +36 -0
- package/dist/core/rejection-stage.d.ts +39 -0
- package/dist/core/rejection-stage.js +205 -0
- package/dist/core/relational.js +10 -2
- package/dist/core/relevance.d.ts +4 -0
- package/dist/core/relevance.js +79 -0
- package/dist/core/request-quotient.d.ts +8 -0
- package/dist/core/request-quotient.js +299 -0
- package/dist/core/row-agreement-shape.d.ts +15 -0
- package/dist/core/row-agreement-shape.js +68 -0
- package/dist/core/runtime-wall.d.ts +5 -0
- package/dist/core/runtime-wall.js +4 -0
- package/dist/core/sample-step.d.ts +16 -0
- package/dist/core/sample-step.js +28 -0
- package/dist/core/search-policy.d.ts +15 -0
- package/dist/core/search-policy.js +68 -0
- package/dist/core/solver.d.ts +1 -1
- package/dist/core/solver.js +40 -6
- package/dist/core/source-check.d.ts +44 -0
- package/dist/core/source-check.js +126 -0
- package/dist/core/source-diagnostic.d.ts +1 -0
- package/dist/core/source-diagnostic.js +34 -0
- package/dist/core/step-work.d.ts +12 -0
- package/dist/core/step-work.js +14 -0
- package/dist/core/strategy-premises.d.ts +8 -0
- package/dist/core/strategy-premises.js +64 -0
- package/dist/core/support-budget.d.ts +2 -0
- package/dist/core/support-budget.js +6 -0
- package/dist/core/system.js +6 -3
- package/dist/core/table-admission.d.ts +1 -0
- package/dist/core/table-admission.js +3 -0
- package/dist/core/trace-clock.d.ts +3 -0
- package/dist/core/trace-clock.js +16 -0
- package/dist/core/transfer.js +3 -2
- package/dist/core/translate.js +16 -3
- package/dist/core/wall.d.ts +11 -0
- package/dist/core/wall.js +37 -0
- package/dist/core/watch.d.ts +1 -1
- package/dist/core/watch.js +15 -2
- package/dist/core/work-admission.d.ts +164 -0
- package/dist/core/work-admission.js +418 -0
- package/dist/core/work-amount.d.ts +21 -0
- package/dist/core/work-amount.js +80 -0
- package/dist/core/work-collections.d.ts +11 -0
- package/dist/core/work-collections.js +198 -0
- package/dist/core/work-kinds.d.ts +11 -0
- package/dist/core/work-kinds.js +9 -0
- package/dist/core/work-meter.d.ts +8 -0
- package/dist/core/work-meter.js +83 -0
- package/dist/core/work-observe.d.ts +12 -0
- package/dist/core/work-observe.js +39 -0
- package/dist/core/work-profile.d.ts +10 -0
- package/dist/core/work-profile.js +21 -0
- package/dist/core/work-refusal.d.ts +1 -0
- package/dist/core/work-refusal.js +6 -0
- package/dist/interchange/format.js +2 -0
- package/dist/kernel/cdcl.d.ts +4 -0
- package/dist/kernel/cdcl.js +109 -41
- package/dist/kernel/epr.js +23 -8
- package/dist/kernel/kernel.d.ts +56 -0
- package/dist/kernel/kernel.js +466 -64
- package/dist/kernel/model-sequence.d.ts +2 -2
- package/dist/kernel/model-sequence.js +4 -3
- package/dist/kernel/model-values.d.ts +2 -0
- package/dist/kernel/model-values.js +60 -0
- package/dist/kernel/prove.d.ts +59 -3
- package/dist/kernel/prove.js +524 -130
- package/dist/kernel/prover-rows.d.ts +30 -0
- package/dist/kernel/prover-rows.js +125 -0
- package/dist/kernel/reader.d.ts +1 -1
- package/dist/kernel/reader.js +57 -12
- package/dist/kernel/simplex.js +9 -2
- package/dist/lean-kernel/emit.d.ts +47 -2
- package/dist/lean-kernel/emit.js +270 -36
- package/dist/lean-kernel/lean-terms.d.ts +1 -0
- package/dist/lean-kernel/lean-terms.js +13 -5
- package/dist/lean-kernel/legacy-family-library.d.ts +1 -0
- package/dist/lean-kernel/legacy-family-library.js +5 -0
- package/dist/lean-kernel/library.js +4 -0
- package/dist/lean-kernel/qalpha.d.ts +7 -0
- package/dist/lean-kernel/qalpha.js +40 -0
- package/package.json +5 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type Constraint } from '../core/solver.js';
|
|
2
|
+
import { type Goal, type Path } from './kernel.js';
|
|
3
|
+
export declare const rowReuseStats: {
|
|
4
|
+
nodeHits: number;
|
|
5
|
+
nodeMisses: number;
|
|
6
|
+
goalHits: number;
|
|
7
|
+
rowsHits: number;
|
|
8
|
+
rowsBuilt: number;
|
|
9
|
+
rowsEvicted: number;
|
|
10
|
+
};
|
|
11
|
+
export declare class ProverRowsCache {
|
|
12
|
+
private maxRows;
|
|
13
|
+
private maxEntries;
|
|
14
|
+
private entries;
|
|
15
|
+
private kept;
|
|
16
|
+
constructor(maxRows: number, maxEntries?: number);
|
|
17
|
+
get size(): number;
|
|
18
|
+
get weight(): number;
|
|
19
|
+
get(key: string): Constraint[] | undefined;
|
|
20
|
+
set(key: string, value: Constraint[]): number;
|
|
21
|
+
}
|
|
22
|
+
export declare const rowReuseStorage: () => {
|
|
23
|
+
nodes: number;
|
|
24
|
+
keyChars: number;
|
|
25
|
+
goals: number;
|
|
26
|
+
rowEntries: number;
|
|
27
|
+
constraints: number;
|
|
28
|
+
};
|
|
29
|
+
export declare function proverRowsReusingFacts(goal: Goal, path: Path): Constraint[];
|
|
30
|
+
export declare function proverRows(goal: Goal, path: Path): Constraint[];
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { env } from "../core/solver.js";
|
|
2
|
+
import { canon, leafConstraintsReusing } from "./kernel.js";
|
|
3
|
+
import { budgetedLeafRows } from "../core/prover-row-budget.js";
|
|
4
|
+
import { completeWorkProfile } from "../core/work-profile.js";
|
|
5
|
+
import { inBudget } from "./prove.js";
|
|
6
|
+
import { withTableAdmission } from "../core/table-admission.js";
|
|
7
|
+
const originals = new WeakMap(), ids = new WeakMap();
|
|
8
|
+
const nodes = new Map();
|
|
9
|
+
let serial = 0, keyChars = 0;
|
|
10
|
+
export const rowReuseStats = { nodeHits: 0, nodeMisses: 0, goalHits: 0, rowsHits: 0, rowsBuilt: 0, rowsEvicted: 0 };
|
|
11
|
+
const id = (o) => { let n = ids.get(o); if (n === undefined)
|
|
12
|
+
ids.set(o, (n = ++serial)); return n; };
|
|
13
|
+
function intern(value) {
|
|
14
|
+
if (!value || typeof value !== 'object')
|
|
15
|
+
return value;
|
|
16
|
+
const had = originals.get(value);
|
|
17
|
+
if (had)
|
|
18
|
+
return had;
|
|
19
|
+
const values = Array.isArray(value) ? value.map(intern) : Object.fromEntries(Object.entries(value).map(([k, v]) => [k, intern(v)]));
|
|
20
|
+
const ref = (v) => v && typeof v === 'object' ? ['@', id(v)] : typeof v === 'number' && !Number.isFinite(v) ? ['number', String(v)] : ['value', v];
|
|
21
|
+
const key = Array.isArray(values) ? JSON.stringify(['array', values.map(ref)]) : JSON.stringify(['object', Object.entries(values).sort(([a], [b]) => a.localeCompare(b)).map(([k, v]) => [k, ref(v)])]);
|
|
22
|
+
let out = nodes.get(key);
|
|
23
|
+
if (out)
|
|
24
|
+
rowReuseStats.nodeHits++;
|
|
25
|
+
else {
|
|
26
|
+
if (nodes.size >= 100000 || keyChars + key.length > 32 * 1024 * 1024) {
|
|
27
|
+
nodes.clear();
|
|
28
|
+
keyChars = 0;
|
|
29
|
+
}
|
|
30
|
+
nodes.set(key, (out = values));
|
|
31
|
+
keyChars += key.length;
|
|
32
|
+
rowReuseStats.nodeMisses++;
|
|
33
|
+
}
|
|
34
|
+
originals.set(value, out);
|
|
35
|
+
originals.set(out, out);
|
|
36
|
+
id(out);
|
|
37
|
+
return out;
|
|
38
|
+
}
|
|
39
|
+
const goals = new WeakMap(), goalPool = new Map();
|
|
40
|
+
function sharedGoal(goal) {
|
|
41
|
+
let out = goals.get(goal);
|
|
42
|
+
if (out)
|
|
43
|
+
return out;
|
|
44
|
+
const hyps = goal.hyps.map(c => intern(c)), key = hyps.map(id).join(',');
|
|
45
|
+
out = goalPool.get(key);
|
|
46
|
+
if (out) {
|
|
47
|
+
rowReuseStats.goalHits++;
|
|
48
|
+
goalPool.delete(key);
|
|
49
|
+
}
|
|
50
|
+
else
|
|
51
|
+
out = { name: goal.name, hyps };
|
|
52
|
+
if (goalPool.size >= 128)
|
|
53
|
+
goalPool.delete(goalPool.keys().next().value);
|
|
54
|
+
goalPool.set(key, out);
|
|
55
|
+
goals.set(goal, out);
|
|
56
|
+
return out;
|
|
57
|
+
}
|
|
58
|
+
// This is a retention budget, never a proof/search allowance. Limit row weight
|
|
59
|
+
// as well as entry count: 8192 large leaves can otherwise retain millions of
|
|
60
|
+
// constraints and cause GC stalls in a strict-wall run.
|
|
61
|
+
export class ProverRowsCache {
|
|
62
|
+
maxRows;
|
|
63
|
+
maxEntries;
|
|
64
|
+
entries = new Map();
|
|
65
|
+
kept = 0;
|
|
66
|
+
constructor(maxRows, maxEntries = 8192) {
|
|
67
|
+
this.maxRows = maxRows;
|
|
68
|
+
this.maxEntries = maxEntries;
|
|
69
|
+
if (maxRows !== Infinity && (!Number.isSafeInteger(maxRows) || maxRows < 0) || !Number.isSafeInteger(maxEntries) || maxEntries < 1)
|
|
70
|
+
throw new RangeError('invalid row-cache retention budget');
|
|
71
|
+
}
|
|
72
|
+
get size() { return this.entries.size; }
|
|
73
|
+
get weight() { return this.kept; }
|
|
74
|
+
get(key) {
|
|
75
|
+
const value = this.entries.get(key);
|
|
76
|
+
if (value) {
|
|
77
|
+
this.entries.delete(key);
|
|
78
|
+
this.entries.set(key, value);
|
|
79
|
+
}
|
|
80
|
+
return value;
|
|
81
|
+
}
|
|
82
|
+
set(key, value) {
|
|
83
|
+
const old = this.entries.get(key);
|
|
84
|
+
if (old) {
|
|
85
|
+
this.kept -= old.length;
|
|
86
|
+
this.entries.delete(key);
|
|
87
|
+
}
|
|
88
|
+
if (value.length > this.maxRows)
|
|
89
|
+
return 0;
|
|
90
|
+
let evicted = 0;
|
|
91
|
+
while (this.entries.size >= this.maxEntries || this.kept + value.length > this.maxRows) {
|
|
92
|
+
const first = this.entries.keys().next().value;
|
|
93
|
+
this.kept -= this.entries.get(first).length;
|
|
94
|
+
this.entries.delete(first);
|
|
95
|
+
evicted++;
|
|
96
|
+
}
|
|
97
|
+
this.entries.set(key, value);
|
|
98
|
+
this.kept += value.length;
|
|
99
|
+
return evicted;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
const rows = new ProverRowsCache(env.GDP_ROWS_UNWEIGHTED === '1' ? Infinity : 250000);
|
|
103
|
+
export const rowReuseStorage = () => ({ nodes: nodes.size, keyChars, goals: goalPool.size, rowEntries: rows.size, constraints: rows.weight });
|
|
104
|
+
// One-pass reindex keeps interned hypotheses and per-hypothesis facts without
|
|
105
|
+
// retaining complete tables. Preserve the existing full-work row admission.
|
|
106
|
+
export function proverRowsReusingFacts(goal, path) {
|
|
107
|
+
rowReuseStats.rowsBuilt++;
|
|
108
|
+
const build = () => { const shared = env.GDP_ROWS_SHARED === '0' ? goal : sharedGoal(goal); return completeWorkProfile.enabled && inBudget() ? budgetedLeafRows(shared, path) : leafConstraintsReusing(shared, path); };
|
|
109
|
+
return completeWorkProfile.enabled && inBudget() ? withTableAdmission(build) : build();
|
|
110
|
+
}
|
|
111
|
+
export function proverRows(goal, path) {
|
|
112
|
+
const shared = sharedGoal(goal);
|
|
113
|
+
// Path ordering matters for input-row indices. Include the actual atom as
|
|
114
|
+
// well as its lookup key, so even malformed key/atom pairs cannot alias.
|
|
115
|
+
const key = JSON.stringify([id(shared), [...path].map(([key, a]) => [key, a.holds, canon(a.lin)])]);
|
|
116
|
+
let out = rows.get(key);
|
|
117
|
+
if (out) {
|
|
118
|
+
rowReuseStats.rowsHits++;
|
|
119
|
+
return out;
|
|
120
|
+
}
|
|
121
|
+
rowReuseStats.rowsBuilt++;
|
|
122
|
+
out = completeWorkProfile.enabled && inBudget() ? budgetedLeafRows(shared, path) : leafConstraintsReusing(shared, path);
|
|
123
|
+
rowReuseStats.rowsEvicted += rows.set(key, out);
|
|
124
|
+
return out;
|
|
125
|
+
}
|
package/dist/kernel/reader.d.ts
CHANGED
|
@@ -111,7 +111,7 @@ export declare class Reader {
|
|
|
111
111
|
private trailRows;
|
|
112
112
|
private trailStamps;
|
|
113
113
|
private pairs;
|
|
114
|
-
leafRows(src?: (number | [string, string])[]): Row[];
|
|
114
|
+
leafRows(src?: (number | [string, string])[], beforeRow?: (count: number) => void): Row[];
|
|
115
115
|
live: Row[];
|
|
116
116
|
entered: number[];
|
|
117
117
|
left: number[];
|
package/dist/kernel/reader.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
import { completeWorkProfile } from "../core/work-profile.js";
|
|
2
|
+
import { checkWorkEndpoint } from "./prove.js";
|
|
3
|
+
import { startWork } from "../core/work-admission.js";
|
|
1
4
|
import { shareTerms } from "./share.js";
|
|
2
|
-
import {
|
|
5
|
+
import { costs, env } from "../core/solver.js";
|
|
6
|
+
import { fundedAdd as add, fundedConstant as k, fundedScale as scale, fundedSub as sub, fundedVariable as v, admittedLinearProduct, everyLinearCell } from "../core/linear-admission.js";
|
|
7
|
+
import { workConcat, workStrings, workJoin } from "../core/work-collections.js";
|
|
3
8
|
import { atomOf, canon, canonFlip, cellParts, plainMap, columnTerm, factorsOf, isCell, termColumn, tupleAnd } from "./kernel.js";
|
|
4
9
|
export const none = new Set();
|
|
5
10
|
export const join = (a, b) => {
|
|
@@ -27,6 +32,13 @@ const unfin = (r) => (r.fin ? { w: r.w, pos: r.pos, fin: false } : r);
|
|
|
27
32
|
const both = (a, b) => ({ w: join(a.w, b.w), pos: Math.max(a.pos, b.pos), fin: a.fin && b.fin });
|
|
28
33
|
// The kernel's product of two linear forms (kernel.ts's `times`): each monomial its factors sorted, joined by '*'.
|
|
29
34
|
export function times(a, b) {
|
|
35
|
+
if (completeWorkProfile.enabled)
|
|
36
|
+
return admittedLinearProduct(a, b, (p, q) => {
|
|
37
|
+
if (p.includes('⟦') || q.includes('⟦'))
|
|
38
|
+
return undefined;
|
|
39
|
+
const fs = workStrings(workConcat(p === '1' ? [] : factorsOf(p), q === '1' ? [] : factorsOf(q), 'reader product:factors'), 'reader product:sort');
|
|
40
|
+
return fs.length ? workJoin(fs, '*', 'reader product:join') : '1';
|
|
41
|
+
}, 'reader product', false);
|
|
30
42
|
const out = [];
|
|
31
43
|
for (const [p, cp] of Object.entries(a))
|
|
32
44
|
for (const [q, cq] of Object.entries(b)) {
|
|
@@ -39,7 +51,7 @@ export function times(a, b) {
|
|
|
39
51
|
}
|
|
40
52
|
const one = k(1);
|
|
41
53
|
const namePair = new WeakMap();
|
|
42
|
-
const constantLin = (l) =>
|
|
54
|
+
const constantLin = (l) => everyLinearCell(l, (key, c) => key === '1' || c === 0, 'reader constant branch');
|
|
43
55
|
const lasts = Array.from({ length: 8 }, () => new WeakMap());
|
|
44
56
|
function same(site, owner, a, b, c, make) {
|
|
45
57
|
const m = lasts[site], had = m.get(owner);
|
|
@@ -113,8 +125,11 @@ export class Reader {
|
|
|
113
125
|
s.set(f.key, f);
|
|
114
126
|
}
|
|
115
127
|
within(key, f) {
|
|
128
|
+
if (completeWorkProfile.enabled)
|
|
129
|
+
startWork('values', 1, 'reader value');
|
|
116
130
|
const was = this.finding, now = { key };
|
|
117
|
-
|
|
131
|
+
if (!completeWorkProfile.enabled)
|
|
132
|
+
costs.values++;
|
|
118
133
|
this.found.set(key, now);
|
|
119
134
|
this.finding = now;
|
|
120
135
|
try {
|
|
@@ -130,8 +145,11 @@ export class Reader {
|
|
|
130
145
|
const todo = [], seen = new Set(), found = this.found;
|
|
131
146
|
const walk = (edges) => {
|
|
132
147
|
if (edges) {
|
|
133
|
-
|
|
148
|
+
if (!completeWorkProfile.enabled)
|
|
149
|
+
costs.edges += edges.size;
|
|
134
150
|
for (const [k, f] of edges) {
|
|
151
|
+
if (completeWorkProfile.enabled)
|
|
152
|
+
startWork('edges', 1, 'reader dependency');
|
|
135
153
|
if (found.get(k) === f)
|
|
136
154
|
todo.push(k);
|
|
137
155
|
else
|
|
@@ -165,6 +183,8 @@ export class Reader {
|
|
|
165
183
|
this.units.set(name, (w = new Set([name]))); return w; }
|
|
166
184
|
// Whether lin <= 0 is decided, and by what.
|
|
167
185
|
dec(lin) {
|
|
186
|
+
if (completeWorkProfile.enabled)
|
|
187
|
+
checkWorkEndpoint('reader decision');
|
|
168
188
|
let constant = true;
|
|
169
189
|
for (const key in lin)
|
|
170
190
|
if (key !== '1') {
|
|
@@ -188,6 +208,8 @@ export class Reader {
|
|
|
188
208
|
return { t: undefined, w: none, pos: -1, fin: false };
|
|
189
209
|
}
|
|
190
210
|
linear(e) {
|
|
211
|
+
if (completeWorkProfile.enabled)
|
|
212
|
+
checkWorkEndpoint('reader expression');
|
|
191
213
|
e = this.share(e);
|
|
192
214
|
this.read(e);
|
|
193
215
|
const had = this.ls.get(e);
|
|
@@ -334,6 +356,8 @@ export class Reader {
|
|
|
334
356
|
return { when: atoms.when, unless: atoms.unless, r };
|
|
335
357
|
}
|
|
336
358
|
truth(c) {
|
|
359
|
+
if (completeWorkProfile.enabled)
|
|
360
|
+
checkWorkEndpoint('reader condition');
|
|
337
361
|
c = this.share(c);
|
|
338
362
|
this.read(c);
|
|
339
363
|
const had = this.ts.get(c);
|
|
@@ -423,6 +447,8 @@ export class Reader {
|
|
|
423
447
|
}
|
|
424
448
|
// kernel.ts's facts, each row with its reason; final when nothing it read is open.
|
|
425
449
|
factsOf(c, positive, out) {
|
|
450
|
+
if (completeWorkProfile.enabled)
|
|
451
|
+
checkWorkEndpoint('reader fact');
|
|
426
452
|
switch (c.op) {
|
|
427
453
|
case 'flag': throw new Error('flags are inlined before the kernel sees them');
|
|
428
454
|
case 'all': return R0;
|
|
@@ -637,6 +663,8 @@ export class Reader {
|
|
|
637
663
|
termSeen = [];
|
|
638
664
|
gen = 0;
|
|
639
665
|
form(lin) {
|
|
666
|
+
if (completeWorkProfile.enabled)
|
|
667
|
+
checkWorkEndpoint('reader form');
|
|
640
668
|
let f = this.forms.get(lin);
|
|
641
669
|
if (f)
|
|
642
670
|
return f;
|
|
@@ -673,11 +701,12 @@ export class Reader {
|
|
|
673
701
|
pairs = new Map();
|
|
674
702
|
// The rows in kernel.ts's order, copies kept (a leaf's derivation indexes these).
|
|
675
703
|
// With `src`, each row's source beside it: the hypothesis whose facts it is, the pair of cells it equates, else -1.
|
|
676
|
-
leafRows(src) {
|
|
704
|
+
leafRows(src, beforeRow) {
|
|
677
705
|
const rows = [];
|
|
678
706
|
for (let i = 0; i < this.trail.size(); i++) {
|
|
679
707
|
if (this.trail.quiet?.(i))
|
|
680
708
|
continue;
|
|
709
|
+
beforeRow?.(1);
|
|
681
710
|
const s = this.trail.stamp(i);
|
|
682
711
|
let r = this.trailStamps[i] === s ? this.trailRows[i] : undefined;
|
|
683
712
|
if (!r) {
|
|
@@ -693,6 +722,7 @@ export class Reader {
|
|
|
693
722
|
}
|
|
694
723
|
for (let i = 0; i < this.goal.hyps.length; i++)
|
|
695
724
|
for (const r of this.facts(i).rows) {
|
|
725
|
+
beforeRow?.(1);
|
|
696
726
|
rows.push(r);
|
|
697
727
|
src?.push(i);
|
|
698
728
|
}
|
|
@@ -711,8 +741,12 @@ export class Reader {
|
|
|
711
741
|
continue;
|
|
712
742
|
const f = this.pair(p, q), w = this.equal(f);
|
|
713
743
|
if (w) {
|
|
714
|
-
|
|
715
|
-
|
|
744
|
+
beforeRow?.(1);
|
|
745
|
+
rows.push({ lin: f.pq, w, label: '' });
|
|
746
|
+
src?.push([p.name, q.name]);
|
|
747
|
+
beforeRow?.(1);
|
|
748
|
+
rows.push({ lin: f.qp, w, label: '' });
|
|
749
|
+
src?.push([p.name, q.name]);
|
|
716
750
|
}
|
|
717
751
|
}
|
|
718
752
|
const done = this.termSeen, todo = names.filter(j => kind[j] === 1);
|
|
@@ -722,6 +756,7 @@ export class Reader {
|
|
|
722
756
|
continue;
|
|
723
757
|
done[j] = g;
|
|
724
758
|
for (const r of this.termRows(this.nameText[j])) {
|
|
759
|
+
beforeRow?.(1);
|
|
725
760
|
rows.push(r);
|
|
726
761
|
src?.push(-1);
|
|
727
762
|
for (const n of this.form(r.lin).names) {
|
|
@@ -735,10 +770,11 @@ export class Reader {
|
|
|
735
770
|
}
|
|
736
771
|
}
|
|
737
772
|
for (const j of names) {
|
|
773
|
+
beforeRow?.(1);
|
|
738
774
|
const name = this.nameText[j];
|
|
739
775
|
let r = this.natRows.get(name);
|
|
740
776
|
if (!r)
|
|
741
|
-
this.natRows.set(name, (r = { lin: { [name]: -1 }, w: none, label: '' }));
|
|
777
|
+
this.natRows.set(name, (r = { lin: completeWorkProfile.enabled ? scale(v(name), -1) : { [name]: -1 }, w: none, label: '' }));
|
|
742
778
|
rows.push(r);
|
|
743
779
|
src?.push(-1);
|
|
744
780
|
}
|
|
@@ -792,6 +828,8 @@ export class Reader {
|
|
|
792
828
|
cellsChanged = 0;
|
|
793
829
|
// (`from`: the trail's first position that may have changed since the last sync, where the caller knows it)
|
|
794
830
|
sync(from = 0) {
|
|
831
|
+
if (completeWorkProfile.enabled)
|
|
832
|
+
checkWorkEndpoint('reader sync');
|
|
795
833
|
this.syncing = true;
|
|
796
834
|
this.syncN++;
|
|
797
835
|
this.changed = [];
|
|
@@ -914,8 +952,12 @@ export class Reader {
|
|
|
914
952
|
// A copy of a row in (kind 1: from the trail or the facts, 2: a column's term rows, its own name not counted; 0: a
|
|
915
953
|
// natural's or a pair of cells', whose names it doesn't count).
|
|
916
954
|
addCopy(r, kind, self = -1) {
|
|
917
|
-
const f = this.form(r.lin), id = f.id
|
|
918
|
-
|
|
955
|
+
const f = this.form(r.lin), id = f.id;
|
|
956
|
+
if (completeWorkProfile.enabled)
|
|
957
|
+
startWork('copies', 1, 'reader add copy');
|
|
958
|
+
const cs = (this.copies[id] ??= []);
|
|
959
|
+
if (!completeWorkProfile.enabled)
|
|
960
|
+
costs.copies++;
|
|
919
961
|
if (!cs.length) {
|
|
920
962
|
this.mark(id, false);
|
|
921
963
|
this.slot[id] = this.live.length;
|
|
@@ -934,7 +976,10 @@ export class Reader {
|
|
|
934
976
|
}
|
|
935
977
|
removeCopy(r, kind, self = -1) {
|
|
936
978
|
const f = this.form(r.lin), id = f.id, cs = this.copies[id];
|
|
937
|
-
|
|
979
|
+
if (completeWorkProfile.enabled)
|
|
980
|
+
startWork('copies', 1, 'reader remove copy');
|
|
981
|
+
else
|
|
982
|
+
costs.copies++;
|
|
938
983
|
cs.splice(cs.indexOf(r), 1);
|
|
939
984
|
const at = this.slot[id];
|
|
940
985
|
if (!cs.length) {
|
|
@@ -983,7 +1028,7 @@ export class Reader {
|
|
|
983
1028
|
const name = this.nameText[j];
|
|
984
1029
|
let r = this.natRows.get(name);
|
|
985
1030
|
if (!r)
|
|
986
|
-
this.natRows.set(name, (r = { lin: { [name]: -1 }, w: none, label: '' }));
|
|
1031
|
+
this.natRows.set(name, (r = { lin: completeWorkProfile.enabled ? scale(v(name), -1) : { [name]: -1 }, w: none, label: '' }));
|
|
987
1032
|
this.inNat[j] = r;
|
|
988
1033
|
this.addCopy(r, 0);
|
|
989
1034
|
if (this.nameKind[j] === 2) {
|
package/dist/kernel/simplex.js
CHANGED
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
// false) nothing is rounded, and a strict row's bound is moved in by a hair (1e-7, relative): the floats only pick a
|
|
12
12
|
// conflict's rows, which the exact elimination then refutes, strictness and all, or doesn't.
|
|
13
13
|
import { costs, gcd } from "../core/solver.js";
|
|
14
|
+
import { completeWorkProfile } from "../core/work-profile.js";
|
|
15
|
+
import { startWork } from "../core/work-admission.js";
|
|
14
16
|
const eps = 1e-9;
|
|
15
17
|
// A bound's tolerance: relative past 1 (values drift by a few ulps a pivot).
|
|
16
18
|
const tol = (b) => 1e-7 * Math.max(1, Math.abs(b));
|
|
@@ -407,8 +409,13 @@ export class Simplex {
|
|
|
407
409
|
for (const j of ecoef.keys())
|
|
408
410
|
this.colOf[j].add(r);
|
|
409
411
|
// Every other row reading x_e: substitute.
|
|
410
|
-
|
|
411
|
-
|
|
412
|
+
if (!completeWorkProfile.enabled)
|
|
413
|
+
costs.pivotRows += this.colOf[e].size;
|
|
414
|
+
// ecoef excludes e: this traversal only deletes its current member from
|
|
415
|
+
// colOf[e], never inserts a new one. OFF retains its original snapshot.
|
|
416
|
+
for (const q of completeWorkProfile.enabled ? this.colOf[e] : [...this.colOf[e]]) {
|
|
417
|
+
if (completeWorkProfile.enabled)
|
|
418
|
+
startWork('pivotRows', 1, 'simplex pivot substitution');
|
|
412
419
|
if (q === r)
|
|
413
420
|
continue;
|
|
414
421
|
const other = this.rows[q], c = other.coef.get(e), before = other.coef.size;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { C, E, Law, Machine, Recurrence } from '../core/machine.js';
|
|
2
2
|
import { type Lin, type Step } from '../core/solver.js';
|
|
3
|
-
import { type CountCert, type CountedGoal, type CountInst, type Ghosted, type Fold, type Goal, type Instances, type KInduction, type Liveness, type Loop, type Path, type Recur, type RecurCases, type StepLaw, type Tree } from '../kernel/kernel.js';
|
|
3
|
+
import { type CountCert, type CountDecl, type CountedGoal, type CountInst, type FrameCut, type MonoCut, type LinCut, type LemmaCut, type Ghosted, type Fold, type Goal, type Instances, type KInduction, type Liveness, type Loop, type Path, type Recur, type RecurCases, type StepLaw, type Tree } from '../kernel/kernel.js';
|
|
4
4
|
import { proveStepLaws } from '../kernel/prove.js';
|
|
5
5
|
import { type Cyclic } from '../kernel/cyclic.js';
|
|
6
6
|
import { leanLibrary } from './library.js';
|
|
@@ -17,7 +17,14 @@ export declare function leaves(t: Tree, path: Path, visit: (t: Tree & {
|
|
|
17
17
|
products?: [number, number][];
|
|
18
18
|
squares?: Lin[];
|
|
19
19
|
}, path: Path) => void): void;
|
|
20
|
-
export declare function encode(ex: Exported, tamper?: boolean, dropStep?: boolean, globalVars?: string[], globalMaps?: string[], slim?: boolean, reach?: boolean
|
|
20
|
+
export declare function encode(ex: Exported, tamper?: boolean, dropStep?: boolean, globalVars?: string[], globalMaps?: string[], slim?: boolean, reach?: boolean, context?: {
|
|
21
|
+
path?: Path;
|
|
22
|
+
lemmas?: LemmaCut[];
|
|
23
|
+
frames?: FrameCut[];
|
|
24
|
+
monos?: MonoCut[];
|
|
25
|
+
lins?: LinCut[];
|
|
26
|
+
cols?: string[];
|
|
27
|
+
}): {
|
|
21
28
|
tab: string;
|
|
22
29
|
tabCols: string[];
|
|
23
30
|
hyps: string;
|
|
@@ -25,11 +32,32 @@ export declare function encode(ex: Exported, tamper?: boolean, dropStep?: boolea
|
|
|
25
32
|
cols: string[];
|
|
26
33
|
c: (t: C) => string;
|
|
27
34
|
e: (t: E) => string;
|
|
35
|
+
row: (lin: Lin) => string;
|
|
28
36
|
};
|
|
29
37
|
export declare function goalToLean(ex: Exported, i: number, tamper?: boolean, dropStep?: boolean): string;
|
|
38
|
+
export declare function encodeCounted(id: string, goal: Goal, cert: {
|
|
39
|
+
tree: Tree;
|
|
40
|
+
lemmas?: LemmaCut[];
|
|
41
|
+
frames?: FrameCut[];
|
|
42
|
+
monos?: MonoCut[];
|
|
43
|
+
lins?: LinCut[];
|
|
44
|
+
}, vars: string[], maps: string[]): {
|
|
45
|
+
lemmas: string;
|
|
46
|
+
lemmaList: (entries: LemmaCut[]) => string;
|
|
47
|
+
tab: string;
|
|
48
|
+
tabCols: string[];
|
|
49
|
+
hyps: string;
|
|
50
|
+
tree: string;
|
|
51
|
+
cols: string[];
|
|
52
|
+
c: (t: C) => string;
|
|
53
|
+
e: (t: E) => string;
|
|
54
|
+
row: (lin: Lin) => string;
|
|
55
|
+
};
|
|
56
|
+
export declare function mcToLean(id: string, hyps: C[], decls: CountDecl[], cert: CountCert): string;
|
|
30
57
|
export declare function countedToLean(id: string, g: CountedGoal, cert: {
|
|
31
58
|
insts: CountInst[];
|
|
32
59
|
tree: Tree;
|
|
60
|
+
lemmas?: LemmaCut[];
|
|
33
61
|
}, tampered?: {
|
|
34
62
|
what: string;
|
|
35
63
|
insts: CountInst[];
|
|
@@ -74,6 +102,7 @@ export declare function readable(id: string, laws: Law[], vars: string[], maps:
|
|
|
74
102
|
have?: (j: number) => string;
|
|
75
103
|
lit?: (c: C) => string;
|
|
76
104
|
eLit?: (e: E) => string;
|
|
105
|
+
ghosts?: boolean;
|
|
77
106
|
}): string;
|
|
78
107
|
export type ProgressCase = {
|
|
79
108
|
id: string;
|
|
@@ -279,6 +308,22 @@ export type LeanItem = {
|
|
|
279
308
|
k?: number;
|
|
280
309
|
ms?: number;
|
|
281
310
|
};
|
|
311
|
+
} | {
|
|
312
|
+
id: string;
|
|
313
|
+
countedGoal: CountedGoal;
|
|
314
|
+
certificate: {
|
|
315
|
+
insts: CountInst[];
|
|
316
|
+
tree: Tree;
|
|
317
|
+
lemmas?: LemmaCut[];
|
|
318
|
+
};
|
|
319
|
+
} | {
|
|
320
|
+
id: string;
|
|
321
|
+
countedMachine: Machine;
|
|
322
|
+
laws: Law[];
|
|
323
|
+
proof: {
|
|
324
|
+
instances: Record<string, Instances>;
|
|
325
|
+
certs: Record<string, CountCert>;
|
|
326
|
+
};
|
|
282
327
|
} | {
|
|
283
328
|
id: string;
|
|
284
329
|
goal: Goal;
|