13 research outputs found
Type classes for efficient exact real arithmetic in Coq
Floating point operations are fast, but require continuous effort on the part
of the user in order to ensure that the results are correct. This burden can be
shifted away from the user by providing a library of exact analysis in which
the computer handles the error estimates. Previously, we [Krebbers/Spitters
2011] provided a fast implementation of the exact real numbers in the Coq proof
assistant. Our implementation improved on an earlier implementation by O'Connor
by using type classes to describe an abstract specification of the underlying
dense set from which the real numbers are built. In particular, we used dyadic
rationals built from Coq's machine integers to obtain a 100 times speed up of
the basic operations already. This article is a substantially expanded version
of [Krebbers/Spitters 2011] in which the implementation is extended in the
various ways. First, we implement and verify the sine and cosine function.
Secondly, we create an additional implementation of the dense set based on
Coq's fast rational numbers. Thirdly, we extend the hierarchy to capture order
on undecidable structures, while it was limited to decidable structures before.
This hierarchy, based on type classes, allows us to share theory on the
naturals, integers, rationals, dyadics, and reals in a convenient way. Finally,
we obtain another dramatic speed-up by avoiding evaluation of termination
proofs at runtime.Comment: arXiv admin note: text overlap with arXiv:1105.275
Exact Real Arithmetic with Perturbation Analysis and Proof of Correctness
In this article, we consider a simple representation for real numbers and
propose top-down procedures to approximate various algebraic and transcendental
operations with arbitrary precision. Detailed algorithms and proofs are
provided to guarantee the correctness of the approximations. Moreover, we
develop and apply a perturbation analysis method to show that our approximation
procedures only recompute expressions when unavoidable.
In the last decade, various theories have been developed and implemented to
realize real computations with arbitrary precision. Proof of correctness for
existing approaches typically consider basic algebraic operations, whereas
detailed arguments about transcendental operations are not available. Another
important observation is that in each approach some expressions might require
iterative computations to guarantee the desired precision. However, no formal
reasoning is provided to prove that such iterative calculations are essential
in the approximation procedures. In our approximations of real functions, we
explicitly relate the precision of the inputs to the guaranteed precision of
the output, provide full proofs and a precise analysis of the necessity of
iterations
Wave Equation Numerical Resolution: a Comprehensive Mechanized Proof of a C Program
We formally prove correct a C program that implements a numerical scheme for
the resolution of the one-dimensional acoustic wave equation. Such an
implementation introduces errors at several levels: the numerical scheme
introduces method errors, and floating-point computations lead to round-off
errors. We annotate this C program to specify both method error and round-off
error. We use Frama-C to generate theorems that guarantee the soundness of the
code. We discharge these theorems using SMT solvers, Gappa, and Coq. This
involves a large Coq development to prove the adequacy of the C program to the
numerical scheme and to bound errors. To our knowledge, this is the first time
such a numerical analysis program is fully machine-checked.Comment: No. RR-7826 (2011
Formal Foundations of 3D Geometry to Model Robot Manipulators
International audienceWe are interested in the formal specification of safety properties of robot manipulators down to the mathematical physics. To this end, we have been developing a formalization of the mathematics of rigid body transformations in the COQ proof-assistant. It can be used to address the forward kinematics problem, i.e., the computation of the position and orientation of the end-effector of a robot manipulator in terms of the link and joint parameters. Our formalization starts by extending the Mathematical Components library with a new theory for angles and by developing three-dimensional geometry. We use these theories to formalize the foundations of robotics. First, we formalize a comprehensive theory of three-dimensional rotations, including exponentials of skew-symmetric matrices and quaternions. Then, we provide a formalization of the various representations of rigid body transformations: isometries, homogeneous representation, the Denavit-Hartenberg convention, and screw motions. These ingredients make it possible to formalize robot manipulators: we illustrate this aspect by an application to the SCARA robot manipulator
A Formal Proof of Square Root and Division Elimination in Embedded Programs
International audienceThe use of real numbers in a program can introduce differences between the expected and the actual behavior of the program, due to the finite representation of these numbers. Therefore, one may want to define programs using real numbers such that this difference vanishes. This paper defines a program transformation for a certain class of programs that improves the accuracy of the computations on real number representations by removing the square root and division operations from the original program in order to enable exact computation with addition, multiplication and subtraction. This transformation is meant to be used on embedded systems, therefore the produced programs have to respect constraints relative to this kind of code. In order to ensure that the transformation is correct, i.e. preserves the semantics, we also aim at specifying and proving this transformation using the Pvs proof assistant
Formalization of Real Analysis: A Survey of Proof Assistants and Libraries
International audienceIn the recent years, numerous proof systems have improved enough to be used for formally verifying non-trivial mathematical results. They, however, have different purposes and it is not always easy to choose which one is adapted to undertake a formalization effort. In this survey, we focus on properties related to real analysis: real numbers, arithmetic operators, limits, differentiability, integrability, and so on. We have chosen to look into the formalizations provided in standard by the following systems: Coq, HOL4, HOL Light, Isabelle/HOL, Mizar, ProofPower-HOL, and PVS. We have also accounted for large developments that play a similar role or extend standard libraries: ACL2(r) for ACL2, C-CoRN/MathClasses for Coq, and the NASA PVS library. This survey presents how real numbers have been defined in these various provers and how the notions of real analysis described above have been formalized. We also look at the methods of automation these systems provide for real analysis