Abstract

The functorial structure of type constructors is the foundation for many definition and proof principles in higher-order logic (HOL). For example, inductive and coinductive datatypes can be built modularly from bounded natural functors (BNFs), a class of well-behaved type constructors. Composition, fixpoints, and, under certain conditions, subtypes are known to preserve the BNF structure. In this article, we tackle the preservation question for quotients, the last important principle for introducing new types in HOL. We identify sufficient conditions under which a quotient inherits the BNF structure from its underlying type. Surprisingly, lifting the structure in the obvious manner fails for some quotients, a problem that also affects the quotients of polynomial functors used in the Lean proof assistant. We provide a strictly more general lifting scheme that supports such problematic quotients. We extend the Isabelle/HOL proof assistant with a command that automates the registration of a quotient type as a BNF, reducing the proof burden on the user from the full set of BNF axioms to our inheritance conditions. We demonstrate the command's usefulness through several case studies.

Highlights

  • The functorial structure of type constructors forms the basis for many definition and proof principles in proof assistants

  • Lifting the structure in the obvious manner fails for some quotients, a problem that affects the quotients of polynomial functors used in the Lean proof assistant

  • We extend the Isabelle/higher-order logic (HOL) proof assistant with a command that automates the registration of a quotient type as a bounded natural functors (BNFs), reducing the proof burden on the user from the full set of BNF axioms to our inheritance conditions

Read more

Summary

Introduction

The functorial structure of type constructors forms the basis for many definition and proof principles in proof assistants. The command generates proof rules for transferring theorems about the BNF operations from the underlying type to the quotient (Section 4.2). Others formally prove the BNF properties for the first time, e.g., cyclic lists, the free idempotent monoid, and regular expressions modulo ACI These examples become part of the collection of formalized BNFs and can be used in datatype definitions and other BNF applications. We define the quotient type of regular expressions modulo ACI α reaci and the datatype of LDL formulas ldl, which uses nested recursion through α reaci. The article newly describes the interaction of quotients and non-emptiness witnesses [BPT15], an additional piece of information tracked as part of the BNF structure and used to prove non-emptiness of inductive datatypes, which is a requirement for introducing new types in HOL (Section 3.5). The new Example 3.26 uses the new Lemma 3.11 and the updated Theorem 3.21, which generalizes the corresponding Theorem 4 from the conference paper

Background
Quotients of Bounded Natural Functors
Implementation
Related work
Conclusion
Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.