Expand description
Auto-generated module
🤖 Generated with SplitRS
Functions§
- all_
alpha_ equiv - Check if a list of expressions are pairwise alpha-equivalent.
- alpha_
class_ rep - Compute an alpha-equivalence class representative.
- alpha_
equiv - Check if two expressions are alpha equivalent.
- alpha_
equiv_ mod_ levels - Check if two expressions are alpha equivalent modulo universe levels.
- alpha_
equiv_ under_ subst - Check alpha equivalence under a partial FVar substitution.
- alpha_
hash - Compute a structural hash of an expression for alpha-equivalence purposes.
- alpha_
subst - Perform capture-avoiding substitution: replace
BVar(0)withreplacementthroughoutbody, adjusting de Bruijn indices appropriately. - apply_
fvar_ subst - Apply a map of FVar substitutions to an expression.
- bvar0_
free - Check whether
BVar(0)occurs at all inbody. - canonicalize
- Rename bound variables in an expression to canonical names. This produces a canonical form for alpha-equivalent expressions.
- count_
bvar0_ occurrences - Count the number of occurrences of
BVar(0)inexpr(at the current depth). - find_
non_ equiv_ pair - Find the first pair of alpha-non-equivalent expressions in a list.
- free_
fvars - Collect all free variable IDs occurring in
expr. - fvar_
occurs - Check if
FVar(id)occurs free inexpr. - lift
- Shift all free de Bruijn indices up by 1 (lift by one binder).
- lower
- Shift all free de Bruijn indices down by 1 (used after substituting under a binder).
- rename_
bvar - Rename a specific bound variable index in an expression.
- shift
- Shift all free de Bruijn indices in
exprbyamount. - structurally_
equal - Structural equality: same as
alpha_equivbut uses a simpler name-blind comparison. - swap_
bvars - Swap two bound variable indices in an expression.