Abstract
Proving a theorem in intuitionistic propositional logic, with implication as its single connective, is known as one of the simplest to state PSPACE-complete problem. At the same time, via the Curry-Howard isomorphism, it is instrumental to find lambda terms that may inhabit a given type.
However, as hundreds of papers witness it, all starting with Gentzen’s LJ calculus, conceptual simplicity has not come in this case with comparable computational counterparts. Implementing such theorem provers faces challenges related not only to soundness and completeness but also too termination and scalability problems.
In search for an efficient but minimalist theorem prover, on the two sides of the Curry-Howard isomorphism, we design a combinatorial testing framework using types inferred for lambda terms as well as all-term and random term generators.
We choose Prolog as our meta-language. Being derived from essentially the same formalisms as those we are covering, it reduces the semantic gap and results in surprisingly concise and efficient declarative implementations. Our implementation is available at: https://github.com/ptarau/TypesAndProofs.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Howard, W.: The formulae-as-types notion of construction. In: Seldin, J., Hindley, J. (eds.) To H.B. Curry: Essays on Combinatory Logic, Lambda Calculus and Formalism, pp. 479–490. Academic Press, London (1980)
Wadler, P.: Propositions as types. Commun. ACM 58, 75–84 (2015)
Statman, R.: Intuitionistic propositional logic is polynomial-space complete. Theor. Comput. Sci. 9, 67–72 (1979)
The Coq development team: The Coq proof assistant reference manual (2018) Version 8.8.0
Kostrzycka, Z., Zaionc, M.: Asymptotic densities in logic and type theory. Studia Logica 88(3), 385–403 (2008)
Bendkowski, M., Grygiel, K., Tarau, P.: Random generation of closed simply typed \(\lambda \)-terms: a synergy between logic programming and Boltzmann samplers. TPLP 18(1), 97–119 (2018)
Claessen, K., Hughes, J.: QuickCheck: a lightweight tool for random testing of haskell programs. SIGPLAN Not. 46(4), 53–64 (2011)
Palka, M.H., Claessen, K., Russo, A., Hughes, J.: Testing an optimising compiler by generating random lambda terms. In: Proceedings of the 6th International Workshop on Automation of Software Test, AST 2011, pp. 91–97. ACM, New York (2011)
Szabo, M.E.: The collected papers of Gerhard Gentzen. Philos. Sci. 39(1), 91 (1972)
Dyckhoff, R.: Contraction-free sequent calculi for intuitionistic logic. J. Symbolic Logic 57(3), 795–807 (1992)
Dyckhoff, R.: Intuitionistic decision procedures since Gentzen. In: Kahle, R., Strahm, T., Studer, T. (eds.) Advances in Proof Theory. PCSAL, vol. 28, pp. 245–267. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-29198-7_6
Hudelmaier, J.: A PROLOG Program for Intuitionistic Logic. SNS-Bericht-. Universität Tübingen (1988)
Hudelmaier, J.: An O(n log n)-space decision procedure for intuitionistic propositional logic. J. Logic Comput. 3(1), 63–75 (1993)
Tarau, P.: A hiking trip through the orders of magnitude: deriving efficient generators for closed simply-typed lambda terms and normal forms. In: Hermenegildo, M.V., Lopez-Garcia, P. (eds.) LOPSTR 2016. LNCS, vol. 10184, pp. 240–255. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-63139-4_14
Genitrini, A., Kozik, J., Zaionc, M.: Intuitionistic vs. classical tautologies, quantitative comparison. In: Miculan, M., Scagnetto, I., Honsell, F. (eds.) TYPES 2007. LNCS, vol. 4941, pp. 100–109. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-68103-8_7
Rémy, J.L.: Un procédé itératif de dénombrement d’arbres binaires et son application à leur génération aléatoire. RAIRO - Theoretical Informatics and Applications - Informatique Théorique et Applications 19(2), 179–195 (1985)
Knuth, D.E.: The Art of Computer Programming, Volume 4, Fascicle 4: Generating All Trees-History of Combinatorial Generation (Art of Computer Programming). Addison-Wesley Professional, Upper Saddle River (2006)
Tarau, P.: Declarative algorithms for generation, counting and random sampling of term algebras. In: Proceedings of SAC 2018, ACM Symposium on Applied Computing, PL track. ACM, Pau, April 2018
Stam, A.: Generation of a random partition of a finite set by an urn model. J. Comb. Theory Ser. A 35(2), 231–240 (1983)
Raths, T., Otten, J., Kreitz, C.: The ILTP problem library for intuitionistic logic: release v1.1. J. Autom. Reasoning 38, 261–271 (2007)
Herbelin, H.: A \(\lambda \)-calculus structure isomorphic to Gentzen-style sequent calculus structure. In: Pacholski, L., Tiuryn, J. (eds.) CSL 1994. LNCS, vol. 933, pp. 61–75. Springer, Heidelberg (1995). https://doi.org/10.1007/BFb0022247
Ben-Yelles, C.B.: Type assignment in the lambda-calculus: syntax and semantics. PhD thesis, University College of Swansea (1979)
Hindley, J.R.: Basic Simple Type Theory. Cambridge University Press, New York (1997)
Gabbay, D.M., Reyle, U.: N-Prolog: an extension of prolog with hypothetical implications I. J. Logic Program. 1(4), 319–355 (1984)
Gabbay, D.M.: N-Prolog: an extension of prolog with hypothetical implication II. Logical foundations, and negation as failure. J. Logic Program. 2(4), 251–283 (1985)
Miller, D., Nadathur, G.: Programming with Higher-Order Logic. Cambridge University Press, New York (2012)
Tarau, P., Dahl, V., Fall, A.: Backtrackable state with linear affine implication and assumption grammars. In: Jaffar, J., Yap, R.H.C. (eds.) ASIAN 1996. LNCS, vol. 1179, pp. 53–63. Springer, Heidelberg (1996). https://doi.org/10.1007/BFb0027779
Gabbay, D., Olivetti, N.: Goal-oriented deductions. In: Gabbay, D.M., Guenthner, F. (eds.) Handbook of Philosophical Logic. Handbook of Philosophical Logic, vol. 9, pp. 199–285. Springer, Dordrecht (2002). https://doi.org/10.1007/978-94-017-0464-9_4
Acknowledgement
This research has been supported by NSF grant 1423324. We thank the reviewers of PADL’19 for their constructive comments and suggestions for improvement.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this paper
Cite this paper
Tarau, P. (2019). A Combinatorial Testing Framework for Intuitionistic Propositional Theorem Provers. In: Alferes, J., Johansson, M. (eds) Practical Aspects of Declarative Languages. PADL 2019. Lecture Notes in Computer Science(), vol 11372. Springer, Cham. https://doi.org/10.1007/978-3-030-05998-9_8
Download citation
DOI: https://doi.org/10.1007/978-3-030-05998-9_8
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-05997-2
Online ISBN: 978-3-030-05998-9
eBook Packages: Computer ScienceComputer Science (R0)