Trait formality_core::fold::CoreFold
source · pub trait CoreFold<L: Language>: Sized + CoreVisit<L> {
// Required method
fn substitute(&self, substitution_fn: SubstitutionFn<'_, L>) -> Self;
// Provided methods
fn shift_in(&self) -> Self { ... }
fn replace_free_var(
&self,
v: impl Upcast<CoreVariable<L>>,
p: impl Upcast<CoreParameter<L>>
) -> Self { ... }
}
Required Methods§
sourcefn substitute(&self, substitution_fn: SubstitutionFn<'_, L>) -> Self
fn substitute(&self, substitution_fn: SubstitutionFn<'_, L>) -> Self
Replace uses of variables with values from the substitution.
Provided Methods§
sourcefn shift_in(&self) -> Self
fn shift_in(&self) -> Self
Produce a version of this term where any debruijn indices which appear free are incremented by one.
sourcefn replace_free_var(
&self,
v: impl Upcast<CoreVariable<L>>,
p: impl Upcast<CoreParameter<L>>
) -> Self
fn replace_free_var( &self, v: impl Upcast<CoreVariable<L>>, p: impl Upcast<CoreParameter<L>> ) -> Self
Replace all appearances of free variable v
with p
.
Object Safety§
This trait is not object safe.