Вашата кошница е празна
Logical operators: implication and
equivalence
equivalence
Mathematics frequently uses statements with on “if… then…” structure. For example, “If a number is divisible by \latex{ 6 }, then it is divisible by \latex{ 3 } as well.” Let us take a look at this type of statements from a logical point of view.
Example 1
Annie’s cat purrs every morning if that day there will be rain. Today the cat purrs. Should Annie bring an umbrella?
Solution
The cat purrs when there will be rain. This does not tell anything about the situation when there is no rain, so if there will be no rain, the cat either purrs or not. Thus Annie’s cat might purr even if no rainfall shall be expected, so Annie should not take for sure that she will need her umbrella.
Example 2
We come across two inhabitants of Luth Island. The taller one says: “If I am a knight, then my companion is a knight as well.” Do we know what they are?
Solution
If the taller inhabitant is a knight, his statement is true, and since he is a knight, his companion has to be a knight as well. If the taller man is a knave, the condition of the statement (that he is a knight) is not true for him, thus no matter what his companion is, the statement will be true. But a knave cannot tell the truth.
Therefore the only possibility is that both inhabitants are knights.
Therefore the only possibility is that both inhabitants are knights.
Example 3
On Luth Island, we meet two inhabitants: a man and a lady. The lady tells: “If this man is a knight, then I am a knave.” Can we determine what they are?
Solution
If the man is a knight and the lady is a knave then her statement is true, however this is impossible since knaves cannot tell the truth.
If both of them are knights, the statement is false, which is impossible because knights cannot lie.
If the man is a knave, the first condition of the statement is not fulfilled and therefore the lady can be whatever, the statement will be true. Since the statement is true, the lady must be a knight.
Thus the lady is a knight and the man is a knave.
If both of them are knights, the statement is false, which is impossible because knights cannot lie.
If the man is a knave, the first condition of the statement is not fulfilled and therefore the lady can be whatever, the statement will be true. Since the statement is true, the lady must be a knight.
Thus the lady is a knight and the man is a knave.
DEFINITION: The logical operation which equals „if \latex{ A } then \latex{ B }” is called implication, in which \latex{ A } is the antecedent and \latex{ B } is the consequent. The logical value of the implication if false exactly when its antecedent is true and its consequent is false, otherwise the implication is true. The implication from \latex{ A } to \latex{ B } is written as \latex{A\rightarrow B} and pronounced as “\latex{ A } implies \latex{ B }”, or “if \latex{ A }, then \latex{ B }”.
Example 4
Is the following implication true?
If the moon is made of cheese, then this is a mathematics book.
If the moon is made of cheese, then this is a mathematics book.
Solution
Since the antecedent of the implication, \latex{ A = } the moon is made of cheese, is false, therefore, regardless of the truth value of the consequent, \latex{ B = } this is a mathematics book, the implication \latex{A\rightarrow B} is true.
Obviously this does not mean that \latex{B\rightarrow A} is also true, as this is a mathematics book, however the moon is not made of cheese.
Obviously this does not mean that \latex{B\rightarrow A} is also true, as this is a mathematics book, however the moon is not made of cheese.
⯁ ⯁ ⯁
Implication is a non-commutative operator, so \latex{A\rightarrow B} is not equivalent \latex{B\rightarrow A} .
Implication is a non-associative operator, so \latex{(A\rightarrow B)\rightarrow C} is not equivalent to \latex{A\rightarrow (B\rightarrow C).}
Implication is a non-associative operator, so \latex{(A\rightarrow B)\rightarrow C} is not equivalent to \latex{A\rightarrow (B\rightarrow C).}
Example 5
Describe the following statements with logical operators, if \latex{ T = } Timbertoes FC wins the cup and \latex{ H = } I’ll eat my hat.
- If Timbertoes FC wins the cup then I’ll eat my hat.
- Timbertoes FC will not win or I’ll eat my hat.
- If I don’t eat my hat, Timbertoes FC will not win.
- It is not true that Timbertoes FC wins and I don’t eat my hat.
Solution
- \latex{T\rightarrow H}
- \latex{\neg T\vee H}
- \latex{\neg H\rightarrow \neg T}
- \latex{\neg (T\wedge \neg H)}
Observe that all statements become false in only one case: when Timbertoes FC wins but I do not eat my hat.
The following is true in general:
The following is true in general:
THEOREM: For any statements \latex{ A } and \latex{ B }
\latex{A\rightarrow B\equiv \neg A\vee B.}
In mathematics we frequently use the term “if and only if”, e.g. “A natural number is divisible by \latex{ 9 } if and only if the sum of its digits is divisible by \latex{ 9 }.” On one hand, this means that if the number is divisible by \latex{ 9 }, then the sum of its digits is also divisible by \latex{ 9 }, and on the other hand, if the sum of the number’s digits is divisible by \latex{ 9 } then the number itself is divisible by \latex{ 9 }.
Example 6
On Luth Island, the traveller meets an inhabitant and asks him whether there is gold on the island. The inhabitant replies: “If and only if I am a knight, then there is gold on the island.” What does the traveller learn from this?
Solution
In other words the inhabitant tells the following: “If I am a knight then there is gold on the island, and if there is gold on the island then I am a knight.”
If the inhabitant is a knight then his statement is true, and since it is true that he is a knight, it will also be true that there is gold on the island.
If the inhabitant is a knave, it is not true that he is a knight. In this case, the statement “if I am a knight then there is gold on the island” must be true.
If it was false that there is gold on the island, then the statement “if there is gold on the island then I am a knight” would be also true, thus the statement “ if and only if I am a knight, there is gold on the island” made by the knave would have to be also true, which is impossible.
Therefore the inhabitant is a knight and there is gold on the island.
If the inhabitant is a knight then his statement is true, and since it is true that he is a knight, it will also be true that there is gold on the island.
If the inhabitant is a knave, it is not true that he is a knight. In this case, the statement “if I am a knight then there is gold on the island” must be true.
If it was false that there is gold on the island, then the statement “if there is gold on the island then I am a knight” would be also true, thus the statement “ if and only if I am a knight, there is gold on the island” made by the knave would have to be also true, which is impossible.
Therefore the inhabitant is a knight and there is gold on the island.
DEFINITION: The logical operation which equals the logical relationship “\latex{ A } if and only if \latex{ B }” is called equivalence. Logical value of the equivalence is true exactly when \latex{ A } and \latex{ B } have the same logical value, otherwise the equivalence is false.
The equivalence of \latex{ A } and \latex{ B } is written as \latex{A\leftrightarrow B} and pronounced as “\latex{ A } equals \latex{ B }”, or „\latex{ A } if and only if \latex{ B }”.
The equivalence of \latex{ A } and \latex{ B } is written as \latex{A\leftrightarrow B} and pronounced as “\latex{ A } equals \latex{ B }”, or „\latex{ A } if and only if \latex{ B }”.
Based upon the truth table, the characteristics of the equivalence operation can be easily verified for any statements \latex{ A }, \latex{ B } and \latex{ C }:
- commutativity: \latex{A\leftrightarrow B\equiv B\leftrightarrow A;}
- associativity: \latex{A\leftrightarrow (B\leftrightarrow C)\equiv (A\leftrightarrow B)\leftrightarrow C;}
- \latex{A\leftrightarrow A\equiv t;A\leftrightarrow t=A;A\leftrightarrow f=\neg A.}
The statement “\latex{ A } if and only if \latex{ B }” means first that if \latex{ A }, then \latex{ B } and second, that if \latex{ B }, then \latex{ A }. This is expressed in the following:
THEOREM: For any statements \latex{ A } and \latex{ B }
\latex{A\leftrightarrow B\equiv (A\rightarrow B)\wedge (B\rightarrow A).}
Example 7
Describe the logical structure of the following composite statements:
- If \latex{ –2 } is greater than zero then \latex{ –2 } is not negative.
- If \latex{ –2 } is less than zero then \latex{ –2 } is negative.
- If and only if \latex{ –2 } is positive or equal to zero, then it is not negative.
- \latex{ –2 } is not equal to zero if and only if it is positive or negative.
Solution
Introduce the following symbols:
- \latex{ –2 } is greater than zero;
- \latex{ –2 } is less than zero;
- \latex{ –2 } is negative;
- \latex{ –2 } is positive;
- \latex{ –2 } is zero.
- \latex{p\longrightarrow \neg q;}
- \latex{q\longrightarrow \neg r;}
- \latex{(s\vee t)\leftrightarrow \neg r;}
- \latex{\neg t\leftrightarrow (r\vee s).}
Notice that all statements are true!

Exercises
{{exercise_number}}. Formulate the following statements if \latex{ A = } the ice is at least \latex{ 8 } inches on the lake, \latex{ B = } I am going to skate on the lake.
- There has to be at least \latex{ 8 } inches of ice on the lake for me going to skate on it.
- If there is not at least \latex{ 8 } inches of ice on the lake then I am not going to skate on it.
- I am going to skate on the lake if there is at least \latex{ 8 } inches of ice on it.
- There is at least \latex{ 8 } inches of ice on the lake or else I am not going to skate on it.
{{exercise_number}}. Let \latex{ A = } today is Friday and \latex{ B = } tomorrow is Saturday. Formulate the following sentences using logical operators:
- If today is Friday then tomorrow is Saturday.
- If tomorrow is not Saturday then today is not Friday.
- For tomorrow being Saturday it is necessary that today is Friday.
- Tomorrow is Saturday, this is sufficient for today being Friday.
- Tomorrow is not Saturday, this is sufficient for today not being Friday.
- Tomorrow is Saturday if and only if today is Friday.
- Today is Friday, which is sufficient and necessary for tomorrow being Saturday.
{{exercise_number}}. Let:
- number \latex{ n } is divisible by \latex{ 12 }.
- the last two digits of the number \latex{ n } are \latex{ 36. }
- number \latex{ n } is prime.
- number \latex{ n } is even.
- number \latex{ n } is divisible by \latex{ 4 }.
- number n is divisible by \latex{ 6 }.
- the sum of \latex{ n }’s digits is divisible by \latex{ 3 }.
Find the statements belonging to the following expressions:
- \latex{B\longrightarrow E;}
- \latex{A\longrightarrow \neg C;}
- \latex{E\longrightarrow (\neg C\wedge D);}
- \latex{(D\wedge G)\leftrightarrow F;}
- \latex{A\leftrightarrow (E\wedge G);}
- \latex{(\neg D\wedge G)\rightarrow \neg F.}
{{exercise_number}}. Write down the logical structure of the following complex statements:
- If a quadrilateral is a rectangle and its neighbouring sides have the same length, then it is a square.
- Atriangle is right angled if and only if the sum of the square of two sides’ lengths equals the square of the last side’s length.
- If a number’s square is greater than \latex{ 4 }, then the number itself is either greater than \latex{ 2 } or less than \latex{ –2 }.
- If the product of two integers is even then they cannot be both odd.
{{exercise_number}}. Five children made the following statements about a positive integer:
Steve: It is divisible by \latex{ 3 }.
Johnny: It is divisible by \latex{ 4 }.
Will: It is divisible by \latex{ 6 }.
Kathy: It is divisible by \latex{ 9 }.
Betsy: It is divisible by \latex{ 12 }.
Johnny: It is divisible by \latex{ 4 }.
Will: It is divisible by \latex{ 6 }.
Kathy: It is divisible by \latex{ 9 }.
Betsy: It is divisible by \latex{ 12 }.
Who was mistaken if we know that there was exactly one false statement?
{{exercise_number}}. If Andy is a boy then Andy is younger than Susy. If Andy is \latex{ 18 } years old then Andy is a girl. If Andy is not \latex{ 18 } years old then Andy is at least as old as Susy. Can we decide from what we know whether Andy is a boy or a girl?
{{exercise_number}}. We ask a resident on Luth Island “Is the statement ‘There is gold on this island’equivalent with the statement ‘You are a knight’?” What does it mean if the resident replies with yes?
What about no?
What about no?
Puzzle
We see the following four cards: 1 2 3 4
On each card, there is one number out of \latex{ 1;\, 2;\, 3 } and \latex{ 4 } on each side. At least how many cards do we have to flip so that we can decide whether the following statement is true or false: “If there is \latex{ 2 } on one side of a card then there is \latex{ 4 } on the other side”?
On each card, there is one number out of \latex{ 1;\, 2;\, 3 } and \latex{ 4 } on each side. At least how many cards do we have to flip so that we can decide whether the following statement is true or false: “If there is \latex{ 2 } on one side of a card then there is \latex{ 4 } on the other side”?

