def off.drop_take

bend-osdev-bytes@0.1.1.0 · PROOF.bend:894

import bend-osdev-bytes@0.1.1.0/PROOF.bend as PROOF
import Base
import bend-osdev-bytes@0.1.1.0/bytes.bend as B

894def off.drop_take(+i: Nat, +j: Nat, ws: List<&2, B.OctByte>) -> {B.w8s.drop(i, B.w8s.take(j, ws)) == B.w8s.take(Nat.sub(j, i), B.w8s.drop(i, ws)) : List<&2, B.OctByte>}:
895  match i j ws:
896    case 0n 0n _:
897      {==}
898    case 0n 1n+q _:
899      {==}
900    case 1n+p 0n _:
901      {==}
902    case 1n+p 1n+q Nil{}:
903      Equal.sym(List<&2, B.OctByte>, B.w8s.take(Nat.sub(q, p), Nil{}), Nil{}, off.take_nil(Nat.sub(q, p)))
904    case 1n+p 1n+q Con{x, t}:
905      off.drop_take(p, q, t)

Uses (8)

Used by (1)