In model theory, a branch of mathematical logic, the **spectrum of a theory**
is given by the number of isomorphism classes of models in various cardinalities. More precisely,
for any complete theory *T* in a language we write *I*(*T*, *α*) for the number of models of *T* (up to isomorphism) of cardinality *α*. The **spectrum problem** is to describe the possible behaviors of *I*(*T*, *α*) as a function of *α*. It has been almost completely solved for the case of a countable theory *T*.

In this section *T* is a countable complete theory and *κ* is a cardinal.

The Löwenheim–Skolem theorem shows that if *I*(*T*,*κ*) is nonzero for one infinite cardinal then it is nonzero for all of them.

Morley's categoricity theorem was the first main step in solving the spectrum problem: it states that if *I*(*T*,*κ*) is 1 for some uncountable *κ* then it is 1 for all uncountable *κ*.

Robert Vaught showed that *I*(*T*,ℵ_{0}) cannot be 2. It is easy to find examples where it is any given non-negative integer other than 2. Morley proved that if *I*(*T*,ℵ_{0}) is infinite then it must be ℵ_{0} or ℵ_{1} or 2^{ℵ0}. It is not known if it can be ℵ_{1} if the continuum hypothesis is false: this is called the Vaught conjecture and is the main remaining open problem (in 2005) in the theory of the spectrum.

**Morley's problem** was a conjecture (now a theorem) first proposed by Michael D. Morley that *I*(*T*,*κ*) is nondecreasing in *κ* for uncountable *κ*. This was proved by Saharon Shelah. For this, he proved a very deep dichotomy theorem.

Saharon Shelah gave an almost complete solution to the spectrum problem. For a given complete theory *T*, either *I*(*T*,*κ*) = 2^{κ} for all uncountable cardinals *κ*, or for all ordinals ξ (See Aleph number and Beth number for an explanation of the notation), which is usually much smaller than the bound in the first case. Roughly speaking this means that either there are the maximum possible number of models in all uncountable cardinalities, or there are only "few" models in all uncountable cardinalities. Shelah also gave a description of the possible spectra in the case when there are few models.

By extending Shelah's work, Bradd Hart, Ehud Hrushovski and Michael C. Laskowski gave the following complete solution to the spectrum problem for countable theories in uncountable cardinalities.
If *T* is a countable complete theory, then the number I(*T*, ℵ_{α}) of isomorphism classes of models is given for ordinals α>0 by the minimum of 2^{ℵα} and one of the following maps:

- 2
^{ℵα}. Examples: there are many examples, in particular any unclassifiable or deep theory, such as the theory of the random graph. - for some countable infinite ordinal
*d*. (For finite*d*see case 8.) Examples: The theory with equivalence relations*E*_{β}for all β with β+1<*d*, such that every*E*_{γ}class is a union of infinitely many*E*_{β}classes, and each*E*_{0}class is infinite. - for some finite positive ordinal
*d*. Example (for*d*=1): the theory of countably many independent unary predicates. - for some finite positive ordinal
*d*. - for some finite positive ordinal
*d*; - for some finite positive ordinal
*d*. Example (for*d*=1): the theory of countable many disjoint unary predicates. - for some finite ordinal
*d*≥2; - for some finite positive ordinal
*d*; - for some finite ordinal
*d*≥2; Examples: similar to case 2. - . Example: the theory of the integers viewed as an abelian group.
- for finite α, and |α| for infinite α, where
*G*is some subgroup of the symmetric group on*n*≥ 2 elements. Here, we identify α^{n}with the set of sequences of length*n*of elements of a set of size α.*G*acts on α^{n}by permuting the sequence elements, and |α^{n}/*G*| denotes the number of orbits of this action. Examples: the theory of the set ω×*n*acted on by the wreath product of*G*with all permutations of ω. - . Examples: theories that are categorical in uncountable cardinals, such as the theory of algebraically closed fields in a given characteristic.
- . Examples: theories with a finite model, and the inconsistent theory.

Moreover, all possibilities above occur as the spectrum of some countable complete theory.

The number *d* in the list above is the depth of the theory.
If *T* is a theory we define a new theory 2^{T} to be the theory with an equivalence relation such that there are infinitely many equivalence classes each of which is a model of *T*. We also define theories by , . Then
. This can be used to construct examples of theories with spectra in the list above for non-minimal values of *d* from examples for the minimal value of *d*.