The UK Prime Minister is a manYou will probably say not. The first is true because David Cameron (who at the time of writing is Prime Minister) is a man. The second is true because Margaret Thatcher (who used to be the Prime Minister until the 1990s) is a woman, and always has been. But the implication is clearly invalid, since the premisses could be true and the conclusion false if no man had ever undergone a sex change.
The UK Prime Minister used to be a woman
Some man used to be a woman
Kripke's take on this is famous: definite descriptions such as 'The UK Prime Minister' are not rigid. They have different referents in different possible worlds, and so the inference is not valid, because of the non-ridigity of reference. By contrast, proper names are rigid designators. Understood in the same sense, they always refer to the same individual. Thus, if you substitute 'David Cameron' into the inference above, you get something that is valid (although not sound, of course, for the second premiss is false - as far as we know, David Cameron never used to be a woman).
But how about this?
The leader of Cambridge City Council is a womanAs it happens, the (current) leader of Cambridge City Council is Jenny Bailey, who underwent a sex change operation to become a woman. So Jenny Bailey is now a woman, but used to be a man, and so some woman used to be a man. The premisses can't be true (assuming "The leader of Cambridge City Council" has the same referent in both premisses) and the conclusion false, so the inference is valid.
The leader of Cambridge City Council used to be a man
Some woman used to be a man
How do we explain this? Are definite descriptions rigid or not?
Ockham has a quite different take on this, distinguishing between 'sense of composition' and 'sense of division'. He explains it in Book III of his great Summa Logicae here. In the sense of composition it is signified that a mode (such as 'is possible' or 'was the case that') is predicated of the whole proposition. In the sense of division it is denoted that the predicate is predicated of the subject by a verb determined by such a mode. Thus we must distinguish between 'it was the case that the (then) PM was a woman' and 'it is the case that the (current) PM was a woman'. Clearly, read in the sense of composition, the subject term may have a different sense in the different premisses. In 'The UK Prime Minister used to be a woman', the subject term means Margaret Thatcher. In 'The UK Prime Minister is a man' it means David Cameron. Hence (read in the sense of composition) the inference is not valid because of equivocation, just as any syllogism is invalid because of equivocation. But read in the sense of division it is valid. If by 'The UK Prime Minister used to be a woman' I mean that David Cameron used to be a woman, the first inference is valid, just as the second is (where 'The leader of Cambridge City Council' refers in both premisses to Jenny Bailey).
Hence we do not have to accept any fundamental distinction between definite descriptions and proper names. Rather, it is easier to read definite descriptions in an ambiguous way. When we say 'The UK Prime Minister used to be a woman', we can read it either as saying that the present PM used to be a woman, or that some former PM used to be a woman. And this ambiguity is not fundamentally different from the one we find here.
William Pitt was the youngest Prime Minister
William Pitt was not the youngest Prime Minister
the youngest Prime Minister was not the youngest Prime Minister
For there was more than one person called 'William Pitt', just as there was more than one person called 'Prime Minister of the UK'.