0% found this document useful (0 votes)
2 views

Logic in Descreet maths

The document provides an introduction to logic, covering key concepts such as statements, compound statements, logical connectives, and truth tables. It explains the differences between valid and invalid arguments, as well as the principles of logical equivalence, tautology, and contradiction. Additionally, it includes examples and practice problems for translating English sentences into symbolic form and analyzing compound statements.

Uploaded by

aaabubakar0327
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Logic in Descreet maths

The document provides an introduction to logic, covering key concepts such as statements, compound statements, logical connectives, and truth tables. It explains the differences between valid and invalid arguments, as well as the principles of logical equivalence, tautology, and contradiction. Additionally, it includes examples and practice problems for translating English sentences into symbolic form and analyzing compound statements.

Uploaded by

aaabubakar0327
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Lecture 1 Logic

1. Introduction to Logic
Logic is the study of principles and methods that differentiate valid arguments from invalid ones.

2. Statements
A statement is a declarative sentence that is either true or false, but not both.
Examples of Statements
:
True: "Grass is green."
False: "4 + 2 = 7."

Non-statements:
Questions: "May I come in?"
Commands: "Close the door."
Incomplete: "x > 2."
3. Compound Statements
Built using
simple statements
combined with
logical connectives
:
AND ( :)True if both statements are true.
OR ( :)True if at least one statement is true.
NOT (~): Negates the truth value of a statement.
Conditional ( :)"If p then q" is false only if pp is true and qq is false.
Biconditional ( :)True when both statements have the same truth value.

4. Symbolic Representation
Statements are symbolized as p,q,rp, q, r, etc.
Examples
:
p=p = "Islamabad is the capital of Pakistan."
q=q = "17 is divisible by 3."

5. Truth Tables
Used to determine the truth values of compound statements for all possible combinations of their components.

6. Logical Equivalence
Two logical expressions are equivalent if their truth tables are identical.
Examples:
Double negation: ( p) \simp (\sim p) \equiv p.
DeMorgan’s Laws:
(p q) ( p q)\sim
(p \land q) \equiv (\sim p \lor \sim q).
(p q) ( p q)\sim
(p \lor q) \equiv (\sim p \land \sim q).

7. Tautology and Contradiction


Tautology
: A statement that is always true.
Example: p pp
\lor \sim p.

Contradiction
: A statement that is always false.
Example: p pp
\land \sim p.
8. Implication and Its Variants
Conditional Statement (p q)
:
pp: Hypothesis.
qq: Conclusion.

Variants:
Inverse: p \simq p \sim q.
Converse: q pq p.
Contrapositive: q \sim
p q \sim p (Equivalent to original conditional).

9. Practice Problems
Translate English sentences into symbolic form.
Analyze compound statements using truth tables.
Examples:
"It is not hot but sunny" p \simq p \land q.
"If Ali is a CS student, then he is good at math" c mc m.
Explanation

1. What is Logic?

Logic is the study of principles and methods that allow us to:

Identify valid arguments (those where the conclusion follows logically from the premises).
Distinguish valid reasoning from invalid reasoning.

2. Simple Statement

A statement (or proposition) is any declarative sentence that is either true or false, but not both.

Examples:
1. "2 + 2 = 4" This is a True statement.
2. "It is Sunday today" Truth depends on the day, but it is a statement.
3. "Grass is blue" A False statement.

Non-Examples (Not Statements):


1. "Close the door!" It’s a command, not a declarative sentence.
2. "May I come in?" It’s a question, not a declarative sentence.
3. "x > 2" Without knowing xx, its truth value cannot be determined.

3. Truth Value

Every statement has a truth value:

True (T) if it is correct.


False (F) if it is incorrect.

4. Compound Statements

A compound statement is formed by combining simple statements using logical connectives. Here are the main connectives:

a) Negation (~):
Negates the truth value of a statement.
Example:

pp: "It is raining."


p\sim p: "It is NOT raining."

Truth Table:

pp p\sim p
T F
F T

b) Conjunction (AND, \land):


True only if both statements are true.
Example:

pp: "It is sunny."


qq: "It is warm."
p qp\land q: "It is sunny AND it is warm."

Truth Table:

pp qq p qp\land q
T T T
T F F
F T F
F F F
c) Disjunction (OR, \lor):
True if at least one of the statements is true.
Example:

pp: "It is raining."


qq: "I have an umbrella."
p qp\lor q: "It is raining OR I have an umbrella."

Truth Table:

pp qq p qp\lor q
T T T
T F T
F T T
F F F

d) Conditional (If-Then, \to):


True except when the first statement is true and the second is false.
Example:

pp: "If you study."


qq: "You pass the exam."
p qp\to q: "If you study, then you pass the exam."

Truth Table:

pp qq p qp\to q
T T T
T F F
F T T
F F T

e) Biconditional (If and Only If, \leftrightarrow):


True when both statements have the same truth value.
Example:

pp: "It is sunny."


qq: "It is warm."
p qp\leftrightarrow q: "It is sunny if and only if it is warm."

Truth Table:

pp qq p qp\leftrightarrow q
T T T
T F F
F T F
F F T

5. Logical Equivalence

Two statements are logically equivalent if their truth tables are identical.

Important Laws:
1. Double Negation: ( p) \sim(\sim
p p) \equiv p.
2. DeMorgan’s Laws:

(p q) ( p q)\sim
(p \land q) \equiv (\sim p \lor \sim q).
(p q) ( p q)\sim
(p \lor q) \equiv (\sim p \land \sim q).

6. Tautology and Contradiction


Tautology:
A statement that is always true.
Example: p pp
\lor \sim p.

Contradiction:
A statement that is always false.
Example: p pp
\land \sim p.

7. Translating Between English and Symbols

Example:

Let pp: "It is hot."


Let qq: "It is sunny."

English Sentence Symbolic Form


"It is not hot." p\sim p
"It is hot and sunny." p qp\land q
"It is hot or sunny." p qp\lor q
"If it is hot, then it is sunny." p qp\to q
"It is hot if and only if it is sunny." p qp\leftrightarrow q

8. Truth Tables for Compound Statements

To analyze a compound statement, we create a truth table showing the truth values of all possible combinations of its components.
9. Exercises for Practice
1. Construct the truth table for p ( q r)p\lor (\sim q \land r).
2. Translate "If Ali is a Computer Science student, then he is good at math" into symbols.
3. Use DeMorgan’s Laws to simplify (p q)\sim (p \lor q).

You might also like