monotone :: Polynomial -> YesNoMaybe
monotone p = case m of
            True -> Yes
            False -> case linear p of
                True -> No
                False -> Maybe
        where
        m = all criteria ms
        (Polynomial ms) = normalize p
        criteria (Monomial c [_]) =  minElement c >= 0 && atIndex c (0,0) >= 1 -- linear coefficient
        criteria (Monomial c _) = minElement c >= 0                           --constant or non-linear coefficient

-- | 'dimension' @p@ takes a polynomial and returns the amount of rows (dimension of square matrices) of the first monomial
-- found in the polynomial
monotone :: Polynomial -> YesNoMaybe
monotone p = case m of
            True -> Yes
            False -> case linear p of
                True -> No
                False -> Maybe
        where
        m = all criteria ms
        (Polynomial ms) = normalize p
        criteria (Monomial c [_]) =  minElement c >= 0 && atIndex c (0,0) >= 1 -- linear coefficient
        criteria (Monomial c _) = minElement c >= 0                           --constant or non-linear coefficient

-- | 'dimension' @p@ takes a polynomial and returns the amount of rows (dimension of square matrices) of the first monomial
-- found in the polynomial
monotone p = case m of
            True -> Yes
            False -> case linear p of
                True -> No
                False -> Maybe
        where
        m = all criteria ms
        (Polynomial ms) = normalize p
        criteria (Monomial c [_]) =  minElement c >= 0 && atIndex c (0,0) >= 1 -- linear coefficient
        criteria (Monomial c _) = minElement c >= 0                           --constant or non-linear coefficient

-- | 'dimension' @p@ takes a polynomial and returns the amount of rows (dimension of square matrices) of the first monomial
-- found in the polynomial