| Some definitions of interest. |
|
d-feasible | Def d-feasible(D)
Def == ( i:Id. Feasible(M(i)))
Def == & ( l:IdLnk, tg:Id.
Def == & (M(source(l)).dout(l,tg) r M(destination(l)).din(l,tg))
Def == & ( i:Id.
Def == & (finite-type({l:IdLnk
Def == & (finite-type({| destination(l) = i & M(source(l)) sends on link l })) |
|
interface-check | Def interface-check(D;l;tg;T) == T r M(destination(l)).din(l,tg) |
|
ring-leader1 | Def ring-leader1(loc;R;uid;out;in)
Def == if R(loc)
Def == if [ (send-once(loc; ; ;"send-me"; x.x;"vote";out(loc);"me"));
Def == if [ (trigger1(loc; ; ; x,y. x= y;loc;rcv
Def == if [((in(loc)); "vote");"leader";"me"));
Def == if [ (Dconstant(loc; ;uid(loc);"me";loc));
Def == if [ma-single-sends1( ;
Def == if [ma-single-sends1( ;
Def == if [ma-single-sends1( ;
Def == if [ma-single-sends1("me";
Def == if [ma-single-sends1(rcv((in(loc)); "vote");
Def == if [ma-single-sends1((out(loc));
Def == if [ma-single-sends1("vote";
Def == if [ma-single-sends1(( a,b. if a< b [b] else nil fi));
Def == if [only [rcv((in(loc)); "vote");
Def == if [only [locl("send-me")] sends on (out(loc) with "vote")]
Def == else nil fi |
|
ma-join-list | Def (L) == reduce( A,B. A B;;L) |
|
ma-outlinks | Def ma-outlinks(M;i) == da-outlinks(1of(2of(M));i) |
|
ring | Def ring(R;in;out)
Def == ( i:|R|.
Def == ( (R(source(in(i)))) & (R(destination(out(i))))
Def == (& source(out(i)) = i
Def == (& & destination(in(i)) = i
Def == (& & in(destination(out(i))) = out(i) IdLnk
Def == (& & out(source(in(i))) = in(i) IdLnk)
Def == & ( i,j:|R|. k: . x.destination(out(x))^k(i) = j Id)
Def == & |R| |
| | Thm* R:(Id  ), in,out:(|R| IdLnk). ring(R;in;out) Prop |
|
IdLnk | Def IdLnk == Id Id  |
| | Thm* IdLnk Type |
|
rset | Def |R| == {i:Id| (R(i)) } |
| | Thm* R:(Id  ). |R| Type |
|
Id | Def Id == Atom  |
| | Thm* Id Type |
|
assert | Def b == if b True else False fi |
| | Thm* b: . b Prop |
|
inject | Def Inj(A; B; f) == a1,a2:A. f(a1) = f(a2) B  a1 = a2 |
| | Thm* A,B:Type, f:(A B). Inj(A; B; f) Prop |
|
l_all | Def ( x L.P(x)) == x:T. (x L)  P(x) |
| | Thm* T:Type, L:T List, P:(T Prop). ( x L.P(x)) Prop |
|
l_member | Def (x l) == i: . i<||l|| & x = l[i] T |
| | Thm* T:Type, x:T, l:T List. (x l) Prop |
|
ldst | Def destination(l) == 1of(2of(l)) |
| | Thm* l:IdLnk. destination(l) Id |
|
length | Def ||as|| == Case of as; nil 0 ; a.as' ||as'||+1 (recursive) |
| | Thm* A:Type, l:A List. ||l||  |
| | Thm* ||nil||  |
|
nat | Def == {i: | 0 i } |
| | Thm* Type |
|
pi1 | Def 1of(t) == t.1 |
| | Thm* A:Type, B:(A Type), p:(a:A B(a)). 1of(p) A |
|
pi2 | Def 2of(t) == t.2 |
| | Thm* A:Type, B:(A Type), p:(a:A B(a)). 2of(p) B(1of(p)) |