One of the recurring themes of mathematics, and one that I have always found seductive, is that of the nonexistent entity which ought to be there but apparently is not; which nevertheless obtrudes its effects so convincingly that one is forced to concede a broader notion of existence.
Last night I saw upon the stair A little man who wasn't there
Of course, the classic examples are negative numbers, fractions, irrational numbers, imaginary numbers, and so on. Each example represents a stage of development in our understanding of what a number is. Sometimes we have a formula or an expression which makes sense when some of its terms are limited by certain conditions. It is only natural to ask whether it can still make sense when some conditions are relaxed. The Binomial Theorem is an early example.
The acts of creation which give substance to these ghosts have become, on the whole, an everyday and unremarkable aspect of mathematics, so well understood that they are taken for granted. They are simply part of the process of successful generalization. Not all generalizations are successful, as students soon find out who wonder whether one can extend division to the case where the denominator is zero. Mathematical logic and category theory are on hand to advise about this sort of thing. Bringing a phantom into existence is usually a matter of enlarging one's category. The difficult part is choosing the right generalization.
F.W.Lawvere introduced the notion of an algebraic theory, as an object in its own right rather than a topic of logic. An algebraic theory has associated to it its category of models and homomorphisms, whose forgetful functor to the category of sets and functions determines the algebraic theory itself. The notion of a model of an algebraic theory can be generalized to any category with appropriate products. A ring R gives rise to the algebraic theory whose models are right R-modules; I am grateful to Jon Beck for the model-module assonance. This generalization, from rings to algebraic theories, is a powerful generator of phantom rings. I call an algebraic theory annular if it arises from a ring.
Suppose we have two operations huey and dewey in an algebraic theory. We say that they commute if for any rectangular array of elements, with rows the right size for huey and columns the right size for dewey, the application of huey to each row and dewey to the resulting column yields the same as applying dewey to each column and then huey to the resulting row. This can be expressed in a way that makes no mention of elements. An algebraic theory is commutative if any pair of its operations commute. This generalizes the notion of a commutative ring.
Commutative algebraic theories have very nice properties. Every operation is a homomorphism. So the set of homorphisms from one model to another has a canonical structure as a model itself. This makes the category of models closed. Furthermore, the resulting internal Hom functor has a left adjoint which generalizes the tensor-product construction for modules. A free model on one generator is a unit for this tensor-product.
A particularly agreeable example of a commutative theory, though not a finitary one, has for models complete lattices and for homorphisms the suprema-preserving functions. The unit object I, the lattice with two elements, is a dualizing object; for if L is any model then the model Hom(L,I) is isomorphic to the opposite of L, the lattice obtained by turning L upside-down. For any homomorphism of models, its dual homomorphism is its right adjoint. Thus the category of models is not only closed but is self-dual.
If p is a prime number and q is its n-th power, we have the Galois field F(q) having q elements. We may consider it as an annular algebraic theory. The theory whose models are pointed sets, is a sort of phantom field F(1). Although F(q)-vector spaces form an abelian category, so that we can play the games of homological algebra with it, and F(1)-models do not, nevertheless there is still enough structure left for homotopical algebra.
Another naturally occurring commutative theory has for its operations stochastic matrices. It is the subtheory of the ring of real numbers whose n-ary operations are n-ples of non-negative real numbers summing to 1. Convex subsets of Euclidean spaces have a natural model structure for this theory, but not all models have this form.