extractRel :: Id -> TERM f -> [Baserel]
extractRel cup (Application (Qual_op_name cup' _ _) [arg1,arg2] _) =
  if cup==cup'
    then extractRel cup arg1 ++ extractRel cup arg2
    else []
extractRel :: Id -> TERM f -> [Baserel]
extractRel cup (Application (Qual_op_name cup' _ _) [arg1,arg2] _) =
  if cup==cup'
    then extractRel cup arg1 ++ extractRel cup arg2
    else []
extractRel cup (Application (Qual_op_name cup' _ _) [arg1,arg2] _) =
  if cup==cup'
    then extractRel cup arg1 ++ extractRel cup arg2
    else []