Programming up to Congruence

Vilhelm Sjöberg, Stephanie Weirich
2015 SIGPLAN notices  
This paper presents a dependently-typed programming language that uses an adaptation of a congruence closure algorithm for proof and type inference. While most dependently-typed languages automatically use equalities that follow from β-reductions but do not automatically use known assumptions from the context, our language does the opposite. It uses assumptions but does not automatically reduce expressions. Our work includes the specification of the language via a bidirectional type system,
more » ... h works "up-to-congruence," and an algorithm for elaborating expressions in this language to an explicitly typed core language. We prove that our elaboration algorithm is complete with respect to the source type system, and always produces well typed terms in the core language. This algorithm has been implemented in the ZOMBIE language, which includes general recursion, irrelevant arguments, heterogeneous equality and datatypes.
doi:10.1145/2775051.2676974 fatcat:sffkvxua7zezxn7yegrijtyz6u