| Some definitions of interest. |
|
assert | Def b == if b True else False fi |
| | Thm* b: . b Prop |
|
every | Def every(p;l) == if null(l) then true else (p(head(l))) every(p;tl(l)) fi
Def (recursive) |
| | Thm* 'a:Type, p:('a  ), l:'a List. every(p;l)  |
|
hel | Def el == n: . l:'a List. if n= 0 then hd(l) else el(n-1,tl(l)) fi
Def (recursive) |
| | Thm* 'a:S. el (hnum  hlist('a)  'a) |
|
hlist | Def hlist('a) == 'a List |
| | Thm* 'a:S. hlist('a) S |
|
hnum | Def hnum ==  |
| | Thm* hnum S |
|
iff | Def P  Q == (P  Q) & (P  Q) |
| | Thm* A,B:Prop. (A  B) Prop |
|
length | Def ||as|| == Case of as; nil 0 ; a.as' ||as'||+1 (recursive) |
| | Thm* A:Type, l:A List. ||l||  |
| | Thm* ||nil||  |
| | Thm* 'a:Type, l:'a List. ||l||  |
|
nat | Def == {i: | 0 i } |
| | Thm* Type |
| | Thm* S |
|
select | Def l[i] == hd(nth_tl(i;l)) |
| | Thm* A:Type, l:A List, n: . 0 n  n<||l||  l[n] A |
|
stype | Def S == {T:Type| x:T. True } |
| | Thm* S Type{2} |