Lets learn about Mathematical Logic in this page.
Proposition
A declarative statement (or assertion) that has a definite truth value, either true or false, but not both, is called a proposition. Lower case letters are often used to denote propositions, for example, p, q, r etc.
NOTE:
- Questions, commands, or exclamatory sentences in nature are not propositions.
- A proposition always have a truth value (T/F). [T for true and F for false]
Examples of Propositions
The following are few examples of propositions.
- “2 + 2 = 4” → True
- “4 is a prime number” → False
- “Every even number is divisible by 2” → True
Non-examples of Propositions: The below statements are not propositions.
- “What a beautiful day!” (Exclamation)
- “What time is it?” (Question)
- “Open the door.” (Command)
- “x > 7” (truth depends on x, so it is an open sentence with variable).
Mathematical Logic Operators
In mathematical (propositional) logic, logical operators, also called logical connectives, are used to combine or modify propositions to form new propositions.
The basic mathematical logic operators are listed below with symbols:
- Conjunction (∧)
- Disjunction (∨)
- Negation (~ or ¬)
- Implication (→ or ⇒)
- Double Implication (↔ or ⇔)
Conjunction (AND)
Let p and q be two propositions. Their conjunction, denoted as p∧q, is a compound proposition which is true when both p and q are true.
The truth table of conjunction (and) is given below.
| p | q | p∧q |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | F |
| F | F | F |
Disjunction (OR)
The disjunction of two propositions p and q, denoted as p∨q, is a compound proposition which is true when anyone of them is true.
The truth table of disjunction (or) is given below.
| p | q | p∨q |
|---|---|---|
| T | T | T |
| T | F | T |
| F | T | T |
| F | F | F |
Negation (NOT)
Let p denote a proposition. Its negation, denoted as ~p or ¬p, is a simple proposition which becomes true when p false and vice-versa. ~p read as negation of p.
The truth table of negation is described below.
| p | ~p |
|---|---|
| T | F |
| F | F |
Implication (IF–THEN)
The logical connective implication is also known as conditional operator. For two propositions p and q, the symbol p→q denotes their implication whose truth table is given as follows.
| p | q | p→q |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | T |
| F | F | T |
p→q read as if p then q.
Note the following.
- The converse of p→q is q→p.
- The inverse of p→q is ~p→~q.
- The contrapositive of p→q is ~q→~p.
Double Implication (IF AND ONLY IF)
This is also known as bi-conditional operator. The double implication of p and q, denoted as p↔q, which reads as p if and only if q that have the truth table as follows.
| p | q | p↔q |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | F |
| F | F | T |
Solved Problems
Q1: Find the truth table of the following propositions.
(i) (~p∧q)∨p
(ii) (p∨q)∨~q
(iii) (~p∧q)∧~r
(iv) [(p→q)∧(q→r)] → (p→r)
Answer:
(i)
| p | q | ~p | ~p∧q | (~p∧q)∨p |
| T | T | F | F | F |
| T | F | F | F | F |
| F | T | T | T | T |
| F | F | T | F | T |
(ii)
| p | q | p∨q | ~q | (p∨q)∨~q |
| T | T | T | F | T |
| T | F | T | T | T |
| F | T | T | F | T |
| F | F | F | T | T |
(iii)
| p | q | r | ~p | ~r | ~p∧q | (~p∧q)∧~r |
| T | T | T | F | F | F | F |
| T | T | F | F | T | F | F |
| T | F | T | F | F | F | F |
| T | F | F | F | T | F | F |
| F | T | T | T | F | T | F |
| F | T | F | T | T | T | T |
| F | F | T | T | F | F | F |
| F | F | F | T | T | F | F |
Q2: For given two propositions, write down the truth table for disjunction for four values of x.
p: x is divisible by 2
q: y is divisible by 3.
Answer:
| Values of x | p | q | p∨q |
| 12 | T | T | T |
| 8 | T | F | T |
| 15 | F | T | T |
| 21 | F | F | F |
This article is written by Dr. Tathagata Mandal, Ph.D in Mathematics from IISER Pune (Algebraic Number Theory), Postdocs at IIT Kanpur & ISI Kolkata. Currently, working as an Assistant Prof. at Adamas University. Thank you for visiting the website.