- app_fn : expr.coord
- app_arg : expr.coord
- lam_var_type : expr.coord
- lam_body : expr.coord
- pi_var_type : expr.coord
- pi_body : expr.coord
- elet_var_type : expr.coord
- elet_assignment : expr.coord
- elet_body : expr.coord
An enum representing a recursive argument in an expr
constructor.
Types of local and meta variables are not included because they are not consistently set and
depend on context.
Convert the coord enum to its index number.
Equations
- expr.coord.elet_body.repr = "elet_body"
- expr.coord.elet_assignment.repr = "elet_assignment"
- expr.coord.elet_var_type.repr = "elet_var_type"
- expr.coord.pi_body.repr = "pi_body"
- expr.coord.pi_var_type.repr = "pi_var_type"
- expr.coord.lam_body.repr = "lam_body"
- expr.coord.lam_var_type.repr = "lam_var_type"
- expr.coord.app_arg.repr = "app_arg"
- expr.coord.app_fn.repr = "app_fn"
@[instance]
Equations
@[instance]
Equations
@[instance]
Equations
- expr.coord.has_lt = {lt := λ (x y : expr.coord), x.code < y.code}
Use this to pick the subexpression of a given expression that cooresponds to the given coordinate.
An address is a list of coordinates used to reference subterms of an expression. The first coordinate in the list corresponds to the root of the expression.
Equations
Equations
@[instance]
Equations
@[instance]
Equations
@[instance]
Equations
as_below x y
is some z when it finds ∃ z, x = y ++ z
follow a e
finds the subexpression of e
at the given address a
.