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

Intro To Logic Crash Course

The document provides an overview of topics covered on an intro to logic midterm, including translations between propositional and first-order logic, truth tables, normal forms like disjunctive normal form and conjunctive normal form, formal proofs using rules of inference, and basic set theory concepts like membership, subsets, unions, and intersections.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
142 views

Intro To Logic Crash Course

The document provides an overview of topics covered on an intro to logic midterm, including translations between propositional and first-order logic, truth tables, normal forms like disjunctive normal form and conjunctive normal form, formal proofs using rules of inference, and basic set theory concepts like membership, subsets, unions, and intersections.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

Intro to Logic - Midterm Prep

● Translations
● Truth tables
● Normal forms
● Formal proofs
● Set theory

l by Alexandru Babeanu
Translations

Propositional Logic First Order Logic


Objects are part of the predicates. Objects are separated from the
Example: predicates. Example:

A: Anna owes Peter money. anna: Anna


peter: Peter
Predicates are represented by capital OwesMoney(x, y): x owes y money
letters: A, B, P, Q...
Objects are represented by words that
start with a lowercase letter: tom,
scooby, salt...

Predicates are represented by


capitalized words: Likes, Owns,
Costs...
Translations

English Logical Connective


not A ¬A
A
and/but/however/moreover A∧B
/then/because/although/also
B
A or B A∨B
/Either A or B
Neither A nor B ¬(A ∨ B),
/A nor B alternative: ¬A ∧¬B
Translations

English Logical Connective


If A, then B
/ B if A A→B
/ B only if A
/ Only if A, B
B, unless A ¬A → B
/ Unless A, then B
A if and only if B A↔B
/ A just in case B
Common mistakes

Using pronouns instead of object names:

● Peter was at home although he should have been


in school.
● Translation: P ∧ Q
● Key:
○ P: Peter was at home.
○ Q: He should have been in school.
Common mistakes

Using pronouns instead of object names:

● Peter was at home although he should have been


in school.
● Translation: P ∧ Q
● Key:
○ P: Peter was at home.
○ Q: He Peter should have been in school.
Common mistakes

Getting the order of the connectives wrong:

● Neither a nor b are small cubes.


● Translation: ¬(Small(a) ∨ Small(b)) ∧ ¬(Cube(a) ∨
Cube(b))
● Key:
○ a: a
○ b: b
○ Small(x): x is small
○ Cube(x): x is a cube.
Common mistakes

Getting the order of the connectives wrong:

● Neither a nor b are small cubes.


● Translation: ¬((Small(a) ∧ Cube(a))∨ (Small(b) ∧ Cube(b)))
● Key:
○ a: a
○ b: b
○ Small(x): x is small
○ Cube(x): x is a cube
Common mistakes

Exclusive disjunction:
● Scooby is either a cat or a dog.
● Translation:
Dog(scoob) ∨ Cat(scoob) ∧ ¬(Dog(scoob) ∧ Cat(scoob))
● Key:
○ scoob: Scooby
○ Dog(x): x is a dog
○ Cat(x): x is a cat
Common mistakes

Exclusive disjunction:
● Scooby is either a cat or a dog.
● Translation:
● Dog(scoob) ∨ Cat(scoob) ∧ ¬(Dog(scoob) ∧ Cat(scoob))
● Key:
○ scoob: Scooby
○ Dog(x): x is a dog
○ Cat(x): x is a cat
Truth tables
P ¬P
T F

F T

P Q P∧Q P∨Q P→Q P↔Q

T T T T T T

T F F T F F

F T F T T F

F F F F T T
Truth tables

A B C (A ∧ C) ∨ ¬ (B ∧
¬C)
T T T T T T F F
T T F F F F T T
T F T T T T F F
T F F F T T F T
F T T F T T F F
F T F F F F T T
F F T F T T F F
F F F F T T F T
(1) (2) (3) (4) (8) (7) (6) (5)
Tautology

P ∨ ¬P

P P ∨ ¬P
T T F

F T T

(1) (3) (2)

A sentence is a tautology if it is true in all the rows


of its truth table.
Logical truth

a=a ∨ a=b
a=a a=b l a=a ∨ a=b

T T T
T F T
F T T
F F F

A sentence is a logical truth if it is true in all the non-spurious


rows of its truth table. A spurious row is a row that cannot
possibly be true.
TT - possible
A B A∧B A A ∧ ¬A

T T T T F F

T F F T F F

F T F F F T

F F F F F T

A sentence S is TT-possible if and only if in the truth table for


S, there is at least one T in the column under the main
connective of S. A sentence is not TT-possible, also called a
contradiction, if it has F in all the rows under its main
connective.
Logical laws

● commutativity
● distributivity
● associativity
● idempotence
● definability
● law of double negation
● De Morgan
Negation normal form
● All ¬ connectives are applied to atoms only. The sentence
only contains the ¬, ∨ and ∧ connectives.

● In NNF:
■ A
■ ¬A
■ (A ∧ C) ∨ (¬B ∧ ¬C)

● Not in NNF:
■ ¬¬A
■ ¬(A ∧ C)
■ (A ∧ C) ∨ ¬(B ∧ ¬C)
Disjunctive normal form
● The sentence is in DNF if it is a disjunction of
conjunctions of literals. A literal is an atomic
statement or a negated atomic statement.

● In DNF:
■ A∨B
■ ¬A ∧ B
■ (A ∧ C) ∨ (¬B ∧ ¬C)
● Not in DNF:
■ A→B
■ ¬(A ∨ C)
■ A ∧ (B ∨ ¬C)
Conjunctive normal form
● The sentence is in CNF if it is a conjunction of
disjunctions of literals. A literal is an atomic
statement or a negated atomic statement.

● In DNF:
■ A∧B
■ ¬A ∨ B
■ (A ∨ C) ∧ (¬B ∨ ¬C)
● Not in DNF:
■ A→B
■ ¬(A ∧ C)
■ A ∨ (B ∧ ¬C)
Formal proofs

Find the rules at the end of your


book, under “Summary of Rules”.
Formal proofs

Eliminate the premises:


● Get S(b) from S(a) and b=a. Warning: the symmetry
of equality is not implied, you need to prove it.
● Get B from A → B and A ∨ B.
Formal proofs

Introduce the conclusion:


● Get A ∨ B from A.
● Get P → (Q → P) from nothing.
● Get (P ↔Q) ↔((P → Q) ∧ (Q → P)) from nothing.
Formal proofs

Negation Introduction: assume the opposite and prove


you're wrong.
● Get ¬(a=b) from S(a) and ¬S(b).
● Get ¬(P ∧ ¬P) from nothing.
● Get ¬A from A → ⊥.
Formal proofs

Contradiction elimination: when false is true,


everything is true.
● Get B from ¬A ∨ B and A.
● Get ¬(a=a) from P ∧ ¬P.
● Get B from A → ⊥ and A ∨ B.
Formal proofs

Negation elimination: when all else fails.


● Get ¬A ∨ B from A → B.
● Get P ∨ ¬P from nothing.
● Get P from ¬P → ¬(a=a).
Set theory

● a ∈ A - a is an element of set A
● A ⊆ B - A is a subset of or equal to B
● A ⊂ B - A is a subset of B, but A ≠ B
● A ⋃ B - union of A and B, contains all the elements
that are in either A or B
● A ⋂ B - intersection of A and B, contains all the
elements that are both in A and B
● A \ B - set difference of A and B, contains all the
elements that are in A but not in B
Set theory

A = {1, 2, 3}
B = {1, {1}, {1, 2}, 3}

1∈B A∈B
{1} ∈ A A⊆B
{1} ∈ A ⋂ B ∅∈A\A
{1} ⊆ A ∅⊆A
{1} ⊆ B \ A 2∈A⋂B
A⋂B⊆A⋃B ∅ ∈ {∅} ⋃ A

You might also like