Generic Proof Tools and Finite Group Theory

This thesis presents advances in the use of Canonical Structures, a programming language construct of the Coq proof assistant equivalent to the notion of type classes. It provides a new model for developping hierarchies of mathematical structures using dependent records, and, as an illustration, reformulates the common formal proof of the correctness of the RSA cryptosystem, providing facilities for algebraic reasoning along with a formalization in type theory of the necessary mathematical notions (including cyclic groups, automorphism groups, group isomorphisms). We provide an extension of the Canonical Structure inference mechanism using phantom types, and apply it to treating the notion of partial functions. Next, we consider a generic treatment of several forms of subgroup definitions occurring in the formalization of the Feit-Thompson theorem, a large library of fomalized algebra developed in the Mathematical Components team at the MSR-INRIA joint laboratory. We show that a unified treatment of those 16 subgroups allows us to shorten menial proofs and obtain more composable definitions. We formalize a correspondence between the study of those group functorials, and some common and useful group-theoretic properties represented as the class of groups verifying them. We conclude in exploring the possibilities for analyzing the functoriality of those definitions by inspecting their type, and suggest a path towards obtaining instances of a parametricity result in Coq.

[1]  Jaakko Järvi,et al.  An extended comparative study of language support for generic programming , 2007, Journal of Functional Programming.

[2]  John D. Dixon,et al.  Problems in Group Theory , 1973 .

[3]  Gilles Barthe,et al.  Setoids in type theory , 2003, Journal of Functional Programming.

[4]  Lars Birkedal,et al.  Design patterns in separation logic , 2009, TLDI '09.

[5]  Venanzio Capretta,et al.  A polymorphic representation of induction-recursion , 2004 .

[6]  David Hemmendinger Operator overloading , 2003 .

[7]  Michael J. Vilot,et al.  Standard template library , 1996 .

[8]  Claudio Sacerdoti Coen,et al.  Working with Mathematical Structures in Type Theory , 2007, TYPES.

[9]  Christopher Strachey,et al.  Fundamental Concepts in Programming Languages , 2000, High. Order Symb. Comput..

[10]  Christine Paulin-Mohring,et al.  Inductive Definitions in the system Coq - Rules and Properties , 1993, TLCA.

[11]  R. Arthan,et al.  Some Mathematical Case Studies in ProofPower - , 2008 .

[12]  E. Gunter Doing Algebra in Simple Type Theory , 1989 .

[13]  Mark P. Jones Computing with Lattices: An Application of Type Classes , 1992, J. Funct. Program..

[14]  George W. Polites,et al.  An introduction to the theory of groups , 1968 .

[15]  M. Lyon An Interview With... , 2004, Nature Reviews Genetics.

[16]  Markus Wenzel,et al.  Constructive Type Classes in Isabelle , 2006, TYPES.

[17]  Per Martin-Löf,et al.  An intuitionistic theory of types , 1972 .

[18]  Paul Callaghan Coherence Checking of Coercions in Plastic , 2000 .

[19]  Gérard P. Huet,et al.  Higher Order Unification 30 Years Later , 2002, TPHOLs.

[20]  Yoshinori Fujisawa Euler ’ s Theorem and Small Fermat ’ s Theorem , 1998 .

[21]  Paul B. Jackson Exploring Abstract Algebra in Constructive Type Theory , 1994, CADE.

[22]  Conor McBride,et al.  Proving Properties about Lists Using Containers , 2008, FLOPS.

[23]  Arthur Charguéraud,et al.  Engineering formal metatheory , 2008, POPL '08.

[24]  Wolfram Kahl,et al.  Named Instances for Haskell Type Classes , 2001 .

[25]  Thierry Coquand,et al.  An Analysis of Girard's Paradox , 1986, LICS.

[26]  H. O. Foulkes Abstract Algebra , 1967, Nature.

[27]  Gilles Barthe,et al.  Implicit Coercions in Type Systems , 1995, TYPES.

[28]  Richard Statman,et al.  Lambda Calculus with Types , 2013, Perspectives in logic.

[29]  Matthew H. Austern Generic programming and the STL - using and extending the C++ standard template library , 1999, Addison-Wesley professional computing series.

[30]  Thorsten Altenkirch,et al.  Foundations of Software Science and Computation Structures: 6th International Conference, FOSSACS 2003 Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2003 Warsaw, Poland, April 7–11, 2003 Proceedings , 2003, Lecture Notes in Computer Science.

[31]  S Maclane,et al.  Natural Isomorphisms in Group Theory. , 1942, Proceedings of the National Academy of Sciences of the United States of America.

[32]  Derek Dreyer,et al.  How to make ad hoc proof automation less ad hoc , 2011, ICFP '11.

[33]  Sidi Ould Biha Composants mathématiques pour la théorie des groupes , 2010 .

[34]  Martín Abadi,et al.  A Logic for Parametric Polymorphism , 1993, TLCA.

[35]  Yves Bertot,et al.  Interactive Theorem Proving and Program Development: Coq'Art The Calculus of Inductive Constructions , 2010 .

[36]  Georges Gonthier Point-Free, Set-Free Concrete Linear Algebra , 2011, ITP.

[37]  Zhaohui Luo,et al.  Coercive Subtyping , 1995 .

[38]  Matthieu Sozeau A New Look at Generalized Rewriting in Type Theory , 2009, J. Formaliz. Reason..

[39]  Joseph E. Stoy Proceedings of the fourth international conference on Functional programming languages and computer architecture , 1989 .

[40]  Thomas Santen Isomorphisms - A Link Between the Shallow and the Deep , 1999, TPHOLs.

[41]  Anthony Bailey,et al.  Coercion Synthesis in Computer Implementations of Type-Theoretic Frameworks , 1996, TYPES.

[42]  S. A. Amitsur A General Theory of Radicals. I. Radicals in Complete Lattices , 1952 .

[43]  de Ng Dick Bruijn,et al.  Telescopic Mappings in Typed Lambda Calculus , 1991, Inf. Comput..

[44]  Joe B. Wells,et al.  Typability and Type Checking in System F are Equivalent and Undecidable , 1999, Ann. Pure Appl. Log..

[45]  Randy Shepherd,et al.  Object-Oriented Programming , 1994, Lecture Notes in Computer Science.

[46]  Pierre Letouzey,et al.  Programmation fonctionnelle certifiée : L'extraction de programmes dans l'assistant Coq. (Certified functional programming : Program extraction within Coq proof assistant) , 2004 .

[47]  Ralf Lämmel,et al.  JavaGI : Generalized Interfaces for Java , 2007, ECOOP.

[48]  Thierry Coquand,et al.  An Algorithm for Type-Checking Dependent Types , 1996, Sci. Comput. Program..

[49]  Gérard P. Huet,et al.  Constructive category theory , 2000, Proof, Language, and Interaction.

[50]  Enrico Tassi,et al.  A Modular Formalisation of Finite Group Theory , 2007, TPHOLs.

[51]  David Joyner,et al.  Applied Abstract Algebra , 2004 .

[52]  Martin Odersky,et al.  Type classes as objects and implicits , 2010, OOPSLA.

[53]  Zhaohui Luo,et al.  Computation and reasoning - a type theory for computer science , 1994, International series of monographs on computer science.

[54]  Simon Peyton Jones,et al.  Type classes: an exploration of the design space , 1997 .

[55]  B. Gardner KUROSH-AMITSUR RADICAL THEORY FOR GROUPS , 2010 .

[56]  Alan Bundy,et al.  Constructing Induction Rules for Deductive Synthesis Proofs , 2006, CLASE.

[57]  Andrée Bastiani,et al.  Théorie des ensembles , 1970 .

[58]  Giandomenic Sica,et al.  What is category theory , 2006 .

[59]  Frank Pfenning,et al.  Unification and anti-unification in the calculus of constructions , 1991, [1991] Proceedings Sixth Annual IEEE Symposium on Logic in Computer Science.

[60]  Alexander Katovsky,et al.  Category Theory , 2010, Arch. Formal Proofs.

[61]  John C. Mitchell,et al.  Abstract types have existential type , 1988, TOPL.

[62]  Benjamin Werner,et al.  Une Théorie des Constructions Inductives , 1994 .

[63]  S. Maclane,et al.  General theory of natural equivalences , 1945 .

[64]  Conal Elliott Extensions and applications of higher-order unification , 1990 .

[65]  Ralf Hinze,et al.  Fun with phantom types , 2003 .

[66]  Martín Abadi,et al.  Formal parametric polymorphism , 1993, POPL '93.

[67]  Philip Wadler,et al.  How to make ad-hoc polymorphism less ad hoc , 1989, POPL '89.

[68]  Herman Geuvers,et al.  A Constructive Algebraic Hierarchy in Coq , 2002, J. Symb. Comput..

[69]  T. Peterfalvi Character theory for the odd order theorem , 2000 .

[70]  Enrico Tassi,et al.  Interactive theorem provers: issues faced as a user and tackled as a developer , 2008 .

[71]  David J. Pym,et al.  Proofs, search and computation in general logic , 1990 .

[72]  James Cheney,et al.  First-Class Phantom Types , 2003 .

[73]  Ioana Pasca,et al.  Canonical Big Operators , 2008, TPHOLs.

[74]  Benjamin Werner,et al.  Simple Types in Type Theory: Deep and Shallow Encodings , 2007, TPHOLs.

[75]  R. Wiegandt,et al.  The General Theory of Radicals , 2003 .

[76]  Rasmus Ejlers Møgelberg,et al.  On the Definition of Parametricity , 2004 .

[77]  Christine Paulin-Mohring,et al.  The coq proof assistant reference manual , 2000 .

[78]  Bas Spitters,et al.  Type classes for mathematics in type theory† , 2011, Mathematical Structures in Computer Science.

[79]  Alexander A. Stepanov,et al.  C++ Standard Template Library , 2000 .

[80]  Piotr Rudnicki,et al.  Commutative Algebra in the Mizar System , 2001, J. Symb. Comput..

[81]  Edsko de Vries,et al.  Polytypic programming in COQ , 2008, WGP '08.

[82]  Gang Chen Coercive subtyping for the calculus of constructions , 2003, POPL '03.

[83]  Benjamin Grégoire,et al.  Proving Equalities in a Commutative Ring Done Right in Coq , 2005, TPHOLs.

[84]  Ralf Lämmel,et al.  Software extension and integration with type classes , 2006, GPCE '06.

[85]  Manuel M. T. Chakravarty,et al.  ML Modules and Haskell Type Classes: A Constructive Comparison , 2008, APLAS.

[86]  Amokrane Saibi Outils Génériques de Modélisation et de Démonstration pour la Formalisation des Mathématiques en Théorie des Types. Application à la Théorie des Catégories. , 1999 .

[87]  Yehoshua Bar-Hillel,et al.  Foundations of Set Theory , 2012 .

[88]  P. Dybjer Inductive sets and families in Martin-Lo¨f's type theory and their set-theoretic semantics , 1991 .

[89]  Georges Gonthier A computer-checked proof of the Four Colour Theorem , 2005 .

[90]  Andrea Asperti,et al.  Hints in Unification , 2009, TPHOLs.

[91]  Zhaohui Luo,et al.  Implementation Techniques for Inductive Types in Plastic , 1999, TYPES.

[92]  Mark P. Jones A system of constructor classes: overloading and implicit higher-order polymorphism , 1993, FPCA '93.

[93]  Dale Miller,et al.  A Logic Programming Language with Lambda-Abstraction, Function Variables, and Simple Unification , 1991, J. Log. Comput..

[94]  John Stillwell,et al.  Elements of Algebra , 1994 .

[95]  Wouter Swierstra,et al.  Data types à la carte , 2008, Journal of Functional Programming.

[96]  Robert Pollack Dependently Typed Records in Type Theory , 2002, Formal Aspects of Computing.

[97]  Alan J. Perlis,et al.  Special Feature: Epigrams on programming , 1982, SIGP.

[98]  Patrik Jansson,et al.  Parametricity and dependent types , 2010, ICFP '10.

[99]  Robert Bruce Findler,et al.  Modular object-oriented programming with units and mixins , 1998, ICFP '98.

[100]  H. Kurzweil,et al.  The theory of finite groups : an introduction , 2004 .

[101]  Federico Biancuzzi,et al.  Masterminds of Programming - Conversations with the Creators of Major Programming Languages , 2009 .

[102]  S. A. Amitsur A General Theory of Radicals. II. Radicals in Rings and Bicategories , 1954 .

[103]  C. A. R. Hoare,et al.  The emperor's old clothes , 1981, CACM.

[104]  Eduardo Giménez,et al.  Codifying Guarded Definitions with Recursive Schemes , 1994, TYPES.

[105]  Vincent Siles Investigation on the typing of equality in type systems. (Etude sur le typage de l'égalité dans les systèmes de types) , 2010 .

[106]  .. I,et al.  OPERATORS AND ALGEBRAIC STRUCTURES , 1981 .

[107]  Bjarne Stroustrup,et al.  Concepts: linguistic support for generic programming in C++ , 2006, OOPSLA '06.

[108]  S. E. Dickson A torsion theory for Abelian categories , 1966 .

[109]  Thorsten Altenkirch,et al.  Constructions, inductive types and strong normalization , 1993, CST.

[110]  Claudio Sacerdoti Coen A Semi-reflexive Tactic for (Sub-)Equational Reasoning , 2004, TYPES.

[111]  Bruno C. d. S. Oliveira,et al.  Modular Visitor Components , 2009, ECOOP.

[112]  Matthieu Sozeau,et al.  First-Class Type Classes , 2008, TPHOLs.

[113]  Elie Soubiran Développement modulaire de théories et gestion de l'espace de nom pour l'assistant de preuve Coq. (Modular development of theories and name-space management for the Coq proof assistant) , 2010 .

[114]  Benjamin Grégoire,et al.  On the Role of Type Decorations in the Calculus of Inductive Constructions , 2005, CSL.

[115]  Martin Odersky,et al.  Independently Extensible Solutions to the Expression Problem , 2004 .

[116]  Assia Mahboubi,et al.  An introduction to small scale reflection in Coq , 2010, J. Formaliz. Reason..

[117]  K. Appel,et al.  The Solution of the Four-Color-Map Problem , 1977 .

[118]  Amokrane Saïbi Typing algorithm in type theory with inheritance , 1997, POPL '97.

[119]  Erwin Schrödinger International,et al.  Supported by the Austrian Federal Ministry of Education, Science and Culture , 1689 .

[120]  Riccardo Pucella,et al.  Phantom types and subtyping , 2002, Journal of Functional Programming.

[121]  Judicaël Courant,et al.  Explicit Universes for the Calculus of Constructions , 2002, TPHOLs.

[122]  竹内 泉 The Theory of Parametricity in Lambda Cube (Towards new interaction between category theory and proof theory) , 2001 .

[123]  G. Glauberman,et al.  Local Analysis for the Odd Order Theorem: Maximal Subgroups , 1995 .

[124]  Stan Jarzabek,et al.  Proceedings of the 5th international conference on Generative programming and component engineering , 2006 .

[125]  Gérard P. Huet,et al.  The Constructive Engine , 1989, A Perspective in Theoretical Computer Science.

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

[127]  Stephanie Weirich,et al.  Under Consideration for Publication in J. Functional Programming Parametricity, Type Equality and Higher-order Polymorphism , 2022 .

[128]  Gérard P. Huet,et al.  A Unification Algorithm for Typed lambda-Calculus , 1975, Theor. Comput. Sci..

[129]  Georges Gonthier,et al.  An Ssreflect Tutorial , 2009 .

[130]  Kevin Knight,et al.  Unification: a multidisciplinary survey , 1989, CSUR.

[131]  Patricia Johann,et al.  Free theorems in the presence of seq , 2004, POPL.

[132]  Herman Geuvers,et al.  C-CoRN, the Constructive Coq Repository at Nijmegen , 2004, MKM.

[133]  Rod M. Burstall,et al.  Programming with Modules as Typed Functional Programming , 1984, FGCS.

[134]  Conor McBride Faking it: Simulating dependent types in Haskell , 2002, J. Funct. Program..

[135]  Daniel Seidel,et al.  Automatically Generating Counterexamples to Naive Free Theorems , 2010, FLOPS.

[136]  Wayne Snyder,et al.  Higher-Order Unification Revisited: Complete Sets of Transformations , 1989, J. Symb. Comput..

[137]  Saunders MacLane,et al.  Duality for groups , 1950 .

[138]  Matthieu Sozeau,et al.  Un environnement pour la programmation avec types dépendants. (An environment for programming with dependent types) , 2008 .

[139]  Konrad Slind,et al.  Treating Partiality in a Logic of Total Functions , 1997, Comput. J..

[140]  Martin Raussen,et al.  Interview with Jean-Pierre Serre , 2003 .

[141]  Gyesik Lee,et al.  Proof-irrelevant model of CC with predicative induction and judgmental equality , 2011, Log. Methods Comput. Sci..

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

[143]  Paul B. Jackson Enhancing the NUPRL Proof Development System and Applying it to Computational Abstract Algebra , 1995 .

[144]  Ralf Lämmel,et al.  Haskell's overlooked object system , 2005, ArXiv.

[145]  Gilles Dowek,et al.  A Complete Proof Synthesis Method for the Cube of Type Systems , 1993, J. Log. Comput..

[146]  William R. Cook,et al.  On understanding data abstraction, revisited , 2009, OOPSLA '09.

[147]  Riccardo Pucella,et al.  Practical Datatype Specializations with Phantom Types and Recursion Schemes , 2006, Electron. Notes Theor. Comput. Sci..

[148]  Gilles Dowek,et al.  Higher-Order Unification and Matching , 2001, Handbook of Automated Reasoning.

[149]  Douglas J. Howe,et al.  Impredicative Strong Existential Equivalent to Type:Type , 1986 .

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

[151]  Assia Mahboubi,et al.  Packaging Mathematical Structures , 2009, TPHOLs.

[152]  Daan Leijen,et al.  Domain specific embedded compilers , 1999, DSL '99.

[153]  Cristina Cornes,et al.  Conception d'un langage de haut niveau de representation de preuves : recurrence par filtrage de motifs unification en presence de types inductifs primitifs synthese de lemmes d'inversion , 1997 .

[154]  Martin Odersky,et al.  Fighting bit Rot with Types (Experience Report: Scala Collections) , 2009, FSTTCS.

[155]  Enrico Tassi,et al.  A Small Scale Reflection Extension for the Coq system , 2008 .

[156]  A. Nogin,et al.  Formalizing Abstract Algebra in Type Theory with Dependent Records , 2003 .

[157]  F. Pearl,et al.  Free Theorems Involving Type Constructor Classes , 2008 .

[158]  C. Paulin-Mohring Définitions Inductives en Théorie des Types , 1996 .

[159]  Peyton Jones,et al.  Haskell 98 language and libraries : the revised report , 2003 .

[160]  Manuel M. T. Chakravarty,et al.  Modular type classes , 2007, POPL '07.

[161]  Simon L. Peyton Jones,et al.  Associated types with class , 2005, POPL '05.

[162]  Hugo Herbelin Type inference with algebraic universes in the Calculus of Inductive Constructions , 2005 .

[163]  Conor McBride,et al.  Inductive Families Need Not Store Their Indices , 2003, TYPES.

[164]  Álvaro Tasistro,et al.  Extension of Martin-Lf's Type Theory with Record Types and Subtyping , 1998 .

[165]  Shin-Cheng Mu,et al.  Algebra of Programming Using Dependent Types , 2008, MPC.

[166]  Gift Siromoney,et al.  A Perspective in Theoretical Computer Science - Commemorative Volume for Gift Siromoney , 1989, A Perspective in Theoretical Computer Science.

[167]  Philip Wadler,et al.  Theorems for free! , 1989, FPCA.

[168]  Herman Geuvers,et al.  Induction Is Not Derivable in Second Order Dependent Type Theory , 2001, TLCA.

[169]  Zhaohui Luo,et al.  Coercive Subtyping in Type Theory , 1996, CSL.

[170]  R. Arthan Mathematical Case Studies: — Some Group Theory , 2012 .

[171]  E. Puczyłowski On general theory of radicals , 1993 .

[172]  Jeremy Yallop,et al.  Practical generic programming in OCaml , 2007, ML '07.

[173]  Francis J. Mueller Elements of Algebra , 1969 .

[174]  John C. Reynolds,et al.  Types, Abstraction and Parametric Polymorphism , 1983, IFIP Congress.

[175]  Hugo Herbelin,et al.  The Coq proof assistant : reference manual, version 6.1 , 1997 .

[176]  David B. MacQueen Modules for standard ML , 1984, LFP '84.

[177]  Mark P. Jones,et al.  Type Classes with Functional Dependencies , 2000, ESOP.

[178]  Robert Pollack,et al.  Dependently Typed Records for Representing Mathematical Structure , 2000, TPHOLs.

[179]  E. Bishop Foundations of Constructive Analysis , 2012 .

[180]  Philip Wadler,et al.  The Girard-Reynolds isomorphism (second edition) , 2007, Theor. Comput. Sci..

[181]  W. Feit,et al.  SOLVABILITY OF GROUPS OF ODD ORDER , 2012 .

[182]  Adi Shamir,et al.  A method for obtaining digital signatures and public-key cryptosystems , 1978, CACM.