Docsity

Predicate Calculus - Discrete Structures | CMSC 250, Study notes of Discrete Structures and Graph Theory

Toggle sidebar
bg1
Predicate Calculus
• Subject / Predicate
John / went to the store.
The sky / is blue.
• Propositional Logic - uses statements
• Predicate Calculus - uses predicates
– predicates must be applied to a subject in order
to be true or false
• P(x)
– means this predicate represented by P
– applied to the object represented by x
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20

Partial preview of the text

Download Predicate Calculus - Discrete Structures | CMSC 250 and more Study notes Discrete Structures and Graph Theory in PDF only on Docsity!

Predicate Calculus

  • Subject / PredicateJohn / went to the store.The sky / is blue.• Propositional Logic - uses statements• Predicate Calculus - uses predicates
    • predicates must be applied to a subject in order

to be true or false

  • P(x)
    • means this predicate represented by P– applied to the object represented by x

Quantification

-^

x

There exists an x

-^

x

For all x's

----------------------Usually specified from a domain•^

x

Z

There exists an x in the integers

-^

x

R

For all x's in the reals

  • Domain
  • set where these subjects come from

Negation of Quantified Statements ~ (

∃

x

∈

people

such that

H(x))

≡ ∀

x

∈

people

such that

~ H(x)

~(There is a person who is here.)

For all people, each person is not here.same in meaning as "There is no person here."

~ (

∀

x

∈

people

such that

H(x))

≡ ∃

x

∈

people

such that

~ H(x)

~(For all people, each person is here.)

There is at least one person who is not here.

Multiple Predicate Translation

-^

A student of mine is wearing a blue shirt.^ – Domain: all people P– Quantification: There is at least one– Predicates: "wearing a blue shirt" and "is my student"^ ∃

x^

∈

P such that B(x) ^ S(x)

B(x) represents "wearing a blue shirt"S(x) represents "being my student"

-^

All of my students are in class.^ – Domain: all people P– Quantification: All of them– Predicates: "are in class" and "is my student"^ ∀

x^

∈

P such that S(x)

→

C(x)

C(x) represents "being in class"S(x) represents "being my student"

Mixed Multiple Quantification

∀

c

∈

C

∃

b

∈

B, S(b,c)

∀

b

∈

B

∃

c

∈

C, S(b,c)

∃

b

∈

B

∀

c

∈

C, S(b,c)

∃

c

∈

C

∀

b

∈

B, S(b,c)

where

C = {all chairs}

and

B={all bears}

S(b,c)

represents

“b sitting in c"

Negations

of Multiply Quantified Statements•

~(

∀

c

∈

C

∃

b

∈

B, S(b,c))

∃

c

∈

C

∀

b

∈

B, ~S(b,c)

where

C = {all chairs}

and

B = {all bears}

S(b,c)

represents

“b sitting in c"

Other Variations

-^

Exactly one child attends school^ –

c ∈

C

s ∈

S A(c,s)^ ~[

p

C

b

S, p

c ^ A(p,b)]

c ∈

C

s ∈

S, A(c,s)^[

p

C

b

S, p=c v ~ A(p,b)]

Other Variations

-^

Exactly one child attends school^ –

c ∈

C

s ∈

S A(c,s)^ ~[

p

C

b

S, p

c ^ A(p,b)]

c ∈

C

s ∈

S, A(c,s)^[

p

C

b

S, p=c v ~ A(p,b)]

-^

At most 1 child attends school

Other Variations

-^

Exactly one child attends school^ –

c ∈

C

s ∈

S A(c,s)^ ~[

p

C

b

S, p

c ^ A(p,b)]

c ∈

C

s ∈

S, A(c,s)^[

p

C

b

S, p=c v ~ A(p,b)]

-^

At most 1 child attends school^ –

c,p

C

s,b

S, (A(c,s) ^ A(p,b))

c=p

-^

At least 2 children attend school

Other Variations

-^

Exactly one child attends school^ –

c ∈

C

s ∈

S A(c,s)^ ~[

p

C

b

S, p

c ^ A(p,b)]

c ∈

C

s ∈

S, A(c,s)^[

p

C

b

S, p=c v ~ A(p,b)]

-^

At most 1 child attends school^ –

c,p

C

s,b

S, (A(c,s) ^ A(p,b))

c=p

-^

At least 2 children attend school^ –

c,p

C

s,b

S,

A(c,s) ^ A(p,b) ^ p

c

Variants of QuantifiedConditional Statements

Statement:

∀

x

∈

D, P(x)

→

Q(x)

Contrapositive:

∀

x

∈

D, ~Q(x)

→

~P(x)

Converse:

∀

x

∈

D, Q(x)

→

P(x)

Inverse:

∀

x

∈

D, ~P(x)

→

~Q(x)

  • Also applies to Existentially Quantified

Conditional Statements

Euler Diagrams

•^

Circles used to tell "Truth Sets" for the predicate– Where the predicate applied to a object is true

-^

A dot is used to tell a specific instance

-^

If "all" then a completely contained circle

-^

If "some" then an overlapping circle

Some poets are unsuccessful.Some athletes are unsuccessful. ∴

Some poets are athletes.

All college students are brilliant.All brilliant people are scientists. ∴

All college students are scientists.

S

B

C

P

U A

OR

U

P

A

Rules that DON'T existor need more clarification

  • Existential Modus Ponens - Doesn't exist• Existential Modus Tollens - Doesn't exist• Universal Generalization:

P(a)

x

D, P(x)

  • only if a is completely arbitrary in the domain
    • Existential Instantiation:

x

D, P(x)

P(a)

  • only if a is completely arbitrary in the domain

Errors

in Deduction

  • Converse Error ∀

x

∈

D, P(x)

→

Q(x)

Q(a) ∴

P(a)

  • Called: Asserting

the Consequence

  • Inverse Error ∀

x

∈

D, P(x)

→

Q(x)

~P(a) ∴

~Q(a)

  • Called: Denying

the Hypothesis