Formally Proving Size Optimality of Sorting Networks

Recent successes in formally verifying increasingly larger computer-generated proofs have relied extensively on (a) using oracles, to find answers for recurring subproblems efficiently, and (b) extracting formally verified checkers, to perform exhaustive case analysis in feasible time. In this work we present a formal verification of optimality of sorting networks on up to 9 inputs, making it one of the largest computer-generated proofs that has been formally verified. We show that an adequate pre-processing of the information provided by the oracle is essential for feasibility, as it improves the time required by our extracted checker by several orders of magnitude.

[1]  Russell O'Connor,et al.  Certified Exact Transcendental Real Number Computation in Coq , 2008, TPHOLs.

[2]  Moon-Jung Chung,et al.  Bounds on the size of test sets for sorting and related networks , 1990, Discret. Math..

[3]  Frédéric Blanqui,et al.  CoLoR: a Coq library on well-founded rewrite relations and its application to the automated verification of termination certificates , 2011, Mathematical Structures in Computer Science.

[4]  Pierre Letouzey Extraction in Coq: An Overview , 2008, CiE.

[5]  René Thiemann Formalizing Bounded Increase , 2013, ITP.

[6]  David Monniaux,et al.  Efficient Generation of Correctness Certificates for the Abstract Domain of Polyhedra , 2013, SAS.

[7]  Pierre Castéran,et al.  Interactive Theorem Proving and Program Development , 2004, Texts in Theoretical Computer Science An EATCS Series.

[8]  David Pichardie,et al.  Interactive Theorem Proving , 2013, Lecture Notes in Computer Science.

[9]  René Thiemann,et al.  The Certification Problem Format , 2014, UITP.

[10]  K. Appel,et al.  Every planar map is four colorable. Part II: Reducibility , 1977 .

[11]  Peter Schneider-Kamp,et al.  Formalizing Size-Optimal Sorting Networks: Extracting a Certified Proof Checker , 2015, ITP.

[12]  Georges Gonthier,et al.  Formal Proof—The Four- Color Theorem , 2008 .

[13]  K. Appel,et al.  The four color proof suffices , 1986 .

[14]  Peter Schneider-Kamp,et al.  Optimizing a Certified Proof Checker for a Large-Scale Computer-Generated Proof , 2015, CICM.

[15]  Pierre Courtieu,et al.  Automated Certified Proofs with CiME3 , 2011, RTA.

[16]  Robert W. Floyd,et al.  The Bose-Nelson Sorting Problem††The preparation of this report has been supported in part by the National Science Foundation, and in part by the Office of Naval Research. , 1970 .

[17]  John Harrison,et al.  A Skeptic's Approach to Combining HOL and Maple , 1998, Journal of Automated Reasoning.

[18]  Victor W. Marek,et al.  Solving and Verifying the Boolean Pythagorean Triples Problem via Cube-and-Conquer , 2016, SAT.

[19]  Yann Régis-Gianas,et al.  Lightweight Proof by Reflection Using a Posteriori Simulation of Effectful Computation , 2013, ITP.

[20]  Michael Frank,et al.  Sorting nine inputs requires twenty-five comparisons , 2016, J. Comput. Syst. Sci..

[21]  Freek Wiedijk,et al.  Hierarchical Reflection , 2004, TPHOLs.

[22]  Xavier Leroy,et al.  Formal verification of a realistic compiler , 2009, CACM.

[23]  Ian Parberry A computer-assisted optimal depth lower bound for nine-input sorting networks , 2005, Mathematical systems theory.

[24]  David C. van Voorhis Toward a Lower Bound for Sorting Networks , 1972, Complexity of Computer Computations.

[25]  Nicolas Oury,et al.  Observational Equivalence and Program Extraction in the Coq Proof Assistant , 2003, TLCA.

[26]  Alexei Lisitsa,et al.  A SAT Attack on the Erdős Discrepancy Conjecture , 2014, SAT.

[27]  David S. Johnson,et al.  The NP-Completeness Column: An Ongoing Guide , 1982, J. Algorithms.

[28]  Peter van Emde Boas,et al.  Preserving Order in a Forest in Less Than Logarithmic Time and Linear Space , 1977, Inf. Process. Lett..

[29]  Jakub Závodný,et al.  Optimal Sorting Networks , 2013, LATA.

[30]  K. Appel,et al.  Every planar map is four colorable. Part I: Discharging , 1977 .

[31]  Tobias Nipkow,et al.  A Proof Assistant for Higher-Order Logic , 2002 .

[32]  Donald E. Knuth,et al.  The Art of Computer Programming: Volume 3: Sorting and Searching , 1998 .

[33]  Conor McBride,et al.  Elimination with a Motive , 2000, TYPES.

[34]  Bas Spitters,et al.  Computer Certified Efficient Exact Reals in Coq , 2011, Calculemus/MKM.

[35]  John Matthews,et al.  Using Yices as an automated solver in Isabelle / HOL , 2008 .

[36]  Michael Frank,et al.  Twenty-Five Comparators Is Optimal When Sorting Nine Inputs (and Twenty-Nine for Ten) , 2014, 2014 IEEE 26th International Conference on Tools with Artificial Intelligence.

[37]  K. Appel,et al.  Every Planar Map Is Four Colorable , 2019, Mathematical Solitaires & Games.

[38]  U. Norell,et al.  Towards a practical programming language based on dependent type theory , 2007 .

[39]  John Harrison,et al.  HOL Light: A Tutorial Introduction , 1996, FMCAD.

[40]  Luís Cruz-Filipe,et al.  A Large-Scale Experiment in Executing Extracted Programs , 2006, Calculemus.

[41]  Bernd Fischer,et al.  Industrial-Strength Certified SAT Solving through Verified SAT Proof Checking , 2010, ICTAC.