Professional Documents
Culture Documents
Final - Logic 0 Set Theory
Final - Logic 0 Set Theory
Logic can include the act of reasoning by humans in order to form thoughts and opinions, as well
as classifications and judgments.
Logic can be defined as:
“The study of truths based completely on the meanings of the terms they contain.”
Logic is a process for making a conclusion and a tool you can use.
•The foundation of a logical argument is its proposition, or statement.
•The proposition is either accurate (true) or not accurate (false).
•Premises are the propositions used to build the argument.
•The argument is then built on premises.
•Then an inference is made from the premises.
•Finally, a conclusion is drawn.
1. Informal logic is what’s typically used in daily reasoning. This is the reasoning and
arguments you make in your personal exchanges with others.
Premises: Nikki saw a black cat on her way to work. At work, Nikki got fired.
Conclusion: Black cats are bad luck.
Explanation: This is a big generalization and can’t be verified.
Premises: There is no evidence that penicillin is bad for you. I use penicillin without
any problems.
Conclusion: Penicillin is safe for everyone.
Explanation: The personal experience here or lack of knowledge isn’t verifiable.
2. Formal logic, you use deductive reasoning and the premises must be true. You follow the premises
to reach a formal conclusion.
Premises: All spiders have eight legs. Black Widows are a type of spider.
Conclusion: Black Widows have eight legs.
Explanation: This argument isn’t controversial.
3.Mathematical logic, you apply formal logic to math. This type of logic is part of the basis for the
logic used in computer sciences. Mathematical logic and symbolic logic are often used
interchangeably.
Statements and Connectives
Symbolic logic studies some parts and relationships of the natural language by representing them
with symbols. The main ingredients of symbolic logic are statements and connectives.
We typically represent simple statements using lower-case letters p, q, r, ...; for example s= Your
bicycle is slick; c= I like its color.
Connectives join simple statements into more complex statements, called compound statements.
The most common connectives and their symbols are:
and/but = ∧; or = ∨; if . . . , then =→ .
If p and q are two simple statements, then the compound statement “p and q” is symbolized by p
∧ q.
The compound statement formed by connecting statements with the word and is called a
conjunction. The symbol for and is ˄.
Let p and q represent the following simple statements:
p: It is after 5 P.M.
q: They are working.
Write each compound statement below in symbolic form:
p ∧ q a. It is after 5 P.M. and p ∧ ~q b. It is after 5 P.M.
they are working they are not working.
Or Statements
Disjunction is a compound statement formed using the inclusive or
represented by the symbol v . Thus, “ p or q or both” is symbolized by p v q.
Here is an example of Translating from English to Symbolic Form:
Let p and q represent the following simple statements:
p: The bill receives majority approval.
q: The bill becomes a law.
Write each compound statement below in symbolic form:
p ∨ q a. The bill receives majority approval or the bill becomes a law.
p ∨ ~q b. The bill receives majority approval or the bill does not become a law.
If-Then Statements
The compound statement “If p, then q is symbolized by p → q.
This is called a __conditional__ statement.
The statement before the → is called the antecedent.
The statement after the → is called the consequent.
Here are examples of writing if-then statements in symbolic form:
Let p and q represent the following simple statements:
p: A person is a father.
q: A person is a male.
Write each compound statement below in symbolic form:
p → q a. If a person is a father, then that person is a male.
Both the conditional and converse statements must be true to produce a biconditional
statement:
•Conditional: If I have a triangle, then my polygon has only three sides. (true)
•Converse: If my polygon has only three sides, then I have a triangle. (true)
Since both statements are true, we can write two biconditional statements:
1.I have a triangle if and only if my polygon has only three sides. (true)
2.My polygon has only three sides if and only if I have a triangle. (true)
Read as equivalent
2. Express symbolic statements with and without parentheses in English.
b. q ∧ (~p → ~r)
A student studies, and if the student does not miss lecture, then the student does
not fail.
Let p, q, and r represent the following simple statements.
p: I fail the course.
q: I study hard.
r: I pass the final.
a. I do not fail the course if and only if I study hard and I pass the final.
~p ↔ (q ∧ r )
b. I do not fail the course if and only if I study hard, and I pass the final.
(~p ↔ q) ∧ r
Write each compound statement below in symbolic form:
I do not fail the course if and only if I study hard and I pass the final.
p: I fail the course.
q: I study hard.
r: I pass the final.
I do not fail the course iff I study hard, and I pass the final.
In this statement, the comma indicates the grouping, so it is not necessary to apply the
dominance of connectives. The symbolic form of the statement is (~p ↔ q) ∧ r .
January 19,2021
Biconditional statements are conditional statements that are true if the statement is still true when
the antecedent and consequent are reversed.
The compound statement “p if and only if q” (abbreviated as iff ) is symbolized by p ↔ q.
Conditional: Converse:
Biconditionals:
A person is unmarried male if and only if that person is a bachelor.
A person is a bachelor if and only if that person is an unmarried male.
Determine the proposition. LOGICAL OPERATORS
Using the sentence variables (p, q, and r) and the logic symbols (~, ^, and v ), rewrite the following symbolically.
e. I can study hard, or I can go to parties, but I cannot study hard and go to parties.
(p q) ~(p q)
Truth Values and Truth Tables
Every logical statement, simple or compound, is either true or false. We say that the truth value
of a statement is true (represented by the letter T) when the statement is true, and false
(represented by the letter F) when the statement is false.
Example.
If p is I play the piano is false, and q is I study logic is true, then the conjunction p ∧ q is
I play the piano and study logic is a false statement. A truth table summarizes all possible
truth values of a statement.
The truth table for the negation, whose
truth values are always the opposite as those
of the original statement:
p ~q while the statement p ∨ q (disjunction) is false
only when p and q are both false.
T F
F T p q pvq
T T T
p ∧ q (conjunction) is true only when p and T F T
q are both true. F T T
p q p^q F F F
T T T
T F F
F T F
F F F
Example.
2.
q r ~q (q ^ r) ~ (q ^ r) ~(q ^r) ^~q q v [~(q ^ r) ^~q]
T T F T F F T
T F F F T F T
F T T F T T T
F F T F T T T
Either it brings the tears into their eyes, or else it doesn’t.
p = It brings tears into their eyes
~p = or else it doesn’t
Construct the truth table and find out if this is tautology
(in symbols : p v ~p)
P ~p p v ~p
T F T
F T T
which says that any statement of the form pv ~p is atautology.
Construct the truth table for the statement p v ~(p ^ q) and show that
this statement is a tautology.
T T
T F
Contradictions are statements that are always true
The expression A and ~A is a contradiction.
I don’t believe in reincarnation, but I did in my past life.
Complete the following truth table for the statement p ^ ~(p v q) and show that this
statement is a contradiction.
p q Pvq ~(p v q) P ^ ~ (p v q)
T T
T F
F T
F F
Logical equivalence- two statements are logically equivalent when their truth
tables are identical.
Example: If the price is right, then I will buy this.
The price is not right or I will buy this.
Any two statements of the form p v q are logically equivalent.
p q p ~p q vq
T T T F T T
T F F F F F
F T T T T T
F F T T F T
The third and last columns (set in boldface) are identical, showing that the two
statements have identical truth values regardless of their contents, and thus are
logically equivalent.
Logical equivalence of related conditionals
From the truth table we deduce two important observations:
P q p→q q →p ~p ~q ~p → ~q ~q → ~p
T T T T F F T T
T F F T F T T F
F T T F T F F T
The
F conditionalF p → q and its
T converse qT→ p are not T
logically equivalent.
T T T
Example. The statements If you are Michael Jordans, then you eat Wheaties and
If you eat Wheaties, then you are Michael Jordan do not have the same meaning!
Note. We also observe that the converse q → p and the inverse (¬p) → ¬q are logically
equivalent statements. This should be no surprise since they are the contrapositives of
each other. (See exercise 1.)
Exercises:
1. Determine whether the following pairs of statements are logically equivalent:
(a) p ∨ (p ∧ q) and p.
(b) ¬(p ∨ q) and (¬p) ∨ ¬q.
(c) ¬(p → q) and (¬p) → ¬q.
2.Show that p ∧ (q ∨ r) is logically equivalent to (p ∧ q) ∨ (p ∧ r).