Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Propositional Logic Introduction. 2 What is propositional logic? Propositional Logic is concerned with propositions and their interrelationships. 

Similar presentations


Presentation on theme: "1 Propositional Logic Introduction. 2 What is propositional logic? Propositional Logic is concerned with propositions and their interrelationships. "— Presentation transcript:

1 1 Propositional Logic Introduction

2 2 What is propositional logic? Propositional Logic is concerned with propositions and their interrelationships.  Def: A proposition is a statement that is either true or false Deals with logic relationships between propositions (claims, statements, sentences) A proposition is a possible condition of the world that is either true or false Sometimes called “sentential logic” or “Statement logic” Is the branch of logic that studies ways of joining and/or modifying entire propositions to form more complicated propositions, as well as the logical relationships and properties J= “Ibrahim is wearing a red coat” Either Ganymede is a moon of Jupiter or Ganymede is a moon of Saturn

3 3 What is propositional logic? Propositional logic is interested in how the truth value of “compound claims” depends on the truth value of the individual claims that make it up. “Ibrahim is wearing a red coat”“he’s stealing a jeep” (True or False) “Ibrahim is wearing a red coat and he’s stealing a jeep” (T or F)

4 4 Propositional logic Logical constants: true, false Propositional symbols: P, Q, S,... (atomic sentences) Sentences are combined by logical connectives: ...and [conjunction] ...or [disjunction] ...implies [implication/conditional] ..is equivalent [biconditional] ...not [negation] Literal: atomic sentence or negated atomic sentence A and B A or B If A then B A==B not-A A and B A or B If A then B A==B not-A

5 5 Examples of PL sentences P means “It is hot.” Q means “It is humid.” R means “It is raining.” (P  Q)  R “If it is hot and humid, then it is raining” Q  P “If it is humid, then it is hot” A better way: Hot = “It is hot” Humid = “It is humid” Raining = “It is raining”

6 6 What is propositional logic? Basic compound claims that express logical relationships between the simpler sentences of which they are composed: Given the truth values of A, B, C and D Is the above claim as a whole True or False” “If (A or B) then (C and not-D))”

7 7 Propositional logic (PL) A simple language useful for showing key ideas and definitions User defines a set of propositional symbols, like P and Q. User defines the semantics of each propositional symbol:  P means “It is hot”  Q means “It is humid”  R means “It is raining” A sentence (well formed formula) is defined as follows:  A symbol is a sentence  If S is a sentence, then  S is a sentence  If S is a sentence, then (S) is a sentence  If S and T are sentences, then (S  T), (S  T), (S  T), and (S ↔ T) are sentences  A sentence results from a finite number of applications of the above rules

8 8 We are going to focus on: We are going to focus on: (Part I) the definitions of the basic compound claims: (Part 2) contradictories, contradictions, and consistency (Part 3) contradictories of compound claims: (Part 4) ways of saying “if A then B” “A and B”, “A or B”, “If A then B” “not-(A and B)”, “not-(A or B)”, “not-(If A then B)”

9 9 Conjunctions A and B

10 10 Conjunctions A and B A=“I love Chicken” B= “I hate Meat” A and B= “I love Chicken and I hate Meat” “A”=True “A”=True “A and B”= True and “A and B”= True and “B”=True “B”=True

11 Conjunctions A and B 11 AandB TTT TFF FFT FFF TRUTH TABLE TRUTH TABLE for the conjunction “A and B”

12 Conjunctions A and B 12 and Ibrahim is a father and Ibrahim is a teacher and a teacher Ibrahim is a father and a teacher but Ibrahim is a teacher but he doesn’t like chockAlthoughHoweveryet

13 Conjunctions A and B 13 One last Point: Is also conjunction, and follows the same logical rules as “A and B” “A and B and C and D and E”

14 14 Disjunctions A or B

15 15 Disjunctions A or B A=“Ibrahim is at the movies” B= “Ibrahim is at the library” or A or B= “Ibrahim is at the movies or Ibrahim is at the library”

16 Disjunctions A or B 16 “A triangle can be defined as a polygon with three sides or as a polygon with three vertices” (Inclusive OR) “ The coin landed either heads or tails” (Exclusive OR)

17 Disjunctions A or B 17 AorB TTT TTF FTT FFF TRUTH TABLE TRUTH TABLE for the disjunction “A or B” AorB TFT TTF FTT FFF Inclusive OR Exclusive OR

18 Disjunctions A or B 18 One last Point: Is also disjunction, and follows the same logical rules as “A or B” “A or B or C or D or E”

19 19 Conditionals: If A then B

20 20 Conditionals: If A then B If I miss the bus then I will be late for work. If I miss the bus then I will be late for work. ANTECEDENT CONSEQUENT ANTECEDENT CONSEQUENT If A Then B

21 Conditionals: If A then B 21 What does the conditional assert ((يأكد? ABABABAB If I eat much then I will be fat Doesn't assert that A is true Doesn’t assert that B is true Assert a logical relationship between A and B

22 Conditionals: If A then B 22 What does the conditional assert ((يأكد? AB If I live in MAKKA then I live in the Saudi (False) (False) (True)

23 Conditionals: If A then B 23 When is the conditional false? A B If I study hard then I will pass the exam Case I: I didn’t study hard (A is false) I pass the test (B is true) I pass the test (B is true) Case 2: I didn’t study hard (A is false) I didn’t pass the test (B is false) I didn’t pass the test (B is false) Case 3: I study hard (A is true) I didn’t pass the test (B is false) I didn’t pass the test (B is false)

24 Conditionals: If A then B 24 When is the conditional false? True False If I study hard then I will pass the exam A conditional claim is FALSE when The antecedent is True But The consequent is False

25 Conditionals: If A then B 25 AB TTT TFF FTT FTF TRUTH TABLE TRUTH TABLE for the CONDITIONAL “If A then B”

26 Equivalence (A B) The truth table 26 AB TTT TFF FFT FTF

27 27 Contradictories: not-A

28 A= “Ibrahim is at the home” The CONTRADICTORY of A: A claim that always has the OPPOSITE truth value of A Not-A ~ A ¬A Not-A=“Ibrahim is not at the home” 28

29 Contradictories: not-A 29 ANot-A TF FT TRUTH TABLE TRUTH TABLE for the CONTRADICTORY “not-A”

30 30 Models of complex sentences

31 31 Some terms The meaning or semantics of a sentence determines its interpretation. Given the truth values of all symbols in a sentence, it can be “evaluated” to determine its truth value (True or False). A model for a KB is a “possible world” (assignment of truth values to propositional symbols) in which each sentence in the KB is True.

32 32 More terms A valid sentence or tautology is a sentence that is True under all interpretations, no matter what the world is actually like or what the semantics is. Example: “It’s raining or it’s not raining.” An inconsistent sentence or contradiction is a sentence that is False under all interpretations. The world is never like what it describes, as in “It’s raining and it’s not raining.” P entails Q, written P |= Q, means that whenever P is True, so is Q. In other words, all models of P are also models of Q. (p → q) ˅ (p → q)

33 Truth Tables In general, a truth table for compound proposition will have rows, where n = number of unique propositional variables occurring in the expression. Count in binary with F being 0 and T being 1 to cover all cases. 33

34 Boolean logic properties  Associative:  (A and B) and C = A and (B and C)  (A or B) or C = A or (B or C)  Commutative:  A and B = B and A  A or B = B or A  Distributive:  (A and B) or C = (A or C) and (B or C)  (A or B) and C = (A and C) or (B and C)  Idempotent:  A and A = A  A or A = A  Transitive:  A → B and B → C implies A → C 34

35 35 Truth tables II The five logical connectives: A complex sentence:

36 36 Thank You!


Download ppt "1 Propositional Logic Introduction. 2 What is propositional logic? Propositional Logic is concerned with propositions and their interrelationships. "

Similar presentations


Ads by Google