In recursion theory, the mathematical theory of computability, a maximal set is a coinfinite recursively enumerable subset "A" 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.
Maximal sets have many interesting properties: they are simple, hypersimple, hyperhypersimple and r-maximal; the latter property says that every recursive set "R" contains either only finitely many elements of the complement of "A" or almost all elements of the complement of "A". There are r-maximal sets that are not maximal; some of them do even not have maximal supersets. Myhill (1956) asked whether maximal sets exist and Friedberg (1958) constructed one. Soare (1974) showed that the maximal sets form an orbit with respect to automorphism of the recursively enumerable sets under inclusion (modulo finite sets). On the one hand, every automorphism maps a maximal set "A" to another maximal set "B"; on the other hand, for every two maximal sets "A", "B" there is an automorphism of the recursively enumerable sets such that "A" is mapped to "B".