{- | computes the transitivity axiom of a concrete sort for
the kernel of h -}
transitivity_ax :: SORT -> CASLFORMULA
transitivity_ax s = quant
     where (free_sort, v1, v2, n1, n2, ps, fst_form) = twoFreeVars s
           v3@(Qual_var n3 _ _) = newVarIndex 3 free_sort
           snd_form = mkPredication ps [v2, v3]
           thr_form = mkPredication ps [v1, v3]
           conj = conjunct [fst_form, snd_form]
           imp = mkImpl conj thr_form
           vd = [Var_decl [n1, n2, n3] free_sort nullRange]
           quant = mkForall vd imp

-- | computes the symmetry axioms for the kernel of h
transitivity_ax :: SORT -> CASLFORMULA
transitivity_ax s = quant
     where (free_sort, v1, v2, n1, n2, ps, fst_form) = twoFreeVars s
           v3@(Qual_var n3 _ _) = newVarIndex 3 free_sort
           snd_form = mkPredication ps [v2, v3]
           thr_form = mkPredication ps [v1, v3]
           conj = conjunct [fst_form, snd_form]
           imp = mkImpl conj thr_form
           vd = [Var_decl [n1, n2, n3] free_sort nullRange]
           quant = mkForall vd imp

-- | computes the symmetry axioms for the kernel of h
transitivity_ax s = quant
     where (free_sort, v1, v2, n1, n2, ps, fst_form) = twoFreeVars s
           v3@(Qual_var n3 _ _) = newVarIndex 3 free_sort
           snd_form = mkPredication ps [v2, v3]
           thr_form = mkPredication ps [v1, v3]
           conj = conjunct [fst_form, snd_form]
           imp = mkImpl conj thr_form
           vd = [Var_decl [n1, n2, n3] free_sort nullRange]
           quant = mkForall vd imp

-- | computes the symmetry axioms for the kernel of h