“I am allowed to use plain English because everybody knows that I could use mathematical logic if I chose.” - Bertrand Russell
We argued that formal logic (a.k.a. symbolic logic ) was a better way to analyze correctness of arguments and inferences, and deciding whether a conclusion logically follows (is entailed by) from its assumptions. In this way, formal logic is a useful abstraction of reasoning just as are a useful abstraction of physics in the real world and reaction equations are a useful abstraction of chemistry in the real world.
But for formal logic to be useful, and not just pointless symbol manipulation, we need to show that we can convert real-world arguments into formal logic, and vice versa.
Example
Suppose that we use \(P\) to represent “I have cake” and \(Q\) to represent “I have candy.” Then:
The tricker direction (in general) is to translate English sentences into formal logic.
Of course, there’s always a trivial translation. We could translate the English-language proposition “If I have enough money, then I will buy books and soda” into the formula \(P\), where \(P\) represents the proposition that I will buy books and soda if I have enough money to do so.
But it is typically more useful to preserve the logical structure of the sentence as much as possible, and then define propositional variables \(P\), \(Q\), etc., to stand for the atomic propositions embedded in the sentence.
Example
"If I have enough money, then I will buy books and soda"
\[m\to(b\land s)\] where \(m\) is “I have enough money”, \(b\) is “I will buy books”, and \(s\) is “I will buy soda”.
Notice that we did not say that \(b\) is “books” and \(s\) is “soda”! Propositional variables like \(b\) and \(s\) need to represent complete propositions, and “books” isn’t something that could be true or false.
"I don't have chocolate, but I have vanilla."
\[\lnot c \land v\] where \(c\) is “I have chocolate” and \(v\) is “I have vanilla.” In terms of logic, “but” and “and” are considered synonyms. (In English “but” additionally signals contrast between the two propositions we are asserting.)
An alternative translation might be \[d \land v\] where \(d\) is “I have don’t have chocolate” and \(v\) is “I have vanilla.” In general, there may be more than one reasonable translation.
"If you clean your room, we will have ice cream"
\[c\to i\] where \(c\) is “you clean your room” and \(i\) is “we will have ice cream”.
Of course, logically speaking, \(c\to i\) allows the possibility that we might have ice cream even if you don’t clean your room. If the implication is “… and if you don’t clean your room, we won’t have ice cream” then a more accurate translation might be \[ c\leftrightarrow i\]
"His car runs on gasoline or methane."
The sentence is ambiguous. If we mean to say that we aren’t sure which kind of fuel his car needs, the translation would be \[g\lor m\] where \(g\) is “his car runs on gasoline” and \(m\) is “his car runs on methane”.
But if we meant that the car is happy to be given either gasoline or methane then the translation would be \[g \land m\] where (again) \(g\) is “his car runs on gasoline” and \(m\) is “his car runs on methane”.
As the last two examples show, it can require more thought to translate ambiguous English sentences into formal logic, but the advantage of doing so is that the resulting formula has a completely unambiguous meaning.
In many cases, we are interested in the figuring out the logical structure of English-language sentences written by humans trained in mathematics. This is important because Mathematicians have developed idiomatic ways of speaking with specific logical meanings, and learning those idioms is vital to understand what is being said in a typical theorem. (And of course the meaning of the theorem is important in knowing how to apply the theorem, and what kind of proof is required.)
Definition
In the context of mathematics:
“if \(A\), then \(B\)” means \(A\to B\).
“\(A\) only if \(B\)” means \(A\to B\).
“\(A\) if \(B\)” means \(B\to A\).
Putting the previous two together, “\(A\) if and only if \(B\)” means \[(A\to B)\land(B\to A)\] which is commonly abbreviated \(A\leftrightarrow B\).
In text, “\(A\) iff \(B\)” is shorthand for “\(A\) if and only if \(B\)”.
As a consequence, it matters very much whether the word “if” comes before \(A\), or between \(A\) and \(B\) !
One exception to the above translation occurs in definitions of mathematical terms, functions, or notation. Almost always, mathematicians write definitions using “if” where they mean “iff”.
Example
“Definition: we say that an integer \(n\) is even if \(n\) is evenly divisible by two.”
In this definition, the reader is supposed to understand not just that
(the usual interpretation of “if” in the middle of a sentence), but also that the opposite diretion holds:
Previous: 1.5 Abbreviating WFFs
Next: 1.7 Proof Systems