Wikipedia
on cameo appearances: "Originally, the phrase cameo referred
to the famous person playing no character but him or herself." I
would like to keep to this original sense; the portrayal must be such
that any professional mathematician would agree on the identity of the
theorem in question. I'm not going to verify this though; any cameos that
people (whose names appear in square brackets after the entry) are kind
enough to tell me about I will take on trust.

I will not vouch, either, for the mathematical accuracy
of any of these cameos: they are artists' responses to mathematics, so
accuracy may not have been the first imperative.

The Snake Lemma: in the opening scene
of Claudia Weill's film It's
My Turn (1980) Jill Clayburgh proves the Snake Lemma for her
mathematics class before departing for the weekend [Anthony
Knapp]. In Mike Nichols The
Graduate (1967), at the very beginning of the film, the Snake
Lemma can be seen on a blackboard behind Dustin Hoffman. [Wikipedia
entry]

The
Binomial Theorem: in The
Memoirs of Sherlock Holmes (The Final Problem), Prof. Moriarty
is described by Holmes as having written, at the age of 21, "a treatise
upon the binomial theorem, which has had a European vogue. On the strength
of it he won the mathematical chair at one of our smaller universities..."
See also the Wikipedia
entry.

Fermat's
Last Theorem: in Arthur Porges' 1954 story The Devil
and Simon Flagg, the latter bets the former that he cannot prove
or disprove Fermat's Last Theorem in 24 hours. You can find the story,
which has a delightful twist in its forked tail, in Clifton Fadiman's
Fantasia
Mathematica. [Bob
Lockhart]. In Fadiman's 1962 follow-up The
Mathematical Magpie, he attributes the outline of the same story
to A.J. Lohwater (so whose
plot is it? asks Alex Kasman). Arthur C. Clark's last novel, completed just before he died, co-authored with Frederik Pohl, is The Last Theorem, which describes the discovery of a short proof of Fermat's Last Theorem and the resulting cryptographic fall-out.

The
Four Colour Theorem: on The Island of Five Colors,
a junior mathematician is distraught to find five tribes whose territories
all border on each other and on the sea, even though "A professor
at the University of West Virginia ... had just proved the [Four Colour]
theorem up to 83 districts." You can find Martin Gardner's 1952 story
in Clifton Fadiman's Fantasia
Mathematica. [Bob
Lockhart]

This seems quite a tall order: a piece of music which embodies,
at some point, a clearly identifiable theorem. There is a little theorem
of Robin
Wilson and Carlton
Gamer relating dual projective planes to inversions of certain tone
sets which is the basis for Fanovar by Gamer (1996). It doesn't
quite qualify but it is very interesting nonetheless (see John Fauvel,
Raymond Flood and Robin Wilson (eds.), Music
and Mathematics: From Pythagoras to Fractals, Oxford University Press,
2003.)

Theorems in Heraldry

This would seem an even more elusive category but the subject
of scientific heraldry is dealt with extensively at Numericana.
Only one example is found there: