List.foldr_append: law of bend-mathlib@0.8.1.0
Import: import bend-mathlib@0.8.1.0/list.bend as List
Lines 141-150 of bend-mathlib@0.8.1.0/list.bend: https://jend.leeeet.dev/read.txt?path=bend-mathlib@0.8.1.0/list.bend&start_line=141&end_line=150
import Base
# A right fold over an append folds the first part onto the fold of the second.
law foldr_append:
for ~a: Quant
for ~A: Kind(a)
for ~B: Type
for ~f: A -> B -> B
for xs: List
for -ys: List
for -z: B
{List.foldr(~a, ~A, ~B, ~f, List.append(a, A, xs, ys), z) == List.foldr(~a, ~A, ~B, ~f, xs, List.foldr(~a, ~A, ~B, ~f, ys, z)) : B}
Uses (3):
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.append
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.foldr