Define the variables of your metric space. In Sympy, you have to declare symbolic variables explicitly. Example:- For cartesian space, I would define my symbols as x, y, z = symbols("x, y, z"). Note ...