Predicate Logic and Quantifiers

(述語論理、全称限量子、存在限量子)

Discrete Mathematics I

7th lecture, October 27, 2023

https://www.sw.it.aoyama.ac.jp/2023/Math1/lecture7.html

Martin J. Dürst

AGU

© 2005-23 Martin J. Dürst Aoyama Gakuin University

 

Today's Schedule

 

Schedule for the Next Few Weeks

 

Summary of Last Lecture

 

Leftovers of Last Lecture

Neutral elements, Venn diagrams, laws for sets, limits of sets,...

 

Homework, Problems 1/2

1. Create a set with four elements. If you use the same elements as other students, a deduction of points will be applied.

Example: {cat, cow, crow, camel}

2. Create the powerset of the set you created in problem 1.

Example: {{}, {cat}, {cow}, {crow}, {camel}, {cat, cow}, {cat, crow}, {cat, camel}, {cow, crow}, {cow, camel}, {crow, camel}, {cat, cow, crow}, {cat, cow, camel}, {cat, crow, camel}, {cow, crow, camel}, {cat, cow, crow, camel}}

 

Homework, Problems 3/4

3. For sets A of size zero to six, create a table of the sizes of the powersets (|P(A)|).

[都合により削除]

4. Express the relationship between the size of a set A and the size of its powerset P(A) as a formula.

|P(A)| = 2|A| (the size of the powerset of A is 2 to the power of the size of A)

 

Homework, Problem 5

5. Explain the reason behind the formula in problem 4.

[都合により削除]

 

Homework, Problem 6

6. Create a table that shows, for sets A of size zero to five, and for each n (size of sets in P(A)), the number of such sets.

[都合により削除]

 

Pascal's Triangle

Start with a single 1 in the first row, surrounded by zeroes ((0 ... 0) 1 (0 ... 0)).
Create row by row by adding the number above and to the left and the number above and to the right.

                  1
                1   1
              1   2   1
            1   3   3   1
          1   4   6   4   1
        1   5  10  10   5   1
      1   6  15  20  15   6   1
    1   7  21  35  35  21   7   1
  1   8  28  56  70  56  28   8   1

 

Subsets and Pascal's Triangle

 

Subsets and Combinations

 

Types of Symbolic Logic

 

Limitations of Propositions

With propositions, related statements have to be made separately

Examples:
2 is even. 5 is even.
Today it is sunny. Tomorrow it is sunny. The day after tomorrow, it is sunny.

We can express "If today is sunny, then tomorrow will also be sunny." or "If 2 is even, then 3 is not even".

But we cannot express "If it's sunny on a given day, it's also sunny on the next day." or "If x is even, then x+2 is also even.".

⇒ This problem can be solved using predicates

 

Examples of Predicates

 

Predicate Overview

 

How to Write Predicates

There are two ways to write predicates:

  1. Functional notation:
  2. Operator notation:

 

Formulas Containing Predicates

Using predicates, we can express new things:

Similar to propositions, predicates can be true or false.

But predicates can also be unknown/undefined, for example if they contain variables.

Even if a predicate is undefined (e.g. even(x)),
a formula containing this predicate can have a defined value (true or false)
(e.g. even(y) → even(y+2), or odd(z) → even(z+24))

 

First Order Predicate Logic

 

Universal Quantifier

Example: ∀n∈ℕ: even(n) → even(n+2)

Readings:

General form: ∀x: P (x)

∀ is the A of "for All", inverted.

Readings in Japanese:

 

Examples of Universal Quantifiers

n∈ℕ: n > -1

n∈ℕ: ∀m∈ℕ: n+m = m+n

a∈ℚ: ∀b∈ℕ: a+b = b+a

a∈{T, F}: ∀b∈{T, F}: ab = ba

Let S be the set of all students, B the set of all books, and let read(s, b) denote the fact that student s reads book b.

Then ∀sS: ∀bB: read(s, b) means that all students read all books.

Remark 1: ∀n∈ℕ: ∀m∈ℕ: n+m = m+n can be written as ∀n, m∈ℕ: n+m = m+n

Remark 2: ∀sS: ∀bB: read(s, b) is interpreted as ∀sS: (∀bB: read(s, b))

 

Knowledge about Field of Application

 

Existential Quantifier

Example: ∃n∈ℕ: odd(n)

Readings:

General form: ∃y: P(y)

∃ is the mirrored form of the E in "there Exists".

Readings in Japanese:

 

Structure of Quantifier Expressions

Example: m, n∈ℕ: m > nm2n2

 

More Quantifier Examples

n∈ℕ: n + n + n = 3n

n∈ℕ: n2 = n3

q∈ℝ: q2 < 50q < q3

m, n∈ℕ: 7m + 2n = 2n + 7m

 

Applied Quantifier Examples

S: Set of students

F: Set of foods

like(s, f): Student s likes food f

  1. All students like all foods:
  2. Some students like all foods:
  3. There is a food that all students like:
  4. There is no food that all students like:
  5. Each student dislikes a food:

  

Summary

 

Homework Due November 2

Deadline: November 2, 2023 (Thursday), 18:40.

Format: Handout, easily readable handwriting

Where to submit: Box in front of room O-529 (building O, 5th floor)

Problems: See handout

 

Homework Due November 13: Proofs of Logic Formulæ

Submission: Deadline: November 13 (Monday), 18:40; Place: Box in front of room O-529; format: Single page, A4 (both sides okay, legible handwriting (NO printouts), name (incl. reading) and student number at top right)

Problem 1: Prove/check the following laws using truth tables:

  1. Reductio ad absurdum (A→¬A = ¬A)
  2. Contraposition ((AB)→(¬B→¬A))
  3. The associative law for conjunction
  4. One of De Morgan's laws

Problem 2: Prove transitivity of implication by formula manipulation:

Prove transitivity of implication (((AB) ∧ (BC)) ⇒ (AC)) by formula manipulation. For each step, indicate which law you used.

Hint: Show that ((AB) ∧ (BC)) → (AC) is a tautology by simplifying it to T.

Details: Multiple parallel applications of the same law can be done in one step. Multiple sequential applications of the same law should be separated into different steps. Application of commutativity and associativity laws can be combined in one step.

 

About Returns of Tests and Homeworks

 

Glossary

Mathematical induction
数学的帰納法
Pascal's triangle
パスカルの三角形
combinatorics
組合せ論
combination
組合せ
permutation
順列
repeated combination
重複組合せ
repeated permutation
重複順列
factorial
階乗
predicate logic
述語論理
quantifier
限量子
evaluate
評価する
evaluation
評価
array
配列
symbolic logic
記号論理
multi-valued logic
多値論理
fuzzy logic
ファジィ論理
ambiguity
曖昧さ
first-order predicate logic
一階述語論理
temporal logic
時相論理
binary logic
二値論理
generalization
一般化
argument
引数
undefined
未定
higher-order logic
高階述語論理
universal quantifier
全称限量子 (全称記号)
existential quantifier
存在限量子 (存在記号)