13 research outputs found
Automatic and Transparent Transfer of Theorems along Isomorphisms in the Coq Proof Assistant
In mathematics, it is common practice to have several constructions for the
same objects. Mathematicians will identify them modulo isomorphism and will not
worry later on which construction they use, as theorems proved for one
construction will be valid for all.
When working with proof assistants, it is also common to see several
data-types representing the same objects. This work aims at making the use of
several isomorphic constructions as simple and as transparent as it can be done
informally in mathematics. This requires inferring automatically the missing
proof-steps.
We are designing an algorithm which finds and fills these missing proof-steps
and we are implementing it as a plugin for Coq
Foundational, compositional (co)datatypes for higher-order logic: category theory applied to theorem proving
Interactive theorem provers based on higher-order logic (HOL) traditionally follow the definitional approach, reducing high-level specifications to logical primitives. This also applies to the support for datatype definitions. However, the internal datatype construction used in HOL4, HOL Light, and Isabelle/HOL is fundamentally noncompositional, limiting its efficiency and flexibility, and it does not cater for codatatypes. We present a fully modular framework for constructing (co)datatypes in HOL, with support for mixed mutual and nested (co)recursion. Mixed (co)recursion enables type definitions involving both datatypes and codatatypes, such as the type of finitely branching trees of possibly infinite depth. Our framework draws heavily from category theory. The key notion is that of a bounded natural functor—an enriched type constructor satisfying specific properties preserved by interesting categorical operations. Our ideas are implemented as a definitional package in Isabelle, addressing a frequent request from users
Higher-Order Tarski Grothendieck as a Foundation for Formal Proof
We formally introduce a foundation for computer verified proofs based on higher-order Tarski-Grothendieck set theory. We show that this theory has a model if a 2-inaccessible cardinal exists. This assumption is the same as the one needed for a model of plain Tarski-Grothendieck set theory. The foundation allows the co-existence of proofs based on two major competing foundations for formal proofs: higher-order logic and TG set theory. We align two co-existing Isabelle libraries, Isabelle/HOL and Isabelle/Mizar, in a single foundation in the Isabelle logical framework. We do this by defining isomorphisms between the basic concepts, including integers, functions, lists, and algebraic structures that preserve the important operations. With this we can transfer theorems proved in higher-order logic to TG set theory and vice versa. We practically show this by formally transferring Lagrange\u27s four-square theorem, Fermat 3-4, and other theorems between the foundations in the Isabelle framework
Foundational, compositional (co)datatypes for higher-order logic: category theory applied to theorem proving
Interactive theorem provers based on higher-order logic (HOL) traditionally follow the definitional approach, reducing high-level specifications to logical primitives. This also applies to the support for datatype definitions. However, the internal datatype construction used in HOL4, HOL Light, and Isabelle/HOL is fundamentally noncompositional, limiting its efficiency and flexibility, and it does not cater for codatatypes. We present a fully modular framework for constructing (co)datatypes in HOL, with support for mixed mutual and nested (co)recursion. Mixed (co)recursion enables type definitions involving both datatypes and codatatypes, such as the type of finitely branching trees of possibly infinite depth. Our framework draws heavily from category theory. The key notion is that of a bounded natural functor—an enriched type constructor satisfying specific properties preserved by interesting categorical operations. Our ideas are implemented as a definitional package in Isabelle, addressing a frequent request from users
Data Types as Quotients of Polynomial Functors
A broad class of data types, including arbitrary nestings of inductive types, coinductive types, and quotients, can be represented as quotients of polynomial functors. This provides perspicuous ways of constructing them and reasoning about them in an interactive theorem prover
Witnessing (co)datatypes
Datatypes and codatatypes are useful for specifying and reasoning about (possibly infinite) computational processes. The Isabelle/HOL proof assistant has recently been extended with a definitional package that supports both. We describe a complete procedure for deriving nonemptiness witnesses in the general mutually recursive, nested case—nonemptiness being a proviso for introducing types in higher-order logic
Nonfree datatypes in Isabelle/HOL: animating a many-sorted metatheory
Datatypes freely generated by their constructors are well supported in mainstream proof assistants. Algebraic specification languages offer more expressive datatypes on axiomatic means: nonfree datatypes generated from constructors modulo equations. We have implemented an Isabelle/HOL package for nonfree datatypes, without compromising foundations. The use of the package, and its nonfree iterator in particular, is illustrated with examples: bags, polynomials and λ-terms modulo α-equivalence. The many-sorted metatheory of nonfree datatypes is formalized as an ordinary Isabelle theory and is animated by the package into user-specified instances. HOL lacks a type of types, so we employ an ad hoc construction of a universe embedding the relevant parameter types
Witnessing (co)datatypes
Datatypes and codatatypes are useful for specifying and reasoning about (possibly infinite) computational processes. The Isabelle/HOL proof assistant has recently been extended with a definitional package that supports both. We describe a complete procedure for deriving nonemptiness witnesses in the general mutually recursive, nested case—nonemptiness being a proviso for introducing types in higher-order logic
Quotients of Bounded Natural Functors
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.Comment: Extended version of homonymous IJCAR 2020 pape