previous up next
Go backward to Integer Domain
Go up to Top
Go forward to Example
RISC-Linz logo

Integer Arithmetic

0 := [<0N, 0N>]; 1 := [<1N, 0N>]; 2 := [<2N, 0N>]
x := such a in N x N: x = [a]
x + y := [<x0+Ny0,x1+Ny1>]
- x := [<x1,x0>]
x - y := [<x0+Ny1,y0+Nx1>]
x * y := [<(x0*Ny0)+N(x1*Ny1), (x0*Ny1)+N(x1*Ny0)>]
x <= y : <=> x0+y1 <= N y0+x1

Since ~ Z is a congruence relation, functions are uniquely defined.


Author: Wolfgang Schreiner
Last Modification: January 12, 2000

previous up next