LiA chp02 en PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 241

Logic in Action

Chapter 2: Propositional Logic

http://www.logicinaction.org/

(http://www.logicinaction.org/) 1 / 41
Reasoning in Daily Life

Example (1)

In a restaurant, your Father has ordered Fish, your


Mother ordered Vegetarian, and you ordered Meat. Out
of the kitchen comes some new person carrying the three
plates. What will happen?

(http://www.logicinaction.org/) 2 / 41
Reasoning in Daily Life

Example (2)

Three guests are sitting at a table. The waitress asks:


“Does everyone want coffee”. The first guest says:
“I don’t know”. The second guest now says: “I don’t
know”. Then the third guest says: “No, not everyone
wants coffee”. The waitress comes back and gives the
right people their coffees. Assuming that at the begin-
ning each guest only knows about himself, which was the
waitress reasoning? Who gets coffee and who does not?

(http://www.logicinaction.org/) 3 / 41
Reasoning in Daily Life

Example (3)

1 · ·
· · 2
· · ·

(http://www.logicinaction.org/) 4 / 41
Reasoning in Daily Life

Example (3)

1 · 3
· · 2
· · ·

(http://www.logicinaction.org/) 4 / 41
Reasoning in Daily Life

Example (3)

1 2 3
· · 2
· · 1

(http://www.logicinaction.org/) 4 / 41
Reasoning in Daily Life

Example (3)

1 2 3
3 · 2
· 3 1

(http://www.logicinaction.org/) 4 / 41
Reasoning in Daily Life

Example (3)

1 2 3
3 1 2
2 3 1

(http://www.logicinaction.org/) 4 / 41
Validity and Inference Patterns

Example (4)

If you take the medication, you will get better.


You are taking the medication.
?
So, you will get better.

(http://www.logicinaction.org/) 5 / 41
Validity and Inference Patterns

Example (4)

If you take the medication, you will get better.

! You are taking the medication.

So, you will get better.

(http://www.logicinaction.org/) 5 / 41
Validity and Inference Patterns

Example (4)

If you take the medication, you will get better.

! You are taking the medication.

So, you will get better.

If you take the medication, you will get better.


You are getting better.
?
So, you took the medication.

(http://www.logicinaction.org/) 5 / 41
Validity and Inference Patterns

Example (4)

If you take the medication, you will get better.

! You are taking the medication.

So, you will get better.

If you take the medication, you will get better.

% You are getting better.

So, you took the medication.

(http://www.logicinaction.org/) 5 / 41
Validity and Inference Patterns

Example (5)

If you take the medication, you will get better.


But you are not taking the medication.
?
So, you will not get better.

(http://www.logicinaction.org/) 6 / 41
Validity and Inference Patterns

Example (5)

If you take the medication, you will get better.

% But you are not taking the medication.

So, you will not get better.

(http://www.logicinaction.org/) 6 / 41
Validity and Inference Patterns

Example (5)

If you take the medication, you will get better.

% But you are not taking the medication.

So, you will not get better.

If you take the medication, you will get better.


But you are not getting better.
?
So, you have not taken the medication.

(http://www.logicinaction.org/) 6 / 41
Validity and Inference Patterns

Example (5)

If you take the medication, you will get better.

% But you are not taking the medication.

So, you will not get better.

If you take the medication, you will get better.

! But you are not getting better.

So, you have not taken the medication.

(http://www.logicinaction.org/) 6 / 41
Validity and Inference Patterns

Valid inference

A1 , . . . , An

(http://www.logicinaction.org/) 7 / 41
Validity and Inference Patterns

Valid inference

A1 , . . . , An

An inference is valid if and only if every time all the premises are
true, the conclusion is also true.

(http://www.logicinaction.org/) 7 / 41
Validity and Inference Patterns

What a valid inference tells us?

Suppose the following inference is valid

A1 , . . . , An

Then

(http://www.logicinaction.org/) 8 / 41
Validity and Inference Patterns

What a valid inference tells us?

Suppose the following inference is valid

A1 , . . . , An

Then
1 if all the premises A1 , . . . , An are true, so is the conclusion C.

(http://www.logicinaction.org/) 8 / 41
Validity and Inference Patterns

What a valid inference tells us?

Suppose the following inference is valid

A1 , . . . , An

Then
1 if all the premises A1 , . . . , An are true, so is the conclusion C.
2 if the conclusion C is false, at least one premise Ai is false.

(http://www.logicinaction.org/) 8 / 41
Validity and Inference Patterns

Looking for patterns (1)

Two valid inferences:

If you take the medication, then you will get better.


You are taking the medication.

So, you will get better.

If you jump from a 4th floor, then you will fly.


You jump from a 4th floor.

So, you will fly.

(http://www.logicinaction.org/) 9 / 41
Validity and Inference Patterns

Looking for patterns (1)

Two valid inferences:

If you take the medication, then you will get better.


You are taking the medication.

So, you will get better.

If you jump from a 4th floor, then you will fly.


You jump from a 4th floor.

So, you will fly.

(http://www.logicinaction.org/) 9 / 41
Validity and Inference Patterns

Looking for patterns (1)

Two valid inferences:

If A, then B.
A.

So, B.

If E, then F .
E.

So, F .

(http://www.logicinaction.org/) 9 / 41
Validity and Inference Patterns

Looking for patterns (2)

Another valid inference:

If you take the medication, then you will get better.


You are not getting better.

So, you are not taking the medication.

(http://www.logicinaction.org/) 10 / 41
Validity and Inference Patterns

Looking for patterns (2)

Another valid inference:

If you take the medication, then you will get better.


You are not getting better.

So, you are not taking the medication.

(http://www.logicinaction.org/) 10 / 41
Validity and Inference Patterns

Looking for patterns (2)

Another valid inference:

If A, then B.
not B.

So, not A.

(http://www.logicinaction.org/) 10 / 41
Validity and Inference Patterns

Looking for patterns (3)

And yet another:

An integer x is even or odd.


If x is even, then x + x is even.
If x is odd, then x + x is even.

So, x + x is even.

(http://www.logicinaction.org/) 11 / 41
Validity and Inference Patterns

Looking for patterns (3)

And yet another:

An integer x is even or odd.


If x is even, then x + x is even.
If x is odd, then x + x is even.

So, x + x is even.

(http://www.logicinaction.org/) 11 / 41
Validity and Inference Patterns

Looking for patterns (3)

And yet another:

An integer x is A1 or A2 .
If x is A1 , then C.
If x is A2 , then C.

So, C.

(http://www.logicinaction.org/) 11 / 41
Validity and Inference Patterns

Looking for patterns (3)

And yet another:

An integer x is A1 or A2 .
If x is A1 , then C.
If x is A2 , then C.

So, C.

Can you think of others?

(http://www.logicinaction.org/) 11 / 41
Validity and Inference Patterns

The main question

How can we recognize valid inference patterns?

(http://www.logicinaction.org/) 12 / 41
Update and Consequence

Example (6)

A1 At least one of them is guilty.


A2 Not all of them are guilty.
A3 If Mrs White is guilty, then Colonel Mustard helped her (he is
guilty too).
A4 If Miss Scarlet is innocent then so is Colonel Mustard.

(http://www.logicinaction.org/) 13 / 41
Update and Consequence

Example (6)

innocent innocent innocent


innocent innocent guilty
innocent guilty innocent
innocent guilty guilty
guilty innocent innocent
guilty innocent guilty
guilty guilty innocent
guilty guilty guilty

(http://www.logicinaction.org/) 14 / 41
Update and Consequence

Example (6)

A1 At least one of them is guilty.


innocent innocent innocent
innocent innocent guilty
innocent guilty innocent
innocent guilty guilty
guilty innocent innocent
guilty innocent guilty
guilty guilty innocent
guilty guilty guilty

(http://www.logicinaction.org/) 14 / 41
Update and Consequence

Example (6)

A1 At least one of them is guilty.


innocent innocent innocent
innocent innocent guilty
innocent guilty innocent
innocent guilty guilty
guilty innocent innocent
guilty innocent guilty
guilty guilty innocent
guilty guilty guilty

(http://www.logicinaction.org/) 14 / 41
Update and Consequence

Example (6)

A1 At least one of them is guilty.


A2 Not all of them are guilty. innocent innocent innocent
innocent innocent guilty
innocent guilty innocent
innocent guilty guilty
guilty innocent innocent
guilty innocent guilty
guilty guilty innocent
guilty guilty guilty

(http://www.logicinaction.org/) 14 / 41
Update and Consequence

Example (6)

A1 At least one of them is guilty.


A2 Not all of them are guilty. innocent innocent innocent
innocent innocent guilty
innocent guilty innocent
innocent guilty guilty
guilty innocent innocent
guilty innocent guilty
guilty guilty innocent
guilty guilty guilty

(http://www.logicinaction.org/) 14 / 41
Update and Consequence

Example (6)

A1 At least one of them is guilty.


A2 Not all of them are guilty. innocent innocent innocent

A3 If Mrs White is guilty, then innocent innocent guilty


Colonel Mustard helped her (he innocent guilty innocent
is guilty too). innocent guilty guilty
guilty innocent innocent
guilty innocent guilty
guilty guilty innocent
guilty guilty guilty

(http://www.logicinaction.org/) 14 / 41
Update and Consequence

Example (6)

A1 At least one of them is guilty.


A2 Not all of them are guilty. innocent innocent innocent

A3 If Mrs White is guilty, then innocent innocent guilty


Colonel Mustard helped her (he innocent guilty innocent
is guilty too). innocent guilty guilty
guilty innocent innocent
guilty innocent guilty
guilty guilty innocent
guilty guilty guilty

(http://www.logicinaction.org/) 14 / 41
Update and Consequence

Example (6)

A1 At least one of them is guilty.


A2 Not all of them are guilty. innocent innocent innocent

A3 If Mrs White is guilty, then innocent innocent guilty


Colonel Mustard helped her (he innocent guilty innocent
is guilty too). innocent guilty guilty
A4 If Miss Scarlet is innocent then guilty innocent innocent
so is Colonel Mustard. guilty innocent guilty
guilty guilty innocent
guilty guilty guilty

(http://www.logicinaction.org/) 14 / 41
Update and Consequence

Example (6)

A1 At least one of them is guilty.


A2 Not all of them are guilty. innocent innocent innocent

A3 If Mrs White is guilty, then innocent innocent guilty


Colonel Mustard helped her (he innocent guilty innocent
is guilty too). innocent guilty guilty
A4 If Miss Scarlet is innocent then guilty innocent innocent
so is Colonel Mustard. guilty innocent guilty
guilty guilty innocent
guilty guilty guilty

(http://www.logicinaction.org/) 14 / 41
Update and Consequence

Example (6)

A1 , A2 , A3 , A4
?
Miss Scarlet is guilty

(http://www.logicinaction.org/) 15 / 41
Update and Consequence

Example (6)

! A1 , A2 , A3 , A4
Miss Scarlet is guilty

(http://www.logicinaction.org/) 15 / 41
Update and Consequence

Example (6)

! A1 , A2 , A3 , A4
Miss Scarlet is guilty

In every situation in which A1 , A2 , A3 and A4 are all true, “Miss


Scarlet is guilty” is true.

(http://www.logicinaction.org/) 15 / 41
Update and Consequence

Example (6)

! A1 , A2 , A3 , A4
Miss Scarlet is guilty

In every situation in which A1 , A2 , A3 and A4 are all true, “Miss


Scarlet is guilty” is true.

A1 , A2 , A3 , A4
?
Mrs White is innocent

(http://www.logicinaction.org/) 15 / 41
Update and Consequence

Example (6)

! A1 , A2 , A3 , A4
Miss Scarlet is guilty

In every situation in which A1 , A2 , A3 and A4 are all true, “Miss


Scarlet is guilty” is true.

! A1 , A2 , A3 , A4
Mrs White is innocent

(http://www.logicinaction.org/) 15 / 41
Update and Consequence

Example (6)

! A1 , A2 , A3 , A4
Miss Scarlet is guilty

In every situation in which A1 , A2 , A3 and A4 are all true, “Miss


Scarlet is guilty” is true.

! A1 , A2 , A3 , A4
Mrs White is innocent

In every situation in which A1 , A2 , A3 and A4 are all true, “Mrs


White is innocent” is true.

(http://www.logicinaction.org/) 15 / 41
Update and Consequence

Example (6)

A1 , A2 , A3 , A4
?
Colonel Mustard is guilty

(http://www.logicinaction.org/) 16 / 41
Update and Consequence

Example (6)

% A1 , A2 , A3 , A4
Colonel Mustard is guilty

(http://www.logicinaction.org/) 16 / 41
Update and Consequence

Example (6)

% A1 , A2 , A3 , A4
Colonel Mustard is guilty

There is a situation in which A1 , A2 , A3 and A4 are all true, but


“Colonel Mustard is guilty” is false (there is a counter-example).

(http://www.logicinaction.org/) 16 / 41
Update and Consequence

Example (6)

% A1 , A2 , A3 , A4
Colonel Mustard is guilty

There is a situation in which A1 , A2 , A3 and A4 are all true, but


“Colonel Mustard is guilty” is false (there is a counter-example).

A1 , A2 , A3 , A4
?
Colonel Mustard is innocent

(http://www.logicinaction.org/) 16 / 41
Update and Consequence

Example (6)

% A1 , A2 , A3 , A4
Colonel Mustard is guilty

There is a situation in which A1 , A2 , A3 and A4 are all true, but


“Colonel Mustard is guilty” is false (there is a counter-example).

% A1 , A2 , A3 , A4
Colonel Mustard is innocent

(http://www.logicinaction.org/) 16 / 41
Update and Consequence

Example (6)

% A1 , A2 , A3 , A4
Colonel Mustard is guilty

There is a situation in which A1 , A2 , A3 and A4 are all true, but


“Colonel Mustard is guilty” is false (there is a counter-example).

% A1 , A2 , A3 , A4
Colonel Mustard is innocent

There is a situation in which A1 , A2 , A3 and A4 are all true, but


“Colonel Mustard is innocent” is false (there is a
counter-example).

(http://www.logicinaction.org/) 16 / 41
The Language of Propositional Logic

Ingredients of the propositional language

(http://www.logicinaction.org/) 17 / 41
The Language of Propositional Logic

Ingredients of the propositional language

1 Basic (atomic) statements (propositions):

p, q, r, . . .

(http://www.logicinaction.org/) 17 / 41
The Language of Propositional Logic

Ingredients of the propositional language

1 Basic (atomic) statements (propositions):

p, q, r, . . .

2 Operators to build more statements:

“not . . . ” becomes ¬...


“. . . and . . .” becomes ...∧...
“. . . or . . .” becomes ...∨...
“if . . . then” becomes . . . → . . .
“ . . . if and only if . . .” becomes . . . ↔ . . .

(http://www.logicinaction.org/) 17 / 41
The Language of Propositional Logic

The propositional language

The language LP is a set of formulas satisfying:

(http://www.logicinaction.org/) 18 / 41
The Language of Propositional Logic

The propositional language

The language LP is a set of formulas satisfying:


1 All the basic propositions are in LP :

p ∈ LP , q ∈ LP , r ∈ LP , ...

(http://www.logicinaction.org/) 18 / 41
The Language of Propositional Logic

The propositional language

The language LP is a set of formulas satisfying:


1 All the basic propositions are in LP :

p ∈ LP , q ∈ LP , r ∈ LP , ...

2 If ϕ ∈ LP and ψ ∈ LP , then

(http://www.logicinaction.org/) 18 / 41
The Language of Propositional Logic

The propositional language

The language LP is a set of formulas satisfying:


1 All the basic propositions are in LP :

p ∈ LP , q ∈ LP , r ∈ LP , ...

2 If ϕ ∈ LP and ψ ∈ LP , then
¬ϕ ∈ LP ,

(http://www.logicinaction.org/) 18 / 41
The Language of Propositional Logic

The propositional language

The language LP is a set of formulas satisfying:


1 All the basic propositions are in LP :

p ∈ LP , q ∈ LP , r ∈ LP , ...

2 If ϕ ∈ LP and ψ ∈ LP , then
¬ϕ ∈ LP , (ϕ ∧ ψ) ∈ LP ,

(http://www.logicinaction.org/) 18 / 41
The Language of Propositional Logic

The propositional language

The language LP is a set of formulas satisfying:


1 All the basic propositions are in LP :

p ∈ LP , q ∈ LP , r ∈ LP , ...

2 If ϕ ∈ LP and ψ ∈ LP , then
¬ϕ ∈ LP , (ϕ ∧ ψ) ∈ LP ,
(ϕ ∨ ψ) ∈ LP ,

(http://www.logicinaction.org/) 18 / 41
The Language of Propositional Logic

The propositional language

The language LP is a set of formulas satisfying:


1 All the basic propositions are in LP :

p ∈ LP , q ∈ LP , r ∈ LP , ...

2 If ϕ ∈ LP and ψ ∈ LP , then
¬ϕ ∈ LP , (ϕ ∧ ψ) ∈ LP , (ϕ → ψ) ∈ LP ,
(ϕ ∨ ψ) ∈ LP ,

(http://www.logicinaction.org/) 18 / 41
The Language of Propositional Logic

The propositional language

The language LP is a set of formulas satisfying:


1 All the basic propositions are in LP :

p ∈ LP , q ∈ LP , r ∈ LP , ...

2 If ϕ ∈ LP and ψ ∈ LP , then
¬ϕ ∈ LP , (ϕ ∧ ψ) ∈ LP , (ϕ → ψ) ∈ LP ,
(ϕ ∨ ψ) ∈ LP , (ϕ ↔ ψ) ∈ LP .

(http://www.logicinaction.org/) 18 / 41
The Language of Propositional Logic

The propositional language

The language LP is a set of formulas satisfying:


1 All the basic propositions are in LP :

p ∈ LP , q ∈ LP , r ∈ LP , ...

2 If ϕ ∈ LP and ψ ∈ LP , then
¬ϕ ∈ LP , (ϕ ∧ ψ) ∈ LP , (ϕ → ψ) ∈ LP ,
(ϕ ∨ ψ) ∈ LP , (ϕ ↔ ψ) ∈ LP .
3 Nothing else is in LP .

(http://www.logicinaction.org/) 18 / 41
The Language of Propositional Logic

The propositional language

The language LP is a set of formulas satisfying:


1 All the basic propositions are in LP :

p ∈ LP , q ∈ LP , r ∈ LP , ...

2 If ϕ ∈ LP and ψ ∈ LP , then
¬ϕ ∈ LP , (ϕ ∧ ψ) ∈ LP , (ϕ → ψ) ∈ LP ,
(ϕ ∨ ψ) ∈ LP , (ϕ ↔ ψ) ∈ LP .
3 Nothing else is in LP .

In practice, we will avoid parenthesis if they are not necessary.

(http://www.logicinaction.org/) 18 / 41
The Language of Propositional Logic

Constructing formulas

The construction of a formula can be seen as building a tree.

(http://www.logicinaction.org/) 19 / 41
The Language of Propositional Logic

Constructing formulas

The construction of a formula can be seen as building a tree.

((¬p ∨ q) → r)

(http://www.logicinaction.org/) 19 / 41
The Language of Propositional Logic

Constructing formulas

The construction of a formula can be seen as building a tree.

((¬p ∨ q) → r)

(http://www.logicinaction.org/) 19 / 41
The Language of Propositional Logic

Constructing formulas

The construction of a formula can be seen as building a tree.

((¬p ∨ q) → r)

(¬p ∨ q) r

(http://www.logicinaction.org/) 19 / 41
The Language of Propositional Logic

Constructing formulas

The construction of a formula can be seen as building a tree.

((¬p ∨ q) → r)

(¬p ∨ q) r

(http://www.logicinaction.org/) 19 / 41
The Language of Propositional Logic

Constructing formulas

The construction of a formula can be seen as building a tree.

((¬p ∨ q) → r)

(¬p ∨ q) r

¬p q

(http://www.logicinaction.org/) 19 / 41
The Language of Propositional Logic

Constructing formulas

The construction of a formula can be seen as building a tree.

((¬p ∨ q) → r)

(¬p ∨ q) r

¬p q

(http://www.logicinaction.org/) 19 / 41
The Language of Propositional Logic

Constructing formulas

The construction of a formula can be seen as building a tree.

((¬p ∨ q) → r)

(¬p ∨ q) r

¬p q

(http://www.logicinaction.org/) 19 / 41
The Language of Propositional Logic

Constructing formulas

The construction of a formula can be seen as building a tree.

((¬p ∨ q) → r) (¬(p ∨ q) → r)

(¬p ∨ q) r

¬p q

(http://www.logicinaction.org/) 19 / 41
The Language of Propositional Logic

Constructing formulas

The construction of a formula can be seen as building a tree.

((¬p ∨ q) → r) (¬(p ∨ q) → r)

→ →

(¬p ∨ q) r

¬p q

(http://www.logicinaction.org/) 19 / 41
The Language of Propositional Logic

Constructing formulas

The construction of a formula can be seen as building a tree.

((¬p ∨ q) → r) (¬(p ∨ q) → r)

→ →

(¬p ∨ q) r ¬(p ∨ q) r

¬p q

(http://www.logicinaction.org/) 19 / 41
The Language of Propositional Logic

Constructing formulas

The construction of a formula can be seen as building a tree.

((¬p ∨ q) → r) (¬(p ∨ q) → r)

→ →

(¬p ∨ q) r ¬(p ∨ q) r

∨ ¬

¬p q

(http://www.logicinaction.org/) 19 / 41
The Language of Propositional Logic

Constructing formulas

The construction of a formula can be seen as building a tree.

((¬p ∨ q) → r) (¬(p ∨ q) → r)

→ →

(¬p ∨ q) r ¬(p ∨ q) r

∨ ¬

¬p q (p ∨ q)

(http://www.logicinaction.org/) 19 / 41
The Language of Propositional Logic

Constructing formulas

The construction of a formula can be seen as building a tree.

((¬p ∨ q) → r) (¬(p ∨ q) → r)

→ →

(¬p ∨ q) r ¬(p ∨ q) r

∨ ¬

¬p q (p ∨ q)

¬ ∨

(http://www.logicinaction.org/) 19 / 41
The Language of Propositional Logic

Constructing formulas

The construction of a formula can be seen as building a tree.

((¬p ∨ q) → r) (¬(p ∨ q) → r)

→ →

(¬p ∨ q) r ¬(p ∨ q) r

∨ ¬

¬p q (p ∨ q)

¬ ∨

p p q

(http://www.logicinaction.org/) 19 / 41
Semantic Situations: Truth Tables

Evaluating formulas

How do we know if a given formula ϕ is true or false?

(http://www.logicinaction.org/) 20 / 41
Semantic Situations: Truth Tables

Evaluating formulas

How do we know if a given formula ϕ is true or false?

We need the truth-values of the basic propositions p, q, r, . . .


that appear in ϕ.

(http://www.logicinaction.org/) 20 / 41
Semantic Situations: Truth Tables

Evaluating formulas

How do we know if a given formula ϕ is true or false?

We need the truth-values of the basic propositions p, q, r, . . .


that appear in ϕ.
We need to know the meaning of ¬, ∧, ∨, → and ↔.

(http://www.logicinaction.org/) 20 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (1)

Use 1 for true, and 0 for false.


For negation ¬

ϕ ¬ϕ

(http://www.logicinaction.org/) 21 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (1)

Use 1 for true, and 0 for false.


For negation ¬

ϕ ¬ϕ
1
0

(http://www.logicinaction.org/) 21 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (1)

Use 1 for true, and 0 for false.


For negation ¬

ϕ ¬ϕ
1 0
0

(http://www.logicinaction.org/) 21 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (1)

Use 1 for true, and 0 for false.


For negation ¬

ϕ ¬ϕ
1 0
0 1

(http://www.logicinaction.org/) 21 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (1)

Use 1 for true, and 0 for false.


For negation ¬

ϕ ¬ϕ
1 0
0 1

or, in a shorter format:

¬ ϕ

(http://www.logicinaction.org/) 21 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (1)

Use 1 for true, and 0 for false.


For negation ¬

ϕ ¬ϕ
1 0
0 1

or, in a shorter format:

¬ ϕ
1
0

(http://www.logicinaction.org/) 21 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (1)

Use 1 for true, and 0 for false.


For negation ¬

ϕ ¬ϕ
1 0
0 1

or, in a shorter format:

¬ ϕ
0 1
0

(http://www.logicinaction.org/) 21 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (1)

Use 1 for true, and 0 for false.


For negation ¬

ϕ ¬ϕ
1 0
0 1

or, in a shorter format:

¬ ϕ
0 1
1 0

(http://www.logicinaction.org/) 21 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (2)


For conjunction ∧

ϕ ∧ ψ

(http://www.logicinaction.org/) 22 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (2)


For conjunction ∧

ϕ ∧ ψ
1 1
1 0
0 1
0 0

(http://www.logicinaction.org/) 22 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (2)


For conjunction ∧

ϕ ∧ ψ
1 1 1
1 0
0 1
0 0

(http://www.logicinaction.org/) 22 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (2)


For conjunction ∧

ϕ ∧ ψ
1 1 1
1 0 0
0 1
0 0

(http://www.logicinaction.org/) 22 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (2)


For conjunction ∧

ϕ ∧ ψ
1 1 1
1 0 0
0 0 1
0 0

(http://www.logicinaction.org/) 22 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (2)


For conjunction ∧

ϕ ∧ ψ
1 1 1
1 0 0
0 0 1
0 0 0

(http://www.logicinaction.org/) 22 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (2)


For conjunction ∧

ϕ ∧ ψ
1 1 1
1 0 0
0 0 1
0 0 0

For disjunction ∨

ϕ ∨ ψ

(http://www.logicinaction.org/) 22 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (2)


For conjunction ∧

ϕ ∧ ψ
1 1 1
1 0 0
0 0 1
0 0 0

For disjunction ∨

ϕ ∨ ψ
1 1
1 0
0 1
0 0

(http://www.logicinaction.org/) 22 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (2)


For conjunction ∧

ϕ ∧ ψ
1 1 1
1 0 0
0 0 1
0 0 0

For disjunction ∨

ϕ ∨ ψ
1 1 1
1 0
0 1
0 0

(http://www.logicinaction.org/) 22 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (2)


For conjunction ∧

ϕ ∧ ψ
1 1 1
1 0 0
0 0 1
0 0 0

For disjunction ∨

ϕ ∨ ψ
1 1 1
1 1 0
0 1
0 0

(http://www.logicinaction.org/) 22 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (2)


For conjunction ∧

ϕ ∧ ψ
1 1 1
1 0 0
0 0 1
0 0 0

For disjunction ∨

ϕ ∨ ψ
1 1 1
1 1 0
0 1 1
0 0

(http://www.logicinaction.org/) 22 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (2)


For conjunction ∧

ϕ ∧ ψ
1 1 1
1 0 0
0 0 1
0 0 0

For disjunction ∨

ϕ ∨ ψ
1 1 1
1 1 0
0 1 1
0 0 0

(http://www.logicinaction.org/) 22 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (3)


For equivalence ↔

ϕ ↔ ψ

(http://www.logicinaction.org/) 23 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (3)


For equivalence ↔

ϕ ↔ ψ
1 1
1 0
0 1
0 0

(http://www.logicinaction.org/) 23 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (3)


For equivalence ↔

ϕ ↔ ψ
1 1 1
1 0
0 1
0 0

(http://www.logicinaction.org/) 23 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (3)


For equivalence ↔

ϕ ↔ ψ
1 1 1
1 0 0
0 1
0 0

(http://www.logicinaction.org/) 23 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (3)


For equivalence ↔

ϕ ↔ ψ
1 1 1
1 0 0
0 0 1
0 0

(http://www.logicinaction.org/) 23 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (3)


For equivalence ↔

ϕ ↔ ψ
1 1 1
1 0 0
0 0 1
0 1 0

(http://www.logicinaction.org/) 23 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (3)


For equivalence ↔

ϕ ↔ ψ
1 1 1
1 0 0
0 0 1
0 1 0

For implication →

ϕ → ψ

(http://www.logicinaction.org/) 23 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (3)


For equivalence ↔

ϕ ↔ ψ
1 1 1
1 0 0
0 0 1
0 1 0

For implication →

ϕ → ψ
1 1
1 0
0 1
0 0

(http://www.logicinaction.org/) 23 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (3)


For equivalence ↔

ϕ ↔ ψ
1 1 1
1 0 0
0 0 1
0 1 0

For implication →

ϕ → ψ
1 1 1
1 0
0 1
0 0

(http://www.logicinaction.org/) 23 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (3)


For equivalence ↔

ϕ ↔ ψ
1 1 1
1 0 0
0 0 1
0 1 0

For implication →

ϕ → ψ
1 1 1
1 0 0
0 1
0 0

(http://www.logicinaction.org/) 23 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (3)


For equivalence ↔

ϕ ↔ ψ
1 1 1
1 0 0
0 0 1
0 1 0

For implication →

ϕ → ψ
1 1 1
1 0 0
0 1 1
0 0

(http://www.logicinaction.org/) 23 / 41
Semantic Situations: Truth Tables

Behaviour of the connectives (3)


For equivalence ↔

ϕ ↔ ψ
1 1 1
1 0 0
0 0 1
0 1 0

For implication →

ϕ → ψ
1 1 1
1 0 0
0 1 1
0 1 0

(http://www.logicinaction.org/) 23 / 41
Semantic Situations: Truth Tables

Valuations

Valuation. Let P = {p, q, r, . . .} be a set of atomic propositions.


A valuation V from P to {0, 1} assigns to each element of P a unique
truth-value.

(http://www.logicinaction.org/) 24 / 41
Semantic Situations: Truth Tables

Valuations

Valuation. Let P = {p, q, r, . . .} be a set of atomic propositions.


A valuation V from P to {0, 1} assigns to each element of P a unique
truth-value.
Example: assume P = {p, q}.

(http://www.logicinaction.org/) 24 / 41
Semantic Situations: Truth Tables

Valuations

Valuation. Let P = {p, q, r, . . .} be a set of atomic propositions.


A valuation V from P to {0, 1} assigns to each element of P a unique
truth-value.
Example: assume P = {p, q}.
There are four different valuations (four different situations):

(http://www.logicinaction.org/) 24 / 41
Semantic Situations: Truth Tables

Valuations

Valuation. Let P = {p, q, r, . . .} be a set of atomic propositions.


A valuation V from P to {0, 1} assigns to each element of P a unique
truth-value.
Example: assume P = {p, q}.
There are four different valuations (four different situations):

V1 (p) = 1 V1 (q) = 1

(http://www.logicinaction.org/) 24 / 41
Semantic Situations: Truth Tables

Valuations

Valuation. Let P = {p, q, r, . . .} be a set of atomic propositions.


A valuation V from P to {0, 1} assigns to each element of P a unique
truth-value.
Example: assume P = {p, q}.
There are four different valuations (four different situations):

V1 (p) = 1 V1 (q) = 1
V2 (p) = 1 V2 (q) = 0

(http://www.logicinaction.org/) 24 / 41
Semantic Situations: Truth Tables

Valuations

Valuation. Let P = {p, q, r, . . .} be a set of atomic propositions.


A valuation V from P to {0, 1} assigns to each element of P a unique
truth-value.
Example: assume P = {p, q}.
There are four different valuations (four different situations):

V1 (p) = 1 V1 (q) = 1
V2 (p) = 1 V2 (q) = 0
V3 (p) = 0 V3 (q) = 1

(http://www.logicinaction.org/) 24 / 41
Semantic Situations: Truth Tables

Valuations

Valuation. Let P = {p, q, r, . . .} be a set of atomic propositions.


A valuation V from P to {0, 1} assigns to each element of P a unique
truth-value.
Example: assume P = {p, q}.
There are four different valuations (four different situations):

V1 (p) = 1 V1 (q) = 1
V2 (p) = 1 V2 (q) = 0
V3 (p) = 0 V3 (q) = 1
V4 (p) = 0 V4 (q) = 0

(http://www.logicinaction.org/) 24 / 41
Semantic Situations: Truth Tables

Valuations

Valuation. Let P = {p, q, r, . . .} be a set of atomic propositions.


A valuation V from P to {0, 1} assigns to each element of P a unique
truth-value.
Example: assume P = {p, q}.
There are four different valuations (four different situations):

V1 (p) = 1 V1 (q) = 1
V2 (p) = 1 V2 (q) = 0
V3 (p) = 0 V3 (q) = 1
V4 (p) = 0 V4 (q) = 0

How many for P = {p}? How many for P = {p, q, r}?

(http://www.logicinaction.org/) 24 / 41
Semantic Situations: Truth Tables

Evaluating formulas in one situation

(¬ p) ∧ q

(http://www.logicinaction.org/) 25 / 41
Semantic Situations: Truth Tables

Evaluating formulas in one situation

(¬ p) ∧ q
V: 0 1

(http://www.logicinaction.org/) 25 / 41
Semantic Situations: Truth Tables

Evaluating formulas in one situation

(¬ p) ∧ q
V: 1 0 1

(http://www.logicinaction.org/) 25 / 41
Semantic Situations: Truth Tables

Evaluating formulas in one situation

(¬ p) ∧ q
V: 1 0 1 1

(http://www.logicinaction.org/) 25 / 41
Semantic Situations: Truth Tables

Evaluating formulas in one situation

(¬ p) ∧ q
V |= (¬p) ∧ q
V: 1 0 1 1

(http://www.logicinaction.org/) 25 / 41
Semantic Situations: Truth Tables

Evaluating formulas in one situation

(¬ p) ∧ q
V |= (¬p) ∧ q
V: 1 0 1 1

(p ∧ (p → q)) → q

(http://www.logicinaction.org/) 25 / 41
Semantic Situations: Truth Tables

Evaluating formulas in one situation

(¬ p) ∧ q
V |= (¬p) ∧ q
V: 1 0 1 1

(p ∧ (p → q)) → q
V: 1 1 0 0

(http://www.logicinaction.org/) 25 / 41
Semantic Situations: Truth Tables

Evaluating formulas in one situation

(¬ p) ∧ q
V |= (¬p) ∧ q
V: 1 0 1 1

(p ∧ (p → q)) → q
V: 1 1 0 0 0

(http://www.logicinaction.org/) 25 / 41
Semantic Situations: Truth Tables

Evaluating formulas in one situation

(¬ p) ∧ q
V |= (¬p) ∧ q
V: 1 0 1 1

(p ∧ (p → q)) → q
V: 1 0 1 0 0 0

(http://www.logicinaction.org/) 25 / 41
Semantic Situations: Truth Tables

Evaluating formulas in one situation

(¬ p) ∧ q
V |= (¬p) ∧ q
V: 1 0 1 1

(p ∧ (p → q)) → q
V: 1 0 1 0 0 1 0

(http://www.logicinaction.org/) 25 / 41
Semantic Situations: Truth Tables

Evaluating formulas in one situation

(¬ p) ∧ q
V |= (¬p) ∧ q
V: 1 0 1 1

(p ∧ (p → q)) → q
V |= (p ∧ (p → q)) → q
V: 1 0 1 0 0 1 0

(http://www.logicinaction.org/) 25 / 41
Semantic Situations: Truth Tables

Evaluating formulas in one situation

(¬ p) ∧ q
V |= (¬p) ∧ q
V: 1 0 1 1

(p ∧ (p → q)) → q
V |= (p ∧ (p → q)) → q
V: 1 0 1 0 0 1 0

¬ ¬ p

(http://www.logicinaction.org/) 25 / 41
Semantic Situations: Truth Tables

Evaluating formulas in one situation

(¬ p) ∧ q
V |= (¬p) ∧ q
V: 1 0 1 1

(p ∧ (p → q)) → q
V |= (p ∧ (p → q)) → q
V: 1 0 1 0 0 1 0

¬ ¬ p
V: 0

(http://www.logicinaction.org/) 25 / 41
Semantic Situations: Truth Tables

Evaluating formulas in one situation

(¬ p) ∧ q
V |= (¬p) ∧ q
V: 1 0 1 1

(p ∧ (p → q)) → q
V |= (p ∧ (p → q)) → q
V: 1 0 1 0 0 1 0

¬ ¬ p
V: 1 0

(http://www.logicinaction.org/) 25 / 41
Semantic Situations: Truth Tables

Evaluating formulas in one situation

(¬ p) ∧ q
V |= (¬p) ∧ q
V: 1 0 1 1

(p ∧ (p → q)) → q
V |= (p ∧ (p → q)) → q
V: 1 0 1 0 0 1 0

¬ ¬ p
V: 0 1 0

(http://www.logicinaction.org/) 25 / 41
Semantic Situations: Truth Tables

Evaluating formulas in one situation

(¬ p) ∧ q
V |= (¬p) ∧ q
V: 1 0 1 1

(p ∧ (p → q)) → q
V |= (p ∧ (p → q)) → q
V: 1 0 1 0 0 1 0

¬ ¬ p
V 6|= ¬¬p
V: 0 1 0

(http://www.logicinaction.org/) 25 / 41
Semantic Situations: Truth Tables

Evaluating formulas in one situation

(¬ p) ∧ q
V |= (¬p) ∧ q
V: 1 0 1 1

(p ∧ (p → q)) → q
V |= (p ∧ (p → q)) → q
V: 1 0 1 0 0 1 0

¬ ¬ p
V 6|= ¬¬p
V: 0 1 0

(p → q) ∨ (q → p)

(http://www.logicinaction.org/) 25 / 41
Semantic Situations: Truth Tables

Evaluating formulas in one situation

(¬ p) ∧ q
V |= (¬p) ∧ q
V: 1 0 1 1

(p ∧ (p → q)) → q
V |= (p ∧ (p → q)) → q
V: 1 0 1 0 0 1 0

¬ ¬ p
V 6|= ¬¬p
V: 0 1 0

(p → q) ∨ (q → p)
V: 0 1 1 0

(http://www.logicinaction.org/) 25 / 41
Semantic Situations: Truth Tables

Evaluating formulas in one situation

(¬ p) ∧ q
V |= (¬p) ∧ q
V: 1 0 1 1

(p ∧ (p → q)) → q
V |= (p ∧ (p → q)) → q
V: 1 0 1 0 0 1 0

¬ ¬ p
V 6|= ¬¬p
V: 0 1 0

(p → q) ∨ (q → p)
V: 0 1 1 1 0

(http://www.logicinaction.org/) 25 / 41
Semantic Situations: Truth Tables

Evaluating formulas in one situation

(¬ p) ∧ q
V |= (¬p) ∧ q
V: 1 0 1 1

(p ∧ (p → q)) → q
V |= (p ∧ (p → q)) → q
V: 1 0 1 0 0 1 0

¬ ¬ p
V 6|= ¬¬p
V: 0 1 0

(p → q) ∨ (q → p)
V: 0 1 1 1 0 0

(http://www.logicinaction.org/) 25 / 41
Semantic Situations: Truth Tables

Evaluating formulas in one situation

(¬ p) ∧ q
V |= (¬p) ∧ q
V: 1 0 1 1

(p ∧ (p → q)) → q
V |= (p ∧ (p → q)) → q
V: 1 0 1 0 0 1 0

¬ ¬ p
V 6|= ¬¬p
V: 0 1 0

(p → q) ∨ (q → p)
V: 0 1 1 1 1 0 0

(http://www.logicinaction.org/) 25 / 41
Semantic Situations: Truth Tables

Evaluating formulas in one situation

(¬ p) ∧ q
V |= (¬p) ∧ q
V: 1 0 1 1

(p ∧ (p → q)) → q
V |= (p ∧ (p → q)) → q
V: 1 0 1 0 0 1 0

¬ ¬ p
V 6|= ¬¬p
V: 0 1 0

(p → q) ∨ (q → p)
V |= (p → q) ∨ (q → p)
V: 0 1 1 1 1 0 0

(http://www.logicinaction.org/) 25 / 41
Semantic Situations: Truth Tables

Evaluating formulas in all possible situations

(p ∧ (p → q)) → q

(http://www.logicinaction.org/) 26 / 41
Semantic Situations: Truth Tables

Evaluating formulas in all possible situations

(p ∧ (p → q)) → q
1 1 1 1
1 1 0 0
0 0 1 1
0 0 0 0

(http://www.logicinaction.org/) 26 / 41
Semantic Situations: Truth Tables

Evaluating formulas in all possible situations

(p ∧ (p → q)) → q
1 1 1 1 1
1 1 0 0 0
0 0 1 1 1
0 0 1 0 0

(http://www.logicinaction.org/) 26 / 41
Semantic Situations: Truth Tables

Evaluating formulas in all possible situations

(p ∧ (p → q)) → q
1 1 1 1 1 1
1 0 1 0 0 0
0 0 0 1 1 1
0 0 0 1 0 0

(http://www.logicinaction.org/) 26 / 41
Semantic Situations: Truth Tables

Evaluating formulas in all possible situations

(p ∧ (p → q)) → q
1 1 1 1 1 1 1
1 0 1 0 0 1 0
0 0 0 1 1 1 1
0 0 0 1 0 1 0

(http://www.logicinaction.org/) 26 / 41
Semantic Situations: Truth Tables

Evaluating formulas in all possible situations

(p ∧ (p → q)) → q
1 1 1 1 1 1 1
1 0 1 0 0 1 0
0 0 0 1 1 1 1
0 0 0 1 0 1 0

¬ ¬ p

(http://www.logicinaction.org/) 26 / 41
Semantic Situations: Truth Tables

Evaluating formulas in all possible situations

(p ∧ (p → q)) → q
1 1 1 1 1 1 1
1 0 1 0 0 1 0
0 0 0 1 1 1 1
0 0 0 1 0 1 0

¬ ¬ p
1
0

(http://www.logicinaction.org/) 26 / 41
Semantic Situations: Truth Tables

Evaluating formulas in all possible situations

(p ∧ (p → q)) → q
1 1 1 1 1 1 1
1 0 1 0 0 1 0
0 0 0 1 1 1 1
0 0 0 1 0 1 0

¬ ¬ p
0 1
1 0

(http://www.logicinaction.org/) 26 / 41
Semantic Situations: Truth Tables

Evaluating formulas in all possible situations

(p ∧ (p → q)) → q
1 1 1 1 1 1 1
1 0 1 0 0 1 0
0 0 0 1 1 1 1
0 0 0 1 0 1 0

¬ ¬ p
1 0 1
0 1 0

(http://www.logicinaction.org/) 26 / 41
Valid Consequence and Consistency

Classification of formulas according to their behaviour

(http://www.logicinaction.org/) 27 / 41
Valid Consequence and Consistency

Classification of formulas according to their behaviour

Those that are never true (contradiction):

p ∧ (¬p), . . .

(http://www.logicinaction.org/) 27 / 41
Valid Consequence and Consistency

Classification of formulas according to their behaviour

Those that are never true (contradiction):

p ∧ (¬p), . . .

Those that can be true (satisfiable):

(¬p) ∨ q, . . .

(http://www.logicinaction.org/) 27 / 41
Valid Consequence and Consistency

Classification of formulas according to their behaviour

Those that are never true (contradiction):

p ∧ (¬p), . . .

Those that can be true (satisfiable):

(¬p) ∨ q, . . .

Those that are always true (valid, tautology):

(p ∧ (p → q)) → q, . . .

If the formula ϕ is valid, we write |= ϕ

(http://www.logicinaction.org/) 27 / 41
Valid Consequence and Consistency

Valid inference

ϕ1 , . . . , ϕn
Inference:
ψ

(http://www.logicinaction.org/) 28 / 41
Valid Consequence and Consistency

Valid inference

ϕ1 , . . . , ϕn
Inference:
ψ

Valid inference. An inference is valid if and only if every time


(every situation) in which all premises ϕ1 , . . . , ϕn are true, ψ is also
true.

(http://www.logicinaction.org/) 28 / 41
Valid Consequence and Consistency

Valid inference

ϕ1 , . . . , ϕn
Inference:
ψ

Valid inference. An inference is valid if and only if every time


(every situation) in which all premises ϕ1 , . . . , ϕn are true, ψ is also
true.
We also say ψ is a logical consequence of ϕ1 , . . . , ϕn .

(http://www.logicinaction.org/) 28 / 41
Valid Consequence and Consistency

Valid inference

ϕ1 , . . . , ϕn
Inference:
ψ

Valid inference. An inference is valid if and only if every time


(every situation) in which all premises ϕ1 , . . . , ϕn are true, ψ is also
true.
We also say ψ is a logical consequence of ϕ1 , . . . , ϕn .
We will write ϕ1 , . . . , ϕn |= ψ

(http://www.logicinaction.org/) 28 / 41
Valid Consequence and Consistency

Examples

Our previous patterns:

p (p → q) q

(http://www.logicinaction.org/) 29 / 41
Valid Consequence and Consistency

Examples

Our previous patterns:

p (p → q) q
1 1 1 1 1
1 1 0 0 0
0 0 1 1 1
0 0 1 0 0

(http://www.logicinaction.org/) 29 / 41
Valid Consequence and Consistency

Examples

Our previous patterns:

p (p → q) q
→ 1 1 1 1 1
1 1 0 0 0
0 0 1 1 1
0 0 1 0 0

(http://www.logicinaction.org/) 29 / 41
Valid Consequence and Consistency

Examples

Our previous patterns:

p (p → q) q
→ 1 1 1 1 1
1 1 0 0 0
0 0 1 1 1
0 0 1 0 0

¬q (p → q) ¬p

(http://www.logicinaction.org/) 29 / 41
Valid Consequence and Consistency

Examples

Our previous patterns:

p (p → q) q
→ 1 1 1 1 1
1 1 0 0 0
0 0 1 1 1
0 0 1 0 0

¬q (p → q) ¬p
0 1 1 1 0
1 1 0 0 0
0 0 1 1 1
1 0 1 0 1

(http://www.logicinaction.org/) 29 / 41
Valid Consequence and Consistency

Examples

Our previous patterns:

p (p → q) q
→ 1 1 1 1 1
1 1 0 0 0
0 0 1 1 1
0 0 1 0 0

¬q (p → q) ¬p
0 1 1 1 0
1 1 0 0 0
0 0 1 1 1
→ 1 0 1 0 1

(http://www.logicinaction.org/) 29 / 41
Valid Consequence and Consistency

Examples

Our previous patterns:

p (p → q) q
→ 1 1 1 1 1
1 1 0 0 0
0 0 1 1 1
0 0 1 0 0

¬q (p → q) ¬p
0 1 1 1 0
1 1 0 0 0
0 0 1 1 1
→ 1 0 1 0 1

What about the others?


(http://www.logicinaction.org/) 29 / 41
Valid Consequence and Consistency

Further definitions

(http://www.logicinaction.org/) 30 / 41
Valid Consequence and Consistency

Further definitions

Two formulas ϕ and ψ are logically equivalent (ϕ ≡ ψ) if and


only if ϕ |= ψ and ψ |= ϕ.

(http://www.logicinaction.org/) 30 / 41
Valid Consequence and Consistency

Further definitions

Two formulas ϕ and ψ are logically equivalent (ϕ ≡ ψ) if and


only if ϕ |= ψ and ψ |= ϕ.

A set of formulas X is satisfiable if and only if there is one


valuation that makes every formula in X true.

(http://www.logicinaction.org/) 30 / 41
Proof

Symbolic inference

(http://www.logicinaction.org/) 31 / 41
Proof

Symbolic inference

A proof is a finite sequence of formulas where each formula is


either an axiom or else it has been infered from previous formulas
by using an inference rule.

(http://www.logicinaction.org/) 31 / 41
Proof

Symbolic inference

A proof is a finite sequence of formulas where each formula is


either an axiom or else it has been infered from previous formulas
by using an inference rule.
A formula is a theorem if it occurs in a proof.

(http://www.logicinaction.org/) 31 / 41
Proof

Symbolic inference

A proof is a finite sequence of formulas where each formula is


either an axiom or else it has been infered from previous formulas
by using an inference rule.
A formula is a theorem if it occurs in a proof.
A set of axioms and rules is called an axiom system or an
axiomatization.

(http://www.logicinaction.org/) 31 / 41
Proof

Symbolic inference

A proof is a finite sequence of formulas where each formula is


either an axiom or else it has been infered from previous formulas
by using an inference rule.
A formula is a theorem if it occurs in a proof.
A set of axioms and rules is called an axiom system or an
axiomatization.
An axiom system is sound for a logic if every theorem is valid in
the logic.

(http://www.logicinaction.org/) 31 / 41
Proof

Symbolic inference

A proof is a finite sequence of formulas where each formula is


either an axiom or else it has been infered from previous formulas
by using an inference rule.
A formula is a theorem if it occurs in a proof.
A set of axioms and rules is called an axiom system or an
axiomatization.
An axiom system is sound for a logic if every theorem is valid in
the logic.
An axiom system is complete if every valid formula of the logic is
a theorems.

(http://www.logicinaction.org/) 31 / 41
Proof

Proof system

The following axiom system is sound and complete for propositional logic:

(http://www.logicinaction.org/) 32 / 41
Proof

Proof system

The following axiom system is sound and complete for propositional logic:

1 (ϕ → (ψ → ϕ)).

(http://www.logicinaction.org/) 32 / 41
Proof

Proof system

The following axiom system is sound and complete for propositional logic:

1 (ϕ → (ψ → ϕ)).
2 ((ϕ → (ψ → χ)) → ((ϕ → ψ) → (ϕ → χ))).

(http://www.logicinaction.org/) 32 / 41
Proof

Proof system

The following axiom system is sound and complete for propositional logic:

1 (ϕ → (ψ → ϕ)).
2 ((ϕ → (ψ → χ)) → ((ϕ → ψ) → (ϕ → χ))).
3 ((¬ϕ → ¬ψ) → (ψ → ϕ)).

(http://www.logicinaction.org/) 32 / 41
Proof

Proof system

The following axiom system is sound and complete for propositional logic:

1 (ϕ → (ψ → ϕ)).
2 ((ϕ → (ψ → χ)) → ((ϕ → ψ) → (ϕ → χ))).
3 ((¬ϕ → ¬ψ) → (ψ → ϕ)).
4 Modus ponens (MP): from ϕ and ϕ → ψ, infer ψ.

(http://www.logicinaction.org/) 32 / 41
Proof

Example

(http://www.logicinaction.org/) 33 / 41
Proof

Example

1. p → ((q → p) → p) Instance of axiom 1

(http://www.logicinaction.org/) 33 / 41
Proof

Example

1. p → ((q → p) → p) Instance of axiom 1


2. (p → ((q → p) → p)) → ((p → (q → p)) → (p → p)) Instance of axiom 2

(http://www.logicinaction.org/) 33 / 41
Proof

Example

1. p → ((q → p) → p) Instance of axiom 1


2. (p → ((q → p) → p)) → ((p → (q → p)) → (p → p)) Instance of axiom 2
3. (p → (q → p)) → (p → p) MP from steps 1 and 2

(http://www.logicinaction.org/) 33 / 41
Proof

Example

1. p → ((q → p) → p) Instance of axiom 1


2. (p → ((q → p) → p)) → ((p → (q → p)) → (p → p)) Instance of axiom 2
3. (p → (q → p)) → (p → p) MP from steps 1 and 2
4. (p → (q → p) Instance of axiom 1

(http://www.logicinaction.org/) 33 / 41
Proof

Example

1. p → ((q → p) → p) Instance of axiom 1


2. (p → ((q → p) → p)) → ((p → (q → p)) → (p → p)) Instance of axiom 2
3. (p → (q → p)) → (p → p) MP from steps 1 and 2
4. (p → (q → p) Instance of axiom 1
5. p→p MP from steps 4 and 3

(http://www.logicinaction.org/) 33 / 41
Proof

Example

1. p → ((q → p) → p) Instance of axiom 1


2. (p → ((q → p) → p)) → ((p → (q → p)) → (p → p)) Instance of axiom 2
3. (p → (q → p)) → (p → p) MP from steps 1 and 2
4. (p → (q → p) Instance of axiom 1
5. p→p MP from steps 4 and 3

Hence, p → p is a theorem.

(http://www.logicinaction.org/) 33 / 41
Information Update

Example

Mrs White is guilty. w


Miss Scarlet is guilty. s
Colonel Mustard is guilty. m

(http://www.logicinaction.org/) 34 / 41
Information Update

Example

Mrs White is guilty. w


Miss Scarlet is guilty. s
Colonel Mustard is guilty. m

I At least one of them is guilty.


I Not all of them are guilty.
I If Mrs White is guilty, then Colonel Mustard helped
her.
I If Miss Scarlet is innocent then so is Colonel Mus-
tard.

(http://www.logicinaction.org/) 34 / 41
Information Update

Example

Mrs White is guilty. w


Miss Scarlet is guilty. s
Colonel Mustard is guilty. m

I At least one of them is guilty. w∨s∨m


I Not all of them are guilty. ¬(w ∧ s ∧ m)
I If Mrs White is guilty, then Colonel Mustard helped w→m
her.
I If Miss Scarlet is innocent then so is Colonel Mus- ¬s → ¬m
tard.

(http://www.logicinaction.org/) 34 / 41
Information Update

The questions

Define

Φ := {w ∨ s ∨ m, ¬(w ∧ s ∧ m), w → m, ¬s → ¬m}

(http://www.logicinaction.org/) 35 / 41
Information Update

The questions

Define

Φ := {w ∨ s ∨ m, ¬(w ∧ s ∧ m), w → m, ¬s → ¬m}

Φ |= s ?

(http://www.logicinaction.org/) 35 / 41
Information Update

The questions

Define

Φ := {w ∨ s ∨ m, ¬(w ∧ s ∧ m), w → m, ¬s → ¬m}

Φ |= s ?
Φ |= ¬w ?

(http://www.logicinaction.org/) 35 / 41
Information Update

The questions

Define

Φ := {w ∨ s ∨ m, ¬(w ∧ s ∧ m), w → m, ¬s → ¬m}

Φ |= s ?
Φ |= ¬w ?
Φ |= m ?

(http://www.logicinaction.org/) 35 / 41
Information Update

The questions

Define

Φ := {w ∨ s ∨ m, ¬(w ∧ s ∧ m), w → m, ¬s → ¬m}

Φ |= s ?
Φ |= ¬w ?
Φ |= m ?
Φ |= ¬m ?

(http://www.logicinaction.org/) 35 / 41
Information Update

Updates
Which are the possibilities?

(http://www.logicinaction.org/) 36 / 41
Information Update

Updates
Which are the possibilities?

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

(http://www.logicinaction.org/) 36 / 41
Information Update

Updates
Which are the possibilities?

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

Remove cases where the first premise w ∨ s ∨ m is false:

(http://www.logicinaction.org/) 36 / 41
Information Update

Updates
Which are the possibilities?

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

Remove cases where the first premise w ∨ s ∨ m is false:

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

(http://www.logicinaction.org/) 36 / 41
Information Update

Updates
Which are the possibilities?

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

Remove cases where the first premise w ∨ s ∨ m is false:

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

Remove cases where the second premise ¬(w ∧ s ∧ m) is false:

(http://www.logicinaction.org/) 36 / 41
Information Update

Updates
Which are the possibilities?

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

Remove cases where the first premise w ∨ s ∨ m is false:

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

Remove cases where the second premise ¬(w ∧ s ∧ m) is false:

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

(http://www.logicinaction.org/) 36 / 41
Information Update

Updates
Which are the possibilities?

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

Remove cases where the first premise w ∨ s ∨ m is false:

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

Remove cases where the second premise ¬(w ∧ s ∧ m) is false:

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

Remove cases where the third premise w → m is false:

(http://www.logicinaction.org/) 36 / 41
Information Update

Updates
Which are the possibilities?

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

Remove cases where the first premise w ∨ s ∨ m is false:

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

Remove cases where the second premise ¬(w ∧ s ∧ m) is false:

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

Remove cases where the third premise w → m is false:

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

(http://www.logicinaction.org/) 36 / 41
Information Update

Updates
Which are the possibilities?

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

Remove cases where the first premise w ∨ s ∨ m is false:

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

Remove cases where the second premise ¬(w ∧ s ∧ m) is false:

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

Remove cases where the third premise w → m is false:

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

Remove cases where the fourth premise ¬s → ¬m is false:

(http://www.logicinaction.org/) 36 / 41
Information Update

Updates
Which are the possibilities?

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

Remove cases where the first premise w ∨ s ∨ m is false:

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

Remove cases where the second premise ¬(w ∧ s ∧ m) is false:

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

Remove cases where the third premise w → m is false:

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

Remove cases where the fourth premise ¬s → ¬m is false:

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

(http://www.logicinaction.org/) 36 / 41
Information Update

Updates

Only the following possibilities make all premises in Φ true:

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

(http://www.logicinaction.org/) 37 / 41
Information Update

Updates

Only the following possibilities make all premises in Φ true:

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

Φ |= s ?

(http://www.logicinaction.org/) 37 / 41
Information Update

Updates

Only the following possibilities make all premises in Φ true:

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

Φ |= s ? Yes!

(http://www.logicinaction.org/) 37 / 41
Information Update

Updates

Only the following possibilities make all premises in Φ true:

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

Φ |= s ? Yes!
Φ |= ¬w ?

(http://www.logicinaction.org/) 37 / 41
Information Update

Updates

Only the following possibilities make all premises in Φ true:

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

Φ |= s ? Yes!
Φ |= ¬w ? Yes!

(http://www.logicinaction.org/) 37 / 41
Information Update

Updates

Only the following possibilities make all premises in Φ true:

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

Φ |= s ? Yes!
Φ |= ¬w ? Yes!
Φ |= m ?

(http://www.logicinaction.org/) 37 / 41
Information Update

Updates

Only the following possibilities make all premises in Φ true:

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

Φ |= s ? Yes!
Φ |= ¬w ? Yes!
Φ |= m ? No!

(http://www.logicinaction.org/) 37 / 41
Information Update

Updates

Only the following possibilities make all premises in Φ true:

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

Φ |= s ? Yes!
Φ |= ¬w ? Yes!
Φ |= m ? No!
Φ |= ¬m ?

(http://www.logicinaction.org/) 37 / 41
Information Update

Updates

Only the following possibilities make all premises in Φ true:

{} {w} {s} {m} {w, s} {w, m} {s, m} {w, s, m}

Φ |= s ? Yes!
Φ |= ¬w ? Yes!
Φ |= m ? No!
Φ |= ¬m ? No!

(http://www.logicinaction.org/) 37 / 41
Expressiveness

Do we need all that we have?

Decide whether the following formulas are logically equivalent:

(http://www.logicinaction.org/) 38 / 41
Expressiveness

Do we need all that we have?

Decide whether the following formulas are logically equivalent:

ϕ ∧ ψ and ¬(¬ϕ ∨ ¬ψ).

(http://www.logicinaction.org/) 38 / 41
Expressiveness

Do we need all that we have?

Decide whether the following formulas are logically equivalent:

ϕ ∧ ψ and ¬(¬ϕ ∨ ¬ψ).


ϕ → ψ and ¬ϕ ∨ ψ.

(http://www.logicinaction.org/) 38 / 41
Expressiveness

Do we need all that we have?

Decide whether the following formulas are logically equivalent:

ϕ ∧ ψ and ¬(¬ϕ ∨ ¬ψ).


ϕ → ψ and ¬ϕ ∨ ψ.
ϕ ↔ ψ and (ϕ → ψ) ∧ (ψ → ϕ).

(http://www.logicinaction.org/) 38 / 41
Expressiveness

Do we need all that we have?

Decide whether the following formulas are logically equivalent:

ϕ ∧ ψ and ¬(¬ϕ ∨ ¬ψ).


ϕ → ψ and ¬ϕ ∨ ψ.
ϕ ↔ ψ and (ϕ → ψ) ∧ (ψ → ϕ).

What does this tell us?

(http://www.logicinaction.org/) 38 / 41
Expressiveness

Do we need all that we have?

Decide whether the following formulas are logically equivalent:

ϕ ∧ ψ and ¬(¬ϕ ∨ ¬ψ).


ϕ → ψ and ¬ϕ ∨ ψ.
ϕ ↔ ψ and (ϕ → ψ) ∧ (ψ → ϕ).

What does this tell us?


Can you find other set of operators strong enough to define the
rest of them?

(http://www.logicinaction.org/) 38 / 41
Expressiveness

Do we have all that we need? (1)

Consider a single atomic proposition p.

(http://www.logicinaction.org/) 39 / 41
Expressiveness

Do we have all that we need? (1)

Consider a single atomic proposition p.

p
1
0

(http://www.logicinaction.org/) 39 / 41
Expressiveness

Do we have all that we need? (1)

Consider a single atomic proposition p.

p ϕ1
1 1
0 1

(http://www.logicinaction.org/) 39 / 41
Expressiveness

Do we have all that we need? (1)

Consider a single atomic proposition p.

p ϕ1 ϕ2
1 1 1
0 1 0

(http://www.logicinaction.org/) 39 / 41
Expressiveness

Do we have all that we need? (1)

Consider a single atomic proposition p.

p ϕ1 ϕ2 ϕ3
1 1 1 0
0 1 0 1

(http://www.logicinaction.org/) 39 / 41
Expressiveness

Do we have all that we need? (1)

Consider a single atomic proposition p.

p ϕ1 ϕ2 ϕ3 ϕ4
1 1 1 0 0
0 1 0 1 0

(http://www.logicinaction.org/) 39 / 41
Expressiveness

Do we have all that we need? (1)

Consider a single atomic proposition p.

p ϕ1 ϕ2 ϕ3 ϕ4
1 1 1 0 0
0 1 0 1 0

Can we define ϕ1 , ϕ2 , ϕ3 and ϕ4 in our setting?

(http://www.logicinaction.org/) 39 / 41
Expressiveness

Do we have all that we need? (1)

Consider a single atomic proposition p.

p ϕ1 ϕ2 ϕ3 ϕ4
1 1 1 0 0
0 1 0 1 0

Can we define ϕ1 , ϕ2 , ϕ3 and ϕ4 in our setting?


Can we define each ϕi by using only p and our five connectives ¬,
∧, ∨, → and ↔ ?

(http://www.logicinaction.org/) 39 / 41
Expressiveness

Do we have all that we need? (2)

Consider two atomic propositions p and q.

pq

(http://www.logicinaction.org/) 40 / 41
Expressiveness

Do we have all that we need? (2)

Consider two atomic propositions p and q.

pq
1 1
1 0
0 1
0 0

(http://www.logicinaction.org/) 40 / 41
Expressiveness

Do we have all that we need? (2)

Consider two atomic propositions p and q.

pq ϕ1 ϕ2 ϕ3 ϕ4 ϕ5 ϕ6 ϕ7 ϕ8 ϕ9 ϕ10 ϕ11 ϕ12 ϕ13 ϕ14 ϕ15 ϕ16


1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
1 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0
0 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0
0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0

(http://www.logicinaction.org/) 40 / 41
Expressiveness

Do we have all that we need? (2)

Consider two atomic propositions p and q.

pq ϕ1 ϕ2 ϕ3 ϕ4 ϕ5 ϕ6 ϕ7 ϕ8 ϕ9 ϕ10 ϕ11 ϕ12 ϕ13 ϕ14 ϕ15 ϕ16


1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
1 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0
0 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0
0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0

Can we define each ϕi by using only p, q and our five connectives


¬, ∧, ∨, → and ↔?

(http://www.logicinaction.org/) 40 / 41
Expressiveness

Do we have all that we need? (3)

Consider three atomic propositions p, q and r.

pqr

(http://www.logicinaction.org/) 41 / 41
Expressiveness

Do we have all that we need? (3)

Consider three atomic propositions p, q and r.

pqr
1 1 1
1 1 0
1 0 1
1 0 0
0 1 1
0 1 0
0 0 1
0 0 0

(http://www.logicinaction.org/) 41 / 41
Expressiveness

Do we have all that we need? (3)

Consider three atomic propositions p, q and r.

pqr ···
1 1 1
1 1 0
1 0 1
1
0
0
1
0
1 ···
0 1 0
0 0 1
0 0 0

(http://www.logicinaction.org/) 41 / 41
Expressiveness

Do we have all that we need? (3)

Consider three atomic propositions p, q and r.

pqr ···
1 1 1
1 1 0
1 0 1
1
0
0
1
0
1 ···
0 1 0
0 0 1
0 0 0

Can we define each ϕi by using only p, q, r and our five


connectives ¬, ∧, ∨, → and ↔?

(http://www.logicinaction.org/) 41 / 41

You might also like