| Some definitions of interest. |
|
adjm_adj | Def t.adj == 2of(t) |
| | Thm* t:AdjMatrix. t.adj t.size  t.size   |
|
adjm_size | Def t.size == 1of(t) |
| | Thm* t:AdjMatrix. t.size  |
|
adjmatrix | Def AdjMatrix == size:  size  size   |
| | Thm* AdjMatrix Type |
|
assert | Def b == if b True else False fi |
| | Thm* b: . b Prop |
|
edge | Def x-the_graph- > y == e:Edges(the_graph). Incidence(the_graph)(e) = < x,y > |
| | Thm* For any graph
x,y:V. x-the_graph- > y Prop |
|
filter | Def filter(P;l) == reduce( a,v. if P(a) [a / v] else v fi;nil;l) |
| | Thm* T:Type, P:(T  ), l:T List. filter(P;l) T List |
|
iff | Def P  Q == (P  Q) & (P  Q) |
| | Thm* A,B:Prop. (A  B) Prop |
|
int_seg | Def {i..j } == {k: | i k < j } |
| | Thm* m,n: . {m..n } Type |
|
l_member | Def (x l) == i: . i < ||l|| & x = l[i] T |
| | Thm* T:Type, x:T, l:T List. (x l) Prop |
|
mkgraph | Def < vertices = v, edges = e, incidence = f > == < v,e,f,o > |
| | Thm* v,e:Type, f:(e v v), o:Top. < vertices = v, edges = e, incidence = f > Graph |
|
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)) |
|
upto | Def upto(i;j) == if i < j [i / upto(i+1;j)] else nil fi (recursive) |
| | Thm* i,j: . upto(i;j) {i..j } List |