Merge pull request #115 from Blaisorblade/topic/sort-checking2

Fix sort checking v2
Change representation for PTS instances (#100)

This enables testing for PTS containment (in next commit).

The conversion of instances was done through search-n-replace to reduce
the potential for bugs.
Add test for PTS syntactic containment (#100)

From the first version, I've incorporated various changes, to match spec
more directly and to make the code fusible (just as a style exercise,
not because performance would actually matter).