| 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_seg | Def {i..j} == {k:| i k < j } |
| | Thm* m,n:. {m..n} 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 |