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

Introduction To Logic

Here are the truth values of the propositions: 1. False 2. True 3. False 4. True 5. False 6. True 7. True
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Introduction To Logic

Here are the truth values of the propositions: 1. False 2. True 3. False 4. True 5. False 6. True 7. True
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Introduction to Logic

Logic
◼ Logic is the basis of all mathematical
reasoning and of all automated reasoning.
◼ The rules of logic specify the meaning of
statements.
◼ The rules of logic give precise meaning to
many statements. These rules are used to
distinguish between valid and invalid
arguments.
Practical Applications of Logic

◼ understanding mathematical reasoning


◼ design of computing machine
◼ artificial intelligence
◼ computer programming
◼ programming languages
Practical Applications of Logic

◼ design of computer circuits


◼ construction of computer programs
◼ verification of the correctness of programs
◼ other areas of computer science, as well as to
many other fields of study.
Introduction to
Propositional Logic
◼ Propositional Logic, or propositional calculus, is the
area of Logic that deals with propositions.
◼ A proposition (or statement) is a declarative (it
declares a fact) sentence that is either true or false,
but not both.
◼ The truth value of a statement is “true” if the
statement is true and “false” if the statement is
false.
◼ We denote simple or prime propositions by small
letters p, q, r, etc. and compound propositions by
capital letters like P, Q, R, etc.
Introduction to
Propositional Logic
Examples. Which of the following are propositions
and which are not? If proposition, indicate the
truth value.

1. Sta. Cruz is the capital of Laguna.


2. De La Salle Canlubang is in Canlubang,
Laguna
3. 1+1=2
4. 2+2=3
5. What a wonderful day!
6. Get up and do your exercise.
Introduction to
Propositional Logic
Examples. Which of the following are propositions and
which are not? If proposition, indicate the truth value.

1. Sta. Cruz is the capital of Proposition, True


Laguna.
2. De La Salle Canlubang is in Proposition, False
Canlubang, Laguna
3. 1+1=2 Proposition, True
4. 2+2=3 Proposition, False
5. What a wonderful day! Not a proposition
6. Get up and do your exercise. Not a proposition
Logical Operators or
Connectives
Many mathematical statements are constructed by
combining two or more propositions to form new or
compound propositions using logical operators or
connectives.
New propositions ( Connectives ) Symbols
CONJUNCTION ( AND/BUT ) 
DISJUNCTION ( OR ) 
IMPLICATION ( IMPLIES/IF THEN ) 
BICONDITIONAL ( IF AND ONLY IF ) 
NEGATION ( IT IS NOT THE CASE THAT / NOT )  or ~
Negation
Let 𝑝 be a proposition.

The negation of 𝒑, denoted by ~𝒑 is the statement “It is not


the case that 𝑝.”

The proposition ~𝑝 is read “not p”.


The truth value of ~𝑝 is the opposite of the truth value of 𝑝.

Example:
𝑝: Today is Friday.
~𝑝: Today is not Friday
Conjunction
Let 𝑝 and 𝑞 be propositions.

The conjunction of 𝒑 and 𝒒, denoted by 𝒑 ∧ 𝒒 is the


proposition “𝑝 and 𝑞.”

The conjunction 𝑝 ∧ 𝑞 is true when both 𝑝 and 𝑞 are true and is


false otherwise.

Example:
𝑝: Today is Friday.
𝑞: It is raining today.
𝑝 ∧ 𝑞: Today is Friday and it is raining today.
Disjunction
Let 𝑝 and 𝑞 be propositions.

The disjunction of 𝒑 and 𝒒, denoted by 𝒑 ∨ 𝒒 is the proposition “𝑝


or 𝑞.”

The disjunction 𝑝 ∨ 𝑞 is false when both 𝑝 and 𝑞 are false and is true
otherwise.

Example:
𝑝: Today is Friday.
𝑞: It is raining today.
𝑝 ∨ 𝑞: Today is Friday or it is raining today.
Conditional
Let 𝑝 and 𝑞 be propositions.
The conditional statement 𝒑 → 𝒒 is the proposition
“If 𝑝, then 𝑞.”
The conditional statement 𝑝 → 𝑞 is false when 𝑝 is true and
𝑞 is false, and true otherwise.
In the conditional statement 𝑝 → 𝑞, 𝑝 is called the
hypothesis and 𝑞 is called the conclusion.

Example:
𝑝: Maria learns discrete mathematics.
𝑞: Maria will find a good job.
𝑝 → 𝑞: If Maria learns discrete mathematics, then she will
find a good job.
The following statements are
equivalent (implication)
◼ pq ◼ p is sufficient for q
◼ p implies q ◼ q whenever p
◼ If p, then q ◼ q is necessary for p
◼ If p, q ◼ q follows from p
◼ q if p ◼ A necessary condition
◼ q when p for p is q
◼ p only if q ◼ A sufficient condition for
q is p
Biconditional
Let 𝑝 and 𝑞 be propositions.
The biconditional statement 𝒑 ↔ 𝒒 is the proposition
“𝑝 if and only if 𝑞.”
The biconditional statement 𝑝 ↔ 𝑞 is true when 𝑝 and 𝑞
have the same truth values, and is false otherwise.

Example:
𝑝: You can take the flight.
𝑞: You buy a ticket.
𝑝 ↔ 𝑞: You can take the flight if and only if you buy a
ticket.
The following statements are
equivalent (biconditional)
◼ pq
◼ p if and only if q
◼ p iff q
◼ pq and qp
◼ p is necessary and sufficient for q
◼ If p then q, and conversely
Truth Table

𝑝 𝑞 ~𝑝 𝑝∧𝑞 𝑝∨𝑞 𝑝→𝑞 𝑝↔𝑞


T T F T T T T
T F F F T F F
F T T F T T F
F F T F F T T
The hierarchy of connectives

Highest Precedence parenthesized expressions


not
 and, or
implies
Lowest Precedence if and only if
Example 1
Let 𝑝 and 𝑞 be the propositions:
𝑝: It is very cold.
𝑞: It is raining.

Write the following propositions using 𝑝, 𝑞, and


logical operators.
1. It is very cold and raining.
2. It is very cold but not raining.
3. If it is very cold, it is also raining.
4. It is either very cold or it is raining, but it is not
raining if it is very cold.
Example 2

If the salaries of workers are increased and the


workload is decreased, then the turnover is not
expected.

𝑝: The salaries of workers are increased.


𝑞: The workload is decreased.
𝑟: The turnover is expected.

𝑝 ∧ 𝑞 → ~𝑟
Example 3

The sum of two integers is even if and only if


either both integers are odd or both are even.

𝑝: The sum of two integers is even.


𝑞: Both integers are odd.
𝑟: Both integers are even.

𝑝 ↔ 𝑞∨𝑟
Example 4
Let 𝑝, 𝑞, and 𝑟 be the propositions:
𝑝: You are sick.
𝑞: You miss the final examination.
𝑟: You pass this subject.

Express each of the following propositions as an


English sentence.
1. 𝑝→𝑞
2. ~𝑞 ↔ 𝑟
3. 𝑝 ∧ 𝑞 ∨ ~𝑞 ∧ 𝑟
Truth Value
Let p be true and q be false. Give the truth
value of the following propositions
1. ¬𝑝 → ¬𝑞

2. 𝑞 ∧ ¬𝑞 ∨ 𝑝
3. 𝑝 ∨ 𝑞 ↔ ¬𝑝
4. 𝑞 → ¬ 𝑝 ∧ 𝑝
Truth Value
Determine the truth value of the propositions.
1. 2 + 3 = 1 or 5 is an odd number
2. 2 < 10 or 10 is divisible by 3
3. If 5 is positive, then 8 is negative
4. 4 + 7 = 11 or 11 – 3 = 7
5. If 3 is positive, then 10 is negative
6. 7 is even or 8 is a multiple of 2
7. Yellow is a primary color and 5 is an odd number

You might also like