{- | creates the axiom for the kernel of h given the sorts and the predicates
in M, the premises and the conclusion -}
mkKernelAx :: Set.Set SORT -> PredMap -> CASLFORMULA
              -> CASLFORMULA -> Named CASLFORMULA
mkKernelAx ss preds prem conc = makeNamed "freeness_kernel" q2
     where imp = mkImpl prem conc
           q1 = quantifyPredsSorts ss imp
           q2 = quantifyPredsPreds preds q1

{- | applies the second order quantification to the formula for the given
set of sorts -}
mkKernelAx :: Set.Set SORT -> PredMap -> CASLFORMULA
              -> CASLFORMULA -> Named CASLFORMULA
mkKernelAx ss preds prem conc = makeNamed "freeness_kernel" q2
     where imp = mkImpl prem conc
           q1 = quantifyPredsSorts ss imp
           q2 = quantifyPredsPreds preds q1

{- | applies the second order quantification to the formula for the given
set of sorts -}
mkKernelAx ss preds prem conc = makeNamed "freeness_kernel" q2
     where imp = mkImpl prem conc
           q1 = quantifyPredsSorts ss imp
           q2 = quantifyPredsPreds preds q1

{- | applies the second order quantification to the formula for the given
set of sorts -}