def internal_merge_pick
bend-mathlib@0.8.1.0 · perm.bend:140
import bend-mathlib@0.8.1.0/perm.bend as Perm
import Base
import bendlib-kernel-list@1.0.0.0/list.bend as K
140def internal_merge_pick(-A: Data, b: Bool, +x: A, +xt: List<&2, A>, +y: A, +yt: List<&2, A>, -m1: List<&2, A>, -m2: List<&2, A>, ih1: K.perm(A, List.append(&2, A, xt, y <> yt), m1), ih2: K.perm(A, x <> List.append(&2, A, xt, yt), m2)) -> K.perm(A, x <> List.append(&2, A, xt, y <> yt), Bool.pick(List<&2, A>, b, x <> m1, y <> m2)):
141 match b:
142 case True{}:
143 perm_cons(A, x, List.append(&2, A, xt, y <> yt), m1, ih1)
144 case False{}:
145 perm_trans(A, x <> List.append(&2, A, xt, y <> yt), y <> x <> List.append(&2, A, xt, yt), y <> m2, perm_move(A, x <> xt, y, yt), perm_cons(A, y, x <> List.append(&2, A, xt, yt), m2, ih2))