def rev_go_twice

bend-collections-laws-math@1.0.0.0 · proofs/lib/list.bend:151

import bend-collections-laws-math@1.0.0.0/proofs/lib/list.bend as List
import Base
import bend-collections-laws-math@1.0.0.0/spec/lib/common.bend as SC

151# reverse.go(reverse.go(xs, a), b) == reverse.go(a, xs ++ b)
152def rev_go_twice(-A: Data, +xs: List<&2, A>, +a: List<&2, A>, +b: List<&2, A>) -> {List.reverse.go(&2, A, List.reverse.go(&2, A, xs, a), b) == List.reverse.go(&2, A, a, SC.append(A, xs, b)) : List<&2, A>}:
153  match xs:
154    case Nil{}:
155      {==}
156    case Con{+h, +t}:
157      rev_go_twice(A, t, Con{h, a}, b)

Uses (3)

Used by (1)