Manhattan distance

Consider the following definitions:
Require Import ZArith.

Record plane : Set := point {abscissa : Z; ordinate : Z}.

Define a function that computes the ``Manhattan'' distance for points of the plane (the manhattan distance is the sum of the absolute values of differences of coordinates).

Solution

Look at this file