law foldr_append_sym

bend-mathlib@0.8.1.0 · list.bend:2213

import bend-mathlib@0.8.1.0/list.bend as List
import Base

2213# A right fold over an append folds the first part onto the fold of the second, reversed to rewrite toward the simple side.
2214law foldr_append_sym:
2215  for ~a: Quant
2216  for ~A: Kind(a)
2217  for ~B: Type
2218  for ~f: A -> B -> B
2219  for xs: List<a, A>
2220  for -ys: List<a, A>
2221  for -z: B
2222  {List.foldr(~a, ~A, ~B, ~f, xs, List.foldr(~a, ~A, ~B, ~f, ys, z)) == List.foldr(~a, ~A, ~B, ~f, List.append(a, A, xs, ys), z) : B}

Uses (5)

Used by (0)

No other definition uses this definition.