distributeAndOverOr e1 e2 = distributeAndOverOr' a b
    where
        distributeAndOverOr' (And x y) e = toCNFExpression (Or (And x y) e)
        distributeAndOverOr' e (And x y) = toCNFExpression (Or e (And x y))
        distributeAndOverOr' x y = Or (toCNFExpression x) (toCNFExpression  y)
        a = toCNFExpression e1
        b = toCNFExpression e2
distributeAndOverOr e1 e2 = distributeAndOverOr' a b
    where
        distributeAndOverOr' (And x y) e = toCNFExpression (Or (And x y) e)
        distributeAndOverOr' e (And x y) = toCNFExpression (Or e (And x y))
        distributeAndOverOr' x y = Or (toCNFExpression x) (toCNFExpression  y)
        a = toCNFExpression e1
        b = toCNFExpression e2
distributeAndOverOr e1 e2 = distributeAndOverOr' a b
    where
        distributeAndOverOr' (And x y) e = toCNFExpression (Or (And x y) e)
        distributeAndOverOr' e (And x y) = toCNFExpression (Or e (And x y))
        distributeAndOverOr' x y = Or (toCNFExpression x) (toCNFExpression  y)
        a = toCNFExpression e1
        b = toCNFExpression e2