Nothing Special   »   [go: up one dir, main page]

Skip to main content
Log in

On specifications, subset types and interpretation of proposition in type theory

  • Programming Logic
  • Published:
BIT Numerical Mathematics Aims and scope Submit manuscript

Abstract

In this paper we discuss some practical aspects of using type theory as a programming and specification language, where the viewpoint is to use it not only as a basis for program synthesis but also as a programming language with a programming logic allowing us to do ordinary verification.

The subset type has been added to type theory in order to avoid irrelevant information in programs. We give an example of a proof which illustrates the problems that may occur if the subset type is used in specifications when we have the standard interpretation of propositions as types. Harrop-formulas and Squash are then discussed as solutions to these problems. It is argued that they are not acceptable from a practical point of view.

An extension of the theory to include the two new judgment forms:A is a proposition, andA is true, is then given and explained in terms of the old theory. The logical constants are no longer identified with the corresponding type theoretical constants, but propositions are interpreted as Gödel formulas, which allow us to introduce and justify logical rules similar to rules for classical logic. The interpretation is extended to include predicates defined by using reflections of the ordinary definition of Gödel formulas in a “type of small propositions”.

The programming example is then revisited and stronger elimination rules are discussed.

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

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. R. Backhouse,Overcoming the mismatch between programs and proofs. Proceedings of the Workshop on Programming Logic, Marstrand, Sweden, 1987.

  2. M. J. Beeson,Foundation of Constructive Mathematics, Springer-Verlag Berlin-Heidelberg 1985.

    Google Scholar 

  3. R. Dykhof,Strong elimination rules in type theory. Proceedings of the Workshop on Programming Logic, Marstrand, Sweden, 1987.

  4. S. Hayashi and H. Nakano,PX: A computational Logic, Foundation of Computing Series, MIT Press 1989.

  5. R. Harrop,Concerning formulas of the types A → B ∨ C, A → (Ex)B(x) in intuitionistic formal series. Journal of Symbolic Logic Vol. 25, No. 1, March 1960, pp. 27–32.

    Google Scholar 

  6. G. Malcolm and P. Chisholm,Polymorphism and Information Loss in Martin-Löf's Type Theory. Computing Science Notes, University of Groningen, The Netherlands.

  7. P. Martin-Löf,Intuitionistic Type Theory. Studies in Proof Theory, Lecture Notes, Bibliopolis, Napoli, 1984.

    Google Scholar 

  8. C. Mohring,Extracting F w 's programs from proofs in the calculus of constructions, ACM 1989.

  9. B. Nordström and K. Petersson,Types and specifications. In Proceedings IFIP'83, Paris, pp. 915–920. Elsevier, Amsterdam 1983.

    Google Scholar 

  10. B. Nordström, K. Petersson and J. M. Smith,Programming in Martin-Löf's Type Theory. An Introduction. Monograph. In preparation. To be published by Oxford University Press.

  11. The Prl Staff (R. Constable et al.),Implementing Mathematics with The Nuprl Proof Development System. Prentice-Hall, 1986.

  12. A. Salvesen,Stable propositions in Martin-Löf's extensional type theory. In Ph.D. Thesis, University of Oslo, Norway 1989.

    Google Scholar 

  13. A. Salvesen and J. M. Smith,The Strength of the Subset Type in Martin-Löf's Type Theory. Proceedings of the Third Annual Symposium on Logic in Computer Science, Edinburgh, Scotland, 1988, (IEEE).

  14. J. M. Smith,On a Nonconstructive Type Theory and Program Derivation. To appear in the proceedings of Conference on Logic and its Applications, Bulgaria 1986 (Plenum Press).

  15. A. S. Troelstra,Notions of Realizability. In Proceedings of the Second Scandinavian Logic Symposium, pp. 369–405. North-Holland, Amsterdam, 1971.

    Google Scholar 

  16. A. S. Troelstra,Metamathematical Investigation of Intuitionistic Arithmetic and Analysis. Lecture Notes in Mathematics, No. 344, Springer-Verlag, 1973.

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Salvesen, A. On specifications, subset types and interpretation of proposition in type theory. BIT 32, 84–101 (1992). https://doi.org/10.1007/BF01995110

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF01995110

CR Categories

Navigation