Download presentation
Presentation is loading. Please wait.
Published byErika Gallagher Modified over 8 years ago
1
Propositional Logic
2
Assignment Write any five rules each from two games which you like by using propositional logic notations.
3
Natural deduction Rule for eliminating implication 3
4
Example ( Modus Ponens)
5
Example
7
prove
8
Natural deduction Rule for implies introduction 8
9
Natural deduction Rules for Disjunction 9
10
Natural deduction Rules for Disjunction 10
11
Natural deduction 11
12
Predicate
13
Syntax of FOL: Basic elements ConstantsKingJohn, 2,… FunctionsSqrt, Likes... Variablesx, y, a, b,... Connectives , , , , Equality= Quantifiers ,
14
Predicate - Example
15
Quantifiers
16
Universal Quantifiers
17
Universal Quantification Universal Quantification denoted as Universal Quantification allows us to capture statements of the form “for all” or “for every”. For example, “every natural number is greater than or equal to zero” can be written formally as Page 17
18
Universal Quantification A quantified statement consists of three parts: the quantifier, the quantification, which describes the variables and the type of variable with which the statement is concerned and the predicate which is normally some statement about the quantified variables. Every predicate logic statement can be considered as follows Page 18
19
Universal Quantification Page 19
20
Exercise Everybody likes Jaffa cakes All vegetarians don’t like Jaffa cakes Everybody either likes Jaffa cakes or is a vegetarian Either every body likes Jaffa cakes or everybody is a vegetarian Page 20
21
Solution Page 21
22
Universal Quantification Law 1 Example Page 22
23
Universal Quantification Law 2 Example Page 23
24
Existential quantification Existential quantifier denoted by As universal quantification is used to assert that a certain property holds of every element of a set, existential quantification is used to assert that such a property holds of some (or at least one) elements of a set “Some natural numbers are divisible by 3” may be written as Page 24
25
Exercise Some people like Jaffa cakes Some vegetarians don’t like Jaffa cakes Some people either like Jaffa cakes or are vegetarian Either some people like Jaffa cakes or some people are vegetarian Page 25
26
Solution Page 26
27
Existential quantification Law 3 Example Page 27
28
Existential quantification Law 4 Example Page 28
29
Satisfaction and validity The predicate n>3 can be considered neither true nor false unless we know the value associated with n A predicate p is valid if and only if it is true for all possible values of the appropriate type. That is, if a predicate p is associated with a variable x of type X, then p is valid if, and only if, Example Page 29
30
Satisfaction and validity A predicate p is satisfiable if and only if it is true for some values of the appropriate type. That is, if a predicate p is associated with a variable x of type X, then p is satisfiable if, and only if, Example Page 30
31
Satisfaction and validity A predicate p is unsatisfiable if, and only if, it is false for all possible values of the appropriate type. If a predicate p is associated with a variable x of type X, then p is unsatisfiable if, and only if, Page 31
32
Satisfaction and validity The analogies between valid, satisfiable and unsatisfiable predicates, and tautologies, contingencies and contradictions: valid predicates and tautologies are always true satisfiable predicates and contingencies are sometimes true and sometimes false unsatisfiable predicates and contradictions are never true Page 32
33
The negation of quantifiers The statement “some body like Brian” may be expressed via predicate logic as To negate this expression, we may write as, which in natural language may be expressed as “nobody likes Brian” Page 33
34
The negation of quantifiers Logically saying “nobody likes Brian” is equivalent to saying “everybody does not like Brian”. The negation of quantifiers behaves exactly in this fashion, just as in natural language, “nobody likes Brian” and “everybody does not like Brian” are equivalent so in predicate logic And are equivalent. Page 34
35
The negation of quantifiers Law 5 When negation is applied to a quantified expression it flips quantifiers as it moves inwards(i.e negation turns all universal quantifiers to existential quantifiers and vice versa, and negates all predicates) Page 35
36
The negation of quantifiers Consider the statement, The effect of negation of this expression can be determined as, Page 36
37
Exercise Everyone likes everyone Everyone likes someone Someone likes everyone Someone likes someone Page 37
38
Free and bound variables Consider two predicates n>5…..Eq. 1 In equation 2, the variable n is bound, it is existentially quantified variable. In equation 1, n is free as its value may not be determined or restricted Page 38
39
Free and bound variables Example In this statement, y and x are two variables. y is universally quantified and it is bound, while x is free variable. In statement, The occurrence of x in the declaration is binding, any occurrences of x in p are bound, and any occurrences of any variables other than x are free Page 39
40
Free and bound variables Example Exercise, Determine the scope of the universal and existential quantifiers of the following predicate, The distinction between predicates and propositions can be stated as predicates are logical statements which can contain free variables while propositions are logical statements which contain no such holes Page 40
41
Substitution Consider statement, we may replace the name n with any term t, provided that t is of the same type as n. This process is called substitution: the expression p[t/n] denotes the fact that the term t is being substituted for the variable name n in the predicate p. Example, we may denote the substitution of 3 for n in the predicate n>5 by Page 41
42
Substitution Also, we may denote the substitution of 3+4 for n in n>5 by n>5[3+4/n] Page 42
43
Substitution More than one substitution in case of more than one free variable Consider predicate, Here x and y are both free variables. We may substitute nigel for x as follows, Now substituting ken for y, Page 43
44
Substitution Similarly, in one step, overall substitution may be denoted as, These two substitutions take place sequentially, first nigel is substituted for x, then ken is substituted for y. However, for simultaneous substitutions, Page 44
45
Substitution To illustrate the difference between sequential and simultaneous substitution, consider the example, In former there is only one occurrence of y and in latter there are two occurrences of y Page 45
48
Quiz 1 Translate this sentence using propositional logic notations: You can get a book from the library only if you are a student or you are not an outsider. State which of the following statement is a proposition. The sum of the numbers 3 and 5 equals 8. Jane reacted violently to Jack’s accusations. It is sunny today. By applying inference rules: For p ^ ( p q) conclude q
49
Solution 1. p (q v ~r) All
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.