Interpret an array as the binary representation of a number, sending 0 to 0 and ≠ 0 to
1.
Equations
Instances For
@[reducible]
Array version of List.matchSize, which rightpads the arrays to the same length.
Equations
- a.matchSize b unit = (Array.rightpad b.size unit a, Array.rightpad a.size unit b)
Instances For
find index from the end of an array
Equations
- Array.findIdxRev? cond as = Array.findIdxRev?.find cond as ⟨as.size, ⋯⟩
Instances For
@[irreducible]
Equations
Instances For
@[irreducible]
Right-pads an array with unit elements until its length is a power of two. Returns the padded
array and the number of elements added.
Equations
- Array.rightpadPowerOfTwo unit a = Array.rightpad (2 ^ Nat.clog 2 a.size) unit a
Instances For
@[simp]