Suppose it is true that Sam believes that Hesperus is a planet. One cannot substitute 'Phosphorus' for 'Hesperus' in 'Sam believes that Hesperus is a planet' and be assured that the resulting sentence will also be true. And this despite the fact that Hesperus is Phosphorus. The reason is that Sam may be ignorant of the fact that Hesperus is Phosphorus. So here we have a context, that of belief de dicto, in which the substitution of one co-referential expression for another fails to preserve truth.
Valid: Hesperus is a planet; Hesperus is Phosphorus; ergo, Phosphorus is a planet.
Invalid: Sam believes that Hesperus is a planet; Hesperus is Phosphorus; ergo, Sam believes that Phosphorus is a planet.
The difference in Quinean jargon is that in the valid argument, each name is in a referentially transparent position, while in the invalid argument the first occurrence of 'Hesperus' and the second occurrence of 'Phosphorous' are in referentially opaque positions. (Cf. Word and Object, sec. 30)
So far the Opponent will agree. But he has a question for me.
Why does substitution succeed for the ‘designates’ relation, but fail for the ‘believes’ relation? The two arguments below are of exactly the same logical form:
A. ‘H’ designates H; H = P, therefore ‘H’ designates P.
B. Sam believes that H is a planet; H = P, therefore S believes that P is a planet.
My answer is that substitution succeeds for the 'designates' relation because there is no referential opacity in (A). 'H' in (A) -- I am mentioning the third word in (A) -- is referentially transparent. Let's not forget that we are assuming that names are rigid designators that refer directly to their designata, not via a Fregean sense or a Russellian description.
A directly referential term 'lassoes' its object, or you could say it 'harpoons' it or 'grabs' it. If I grab my cat I don't grab him under a description or via a Fregean "mode of presentation." I grab the cat himself, all 25 lbs of him with all his parts and properties. Analogously, successful reference on Kripke's scheme get us right to the thing itself.
I am maintaining against the Opponent that if names are rigid designators that target their designata directly and not via any sort of semantic intermediary, then the (A) and (B) cases are very different. (B)-type cases are counterexamples to universal substitutivity salva veritate; (A)-type cases are not. He is maintaining that the cases are parallel and that both generate referential opacity.
The Opponent's view might make sense if we add to the dialectic the Opponent's surprising thesis that all reference is intralinguistic reference, but this thesis cannot be brought into a discussion of Kripke who holds no such view. My view is that while there is of course intralinguistic reference, it is a derivative phenomenon: the paradigm cases are of extralinguistic reference. Reference to a massive planet is nothing like a pronoun's back-reference to its antecedent.
But I don't endorse Kripke's views. I incline toward a descriptivist theory of names. Names don't refer; people or rather their minds refer using names that need not be publicly expressed. Linguistic reference is built upon, and nothing without, thinking reference, or intentionality. The primacy of the intentional! (Chisholm would be proud of me.) The intentionality of finite mind, however, never presents us with the thing itself, Venus say, in all its infinitely-propertied glory. Mental reference in never direct but mediated by a semantic intermediary, whether a Fregean sense, an Husserlian noema, a Castanedan guise, or something of that order.
Thinking about my cat is quite unlike picking him up. When I pick him up I get the whole cat including stomach contents into my hand. But I can't get the whole cat into my mind when I think about him. I can only think of him under a description which doesn't begin to exhaust his full kitty-kat kwiddity.
Kripke's scheme is crude, especially when he tries to explain via causation how a name acquires its reference. The causal theory of reference quite hopeless for reasons canvassed in other posts.
Finally, if 'a' and 'b' are rigid designators that directly target their objects, and a = b, then surely there is no possible world in which the referents of these names both exist and are numerically different. If substitution comes into this at all, it cannot fail to preserve truth. For if the meaning of 'a' is exhausted by a, and the meaning of 'b' exhausted by b, and a = b, then there is no additional factor that could induce referential opacity.
If a = b, it does not follow that necessarily, a = b, for if a/b is contingent, there there are worlds in which the identity does not hold. But we can say this: if a = b, then essentially, a = b. This rules out the contingency of their identity across all worlds in which a/b exists.