| Some definitions of interest. |
|
firstn | Def firstn(n;as)
Def == Case of as; nil nil ; a.as' if 0<n a.firstn(n-1;as') else nil fi
Def (recursive) |
| | Thm* A:Type, as:A List, n:. firstn(n;as) A List |
|
int_iseg | Def {i...j} == {k:| ik & kj } |
| | Thm* i,j:. {i...j} Type |
|
int_seg | Def {i..j} == {k:| i k < j } |
| | Thm* m,n:. {m..n} Type |
|
nat | Def == {i:| 0i } |
| | Thm* Type |
|
le | Def AB == B<A |
| | Thm* i,j:. (ij) Prop |
|
length | Def ||as|| == Case of as; nil 0 ; a.as' ||as'||+1 (recursive) |
| | Thm* A:Type, l:A List. ||l|| |
| | Thm* ||nil|| |
|
select | Def l[i] == hd(nth_tl(i;l)) |
| | Thm* A:Type, l:A List, n:. 0n n<||l|| l[n] A |