Up Next
Go up to B Foundations of the Exact Fixed Point Numbers
Go forward to B.2 g ° f = id

B.1 f ° g = idEFPN

Let (v,zn, ..., z0) e EFPN. We want to prove that f(g(v,z_n, ..., z_0))=:(v',z_n', ..., z_0')=(v,z_n, ..., z_0).

We have SUMi=0n (zi ·PRODj=0i-1 Mj) > 0, as all zi > 0 and all Mj > 2.

Thus

v=1
implies g(v,zn, ..., z0) > 0 and therefore v'=1, and
v=-1
implies g(v,zn, ..., z0) < 0 (here we need that the zero in EFPN is unique, i.e. can only have the sign "1") and therefore v'=-1.

For the rest of this subsection we assume v=1. Under this assumption is remains to show that

  1. (SUMi=0n (zi ·PRODj=0i-1 Mj)) div PRODj=0n-1 Mj = zn and
  2. ((SUMi=0n (zi ·PRODj=0i-1 Mj)) div PRODj=0x-1 Mj ) mod Mx = zx, 0 < x < n.
ad 1.
As zi < Mi for 0 < i < n we can size up zi ·PRODj=0i-1 Mj < PRODj=0i Mj. Thus under the div-operator for i=0 to n-1 all terms of the sum lead to zero - only the last one remains and results in (zn ·PRODj=0n-1 Mj) div PRODj=0n-1 Mj = zn.
ad 2.
We consider the terms of three distinct parts of the sum depending on the actual index y of a term:
x < y < n:
( (zy ·PRODj=0y-1 Mj) div PRODj=0x-1 Mj ) mod Mx
= ( zy ·Mx ·PRODj=x+1y-1 Mj ) mod Mx
= 0.
x=y:

( (zx ·PRODj=0x-1 Mj) div PRODj=0x-1 Mj ) mod Mx
= zx mod Mx
= zx.

The last step is valid as zx e {0,1,..., Mx -1}.

0 < y <x:
We size up as follows: z_y ·PROD_j=0^y-1 M_j < PROD_j=0^y M_j < PROD_j=0^x-1 M_j. Therefore
( (zy ·PRODj=0y-1 Mj) div PRODj=0x-1 Mj ) mod Mx
= 0 mod Mx
= 0.

CoFI Note: M-6 -- Version: 0.2 -- 20 July 1999.
Comments to cofi@informatik.uni-bremen.de

Up Next