Understanding Implications(Conditional/if-else) statements
Implications or conditional statements are molecular statements of the form P -> Q
P
is called hypothesisQ
is called conclusionP -> Q
is false only when P
is true and Q
is false
For example, Pythagoras theorem can be written as an implication statement. We can state that, If a, b and c are the base, height and hypotenuse of a right angle triangle, then
a^2 + b^2 = c^2
So if a triangle is a 'right angled triangle', then it implies that this formula is correct and valid.
Some initial considerations:
P | Q | P -> Q | |
---|---|---|---|
false | false | true | ← Why? |
false | true | true | ← Why? |
true | false | false | ← This will only be false |
true | true | true | ← Makes sense :) |
This confuses sometimes, to get an intuition of this.
Let's try to understand this:
This is clear that:
We can understand this by taking the Sets approach,
Let us assume P and Q as two Sets, implication says that P -> Q, where ->
is implies
.
So, P implies Q, that means P is the subset of Q.
P will be inside Q.
So, a given statement can be represented like the above diagram.
Let's consider a point x as the circumstance for the statement, i.e., it will determine the value to be true or false for P and Q and eventually for the implication.
So, depending upon the values for P and Q, we can place the point x on the venn diagram.
Suppose, P is true and Q is true, then
This means that x is inside both P and Q,
As we can see in the above diagram, this is a possible circumstance, as whatever is in P will automatically in Q. So P -> Q = true
Suppose, P = true and Q = false, this is not possible as we already saw that whatever is in P will automatically in Q. So, P -> Q = false
Now suppose, P = false and Q = true / false (anything). Then, there are two possible placement of point x in venn diagram:
Q = true
Q = false
Looking at both of the cases, we can say that both of them are possible. So, P -> Q = true, when P is false and Q is either true or false.
© progshala.in