let rec is_diophantine = function | App(Pp(Mult), xl) -> List.for_all is_diophantine xl | App(Pp(Expt(n)), [x]) when n >= 0 -> is_diophantine x | a -> is_intvar a