Various small fixes to make pdflatex & allpdf run successfully.
I removed all compilation errors that mmt build smglom/algebra pdflatex
gives. Mostly by replacing references to undefined terms by \term{...} (which gives a warning instead of an error), sometimes by actually fixing broken code.