| Some definitions of interest. |
|
graphobj | Def GraphObject(the_graph) == eq:Vertices(the_graph) Vertices(the_graph)   ( x,y:Vertices(the_graph). (eq(x,y))  x = y) (eacc:( T:Type. (T Vertices(the_graph) T) T Vertices(the_graph) T) ( T:Type, s:T, x:Vertices(the_graph), f:(T Vertices(the_graph) T). L:Vertices(the_graph) List. ( y:Vertices(the_graph). x-the_graph- > y  (y L)) & eacc(f,s,x) = list_accum(s',x'.f(s',x');s;L)) (vacc:( T:Type. (T Vertices(the_graph) T) T T) ( T:Type, s:T, f:(T Vertices(the_graph) T). L:Vertices(the_graph) List. no_repeats(Vertices(the_graph);L) & ( y:Vertices(the_graph). (y L)) & vacc(f,s) = list_accum(s',x'.f(s',x');s;L)) Top)) |
| | Thm* the_graph:Graph. GraphObject(the_graph) Type{i'} |
|
assert | Def b == if b True else False fi |
| | Thm* b: . b Prop |
|
gr_v | Def Vertices(t) == 1of(t) |
| | Thm* t:Graph. Vertices(t) Type |
|
graph | Def Graph == v:Type e:Type (e v v) Top |
| | Thm* Graph Type{i'} |
|
iff | Def P  Q == (P  Q) & (P  Q) |
| | Thm* A,B:Prop. (A  B) Prop |
|
l_member | Def (x l) == i: . i < ||l|| & x = l[i] T |
| | Thm* T:Type, x:T, l:T List. (x l) Prop |
|
no_repeats | Def no_repeats(T;l) == i,j: . i < ||l||  j < ||l||  i = j  l[i] = l[j] T |
| | Thm* T:Type, l:T List. no_repeats(T;l) Prop |
|
le | Def A B == B < A |
| | Thm* i,j: . (i j) Prop |
|
vertex-count | Def vertex-count(the_obj;x.P(x)) == ||vertex-subset(the_obj;x.P(x))|| |
|
length | Def ||as|| == Case of as; nil 0 ; a.as' ||as'||+1 (recursive) |
| | Thm* A:Type, l:A List. ||l||  |
| | Thm* ||nil||  |
|
vertex-subset | Def vertex-subset(the_obj;x.P(x)) == the_obj.vacc(( l,x. if P(x) [x / l] else l fi),nil) |