Generate legal names for infix op lemmas

Fixes #1337
Merge pull request #1383 from david-christiansen/issue/1337

Generate legal names for infix op lemmas