import public Data.Finite
import public Data.List.Elem
import public Data.Prim.Bits32
import public Decidable.HDecEqrecord Index : Bits32 -> Type.val : Index n -> Bits32val : Index n -> Bits320 .prf : ({rec:0} : Index n) -> val {rec:0} < n0 prf : ({rec:0} : Index n) -> val {rec:0} < ntryIndex : Bits32 -> Maybe (Index r)fromInteger : (n : Integer) -> {auto 0 _ : cast n < r} -> Index rZero : {auto 0 _ : 0 < n} -> Index n0 ltProof : (v : Bits32) -> {auto 0 _ : v < n} -> lt (cast v) (cast n) = TruetoFin : Index n -> Fin (cast n)interface Enum : Type -> Bits32 -> TypeVerified enumerations.
Provides a function for converting a value of the given type to an
`Index n` of the given size.
In addition, proves that `Finite.value` holds every value there is and
that `toIndex` is injective.
With these proofs we can use a value of type `t` as an index into a
(potentially dependent) array.
toIndex : t -> Index n0 toIndexInjective : (x : t) -> (y : t) -> toIndex x = toIndex y -> x = y0 valuesComplete : (x : t) -> Elem x valuestoIndex : Enum t n => t -> Index n0 toIndexInjective : {auto __con : Enum t n} -> (x : t) -> (y : t) -> toIndex x = toIndex y -> x = y0 valuesComplete : {auto __con : Enum t n} -> (x : t) -> Elem x valuesenumToFin : Enum t n => t -> Fin (cast n)enumToBits32 : Enum t n => t -> Bits32enumToInteger : Enum t n => t -> IntegerinList : HDecEq i => i -> List i -> Bool0 inListImpliesElem : {auto {conArg:9856} : HDecEq i} -> (v : i) -> inList v is = True -> Elem v is