Thm* ds,da:Collection(dec()), de:sig(), rho:Decl, st1:Collection(SimpleType)
, e1:{1of([[de]] rho)}, s:{[[ds]] rho}, a:[[st1]] rho, tr:trace_env([[da]] rho), l:Term List.
( i: ||l||. trace_consistent(rho;da;tr.proj;l[i])) 
( ls:SimpleType List, f:reduce( s,m. [[s]] rho m;Prop;ls).
||ls|| = ||l|| & ( i: . i < ||l||  ls[i] term_types(ds;st1;de;l[i])) 
list_accum(x,t.x([[t]] e1 s a tr);f;l) Prop) | [rel_mng_lemma] |
Thm* ds,da:Collection(dec()), de:sig(), rho:Decl, st1:Collection(SimpleType)
, e1:{1of([[de]] rho)}, s,s':{[[ds]] rho}, a:[[st1]] rho, tr:trace_env([[da]] rho), l:Term List.
( i: ||l||. trace_consistent(rho;da;tr.proj;l[i])) 
( ls:SimpleType List, f:reduce( s,m. [[s]] rho m;Prop;ls).
||ls|| = ||l|| & ( i: . i < ||l||  ls[i] term_types(ds;st1;de;l[i])) 
list_accum(x,t.x([[t]] e1 s s' a tr);f;l) Prop) | [rel_mng_2_lemma] |
Thm* ds,da:Collection(dec()), st1:Collection(SimpleType), de:sig(), rho:Decl
, t:Term, s:{[[ds]] rho}, e:{1of([[de]] rho)}, a:SimpleType, v:[[st1]] rho
, tr:trace_env([[da]] rho).
trace_consistent(rho;da;tr.proj;t)  a term_types(ds;st1;de;t)  [[t]] e s v tr [[a]] rho | [term_typing] |
Thm* ds,daa:Collection(dec()), da:Collection(SimpleType), de:sig(), rho:Decl
, t:Term, s,s':{[[ds]] rho}, e:{1of([[de]] rho)}, a:SimpleType, v:[[da]] rho
, tr:trace_env([[daa]] rho).
trace_consistent(rho;daa;tr.proj;t)  a term_types(ds;da;de;t)  [[t]] e s s' v tr [[a]] rho | [term_typing2] |
Thm* ds,da:Collection(dec()), st:Collection(SimpleType), de:sig(), rho:Decl
, e1:{1of([[de]] rho)}, s1,s2:{[[ds]] rho}, a:[[st]] rho, tr:trace_env([[da]] rho), u:Term
, t:SimpleType.
trace_consistent(rho;da;tr.proj;u) 
( x:Label. (x term_vars(u))  s1.x = s2.x) 
t term_types(ds;st;de;u)  [[u]] e1 s1 a tr = [[u]] e1 s2 a tr [[t]] rho | [term_mng_equal] |
Thm* da:Collection(dec()), rho:Decl, tr:trace_env([[da]] rho), y1:Label.
trace_consistent(rho;da;tr.proj;trace(y1))  tr.y1 [[lbl_pr( < Trace, y1 > )]] rho | [tproj_w_f2] |
Thm* rho:Decl, t:Term, da:Collection(dec())
, R:(Label Label  ). mentions_trace(t)  trace_consistent(rho;da;R;t) | [no_mention_implies_consistent_term] |
Def trace_consistent_rel(rho;da;R;r)
== i: ||r.args||. trace_consistent(rho;da;R;r.args[i]) | [trace_consistent_rel] |