| action_set |
Def ActionSet(T) == car:Type T car car
Thm* T:Type{i}. ActionSet(T) Type{i'}
|
| lpower |
Def (L n) == if n= 0 nil else (L n-1) @ L fi (recursive)
Thm* Alph:Type, L:Alph*, n: . (L n) Alph*
|
| append |
Def as @ bs == Case of as; nil bs ; a.as' a.(as' @ bs) (recursive)
Thm* T:Type, as,bs:T*. (as @ bs) T*
|
| aset_car |
Def a.car == 1of(a)
Thm* T:Type, a:ActionSet(T). a.car Type
|
| int_seg |
Def {i..j } == {k: | i k < j }
Thm* m,n: . {m..n } Type
|
| inv_funs |
Def InvFuns(A; B; f; g) == g o f = Id & f o g = Id
Thm* A,B:Type, f:(A B), g:(B A). InvFuns(A; B; f; g) Prop
|
| length |
Def ||as|| == Case of as; nil 0 ; a.as' ||as'||+1 (recursive)
Thm* A:Type, l:A*. ||l||
Thm* ||nil|| 
|
| maction |
Def (S:L s) == if null(L) s else S.act(hd(L),(S:tl(L) s)) fi (recursive)
Thm* Alph:Type, S:ActionSet(Alph), L:Alph*, s:S.car. (S:L s) S.car
|
| nat |
Def == {i: | 0 i }
Thm* Type
|
| nat_plus |
Def  == {i: | 0 < i }
Thm*  Type
|
| segment |
Def as[m..n ] == firstn(n-m;nth_tl(m;as))
Thm* T:Type, as:T*, m,n: . (as[m..n ]) T*
|
| pi1 |
Def 1of(t) == t.1
Thm* A:Type, B:(A Type), p:a:A B(a). 1of(p) A
|
| lelt |
Def i j < k == i j & j < k
|
| tidentity |
Def Id == Id
Thm* A:Type. Id A A
|
| compose |
Def (f o g)(x) == f(g(x))
Thm* A,B,C:Type, f:(B C), g:(A B). f o g A C
|
| eq_int |
Def i= j == if i=j true ; false fi
Thm* i,j: . i= j 
|
| nth_tl |
Def nth_tl(n;as) == if n 0 as else nth_tl(n-1;tl(as)) fi (recursive)
Thm* A:Type, as:A*, i: . nth_tl(i;as) A*
|
| tl |
Def tl(l) == Case of l; nil nil ; h.t t
Thm* A:Type, l:A*. tl(l) A*
|
| hd |
Def hd(l) == Case of l; nil "?" ; h.t h
Thm* A:Type, l:A*. ||l|| 1  hd(l) A
|
| aset_act |
Def a.act == 2of(a)
Thm* T:Type, a:ActionSet(T). a.act T a.car a.car
|
| null |
Def null(as) == Case of as; nil true ; a.as' false
Thm* T:Type, as:T*. null(as)
Thm* null(nil) 
|
| le |
Def A B == B < A
Thm* i,j: . i j Prop
|
| firstn |
Def firstn(n;as)
== Case of as; nil nil ; a.as' if 0 < n a.firstn(n-1;as') else nil fi
(recursive)
Thm* A:Type, as:A*, n: . firstn(n;as) A*
|
| identity |
Def Id(x) == x
Thm* A:Type. Id A A
|
| pi2 |
Def 2of(t) == t.2
Thm* A:Type, B:(A Type), p:a:A B(a). 2of(p) B(1of(p))
|
| not |
Def A == A  False
Thm* A:Prop. ( A) Prop
|
| le_int |
Def i j ==  j < i
Thm* i,j: . i j 
|
| lt_int |
Def i < j == if i < j true ; false fi
Thm* i,j: . i < j 
|
| bnot |
Def  b == if b false else true fi
Thm* b: .  b 
|