Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Mathematical Logic Excercises, Exercises of Mathematical logic

Introduction,Propositional Logic First Order Logic and Model Logic.

Typology: Exercises

2021/2022

Uploaded on 02/11/2022

marylen
marylen 🇺🇸

4.6

(26)

250 documents

1 / 80

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
MATHEMATICAL LOGIC EXERCISE S
Chiara Ghidini and Luciano Serafini
Anno Accademico 2013-2014
We thank Annapaola Marconi for her work in previous editions of this booklet.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50

Partial preview of the text

Download Mathematical Logic Excercises and more Exercises Mathematical logic in PDF only on Docsity!

MATHEMATICAL LOGIC EXERCISES

Chiara Ghidini and Luciano Serafini

Anno Accademico 2013-

We thank Annapaola Marconi for her work in previous editions of this booklet.

Contents

  • 1 Introduction
  • 2 Propositional Logic
    • 2.1 Basic Concepts
    • 2.2 Truth Tables
    • 2.3 Propositional Formalization
      • 2.3.1 Formalizing Simple Sentences
      • 2.3.2 Formalizing Problems
    • 2.4 Normal Form Reduction
  • 3 First Order Logic
    • 3.1 Basic Concepts
    • 3.2 FOL Formalization
  • 4 Modal Logic
    • 4.1 Basic Concepts
    • 4.2 Satisfiability and Validity
    • 4.3 Modal Logic Formalization

Mathematics is the only instructional material that can be presented in an entirely undogmatic way. The Mathematical Intelligencer, v. 5, no. 2, 1983

Chapter 1 MAX DEHN

Introduction

The purpose of this booklet is to give you a number of exercises on proposi- tional, first order and modal logics to complement the topics and exercises covered during the lectures of the course on mathematical logic. The mate- rial presented here is not a direct component of the course but is offered to you as an incentive and a support to understand and master the concepts and exercises presented during the course.

Symbol Difficulty  Trivial  Easy  Medium  Difficult  Very difficult

Propositional Logic

Exercise 2.2.  - Let’s consider the interpretation v where v(p) = F, v(q) = T, v(r) = T. Does v satisfy the following propositional formulas?

  1. (p → ¬q) ∨ ¬(r ∧ q)
  2. (¬p ∨ ¬q) → (p ∨ ¬r)
  3. ¬(¬p → ¬q) ∧ r
  4. ¬(¬p → q ∧ ¬r)

Solution.

v satisfies 1., 3. and 4. v doesn’t satisfy 2.

2.2 Truth Tables

Exercise 2.3.  - Compute the truth table of (F ∨ G) ∧ ¬(F ∧ G).

Solution.

F G F ∨ G F ∧ G ¬(F ∧ G) (F ∨ G) ∧ ¬(F ∧ G) T T T T F F T F T F T T F T T F T T F F F F T F

  • The formula models an exclusive or!

]

2.2 Truth Tables

Exercise 2.4.  - Use the truth tables method to determine whether (p → q) ∨ (p → ¬q) is valid.

Solution.

p q p → q ¬q p → ¬q (p → q) ∨ (p → ¬q) T T T F F T T F F T T T F T T F T T F F T T T T The formula is valid since it is satisfied by every interpretation.

]

Exercise 2.5.  - Use the truth tables method to determine whether (¬p∨q)∧(q → ¬r∧¬p)∧(p∨r) (denoted with ϕ) is satisfiable.

Solution.

p q r ¬p ∨ q ¬r ∧ ¬p q → ¬r ∧ ¬p (p ∨ r) ϕ T T T T F F T F T T F T F F T F T F T F F T T F T F F F F T T F F T T T F F T F F T F T T T F F F F T T F T T T F F F T T T F F There exists an interpretation satisfying ϕ, thus ϕ is satisfiable.

]

2.2 Truth Tables

  • (p → p) → p
  • p → (p → p)
  • p ∨ q → p ∧ q
  • p ∨ (q ∧ r) → (p ∧ r) ∨ q
  • p → (q → p)
  • (p ∧ ¬q) ∨ ¬(p ↔ q)

]

Exercise 2.9.  Use the truth table method to verify whether the following formulas are valid, satisfiable or unsatisfiable:

  • (p → q) ∧ ¬q → ¬p
  • (p → q) → (p → ¬q)
  • (p ∨ q → r) ∨ p ∨ q
  • (p ∨ q) ∧ (p → r ∧ q) ∧ (q → ¬r ∧ p)
  • (p → (q → r)) → ((p → q) → (p → r))
  • (p ∨ q) ∧ (¬q ∧ ¬p)
  • (¬p → q) ∨ ((p ∧ ¬r) ↔ q)
  • (p → q) ∧ (p → ¬q)
  • (p → (q ∨ r)) ∨ (r → ¬p)

]

Propositional Logic

Exercise 2.10.  Use the truth table method to verify whether the following logical consequences and equivalences are correct:

  • (p → q) |= ¬p → ¬q
  • (p → q) ∧ ¬q |= ¬p
  • p → q ∧ r |= (p → q) → r
  • p ∨ (¬q ∧ r) |= q ∨ ¬r → p
  • ¬(p ∧ q) ≡ ¬p ∨ ¬q
  • (p ∨ q) ∧ (¬p → ¬q) ≡ q
  • (p ∧ q) ∨ r ≡ (p → ¬q) → r
  • (p ∨ q) ∧ (¬p → ¬q) ≡ p
  • ((p → q) → q) → q ≡ p → q

2.3 Propositional Formalization

2.3.1 Formalizing Simple Sentences

Exercise 2.11.  - Let’s consider a propositional language where

  • p means “Paola is happy”,
  • q means “Paola paints a picture”,
  • r means “Renzo is happy”.

Formalize the following sentences:

Propositional Logic

Exercise 2.13.  - Let A =“Aldo is Italian” and B =“Bob is English”. Formalize the following sentences:

  1. “Aldo isn’t Italian”
  2. “Aldo is Italian while Bob is English”
  3. “If Aldo is Italian then Bob is not English”
  4. “Aldo is Italian or if Aldo isn’t Italian then Bob is English”
  5. “Either Aldo is Italian and Bob is English, or neither Aldo is Italian nor Bob is English”

Solution.

  1. ¬A
  2. A ∧ B
  3. A → ¬B
  4. A ∨ (¬A → B) logically equivalent to A ∨ B
  5. (A ∧ B) ∨ (¬A ∧ ¬B) logically equivalent to A ↔ B

]

Exercise 2.14.  Angelo, Bruno and Carlo are three students that took the Logic exam. Let’s consider a propositional language where

  • A =“Aldo passed the exam”,
  • B =“Bruno passed the exam”,
  • C =“Carlo passed the exam”.

Formalize the following sentences:

2.3 Propositional Formalization

  1. “Carlo is the only one passing the exam”
  2. “Aldo is the only one not passing the exam”
  3. “Only one, among Aldo, Bruno and Carlo, passed the exam”
  4. “At least one among Aldo, Bruno and Carlo passed”
  5. “At least two among Aldo, Bruno and Carlo passed the exam”
  6. “At most two among Aldo, Bruno and Carlo passed the exam”
  7. “Exactly two, among Aldo, Bruno and Carlo passed the exam”

]

Exercise 2.15.  - Let’s consider a propositional langiage where

  • A =“Angelo comes to the party”,
  • B =“Bruno comes to the party”,
  • C =“Carlo comes to the party”,
  • D =“Davide comes to the party”.

Formalize the following sentences:

  1. “If Davide comes to the party then Bruno and Carlo come too”
  2. “Carlo comes to the party only if Angelo and Bruno do not come”
  3. “Davide comes to the party if and only if Carlo comes and Angelo doesn’t come”
  4. “If Davide comes to the party, then, if Carlo doesn’t come then Angelo comes”
  5. “Carlo comes to the party provided that Davide doesn’t come, but, if Davide comes, then Bruno doesn’t come”

2.3 Propositional Formalization

  1. “If Angelo and Bruno come to the party, then Carlo comes provided that Davide doesn’t come”
  2. “Carlo comes to the party if Bruno and Angelo don’t come, or if Davide comes”
  3. “If Angelo comes to the party then Bruno or Carlo come too, but if Angelo doesn’t come to the party, then Carlo and Davide come”

]

Exercise 2.17.  - Socrate says:

“If I’m guilty, I must be punished; I’m guilty. Thus I must be punished.”

Is the argument logically correct?

Solution. The argument is logically correct: if p means “I’m guilty” and q means “I must be punished”, then: (p → q) ∧ p |= q (modus ponens)

]

Exercise 2.18.  - Socrate says:

“If I’m guilty, I must be punished; I’m not guilty. Thus I must not be punished.”

Is the argument logically correct?

Propositional Logic

Solution. The argument is not logically correct: (p → q) ∧ ¬p 2 ¬q

  • consider for instance v(p) = F and v(q) = T

]

Exercise 2.19.  Socrate says:

“If I’m guilty, I must be punished; I must not be punished. Thus I’m not guilty.”

Is the argument logically correct?

]

Exercise 2.20.  Socrate says:

“If I’m guilty, I must be punished; I must be punished. Thus I’m guilty.”

Is the argument logically correct?

]

Exercise 2.21.  Formalize the following arguments and verify whether they are correct:

  • “If Carlo won the competition, then either Mario came second or Sergio came third. Sergio didn’t come third. Thus, if Mario didn’t come second, then Carlo didn’t win the competition.”