{- | generates the formulas relating the make function for this sort
with the homomorphism -}
make_form :: SORT -> Named CASLFORMULA
make_form s = makeNamed ("ga_hom_make_" ++ show s) q_eq
      where free_s = mkFreeName s
            v = newVar s
            ot_mk = Op_type Total [s] free_s nullRange
            os_mk = mkQualOp makeId ot_mk
            term_mk = mkAppl os_mk [v]
            ot_hom = Op_type Partial [free_s] s nullRange
            os_hom = mkQualOp homId ot_hom
            term_hom = mkAppl os_hom [term_mk]
            eq = mkStEq term_hom v
            q_eq = quantifyUniversally eq

-- | computes the last part of the axioms to assert the kernel of h
make_form :: SORT -> Named CASLFORMULA
make_form s = makeNamed ("ga_hom_make_" ++ show s) q_eq
      where free_s = mkFreeName s
            v = newVar s
            ot_mk = Op_type Total [s] free_s nullRange
            os_mk = mkQualOp makeId ot_mk
            term_mk = mkAppl os_mk [v]
            ot_hom = Op_type Partial [free_s] s nullRange
            os_hom = mkQualOp homId ot_hom
            term_hom = mkAppl os_hom [term_mk]
            eq = mkStEq term_hom v
            q_eq = quantifyUniversally eq

-- | computes the last part of the axioms to assert the kernel of h
make_form s = makeNamed ("ga_hom_make_" ++ show s) q_eq
      where free_s = mkFreeName s
            v = newVar s
            ot_mk = Op_type Total [s] free_s nullRange
            os_mk = mkQualOp makeId ot_mk
            term_mk = mkAppl os_mk [v]
            ot_hom = Op_type Partial [free_s] s nullRange
            os_hom = mkQualOp homId ot_hom
            term_hom = mkAppl os_hom [term_mk]
            eq = mkStEq term_hom v
            q_eq = quantifyUniversally eq

-- | computes the last part of the axioms to assert the kernel of h