twoFreeVars :: SORT -> (SORT, TERM (), TERM (), VAR, VAR, PRED_SYMB, FORMULA ())
twoFreeVars s = let
   free_sort = mkFreeName s
   v1@(Qual_var n1 _ _) = newVarIndex 1 free_sort
   v2@(Qual_var n2 _ _) = newVarIndex 2 free_sort
   ps = freePredSymb s
   fst_form = mkPredication ps [v1, v2]
   in (free_sort, v1, v2, n1, n2, ps, fst_form)
twoFreeVars :: SORT -> (SORT, TERM (), TERM (), VAR, VAR, PRED_SYMB, FORMULA ())
twoFreeVars s = let
   free_sort = mkFreeName s
   v1@(Qual_var n1 _ _) = newVarIndex 1 free_sort
   v2@(Qual_var n2 _ _) = newVarIndex 2 free_sort
   ps = freePredSymb s
   fst_form = mkPredication ps [v1, v2]
   in (free_sort, v1, v2, n1, n2, ps, fst_form)
twoFreeVars s = let
   free_sort = mkFreeName s
   v1@(Qual_var n1 _ _) = newVarIndex 1 free_sort
   v2@(Qual_var n2 _ _) = newVarIndex 2 free_sort
   ps = freePredSymb s
   fst_form = mkPredication ps [v1, v2]
   in (free_sort, v1, v2, n1, n2, ps, fst_form)