<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Formalization of Polynomially Bounded and Negligible Functions Using the Computer-Aided Proof-Checking System Mizar</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>8553, Japan Japan Advanced Institute of Science and Technology</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Graduate School of Science and Technology,Shinshu University 4</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>In recent years, formal veri cation applications have attracted signi cant attention. In particular, veri cation of the security of cryptosystems has been investigated extensively. In this study, we attempt to develop various mathematical libraries for cryptology using the Mizar proof checking system. Polynomially bounded and negligible functions play very important roles in cryptology. Therefore, we introduce formalized de nitions of polynomially bounded and negligible functions for formalizing cryptology in Mizar.</p>
      </abstract>
      <kwd-group>
        <kwd>polynomially bounded functions</kwd>
        <kwd>negligible functions</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        In recent years, formal veri cation applications have attracted signi cant
attention. Veri cation of the security of cryptosystems is has been investigated
extensively. The objective of this study is to develop mathematical libraries to verify
the security of cryptographic systems using the Mizar proof checking system [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
Mizar is one of the best-known projects in formalized mathematical knowledge
management. To achieve our objective, we attempt to formalize various topics
related to cryptology, such as computational complexity, probability and
probability distributions [2{7], algorithms [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], and number theory [
        <xref ref-type="bibr" rid="ref10 ref9">9, 10</xref>
        ]. The security
of most current public-key cryptosystems is based on computational complexity.
A public-key cryptosystem is secure if attacks against the cryptosystem are not
easier than solving a problem for which there is no known efficient algorithm.
Discrete-logarithm and factorization problems are considered to be hard to solve
and are therefore employed in public-key cryptosystems [
        <xref ref-type="bibr" rid="ref11 ref12">11, 12</xref>
        ]. The difficulty
of such problems is classi ed according to their computational time.
      </p>
      <sec id="sec-1-1">
        <title>Discrete-logarithm and factorization are subexponential-time problems that</title>
        <p>
          are difficult to solve if the input size is sufficiently large. It is well known that
polynomial-time problems can be solved with a relatively low computational
cost. We consider a problem Pa to be as hard to solve as another problem Pb
if we can solve Pb by calling the algorithm that can solve Pa a polynomially
bounded number of times. We are interested in the formalization of
computational complexities. Polynomially bounded functions play an important role in
practical computational complexity theory. The class P is a fundamental
computational complexity class that contains all polynomial-time decision problems
[
          <xref ref-type="bibr" rid="ref13">13</xref>
          ]. It takes a polynomially bounded amount of computation time to solve
polynomial-time decision problems using a deterministic Turing machine.
Therefore, we formalize a rigorous de nition of polynomially bounded functions.
        </p>
        <p>
          To analyze the security of cryptographic primitives such as symmetric
encryption or hash functions as well as that of cryptographic protocols, we evaluate
the success probability of any attack against them. In general, a cryptosystem
is secure if the probability of any attack succeeding against the cryptosystem is
negligible. Therefore, we formalize a rigorous de nition of the negligible
functions [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ]. Both polynomially bounded and negligible functions are described by
the behavior of polynomials. Polynomially bounded functions do not increase
faster than polynomials themselves, and negligible functions do not decrease
slower than the multiplicative inverse of polynomials. There are interesting
relationships between polynomially bounded and negligible functions.
        </p>
        <p>
          In this paper, we rst introduce our formalized de nition of polynomially
bounded functions. Next, we formalize the de nition of negligible functions and
prove that the set of negligible functions is a subset of the set of polynomially
bounded functions. Moreover, we introduce an equivalence relationship between
polynomially bounded functions using negligible functions. All formalized de
nitions and theorems in this paper are described in the Mizar language, and their
proofs are veri ed by the Mizar proof checker. Our formal descriptions have been
stored in the current version of the Mizar Mathematical Library (MML)⋆ and
are available online on the Mizar Project official website [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ].
1.1
        </p>
        <sec id="sec-1-1-1">
          <title>Our contribution</title>
          <p>
            Asymptotic notations allow us to describe the behavior of given real-valued
functions. In particular, O notation is often used to analyze the increase in
realvalued functions and to classify the computational complexity of solving the
given problems. Fortunately, there are formal de nitions and theorems
regarding asymptotic notation in the MML. Therefore, we can use these de nitions
to offer a formalized de nition of polynomially bounded functions that do not
increase faster than polynomials. We then formalize some theorems regarding
polynomially bounded functions. Next, we formalize the de nition of negligible
functions that do not decrease slower than the multiplicative inverses of
polynomials and formalize some theorems about them. It is well known that linear
combinations of polynomially bounded functions are also polynomially bounded
and that those of negligible functions are also negligible. These facts are very
useful for evaluating computational complexity and for proving the security of
cryptosystems. Thus, we formalize proofs for these theorems. Speci cally, we
⋆ Indexed by the MML identi ers ASYMPT 2[
            <xref ref-type="bibr" rid="ref15">15</xref>
            ] and ASYMPT 3[
            <xref ref-type="bibr" rid="ref16">16</xref>
            ], for Mizar
version: 8.1.04 5.32.1246 or later.
formalize the algebraic structure of polynomially bounded functions. We then
introduce an equivalence between the elements of the algebra of polynomially
bounded functions using negligible functions.
2
          </p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>Mizar</title>
      <p>
        Mizar [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] is one of the best-known projects in formalized mathematical knowledge
management. The Mizar system comprises the Mizar language, an automated
proof veri er, and mathematical libraries. The Mizar language normally uses
rst-order predicate logic; however, it can use second-order predicate logic with
conditions.
3
3.1
      </p>
    </sec>
    <sec id="sec-3">
      <title>Preparation</title>
      <sec id="sec-3-1">
        <title>Asymptotic notation</title>
        <p>In this section, we brie y review the asymptotic O notation and introduce related
formal de nitions available in the MML. For our purposes (i.e., computer science
and cryptology) it is sufficient to analyze the behavior of discrete functions. In
fact, asymptotic notation in the MML is formalized on sequences, which are
synonymous with functions whose domains comprise natural numbers.
De nition: 1 Let f ( ) and g( ) be functions from N to R. g( ) 2 O (f ( )) iff 9N
is a natural number and c is a real number s.t. 8n s.t. N n holds 0 g(n)
c f (n).</p>
        <p>The O notation is de ned in Mizar as follows:
De nition: 2 (ASYMPT_0:def 9)
definition
let f be</p>
        <p>eventually-nonnegative Real_Sequence;
func Big_Oh(f) -&gt; FUNCTION_DOMAIN of NAT,REAL</p>
        <p>equals
{ t where t is Element of Funcs(NAT, REAL)
: ex c,N st c &gt; 0 &amp;
for n st n &gt;= N holds t.n &lt;= c*f.n &amp;
t.n &gt;= 0};
end;
In Mizar, Real Sequence is an alias for a function from N to R and
\eventuallynonnegative" is an attribute for Real Sequence and is de ned as follows:
De nition: 3 (ASYMPT_0:def 2)
definition
let f be Real_Sequence;
attr f is eventually-nonnegative means
ex N being Nat st for n being Nat
st n &gt;= N holds f.n &gt;= 0;
end;
De nition: 4 (ASYMPT_1:def 3)
definition
let a be Real;
func seq_n^(a) -&gt; Real_Sequence means
it.0 = 0 &amp;
for n st n &gt; 0 holds</p>
        <p>it.n = n to_power a;</p>
        <p>The sequence of the monomial f (n) = na is de ned in Mizar as follows:
The sequence of the exponential ab n+c, where a; b; and c are given constant
real numbers, is de ned in Mizar as follows:
De nition: 5 (ASYMPT_1:def 1)
definition
let a,b,c be Real;
func seq_a^(a,b,c) -&gt; Real_Sequence means
it.n = a to_power (b*n+c);
end;
Note that for a given real number x, f (n) = xn is represented as \seq a^(x,1,0)"
in Mizar.
3.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>Polynomially bounded functions</title>
        <sec id="sec-3-2-1">
          <title>In this section, we brie y review polynomially bounded functions.</title>
          <p>De nition: 6 A real valued function, f ( ), is polynomially bounded if there
exists a natural number, k, such that
f (x) 2 O (xk)
(n) &lt;
De nition: 7 Let ( ) be a function from N to R. ( ) is a (negligible function)
iff for all polynomial p( ) holds 9N be a natural number s.t. 8n be a natural
number s.t. N n holds</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Formalization of polynomially bounded functions and polynomial functions</title>
      <p>In this section, we introduce our formal de nitions of polynomially bounded
functions and polynomial functions.
4.1</p>
      <sec id="sec-4-1">
        <title>Formalized de nition of polynomially bounded functions</title>
        <sec id="sec-4-1-1">
          <title>We propose a formal de nition of polynomially bounded functions as follows:</title>
          <p>De nition: 8 (ASYMPT_2:def 1)
definition
let p be Real_Sequence;
attr p is polynomially-bounded means
ex k be Nat st</p>
          <p>p in Big_Oh(seq_n^(k));
This de nition may appear very similar to Def. 6 but is only a formalization of an
attribute for real sequences. In the Mizar language, attributes are constructors
of adjectives. We can de ne an attribute followed by the keyword \attr". Def. 6
gives only a de nition of an attribute for real-valued functions. However, formal
methods never accept the declaration of new objects without an evidence of their
existence in order to eliminate any errors in proofs. In the Mizar system, there
are several ways to treat polynomially bounded functions. One is to prove that
declared real sequences satisfy the de nition of being polynomially bounded.
Another way is to prove the existence of polynomially bonded functions and
to de ne a new mode for polynomially bounded sequences as a sub mode of
a \Real Sequence". It should be noted that in the Mizar language, \mode" is
similar to \type" used in other languages. Furthermore, all modes are derived
from the mode \set" because the Mizar system is based on the set theory. The
third option is to de ne a set of speci c functions and their algebraic structure
as new terms. We will show an example of the third case in Sec. 6.</p>
        </sec>
        <sec id="sec-4-1-2">
          <title>Let us now introduce some theorems about polynomially bounded functions.</title>
          <p>Theorem: 1 (ASYMPT_2:25)
theorem
for a be Nat st 1 &lt; a holds
seq_a^(a,1,0) is non polynomially-bounded;
This theorem shows that the exponential f (x) = ax is not polynomially bounded
if 1 &lt; a. We rst prove Theorem 2 as a lemma for proving Theorem 1. The
following theorem holds that 2x is nonpolynomially bounded:
Theorem: 2 (ASYMPT_2:16)
theorem</p>
          <p>for x be Nat st 1 &lt; x holds
not ex N,c be Nat st
for n be Nat st N &lt;= n holds
2 to_power n &lt;= c * (n to_power x);
To prove Theorem 2, we assume that the proposition of Theorem 1 is not true and
derive a contradiction against Theorem 2. The actual formal proof of Theorem</p>
        </sec>
        <sec id="sec-4-1-3">
          <title>1 encoded in the Mizar language is described in [15].</title>
          <p>4.2</p>
        </sec>
      </sec>
      <sec id="sec-4-2">
        <title>Formalization of polynomial functions</title>
        <p>
          Although polynomials have been formalized in the MML [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ], we propose a
formal de nition of univariate polynomials as sequences for formalizing
negligible functions. Because this formalization de nes polynomials as an algebraic
structure of multivariate polynomials, it is directly unsuitable for asymptotic
notation.
        </p>
        <p>De nition: 9 (ASYMPT_2:def 2)
definition
let c be XFinSequence of REAL;
func seq_p(c) -&gt; Real_Sequence
means
for x be Nat holds
it.x = Sum(c (#) seq_a^(x,1,0));
end;
\XFinSequence" is a nite sequence whose indices start from 0. In this de nition,
XFinSequence c is the given coefficient for the representation of a polynomial.
For example, (seq p(&lt;*a,b,c*&gt;)).x = a + bx + cx2. Note that this de nition
formalizes \func seq p(c) ", where \func" is a keyword that shows that the term
is de ned as a FUNCTOR. In the Mizar language, FUNCTOR plays the role of
a constructor of new terms. To de ne a FUNCTOR, the proof checker requires
proofs of at least the existence and uniqueness of the new term. In this case,
once we call \seq p(c)", the checker automatically recognizes this term as a
Real Sequence. We can then refer to the de ning theorem, \for x be Nat holds
it.x = Sum(c (#) seq a^(x,1,0))" to prove another theorem. We will discuss the
usage of FUNCTOR in Sec. 6.</p>
        <sec id="sec-4-2-1">
          <title>Let us now introduce theorems about polynomials.</title>
          <p>Theorem: 3 (ASYMPT_2:45)
theorem
for k be Nat, c be XFinSequence of REAL
st len c = k+1 &amp; 0 &lt; c.k
holds seq_p(c) in Big_Oh( seq_n^(k) );
This theorem holds that any kth-degree polynomial function whose most
significant coefficient is positive is of O(nk). Theorem 4 follows Theorem 3:
Theorem: 4 (ASYMPT_2:46)
theorem
for k be Nat, c be XFinSequence of REAL
st len c = k+1 &amp; 0 &lt; c.k holds</p>
          <p>seq_p(c) is polynomially-bounded;</p>
        </sec>
        <sec id="sec-4-2-2">
          <title>This theorem holds that all univariate polynomials are polynomially bounded.</title>
        </sec>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5 Formalization of negligible functions</title>
      <sec id="sec-5-1">
        <title>In this section, we introduce our formal de nition of a negligible function.</title>
      </sec>
      <sec id="sec-5-2">
        <title>We then introduce some theorems about negligible functions. The following</title>
        <p>theorem holds that 2 x is a negligible function:
De nition: 10 (ASYMPT_3:def 4)
definition
let f be Function of NAT,REAL;
attr f is negligible means
for c be non empty positive-yielding</p>
        <p>XFinSequence of REAL holds
ex N be Nat st
for x be Nat st N &lt;=x holds
|. f.x .| &lt; 1/((seq_p(c)).x);
end;
Theorem: 5 (ASYMPT_3:25)
theorem
for f be Function of NAT,REAL
st for x be Nat holds</p>
        <p>f.x = 1/ (2 to_power x)
f is negligible;
holds
Theorem: 6 (ASYMPT_3:24)
theorem
for f be Function of NAT,REAL
st f is negligible
holds f is convergent &amp; lim f = 0;</p>
      </sec>
      <sec id="sec-5-3">
        <title>Theorem 6 holds that negligible functions converge to zero.</title>
        <p>By providing a formal proof of correctness, we can automate inference rules
( i.e., namely clusters) in the MML as follows:
registration
let f be negligible Function of NAT,REAL,
a be Real;
cluster a(#)f -&gt; negligible</p>
        <p>for Function of NAT,REAL;
end;
registration
let f,g be negligible Function of NAT,REAL;
cluster f+g -&gt; negligible</p>
        <p>for Function of NAT,REAL;
end;
registration
let f,g be negligible Function of NAT,REAL;
cluster f(#)g -&gt; negligible</p>
        <p>for Function of NAT,REAL;
end;
registration
let f be negligible Function of NAT,REAL,
g be polynomially-abs-bounded</p>
        <p>Function of NAT,REAL;
cluster g(#)f -&gt; negligible</p>
        <p>for Function of NAT,REAL;
end
Once these clusters are registered, the checker automatically infers that addition
and scalar multiplication between negligible functions yield negligible results. For
example, the Mizar proof checker inferences the following theorem automatically:</p>
        <sec id="sec-5-3-1">
          <title>Theorem: 7</title>
          <p>for a be Real,
e,f be negligible Real_Sequence,
g be polynomially-abs-bounded</p>
          <p>Real_Sequence holds
(a (#) f)(#) g + e is negligible;</p>
          <p>In general, a cryptosystem is secure if the probability of a successful attack
against the cryptosystem is negligible. To prove this, we evaluate the total sum
of the probability of success of any possible attack. Adversaries are allowed to
attack in parallel or iteratively. In most cases, it is sufficient to evaluate the linear
combination of probabilities of successful attacks if the probability of all attacks
is negligible. We have formalized de nitions and theorems concerning probability
and probability distributions that can treat concrete probabilistic events for
describing attacks against cryptosystems [2{7]. In combination with these formal
descriptions, the above-mentioned clusters would be useful for formal veri cation
of the security of cryptosystems.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>6 Formalization of algebra of polynomially bounded functions</title>
      <p>In Secs. 4 and 5, we introduced our formalizations of polynomially bounded
functions and negligible functions. In this section, we propose a formal de nition
of the algebra of polynomially bounded functions and present some theorems
about negligible functions and this algebra.
6.1</p>
      <sec id="sec-6-1">
        <title>Algebra of polynomially bounded functions</title>
        <p>Set of polynomially bounded functions First, we de ne a relaxed attribute
of polynomially bounded functions namely \polynomially-abs-bounded", as
follows:
De nition: 11 (ASYMPT_3:def 1)
definition</p>
        <p>let p be Real_Sequence;
attr p is polynomially-abs-bounded means
ex k be Nat st |. p .| in Big_Oh(seq_n^(k));
end;
Here, j. p .jis the absolute value of the given function p. Although we de ne
the attribute polynomially-bounded in Sec. 8, we formalize this de nition for
technical reasons, i.e., in order to introduce the multiplicative inverse of
addition between polynomially bounded functions. Naturally, polynomially bounded
functions are polynomially-abs-bounded. We then register the following clusters:
registration
cluster polynomially-bounded -&gt;
polynomially-abs-bounded for Real_Sequence;
end;
Next, we de ne the set of polynomially-abs-bounded functions as a new term,
namely, \Big Oh poly", as follows:
De nition: 12 (ASYMPT_3:def 2)
definition
func Big_Oh_poly -&gt; Subset of RAlgebra (NAT)
means for x being object holds x in it
iff x is polynomially-abs-bounded</p>
        <p>Function of NAT,REAL;</p>
        <sec id="sec-6-1-1">
          <title>We then register the following cluster:</title>
          <p>registration</p>
          <p>cluster Big_Oh_poly -&gt; non empty;
end;
In other words, we made the proof-checker recognize the existence of
polynomiallyabs-bounded functions.
Algebraic structure of polynomially bounded functions In this section,
we de ne the algebraic structure of polynomially bounded functions as follows:
De nition: 13 (ASYMPT_3:def 3)
definition
func R_Algebra_of_Big_Oh_poly</p>
          <p>-&gt; strict AlgebraStr means
the carrier of it = Big_Oh_poly
&amp; the multF of it</p>
          <p>= (RealFuncMult(NAT)) || Big_Oh_poly
&amp; the addF of it</p>
          <p>= (RealFuncAdd(NAT)) || Big_Oh_poly
&amp; the Mult of it = (RealFuncExtMult(NAT))</p>
          <p>| [:REAL,Big_Oh_poly:]
&amp; the OneF of it</p>
          <p>= RealFuncUnit(NAT)
&amp; the ZeroF of it</p>
          <p>= RealFuncZero(NAT);
In this formalization, we de ne the carrier, multiplication, addition, scalar
multiplication, multiplicative unit, and additive unit. The carrier of R Algebra of Big Oh poly
(i.e., Big Oh poly) is included in the set of all real-valued functions. Instead of
de ning a new operation, we use prede ned operations on real-valued functions
by restricting their domain according to the carrier of this structure. We de ne
the additive and multiplicative units of this structure as being the same as those
of the algebra of real-valued functions.</p>
          <p>We then prove the attributes that are held by the algebraic structure R Algebra of Big Oh poly,
and register them as the following cluster:
registration
cluster R_Algebra_of_Big_Oh_poly
-&gt; strict Abelian add-associative
right_zeroed right_complementable
commutative associative right_unital
right-distributive vector-associative
scalar-associative vector-distributive
scalar-distributive;
end;</p>
        </sec>
        <sec id="sec-6-1-2">
          <title>As a result, we proved the following theorem:</title>
          <p>Theorem: 8 (ASYMPT_3:18)
theorem</p>
          <p>R_Algebra_of_Big_Oh_poly is Algebra;</p>
        </sec>
      </sec>
      <sec id="sec-6-2">
        <title>6.2 Set of negligible functions</title>
        <p>In this section, we de ne the set of negligible functions as a new term, namely,
\negligibleFuncs", as follows:
De nition: 14 (ASYMPT_3:def 5)
definition
func negligibleFuncs -&gt;</p>
        <p>Subset of Big_Oh_poly
means
for x being object holds x in it
iff x is negligible Function of NAT,REAL;
end;</p>
        <sec id="sec-6-2-1">
          <title>We then register the following cluster:</title>
          <p>registration</p>
          <p>cluster negligibleFuncs -&gt; non empty;
end;
Note that we de ne \negligibleFuncs" as a nonempty subset of R Algebra of Big Oh poly.</p>
        </sec>
        <sec id="sec-6-2-2">
          <title>In the rest of this section, we describe particularly useful theorems about polynomially bounded functions and negligible functions.</title>
          <p>Equivalence between polynomially bounded functions We de ne the
following predicate:
De nition: 15 (ASYMPT_3:def 6)
definition
let f,g be Function of NAT,REAL;
pred f negligibleEQ g means
ex h be Function of NAT,REAL st</p>
          <p>h is negligible &amp;
for x be Nat holds</p>
          <p>|. f.x - g.x .| &lt;= |.h.x.|;
reflexivity;
symmetry;
end;
Here \f negligibleEQ g" means that there exists a negligible function, h, which is
the upper bound of the difference between two functions, f and g. In other words,
we introduce an equivalence relationship between polynomially bounded
functions. This equivalence would be useful not only for cryptography and computer
science but also for approximating and analyzing functions.</p>
        </sec>
        <sec id="sec-6-2-3">
          <title>Moreover, we prove the following theorem about multiplication between polynomially bounded and negligible functions:</title>
          <p>Theorem: 9 (ASYMPT_3:39)
theorem
for v,w be</p>
          <p>VECTOR of R_Algebra_of_Big_Oh_poly
st w in negligibleFuncs
holds v * w in negligibleFuncs;
where VECTOR is a synonym for an element of the structure, and \v * w" is
the product of two VECTORs v and w: (v w):x = (v:x) (w:x). This theorem
shows that the product \v * w" of two functions is negligible if v is a polynomially
bounded function and w is a negligible function. Recall the above mentioned
theorems and clusters concerning negligible functions. The set of negligible functions
is a nonempty subset of the set of polynomially bounded functions. Addition and
scalar multiplication between negligible functions also yield negligible functions.
These theorems mean that the set of negligible functions is an ideal of the set
of polynomially bounded functions.
7</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-7">
      <title>Case study: Evaluating the computational cost of algorithms</title>
      <p>
        In this section, we show an example of evaluating the computational cost of
algorithms. In [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], we did not formalize about computational cost of the Euclidean
algorithm, although we proved its correctness. Therefore we formalize Lame's
theorem to prove that the Euclidean algorithm is a polynomial-time algorithm.
The Euclidean algorithm is an efficient algorithm that computes the greatest
common divisor (GCD) of two given integers. Lame's theorem [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ] is known as
the rst application of Fibonacci numbers and it shows that the Euclidean
algorithm terminates after a maximum of 5X repetitions, where X represents the
decimal digits of the smaller one of the two given integers. The Euclidean
algorithm terminates after n steps such that Fib(n 1) b, where b is the smaller
of the two given integers. By evaluating Fibonacci numbers, it was found that
n is not larger than 5X repetitions, where X represents the decimal digits of b.
Consequently, we conclude that n is not increasing faster than the polynomials.
In other words, we can evaluate that the computational cost of the Euclidean
algorithm is being polynomially bounded.
      </p>
      <sec id="sec-7-1">
        <title>Theorem: 10</title>
        <p>theorem
for a,b be Element of INT st
|.a.| &gt; |.b.| &amp; b &gt; 1 holds
ex A,B be sequence of NAT,</p>
        <p>C be Real_Sequence,</p>
        <p>n be Element of NAT st
A.0 = |.a.| &amp; B.0 = |.b.| &amp;
(for i be Nat holds
A.(i+1) = B.i &amp;
B.(i+1) = A.i mod B.i) &amp;
n = (min*{i where i is Nat: B.i = 0} ) &amp;
a gcd b = A.n &amp;
Fib(n+1) &lt;= |. b .| &amp;
n &lt;= 5*[/ log(10,|. b .|) \] &amp;</p>
        <p>n &lt;= C.(|. b .|) &amp; C is polynomially-bounded;
In future works, we will formalize complex algorithms that include iterations or
subroutine calls even though we were able to formalize the Euclidean algorithm
using simple sequences.
8</p>
      </sec>
    </sec>
    <sec id="sec-8">
      <title>Overview of verifying security of cryptologic systems</title>
      <p>In this section, we brie y describe our future plans for formalizing the security
of cryptologic systems. It is well known that the security of cryptosystems is
dependent on the complexity of computational problems. Polynomially bounded
functions play an essential role in evaluating and classifying the complexity of
computational problems. We are attempting to formalize computational
complexity using our libraries mentioned in Sec. 4.</p>
      <sec id="sec-8-1">
        <title>Probability distribution is a fundamental principal of cryptology. We can de</title>
        <p>
          ne other cryptologic topics using our formalization of probability distribution.
Currently, we are attempting to formalize the indistinguishability of probability
distributions. In modern cryptology, the security of cryptologic systems is
essentially de ned by indistinguishability. For example, various cryptologic topics,
such as pseudo-random number generators and hash functions, are described
using the concept of indistinguishability. We often design a cryptographic scheme
by employing ideal functions. However, we must replace such ideal functions
with feasible functions when we implement the schemes. Thus, an implemented
scheme is not always secure even if its ideal functionality has been proven to be
secure in design. Indistinguishability of functions means the indistinguishability
of the distributions of the outputs of the functions between an ideal function
(e.g., an ideal random function) and a feasible function (e.g., a hash function)
to prove the security of a cryptographic scheme. Two probability distributions
are statistically indistinguishable if the distance between them is negligible. We
intend to de ne a formalization of indistinguishability using our formalization
of negligible functions mentioned in Sec. 5 and probability distributions[
          <xref ref-type="bibr" rid="ref2">2</xref>
          ].
9
        </p>
      </sec>
    </sec>
    <sec id="sec-9">
      <title>Conclusion</title>
      <p>In this paper, we introduced a formalized de nition of polynomially bounded and
negligible functions in the Mizar language. We then showed formalized theorems
related to these de nitions. All formalized de nitions and theorems in this paper
are described in the Mizar language, and the proofs of these theorems have been
veri ed using the Mizar proof checker. Our formal descriptions have been stored
in the current version of the MML and are available online on the Mizar Project
official website. We prepared these formalized articles in order to achieve our
aim of constructing an automated formal veri cation tool for cryptology. We
will now attempt to formalize one of the most important concepts of cryptology
indistinguishability using the formalization of negligible functions introduced in
this paper.</p>
    </sec>
    <sec id="sec-10">
      <title>ACKNOWLEDGEMENT</title>
      <p>This study is partly supported by JSPS KAKENHI 15K00183. The authors
would like to express their gratitude to Prof. Yasunari Shidama for his support
and encouragement.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>Mizar</given-names>
            <surname>System</surname>
          </string-name>
          : Available at http://mizar.org/.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>H.</given-names>
            <surname>Okazaki</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Futa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Shidama</surname>
          </string-name>
          , \
          <article-title>Formal de nition of probability on nite and discrete sample space for proving security of cryptographic systems using Mizar"</article-title>
          ,
          <source>Arti cial Intelligence Research</source>
          ,
          <volume>2</volume>
          (
          <issue>4</issue>
          ), pp.
          <fpage>37</fpage>
          -
          <lpage>48</lpage>
          ,
          <year>2013</year>
          . DOI :
          <volume>10</volume>
          .5430/air.v2n4p37
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>H.</given-names>
            <surname>Okazaki</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Shidama</surname>
          </string-name>
          , \
          <article-title>Random Variables and Product of Probability Spaces"</article-title>
          ,
          <source>Formalized Mathematics</source>
          ,
          <volume>21</volume>
          (
          <issue>1</issue>
          ), pp.
          <fpage>33</fpage>
          -
          <lpage>39</lpage>
          ,
          <year>2013</year>
          . DOI :
          <volume>10</volume>
          .2478/forma-2013
          <source>-0003</source>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>H.</given-names>
            <surname>Okazaki</surname>
          </string-name>
          , \
          <article-title>Posterior Probability on Finite Set"</article-title>
          ,
          <source>Formalized Mathematics</source>
          ,
          <volume>20</volume>
          (
          <issue>4</issue>
          ), pp.
          <fpage>257</fpage>
          -
          <lpage>263</lpage>
          ,
          <year>2013</year>
          . DOI :
          <volume>10</volume>
          .2478/v10037-012-0030-0
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>H.</given-names>
            <surname>Okazaki</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Shidama</surname>
          </string-name>
          , \
          <article-title>Probability Measure on Discrete Spaces and Algebra of Real Valued Random Variables"</article-title>
          ,
          <source>Formalized Mathematics</source>
          ,
          <volume>18</volume>
          (
          <issue>4</issue>
          ), pp.
          <fpage>213</fpage>
          -
          <lpage>217</lpage>
          ,
          <year>2010</year>
          . DOI :
          <volume>10</volume>
          .2478/v10037-010-0026-6
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>H.</given-names>
            <surname>Okazaki</surname>
          </string-name>
          , \
          <article-title>Probability on Finite and Discrete Set and Uniform Distribution"</article-title>
          ,
          <source>Formalized Mathematics</source>
          ,
          <volume>17</volume>
          (
          <issue>2</issue>
          ), pp.
          <fpage>173</fpage>
          -
          <lpage>178</lpage>
          ,
          <year>2009</year>
          . DOI :
          <volume>10</volume>
          .2478/v10037-009- 0020-z
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>H.</given-names>
            <surname>Okazaki</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Shidama</surname>
          </string-name>
          , \
          <article-title>Probability on Finite Set and Real-Valued Random Variables"</article-title>
          ,
          <source>Formalized Mathematics</source>
          ,
          <volume>17</volume>
          (
          <issue>2</issue>
          ), pp.
          <fpage>129</fpage>
          -
          <lpage>136</lpage>
          ,
          <year>2009</year>
          . DOI :
          <volume>10</volume>
          .2478/v10037- 009-0014-x
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>H.</given-names>
            <surname>Okazaki</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Aoki</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Shidama</surname>
          </string-name>
          , \
          <article-title>Extended Euclidean Algorithm and CRT Algorithm"</article-title>
          ,
          <source>Formalized Mathematics</source>
          <volume>20</volume>
          (
          <issue>2</issue>
          ), pp-
          <volume>175</volume>
          -179,
          <year>2012</year>
          . DOI :
          <volume>10</volume>
          .2478/v10037- 012-0020-2
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>Y.</given-names>
            <surname>Futa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Mizushima</surname>
          </string-name>
          , H. Okazaki, \
          <article-title>Formalization of Gaussian integers, Gaussian rational numbers, and their algebraic structures with Mizar"</article-title>
          ,
          <source>ISITA</source>
          <year>2012</year>
          : pp.
          <fpage>591</fpage>
          -
          <lpage>595</lpage>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <given-names>Y.</given-names>
            <surname>Futa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Okazaki</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Shidama</surname>
          </string-name>
          , \Formalization of De nitions and
          <article-title>Theorems Related to an Elliptic Curve Over a Finite Prime Field by Using Mizar"</article-title>
          ,
          <source>J. Autom. Reasoning</source>
          <volume>50</volume>
          (
          <issue>2</issue>
          ), pp.
          <fpage>161</fpage>
          -
          <lpage>172</lpage>
          (
          <year>2013</year>
          ).
          <source>DOI : 10.1007/s10817-012-9265-2</source>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Ronald L. Rivest</surname>
          </string-name>
          , Adi Shamir,
          <string-name>
            <surname>Len M. Adelman</surname>
          </string-name>
          , \
          <article-title>A Method for Obtaining Digital Signature and Public-key Cryptsystems"</article-title>
          , MIT-LCS-TM-
          <volume>082</volume>
          , (
          <year>1977</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Taher</surname>
            <given-names>Elgamal</given-names>
          </string-name>
          , \
          <article-title>A Public-Key Cryptosystem and a Signature Scheme Based on Discrete Logarithms"</article-title>
          ,
          <source>IEEE Transactions on Information Theory</source>
          , IT-
          <volume>31</volume>
          (
          <issue>4</issue>
          ), pp.
          <volume>469</volume>
          ?-
          <fpage>472</fpage>
          , (
          <year>1985</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Jon</surname>
            <given-names>Kleinberg</given-names>
          </string-name>
          , Eva Tardos, \
          <article-title>Algorithm Design"</article-title>
          ,
          <string-name>
            <surname>Addison-Wesley</surname>
          </string-name>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Goldreich</surname>
          </string-name>
          , \Foundations of Cryptography : Volume:
          <article-title>1 Basic Tools"</article-title>
          , Cambridge University Press,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15. H.
          <string-name>
            <surname>Okazaki</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          <string-name>
            <surname>Futa</surname>
          </string-name>
          , \
          <article-title>Polynomially Bounded Sequences and Polynomial Sequences"</article-title>
          ,
          <source>Formalized Mathematics</source>
          ,
          <volume>23</volume>
          (
          <issue>3</issue>
          ), pp.
          <fpage>205</fpage>
          -
          <lpage>213</lpage>
          ,
          <year>2015</year>
          . DOI:
          <volume>10</volume>
          .1515/forma2015-
          <fpage>0017</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16. H. Okazaki, \
          <article-title>Algebra of Polynomially Bounded Sequences and Negligible Functions"</article-title>
          ,
          <source>Formalized Mathematics</source>
          ,
          <volume>23</volume>
          (
          <issue>4</issue>
          ), pp.
          <fpage>371</fpage>
          -
          <lpage>378</lpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <given-names>P.</given-names>
            <surname>Rudnicki</surname>
          </string-name>
          ,
          <string-name>
            <surname>A</surname>
          </string-name>
          . Trybulec, \
          <article-title>Multivariate Polynomials with Arbitrary Number of Variables"</article-title>
          ,
          <source>Formalized Mathematics</source>
          ,
          <volume>9</volume>
          (
          <issue>1</issue>
          ), pp.
          <volume>95</volume>
          {
          <issue>110</issue>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18. G. Lame', \
          <article-title>Note sur la limite du nombre des divisions dans la recherche du plus grand commun diviseur entre deux nombres entiers"</article-title>
          ,
          <source>Comptes Rendus Acad. Sci</source>
          ,
          <volume>19</volume>
          , pp.
          <volume>867</volume>
          {
          <issue>870</issue>
          ,
          <year>1844</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>