[−][src]Enum nar::syntax::core::subst::PrimSubst
Substitution type. Agda.
Variants
The identity substitution. $$ \Gamma \vdash \text{IdS} : \Gamma $$
Cons(T, Rc<Self>)
The "add one more" substitution, or "substitution extension". $$ \cfrac{\Gamma \vdash u : A \rho \quad \Gamma \vdash \rho : \Delta} {\Gamma \vdash \text{Cons}(u, \rho) : \Delta, A} $$
Succ(Rc<Self>)
Strengthening substitution. Apply this to a term which does not contain variable 0 to lower all de Bruijn indices by one. $$ \cfrac{\Gamma \vdash \rho : \Delta} {\Gamma \vdash \text{Succ} \rho : \Delta, A} $$
Weakening substitution, lifts to an extended context. $$ \cfrac{\Gamma \vdash \rho : \Delta} {\Gamma, \Psi \vdash \text{Weak}_\Psi \rho : \Delta} $$
Lifting substitution. Use this to go under a binder. $\text{Lift}_1 \rho := \text{Cons}(\texttt{Term::form\_dbi(0)}, \text{Weak}_1 \rho)$. $$ \cfrac{\Gamma \vdash \rho : \Delta} {\Gamma, \Psi \rho \vdash \text{Lift}_\Psi \rho : \Delta, \Psi} $$
Methods
impl<T: DeBruijn> PrimSubst<T>
[src]
pub fn concat(ts: impl DoubleEndedIterator<Item = T>, to: Rc<Self>) -> Rc<Self>
[src]
Agda.
pub fn parallel(ts: impl DoubleEndedIterator<Item = T>) -> Rc<Self>
[src]
Agda.
pub fn cons(self: Rc<Self>, t: T) -> Rc<Self>
[src]
Agda.
impl<Term: DeBruijn + RedEx<Term, Term> + Clone> PrimSubst<Term>
[src]
pub fn lookup(&self, dbi: DBI) -> Term
[src]
pub fn raise_term(k: DBI, term: Term) -> Term
[src]
Agda.
pub fn raise_from(n: DBI, k: DBI, term: Term) -> Term
[src]
Agda.
pub fn compose(self: Rc<Self>, sgm: Rc<Self>) -> Rc<Self>
[src]
Agda.
pub fn lookup_impl(&self, dbi: DBI) -> Either<&Term, Term>
[src]
If lookup failed, return the DBI. Agda.
impl<T> PrimSubst<T>
[src]
pub fn raise(by: DBI) -> Rc<Self>
[src]
Agda.
pub fn drop_by(self: Rc<Self>, drop_by: DBI) -> Rc<Self>
[src]
Lift a substitution under k binders. Agda.
pub fn lift_by(self: Rc<Self>, lift_by: DBI) -> Rc<Self>
[src]
Lift a substitution under k binders. Agda.
pub fn weaken(self: Rc<Self>, weaken_by: DBI) -> Rc<Self>
[src]
Agda.
pub fn one(t: T) -> Rc<Self>
[src]
Trait Implementations
Auto Trait Implementations
impl<T> !RefUnwindSafe for PrimSubst<T>
impl<T> !Send for PrimSubst<T>
impl<T> !Sync for PrimSubst<T>
impl<T> Unpin for PrimSubst<T> where
T: Unpin,
T: Unpin,
impl<T> !UnwindSafe for PrimSubst<T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,