[Paper Review] Computer validated proofs of a toolset for adaptable arithmetic
This paper presents a formally verified, adaptable numeric core for high-precision arithmetic using floating-point expansions and online arithmetic. The core consists of four tools, with the $Σ_3$ operator—handling key arithmetic operations—proven correct using the Coq proof assistant, enabling reliable, application-specific libraries and formal proofs grounded in validated mathematical facts.
Most existing implementations of multiple precision arithmetic demand that the user sets the precision {\em a priori}. Some libraries are said adaptable in the sense that they dynamically change the precision of each intermediate operation individually to deliver the target accuracy according to the actual inputs. We present in this text a new adaptable numeric core inspired both from floating point expansions and from on-line arithmetic. The numeric core is cut down to four tools. The tool that contains arithmetic operations is proved to be correct. The proofs have been formally checked by the Coq assistant. Developing the proofs, we have formally proved many results published in the literature and we have extended a few of them. This work may let users (i) develop application specific adaptable libraries based on the toolset and / or (ii) write new formal proofs based on the set of validated facts.
Motivation & Objective
- To design a numeric core that dynamically adjusts precision per operation to ensure final result accuracy, avoiding fixed-precision limitations.
- To formally verify arithmetic operations in the core using the Coq proof assistant, ensuring correctness and eliminating implementation errors.
- To provide a foundation for building application-specific adaptable libraries and enabling new formal proofs based on a growing set of validated mathematical facts.
- To overcome the limitations of static error analysis in multiple precision arithmetic by enabling runtime precision adaptation.
Proposed method
- The numeric core is decomposed into four tools: partial product generation (PP), priority queue (PQ), merge (MQ), and sum (Σ₃), enabling dynamic precision scaling.
- The Σ₃ operator performs arithmetic operations using floating-point expansions, combining high and low parts of products to maintain accuracy.
- The system uses a priority queue to manage partial products, ensuring outputs are sorted by magnitude using key-based comparison rather than value comparison.
- The algorithm employs non-restoring division with error bounds and loop conditions that guarantee remainder reduction and precision control.
- The proofs are conducted entirely in Coq, relying on formal bounds and theorems from earlier sections, avoiding low-level floating-point assumptions.
- The system ensures that intermediate values are only produced when sufficient inputs are available, with operations frozen and resumed as needed.
Experimental results
Research questions
- RQ1How can a numeric core be designed to adapt precision dynamically per operation while ensuring correctness?
- RQ2What formal proof techniques can be used to verify the correctness of adaptive arithmetic operations in the presence of floating-point errors?
- RQ3Can a formally verified arithmetic core serve as a reliable foundation for application-specific libraries and new formal proofs?
- RQ4How can the precision of intermediate results be managed to ensure final accuracy without overestimation?
Key findings
- The Σ₃ operator, which performs the core arithmetic operations, has been formally proven correct using the Coq proof assistant.
- The system guarantees that the remainder in division decreases almost linearly, with error bounded by 4 ulps under reasonable error bounds.
- The proof of the key theorem on Σ₃ relies only on upper and lower bounds from earlier theorems, avoiding low-level floating-point assumptions.
- The toolset enables the construction of application-specific adaptable libraries by shielding users from complex floating-point implementation details.
- The validated facts now form a reliable foundation for writing new formal proofs, reducing the need for low-level verification.
- The system ensures that partial products are generated in order of magnitude, with correct handling of waiting queues and priority-based merging.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.