YES Problem: flatten(nil()) -> nil() flatten(unit(x)) -> flatten(x) flatten(++(x,y)) -> ++(flatten(x),flatten(y)) flatten(++(unit(x),y)) -> ++(flatten(x),flatten(y)) flatten(flatten(x)) -> flatten(x) rev(nil()) -> nil() rev(unit(x)) -> unit(x) rev(++(x,y)) -> ++(rev(y),rev(x)) rev(rev(x)) -> x ++(x,nil()) -> x ++(nil(),y) -> y ++(++(x,y),z) -> ++(x,++(y,z)) Proof: Matrix Interpretation Processor: dim=1 interpretation: [rev](x0) = 2x0, [++](x0, x1) = x0 + x1, [unit](x0) = 2x0, [flatten](x0) = 4x0, [nil] = 5 orientation: flatten(nil()) = 20 >= 5 = nil() flatten(unit(x)) = 8x >= 4x = flatten(x) flatten(++(x,y)) = 4x + 4y >= 4x + 4y = ++(flatten(x),flatten(y)) flatten(++(unit(x),y)) = 8x + 4y >= 4x + 4y = ++(flatten(x),flatten(y)) flatten(flatten(x)) = 16x >= 4x = flatten(x) rev(nil()) = 10 >= 5 = nil() rev(unit(x)) = 4x >= 2x = unit(x) rev(++(x,y)) = 2x + 2y >= 2x + 2y = ++(rev(y),rev(x)) rev(rev(x)) = 4x >= x = x ++(x,nil()) = x + 5 >= x = x ++(nil(),y) = y + 5 >= y = y ++(++(x,y),z) = x + y + z >= x + y + z = ++(x,++(y,z)) problem: flatten(unit(x)) -> flatten(x) flatten(++(x,y)) -> ++(flatten(x),flatten(y)) flatten(++(unit(x),y)) -> ++(flatten(x),flatten(y)) flatten(flatten(x)) -> flatten(x) rev(unit(x)) -> unit(x) rev(++(x,y)) -> ++(rev(y),rev(x)) rev(rev(x)) -> x ++(++(x,y),z) -> ++(x,++(y,z)) Matrix Interpretation Processor: dim=1 interpretation: [rev](x0) = 4x0, [++](x0, x1) = x0 + x1, [unit](x0) = x0 + 4, [flatten](x0) = 4x0 orientation: flatten(unit(x)) = 4x + 16 >= 4x = flatten(x) flatten(++(x,y)) = 4x + 4y >= 4x + 4y = ++(flatten(x),flatten(y)) flatten(++(unit(x),y)) = 4x + 4y + 16 >= 4x + 4y = ++(flatten(x),flatten(y)) flatten(flatten(x)) = 16x >= 4x = flatten(x) rev(unit(x)) = 4x + 16 >= x + 4 = unit(x) rev(++(x,y)) = 4x + 4y >= 4x + 4y = ++(rev(y),rev(x)) rev(rev(x)) = 16x >= x = x ++(++(x,y),z) = x + y + z >= x + y + z = ++(x,++(y,z)) problem: flatten(++(x,y)) -> ++(flatten(x),flatten(y)) flatten(flatten(x)) -> flatten(x) rev(++(x,y)) -> ++(rev(y),rev(x)) rev(rev(x)) -> x ++(++(x,y),z) -> ++(x,++(y,z)) Matrix Interpretation Processor: dim=1 interpretation: [rev](x0) = 2x0 + 2, [++](x0, x1) = x0 + x1 + 2, [flatten](x0) = 2x0 orientation: flatten(++(x,y)) = 2x + 2y + 4 >= 2x + 2y + 2 = ++(flatten(x),flatten(y)) flatten(flatten(x)) = 4x >= 2x = flatten(x) rev(++(x,y)) = 2x + 2y + 6 >= 2x + 2y + 6 = ++(rev(y),rev(x)) rev(rev(x)) = 4x + 6 >= x = x ++(++(x,y),z) = x + y + z + 4 >= x + y + z + 4 = ++(x,++(y,z)) problem: flatten(flatten(x)) -> flatten(x) rev(++(x,y)) -> ++(rev(y),rev(x)) ++(++(x,y),z) -> ++(x,++(y,z)) Matrix Interpretation Processor: dim=1 interpretation: [rev](x0) = 3x0, [++](x0, x1) = x0 + x1 + 3, [flatten](x0) = 4x0 + 1 orientation: flatten(flatten(x)) = 16x + 5 >= 4x + 1 = flatten(x) rev(++(x,y)) = 3x + 3y + 9 >= 3x + 3y + 3 = ++(rev(y),rev(x)) ++(++(x,y),z) = x + y + z + 6 >= x + y + z + 6 = ++(x,++(y,z)) problem: ++(++(x,y),z) -> ++(x,++(y,z)) Matrix Interpretation Processor: dim=1 interpretation: [++](x0, x1) = 2x0 + x1 + 1 orientation: ++(++(x,y),z) = 4x + 2y + z + 3 >= 2x + 2y + z + 2 = ++(x,++(y,z)) problem: Qed