The usual arithmetic operators that are primitive in this system are these:
-a a+b a-b a b
a b
a rem b
The following comparison operators happen also to be primitive in this system:
if a=b s ; t fi
if a<b s ; t fi
a<b
The two "conditionals" simply compare integers and take the appropriate branch. The
if 0=0 s ; t fi *
s
if 0=1 s ; t fi *
t
if 0<1 s ; t fi *
s
if 0<0 s ; t fi *
t
There are also some often-used
Def i= j == if i=j
true
; false
fi
Def i< j == if i<j
true
; false
fi
Def i j ==
j<
i
Several
Def == {i:
| i
0 }
Def == {i:
| 0
i }
Def == {i:
| 0<i }
Def {i...j} == {k: | i
k & k
j }
Def {i..j } == {k:
| i
k < j }
" is an abbreviated display fork"
{0..k , which has been adopted as Nuprl's standard finite type with}
k elements.![]()
Integer Literals
In Nuprl the canonical form for an integer is atomic, rather than, say, bit strings or iteration of successor from zero. There is a small complication involving the implementation of negative literals, which will be of interest only to those interested in reconciling the implementation with theory. See
About:
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |