09.02.2013 Views

SESSION GRAPH BASED AND TREE METHODS + RELATED ...

SESSION GRAPH BASED AND TREE METHODS + RELATED ...

SESSION GRAPH BASED AND TREE METHODS + RELATED ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

48 Int'l Conf. Foundations of Computer Science | FCS'12 |<br />

6.1 Accuracy of ALGO EXGCD<br />

In this section we prove the accuracy of our formalization<br />

that the functor ALGO EXGCD returns a, b and<br />

g for given integers x and y such that ax + by = g(g<br />

is the greatest common divisor of x and y).<br />

We can prove the following theorem in a similarly<br />

for proving Theorem 6.1:<br />

Theorem 6.1 (Accuracy of ALGO EXGCD)<br />

for x,y be Element of INT<br />

holds<br />

ALGO_EXGCD(x,y)‘3 = x gcd y<br />

&<br />

ALGO_EXGCD(x,y)‘1 * x<br />

+ ALGO_EXGCD(x,y)‘2 * y<br />

= x gcd y,<br />

where ALGO EXGCD(x,y)‘n denotes the nth member<br />

of ALGO EXGCD(x,y). Thus we proved the accuracy<br />

of our formalization of extended Euclidean algorithm.<br />

6.2 Multiplicative Inverse<br />

Then, we define the functor that computes the multiplicative<br />

inverse over a residue class ring using the<br />

ALGO EXGCD as follows:<br />

Definition 6.2 (Inverse)<br />

let x,p be Element of INT;<br />

func ALGO_INVERSE(x,p) -> Element of INT<br />

means<br />

for y be Element of INT<br />

st y = (x mod p)<br />

holds<br />

(ALGO_EXGCD(p,y)‘3 = 1 implies<br />

((ALGO_EXGCD(p,y)‘2 < 0) implies<br />

(ex z be Element of INT<br />

st z = ALGO_EXGCD(p,y)‘2<br />

& it = p + z ))<br />

& ( (0

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!