simplifyAnd :: FeatureExpression -> FeatureExpression -> FeatureExpression
simplifyAnd e1 e2
    | (e1 == expFalse) || (e2 == expFalse) = expFalse
    | e1 == expTrue = simplifyExpression e2
    | e2 == expTrue = simplifyExpression e1
    | otherwise = And (simplifyExpression e1) (simplifyExpression e2)
simplifyAnd :: FeatureExpression -> FeatureExpression -> FeatureExpression
simplifyAnd e1 e2
    | (e1 == expFalse) || (e2 == expFalse) = expFalse
    | e1 == expTrue = simplifyExpression e2
    | e2 == expTrue = simplifyExpression e1
    | otherwise = And (simplifyExpression e1) (simplifyExpression e2)
simplifyAnd e1 e2
    | (e1 == expFalse) || (e2 == expFalse) = expFalse
    | e1 == expTrue = simplifyExpression e2
    | e2 == expTrue = simplifyExpression e1
    | otherwise = And (simplifyExpression e1) (simplifyExpression e2)