Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
● Translations
● Truth tables
● Normal forms
● Formal proofs
● Set theory
l by Alexandru Babeanu
Translations
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
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
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
T T T T F F
T F F T F F
F T F F F T
F F F F F T
● 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
● 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