{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,11,27]],"date-time":"2026-11-27T01:18:24Z","timestamp":1795742304143,"version":"4.11.3"},"reference-count":54,"publisher":"Cambridge University Press (CUP)","license":[{"start":{"date-parts":[[2018,5,10]],"date-time":"2018-05-10T00:00:00Z","timestamp":1525910400000},"content-version":"unspecified","delay-in-days":129,"URL":"https:\/\/www.cambridge.org\/core\/terms"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["J. Funct. Prog."],"published-print":{"date-parts":[[2018]]},"abstract":"<jats:title>Abstract<\/jats:title>\n                  <jats:p>\n                    Dependently typed languages such as Agda, Coq, and Idris use a syntactic first-order unification algorithm to check definitions by dependent pattern matching. However, standard unification algorithms implicitly rely on principles such as\n                    <jats:italic>uniqueness of identity proofs<\/jats:italic>\n                    and\n                    <jats:italic>injectivity of type constructors<\/jats:italic>\n                    . These principles are inadmissible in many type theories, particularly in the new and promising branch known as homotopy type theory. As a result, programs and proofs in these new theories cannot make use of dependent pattern matching or other techniques relying on unification, and are as a result much harder to write, modify, and understand. This paper proposes a proof-relevant framework for reasoning formally about unification in a dependently typed setting. In this framework, unification rules compute not just a unifier but also a corresponding soundness proof in the form of an\n                    <jats:italic>equivalence<\/jats:italic>\n                    between two sets of equations. By rephrasing the standard unification rules in a proof-relevant manner, they are guaranteed to preserve soundness of the theory. In addition, it enables us to safely add new rules that can exploit the dependencies between the types of equations, such as rules for eta-equality of record types and higher dimensional unification rules for solving equations between equality proofs. Using our framework, we implemented a complete overhaul of the unification algorithm used by Agda. As a result, we were able to replace previous\n                    <jats:italic>ad-hoc<\/jats:italic>\n                    restrictions with formally verified unification rules, fixing a substantial number of bugs in the process. In the future, we may also want to integrate new principles with pattern matching, for example, the higher inductive types introduced by homotopy type theory. Our framework also provides a solid basis for such extensions to be built on.\n                  <\/jats:p>","DOI":"10.1017\/s095679681800014x","type":"journal-article","created":{"date-parts":[[2018,5,10]],"date-time":"2018-05-10T01:14:02Z","timestamp":1525914842000},"source":"Crossref","is-referenced-by-count":11,"title":["Proof-relevant unification: Dependent pattern matching with only the axioms of your type theory"],"prefix":"10.1017","volume":"28","author":[{"given":"JESPER","family":"COCKX","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"DOMINIQUE","family":"DEVRIESE","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"56","published-online":{"date-parts":[[2018,5,10]]},"reference":[{"key":"S095679681800014X_ref53","unstructured":"Vezzosi A. (2015) Heterogeneous equality incompatible with univalence even \u2013without-k. Accessed April 17, 2017. Available at: https:\/\/github.com\/agda\/agda\/issues\/1408 (on the Agda bug tracker)."},{"key":"S095679681800014X_ref51","unstructured":"Streicher T. (1993) Investigations into intensional type theory. Habilitation thesis, Ludwig Maximilian University of Munich."},{"key":"S095679681800014X_ref50","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-14052-5_29"},{"key":"S095679681800014X_ref49","unstructured":"Sicard-Ram\u00edrez A. (2016) The \u2013without-K option generates unsolved metas. Accessed April 17, 2017. Available at: https:\/\/github.com\/agda\/agda\/issues\/1775 (on the Agda bug tracker)."},{"key":"S095679681800014X_ref48","doi-asserted-by":"crossref","unstructured":"Reed J. (2009) Higher-order constraint simplification in dependent type theory. In Proceedings of the 4th International Workshop on Logical Frameworks and Meta-Languages: Theory and Practice. ACM, pp. 49\u201356.","DOI":"10.1145\/1577824.1577832"},{"key":"S095679681800014X_ref9","doi-asserted-by":"publisher","DOI":"10.1016\/B978-044450813-3\/50010-2"},{"key":"S095679681800014X_ref47","unstructured":"Peebles D. (2012) Case splitting emits hidden record patterns that should remain implicit. Accessed April 17, 2017. Available at: https:\/\/github.com\/agda\/agda\/issues\/635 (on the Agda bug tracker)."},{"key":"S095679681800014X_ref54","doi-asserted-by":"crossref","unstructured":"Ziliani B. & Sozeau M. (2015) A unification algorithm for Coq featuring universe polymorphism and overloading. In International Conference on Functional Programming, ICFP.","DOI":"10.1145\/2784731.2784751"},{"key":"S095679681800014X_ref7","doi-asserted-by":"crossref","unstructured":"Abel A. & Pientka B. (2011) Higher-order dynamic pattern unification for dependent types and records. In International Conference on Typed Lambda Calculi and Applications, TLCA. Springer, pp. 10\u201326.","DOI":"10.1007\/978-3-642-21691-6_5"},{"key":"S095679681800014X_ref15","doi-asserted-by":"crossref","unstructured":"Cockx J. & Devriese D. (2017) Lifting proof-relevant unification to higher dimensions. In Proceedings of the 6th Conference on Certified Programs and Proofs, CPP. ACM.","DOI":"10.1145\/3018610.3018612"},{"key":"S095679681800014X_ref28","unstructured":"Dijkstra G. (2015) Disunifying non-fully applied constructors is inconsistent with function extensionality. Accessed April 17, 2017. Available at: https:\/\/github.com\/agda\/agda\/issues\/1497 (on the Agda bug tracker)."},{"key":"S095679681800014X_ref20","unstructured":"Coquand T. (1992) Pattern matching with dependent types. In Proceedings of the 1992 Workshop on Types for Proofs and Programs, TYPES, Nordstrom B. , Petersson K. , & Plotkin G. (eds). Chalmers University of Technology, pp. 66\u201379."},{"key":"S095679681800014X_ref42","doi-asserted-by":"publisher","DOI":"10.1007\/11617990_12"},{"key":"S095679681800014X_ref31","doi-asserted-by":"crossref","first-page":"217","DOI":"10.1016\/B978-0-12-046370-1.50012-7","volume-title":"Algebraic Techniques","author":"Goguen","year":"1989"},{"key":"S095679681800014X_ref12","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-24849-1_8"},{"key":"S095679681800014X_ref21","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-61780-9_64"},{"key":"S095679681800014X_ref22","unstructured":"Danielsson N. A. (2010) Heterogenous equality is crippled by the Bool \/= Fin 2 fix. Accessed April 17, 2017. Available at: https:\/\/github.com\/agda\/agda\/issues\/292 (on the Agda bug tracker)."},{"key":"S095679681800014X_ref2","first-page":"18","volume-title":"PAR-10. Partiality and Recursion in Interactive Theorem Provers","author":"Abel","year":"2012"},{"key":"S095679681800014X_ref18","doi-asserted-by":"crossref","first-page":"e16","DOI":"10.1017\/S0956796816000174","article-title":"Eliminating dependent pattern matching without K","volume":"26","author":"Cockx","year":"2016","journal-title":"J. Funct. Program."},{"key":"S095679681800014X_ref46","unstructured":"Norell U. (2007) Towards a Practical Programming Language Based on Dependent Type Theory. PhD Thesis, Chalmers University of Technology."},{"key":"S095679681800014X_ref6","unstructured":"Abel A. (2015d) Eta-expanded implicit patterns are not used for instance search. Accessed April 17, 2017. Available at: https:\/\/github.com\/agda\/agda\/issues\/1613 (on the Agda bug tracker)."},{"key":"S095679681800014X_ref24","unstructured":"Danielsson N. A. (2014) Regression in unifier, possibly related to modules and\/or heterogeneous constraints. Accessed April 17, 2017. Available at: https:\/\/github.com\/agda\/agda\/issues\/1071 (on the Agda bug tracker)."},{"key":"S095679681800014X_ref13","unstructured":"Braibant T. (2013) A new Coq tactic for inversion. Accessed April 17, 2017. Available at: http:\/\/gallium.inria.fr\/blog\/a-new-Coq-tactic-for-inversion"},{"key":"S095679681800014X_ref33","first-page":"257","volume-title":"Computational Logic - Essays in Honor of Alan Robinson","author":"Jouannaud","year":"1991"},{"key":"S095679681800014X_ref19","unstructured":"Cohen C. , Coquand T. , Huber S. & M\u00f6rtberg A. (2016) Cubical type theory: A constructive interpretation of the univalence axiom. In CoRR. Accessed April 17, 2017. Available at: http:\/\/arxiv.org\/abs\/1611.02108"},{"key":"S095679681800014X_ref11","doi-asserted-by":"publisher","DOI":"10.1017\/S095679681300018X"},{"key":"S095679681800014X_ref45","volume-title":"Second Coq Workshop","author":"Monin","year":"2010"},{"key":"S095679681800014X_ref26","doi-asserted-by":"publisher","DOI":"10.1016\/0890-5401(91)90066-B"},{"key":"S095679681800014X_ref14","unstructured":"Cockx J. (2017) Dependent Pattern Matching and Proof-Relevant Unification. PhD Thesis, KU Leuven."},{"key":"S095679681800014X_ref30","doi-asserted-by":"publisher","DOI":"10.1007\/11780274_27"},{"key":"S095679681800014X_ref41","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-45842-5_13"},{"key":"S095679681800014X_ref34","doi-asserted-by":"crossref","unstructured":"Licata D. R. & Shulman M. (2013) Calculating the fundamental group of the circle in homotopy type theory. In 28th Symposium on Logic in Computer Science, LICS.","DOI":"10.1109\/LICS.2013.28"},{"key":"S095679681800014X_ref39","doi-asserted-by":"publisher","DOI":"10.1007\/BFb0097795"},{"key":"S095679681800014X_ref10","unstructured":"Bezem M. , Coquand T. , & Huber S. (2014) A Model of Type Theory in Cubical Sets. In 19th International Conference on Types for Proofs and Programs (TYPES 2013), volume 26 of Leibniz International Proceedings in Informatics (LIPIcs), Matthes R. & Schubert A. (eds). Dagstuhl, Germany: Schloss Dagstuhl\u2013Leibniz-Zentrum fuer Informatik, pp. 107\u2013128. ISBN 978-3-939897-72-9. Accessed April 17, 2017. Available at: http:\/\/drops.dagstuhl.de\/opus\/volltexte\/2014\/4628."},{"key":"S095679681800014X_ref29","doi-asserted-by":"crossref","unstructured":"Dybjer P. (1991) Inductive sets and families in Martin-L\u00f6f's type theory and their set-theoretic semantics. In Proceedings of the 1st Workshop on Logical Frameworks.","DOI":"10.1017\/CBO9780511569807.012"},{"key":"S095679681800014X_ref1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-19805-2_5"},{"key":"S095679681800014X_ref52","unstructured":"The Univalent Foundations Program. (2013) Homotopy Type Theory: Univalent Foundations of Mathematics. Accessed April 17, 2017. Available at: http:\/\/homotopytypetheory.org\/book, Institute for Advanced Study."},{"key":"S095679681800014X_ref3","unstructured":"Abel A. (2015a) Injectivity of type constructors is partially back. Agda refutes excluded middle. Accessed April 17, 2017. Available at: https:\/\/github.com\/agda\/agda\/issues\/1406 (on the Agda bug tracker)."},{"key":"S095679681800014X_ref4","unstructured":"Abel A. (2015b) Order of patterns matters for checking left hand sides. Accessed April 17, 2017. Available at: https:\/\/github.com\/agda\/agda\/issues\/1411 (on the Agda bug tracker)."},{"key":"S095679681800014X_ref8","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-03359-9_8"},{"key":"S095679681800014X_ref16","doi-asserted-by":"crossref","unstructured":"Cockx J. , Devriese D. & Piessens F. (2014) Pattern matching without K. In Proceedings of the 19th International Conference on Functional Programming, ICFP. ACM.","DOI":"10.1145\/2628136.2628139"},{"key":"S095679681800014X_ref17","doi-asserted-by":"crossref","unstructured":"Cockx J. , Devriese D. & Piessens F. (2016a) Unifiers as equivalences: Proof-relevant unification of dependently typed data. In Proceedings of the 21th International Conference on Functional Programming, ICFP. ACM.","DOI":"10.1145\/2951913.2951917"},{"key":"S095679681800014X_ref23","unstructured":"Danielsson N. A. (2011) The unification machinery does not respect \u03b7-equality. Accessed April 17, 2017. Available at: https:\/\/github.com\/agda\/agda\/issues\/473 (on the Agda bug tracker)."},{"key":"S095679681800014X_ref25","unstructured":"Danielsson N. A. (2015) Dependent pattern matching is broken. Accessed April 17, 2017. Available at: https:\/\/github.com\/agda\/agda\/issues\/1435 (on the Agda bug tracker)."},{"key":"S095679681800014X_ref27","doi-asserted-by":"crossref","unstructured":"de Moura L. , Kong S. , Avigad J. , van Doorn F. & von Raumer J. (2015) The Lean theorem prover (system description). In Proceedings of the 25th International Conference on Automated Deduction, CADE.","DOI":"10.1007\/978-3-319-21401-6_26"},{"key":"S095679681800014X_ref32","unstructured":"Hur C. K. (2010) Agda with the excluded middle is inconsistent?. Accessed April 17, 2017. Available at: https:\/\/lists.chalmers.se\/pipermail\/agda\/2010\/001522.html (On the Agda mailing list)."},{"key":"S095679681800014X_ref35","doi-asserted-by":"crossref","DOI":"10.1093\/oso\/9780198538356.001.0001","volume-title":"Computation and Reasoning: A Type Theory for Computer Science","author":"Luo","year":"1994"},{"key":"S095679681800014X_ref36","unstructured":"Martin-L\u00f6f P. (1972) An intuitionistic theory of types. In Proceedings of the 25th Years of Constructive Type Theory (Venice, 1995). Oxford University Press, pp. 127\u2013172."},{"key":"S095679681800014X_ref37","volume-title":"Intuitionistic Type Theory","author":"Martin-L\u00f6f","year":"1984"},{"key":"S095679681800014X_ref5","unstructured":"Abel A. (2015c) Circumvention of forcing analysis brings back easy proof of Fin injectivity. Accessed April 17, 2017. Available at: https:\/\/github.com\/agda\/agda\/issues\/1427 (on the Agda bug tracker)."},{"key":"S095679681800014X_ref38","unstructured":"McBride C. (1998a) Towards dependent pattern matching in LEGO. Unpublished."},{"key":"S095679681800014X_ref40","unstructured":"McBride C. (2000) Dependently Typed Functional Programs and their Proofs. PhD Thesis, University of Edinburgh."},{"key":"S095679681800014X_ref43","first-page":"63","volume-title":"The Encode-Decode Method, Relationally","author":"McKinna","year":"2015"},{"key":"S095679681800014X_ref44","unstructured":"Miquel A. (2010) Re: Agda with the excluded middle is inconsistent?. Accessed April 17, 2017. Available at: https:\/\/lists.chalmers.se\/pipermail\/agda\/2010\/001543.html (Proof posted by Chung-Kil Hur on the Agda mailing list)."}],"container-title":["Journal of Functional Programming"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.cambridge.org\/core\/services\/aop-cambridge-core\/content\/view\/S095679681800014X","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,5,26]],"date-time":"2026-05-26T22:36:45Z","timestamp":1779835005000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.cambridge.org\/core\/product\/identifier\/S095679681800014X\/type\/journal_article"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2018]]},"references-count":54,"alternative-id":["S095679681800014X"],"URL":"https:\/\/doi.org\/10.1017\/s095679681800014x","relation":{},"ISSN":["0956-7968","1469-7653"],"issn-type":[{"value":"0956-7968","type":"print"},{"value":"1469-7653","type":"electronic"}],"subject":[],"published":{"date-parts":[[2018]]},"article-number":"e12"}}