Expand description
Auto-generated module
🤖 Generated with SplitRS
Functions§
- alpha_
eq - Check if two expressions are alpha-equivalent (structurally equal).
- contains_
bvar - Check if an expression contains the given de Bruijn variable.
- decompose_
app - Collect the arguments of a spine application
f a1 a2 … an. - eta_
reduce - Remove eta-redexes:
(fun x => f x)→f(whenxnot free inf). - eval_
nat - Evaluate a closed Nat arithmetic expression to a literal, if possible.
- expr_
depth - Return the depth (longest path to leaf) of an expression.
- expr_
size - Return the AST size (number of nodes) of an expression.
- fold_
nat_ constants - Fold constant Nat arithmetic in an expression (recursive).
- free_
vars - Collect all
FVarIds appearing inexpr. - is_
app_ of - Check if
expris headed by constanthead_name. - is_
closed - Return
trueifexprcontains no free variables. - is_
false_ expr - Check if
expris the constantFalse. - is_
nat_ lit - Check whether
expris a Nat literal with valuen. - is_prop
- Check if
exprisProp(Sort 0). - is_succ
- Check whether
exprisNat.succ _. - is_true
- Check if
expris the constantTrue. - is_zero
- Check whether
exprisNat.zeroor the literal0. - mk_app
- Build an application spine from a head and argument list.
- normalize
- Normalize an expression (reduce to normal form).
- rewrite_
all - Apply a rewrite rule exhaustively until no more rewrites are possible.
- rewrite_
once - Apply a single rewrite rule
lhs = rhsthroughoutexpr. - simp_
congruence - Apply
simplifyto all sub-expressions one level deep. - simp_
with_ trace - Apply a
SimpLemmaSetand record which lemmas were used. - simplify
- Simplify an expression using basic rewrite rules.
- simplify_
bounded - Simplify to a maximum depth (prevents looping on large terms).
- succ_of
- Extract the predecessor from a
Nat.succ nexpression.