# Proving $P$ by proving $\neg Q$ and knowing $P\lor Q$

This may sound silly.

I used to remember studying this in physics class and I thought of asking it in physics.stackexchange and then later I decided to ask it here itself.

Let's say, under some conditions,a variable $x$ can either have $2$ values such as $y$ or $z$.

Assume, we need to prove that $x = y$, then sometimes, they used to prove that $x \neq z$.

Since $x$ has $2$ possible values and we proved $x\neq z$, so obviously, we proved that $x = y$ indirectly.

These kind of proving mechanism, I used to remember it in many places.

What is this theorem called ? There is a common term is there for this, like "theory of blah, blah,..." (Hoping not to get a down vote for this dumb question)

• I've edited the title of your question to reflect the general concern portrayed by your example. I have also added the (logic) tag, because this is essentially a question about logic. At the end of the first part of this answer I discuss something related to this, but I don't really answer the present question. – Git Gud Dec 18 '14 at 12:15
• Proving $P$ from $P \lor Q$ and $\lnot Q$ is a correct argument, called Disjunctive Syllogism (or modus tollendo ponens). – Mauro ALLEGRANZA Dec 18 '14 at 12:15
• In order to get an answer to your question, please try to contextualize how much logic you know. The question can take many forms depending on context, for instance you could be asking why $\neg Q, P\lor Q\vdash P$ or you could be asking why $(\neg Q\land (P\lor Q))\implies P$ or you may not even realise that this is what you're asking. – Git Gud Dec 18 '14 at 12:16

What you have there is a Disjunctive syllogism. It is named after the logical disjunction (or the or operator, $\vee$). The formal name of the is modus tollendo ponens, and is an example of a valid syllogism, and is hence also a sound syllogism, provided it is a correct dichotomy of the two ideas, and that both have a true value.
Here is the formal setup of your syllogism that you described: $$\begin{array}{} & P\lor Q \\ & \neg Q \\ \hline \therefore & P \end{array}$$
This is valid, for, if your first value, $P\vee Q$, has a true when, then either $P$, $Q$, or both $P$ and $Q$ are true. Since we know that $\neg Q$ is true, or that $Q$ is false, we can infer that $P$ is true, for it the only value that makes our first premise true.