Rearrangement reactions of dimethyl 2,7-dimethyl-3H-azepine-3,6-dicarboxylate