Propositional Logic Section 1 1 1 Definition n

  • Slides: 22
Download presentation
Propositional Logic Section 1. 1 1

Propositional Logic Section 1. 1 1

Definition n A proposition is a declarative sentence that is either true or false

Definition n A proposition is a declarative sentence that is either true or false but not both nor neither n Any proposition has a truth value {T, F} 2

Examples Statement Today is Friday Prop yes Truth Value F 1+1 = 2 I

Examples Statement Today is Friday Prop yes Truth Value F 1+1 = 2 I know that you hate this course Is that correct? Do not answer quickly I’m a liar X+ 2 = 0 3

Examples Statement Today is Friday 1+1 = 2 I know that you hate this

Examples Statement Today is Friday 1+1 = 2 I know that you hate this course Is that correct? Do not answer quickly I’m a liar X+ 2 = 0 Prop Yes Yes No No Truth Value F T T 4

Proposition Types n A proposition could be either simple or compound. n Simple: without

Proposition Types n A proposition could be either simple or compound. n Simple: without logical operators n Compound: with logical operators (connectives) 5

Logical Operators n Let p & q be propositions, then the following are compound

Logical Operators n Let p & q be propositions, then the following are compound propositions: n Negation of p: p = not p n Conjunction: p q = p AND q n Disjunction: p q = p OR q n Exclusive OR: p q = p XOR q n Implication: p q = if p then q n Biconditional: p q = p iff q 6

Negation p = It is raining n p = It is not raining =

Negation p = It is raining n p = It is not raining = it is not the case that it is raining n n Truth table P T F p F T 7

Conjunction n p = it is Friday n q = it is raining n

Conjunction n p = it is Friday n q = it is raining n p q = it is Friday and it is raining n Truth Table: p T T q T F p q T F F F F 8

Disjunction n p = 1> 0 n q = monkeys can fly n p

Disjunction n p = 1> 0 n q = monkeys can fly n p v q = 1>0 or monkeys can fly n Truth Table: p T T F F q T F pvq T T T F 9

Conditional Statement: Implication n p = I think n q = I exist n

Conditional Statement: Implication n p = I think n q = I exist n p q = if I think then I exist n Truth Table: p T T q T F p q T F F F T T 10

If p, then q n p = hypothesis n q = conclusion (consequence) n

If p, then q n p = hypothesis n q = conclusion (consequence) n There are many ways to write a conditional statement 11

Other Rephrasing of Implication n If p, then q n If p, q n

Other Rephrasing of Implication n If p, then q n If p, q n q if p n p is sufficient for q n a sufficient condition for q is p n a necessary condition for p is q n in order to have p true, q has to be true also n q when p 12

Other Rephrasing of Implication n p q n p implies q n p only

Other Rephrasing of Implication n p q n p implies q n p only if q n p is true only if q is also true n q follows from p 13

Examples of Implication n If you get 98% then I’ll give you A+ n

Examples of Implication n If you get 98% then I’ll give you A+ n 98% is sufficient for A+ n If you get A+ then it doesn’t mean you have 98% n A+ is necessary for 98% n 98% however is not necessary for A+ n 98% only if A+ n A+ follows from 98% n 98% doesn’t follow from A+ 14

Examples of Implication n Notice that if p is true then q must be

Examples of Implication n Notice that if p is true then q must be true, however if p is not true then q may or may not be true. 15

Examples of Implication 68 - 59 ﺳﻮﺭﺓ ﺍﻷﻨﺒﻴﺎﺀ n It is very clear that

Examples of Implication 68 - 59 ﺳﻮﺭﺓ ﺍﻷﻨﺒﻴﺎﺀ n It is very clear that the prophet Ebrahim didn’t lie because he said that If they speak, then the biggest one did it 17

Bi. Conditional Statement n p=1<0 n q = monkeys can fly n p q

Bi. Conditional Statement n p=1<0 n q = monkeys can fly n p q = 1< 0 if and only if monkeys can fly n Truth Table: p T T F F q T F p q T F F T 18

Bi. Conditional Statement n p q = p if and only if q =

Bi. Conditional Statement n p q = p if and only if q = p if q and p only if q = “q p” and “p q” = “p q” “q p” n p is necessary & sufficient for q n p and q always have the same truth value 19

Theorem n p and q are logically equivalent, i. e. , p q if

Theorem n p and q are logically equivalent, i. e. , p q if and only if p q is always true p T T F F q T F p q T F F T 20

Logically equivalent p v q p q Example p q p p v q

Logically equivalent p v q p q Example p q p p v q p q T T F T T T F F F T T T 21

Precedence of Logical Operators n The following operators are sorted according to their precedence

Precedence of Logical Operators n The following operators are sorted according to their precedence , , v , , n This means for example (((p ( q)) v p v q ) q) ( (p ( q)) v p) 22