Implement function to check for equivalence.
Now with a single passing test.