Implemented 'to be canonical' assertion

Fixes #36.