(K1) A true identity statement is necessary just in case the identity sign is flanked by two rigid designators.
Such a principle seems to work alright for singular terms but it gets tricky when applying it to general terms -- it is notoriously tricky just how to extend the notion of `rigidity' to general terms.
I prefer to extend the notion of rigidity to all expressions in the most straightforward manner: An expression is rigid (w.r.t. worlds) iff it has the same extension in all worlds. (This generalizes to temporal-rigidity, spacial-rigidity, agential-rigidity, etc.)
With this conception expressions like `water' and `H2O' are not rigid. This result is thought to be a reason against generalizing the notion of rigidity in this way. The statement `Water is identical to H2O' is necessary so according to (K1) we should expect that the expressions that flank the identity sign be rigid designators. But with my preferred understanding of rigidity this is not the case, so such an explanation of the necessity of identity statements cannot be given.
I think (K1) is a bad principle. It is somewhat close, however, to the true principle, which is the following.
(B1) A true identity statement is necessary just in case the identity sign is flanked by two necessarily co-extensional expressions.
It is easy to see why one might mistakenly think that (K1) was the correct principle since all rigid designators that flank a true identity statement will be necessarily co-extensional. But it is not the case that all necessarily co-extensional expressions that flank a true identity statement are rigid designators. Consider,
(1) The inventor of bifocals is identical to the extension of `the inventor of bifocals'.*
This is a necessary truth in which the identity sign is not flanked by two rigid designators. Instead the identity sign is merely flanked by two necessarily co-extensional expressions. What is important for the necessity of identity statements is that the pattern of extension across worlds of their flanking expressions is the same not that they are rigid expressions. It just so happens that in cases like
(2) The successor of one is identical to the smallest prime number,
the fact that the flanked expressions are rigid guarantees that their the patterns of trans-world extension agree. But it is the pattern not the rigidity which is of primary importance to the necessity of identity statements.
The same is true of the following identity statement.
(3) Water is identical to H2O.
The expression `water' and the expression `H2O' have the same pattern of counterfactual extensions. If `water' designates a certain set at world w, then `H2O' designates a certain set at world w. This is true even though on my preferred understanding of rigidity `water' and `H2O' are not rigid. This seems like a nice simple way to make sense of these issues. What more do we want?
Homework: Think of necessary identity statements in which the expressions that flank the identity sign are non-rigid (but, of course, necessarily co-extensional).
[*Ignore scope and assume this is an identity statement not a Russellian existentially quantified statement. And note that the expression "the extension of `the inventor of bifocals'" concerns our expression `the inventor of bifocals' not some other homophonic expression.]