package rocq-robust-geometric-predicates
Install
Dune Dependency
Authors
Maintainers
Sources
sha512=3741709f815653c4afcbe45ab9436b751916c52202b8da4e75f46d61404abfd2a520c65e9ae52412ec9a8b3216b85db8256812629dfbcd2face08811ada51c97
Description
A small, self-contained Rocq library of formally verified robust geometric predicates for binary64 (IEEE-754 double) coordinates, extracted from the NetTopologySuite.Proofs corpus.
It provides, with Qed-closed soundness proofs against exact arithmetic:
- exact sign of the 2D orientation determinant (orient2d) via an
error-free expansion (TwoSum / Dekker / fast-expansion-sum), proven to
match the sign of the real determinant
cross_R_BP; - a Stage-D adaptive decoder (fast floating-point filter with an exact expansion fallback) and its soundness theorem;
- robust segment-intersection predicates;
- integer-coordinate determinant overflow bounds (0 axioms) for the int-safe regime.
The library sits on top of Flocq (the IEEE-754 substrate) and complements, rather than competes with, the geometry libraries in the ecosystem: GeoCoq is synthetic/axiomatic (no coordinates or floats), while this package is the analytic + floating-point-robustness layer. It also ships machine-checked counterexamples showing where the textbook strong-nonoverlap postcondition of Shewchuk's Theorem 13 is FALSE as stated under a half-ulp predicate, so the top-level orientation soundness is stated honestly (the strong-nonoverlap headline appears as an explicit, type-visible hypothesis where it is needed).
Provenance: github.com/grootstebozewolf/NetTopologySuite.Proofs (assembled via
the package MANIFEST). Every theorem ends in Qed; the only axioms are the
standard classical-reals + functional-extensionality used throughout the
corpus (see make's Print Assumptions output).
Tags
category:Computer Science/Data Types and Data Structures category:Mathematics/Real Calculus and Topology keyword:robust predicates keyword:geometric keyword:geometric predicates keyword:computational geometry keyword:orientation keyword:floating point keyword:Flocq logpath:NTS.Proofs date:2026-08-24Published: 27 Aug 2026
Dependencies (3)
-
coq-flocq
>= "4.2.2" & < "4.3~" - rocq-stdlib
-
rocq-core
>= "9.2" & < "9.3~"
Dev Dependencies
None
Used by
None
Conflicts
None