Example: Integers, I
We can represent integer arithmetic by the following system:
-
We have a type type for int.
Specials = { type}
-
We have one axiom stating that int has type type.
Axioms = {( int,type)}
-
We have one rule for constructing function-types on integers.
PiRules = {( type,type,type)}
-
We don't have rules pair-types on integers.
SigmaRules = $\emptyset$
In this system we can construct a context in which the operators
+,*: int->( int-> int)
and
-: int-> int
are known:
Declaration( subject=+, type=
PiType( domain= int, range=
PiType( domain= int, range= int))),
Declaration( subject=-, type=
PiType( domain= int, range= int)),
Declaration( subject=*, type=
PiType( domain= int, range=
PiType( domain= int, range= int))).
mm\=mm\=mm\=mm\=mm\=mm\=mm\=mm\=mm\=mm\=\kill
In this context -1+3*5 can be represented by:
Application(
function= Application(
function=+,
argument= Application(
function=-,
argument=1)),
argument= Application(
function= Application(
function=*,
argument=3),
argument=5)).