Add checks for triviality and simplicity to semisimple. Also add a canonical form that flattens out the products and takes care of the exceptional isomorphisms.