pub struct LemmaIndex { /* private fields */ }Expand description
An index over a named lemma library.
Implementations§
Source§impl LemmaIndex
impl LemmaIndex
Sourcepub fn build(named: &[(String, ProofExpr)]) -> Self
pub fn build(named: &[(String, ProofExpr)]) -> Self
Build the index from named lemmas (axioms and proved theorems alike).
Sourcepub fn find_exact(&self, goal: &ProofExpr) -> Vec<Suggestion>
pub fn find_exact(&self, goal: &ProofExpr) -> Vec<Suggestion>
Lemmas whose conclusion IS the goal (an instance of it). Ranked most-
specific first (fewest variable bindings). exact?.
Sourcepub fn find_apply(&self, goal: &ProofExpr) -> Vec<Suggestion>
pub fn find_apply(&self, goal: &ProofExpr) -> Vec<Suggestion>
Lemmas whose conclusion matches the goal AND have antecedents — applying
them reduces the goal to those (instantiated) antecedents. apply?.
Sourcepub fn select_premises(&self, goal: &ProofExpr, k: usize) -> Vec<String>
pub fn select_premises(&self, goal: &ProofExpr, k: usize) -> Vec<String>
Rank the whole library by relevance to goal and return the top k
names — the premise filter for auto on a large base. Relevance is: an
exact/apply conclusion match first, then head-symbol overlap; lemmas
sharing no symbol with the goal are dropped entirely.
Auto Trait Implementations§
impl Freeze for LemmaIndex
impl RefUnwindSafe for LemmaIndex
impl Send for LemmaIndex
impl Sync for LemmaIndex
impl Unpin for LemmaIndex
impl UnsafeUnpin for LemmaIndex
impl UnwindSafe for LemmaIndex
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more