Affiliation:
1. Institute of Informatics , University of Białystok , Poland
Abstract
Summary
In this paper we define some properties about finite sequences and verify the partial correctness of an algorithm computing n-th element of Lucas sequence [23], [20] with given P and Q coefficients as well as two first elements (x and y). The algorithm is encoded in nominative data language [22] in the Mizar system [3], [1].
i := 0
s := x
b := y
c := x
while (i <> n)
c := s
s := b
ps := p*s
qc := q*c
b := ps − qc
i := i + j
return s
This paper continues verification of algorithms [10], [14], [12], [15], [13] written in terms of simple-named complex-valued nominative data [6], [8], [19], [11], [16], [17]. The validity of the algorithm is presented in terms of semantic Floyd-Hoare triples over such data [9]. Proofs of the correctness are based on an inference system for an extended Floyd-Hoare logic [2], [4] with partial pre- and post-conditions [18], [21], [7], [5].
Subject
Applied Mathematics,Computational Mathematics
Reference23 articles.
1. [1] Grzegorz Bancerek, Czesław Byliński, Adam Grabowski, Artur Korniłowicz, Roman Matuszewski, Adam Naumowicz, and Karol Pąk. The role of the Mizar Mathematical Library for interactive proof development in Mizar. Journal of Automated Reasoning, 61(1):9–32, 2018. doi:10.1007/s10817-017-9440-6.10.1007/s10817-017-9440-6
2. [2] R.W. Floyd. Assigning meanings to programs. Mathematical Aspects of Computer Science, 19(19–32), 1967.10.1090/psapm/019/0235771
3. [3] Adam Grabowski, Artur Korniłowicz, and Adam Naumowicz. Four decades of Mizar. Journal of Automated Reasoning, 55(3):191–198, 2015. doi:10.1007/s10817-015-9345-1.10.1007/s10817-015-9345-1
4. [4] C.A.R. Hoare. An axiomatic basis for computer programming. Commun. ACM, 12(10): 576–580, 1969.10.1145/363235.363259
5. [5] Ievgen Ivanov and Mykola Nikitchenko. On the sequence rule for the Floyd-Hoare logic with partial pre- and post-conditions. In Proceedings of the 14th International Conference on ICT in Education, Research and Industrial Applications. Integration, Harmonization and Knowledge Transfer. Volume II: Workshops, Kyiv, Ukraine, May 14–17, 2018, volume 2104 of CEUR Workshop Proceedings, pages 716–724, 2018.