Primitive recursive operations on binary finite-set codes #
Primitive recursion certificates for membership, the characteristic function, bounded filtering
and least-element search on binary finite-set codes, and for the codes of the set of entries of a
list and of Finset.range n. The code operations and their finite-set interpretations are defined
in TauCeti.Data.Nat.BitIndices, using Mathlib's Finset.equivBitIndices rather than another
encoding or a Primcodable instance for finite sets.
The certificates are uniform in their numerical inputs and, for bounded filtering, in the primitive recursive predicate, so they can be used in computable finite-stage constructions.
References #
- R. I. Soare, Recursively Enumerable Sets and Degrees, Springer, 1987, Chapter II.2.
- Mathlib's
Finset.equivBitIndicessupplies the binary finite-set equivalence.
Membership in the decoded binary finite set is primitive recursive.
The characteristic function of the decoded binary finite set is primitive recursive in the code and the argument.
Bounded filtering of binary codes is primitive recursive, uniformly in a primitive recursive predicate and the code and bound supplied by the caller.
The code of the set of entries of a list is primitive recursive.
The code 2 ^ n - 1 of Finset.range n is primitive recursive in n.
Least-element search on binary finite-set codes is primitive recursive.