Full Idea
On my theory, 'pain' is a contingent name - that is, a name with different denotations in different possible worlds - since in any world, 'pain' names whatever state happens in that world to occupy the causal role definitive of pain.
Gist of Idea
'Pain' contingently names the state that occupies the causal role of pain
Source
David Lewis (An Argument for the Identity Theory [1966], §II n6)
Book Reference
Lewis,David: 'Philosophical Papers Vol.1' [OUP 1983], p.101
A Reaction
Better to say that 'pain' (like 'sound') is ambiguous. It is indiscriminately used by English-speakers to mean [1] the raw quale that we experience when damaged, and [2] whatever it is that leads to pain behaviour. Maybe frogs have 2 but not 1.