LOGIC and SET THEORY Updated (Autosaved) Updated
LOGIC and SET THEORY Updated (Autosaved) Updated
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
• 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
17 is a prime number
5 > 6.
David is left-handed.
EXAMPLES OF NON STATEMENT
• Not all sentences are propositions, however. Questions, exclamations, commands,
nor be denied.
Is mathematics logic?
Hey there!
Do not panic.
it is a triangle
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
in logic since it can be true or false based on the value of x. for instance,
• 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."
The sentence
• is a disjunction.
• EXAMPLE
• 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
• 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.
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.
Problem:
• 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.
• negations,
• conjunctions,
• disjunctions,
• conditionals,
• biconditionals.
Example
by interpreting
evaluate
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
proposition, then
Valuations and Truth Tables
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.
2 variables--4 rows
3 variables--8 rows
2. The number of columns in a truth table depends upon the number of logical connectives in
the statement.
• 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. ~(~b)
b. ~a
c. a
d. None of the above.
12. Which of the following is an open sentence?
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