Skip to main content

Intuitionistic Ancestral Logic as a Dependently Typed Abstract Programming Language

  • Conference paper
  • First Online:
Logic, Language, Information, and Computation (WoLLIC 2015)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 9160))

  • 366 Accesses

Abstract

It is well-known that concepts and methods of logic (more specifically constructive logic) occupy a central place in computer science. While it is quite common to identify ‘logic’ with ‘first-order logic’ (FOL), a careful examination of the various applications of logic in computer science reveals that FOL is insufficient for most of them, and that its most crucial shortcoming is its inability to provide inductive definitions in general, and the notion of the transitive closure in particular. The minimal logic that can serve for this goal is ancestral logic (AL).

In this paper we define a constructive version of AL, pure intuitionistic ancestral logic (iAL), extending pure intuitionistic first-order logic (iFOL). This logic is a dependently typed abstract programming language with computational functionality beyond iFOL, given by its realizer for the transitive closure operator TC, which corresponds to recursive programs. We derive this operator from the natural type theoretic definition of TC using intersection type. We show that provable formulas in iAL are uniformly realizable, thus iAL is sound with respect to constructive type theory. We further outline how iAL can serve as a natural framework for reasoning about programs.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 34.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 44.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    We use the term pure to indicate that equality, constants, and functions are not built-in primitives.

  2. 2.

    Ancestral Logic is also sometimes called Transitive Closure Logic in the literature.

  3. 3.

    As a first approximation readers can think of types as constructive sets [5]. Peter Aczel [1] shows how to interpret constructive sets as types in ITT [21]. Intuitionists might refer to species instead.

  4. 4.

    It might seem that we should introduce atomic evidence terms that might depend on parameters, say p(xy) as the atomic evidence in the atomic proposition P(xy) but this is unnecessary and uniformity would eliminate any significance to those terms. In CTT and ITT, the evidence for atomic propositions such as equality and ordering is simply an unstructured term such as \(\star \).

  5. 5.

    This function space is interpreted type theoretically and is assumed to consist of effectively computable deterministic functions.

  6. 6.

    The notation \(A\left\{ \frac{u}{x}\right\} \) denotes substituting u for x in A.

References

  1. Aczel, P.: The type theoretic interpretation of constructive set theory. In: Pacholski, L., Macintyre, A., Paris, J. (eds.) Logic Colloquium 1977. Studies in Logic and the Foundations of Mathematics, vol. 46, pp. 55–66. Elsevier, Amsterdam (1978)

    Google Scholar 

  2. Aczel, P.: The type theoretic interpretation of constructive set theory: inductive definition. Logic Methodol. Philos. Sci. VII 114, 17–49 (1986)

    MathSciNet  Google Scholar 

  3. Allen, S.F., Bickford, M., Constable, R.L., Richard, E., Christoph, K., Lorigo, L., Moran, E.: Innovations in computational type theory using nuprl. J. Appl. Logic 4(4), 428–469 (2006)

    Article  MATH  Google Scholar 

  4. Avron, A.: Transitive closure and the mechanization of mathematics. In: Kamareddine, F.D. (ed.) Thirty Five Years of Automating Mathematics, pp. 149–171. Springer, Netherlands (2003)

    Chapter  Google Scholar 

  5. Barras, B.: Sets in coq, coq in sets. J. Fromalized Reason. 3(1), 29–48 (2010)

    MathSciNet  MATH  Google Scholar 

  6. Bates, J.L., Constable, R.L.: Proofs as programs. ACM Transact. Program. Lang. Syst. 7(1), 113–136 (1985)

    Article  MATH  Google Scholar 

  7. Bertot, Y., Castéran, P.: Interactive Theorem Proving and Program Development: Coq’art: The Calculus of Inductive Constructions. Springer, Berlin (2004)

    Book  Google Scholar 

  8. Bove, A., Dybjer, P., Norell, U.: A brief overview of agda – a functional language with dependent types. In: Berghofer, S., Nipkow, T., Urban, C., Wenzel, M. (eds.) TPHOLs 2009. LNCS, vol. 5674, pp. 73–78. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  9. Cohen, L., Avron, A.: Ancestral logic: a proof theoretical study. In: Kohlenbach, U., Barceló, P., de Queiroz, R. (eds.) WoLLIC. LNCS, vol. 8652, pp. 137–151. Springer, Heidelberg (2014)

    Google Scholar 

  10. Constable, R., Bickford, M.: Intuitionistic completeness of first-order logic. Annals Pure Appl. Logic 165(1), 164–198 (2014)

    Article  MathSciNet  MATH  Google Scholar 

  11. Constable, R.L., Allen, S.F., Bickford, M., Eaton, R., Kreitz, C., Lori, L., Moran, E.: Innovations in computational type theory using nuprl. J. Appl. Logic 4(4), 428–469 (2006)

    Article  MATH  Google Scholar 

  12. Constable, R.L., Allen, S.F., Mark, B., Cleaveland, R., Cremer, J.F., Harper, R.W., Douglas, J.H., Todd, B.K., Mendler, N.P., Panangaden, P., Sasaki, J.T., Smith, S.F.: Implementing Mathematics With The Nuprl Proof Development System. Prentice Hall, New York (1986)

    Google Scholar 

  13. Friedman, H.: The consistency of classical set theory relative to a set theory with intuitionistic logic. J. Symbol. Logic 38(2), 315–319 (1973)

    Article  MATH  Google Scholar 

  14. Gordon, M., Milner, R., Wadsworth, C.: Edinburgh Lcf: A Mechanized Logic Of Computation, vol. 78. Springer, New York (1979)

    MATH  Google Scholar 

  15. Halpern, J.Y., Harper, R.W., Immerman, N., Kolaitis, P.G., Vardi, M.Y., Vianu, V.: On the unusual effectiveness of logic in computer science. Bull. Symb. Logic 7(02), 213–236 (2001)

    Article  MathSciNet  MATH  Google Scholar 

  16. Harper, R.W., Honsell, F., Plotkin, G.: A framework for defining logics. J. ACM (JACM) 40(1), 143–184 (1993)

    Article  MathSciNet  MATH  Google Scholar 

  17. Lev-Ami, T., Immerman, N., Reps, T., Sagiv, M., Srivastava, S., Yorsh, G.: Simulating reachability using first-order logic with applications to verification of linked data structures. In: Nieuwenhuis, R. (ed.) CADE 2005. LNCS (LNAI), vol. 3632, pp. 99–115. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  18. Manna, Z.: Mathematical Theory of Computation. McGraw-Hill Inc, New York (1974)

    MATH  Google Scholar 

  19. Manna, Z., Waldinger, R.: The Logical Basis for Computer Programming, vol. 1. Addison-Wesley, Reading (1985)

    MATH  Google Scholar 

  20. Martin-Löf, P., Sambin, G.: Intuitionistic Type Theory. Studies in proof theory. Bibliopolis, Berkeley (1984)

    MATH  Google Scholar 

  21. Martin-Löf, P.: Constructive Mathematics and Computer Programming. Studies in Logic and Foundations of Mathematics. Elseiver, Amsterdam (1982)

    Google Scholar 

  22. Monk, J.D.: Mathematical Logic. Graduate Texts in Mathematics, vol. 1, p. 243. Springer, New York (1976)

    Book  MATH  Google Scholar 

  23. Nordström, B., Petersson, K., Smith, J.M.: Programming In Martin-löf’s Type Theory: An Introduction. International Series of Monographs on Computer Science. Clarendon Press, Oxford (1990)

    MATH  Google Scholar 

  24. Sørensen, M.H., Urzyczyn, P.: Lectures on the Curry-howard Isomoprhism. Elsevier, Amsterdam (2006)

    Google Scholar 

  25. Troelstra, A.S., Dalen, D.: Constructivism in Mathematics: An Introduction. North-Holland, Amsterdam (1988)

    Google Scholar 

Download references

Acknowledgment

This research was partially supported by the Ministry of Science, Technology and Space, Israel, and the Cornell University PRL Group.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Liron Cohen .

Editor information

Editors and Affiliations

Appendix

Appendix

In this appendix we provide full proofs of some of the results above.

1.1 Proof of Proposition 2:

The result immediately follows from TC Ind by taking \(A\left( u,v\right) \) to be the formula \(G\left( u\right) \Rightarrow G\left( v\right) \). \(\square \)

Lemma 1

The following are provable in iAL:

$$\begin{aligned} A\left( x,z\right) ,A^{+}\left( z,y\right)&\vdash A^{+}\left( x,y\right) \end{aligned}$$
(5)
$$\begin{aligned} A^{+}\left( x,z\right) ,A\left( z,y\right)&\vdash A^{+}\left( x,y\right) \end{aligned}$$
(6)

1.2 Proof of Lemma 1:

Both sequents are derivable by one application of TC Base followed by an application of TC Trans. \(\square \)

1.3 Proof of Proposition 3:

Denote by \(\varphi \left( x,y\right) \) the formula \(\exists z\left( A\left( x,z\right) \wedge A^{+}\left( z,y\right) \right) \). For (1) apply TC Ind on the following two subgoals:

  1. 1.

    \(A\left( u,v\right) \vdash A\left( u,v\right) \vee \varphi \left( u,v\right) \)

  2. 2.

    \(A\left( u,v\right) \vee \varphi \left( u,v\right) ,A\left( v,w\right) \vee \varphi \left( v,w\right) \vdash A\left( u,w\right) \vee \varphi \left( u,w\right) \)

(1) is clearly provable in iFOL. For (2) it suffices to prove the following four subgoals, from which (2) is derivable using Or Decomposition and Or Composition:

  1. 1.

    \(A\left( u,v\right) ,A\left( v,w\right) \vdash \varphi \left( u,w\right) \)

  2. 2.

    \(A\left( u,v\right) ,\varphi \left( v,w\right) \vdash \varphi \left( u,w\right) \)

  3. 3.

    \(\varphi \left( u,v\right) ,A\left( v,w\right) \vdash \varphi \left( u,w\right) \)

  4. 4.

    \(\varphi \left( u,v\right) ,\varphi \left( v,w\right) \vdash \varphi \left( u,w\right) \)

We prove \(\varphi \left( u,v\right) ,\varphi \left( v,w\right) \vdash \varphi \left( u,w\right) \), the other proofs are similar. It is easy to prove (using Lemma 1) that \(\exists z\left( A\left( v,z\right) \wedge A^{+}\left( z,w\right) \right) \vdash A^{+}\left( v,w\right) \). By TC Trans we can deduce \(d:D,A\left( u,d\right) ,A^{+}\left( d,v\right) ,A^{+}\left( v,w\right) \vdash A^{+}\left( d,w\right) \), from which \(\exists z\left( A\left( u,z\right) \wedge A^{+}\left( z,w\right) \right) \) is easily derivable.

The proof of (2) is similar. \(\square \)

1.4 Proof of Proposition 4:

(3) is derivable applying TC Ind on the following two subgoals:

  1. 1.

    \(A\left( x,y\right) \vdash \exists zA\left( x,z\right) \), which is easily provable in iFOL.

  2. 2.

    \(\exists zA\left( u,z\right) ,\exists zA\left( v,z\right) \vdash \exists zA\left( u,z\right) \), which is valid due to Hypothesis.

The proof of (4) is symmetric. \(\square \)

1.5 Proof of Proposition 5:

Denote by \(\varphi \left( u,v\right) \) the formula \(A\left( u,\overrightarrow{y}\right) \vee A\left( v,\overrightarrow{y}\right) \). The right-to-left implication follows from Proposition 4 since \(\exists z\left( A\left( u,\overrightarrow{y}\right) \vee A\left( z,\overrightarrow{y}\right) \right) \vdash \exists xA\left( x,\overrightarrow{y}\right) \) can be easily proven in iFOL, and Proposition 4 entails that \(\varphi ^{+}\left( u,v\right) \vdash \exists z\varphi \left( u,z\right) \). For the left-to-right implication it suffices to prove \(d:D,A\left( d,\overrightarrow{y}\right) \vdash \varphi ^{+}\left( u,v\right) \). Clearly, in iFOL, \(d:D,A\left( d,\overrightarrow{y}\right) \vdash \varphi \left( d,v\right) \) is provable, from which we can deduce by TC Base \(d:D,A\left( d,\overrightarrow{y}\right) \vdash \varphi ^{+}\left( d,v\right) \). Since we also have \(d:D,A\left( d,\overrightarrow{y}\right) \vdash \varphi \left( u,d\right) \), by Lemma 1 we obtain \(d:D,A\left( d,\overrightarrow{y}\right) \vdash \varphi ^{+}\left( u,v\right) \). \(\square \)

Proposition 6

The following is provable in iAL:

$$\begin{aligned} \left( A^{+}\right) ^{+}\left( x,y\right) \vdash A^{+}\left( x,y\right) \end{aligned}$$

1.6 Proof of Proposition 6:

Applying TC Ind on \(A^{+}\left( u,v\right) ,A^{+}\left( v,w\right) \vdash A^{+}\left( u,w\right) \) (which is derivable using TC Trans) and \(A^{+}\left( x,y\right) \vdash A^{+}\left( x,y\right) \) (which is clearly provable) results in the desired proof. \(\square \)

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Cohen, L., Constable, R.L. (2015). Intuitionistic Ancestral Logic as a Dependently Typed Abstract Programming Language. In: de Paiva, V., de Queiroz, R., Moss, L., Leivant, D., de Oliveira, A. (eds) Logic, Language, Information, and Computation. WoLLIC 2015. Lecture Notes in Computer Science(), vol 9160. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-47709-0_2

Download citation

  • DOI: https://doi.org/10.1007/978-3-662-47709-0_2

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-662-47708-3

  • Online ISBN: 978-3-662-47709-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics