0% found this document useful (0 votes)
7 views69 pages

LOGIC and SET THEORY Updated (Autosaved) Updated

The document provides an introduction to logic, focusing on the distinction between correct and incorrect arguments, the definition of propositions, and the types of statements including atomic statements and non-statements. It explains logical connectives such as conjunction, disjunction, negation, conditional, and biconditional, along with their truth values and how to construct truth tables. Additionally, it includes exercises and quizzes to assess understanding of the concepts presented.

Uploaded by

usurf86
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views69 pages

LOGIC and SET THEORY Updated (Autosaved) Updated

The document provides an introduction to logic, focusing on the distinction between correct and incorrect arguments, the definition of propositions, and the types of statements including atomic statements and non-statements. It explains logical connectives such as conjunction, disjunction, negation, conditional, and biconditional, along with their truth values and how to construct truth tables. Additionally, it includes exercises and quizzes to assess understanding of the concepts presented.

Uploaded by

usurf86
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 69

LOGIC AND SET

THEORY
Outline
• Logic
• Atomic Statement
• Logic Connectives
INTRODUCTION TO LOGIC
• Logic is the study of the methods and principles used in distinguishing correct
(good) arguments from incorrect (bad) arguments. It is the science of reasoning.

• Logicians are concerned with inference. Their question always is: does the
conclusion follow from the premises assumed?

• If the premises provide adequate grounds for accepting the conclusions, the
reasoning is correct.
INTRODUCTION TO LOGIC CONT’D
• Logic plays a fundamental role in disciplines as philosophy, mathematics and
computer science.
Definition 1.1

• A sentence that is either true or false is called a proposition or Statement.

• Example 1.1: “Mary is awake” is a statement because at any given time either
Mary is awake or Mary is not awake (also known as Mary being asleep), and
Mary cannot be both awake and asleep at the same time.
Example 1.1a

i. Every number is divisible by 2


ii. Every Even number is divisible by 2
ATOMIC STATEMENT
• An atomic statement expresses a single idea. The statement “Mary is awake” that we discussed is an

example of an atomic statement. Let’s look at a few more examples.

Example 1.3: The following sentences are atomic statements:

 17 is a prime number

 George Washington was the first president of the United States.

 5 > 6.

 David is left-handed.
EXAMPLES OF NON STATEMENT
• Not all sentences are propositions, however. Questions, exclamations, commands,

or self-contradictory sentences like the following examples can neither be asserted

nor be denied.

 Is mathematics logic?

 Hey there!

 Do not panic.

 This sentence is false.


EXAMPLES OF NON STATEMENT CONT’D
• Sometimes it is unclear whether a sentence identifies a
proposition. This can be due to factors such as imprecision or
poor sentence structure. Another example is the sentence

it is a triangle

• Is this true or false? It is impossible to know because, unlike the


other words of the sentence, the meaning of the word it is not
determined.
EXAMPLES OF NON STATEMENT CONT’D
• In this sentence, the word it is acting like a variable as in

x + 2 = 5.

• As the value of x is undetermined, the sentence is neither true nor false. However,
if x represents a particular value, we could make a determination.

• For example, if , the sentence is true, and if x = 10, the sentence is false.
LikeConwise, if it refers to a particular object, then it is a triangle would identify a
proposition.
EXAMPLES OF NON STATEMENT CONT’D

• X is even, where x belong to the set of real numbers is not a statement

in logic since it can be true or false based on the value of x. for instance,

given different values of x, x can be even, odd or prime etc.

• This is an example of an open sentence. An open sentence is a sentence


who truth or falsity depends upon the value of one or more variables.
Here the statement can be true or false based on the value of the
variables.
Exercise (Solve the following)
• Determine whether or not the following are statement
In the case of a statement, say if it is true or false, if possible.
1. Every real number is an even number
2. Every Even Integer is an even number
3. If x and y are real numbers and 5x=5y, then x=y
4. Sets  and 
5. Some sets are finite
6. Sets  and  are infinite
7. The derivative of a polynomial of degree 5 is a polynomial of degree 6.
8. Cos(x)=1
9. The integer x is a multiple of 7.
EXAMPLES OF NON STATEMENT CONT’D
• If the integer x is a multiple of 7 then, it is divisible by 7.
• Call me Ishmael.
Logical Connectives
• We use logical connectives to form compound statements. The most
commonly used logical
connectives are “and,” “or,” “if…then,” “if and only if,” and “not.”
Conjunction
• A conjunction is a proposition formed by combining two propositions (called
conjuncts) with the word and.

• If p, q are statements, their conjunction is the statement "p and q."

• It is denoted: p ∧ q

• For example, let p be the statement "I have a dime" and let q be the statement "I
have a nickel.” Then p ∧ q is the statement "I have a dime and I have a nickel."

• In general, in order for any statement of the form “p ∧ q” to be true, both p


and q must be true.
Conjunction Cont’d
• For example, the sentence 17 is a prime number and 0 = 1. Sentence above
uses the logical connective “and.” Since the statement “0 = 1” is false, it
follows that sentence 1 is false. It does not matter that the statement “17 is a
prime number” is true. In fact, “T and F” is always F.

• Examples (Class Discussion)


Disjunction
• A disjunction is a proposition formed by combining two propositions
(called disjuncts) with the word or.

The sentence

the base angles of an isosceles triangle are congruent,

or a square has no right angles

• is a disjunction.

• If p, q are statements, their disjunction is the statement "p or q." It is


denoted:
Disjunction
• For example, let p be the statement "Today is Tuesday" and let q be the
statement "1 + 1 = 2."

• In that case, p  q is the statement

• "Today is Tuesday or 1 + 1 = 2."

• In general, in order for a statement of the form p ∨ q to be true, at least


one of its two parts must be true. The only time a disjunction is false is
when both parts (both “components”) are false.
Disjunction Cont’d
• The statement "Today is Tuesday or 1 + 1 = 2" is TRUE.
Negation
• A negation of a given proposition is a proposition that denies the
truth of the given proposition.

• Negation means you are adding not to the original proposition or


statement.

• If p is a statement, the negation of p is another statement that is


exactly the opposite of p.
p

Negation Cont’d
• A statement p and its negation ~p will always have opposite truth
values; it is impossible to conceive of a situation in which a statement
and its negation will have the same truth value.

• EXAMPLE

Let p be the statement "Today is Saturday." Then ~p is the statement


"Today is not Saturday."
On any given day, if p is true then ~p will be false; if p is false, then ~p
will be true.
Conditional
• The logical connector in a conditional statement is denoted by the symbol

• symbolized by p q, it is an if-then statement in which the proposition P is called the antecedent


(hypothesis), Q the consequent (Conclusion).

• Conditional proposition also means implication.

• An implication is a proposition that claims a given proposition (called the antecedent) entails
another proposition (called the consequent). Implications are also known as conditional
propositions.

• The conditional is defined to be true unless a true hypothesis leads to a false conclusion.
Conditional Cont’d
For example,

If rectangles have four sides, then squares have four sides, is a conditional
proposition.

• Its antecedent (hypothesis) is rectangles have four sides, and its Consequent
(conclusion) is squares have four sides.

• This implication can also be written as rectangles have four sides implies that
squares have four sides,
Conditional Cont’d
• A conditional is meant to make precise the standard language construct “If …, then
…”, but it is having some seemingly counterintuitive properties.

• For example, do you think the statement “if the moon is made of green cheese,
then it is tasty,” is true or false? What about the statement, “if the moon is made
of green cheese, then the Red Sox will win the world series,” is it true or false?

• In fact, both statements are true because the antecedent, “the moon is made of
Conditional Cont’d
• Note, in each case, we are not asking about the truth of the atomic propositions, but
rather the statement as a whole. Moreover, there is no reason the antecedent and
consequent need to be logically connected, which violates our intuition.

Example

• Given: x: Gisele has a math assignment.

y: David owns a car.

Problem: Write x y as a sentence.

• Solution: The conditional x y represents, "If Gisele has a math assignment, then
David owns a car.

biconditional
• A biconditional proposition is the conjunction of two implications formed
by exchanging their antecedents and consequents.

• A biconditional statement is a combination of a conditional statement and


its converse written in the if and only if form.

• A biconditional statement is defined to be true whenever both conditional


parts have the same truth value.
Biconditional Cont’d
Biconditional Cont’d
• Example

x: I am breathing
Given:
y: I am alive
Problem: Write x y as a sentence.
Biconditional Cont’d

Given:

• r: A triangle is isosceles.

• s: A triangle has two congruent (equal) sides.

Problem:

• Is this statement biconditional?


Biconditional Cont’d
• Solution
Propositional form or Statement form
• A propositional form or statement form is a nonempty string
over the proposition (statement) alphabet such that every
propositional variable is a propositional form or statement form.

• a propositional form if p is a propositional form.

• are propositional forms if p and q are


propositional forms.
Propositional form or Statement form Cont’d

• We follow the convention that parentheses can be replaced


with brackets and outermost parenthesis or brackets can be
omitted.

• As with propositions, a propositional form that consists only


of a propositional variable is an atom. Otherwise, it is
compound.
Making Assignment
• Make the following assignments:

• The symbol: = indicates that an assignment has been made. It means that
the propositional form on the right has been assigned to the lowercase
letter on the left. Using these designations, we can write new
propositional forms using p and q.

• The propositional form is


Interpreting Propositional or Statement Forms
Interpreting Propositional or Statement Forms
• Because of this interpretation, name the compound propositional forms as
follows:
Example
• P := The sine function is not one-to-one.
• Q := The square root function is one-to-one.
• R := The absolute value function is not onto.

• The following symbols represent the indicated propositions:


Example Cont’d
Interpreting Propositional or Statement
Forms Cont’d
Interpreting Propositional or Statement
Forms Cont’d
• If the brackets (parenthesis) are removed, the resulting string is

. . It is simpler, but it is not clear how it should be interpreted.

• To eliminate its ambiguity, we introduce an order of connectives as in


algebra. In this way, certain strings without parentheses can be read as
propositional forms.
Order of Connectives
• To interpret a propositional form, read from left to right and use the
following precedence:

propositional forms within parentheses or brackets (innermost first),

• negations,

• conjunctions,

• disjunctions,

• conditionals,

• biconditionals.
Example

• To write the propositional form without parentheses, we begin

by interpreting

• According to the order of operations, the conjunction is next, so we

evaluate

• This is followed by the disjunction, and we have the propositional form.


Valuations and Truth Tables
• Propositions have truth values, but propositional forms do not. This is because every

propositional form represents any one of infinitely many propositions.

• However, once a propositional form is identified with a proposition, there should be a

process by which the truth value of the proposition is associated with the propositional form.

• This is done with a rule v called a valuation. The input of v is a propositional form, and its

output is T or F. Suppose that P is a propositional variable. If P has been assigned a

proposition, then
Valuations and Truth Tables

• For example, if P := 2 + 3 = 5; then , and if P := 2 + 3 =


7; then . If P has not been assigned a proposition, then
can be defined arbitrarily as either T or F. The valuation
of a compound propositional form is defined using truth
tables.
The Basic Rules for Constructing a Truth Table For a Compound Statement

1. The number of rows in the truth table depends upon the number of basic
variables in the compound statement.

• To determine the number of rows required, count the number of basic variables
in the statement, but don't re-count multiple occurrences of a variable.

• The number of rows is given by the formula where is the number of


basic variables.
The Basic Rules for Constructing a Truth
Table For a Compound Statement
 1 variable---2 rows

 2 variables--4 rows

 3 variables--8 rows

 4 variables--16 rows and so forth.


The Basic Rules for Constructing a Truth Table For a Compound Statement

2. The number of columns in a truth table depends upon the number of logical connectives in
the statement.

• The following guidelines are usually reliable.

A. There will be one column for each basic variable; and

• B. To determine the number of other columns, count the number of logical connectives in

the statement; do re-count multiple occurrences of the same connective. The “~” symbol
counts as a logical connective.

• In addition to the columns for each basic variable, there will usually be one column foreach
occurrence of a logical connective.
• 3. The beginning columns are filled in so as to take into account every possible

combination of the basic variables being true or false. Each row represents one of the
possible combinations.

• 4. In order to fill in any other column in the truth table, you must refer to a previous

column or columns.
Quiz 1
1. What are the truth values for this statement?
~p^q

a. {T, F, F, F}
b. {F, T, T, T}
c. {F, F, T, F}
d. None of the above.
2. What are the truth values for this statement? pv~q

A. {T, T, F, T}
B. {F, F, T, F}
C. {F, T, F, F}
D. None of the above.
3. What are the truth values for this statement?
~a b

a. {F, T, T, F}
b. {T, T, T, F}
c. {T, F, T, T}
d. None of the above.
4. What are the truth values for this statement? a ~b

a. {F, T, T, T}
b. {T, F, T, F}
c. {T, T, T, F}
d. None of the above.
5. Choose the word or phrase that best completes this
sentence: The statements in problems 3 and 4 are
____________.

a. Logically equivalent
b. Biconditional
c. Conjunction
d. None of the above.
6. What are the truth values for this
statement? ~q p
a. {F, T, T, T}
b. {T, F, T, F}
c. {T, T, T, F}
d. None of the above.
7. Which statement below is logically equivalent to the
statement in problem 6?

a. p^q
b. pvq
c. p q
d. None of the above.
8. What are the truth values for this statement? ~r ~(r ^ s)

a. {T, T, T, T}
b. {F, F, F, F}
c. {T, T, T, F}
d. None of the above.
9. What are the truth values for this statement? (~q p) (p v q)

a. {F, T, T, T}
b. {T, T, T, F}
c. {T, T, T, T}
d. None of the above.
10. What is the negation of, "Jenny rides the bus"?

a. Jenny does not like to ride the bus.


b. Jenny does not ride the bus.
c. Jenny likes to ride the bus.
d. None of the above.
11. Given: a: A triangle is not a polygon.
b: A square is a rectangle.
Problem: Which of the following is the negation of "A
triangle is not a polygon"?

a. ~(~b)
b. ~a
c. a
d. None of the above.
12. Which of the following is an open sentence?

a. The number 4 is even.


b. The number 8 is odd.
c. The number 5 is even.
d. The number x is odd.
13. Whichof the following sentences is a
conjunction?

a. Jill eats pizza or Sam eats pretzels.


b. Jill eats pizza but not pretzels.
c. Jill eats pizza and Sam eats pretzels.
d. None of the above.
14. Which of the following statements is a conjunction?
a. p+q
b. p^q
c. ~p
d. None of the above.

15. A conjunction is used with which connector?


a. Not
b. Or
c. And
d. None of the above.
16. If a is false and b is true, what is the truth value of ab?
a. True
b. False
c. Not enough information was given.
d. None of the above.

17. Given: r: y is prime.


s: y is even.

• Problem: What is the truth value of r ^ s when y is replaced by 2?


a. True
b. False
c. Not enough information was given.
18. If a is false and b is true, what is the truth value of a v ~b?
a. True
b. False
c. Not enough information was given
d. None of the above.

19 Given: r: y is prime.
s: y is even.
Problem: Which of the following is a true statement when y is replaced by
3?
a. r v ~s
b. r ^ ~s
c. rvs
Example
solution
example
Exercise
Solution

You might also like