-- 2xy + xy  ==> 3xy
mergeP (P ((I i):is)) (P js)
  | is == js = Left . P $ (I (i + 1)) : is
mergeP (P ((I i):is)) (P js)
  | is == js = Left . P $ (I (i + 1)) : is
mergeP (P ((I i):is)) (P js)
  | is == js = Left . P $ (I (i + 1)) : is