Bounded natural functors (BNFs) provide a modular framework for the construction of (co)datatypes in higher-order logic. Their functorial operations, the mapper and relator, are restricted to a subset of the parameters, namely those where recursion can take place. For certain applications, such as free theorems, data refinement, quotients, and generalised rewriting, it is desirable that these operations do not ignore the other parameters. In this article, we formalise the generalisation BNFCC that extends the mapper and relator to covariant and contravariant parameters. We show thatBSD License
- BNFCCs are closed under functor composition and least and greatest fixpoints,
- subtypes inherit the BNFCC structure under conditions that generalise those for the BNF case, and
- BNFCCs preserve quotients under mild conditions.
Theories of BNF_CC