2

So I just discovered iff thinking it was a typo. But after looking it up and reading other answers on here it is a valid contraction of words if and only if. Much like XOR in a mathematical domain.

How is if and only if different from if when used in a sentance?

Does if not already imply a condition that must be met before fulfilling some clause. It's like without iff regular if implied if or maybe.

Similar to XOR I would assume this word/representation be reserved for logical expression. However dictionary.com is giving examples of use in English:

I could like her better, iff she was better to my young lady.

Clarissa, Volume 3 (of 9) Samuel Richardson

6
  • 3
    Note that iff is only a "valid contraction" in specialized contexts such as philosophy and computer programming. Just because a word is in the dictionary does not mean it is commonly used or widely understood. I have never come across iff in a newspaper that I can remember. Secondly, why if and iff are not equivalent is a matter of logic, not English. If it rains, the road will be wet is different from Iff it rains, the road will be wet, because in the former, the road could also be wet from lawn sprinklers.
    – choster
    Commented Dec 20, 2018 at 23:21
  • I'm voting to close this question as off-topic because it is a question about a logical formulation, and not about the English language.
    – choster
    Commented Dec 20, 2018 at 23:39
  • @choster Maybe but it could be good for other programmers to reference. Some people seem to think it is a real word. As does dictionary.com. I got into confusion in a pull request as a maintainer believes this is a real word and is using it in general documentation. Which lead me down this rabbit hole to clarify.
    – Lex
    Commented Dec 20, 2018 at 23:44
  • I'm hardly saying it isn't a "real" word. I'm saying that ordinary people do not have a need for it. Whether it is appropriate or not for your documentation depends on who is going to be reading that documentation.
    – choster
    Commented Dec 21, 2018 at 0:01
  • @choster From wikipedia """"...often, mathematical definitions follow the special convention that "if" is interpreted to mean "if and only if" """. So its use really seems reserved for logical statements x = y iff A ~ B outside of this I think if should be used. In my case "Returns true iff key is in s" this is english and iff reads as a typo. You'd be better off with => true iff s[key
    – Lex
    Commented Dec 21, 2018 at 0:19

2 Answers 2

7

I agree with your assumption and not with Dictionary.com. Like XOR, iff should only be used in a mathematical or philosophical context. In normal English prose, "iff" is not a word, it's a typo.

You cannot use the abbreviation "iff" in the body of a business letter, or a newspaper article, or a history textbook. iff is not really a contraction. Unlike can't, which you'd pronounce kant, when reading iff aloud, you would not pronounce it if (or iffff), you would say, "if and only if." This makes it a special kind of abbreviation, which can't be pronounced in its abbreviated form.

OK, so what does it mean in mathematics, or philosophy?

This Wikipedia article is pretty good: "If and only if"

Here's how they've contrasted if and only if from if and from only if:

"Madison will eat the fruit if it is an apple."

This states that Madison will eat fruits that are apples. It does not, however, exclude the possibility that Madison might also eat bananas or other types of fruit. All that is known for certain is that she will eat any and all apples that she happens upon. That the fruit is an apple is a sufficient condition for Madison to eat the fruit.

In other words, any time Madison encounters an apple, she will eat it. If she encounters a pear or a banana, we don't know what she will do.

"Madison will eat the fruit only if it is an apple."

This states that the only fruit Madison will eat is an apple. It does not, however, exclude the possibility that Madison will refuse an apple if it is made available, in contrast with (1), which requires Madison to eat any available apple. In this case, that a given fruit is an apple is a necessary condition for Madison to be eating it. It is not a sufficient condition since Madison might not eat all the apples she is given.

In other words, if Madison encounters a pear or a banana, she will definitely not eat it. If she encounters an apple, she may eat it, but she may not.

"Madison will eat the fruit if and only if it is an apple"

This statement makes it clear that Madison will eat all and only those fruits that are apples. She will not leave any apple uneaten, and she will not eat any other type of fruit. That a given fruit is an apple is both a necessary and a sufficient condition for Madison to eat the fruit.

In other words, if Madison encounters an apple, she will definitely eat it. If she encounters a pear or a banana, she definitely will not eat it.

2

iff is used in mathematics to describe a logical if statement that is reversible. In other words "A iff B" means "if A then B" and "if B then A".

For example, if "I have an umbrella" then "it is raining" does not necessarily imply that when it rains I have an umbrella, but when I have an umbrella it is definitely raining.

However "I have an umbrella" iff "it is raining" means that I have an umbrella when it rains and when it rains I have an umbrella.

1
  • 1
    Welcome to EL&U! While you have written a good and extensive answer, it would be beneficial to provide sources. Commented Dec 21, 2018 at 8:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .