'Is the expression concave?'

@clru_cache(maxsize=100)
def is_concave(self):

    if self.is_constant():
        return True
    elif self.is_atom_concave():
        for (idx, arg) in enumerate(self.args):
            if (not (arg.is_affine() or (arg.is_concave() and self.is_incr(idx)) or (arg.is_convex() and self.is_decr(idx)))):
                return False
        return True
    else:
        return False
