EditDistance arithmetic