record Index : Bits32 -> Type- Totality: total
Visibility: public export
Constructor: I : (val : Bits32) -> {auto 0 _ : val < n} -> Index n
Projections:
0 .prf : ({rec:0} : Index n) -> val {rec:0} < n .val : Index n -> Bits32
Hints:
Cast (Index n) Integer Cast (Index n) Bits32 Enum (Index n) n Eq (Index n) Finite (Index n) HDecEq (Index n) Ord (Index n) Show (Index n)
.val : Index n -> Bits32- Totality: total
Visibility: public export val : Index n -> Bits32- Totality: total
Visibility: public export 0 .prf : ({rec:0} : Index n) -> val {rec:0} < n- Totality: total
Visibility: public export 0 prf : ({rec:0} : Index n) -> val {rec:0} < n- Totality: total
Visibility: public export tryIndex : Bits32 -> Maybe (Index r)- Totality: total
Visibility: export fromInteger : (n : Integer) -> {auto 0 _ : cast n < r} -> Index r- Totality: total
Visibility: public export Zero : {auto 0 _ : 0 < n} -> Index n- Totality: total
Visibility: public export 0 ltProof : (v : Bits32) -> {auto 0 _ : v < n} -> lt (cast v) (cast n) = True- Totality: total
Visibility: export toFin : Index n -> Fin (cast n)- Totality: total
Visibility: export interface Enum : Type -> Bits32 -> Type Verified 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.
Parameters: t, n
Constraints: Finite t
Constructor: MkEnum
Methods:
toIndex : t -> Index n 0 toIndexInjective : (x : t) -> (y : t) -> toIndex x = toIndex y -> x = y 0 valuesComplete : (x : t) -> Elem x values
Implementations:
Enum Bool 2 Enum Ordering 3 Enum (Index n) n
toIndex : Enum t n => t -> Index n- Totality: total
Visibility: public export 0 toIndexInjective : {auto __con : Enum t n} -> (x : t) -> (y : t) -> toIndex x = toIndex y -> x = y- Totality: total
Visibility: public export 0 valuesComplete : {auto __con : Enum t n} -> (x : t) -> Elem x values- Totality: total
Visibility: public export enumToFin : Enum t n => t -> Fin (cast n)- Totality: total
Visibility: export enumToBits32 : Enum t n => t -> Bits32- Totality: total
Visibility: export enumToInteger : Enum t n => t -> Integer- Totality: total
Visibility: export vcomplete : (i : Index n) -> Elem i values Proof that every `Index n` is in the list of values.
Totality: total
Visibility: exportinList : HDecEq i => i -> List i -> Bool- Totality: total
Visibility: public export 0 inListImpliesElem : {auto {conArg:10132} : HDecEq i} -> (v : i) -> inList v is = True -> Elem v is- Totality: total
Visibility: export interface TEnum : (k -> Type) -> Bits32 -> Type Verified tagged enumerations.
Provides a function for converting a value of the given type to an
`Index n` of the given size plus a proof that this function is injective.
With this we can use a value of type `t a` as an index into a
dependent array.
Parameters: t, n
Constructor: MkTEnum
Methods:
toIndexT : t a -> Index n 0 toIndexInjectiveT : (x : t a) -> (y : t b) -> toIndexT x = toIndexT y -> x = y
toIndexT : TEnum t n => t a -> Index n- Totality: total
Visibility: public export 0 toIndexInjectiveT : {auto __con : TEnum t n} -> (x : t a) -> (y : t b) -> toIndexT x = toIndexT y -> x = y- Totality: total
Visibility: public export tenumToFin : TEnum t n => t a -> Fin (cast n)- Totality: total
Visibility: export tenumToBits32 : TEnum t n => t a -> Bits32- Totality: total
Visibility: export tenumToInteger : TEnum t n => t a -> Integer- Totality: total
Visibility: export