Skip to content

proof: remove the lemma-discovery enumerator, keep the committed-lemma consumer#587

Merged
jasisz merged 2 commits into
mainfrom
cut-discovery-enumerator
Jun 20, 2026
Merged

proof: remove the lemma-discovery enumerator, keep the committed-lemma consumer#587
jasisz merged 2 commits into
mainfrom
cut-discovery-enumerator

Conversation

@jasisz

@jasisz jasisz commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Removes the brute-force discovery enumerator and everything exclusive to it; keeps the consumer that actually closes laws. −7,471 / +55 LOC.

Why

  • The enumerator closes 0 of the hard unproven proof-corpus tasks directly, and the published coverage metric never invokes --discover — so its contribution to any reported number is unmeasured-and-zero.
  • The agent-driven Method path forbids --discover (proposed laws must close self-contained). So the enumerator is dead weight to the strategy actually being pursued, not a dependency of it.
  • Every empirical "win" was the consumer's work: the enumerator only guessed a helper lemma that a human / the Method writes by hand (decomposed/ already carries those lemmas inline, no discovery).

Cut (enumerator source + tests)

lemma_discovery/{enumerate,vm_filter,bricks,emit_laws,calculate,render}.rs, the --discover / --emit-laws / --emit-laws-to flags, their cmd_proof plumbing (prove_discovered_lemmas_lean, cmd_proof_emit_laws, lake_reverify_appended), the discovery corpus test, the enumerator unit tests, the DISCOVER=1 corpus path, and the docs/CHANGELOG mentions.

Kept (the consumer — load-bearing)

committed.rs + the surface hash + the SimpOverLemmas hook in cmd_proof: the piece that flips a law to universal by re-pinning an earlier proven law (or any committed lemma file) as a simp rule. Zero dependency on the enumerator; it is the substrate the Method feeds.

Verification

Normal aver proof is unchanged; the law-feeds-law, dependency-module, and decomposed-task proofs all still pass. cargo build, cargo build --features wasm,wasip2, clippy --features wasm,wasip2, and cargo test --test proof_spec (172 passed, 0 failed) are all green. All test targets compile.

Reversible

The full enumerator (incl. the unreleased calculate.rs Lemma-Calculation seed) is preserved at tag archive/lemma-discovery-enumerator.

🤖 Generated with Claude Code

jasisz and others added 2 commits June 19, 2026 22:44
…a consumer

The brute-force discovery enumerator (`aver proof --discover` / `--emit-laws`)
never earned its keep: it closes none of the hard unproven tasks directly, the
proof-corpus coverage metric never invokes it, and the agent-driven Method path
deliberately forbids it (proposed laws must close self-contained, not via
enumeration). Everything it "delivered" was actually the consumer's work — it
only guessed a helper lemma that a human or the Method writes by hand.

Cut the enumerator and everything exclusive to it: the term/equation
enumerator, the VM refutation filter, the structural-brick generator, the
born-as-Aver `--emit-laws` sidecar, the candidate ranking/report, and the
`--discover` / `--emit-laws` / `--emit-laws-to` flags plus their proof-command
plumbing. The discovery corpus test and the enumerator unit tests go with them.

Keep the consumer (`committed.rs` + the surface hash + the SimpOverLemmas hook
in `cmd_proof`): the piece that actually flips a law to `universal` by re-pinning
an earlier proven law (or any committed lemma file) as a simp rule. It has zero
dependency on the enumerator and is the substrate the Method feeds, so a normal
`aver proof` and the law-feeds-law / dependency-module / decomposed-task proofs
are unchanged (proof_spec stays green).

The full enumerator (including the unreleased `calculate.rs` Lemma-Calculation
seed) is preserved at tag `archive/lemma-discovery-enumerator` for revival.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`LawProofCone::types` (the field, its `compute` population, the `types()`
accessor, and the `collect_named_types_in_annotation` helper) existed only to
feed the type-directed candidate generator inside the discovery enumerator.
With the enumerator removed, all of it is dead — `cargo clippy --lib -- -D
warnings` (the CI gate) rejects the never-read field and never-used method. The
kept consumer (`law_helper_unfolds` / SimpOverLemmas) uses only `pure_fns`.

Remove the whole `types` chain; `LawProofCone` now carries just `pure_fns`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jasisz jasisz merged commit 8b9ba39 into main Jun 20, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant