Expand description
Auto-generated module
🤖 Generated with SplitRS
Functions§
- abstract_
fvars - Abstract multiple free variables simultaneously.
- abstract_
fvars_ ordered - Abstract over free variables in dependency order.
- abstract_
single - Abstract a single free variable, converting it to BVar(0).
- apply_
beta - Apply multiple arguments to a lambda, performing beta reduction.
- bvars_
in_ range - Check whether all bound variable indices are within valid range for a well-formed expression.
- cheap_
beta_ reduce - Cheap beta reduction: reduce
(λ x. body) argtobody[arg/x]. - collect_
app - Collect function and all arguments from a nested application.
- collect_
fvars - Collect all free variable IDs occurring in an expression.
- count_
fvar_ occurrences - Count how many times a free variable appears in an expression.
- distinct_
const_ count - Compute the number of distinct names (constants) in an expression.
- is_
closed_ under - Check if an expression is closed under a given set of free variables.
- is_
ground - Check if an expression is “ground” — no free or bound variables.
- lam_
arity - Count the number of leading lambda binders.
- let_
abstract - Abstract a single free variable and simultaneously replace it with a let-binding.
- let_
abstract_ many - Let-abstract multiple bindings in sequence.
- max_
bvar - Compute the maximum bound variable index in an expression.
- mk_app
- Build a nested application from a function and a list of arguments.
- mk_
forall - Build a Pi type from free variables.
- mk_
lambda - Build a lambda abstraction from free variables.
- pi_
arity - Count the number of leading pi binders.
- rename_
const - Rename all occurrences of
old_nameconstant tonew_name. - replace_
nat_ lit - Replace all literal naturals with a given value.
- shift_
bvars - Shift all bound variable indices >= cutoff by amount.
- split_
lam - Split a lambda: extract the type and body.
- split_
pi - Split a pi type: extract the domain and codomain.
- subst_
fvar - Replace a free variable with a given expression.
- topo_
sort_ fvars - Topological sort of free variables by dependency.