Skip to main content

aver/codegen/lemma_discovery/
mod.rs

1//! Committed-lemma consumption — the proof-side "sink" for auxiliary helper
2//! lemmas.
3//!
4//! A normal `aver proof` parses a committed `DiscoveredLemmas.lean` (hash-gated
5//! for staleness via [`discovery_surface_hash`]), re-pins each in-scope
6//! `Induction` law to `ProofStrategy::SimpOverLemmas(names)`, and the Lean
7//! backend embeds the lemma texts before the law theorem — re-proving them in
8//! the same `lake build` — and simps over their names. So a law that needs an
9//! auxiliary lemma closes universally once that lemma is committed in scope.
10//! Re-verification in `lake build`, NOT the hash, is the soundness guard: a
11//! stale or hand-edited file is ignored, never trusted.
12//!
13//! The committed lemmas are produced EXTERNALLY — by hand or by the Method
14//! agent loop (the `the-method` skill: an agent proposes auxiliary laws, the
15//! kernel certifies them) — not by an in-tree enumerator. The brute-force
16//! equation enumerator that previously populated `DiscoveredLemmas.lean`
17//! (`aver proof --discover` / `--emit-laws`) was removed; its full source is
18//! archived at the git tag `archive/lemma-discovery-enumerator`.
19
20mod committed;
21pub use committed::{
22    CommittedLemma, LemmaProvenance, SimpDirection, apply_simp_over_lemma_pins,
23    discovery_surface_hash, forbidden_token_in_lemma, lemma_lhs_fns, mentioned_fns,
24    parse_committed_lemmas, plan_simp_over_lemma_pins, simp_entries, simp_orientation,
25};