A well-ordered relation for "upwards" induction on the natural numbers up to some bound ub
.
Equations
- Nat.upRel ub = { rel := Nat.Up ub, wf := (_ : WellFounded (Nat.Up ub)) }
Instances For
A terminal byte slice, a suffix of a byte array.
Instances For
The number of elements in the byte slice.
Equations
- ByteSliceT.size self = ByteArray.size self.arr - self.off
Instances For
Index into a byte slice. The getOp
function allows the use of the buf[i]
notation.
Equations
- ByteSliceT.getOp self idx = ByteArray.get! self.arr (self.off + idx)
Instances For
Convert a byte array into a terminal slice.
Equations
- ByteArray.toSliceT arr = { arr := arr, off := 0 }
Instances For
Convert a byte slice into an array, by copying the data if necessary.
Equations
- ByteSlice.toArray x = match x with | { arr := arr, off := off, len := len } => ByteArray.extract arr off len
Instances For
Index into a byte slice. The getOp
function allows the use of the buf[i]
notation.
Equations
- ByteSlice.getOp self idx = ByteArray.get! self.arr (self.off + idx)
Instances For
The inner loop of the forIn
implementation for byte slices.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Convert a terminal byte slice into a regular byte slice.
Equations
- ByteSliceT.toSlice x = match x with | { arr := arr, off := off } => { arr := arr, off := off, len := ByteArray.size arr - off }
Instances For
Convert a byte array into a byte slice.
Equations
- ByteArray.toSlice arr = { arr := arr, off := 0, len := ByteArray.size arr }
Instances For
Convert a string of assumed-ASCII characters into a byte array. (If any characters are non-ASCII they will be reduced modulo 256.)
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Convert a byte slice into a string. This does not handle non-ASCII characters correctly: every byte will become a unicode character with codepoint < 256.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.