170 likes | 313 Views
University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction to Discrete Mathematics Predicate Logic. Outlines. Predicate Logic. Universal quantifier. Existential quantifier. Negation of quantified propositional functions.
E N D
University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction to Discrete Mathematics Predicate Logic Instructor: Tasneem Darwish
Outlines • Predicate Logic. • Universal quantifier. • Existential quantifier. • Negation of quantified propositional functions. • Arguments in predicate logic. Instructor: Tasneem Darwish
Predicate Logic • A predicate describes a property of one or several objects or individuals. • Example • (a) . . . is red. • (b) . . . enjoys standing on his head. • (c) . . . has spiky leaves. • The space in front of these predicates can be filled in with the names of objects to form a proposition which may be true or false. • Example: • This door is red. • Rose is red. • Propositions of this kind consist of a subject together with a predicate describing whatever property the subject is said to possess. Instructor: Tasneem Darwish
Predicate Logic • capital letters are used to refer to predicates: • R : is red. • H : enjoys standing on his head. • Lower-case letters are used to denote particular objects: • r : this rose. • j : James. • We can form simple propositions as follows: • R(r ) : This rose is red. • H( j ) : James enjoys standing on his head. • we can write R(x) to denote ‘x is red’ where x is a variable which can be replaced by any object or individual. • R(x) is called a propositional function. Instructor: Tasneem Darwish
Predicate Logic • Substituting a particular ‘value’ for x in a propositional function is not the only way of converting it to a proposition. This can also be achieved through the use of quantifiers. • There two types of quantifiers: • Universal Quantifier. • Existential Quantifier. Instructor: Tasneem Darwish
Universal Quantifier • Consider the proposition ‘All rats are grey’. It can be rewritten as: ‘For every x, if x is a rat, then x is grey’. • Suppose we define: • R(x) : x is a rat. • G(x) : x is grey. • We denote ‘for every x’ by ∀x and we can then write ‘All rats are grey’ as: ∀x[R(x) → G(x)] • The symbol ∀ is called the universal quantifier. • Example 1.11: Symbolize the proposition ‘Every day I eat lunch’. • Define the following: • D(x) : x is a day. J (x) : x is when I eat lunch. • We can express this proposition symbolically by: • ∀x[D(x) → J (x)]. Instructor: Tasneem Darwish
Existential Quantifier • Consider the proposition ‘Some rats are grey’. It can be rewritten as: ‘There exists at least one x such that x is a rat and x is grey’. • Suppose we define: • R(x) : x is a rat • G(x) : x is grey • We denote ‘there exists at least one x’ by ∃x, we can then write ‘Some rats are grey’ as: ∃x[R(x) ∧ G(x)] • The symbol ∃ is called the existential quantifier • Example 1.12: Symbolize ‘Some people think of no one but themselves’. • Define:P(x) : x is a person N(x) : x thinks of no one but himself. • We can express this proposition symbolically by: • ∃x[P(x) ∧ N(x)] Instructor: Tasneem Darwish
Negation of Quantified Propositional Functions • The proposition ∀xF(x) states that, for all x in the universe of discourse, x has the property defined by the predicate F. • The negation of this proposition, ¬∀xF(x), states that ‘It is not the case that all x have the property defined by F’, i.e. there is at least one x that does not have the property F. • This negation is symbolized by ∃x[¬F(x)] • The propositions ¬∀xF(x) and ∃x[¬F(x)] are equivalent ¬∀xF(x) ≡∃x[¬F(x)] • Also the negation of ¬∃xF(x) is ∀x[¬F(x)] • ¬∃xF(x) ≡∀x[¬F(x)] Instructor: Tasneem Darwish
Negation of Quantified Propositional Functions • The proposition ∀xF(x) states that, for all x in the universe of discourse, x has the property defined by the predicate F. • The negation of this proposition, ¬∀xF(x), states that ‘It is not the case that all x have the property defined by F’, i.e. there is at least one x that does not have the property F. • This negation is symbolized by ∃x[¬F(x)] • The propositions ¬∀xF(x) and ∃x[¬F(x)] are equivalent ¬∀xF(x) ≡∃x[¬F(x)] • Also the negation of ¬∃xF(x) is ∀x[¬F(x)] • ¬∃xF(x) ≡∀x[¬F(x)] Instructor: Tasneem Darwish
Negation of Quantified Propositional Functions • Example 1.14 • We define the following on the universe of people. • M(x) : x is good.C(x) : x lives in the city. • Symbolize the negations of the following propositions changing the quantifier. • (i) All people are not good. (ii) Some people live in the city. • Solution • (i)The proposition given can be symbolized by ∀x[¬M(x)]. • The negation of this proposition is given by: • ¬∀x[¬M(x)] ≡∃xM(x). ‘Some people are good’. • (ii)‘Some people live in the city’ is symbolized by ∃xC(x). • Its negation is: • ¬∃xC(x) ≡∀x[¬C(x)]. ‘All people live out of the city’. Instructor: Tasneem Darwish
Arguments in Predicate Logic • Example • ‘Everyone who has green eyes is not to be trusted. Bill has green eyes. Therefore Bill is not to be trusted.’ • If we define the following on the universe of all human beings: • G(x) : x has green eyes • T (x) : x can be trusted • b : Bill • The premises of this argument are: • ∀x[G(x)→¬T (x)] and G(b) • The conclusion is: • ¬T (b) Instructor: Tasneem Darwish
Arguments in Predicate Logic • To establish the validity of an argument, • we must show that: • whenever all the premises are true, then the conclusion must be true. • We need the following four rules, which will be used to establish the validity of an argument: • Universal Specification • Universal Generalization • Existential Specification • Existential Generalization Instructor: Tasneem Darwish
Arguments in Predicate Logic Universal Specification This rule states that if the proposition ∀xF(x) is true, then we can deduce that the proposition F(a) is true for every a in the universe of discourse. Universal Generalization If the proposition F(a) is true for every a in the universe of discourse, then we can conclude that ∀xF(x) is true. Existential Specification If ∃xF(x) is true, then there is an element a in the universe of discourse such that F(a) is true. Existential Generalization If F(a) is true for some element a belonging to the universe of discourse then ∃xF(x) is true. Instructor: Tasneem Darwish
Arguments in Predicate Logic This is a list of logical implications which are particularly useful in proving the validity of arguments: Instructor: Tasneem Darwish
Arguments in Predicate Logic Example 1.15: Show that the following is a valid argument: ‘Everyone who has green eyes is not to be trusted. Bill has green eyes. Therefore Bill is not to be trusted.’ Solution With a universe of discourse of ‘people’, we have established that, if b denotes ‘Bill’, the premises are: ∀x[G(x)→¬T (x)] and G(b) and the conclusion is: ¬T (b). Instructor: Tasneem Darwish
Arguments in Predicate Logic Example 1.15: Show that the following is a valid argument: ‘Everyone who has green eyes is not to be trusted. Bill has green eyes. Therefore Bill is not to be trusted.’ Solution Assuming the truth of the premises, we must establish the truth of the conclusion (this is the process of establishing an argument validity). We do this as follows: 1. ∀x[G(x)→¬T (x)] (premise) 2. G(b)→¬T (b) (rule of universal specification) 3. G(b) (premise) 4. ¬T (b) (follows from 2 and 3 using modus ponens). Instructor: Tasneem Darwish
Any questions???? Instructor: Tasneem Darwish