Propositional Logic · Propositions
Lesson 9
In everyday life, we often use logical connections less strictly than required in mathematics and programming.
- “Buy milk or kefir!” In this request, the logical connection “or” is used, and it is almost always understood as “exclusive or” (in this situation, you should not buy both milk and kefir). However, in mathematical statements and programs, the “or” connection is not exclusive: the statement \((x \ge 5 \lor x \le 10)\) is true for \(x=7\). If we need exactly one of the two statements to be true, then the xor connection is used, denoted as \(\oplus\).
A joke on the topic. A logician's wife gave birth to a child. The doctor hands the newborn to the father. The wife asks: “Is it a boy or a girl?” The logician replies: “Yes, it is.” - A mother tells her child: “If you eat your porridge, you will get ice cream!” Does this mean that the child will not get ice cream if he does not finish the porridge? Most likely yes, although we do not know for sure (there may be other conditions for getting ice cream). In mathematics, however, the statement \(P \Rightarrow Q\), which we read as “from \(P\) follows \(Q\)” or “if \(P\), then \(Q\)”, is not equivalent to the statement \(Q \Rightarrow P\). Moreover, while in a natural language such a conditional statement has a certain temporal shade (something will happen after something else happens), in a mathematical statement there is no such shade.