pub struct AlphaEquivalenceChecker;Expand description
Check α-equivalence of two terms (de Bruijn terms are equal up to renaming of bound variables by definition — so alpha-equivalence is just structural equality after normalization of bound variable names, which in de Bruijn form is plain equality).
Implementations§
Source§impl AlphaEquivalenceChecker
impl AlphaEquivalenceChecker
Sourcepub fn alpha_equiv(&self, t1: &Term, t2: &Term) -> bool
pub fn alpha_equiv(&self, t1: &Term, t2: &Term) -> bool
Check whether two terms are alpha-equivalent. With de Bruijn indices, alpha-equivalence is structural equality.
Sourcepub fn alpha_equiv_after_head_step(&self, t1: &Term, t2: &Term) -> bool
pub fn alpha_equiv_after_head_step(&self, t1: &Term, t2: &Term) -> bool
Check alpha-equivalence modulo one layer of beta-reduction. Useful when terms may differ by a single administrative redex.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AlphaEquivalenceChecker
impl RefUnwindSafe for AlphaEquivalenceChecker
impl Send for AlphaEquivalenceChecker
impl Sync for AlphaEquivalenceChecker
impl Unpin for AlphaEquivalenceChecker
impl UnsafeUnpin for AlphaEquivalenceChecker
impl UnwindSafe for AlphaEquivalenceChecker
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