Propositional and predicate logic - PowerPoint PPT Presentation

Slide1 l.jpg
Download
1 / 52

  • 249 Views
  • Updated On :
  • Presentation posted in: Pets / Animals

Propositional and predicate logic Propositional and predicate logic At the end of this lecture you should be able to: distinguish between propositions and predicates ; utilize and construct truth tables for a number of logical connectives ;

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

Download Presentation

Propositional and predicate logic

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Slide1 l.jpg

Propositional and predicate logic


Slide2 l.jpg

Propositional and predicate logic

At the end of this lecture you should be able to:

  • distinguish between propositions and predicates;

  • utilize and construct truth tables for a number of logical connectives;

  • determine whether two expressions are logically equivalent;

  • explain the difference between bound and unbound variables;

  • bind variables by substitution and by quantification.


Slide3 l.jpg

Propositions

In classical logic, propositions are statements that are either TRUE or FALSE…..


Slide4 l.jpg

There are seven days in a week


Slide5 l.jpg

2 + 4 = 6


Slide6 l.jpg

London is the capital of France.


Slide7 l.jpg

The food at UEL tastes nice.


Slide8 l.jpg

Put 10 into X


Slide9 l.jpg

Using Symbols..


Slide10 l.jpg

In mathematics we often represent a proposition symbolically by a variable name such as Por Q.

P: I go shopping on Wednesdays

Q :102.001 > 101.31


Slide11 l.jpg

Logical connectives..


Slide12 l.jpg

Negation

Negation is represented by the symbol ¬

if P is a proposition,

then not P is represented by: ¬P


Slide13 l.jpg

I like dogs

P


Slide14 l.jpg

I do notlike dogs

¬P


Slide15 l.jpg

Connectives can be defined by truth tables….


Slide16 l.jpg

P

¬P

T

F

F

T


Slide17 l.jpg

The andoperator

And is represented by the symbol 


Slide18 l.jpg

I like shopping

P


Slide19 l.jpg

The sun is shining

Q


Slide20 l.jpg

I like shopping and the sun is shining

PQ


Slide21 l.jpg

The truth table for 'and'

P

Q

P Q

T

T

T

T

F

F

F

T

F

F

F

F


Slide22 l.jpg

The oroperator

The or operator is represented by the symbol 


Slide23 l.jpg

It is raining

P


Slide24 l.jpg

Today is Tuesday

Q


Slide25 l.jpg

It is raining or today is Tuesday

PQ


Slide26 l.jpg

The truth table for ‘or'

P

Q

P Q

T

T

T

T

F

T

F

T

T

F

F

F


Slide27 l.jpg

The implicationoperator

Implication is represented by the symbol 


Slide28 l.jpg

It is Wednesday

P


Slide29 l.jpg

I do the ironing

Q


Slide30 l.jpg

If it is WednesdayI do the ironing

PQ


Slide31 l.jpg

The truth table for implication

P

Q

P  Q

T

T

T

T

F

F

F

T

T

F

F

T


Slide32 l.jpg

The equivalence operator

Equivalence is represented by the symbol .


Slide33 l.jpg

I’ve passed my exam

P


Slide34 l.jpg

I’ve passed my coursework

Q


Slide35 l.jpg

I’ve passed my module

M


Slide36 l.jpg

I will pass my module if and only if I pass my exam and my coursework.

M

(PQ)


Slide37 l.jpg

The truth table for equivalence

P

Q

P  Q

T

T

T

T

F

F

F

T

F

F

F

T


Slide38 l.jpg

Compound statements

P : Physics is easy

Q : Chemistry is interesting

¬PQ

“Physics is not easy and chemistry is interesting”


Slide39 l.jpg

Compound statements

P : Physics is easy

Q : Chemistry is interesting

¬(PQ)

“It is not true both that physics is easy and that chemistry is interesting.”


Slide40 l.jpg

Logical equivalence

Two compound propositions are said to be logically equivalent if identical results are obtained from constructing their truth tables;

This is denoted by the symbol .

For example

¬ ¬P P

P

¬P

¬¬P

T

F

T

F

T

F


Slide41 l.jpg

T

T

T

F

F

T

F

F

Logical equivalence : a demonstration

(P  Q)P Q

P

Q

P  Q

(P  Q)

P

Q

P Q

T

F

F

F

F

F

T

F

T

T

F

T

T

F

T

F

T

T

T

T


Slide42 l.jpg

T

F

Tautologies

A statement which is always true (that is, all the rows of the truth table evaluate totrue) is called a tautology.

For example, the following statement is a tautology:

P P

This can be seen from the truth table:

P

¬P

P P

F

T

T

T


Slide43 l.jpg

T

F

Contradictions

A statement which is always false (i.e. all rows of the truth table evaluate tofalse) is called a contradiction.

For example, the following statement is a contradiction:

P P

Again, this can be seen from the truth table:

P

¬P

P P

F

F

T

F


Slide44 l.jpg

Sets

A set is any well-defined, unordered, collection of objects;

For example we could refer to:

  • the set containing all the people who work in a particular office;

  • the set of whole numbers from 1 to 10;

  • the set of the days of the week;

  • the set of all the breeds of cat in the world.


Slide45 l.jpg

Representing sets

A = {s, d, f, h, k }B = {a, b, c, d, e, f}

the symbol  means "is an element of".

the statement "d is an element of A" is written: dA

the statement "p is not an element of A" is written: pA

Predicatelogicis a powerful way for us to reason about sets.


Slide46 l.jpg

Predicates

A predicate is a truth valued expression containing free variables;

These allow the expression to be evaluated by giving different values to the variables;

Once the variables are evaluated they are said to be bound.

Examples

C(x):x is a cat

Studies(x,y):x studies y

Prime(n):n is a prime number


Slide47 l.jpg

Binding Variables

There are two ways in which variables in predicates can be given values.

  • By substitution (giving a particular value to the variable)

  • By Quantification


Slide48 l.jpg

Substitution

C( x )

Studies( x , y )

Prime( x )

Simba ):Simba is a cat

Olawale, physics ):Olawale studies physics

3 ):3 is a prime number


Slide49 l.jpg

Quantification

A quantifier is a mechanism for specifying an expression about a set of values;

There are three quantifiers that we can use, each with its own symbol:

The Universal Quantifier,

The Existential Quantifier

The Unique Existential Quantifier !


Slide50 l.jpg

The Universal Quantifier, 

This quantifier enables a predicate to make a statement about all the elements in a particular set.;

For example:

If M(x) is the predicate x chases mice, we could write:

x Cats M(x)

this reads:

For all the x’s which are members of the set Cats, x chases mice

Or

All cats chase mice.


Slide51 l.jpg

The Existential Quantifier 

In this case, a statement is made about whether or not at least one element of a set meets a particular criterion.

For example

if, P(n) is the predicate n is a prime number, we could write:

n P(n)

this reads:

There exists an n in the set of natural numbers such that n is a prime number

or

There exists at least one prime number in the set of natural numbers.


Slide52 l.jpg

The Unique Existential Quantifier !

This quantifier modifies a predicate to make a statement about whether or not precisely one element of a set meets a particular criterion.

For example

If G(x) is the predicate x is green, we could write

!x  Cats  G(x)

this would mean:

There is one and only one cat that is green.


  • Login