Fixing the pattern of defined sorts for the coq-semantics generation.

We now generate sorts for all explicitly defined sorts or those for which we have a mention in the file.