Skip to main content
QUICK REVIEW

[Paper Review] Computing with Classical Real Numbers

Cezary Kaliszyk, Russell O’Connor|arXiv (Cornell University)|Sep 9, 2008
Logic, programming, and type systemsComputer Science10 references9 citations
TL;DR

This paper establishes an isomorphism between Coq's classical real numbers (from the standard library) and the constructive reals in CoRN by proving that the classical axioms imply the decidability of Π¹₀ sentences. This allows interoperability: Coq's standard library tactics (e.g., fourier) can be used to prove inequalities over CoRN's constructive reals, and CoRN's decision procedures can verify classical inequalities, enabling automated reasoning across both formalizations.

ABSTRACT

There are two incompatible Coq libraries that have a theory of the real numbers; the Coq standard library gives an axiomatic treatment of classical real numbers, while the CoRN library from Nijmegen defines constructively valid real numbers. Unfortunately, this means results about one structure cannot easily be used in the other structure. We present a way interfacing these two libraries by showing that their real number structures are isomorphic assuming the classical axioms already present in the standard library reals. This allows us to use O'Connor's decision procedure for solving ground inequalities present in CoRN to solve inequalities about the reals from the Coq standard library, and it allows theorems from the Coq standard library to apply to problem about the CoRN reals.

Motivation & Objective

  • To resolve the incompatibility between Coq’s classical real numbers (standard library) and constructive reals (CoRN) by establishing a formal isomorphism.
  • To demonstrate that the classical axioms of Coq’s reals imply the decidability of Π¹₀ sentences, a key logical consequence enabling constructive interpretation.
  • To enable cross-library reasoning by allowing Coq’s standard library tactics (e.g., fourier) to be applied to CoRN’s constructive reals via the isomorphism.
  • To extend CoRN’s decision procedures to verify classical inequalities, enhancing automated reasoning in constructive settings.

Proposed method

  • Derive logical consequences from Coq’s classical real number axioms, particularly proving that Π¹₀ sentences are decidable under these axioms.
  • Constructively transform classical existential proofs (in Prop) into constructive existentials (in Set) using the decidability of Π¹₀ sentences.
  • Define a bijective isomorphism between Coq’s classical reals and CoRN’s constructive real number structures, preserving arithmetic and order operations.
  • Use the isomorphism to translate inequalities and assumptions between the two formalisms, enabling tactic reuse.
  • Implement a translation mechanism using Coq’s type system and setoid rewriting to map terms and goals across the isomorphism.
  • Leverage Coq 8.2’s setoid rewriting to optimize and automate the translation process for performance.

Experimental results

Research questions

  • RQ1Can Coq’s classical real number axioms be shown to imply the decidability of Π¹₀ sentences, enabling constructive interpretation?
  • RQ2Is it possible to constructively realize classical existential proofs about real numbers using only classical axioms and logical consequences?
  • RQ3How can the isomorphism between classical and constructive real number structures be formally established and used to enable cross-library reasoning?
  • RQ4Can Coq’s standard library tactics (e.g., fourier) be effectively applied to problems in CoRN’s constructive real number formalization?
  • RQ5Can CoRN’s decision procedures be used to automatically verify inequalities in the classical real number framework?

Key findings

  • The classical axioms of Coq’s standard library imply the decidability of Π¹₀ sentences, a non-trivial result with broad implications for constructive realizability.
  • The classical real numbers satisfy all axioms of a constructive real number structure, enabling the construction of a formal isomorphism with CoRN’s reals.
  • The isomorphism allows the use of Coq’s fourier tactic to automatically prove inequalities over CoRN’s constructive reals by translating the problem into the classical framework.
  • The translation mechanism enables automated proof of a class of strict inequalities involving real number expressions using CoRN’s decision procedures.
  • The lemmas on Π¹₀ decidability have been integrated into Coq’s standard library for release 8.2, and the isomorphism and translation tactics are available in CoRN’s next release.
  • The approach enables bidirectional reasoning: classical theorems apply to CoRN reals, and CoRN’s constructive decision procedures can verify classical inequalities.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.