Ltac destar H w := 
  match type of H with 
    star _ ?x ?y => destruct H as [ x | w x y _H1 _H2 ];
      [ idtac | generalize (S_plus _ _H1 _H2); clear _H1 _H2; intro H ]
    | _ => fail "not a star hypothesis"
  end.

Lemma comp_assoc: forall W: Type, forall U: relation2 Z W, eeq (comp (comp R S) U) (comp R (comp S U)).