def take_drop
import bend-collections-laws-math@1.0.0.0/proofs/lib/two_list.bend as TwoListimport Base
import bend-collections-laws-math@1.0.0.0/proofs/lib/list.bend as LL
import bend-collections-laws-math@1.0.0.0/spec/lib/common.bend as SC
17def take_drop(-T: Data, +xs: List<&2, T>, +k: Nat) -> {SC.append(T, SC.take(T, xs, k), SC.drop(T, xs, k)) == xs : List<&2, T>}:
18 match xs k:
19 case Nil{} _:
20 {==}
21 case Con{h, t} 0n:
22 {==}
23 case Con{h, t} 1n+p:
24 LL.cons_cong(T, h, SC.append(T, SC.take(T, t, p), SC.drop(T, t, p)), t, take_drop(T, t, p))
Uses (6)
Used by (0)
No other definition uses this definition.