A Formalization of Opaque Definitions for a Dependent Type Theory
Paper in proceeding, 2025

Definitions allow for reuse of code. Typical type-checkers for dependently typed programming languages automatically unfold definitions, but excessive unfolding can lead to types that are hard to read, or performance issues. Such problems can be mitigated through the use of opaque definitions, which give the programmer control over when unfolding is allowed. However, subject reduction fails to hold for certain designs. We study the metatheory of a type theory with opaque definitions, inspired by Agda. We give typing and reduction rules and show that the type theory enjoys properties like subject reduction, normalization, consistency, and decidability of conversion. The development is fully mechanized in Agda.

Agda

dependent types

formalization

opaque definitions

Author

Nils Anders Danielsson

University of Gothenburg

Chalmers, Computer Science and Engineering (Chalmers), Computing Science

Eve Geng

Tyde 2025 Proceedings of the 10th ACM SIGPLAN International Workshop on Type Driven Development Co Located with ICFP Splash 2025

39-51
9798400721632 (ISBN)

10th ACM SIGPLAN International Workshop on Type-Driven Development, TyDe 2025, co-located with ICFP/SPLASH 2025
Singapore, Singapore,

Subject Categories (SSIF 2025)

Computer Sciences

DOI

10.1145/3759538.3759653

More information

Latest update

11/19/2025