Why is this inference invalid? So I purchased a book on logic (for beginners) as the subject interests me, and the author presents the following statement as an example of an invalid inference:
"Everyone wanted to win the prize; so the person who won the race wanted to win the prize."
Symbolised as follows, where xP is 'x wanted to win the prize' and xR is 'x won the race': $$\frac{\forall x\;xP}{(|x\;xR)P }$$ where |x means "the object x, such that"  (a notation I cannot seem to find anywhere else?).
The author states this is invalid because there is potentially a situation s in which everyone satisfies P but nobody satisfies R. But I do not understand how this could be true, due to the structure of the sentence - surely, xR in the conclusion means the race was ran and there was a winner?
 A: The notation is difficult to understand, the way I read it is:
$$\frac{\forall x\;xP}{(|x\;xR)P }$$
is equivalent to:
$$\forall x P(x) \rightarrow \exists x (R(x)\land P(x))$$
Which implies:
$$\forall x P(x) \rightarrow \exists x R(x)$$
And this is indeed not the case as $R(x)$ could never be true, for any x.
A: There's no guarantee that the race was run, or that someone won - perhaps everyone wanted to win, but the race was called off due to rain. Perhaps every runner crossed the line at the same time, and the officiator decided that no-one would be declared winner. Perhaps no-one actually signed up for the race - typically if a set $S$ is empty, then a statement like $(\forall x \in S) P(x)$ is vacuously true, but any attempt to say something about a particular element of $S$ will fail to hold any meaning.
A: Hmm yes, the problem seems to be with this "notation you can't seem to find anywhere" which I've never heard of either. (Though Henning in the comments seems to have pinned it down).
Referring to 'the person who won the race' as an object is odd from the perspective of mathematical logic since it presumes that person exists and is unique. So translating the second sentence into logic is a bit tricky. Since the author has a notation for it, perhaps it's an abbreviation for a first order statement or we're working in a nonstandard system. If it's an abbreviation, it would probably be defined as: $$(|x\,xR)P = ((\exists!x)xR) \wedge ((\forall x) (xR\rightarrow xP)) $$ which is to say that the statement is implicitly asserting that 'the person who won the race' exists.
In the case that there is nobody who won the race, this is false, regardless if $\forall x\, xP$ is true, so that fits with what the author is saying. 
A: On traditional analyses of presupposition, anything that would make this inference wrong would also make the consequent meaningless, since using "the" presupposes the existence of a unique contextually salient individual that won a unique contextually salient race.
Since the logical notation actually contains a symbol corresponding to "the", this should carry over to the truth value of the logical notation, that is, your logical formula contains an open presupposition that must be contextually filled. Traditionally, you'd assume that a sentence that has an unfulfilled presupposition lacks a truth value, that is, it is neither true or false. (The classic case is the sentence "The present king of France is bald", where there is no present king of France.)
So the English sentence "Everyone wanted to win the prize; so the person who won the race wanted to win the prize." is true where the presupposition is fulfilled, i.e. there is an individual that won a certain race, and I would argue that it commits anyone that says it to believing in the existence of the individual, which would make it true once again. Whether that makes the sentence true as an abstract sentence seems debatable to me.
Whether the inference in your logical notation is correct or not would, of course, depend on the exact meaning of your "the"-operator.
A: Your final sentence hints at why this isn't allowed:

"surely, xR in the conclusion means the race was ran and there was a winner?"

Each postulate must mean one thing and one thing only. To say the race was run and there was a winner requires two postulates. This rule exists to avoid paradoxes.
You could quite functionally use some model of logic where this is a non issue, but most logicians agree to use a model where it is an issue. They see it as an instance of the 'Golden Mountain Paradox':

"All golden mountains are mountains, all golden mountains are golden, therefore some mountains are golden"

It's a philosophical conundrum to argue that the winner of the race exists without a postulate to support that. Some operations can be performed on him if you assume he exists: I'm writing about him right now. Others can not, however: We can not ask him to endorse our cereal.
Have you created a winner by introducing them through logic? Is he bald? Can you crown him? Could someone else create someone else just as easily? Is the truth value of that creation consistent (Could they stop existing)?
If you're interested in the subject, you may want to search or ask about 'Existentialism'; the school of thought about how, why, and whether things exist. There's a lot of hokey stuff related, but there are some excellent and entertaining paradoxes. Here are some of my favorites:


*

*https://en.wikipedia.org/wiki/The_Treachery_of_Images

*Is Harry Potter bald?

*The sequel to The Treachery of Images, "The Two Mysteries"
