Documentation

Mathlib.Logic.Encodable.Pi

Encodability of Pi types #

This file provides instances of Encodable for types of vectors and (dependent) functions:

If α is encodable, then so is Vector α n.

Equations

If α is countable, then so is Vector α n.

instance Encodable.finArrow {α : Type u_1} [Encodable α] {n : } :
Encodable (Fin nα)

If α is encodable, then so is Fin n → α.

Equations
instance Encodable.finPi (n : ) (π : Fin nType u_2) [(i : Fin n) → Encodable (π i)] :
Encodable ((i : Fin n) → π i)
Equations
def Encodable.fintypeArrow (α : Type u_2) (β : Type u_3) [DecidableEq α] [Fintype α] [Encodable β] :
Trunc (Encodable (αβ))

When α is finite and β is encodable, α → β is encodable too. Because the encoding is not unique, we wrap it in Trunc to preserve computability.

Equations
Instances For
    def Encodable.fintypePi (α : Type u_2) (π : αType u_3) [DecidableEq α] [Fintype α] [(a : α) → Encodable (π a)] :
    Trunc (Encodable ((a : α) → π a))

    When α is finite and all π a are encodable, Π a, π a is encodable too. Because the encoding is not unique, we wrap it in Trunc to preserve computability.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      instance Encodable.fintypeArrowOfEncodable {α : Type u_2} {β : Type u_3} [Encodable α] [Fintype α] [Encodable β] :
      Encodable (αβ)

      If α and β are encodable and α is a fintype, then α → β is encodable as well.

      Equations