Abstract
We present a simple characterization of definable quotient types as being induced by idempotent functions, and an encoding of this in Cedille (a dependently typed programming language) in which both equational constraints and the packaging that associates these with elements of the carrier type are irrelevant, facilitating equational reasoning in proofs. We provide several concrete examples of definable quotients using this encoding and give combinators for function lifting (with one variant having zero run-time cost).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
The listing of function rem omits necessary type coercions for Cedille to ensure that the recursive call on minus n’ k’ is well-founded.
- 2.
References
Altenkirch, T., Kaposi, A.: Type theory in type theory using quotient inductive types. In: Proceedings of the 43rd Annual ACMSIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2016, vol. 51, pp. 18–29. ACM (2016)
Anand, A., Bickford, M., Constable, R.L., Rahli, V.: A type theory with partial equivalence relations as types. In: 20th International Conference on Types for Proofs and Programs (2014)
Chicli, L., Pottier, L., Simpson, C.: Mathematical quotients and quotient types in Coq. In: Geuvers, H., Wiedijk, F. (eds.) TYPES 2002. LNCS, vol. 2646, pp. 95–107. Springer, Heidelberg (2003). https://doi.org/10.1007/3-540-39185-1_6
Cohen, C.: Pragmatic quotient types in Coq. In: Blazy, S., Paulin-Mohring, C., Pichardie, D. (eds.) ITP 2013. LNCS, vol. 7998, pp. 213–228. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-39634-2_17
Coquand, T., Huet, G.: The calculus of constructions. Ph.D. thesis, INRIA (1986)
Courtieu, P.: Normalized types. In: Fribourg, L. (ed.) CSL 2001. LNCS, vol. 2142, pp. 554–569. Springer, Heidelberg (2001). https://doi.org/10.1007/3-540-44802-0_39
Firsov, D., Blair, R., Stump, A.: Efficient mendler-style lambda-encodings in cedille. In: Avigad, J., Mahboubi, A. (eds.) ITP 2018. LNCS, vol. 10895, pp. 235–252. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-94821-8_14
Frumin, D., Geuvers, H., Gondelman, L., Weide, N.V.D.: Finite sets in homotopy type theory. In: Proceedings of the 7th ACM SIGPLAN International Conference on Certified Programs and Proofs, pp. 201–214. ACM (2018)
Garillot, F., Gonthier, G., Mahboubi, A., Rideau, L.: Packaging mathematical structures. In: Berghofer, S., Nipkow, T., Urban, C., Wenzel, M. (eds.) TPHOLs 2009. LNCS, vol. 5674, pp. 327–342. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-03359-9_23
Giménez, E.: Codifying guarded definitions with recursive schemes. In: Dybjer, P., Nordström, B., Smith, J. (eds.) TYPES 1994. LNCS, vol. 996, pp. 39–59. Springer, Heidelberg (1995). https://doi.org/10.1007/3-540-60579-7_3
Hofmann, M.: A simple model for quotient types. In: Dezani-Ciancaglini, M., Plotkin, G. (eds.) TLCA 1995. LNCS, vol. 902, pp. 216–234. Springer, Heidelberg (1995). https://doi.org/10.1007/BFb0014055
Homeier, P.V.: A design structure for higher order quotients. In: Hurd, J., Melham, T. (eds.) TPHOLs 2005. LNCS, vol. 3603, pp. 130–146. Springer, Heidelberg (2005). https://doi.org/10.1007/11541868_9
Jenkins, C., McDonald, C., Stump, A.: Elaborating inductive datatypes and course-of-values pattern matching to Cedille. CoRR (2019). http://arxiv.org/abs/1903.08233
Kopylov, A.: Dependent intersection: a new way of defining records in type theory. In: Proceedings of the 18th Annual IEEE Symposium on Logic in Computer Science, LICS 2003. IEEE Computer Society, Washington, DC (2003)
Li, N.: Quotient types in type theory. Ph.D. thesis, University of Nottingham (2015)
Maietti, M.E.: About effective quotients in constructive type theory. In: Altenkirch, T., Reus, B., Naraschewski, W. (eds.) TYPES 1998. LNCS, vol. 1657, pp. 166–178. Springer, Heidelberg (1999). https://doi.org/10.1007/3-540-48167-2_12
McBride, C.: Elimination with a motive. In: Callaghan, P., Luo, Z., McKinna, J., Pollack, R., Pollack, R. (eds.) TYPES 2000. LNCS, vol. 2277, pp. 197–216. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-45842-5_13
Miquel, A.: The implicit calculus of constructions extending pure type systems with an intersection type binder and subtyping. In: Abramsky, S. (ed.) TLCA 2001. LNCS, vol. 2044, pp. 344–359. Springer, Heidelberg (2001). https://doi.org/10.1007/3-540-45413-6_27
Nogin, A.: Quotient types: a modular approach. In: Carreño, V.A., Muñoz, C.A., Tahar, S. (eds.) TPHOLs 2002. LNCS, vol. 2410, pp. 263–280. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-45685-6_18
Pinyo, G., Altenkirch, T.: Integers as a higher inductive type. In: 24th International Conference on Types for Proofs and Programs (2018)
Stump, A.: The calculus of dependent lambda eliminations. J. Funct. Program. 27, e14 (2017)
Stump, A.: Syntax and semantics of Cedille (2018). https://arxiv.org/abs/1806.04709
Veltri, N.: Two set-based implementations of quotients in type theory. In: Proceedings of the 14th Symposium on Programming Languages and Software Tools, pp. 194–205 (2015)
Vezzosi, A., Mörtberg, A., Abel, A.: Cubical agda: a dependently typed programming language with univalence and higher inductive types, vol. 3, p. 87. ACM (2019)
van der Weide, N., Geuvers, H.: The construction of set-truncated higher inductive types. In: Thirty-Fifth Conference on the Mathematical Foundations of Programming Semantics (2019)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this paper
Cite this paper
Marmaduke, A., Jenkins, C., Stump, A. (2020). Quotients by Idempotent Functions in Cedille. In: Bowman, W., Garcia, R. (eds) Trends in Functional Programming. TFP 2019. Lecture Notes in Computer Science(), vol 12053. Springer, Cham. https://doi.org/10.1007/978-3-030-47147-7_1
Download citation
DOI: https://doi.org/10.1007/978-3-030-47147-7_1
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-47146-0
Online ISBN: 978-3-030-47147-7
eBook Packages: Computer ScienceComputer Science (R0)