Definitions graph 1 3 Sections Graphs Doc

Some definitions of interest.
adjl-graph Def adjl-graph(G) == < vertices = G.size, edges = x:G.size||G.out(x)||, incidence = e. < 1of(e),(G.out(1of(e)))[2of(e)] > >
adjm-graph Def adjm-graph(A) == < vertices = A.size, edges = {p:(A.sizeA.size)| (A.adj(1of(p),2of(p))) }, incidence = e.e >
adjm_to_adjl Def adjm_to_adjl(m) == Case(m) Case mk_adjmatrix(n,f) = > mk_adjlist(n, i.filter(j.f(i,j);upto(0;n)))
Thm* m:AdjMatrix. adjm_to_adjl(m) AdjList
adjmatrix Def AdjMatrix == size:sizesize
Thm* AdjMatrix Type
assert Def b == if b True else False fi
Thm* b:. b Prop
graph-isomorphic Def G H == vmap:(Vertices(G)Vertices(H)), emap:(Edges(G)Edges(H)). Bij(Vertices(G); Vertices(H); vmap) & Bij(Edges(G); Edges(H); emap) & (vmap,vmap) o Incidence(G) = Incidence(H) o emap
biject Def Bij(A; B; f) == Inj(A; B; f) & Surj(A; B; f)
Thm* A,B:Type, f:(AB). Bij(A; B; f) Prop
compose Def (f o g)(x) == f(g(x))
Thm* A,B,C:Type, f:(BC), g:(AB). f o g AC
compose2 Def (f1,f2) o g(x) == g(x)/x,y. < f1(x),f2(y) >
Thm* A,B,C,B',C':Type, g:(ABC), f1:(BB'), f2:(CC'). (f1,f2) o g AB'C'
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
identity Def Id(x) == x
Thm* A:Type. Id AA
int_seg Def {i..j} == {k:| i k < j }
Thm* m,n:. {m..n} Type
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:| 0i }
Thm* Type
pi1 Def 1of(t) == t.1
Thm* A:Type, B:(AType), p:(a:AB(a)). 1of(p) A
pi2 Def 2of(t) == t.2
Thm* A:Type, B:(AType), p:(a:AB(a)). 2of(p) B(1of(p))
select Def l[i] == hd(nth_tl(i;l))
Thm* A:Type, l:A List, n:. 0n n < ||l|| l[n] A
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

About:
pairspreadspreadspreadproductproductlistconsnil
list_indboolifthenelseassertitint
natural_numberaddless_thansetlambdaapplyfunctionrecursive_def_notice
universeequalmemberpropimpliesandfalsetrueallexists
!abstraction

Definitions graph 1 3 Sections Graphs Doc