" / / ' ' fal sum " toll om " " absurdum " - - PowerPoint PPT Presentation

fal sum toll om absurdum stand in for propositions
SMART_READER_LITE
LIVE PREVIEW

" / / ' ' fal sum " toll om " " absurdum " - - PowerPoint PPT Presentation

Lecture # 2 Propositional Logic proposition " a declarative sentence that is either " : True ( T / 1) or False ( F / / ) Ip ' ' " / / ' ' fal sum " toll om " " absurdum " ) stand in for propositions


slide-1
SLIDE 1

Lecture#2

Propositional Logic

slide-2
SLIDE 2 "

proposition

" : a declarative sentencethat is either True (T/1)
  • r False ( F/ /

Ip

)

"toll om "/ ' 'falsum ' '

/

"absurdum "
slide-3
SLIDE 3

propositional variables (

e.g. , " p " , "

g

") stand in for propositions , and help us focus on the logic (ratherthanthe propositions themselves) we often prefer to use variables to refer to atomic propositions , which cannot be expressed in terms of simpler propositions .
slide-4
SLIDE 4 we can quality
  • r combine propositions of logical operators
:
  • negation
: T p
  • " not p
"
  • conjunction
: p n q
  • "

p

and of "

ft:c:

::: :::

:::: cinnamon

in order of decreasing precedence

TP n of

slide-5
SLIDE 5

disjunction is the typical programming language

"or " e.g .

def foo ( x , y)

:

if

x so
  • k

y s o

: raise Exception L" no negative uipnts ") exclusive or is often implied up the English "or " e -g . " you can have cake of ice cream for dessert . "
slide-6
SLIDE 6 we use truth tables to show the value of aproposition for all combinations of values taken by its variables . e.g . n p p v q p ⑤ of

¥¥T÷¥F¥±¥¥÷÷¥'

slide-7
SLIDE 7 how

many

rows in a truth table for a proposition of N variables ?

n

e.g . N -
  • Z
e.g N =3

e.g

N
  • 4

zoo

Pq

Pqr_

pqrs_

T

T

l l l l

a¥¥fil:L: :/:L:/:3

.

O l l
  • l
O l
  • l
O
  • O
l l O O l O O O l O O O O ÷
slide-8
SLIDE 8

Applying logic to English propositions

:

p

= " I love cats "
  • f
= "

computer

science is a science " r = " 4 s too " read :

p n of

qt⇒

n p v ng p n ( q v n r)
  • pm p
= Flt ¥f¥¥E⑧

gun of

= T
slide-9
SLIDE 9 A tautology is a proposition that is always true . e.g .

T

p

v - p

( p

n q) v - p v e of A contradiction is a proposition that is always false . e.g .

F / t

p r ep

t (Cpr g)

u r p v - q)
slide-10
SLIDE 10 How to phone ( p n q) v Tp req is a tautology ?

÷fi÷÷¥÷

T

slide-11
SLIDE 11

p →

  • f
is a proportion known as a conditional statement

(aka

. implication) read " if p , then q "

1

a

hypothesis/

↳ndusion/

antecedent

consequent

slide-12
SLIDE 12 caution : the logic conditional statement is NOI

equivalent

to the "if " statement wi

unpinatim programming !

e.g .

if

card {

}#

not a proposition !
slide-13
SLIDE 13 e.g . " if the Ac is on ,then l'll be cold p = the Ac is
  • n

d

q

  • l'll
be cold . "ifkmdmmgenogh€ truth table for p → go

then

I can left this

Pgpfq→ueip

¥1 ¥ IF

we oozed?gw÷q

F

F

T

slide-14
SLIDE 14

If

km

strong enough

then

I can lift this wight l l l

?

I can if this weight only if

km strong enough

.
slide-15
SLIDE 15

many

  • ther ways to
express

conditional in English

. some tricky
  • nes for p → q
: "

p is sufficient for q

" "IaI "

q

is necessary for p " " q unless 7 p "
slide-16
SLIDE 16 can we equus ' '

using just

n , n , V ?

⇒¥¥¥T÷÷

if Tp thenp T

←→

②←

"Ymir

alert

'
  • therwise p
→g is equivalent so p→qI#