Applications of Predicate Logic
(述語論理の応用)
Discrete Mathematics I
7th lecture, Nov. 14, 2014
http://www.sw.it.aoyama.ac.jp/2014/Math1/lecture7.html
Martin J. Dürst

© 2005-14 Martin
J. Dürst Aoyama Gakuin
University
Today's Schedule
  - Summary and homework for last lecture
 
  - Applications of predicate logic 
    
      - Examples for various laws
 
      - Quantifiers and variables
 
      - Quantifiers and sums/products
 
    
   
Summary of Last Lecture
  - There are many different kinds of symbolic logic: Propositional logic,
    predicate logic,...
 
  - Predicates take arguments (propositions don't take arguments)
 
  - Predicate logic allows more general inferences than propositional
  logic
 
  - Predicate logic uses universal quantifiers (∀) and existential
    quantifiers (∃)
 
Homework Due October 30, Problem 1
Prove/check the following laws using truth tables:
  - Reductio ad absurdum: A→¬A = ¬A
    
[都合により削除]
   
  - Contraposition: A→B =
    ¬B→¬A
    
[都合により削除]
   
  - The associative law for disjunction:
    (A∨B) ∨ C = A ∨ 
    (B∨C)
    
[都合により削除]
   
  - One of De Morgan's laws:
    ¬(A∧B) = ¬A ∨ ¬B
    
[都合により削除]
   
 
Homework Due October 30, Problem 2
Prove transitivity of implication (((A→B) ∧
(B→C)) ⇒ (A→C)) by formula
manipulation.
Hint: Show that ((A→B) ∧
(B→C)) → (A→C) is a tautology
by simplifying it to T.
For each simplification step, indicate which law you used.
[都合により削除] 
Homework Due November 13, Problem 1
[都合により削除]
Homework Due November 13, Problem 1
[都合により削除]
Homework Due November 13, Problem 2
For ternary (three-valued) logic, create truth tables for conjunction,
disjunction, and negation. The three values are T, F, and ?,
where ? stands for "maybe true, maybe false, we don't
know".
Hint: What's the result of "?∨T"? ? can
be T or F, but in both cases the result will be T, so
?∨T=T.
[都合により削除]
Homework Due November 13, Problem 3
For each of the laws 8-11 of "Laws for Quantifiers", imagine a concrete
example and explain it. For laws 9 and 11, give examples for both why the
implication works one way and why the implication does not work the other
way.
[都合により削除] 
Notation used in Examples
The examples all are about the students taking Discrete Mathematics I.
Predicates and functions used:
age(s): A student's age (fully completed years)
college(s): A student's faculty or college (example: College of
Science and Engineering)
female(s), male(s): Predicates to test a student's
gender.
native(s, k): True if student s is a native
of prefecture k (using "abroad" for students from outside Japan)
 
Homework Due November 13, Problem 3
[都合により削除]
Homework Due November 13, Problem 3
[都合により削除]
Homework Due November 13, Problem 3
[都合により削除] 
The use of Variables with Quantifiers
  - Bound variable:
 
    - Variable quantified by a quantifier
      Example: the x in: (∀x:
      P(x)∧Q(y)) 
  - Free variable:
 
    - Variable not quantified by a quantifier
      Example: the y in: (∀x:
      P(x)∧Q(y)) 
  - Closed formula:
 
    - A formula without free variables.
 
  - Scope:
 
    - The part of a formula where a bound variable (or a quantifier) is
      active.
      All occurrences of a bound variable within its scope can be exchanged by
      another variable.
      Example: ∀s: (age(s)≤30 ∧
      college(s)=SF) ⇒ ∀u: (age(u)≤30
      ∧ college(u)=SF)
      Using a bound variable outside its scope is an error.
      Example: (∀x: P(x))∧Q(x) 
  
Manipulation of Bound Variables
∀s: age(s)≤30) ∧ (∀t:
college(t)=SF) = ∀u: (age(u)≤30 ∧
college(u)=SF
is the same as
∀s: age(s)≤30) ∧ (∀s:
college(s)=SF) = ∀s: (age(s)≤30 ∧
college(s)=SF
There are three different variables s in the last
statement.
  
Relation between Sums/Products and Quantifiers
Sum: ∑∞i=1
1/i2 = 1 + 1/4 + 1/9 + 1/16 + 1/25 + ...
Product: ∏∞i=1
1+1/(-2)i = ...
Universal quantification: (∀i ∈ℕ+:
i>0) = ⋀∞i=1
i>0 = 1>0 ∧2>0 ∧3>0 ∧...
Existential quantification: (∃i ∈ℕ+:
odd(i)) = ⋁∞i=1
odd(i) = odd(1)∨odd(2)∨odd(3)∨...
  
Extension of DeMorgan's Laws
  - ¬∀x: P(x) = ∃x:
    ¬P(x)
    ¬(P(x1)∧P(x2)∧P(x3)∧P(x4)∧...)
    =
    =
    (¬P(x1)∨¬P(x2)∨¬P(x3)∨¬P(x4)∨...) 
  - ¬∃x: P(x) = ∀x:
    ¬P(x)
    ¬(P(x1)∨P(x2)∨P(x3)∨P(x4)∨...)
    =
    =
    (¬P(x1)∧¬P(x2)∧¬P(x3)∧¬P(x4)∧...) 
 
Combination of Quantifiers
(∃y: ∀x: P(x, y)) →
(∀x: ∃y: P(x, y))
(∀x: ∃y: P(x, y)) ↛
(∃y: ∀x: P(x, y))
The number of prime numbers is infinite.
(This means that whatever big number x we choose, there will
always be a bigger prime number y.)
∀x: ∃y: (y > x ∧
prime(y))
Reversing the order of the quantifiers changes the meaning:
∃y: ∀x: (y > x ∧
prime(y))
(There is a prime number y that is bigger than any (natural
number) x. This statement is obviously false.)
 
Proof that the Number of Prime Numbers is Infinite
 
Knowledge about Field of Application
  - Propositional logic does not nead application knowledge except for the
    truth value of each proposition.
 
  - Predicate logic combines axioms/theorems/knowledge of logic with the
    axioms/theorems/knowledge of one or more application areas.
 
  - Example: Predicate logic on natural numbers: Peano axioms,...
 
  - Example: Predicate logic for sets: Laws for operations on sets,...
 
  - Example: Size of sets: Knowledge about set operations and arithmetic with
    natural numbers
 
  - Concrete example: 
    
∀s: (male(s) ∨ female(s))
    ∀s: ¬(male(s) ∧ female(s))
    ∀s∈S: (∃k∈K:
    from(s, k) ∧(∀h∈K:
    h=k ∨¬from(s, h)))
   
 
This Week's Homework
Deadline: November 20, 2014 (Thursday), 19:00.
Format: A4 single page (using both sides is okay; NO cover
page), easily readable handwriting (NO printouts), name (kanji
and kana) and student number at the top right
Where to submit: Box in front of room O-529 (building O, 5th floor)
Using your high school books/materials or other sources, research the
following terms related to sets, and write a definition and short explanation
for each of them:
  - Set
 
  - Element
 
  - Set union
 
  - Set intersection
 
  - Set difference
 
  - Subset
 
  - Proper subset
 
  - Empty set
 
  - Power set
 
(高校の本・資料や他の情報を活用して、上記の集合に関連する概念を調査し、定義と簡単な説明を書きなさい。)
Glossary
  - College of Science and Engineering
 
    - 理工学部
 
  - native of ...
 
    - ...出身
 
  - bound variable
 
    - 束縛変数
 
  - free variable
 
    - 自由変数
 
  - closed formula
 
    - 閉論理式
 
  - scope
 
    - 作用領域、スコープ
 
  - sum
 
    - 総和
 
  - product
 
    - 総積
 
  - prime number
 
    - 素数
 
  - infinite
 
    - 無限 (な)
 
  - set
 
    - 集合
 
  - element
 
    - 元、要素
 
  - (set) union
 
    - 和集合
 
  - (set) intersection
 
    - 積集合
 
  - (set) difference
 
    - 差集合
 
  - subset
 
    - 部分集合
 
  - proper subset
 
    - 真 (しん) の部分集合
 
  - empty set
 
    - 空 (くう) 集合
 
  - power set
 
    - べき (冪) 集合