Idris2Doc : Data.Prim.Bits8

Data.Prim.Bits8

(source)

Reexports

import public Control.WellFounded
import public Data.DPair
import public Data.Prim.Ord
import public Algebra.Solver.Ring

Definitions

data (<) : Bits8 -> Bits8 -> Type
  Witness that `m < n === True`.

Totality: total
Visibility: export
Constructor: 
LT : (0 _ : m < n = True) -> m < n

Hints:
(0 _ : m < n = True) -> m < n
Total Bits8 (<)
WellFounded Bits8 (<)

Fixity Declaration: infix operator, level 6
0 mkLT : (0 _ : m < n = True) -> m < n
  Contructor for `(<)`.

This can only be used in an erased context.

Totality: total
Visibility: export
0 runLT : m < n -> m < n = True
  Extractor for `(<)`.

This can only be used in an erased context.

Totality: total
Visibility: export
strictLT : (0 _ : m < n) -> Lazy c -> c
  We don't trust values of type `(<)` too much,
so we use this when creating magical results.

Totality: total
Visibility: export
0 (>) : Bits8 -> Bits8 -> Type
  Flipped version of `(<)`.

Totality: total
Visibility: public export
Fixity Declaration: infix operator, level 6
0 (<=) : Bits8 -> Bits8 -> Type
  `m <= n` mean that either `m < n` or `m === n` holds.

Totality: total
Visibility: public export
Fixity Declaration: infix operator, level 6
0 (>=) : Bits8 -> Bits8 -> Type
  Flipped version of `(<=)`.

Totality: total
Visibility: public export
Fixity Declaration: infix operator, level 6
0 (/=) : Bits8 -> Bits8 -> Type
  `m /= n` mean that either `m < n` or `m > n` holds.

Totality: total
Visibility: public export
Fixity Declaration: infix operator, level 6
comp : (m : Bits8) -> (n : Bits8) -> Trichotomy (<) m n
Totality: total
Visibility: export
MinBits8 : Bits8
  Lower bound of `Bits8`

Totality: total
Visibility: public export
MaxBits8 : Bits8
  Upper bound of `Bits8`

Totality: total
Visibility: public export
0 GTE_MinBits8 : (m : Bits8) -> m >= MinBits8
  `m >= 0` for all `m` of type `Bits8`.

Totality: total
Visibility: export
0 Not_LT_MinBits8 : m < 0 -> Void
  Not value of type `Bits8` is less than zero.

Totality: total
Visibility: export
0 LTE_MaxBits8 : (m : Bits8) -> m <= MaxBits8
  `m <= MaxBits8` for all `m` of type `Bits8`.

Totality: total
Visibility: export
0 Not_GT_MaxBits8 : m > MaxBits8 -> Void
  Not value of type `Bits8` is greater than `MaxBits8`.

Totality: total
Visibility: export
accessLT : (m : Bits8) -> Accessible (<) m
  Every value of type `Bits8` is accessible with relation
to `(<)`.

Totality: total
Visibility: export
accessGT : (m : Bits8) -> Accessible (>) m
  Every value of type `Bits8` is accessible with relation
to `(>)`.

Totality: total
Visibility: export
sdiv : Bits8 -> (d : Bits8) -> {auto 0 _ : 0 < d} -> Bits8
  Safe division.

This uses `0 < d` as a constraint instead
of `0 /= d`, because in my experience, the former
is much more useful.

Totality: total
Visibility: export
rdiv : (n : Bits8) -> (d : Bits8) -> {auto 0 _ : 1 < d} -> {auto 0 _ : 0 < n} -> Subset Bits8 (\{arg:0} => {arg:0} < n)
  Refined division.

This comes with a proof that the result is
strictly smaller than `n`.

This uses `0 < n` as a constraint instead
of `0 /= n`, because in my experience, the former
is much more useful.

Totality: total
Visibility: export
smod : Bits8 -> (d : Bits8) -> {auto 0 _ : 0 < d} -> Bits8
  Safe modulo.

This uses `0 < d` as a constraint instead
of `0 /= d`, because in my experience, the former
is much more useful.

If you need the postcondition that the result is strictly
smaller than `d`, use `rmod` instead.

Totality: total
Visibility: export
rmod : Bits8 -> (d : Bits8) -> {auto 0 _ : 0 < d} -> Subset Bits8 (\{arg:0} => {arg:0} < d)
  Refined modulo.

This comes with a proof that the result is strictly smaller
than `d`.

It uses `0 < d` as a constraint instead
of `0 /= d`, because in my experience, the former
is much more useful.

Totality: total
Visibility: export