System Fi

A Higher-Order Polymorphic λ-Calculus with Erasable Term-Indices
  • Ki Yung Ahn
  • Tim Sheard
  • Marcelo Fiore
  • Andrew M. Pitts
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7941)


We introduce a foundational lambda calculus, System Fi, for studying programming languages with term-indexed datatypes – higher-kinded datatypes whose indices range over data such as natural numbers or lists. System Fi is an extension of System Fω that introduces the minimal features needed to support term-indexing. We show that System Fi provides a theory for analysing programs with term-indexed types and also argue that it constitutes a basis for the design of logically-sound light-weight dependent programming languages. We establish erasure properties of Fi-types that capture the idea that term-indices are discardable in that they are irrelevant for computation. Index erasure projects typing in System Fi to typing in System Fω. So, System Fi inherits strong normalization and logical consistency from System Fω.


term-indexed data types generalized algebraic data types higher-order polymorphism type-constructor polymorphism higher- kinded types impredicative encoding strong normalization logical consistency 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Abel, A., Matthes, R.: Fixed points of type constructors and primitive recursion. In: Marcinkowski, J., Tarlecki, A. (eds.) CSL 2004. LNCS, vol. 3210, pp. 190–204. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  2. 2.
    Abel, A., Matthes, R., Uustalu, T.: Iteration and coiteration schemes for higher-order and nested datatypes. TCS 333(1-2), 3–66 (2005)MathSciNetMATHCrossRefGoogle Scholar
  3. 3.
    Ahn, K.Y., Sheard, T.: A hierarchy of Mendler-style recursion combinators: Taming inductive datatypes with negative occurrences. In: ICFP 2011, pp. 234–246. ACM (2011)Google Scholar
  4. 4.
    Barras, B., Bernardo, B.: The implicit calculus of constructions as a programming language with dependent types. In: Amadio, R.M. (ed.) FOSSACS 2008. LNCS, vol. 4962, pp. 365–379. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  5. 5.
    Böhm, C., Berarducci, A.: Automatic synthesis of typed lambda-programs on term algebras. TCS 39, 135–154 (1985)MATHCrossRefGoogle Scholar
  6. 6.
    Brady, E., Hammond, K.: Correct-by-construction concurrency: Using dependent types to verify implementations of effectful resource usage protocols. Fundam. Inform. 102(2), 145–176 (2010)MathSciNetMATHGoogle Scholar
  7. 7.
    Coquand, T., Huet, G.: The calculus of constructions. Rapport de Recherche 530, INRIA, Rocquencourt, France (May 1986) Google Scholar
  8. 8.
    Crary, K., Weirich, S., Morrisett, G.: Intensional polymorphism in type-erasure semantics. In: ICFP 1998, pp. 301–312. ACM (1998)Google Scholar
  9. 9.
    Dagand, P.E., McBride, C.: Transporting functions across ornaments. In: ICFP 1998, ICFP 2012, pp. 103–114. ACM (2012)Google Scholar
  10. 10.
    Garrigue, J., Normand, J.L.: Adding GADTs to OCaml: the direct approach. In: ML 2011. ACM (2011)Google Scholar
  11. 11.
    Geuvers, H.: Induction is not derivable in second order dependent type theory. In: Abramsky, S. (ed.) TLCA 2001. LNCS, vol. 2044, pp. 166–181. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  12. 12.
    Giannini, P., Honsell, F., Rocca, S.R.D.: Type inference: Some results, some problems. Fundam. Inform. 19(1/2), 87–125 (1993)MATHGoogle Scholar
  13. 13.
    Girard, J.-Y.: Interprétation Fonctionnelle et Élimination des Coupures de l’Arithmétique d’Ordre Supérieur. Thèse de doctorat d’état, Université Paris VII (June 1972)Google Scholar
  14. 14.
    McBride, C.: Homepage of the Strathclyde Haskell Enhancement (SHE) (2009),
  15. 15.
    Miquel, A.: A model for impredicative type systems, universes, intersection types and subtyping. In: LICS, pp. 18–29. IEEE Computer Society (2000)Google Scholar
  16. 16.
    Miquel, A.: The implicit calculus of constructions. In: Abramsky, S. (ed.) TLCA 2001. LNCS, vol. 2044, pp. 344–359. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  17. 17.
    Mishra-Linger, N., Sheard, T.: Erasure and polymorphism in pure type systems. In: Amadio, R.M. (ed.) FOSSACS 2008. LNCS, vol. 4962, pp. 350–364. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  18. 18.
    Sheard, T., Pašalić, E.: Meta-programming with built-in type equality. In: LFM 2004, pp. 106–124 (2004)Google Scholar
  19. 19.
    Yorgey, B.A., Weirich, S., Cretin, J., Jones, S.L.P., Vytiniotis, D., Magalhães, J.P.: Giving Haskell a promotion. In: TLDI, pp. 53–66. ACM (2012)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Ki Yung Ahn
    • 1
  • Tim Sheard
    • 1
  • Marcelo Fiore
    • 2
  • Andrew M. Pitts
    • 2
  1. 1.Portland State UniversityPortlandUSA
  2. 2.University of CambridgeCambridgeUK

Personalised recommendations