| Who Cites rel mng? | |
| rel_mng | Def [[r]] rho ds da de e s a tr == list_accum(x,t.x([[t]] 1of(e) s a tr);[[r.name]] rho 2of(e) ;r.args) |
| list_accum |
Def list_accum(x,a.f(x;a);y;l)
== Case of l; nil |
| rel_unprime |
Def rel_unprime(r) == mk_rel(r.name, map( |
| Thm* | |
| map |
Def map(f;as) == Case of as; nil |
|
Thm* | |
|
Thm* | |
| term_mng | Def [[t]] e s a tr == iterate(statevar x- > s.x statevar x'- > s.x funsymbol f- > e.f freevar x- > a trace(P)- > tr.P x(y)- > x(y) over t) |
| rel_name | Def t.name == 1of(t) |
|
Thm* | |
| tproj | Def tre.P == tre.trace | tre.proj(P) |
| Thm* | |
| trace_env_trace | Def t.trace == 1of(t) |
|
Thm* | |
| trace_projection |
Def tr | P == filter( |
| Thm* | |
| kind | Def kind(a) == 1of(a) |
| Thm* | |
|
Thm* | |
| pi1 | Def 1of(t) == t.1 |
| Thm* | |
| rel_args | Def t.args == 2of(t) |
|
Thm* | |
| trace_env_proj | Def t.proj == 2of(t) |
|
Thm* | |
| pi2 | Def 2of(t) == t.2 |
|
Thm* | |
| rel |
Def rel() == relname() |
| Thm* rel() | |
| relname | Def relname() == SimpleType+Label |
| Thm* relname() | |
| relname_mng |
Def [[rn]] rho e
== Case(rn)
Case eq(Q) = >
|
| term | Def Term == Tree(ts()) |
| Thm* Term | |
| st_mng |
Def [[s]] rho == t_iterate(st_lift(rho); |
| Thm* | |
| st_lift | Def st_lift(rho)(x) == InjCase(x; x'. rho(x'); a. Top) |
| Thm* | |
| top | Def Top == Void given Void |
|
Thm* Top | |
| unprime |
Def unprime(t) == term_iterate( |
| Thm* | |
| mk_rel | Def mk_rel(name, args) == < name,args > |
| Thm* | |
| st | Def SimpleType == Tree(Label+Unit) |
| Thm* SimpleType | |
| ts | Def ts() == Label+Label+Label+Label+Label |
| Thm* ts() | |
| lbl |
Def Label == {p:Pattern| |
| Thm* Label | |
| term_iter |
Def iterate(statevar x- > v(x)
statevar x''- > v'(x')
funsymbol op- > opr(op)
freevar f- > fvar(f)
trace(tr)- > trace(tr)
a(b)- > comb(a;b)
over t)
== term_iterate( |
| Thm* | |
| term_iterate |
Def term_iterate(v;
p;
op;
f;
tr;
a;
t)
== t_iterate( |
| Thm* | |
| ground_ptn |
Def ground_ptn(p)
== Case(p)
Case ptn_var(v) = >
false |
|
Thm* | |
| t_iterate | Def t_iterate(l;n;t) == Case(t) Case x;y = > n(t_iterate(l;n;x),t_iterate(l;n;y)) Case tree_leaf(x) = > l(x) Default = > True (recursive) |
|
Thm* | |
| ts_case |
Def ts_case(x)
var(a)= > v(a)
var'(b)= > p(b)
opr(f)= > op(f)
fvar(x)= > f(x)
trace(P)= > t(P)
end_ts_case
== Case(x)
Case ts_var(a) = >
v(a)
Case ts_pvar(b) = >
p(b)
Case ts_op(f) = >
op(f)
Case ts_fvar(x) = >
f(x)
Case ts_trace(P) = >
t(P)
Default = > |
|
Thm* | |
| case_default | Def Default = > body(value,value) == body |
| r_select | Def r.l == r(l) |
| Thm* | |
| case_relname_other |
Def Case x = > body(x) cont(x1,z)
== ( |
| case_relname_eq | Def Case eq(x) = > body(x) cont(x1,z) == InjCase(x1; x2. body(x2); _. cont(z,z)) |
| case | Def Case(value) body == body(value,value) |
| tree | Def Tree(E) == rec(T.tree_con(E;T)) |
|
Thm* | |
| tapp | Def t1 t2 == tree_node( < t1, t2 > ) |
| Thm* | |
| ttrace | Def trace(l) == tree_leaf(ts_trace(l)) |
| Thm* | |
| tfvar | Def l == tree_leaf(ts_fvar(l)) |
| Thm* | |
| topr | Def f == tree_leaf(ts_op(f)) |
| Thm* | |
| tvar | Def l == tree_leaf(ts_var(l)) |
| Thm* | |
| assert |
Def |
| Thm* | |
| ptn | Def Pattern == rec(T.ptn_con(T)) |
|
Thm* Pattern | |
| case_ptn_var |
Def Case ptn_var(x) = > body(x) cont(x1,z)
== ( |
| case_ts_trace |
Def Case ts_trace(x) = > body(x) cont(x1,z)
== ( |
| case_ts_fvar |
Def Case ts_fvar(x) = > body(x) cont(x1,z)
== ( |
| case_ts_op |
Def Case ts_op(x) = > body(x) cont(x1,z)
== ( |
| case_ts_pvar |
Def Case ts_pvar(x) = > body(x) cont(x1,z)
== ( |
| hd |
Def hd(l) == Case of l; nil |
|
Thm* | |
|
Thm* | |
| tl |
Def tl(l) == Case of l; nil |
|
Thm* | |
| case_inr | Def inr(x) = > body(x) cont(value,contvalue) == InjCase(value; _. cont(contvalue,contvalue); x. body(x)) |
| tree_con |
Def tree_con(E;T) == E+(T |
| Thm* | |
| node | Def tree_node( < x, y > ) == tree_node( < x,y > ) |
| Thm* | |
| ts_trace | Def ts_trace(x) == inr(inr(inr(inr(x)))) |
| Thm* | |
| tree_leaf | Def tree_leaf(x) == inl(x) |
| Thm* | |
|
Thm* | |
| ts_fvar | Def ts_fvar(x) == inr(inr(inr(inl(x)))) |
| Thm* | |
| ts_op | Def ts_op(x) == inr(inr(inl(x))) |
| Thm* | |
| ts_var | Def ts_var(x) == inl(x) |
| Thm* | |
| band |
Def p |
| Thm* | |
| case_lbl_pair | Def Case ptn_pr( < x, y > ) = > body(x;y) cont(x1,z) == InjCase(x1; _. cont(z,z); x2. InjCase(x2; _. cont(z,z); x2@0. InjCase(x2@0; _. cont(z,z); x2@1. x2@1/x3,x2@2. body(x3;x2@2)))) |
| ptn_con |
Def ptn_con(T) == Atom+ |
| Thm* | |
| case_tree_leaf | Def Case tree_leaf(x) = > body(x) cont(x1,z) == InjCase(x1; x2. body(x2); _. cont(z,z)) |
| case_node | Def Case x;y = > body(x;y) cont(x1,z) == InjCase(x1; _. cont(z,z); x2. x2/x3,x2@0. body(x3;x2@0)) |
| filter |
Def filter(P;l) == reduce( |
| Thm* | |
| tree_node | Def tree_node(x) == inr(x) |
| Thm* | |
|
Thm* | |
| case_ts_var | Def Case ts_var(x) = > body(x) cont(x1,z) == InjCase(x1; x2. body(x2); _. cont(z,z)) |
| case_inl | Def inl(x) = > body(x) cont(value,contvalue) == InjCase(value; x. body(x); _. cont(contvalue,contvalue)) |
| reduce |
Def reduce(f;k;as) == Case of as; nil |
|
Thm* |
About: