Implication (If... Then / Conditional Statement)

Rumman Ansari   Software Engineer   2025-07-15 01:00:26   156  Share
Subject Syllabus DetailsSubject Details
☰ TContent
☰Fullscreen

Table of Content:

🧠 Understanding "If... Then" (Conditional Statements) —

Let’s learn something cool from logic today! It's called a Conditional Statement. Don’t worry — it’s super easy once you understand it with a fun example! 😊


🤔 What is a Conditional Statement?

A conditional statement tells us:
👉 “If something happens, then something else will happen.”

We write it like this:
If p, then q
(or in short: p → q)

  • The first part (p) is called the antecedent (it’s the “if” part).

  • The second part (q) is called the consequent (it’s the “then” part).


🌧 Real-Life Example:

Let’s take a simple sentence:

If it rains, then the ground will be wet.

Here’s how we break it:

  • p = It rains

  • q = The ground is wet

So the full sentence is:
If it rains (p), then the ground will be wet (q).


✅ When is it True or False?

Now let’s see when this sentence is true and when it is false.

We’ll look at all the possibilities:

It rains? (p) Ground wet? (q) Is the statement "If it rains, then the ground will be wet" true? Why?
❌ No ❌ No ✅ Yes, it’s true It didn’t rain, and the ground is dry — all good!
❌ No ✅ Yes ✅ Yes, it’s true It didn’t rain, but maybe someone watered the ground. Still okay!
✅ Yes ❌ No ❌ No, it’s false It rained but the ground is dry — something is wrong! ❌
✅ Yes ✅ Yes ✅ Yes, it’s true It rained and the ground is wet — just like expected! 😊
 

🧪 What’s the Rule?

A conditional statement (If p, then q) is:

  • False only when: It rains (True), but the ground is dry (False)

  • True in all other cases

🔢 In Short (Using True/False):

p (It rains) q (Ground wet) p → q (If p, then q)
False False ✅ True
False True ✅ True
True False ❌ False
True True ✅ True
 

🎉 Final Tip:

Think of conditional statements like promises.

  • If you promise to clean your room if your mom gives you ice cream, then:

    • If she gives you ice cream and you don’t clean your room — you broke your promise. ❌

    • In all other cases — your promise is not broken. ✅


🔢 Truth Table for p → q (Using 0 and 1)

p q p → q
0 0 1
0 1 1
1 0 0
1 1 1
 

📌 Rule Recap:

  • Only False (0) when p = 1 and q = 0

  • All other cases → True (1)




Stay Ahead of the Curve! Check out these trending topics and sharpen your skills.