List.sc_drop_take: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/proofs/lib/list.bend as List Lines 368-380 of bend-collections-laws-crypto@1.0.0.0/proofs/lib/list.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/lib/list.bend&start_line=368&end_line=380 import Base import bend-collections-laws-crypto@1.0.0.0/spec/lib/common.bend as SC # drop l (take n xs) == take (n - l) (drop l xs) def sc_drop_take(-A: Data, +xs: List<&2, A>, +n: Nat, +l: Nat) -> {SC.drop(A, SC.take(A, xs, n), l) == SC.take(A, SC.drop(A, xs, l), Nat.sub(n, l)) : List<&2, A>}: match xs n l: case Nil{} _ _: {==} case Con{a, t} 0n 0n: {==} case Con{a, t} 0n 1n+k: Equal.sym(List<&2, A>, SC.take(A, SC.drop(A, t, k), 0n), Nil{}, sc_take_zero(A, SC.drop(A, t, k))) case Con{a, t} 1n+m 0n: {==} case Con{a, t} 1n+m 1n+k: sc_drop_take(A, t, m, k) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/lib/list.bend&name=sc_take_zero https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/lib/common.bend&name=drop https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/lib/common.bend&name=take