Structures · Logic and sets
Primcodable
A Primcodable type is, essentially, an Encodable type for which
the encode/decode functions are primitive recursive.
However, such a definition is circular.
Instead, we ask that the composition of decode : ℕ → Option α with
encode : Option α → ℕ is primitive recursive. Said composition is
the identity function, restricted to the image of encode.
Thus, in a way, the added requirement ensures that no predicates
can be smuggled in through a cunning choice of the subset of ℕ into
which the type is encoded.
- Defined in
- Mathlib.Computability.Primrec.Basic
- Shape
- One type argument · adds prim
Extends1
Extended by1
Forgetful instances
Provided automatically by
Concrete types that are instances10
- Bool
- Empty
- List.Vector
- ULower
- Prod
- Fin
- PUnit
- Sum
- List
- Option
How is a type an instance?
Loading the hierarchy index…
Assumed by356
- Primrec
- Primrec₂
- Primrec.comp
- Computable
- Primrec.snd
- Primrec.fst
- Primrec.const
- Primrec₂.comp
- Primrec.of_eq
- Partrec
- Primrec.to_comp
- Primrec.id
- Primrec.to₂
- Computable₂
- Computable.comp
- PrimrecPred
- PrimrecRel
- Computable.snd
- Partrec₂
- Partrec.of_eq
- Primrec.encode_iff
- Primcodable.prim
- PrimrecRel.comp
- ComputablePred
- Computable.to₂
- ManyOneReducible
- Computable.const
- ManyOneEquiv
- OneOneReducible
- RecursiveIn
- Computable.fst
- Primrec₂.right
- Primrec.comp₂
- Primrec.eq
- Partrec.comp
- ComputableIn
- Primrec.option_some_iff
- Primrec.encode
- Primrec₂.to_comp
- OneOneEquiv
- Partrec.bind
- Computable.of_eq
- Primrec.list_cons
- Partrec.to₂
- Primrec.pair
- Primrec₂.of_eq
- Primrec₂.comp₂
- Primrec.computableIn
- Primrec.ite
- Computable₂.comp