: ''Main article: [[If and only if]]''<!-- maybe we don't need this other article after all... -->

+

−

If "P implies Q" and "Q implies P" as well, then P and Q are said to be ''logically equivalent'' and we can write "P &harr; Q" ("P [[if and only if]] Q" or "P [[iff]] Q").

+

The phrase '''if and only if''' means "is logically equivalent to", or "is a [[necessary]] and [[sufficient]] condition for". It is often abbreviated '''iff'''.

+

+

For any statements '''P''' and '''Q''',

+

: '''P''' if and only if '''Q'''

+

means the same thing as:

+

: '''P''' [[implies]] '''Q''', and '''Q''' implies '''P'''.

[[Category:Logic]]

[[Category:Logic]]

Revision as of 11:17, 7 December 2009

Implication is a logical operation on two variables. "P implies Q" is usually written as "P → Q". Equivalent statements include "If P then Q", "P is sufficient for Q", and "Q is necessary for P".

Definition

Implication, the result of "P → Q" is defined by the following table:

P

Q

P→Q

True

True

True

True

False

False

False

True

True

False

False

True

In other words, if P is true, then Q must also be true.

Somewhat counterintuitively, if P is false, then P → Q is true. To illustrate why this makes sense, imagine a teacher who tells her class that any student who gets 100% on the final exam will pass the class. In other words,

P: A student gets 100% on the final

Q: That student passes the class

P → Q: A student gets 100% on the final → That student passes the class

Now consider the case in which two students do poorly on the final exam, and while one of them did well enough on the other exams to pass the course, the other did not. Did the teacher lie?

No. She said nothing about students who do not get 100% on the final (i.e., the case where P is false). Unless there is a student who both got 100% on the final and did not pass the course, the teacher told the truth.

For this reason, "P → Q" can be restated as "¬(P ∧ ¬ Q)" or "not (P and not Q)", or "it is not the case that P is true and Q is false".

Logical equivalence

The phrase if and only if means "is logically equivalent to", or "is a necessary and sufficient condition for". It is often abbreviated iff.