🤖 AI Summary
This work formally verifies Scott’s Representation Theorem—stating that the untyped lambda calculus can be modeled by reflexive objects in a category—within the Univalent Foundations (UF) framework. Methodologically, we fully formalize both Scott’s original and Hyland’s alternative proof strategies in the (Rocq-)UniMath system, leveraging the UniMath library; crucially, we systematically introduce the Karoubi envelope as a central construction, analyzing its adaptability and limitations in the univalent setting. Our contributions include: (i) the first dual-path formalization of the theorem in UF; (ii) the development of automated Coq tactics supporting lambda-term reduction; and (iii) novel insights into the structural role of the Karoubi envelope in homotopical category theory, particularly its sensitivity to foundational choices. These results substantially advance the formalization capabilities of higher-categorical logic and computational semantics within type-theoretic foundations.
📝 Abstract
Lambek and Scott constructed a correspondence between simply-typed lambda calculi and Cartesian closed categories. Scott's Representation Theorem is a cousin to this result for untyped lambda calculi. It states that every untyped lambda calculus arises from a reflexive object in some category. We present a formalization of Scott's Representation Theorem in univalent foundations, in the (Rocq-)UniMath library. Specifically, we implement two proofs of that theorem, one by Scott and one by Hyland. We also explain the role of the Karoubi envelope -- a categorical construction -- in the proofs and the impact the chosen foundation has on this construction. Finally, we report on some automation we have implemented for the reduction of $λ$-terms.