{"title":"Partial Correctness of an Algorithm Computing Lucas Sequences","authors":"Adrian Jaszczak","doi":"10.2478/forma-2020-0025","DOIUrl":null,"url":null,"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].","PeriodicalId":42667,"journal":{"name":"Formalized Mathematics","volume":null,"pages":null},"PeriodicalIF":1.0000,"publicationDate":"2020-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Formalized Mathematics","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.2478/forma-2020-0025","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"MATHEMATICS","Score":null,"Total":0}
引用次数: 0
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].
本文定义了有限序列的一些性质,并验证了在给定P和Q系数以及两个第一元素(x和y)的情况下计算Lucas序列[23],[20]的第n个元素的算法的部分正确性。该算法在Mizar系统[3],[1]中用指示数据语言[22]进行了编码。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本文继续验证用简单命名复值标称数据[6]、[8]、[19]、[11]、[16]、[17]编写的算法[10]、[14]、[12]、[15]、[13]。该算法的有效性以此类数据上的语义Floyd-Hoare三元组的形式呈现[9]。正确性的证明是基于一个扩展的Floyd-Hoare逻辑[2],[4]的推理系统,该推理系统具有部分前置和后置条件[18],[21],[7],[5]。
期刊介绍:
Formalized Mathematics is to be issued quarterly and publishes papers which are abstracts of Mizar articles contributed to the Mizar Mathematical Library (MML) - the basis of a knowledge management system for mathematics.