In recursion theory, the mathematical theory of computability, a maximal set is a coinfinite recursively enumerable subsetA of the natural numbers such that for every further recursively enumerable subset B of the natural numbers, either B is cofinite or B is a finite variant of A or B is not a superset of A. This gives an easy definition within the lattice of the recursively enumerable sets.