---
title: "Rules of inference: e-mail and program"
subject: "Discrete Structure"
chapter: 1
key: "semester_4/discrete_structure:rules-inference-email-program"
source: https://www.bctengineer.com/q/semester_4/discrete_structure/rules-inference-email-program
site: BCT Engineering
---

# Rules of inference: e-mail and program

Discrete Structure · Chapter 1: Logic, Induction and Reasoning

- Asked in: 2068 Bhadra, 8 marks
- Video: [12 - Build Arguments using Rules of Inference | Discrete Mathematics | PK Tutorials](https://www.youtube.com/watch?v=y-Oj8bzk29U) — PK Tutorials
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_4/discrete_structure/rules-inference-email-program
- Whole chapter: https://www.bctengineer.com/md/semester_4/discrete_structure/chapter-1

## Question

Using rules of inferences, show that the hypotheses "If you send me an e-mail message, then I will finish writing the program," "If you do not send me an e-mail message, then I will go to sleep early," and "If I go to sleep early, then I will wake up feeling refreshed" lead to the conclusion "If I do not finish writing the program, then I will wake up feeling refreshed." You are required to show each steps and give reasons for those steps before you come to the desired conclusion from the hypotheses.

## Short answer

Let p: send email, q: finish program, r: sleep early, s: refreshed. p→q contrapositive ¬q→¬p. ¬p→r, so ¬q→r by hypothetical syllogism. r→s gives ¬q→s. Thus if I don't finish the program, I will wake up feeling refreshed.

## Answer

#### Propositions
- p: you send me an e-mail message
- q: I will finish writing the program
- r: I will go to sleep early
- s: I will wake up feeling refreshed

#### Hypotheses and conclusion
1. p → q
2. ¬p → r
3. r → s

Conclusion: ¬q → s.

#### Proof
| Step | Statement | Reason |
|---|---|---|
| 1 | p → q | Hypothesis 1 |
| 2 | ¬q → ¬p | Contrapositive of 1 (logical equivalence) |
| 3 | ¬p → r | Hypothesis 2 |
| 4 | ¬q → r | Hypothetical syllogism from 2, 3 |
| 5 | r → s | Hypothesis 3 |
| 6 | ¬q → s | Hypothetical syllogism from 4, 5 |

So, if I do not finish writing the program, then I will wake up feeling refreshed. ∎

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. The conclusion is ¬q → s. Which approach is used?
   A. Use truth tables only
   B. Prove q
   C. Assume ¬q and derive s directly through chained implications
   D. Resolve on p
   Answer: C. We chain implications from ¬q to s. (Key point: Goal form)

2. Which equivalence is applied to p → q?
   A. q → p
   B. ¬p → ¬q
   C. ¬q → ¬p
   D. p ∧ ¬q
   Answer: C. The contrapositive of p → q is ¬q → ¬p. (Key point: Contrapositive)

3. Which two lines give ¬q → r by hypothetical syllogism?
   A. p → q and ¬p → r
   B. ¬p → r and r → s
   C. ¬q → ¬p and ¬p → r
   D. p → q and r → s
   Answer: C. ¬q → ¬p and ¬p → r chain to ¬q → r. (Key point: First chain)

4. Which final chain gives ¬q → s?
   A. ¬q → ¬p and r → s
   B. p → q and q → s
   C. ¬q → r and r → s
   D. ¬p → r and ¬q → ¬p only
   Answer: C. Hypothetical syllogism on ¬q → r and r → s. (Key point: Last step)

## Related in Discrete Structure

- [Rules of inference: sailing race](https://www.bctengineer.com/question.md?key=semester_4%2Fdiscrete_structure%3Arules-inference-sailing-race) — Discrete Structure, chapter 1
- [Rules of inference: movie and sunset](https://www.bctengineer.com/question.md?key=semester_4%2Fdiscrete_structure%3Arules-inference-rainy-movie) — Discrete Structure, chapter 1
- [Rules of inference: Randy and the job](https://www.bctengineer.com/question.md?key=semester_4%2Fdiscrete_structure%3Arules-inference-randy-job) — Discrete Structure, chapter 1
- [Rules of inference: cheque book argument](https://www.bctengineer.com/question.md?key=semester_4%2Fdiscrete_structure%3Arules-inference-cheque-book) — Discrete Structure, chapter 1
- [Rules of inference: Sunday test in MFC](https://www.bctengineer.com/question.md?key=semester_4%2Fdiscrete_structure%3Arules-inference-sunday-test) — Discrete Structure, chapter 1
- [Rules of inference: Pokhara and Sarankot](https://www.bctengineer.com/question.md?key=semester_4%2Fdiscrete_structure%3Arules-inference-pokhara-sarankot) — Discrete Structure, chapter 1

## Related in other subjects

- [Mutual exclusion via sleep and wake](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Amutual-exclusion-sleep-wake) — Embedded System, chapter 6
- [Web-mail to POP3 message transfer protocols](https://www.bctengineer.com/question.md?key=semester_8%2Finternet_and_intranet%3Aalice-bob-email-protocols) — Internet and Intranet, chapter 3
- [Why FOPL; rules of inference](https://www.bctengineer.com/question.md?key=semester_6%2Fartificial_intelligence%3Afopl-rules-of-inference-learning) — Artificial Intelligence, chapter 4
- [E-mail components and message delivery path](https://www.bctengineer.com/question.md?key=semester_8%2Finternet_and_intranet%3Aemail-components-delivery-path) — Internet and Intranet, chapter 3
