All Topics  
If and only if

 

   Email Print
   Bookmark   Link






 

If and only if



 
 
If and only if, in logic
Logic

Logic is the study of the principles of valid demonstration and inference. Logic is a branch of philosophy, a part of the classical Trivium . The word derives from Greek language ?????? , fem....
 and fields that rely on it such as mathematics
Mathematics

Mathematics is the study of quantity, structure, space, change, and related topics of pattern and form. Mathematicians seek out patterns whether found in numbers, space, natural science, computers, imaginary abstractions, or elsewhere....
 and philosophy
Philosophy

Philosophy is the study of general problems concerning matters such as existence, knowledge, truth, beauty, justice, validity, mind, and language....
, is a biconditional logical connective
Logical connective

In logic, two sentences may be joined by means of a logical connective to form a compound sentence. The truth-value of the compound is uniquely determined by the truth-values of the simpler sentences....
 between statements. In that it is biconditional, the connective can be likened to the standard material conditional
Material conditional

The material conditional, also known as the material implication or truth functional conditional, expresses a property of certain conditionals in logic....
 ("if") combined with its reverse ("only if"); hence the name. The result is that the truth of either one of the connected statements requires the truth of the other, i.e., either both statements are true, or both are false.






Discussion
Ask a question about 'If and only if'
Start a new discussion about 'If and only if'
Answer questions from other users
Full Discussion Forum



Encyclopedia


If and only if, in logic
Logic

Logic is the study of the principles of valid demonstration and inference. Logic is a branch of philosophy, a part of the classical Trivium . The word derives from Greek language ?????? , fem....
 and fields that rely on it such as mathematics
Mathematics

Mathematics is the study of quantity, structure, space, change, and related topics of pattern and form. Mathematicians seek out patterns whether found in numbers, space, natural science, computers, imaginary abstractions, or elsewhere....
 and philosophy
Philosophy

Philosophy is the study of general problems concerning matters such as existence, knowledge, truth, beauty, justice, validity, mind, and language....
, is a biconditional logical connective
Logical connective

In logic, two sentences may be joined by means of a logical connective to form a compound sentence. The truth-value of the compound is uniquely determined by the truth-values of the simpler sentences....
 between statements. In that it is biconditional, the connective can be likened to the standard material conditional
Material conditional

The material conditional, also known as the material implication or truth functional conditional, expresses a property of certain conditionals in logic....
 ("if") combined with its reverse ("only if"); hence the name. The result is that the truth of either one of the connected statements requires the truth of the other, i.e., either both statements are true, or both are false. The connective is thus an "if" that works both ways.

In writing, common alternative phrases to "if and only if" include iff, Q is necessary and sufficient
Necessary and sufficient conditions

In logic, the words necessity and sufficiency refer to the implicational relationships between Statement . The assertion that one statement is a necessary and sufficient condition of another means that the former statement is true if and only if the latter is true....
 for P, P is equivalent (or materially equivalent) to Q (compare material implication), P precisely if Q, P precisely (or exactly) when Q, P exactly in case Q
, and P just in case Q. Many authors regard "iff" as unsuitable in formal writing; others use it freely.

In logic formulas, logical symbols are used instead of these phrases; see the discussion of notation.

Definition

The truth table
Truth table

A truth table is a mathematical table used in logic?specifically in connection with Boolean algebra , boolean functions, and propositional calculus?to compute the functional values of logical expression s on each of their functional arguments, that is, on each combination of values taken by their logical variables....
 of p iff q (also written as p ? q) is as follows:

Iff
p q
T T T
T F F
F T F
F F T


Usage


Notation

The corresponding logical symbols are "?", "?" and "=", and sometimes "iff". These are usually treated as equivalent. However, some texts of mathematical logic
Mathematical logic

Mathematical logic is a subfield of mathematics and logic with close connections to computer science and philosophical logic. The field includes the mathematical study of logic and the applications of formal logic to other areas of mathematics....
 (particularly those on first-order logic
First-order logic

First-order logic is a formal deductive system used in mathematics, philosophy, linguistics, and computer science. It goes by many names, including: first-order predicate calculus , the lower predicate calculus, the language of first-order logic or predicate logic....
, rather than propositional logic) make a distinction between these, in which the first, ?, is used as a symbol in logic formulas, while ? is used in reasoning about those logic formulas (e.g., in metalogic
Metalogic

Metalogic is the study of the metatheory of logic. While logic is the study of the manner in which logical systems can be used to decide the correctness of arguments, metalogic studies the properties of the logical systems themselves....
).

Another term for this logical connective
Logical connective

In logic, two sentences may be joined by means of a logical connective to form a compound sentence. The truth-value of the compound is uniquely determined by the truth-values of the simpler sentences....
 is exclusive nor.

Proofs

In most logical systems, one proves
Proof theory

Proof theory is a branch of mathematical logic that represents Mathematical proofs as formal mathematical objects, facilitating their analysis by mathematical techniques....
 a statement of the form "P iff Q" by proving "if P, then Q" and "if Q, then P" (or the inverse
Contraposition

In traditional logic, contraposition is a form of immediate inference in which from a given proposition another is inferred having for its subject the contradictory of the original predicate , and in some cases involving a change of quality ....
 of "if P, then Q", i.e. "if not P, then not Q"). Proving this pair of statements sometimes leads to a more natural proof, since there are not obvious conditions in which one would infer a biconditional directly. An alternative is to prove the disjunction "(P and Q) or (not-P and not-Q)", which itself can be inferred directly from either of its disjuncts — that is, because "iff" is truth-functional, "P iff Q" follows if P and Q have both been shown true, or both false.

Origin of the abbreviation

Usage of the abbreviation "iff" first appeared in print in John L. Kelley
John L. Kelley

John Leroy Kelley was an American mathematician at University of California, Berkeley who worked in general topology and functional analysis....
's 1955 book General Topology. Its invention is often credited to the mathematician
Mathematician

A mathematician is a person whose primary area of study and/or research is the field of mathematics....
 Paul Halmos
Paul Halmos

Paul Richard Halmos was a Hungary-born Jewish United States mathematician who made fundamental advances in the areas of probability theory, statistics, operator theory, ergodic theory, functional analysis , and mathematical logic....
.

The difference between if, only if, and iff


Examples

  1. Madison will eat pudding if the pudding is a custard. (equivalently: If the pudding is a custard, then Madison will eat it) -- sufficient condition
  2. Madison will eat pudding only if the pudding is a custard. (equivalently: If Madison is eating pudding, then it must be a custard) -- necessary condition
  3. Madison will eat pudding if and only if (iff) the pudding is a custard. (equivalently: If the pudding is a custard, then Madison will eat it. AND If Madison is eating pudding, then it must be a custard.)


Analysis


Sentence (1) states only that Madison will eat custard pudding. It does not, however, preclude the possibility that Madison might also have occasion to eat bread pudding. Maybe she will, maybe she will not - the sentence does not tell us. All we know for certain is that she will eat custard pudding. In other words, the nature of pudding being custard is a sufficient condition for Madison to eat the pudding.

Sentence (2) states that the only pudding Madison will eat is a custard. It does not, however, preclude the possibility that Madison will refuse a custard if it is made available, in contrast with sentence (1), which requires Madison to eat any available custard. Alternatively, custard is a necessary condition for Madison to eat the pudding. It is not sufficient since there is a possibility that Madison may refuse the pudding.

Sentence (3), however, makes it quite clear that Madison will eat custard pudding and custard pudding only. She will eat all such puddings, and she will not eat any other type of pudding. Here, custard is a necessary and sufficient condition for Madison to eat the pudding.

A further difference is that "if" is used in definitions (except in formal logic); see more below.

Advanced considerations


Philosophical interpretation

A sentence that is composed of two other sentences joined by "iff" is called a biconditional
Logical biconditional

In logic and mathematics, logical biconditional is a logical operator connecting two statements to assert, p Iff q where p is a hypothesis and q is a logical consequence ....
. "Iff" joins two sentences to form a new sentence. It should not be confused with logical equivalence
Logical equivalence

In logic, statements p and q are logically equivalent if they have the same logical content.Syntax , p and q are equivalent if each can be proof from the other....
 which is a description of a relation between two sentences. The biconditional "A iff B" uses the sentences A and B, describing a relation between the states of affairs A and B describe. By contrast "A is logically equivalent to B" mentions both sentences: it describes a relation between those two sentences, and not between whatever matters they describe.

The distinction is a very confusing one, and has led many a philosopher astray. Certainly it is the case that when A is logically equivalent to B, "A iff B" is true. But the converse does not hold. Reconsidering the sentence:

Madison will eat pudding if and only if it is custard.


There is clearly no logical equivalence between the two halves of this particular biconditional. For more on the distinction, see W. V. Quine's Mathematical Logic, Section 5.

One way of looking at "A if and only if B" is that it means "A if B" (B implies A) and "A only when B" (not B implies not A). "Not B implies not A" means A implies B, so then we get two way implication.

Definitions

In philosophy and logic, "iff" is used to indicate definition
Definition

A definition is a statement of the Meaning of a word or phrase. The term to be defined is known as the definiendum . The words which define it are known as the definiens ....
s, since definitions are supposed to be universally quantified
Universal quantification

In predicate logic, universal quantification formalizes the notion that something is true for everything, or every relevant thing.The resulting statement is a universally quantified statement, and we have universally quantified over the predicate....
 biconditionals. In mathematics and elsewhere, however, the word "if" is normally used in definitions, rather than "iff". This is due to the observation that "if" in the English language has a definitional meaning, separate from its meaning as a propositional conjunction. This separate meaning can be explained by noting that a definition (for instance: A group
Group (mathematics)

In mathematics, a group is an algebraic structure consisting of a set together with an Binary operation that combines any two of its element to form a third element....
 is "abelian" if it satisfies the commutative law; or: A grape is a "raisin" if it is well dried) is not an equivalence to be proved, but a rule for interpreting the term defined. (Some authors, nevertheless, explicitly indicate that the "if" of a definition means "iff"!)

Examples

Here are some examples of true statements that use "iff" - true biconditionals (the first is an example of a definition, so it should normally have been written with "if"):

  • A person is a bachelor iff that person is a marriageable man who has never married.
  • "Snow is white" (in English) is true iff "Schnee ist weiß" (in German) is true.
  • For any p, q, and r: (p & q) & r iff p & (q & r). (Since this is written using variables and "&", the statement would usually be written using "?", or one of the other symbols used to write biconditionals, in place of "iff").
  • For any real numbers x and y, x=y+1 iff y=x-1.


Analogs

Other words are also sometimes emphasized in the same way by repeating the last letter; for example orr for "Or and only Or" (the exclusive disjunction
Exclusive disjunction

The Logical connective exclusive disjunction, also called exclusive or , is a type of logical disjunction on two operands that results in a value of true if and only if exactly one of the operands has a value of true....
).

The statement "(A iff B)" is equivalent to the statement "(not A or B) and (not B or A)," and is also equivalent to the statement "(not A and not B) or (A and B)".

It is also equivalent to: not[(A or B) and (not A or not B)],

or more simply:

which converts into:

and

which were given in verbal interpretations above.

More general usage

Iff is used outside the field of logic, wherever logic is applied, especially in mathematical
Mathematics

Mathematics is the study of quantity, structure, space, change, and related topics of pattern and form. Mathematicians seek out patterns whether found in numbers, space, natural science, computers, imaginary abstractions, or elsewhere....
 discussions. It has the same meaning as above: it is an abbreviation for if and only if, indicating that one statement is both necessary and sufficient
Necessary and sufficient conditions

In logic, the words necessity and sufficiency refer to the implicational relationships between Statement . The assertion that one statement is a necessary and sufficient condition of another means that the former statement is true if and only if the latter is true....
 for the other. This is an example of mathematical jargon
Mathematical jargon

The language of mathematics has a vast vocabulary of specialist and technical terms. It also has a certain amount of jargon: commonly used phrases which are part of the culture of mathematics, rather than of the subject....
. (However, as noted above, if, rather than iff, is more often used in statements of definition.)

The elements of X are all and only the elements of Y is used to mean: "for any z in the domain of discourse
Domain of discourse

The domain of discourse, sometimes called the universe of discourse, logical discourse, or simply discourse, is an analytic tool used in deductive logic, especially predicate logic....
, z is in X if and only if z is in Y."

See also


  • Logical equality
    Logical equality

    Logical equality is a logical operator that corresponds to equality in Boolean algebra and to the logical biconditional in propositional calculus....
  • Logical biconditional
    Logical biconditional

    In logic and mathematics, logical biconditional is a logical operator connecting two statements to assert, p Iff q where p is a hypothesis and q is a logical consequence ....