List.internal_all_map: def of bend-mathlib@0.8.1.0 Import: import bend-mathlib@0.8.1.0/list.bend as List Lines 1493-1500 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=1493&end_line=1500 import Base # Unfolds List.all directly, so its proof depends on Base's definition (PLAN F39). def internal_all_map(~A: Type, ~B: Type, ~f: A -> B, ~p: B -> Bool, xs: List) -> {List.all(~&1, ~B, ~p, List.map(~A, ~B, ~f, xs)) == List.all(~&1, ~A, ~(x => p(f(x))), xs) : Bool}: match xs: case Nil{}: {==} case h <> t: %internal_all_map(~A, ~B, ~f, ~p, t) : {List.all.if(u => List.all(~&1, ~B, ~p, List.map(~A, ~B, ~f, t)), p(f(h))) == List.all.if(u => _, p(f(h))) : Bool} {==} Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.all https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.all.if https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.map