Download Predicate logic

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Nonogram wikipedia , lookup

Fuzzy concept wikipedia , lookup

Axiom of reducibility wikipedia , lookup

Abductive reasoning wikipedia , lookup

Science of Logic wikipedia , lookup

Truth-bearer wikipedia , lookup

Argument wikipedia , lookup

Analytic–synthetic distinction wikipedia , lookup

History of the function concept wikipedia , lookup

Inquiry wikipedia , lookup

Ramism wikipedia , lookup

Foundations of mathematics wikipedia , lookup

Natural deduction wikipedia , lookup

Fuzzy logic wikipedia , lookup

Willard Van Orman Quine wikipedia , lookup

Propositional formula wikipedia , lookup

Lorenzo Peña wikipedia , lookup

Modal logic wikipedia , lookup

First-order logic wikipedia , lookup

Jesús Mosterín wikipedia , lookup

Catuṣkoṭi wikipedia , lookup

Mathematical logic wikipedia , lookup

Curry–Howard correspondence wikipedia , lookup

Propositional calculus wikipedia , lookup

Interpretation (logic) wikipedia , lookup

History of logic wikipedia , lookup

Quantum logic wikipedia , lookup

Laws of Form wikipedia , lookup

Intuitionistic logic wikipedia , lookup

Law of thought wikipedia , lookup

Transcript
Propositional Logic Review
Predicate logic
Predicate Logic Examples
Predicate logic
G. Carl Evans
University of Illinois
Summer 2013
Predicate logic
Propositional Logic Review
Predicate logic
Predicate Logic Examples
Propositional logic
AND, OR, T/F, implies, etc
Equivalence and truth tables
Manipulating propositions
Predicate logic
Propositional Logic Review
Predicate logic
Predicate Logic Examples
Implication
Predicate logic
Propositional Logic Review
Predicate logic
Predicate Logic Examples
Implication
a
b
T
T
F
F
T
F
T
F
a→b
¬a ∨ b
T
F
T
T
a ⇐⇒ b
(¬a ∨ b) ∧ (¬b ∨ a)
T
F
F
T
b
T
F
T
F
Predicate logic
Propositional Logic Review
Predicate logic
Predicate Logic Examples
Today
Be able to incorporate predicates and quantifiers into logical
statements
Be able to manipulate statements with quantifiers
Learn how to prove a universal statement
Predicate logic
Propositional Logic Review
Predicate logic
Predicate Logic Examples
Predicate Logic
Predicate: propositions that have input variables with a range of
values
For some integer x, x > 10
Cars that are read and speeding are likely to be ticketed.
isred(x) ∧ speeding (x) → likely to be ticketed(x)
A person’s mother’s mother is his/her grandmother
For every set of people x, y , z
mother (x, y ) ∧ mother (y , z) → grandmother (x, z)
Predicate logic
Propositional Logic Review
Predicate logic
Predicate Logic Examples
Quantifiers
For some x : ∃x
For all x : ∀x
For exactly one x : ∃!x
Predicate logic
Propositional Logic Review
Predicate logic
Predicate Logic Examples
Binding and Scope
∀x, p(x) → q(x)
Binding: ∀x
Scope: p(x) → q(x)
∃x, x 2 = 0
Binding: ∃x
Scope: x 2 = 0
Predicate logic
Propositional Logic Review
Predicate logic
Predicate Logic Examples
Manipulating quantifiers: Negation
Negation:
¬(∀x, p(x)) ≡ ∃x, ¬p(x)
¬(∃x, p(x)) ≡ ∀x, ¬p(x)
Examples
“Not all dogs are fat” is equivalent to “At least one dog is not
fat.”
“There does not exist one fat dog” is equivalent to “All dogs
are not fat.”
Predicate logic
Propositional Logic Review
Predicate logic
Predicate Logic Examples
Contrapositive
∀x, p(x) → q(x) ≡ ∀x, ¬q(x) → ¬p(x)
Predicate logic
Propositional Logic Review
Predicate logic
Predicate Logic Examples
Quantifiers with two variables
For all integers a and b, a + b ≥ a
Predicate logic
Propositional Logic Review
Predicate logic
Predicate Logic Examples
Quantifiers with two variables
For all integers a and b, a + b ≥ a
∀a ∈ Z, ∀b ∈ Z, a + b ≥ a or ∀a, b ∈ Z, a + b ≥ a
For every real a, there exists an integer b such that a + b ≥ a
Predicate logic
Propositional Logic Review
Predicate logic
Predicate Logic Examples
Quantifiers with two variables
For all integers a and b, a + b ≥ a
∀a ∈ Z, ∀b ∈ Z, a + b ≥ a or ∀a, b ∈ Z, a + b ≥ a
For every real a, there exists an integer b such that a + b ≥ a
∀a ∈ R, ∃b ∈ Z, a + b ≥ a
Predicate logic
Propositional Logic Review
Predicate logic
Predicate Logic Examples
Proving universal statements
Claim: For any integers a and b, if a and b are odd, then ab is also
odd.
Predicate logic
Propositional Logic Review
Predicate logic
Predicate Logic Examples
Proving universal statements
Claim: For any integers a and b, if a and b are odd, then ab is also
odd.
Definition: integer a is odd iff a = 2m + 1 for some integer m
Let a, b ∈ Z s.t. a and b are odd.
Then by definition of odd a = 2m + 1.m ∈ Z and
b = 2n + 1.n ∈ Z So
ab = (2m + 1)(2n + 1) = 4mn + 2m + 2n + 1 = 2(2mn + m + n) + 1
and since m, n ∈ Z it holds that (2mn + m + n) ∈ Z, so
ab = 2k + 1 for some k ∈ Z.
Thus ab is odd by definition of odd. QED
Predicate logic
Propositional Logic Review
Predicate logic
Predicate Logic Examples
Approach to proving universal statements
State the supposition (hypothesis) and define any variables
Expand definitions such as “odd” or “rational” into their
technical meaning (if necessary)
Manipulate expression until claim is verified by a simple
statement
End with “This is what was to be shown.” or “QED” to make
it obvious that the proof is finished.
Tip: work out the proof on scratch paper first, then rewrite it in a
clear, logical order with justification for each step.
Predicate logic
Propositional Logic Review
Predicate logic
Predicate Logic Examples
Claim: For any real k, if k is rational, then k 2 is rational.
Predicate logic
Propositional Logic Review
Predicate logic
Predicate Logic Examples
Claim: For any real k, if k is rational, then k 2 is rational.
Definition: real k is rational iff k = m
n for some integers m, n, with
n 6= 0.
Let k ∈ Q.
By definition of rational k =
m
n
k2 =
for some m, n ∈ Z with n 6= 0.
m 2 m2
= 2
n
n
Since m, n ∈ Z, m2 , n2 ∈ Z and since n 6= 0, n2 6= 0, k 2 is rational
by definition. QED
Predicate logic
Propositional Logic Review
Predicate logic
Predicate Logic Examples
Claim: For all integers n, 4(n2 + n + 1) − 3n2 is a perfect square.
Definition: k is a perfect square iff k = m2 for some integer m.
Let n be an integer.
4(n2 + n + 1) − 3n2 = n2 + 4n + 4 = (n + 2)2
Since n is an integer n + 2 is an integer so by definition of perfect
square 4(n2 + n + 1) − 3n2 is a perfect square. QED
Predicate logic
Propositional Logic Review
Predicate logic
Predicate Logic Examples
Claim: The product of any two rational numbers is a rational
number.
Definition: real k is rational iff k = m
n for some integers m, n, with
n 6= 0.
Let a, b be rational numbers.
By definition of rational a = m
n ,b =
n and k are not 0.
j
k
for some m, n, j, k ∈ Z s.t.
mj
mj
=
nk
nk
Since m, n, j, k are integers mj, nk are integers and since n and k
are not 0 nk 6= 0. Thus by definition of rational ab is rational.
QED
ab =
Predicate logic