Some Formal Results in a Theory of Molecular Rearrangements: Photoisomerism