240 likes | 339 Views
Intro to Predicates and Quantified Statements. Predicate: A sentence that contains a finite number of variables and becomes a statement when values are substituted for the variables. Domain: the set of all values that can be substituted for the variables
E N D
Intro to Predicates and Quantified Statements • Predicate: A sentence that contains a finite number of variables and becomes a statement when values are substituted for the variables. • Domain: the set of all values that can be substituted for the variables • EX: P(x): x^2 > x (“^” also means exponentiation in CS) • Sets • xεA denotes that x is an element of set A • Common Sets: R(real), Z(integers), Q(rationals) • R⁺ and R⁻ indicate positive or negative elements only • {1,2,3…} indicates a set of all + integers using “…”
The Truth Set • The set of all elements that make a predicate true is the truth set • {x ε D | P(x)} – D is the domain of x • This is read “the set of all x in D such that P(x)” • EX: Q(n) is “n is a factor of 8” • If the domain is Z⁺, the truth set is {1,2,4,8} • If the domain is Z, {1,2,4,8,-1,-2,-4,-8}
The Universal Quantifier • Universal Statement • “∀x ε D, Q(x)” is read “for all x in D, Q(x)” • ∀ is the universal quantifier, pronounced “for all” • A universal statement is true iff it is true for every x in D and is false if just one x in D is false • This one false x is a counterexample • EX: ∀x ε R, x^2 ≥ x • 2^2 > 2, but (1/2)^2 < (1/2) so it’s false
The Existential Quantifier • Existential Statement • “∃x ε D such that Q(x)” means “there exists an x in D such that Q(x)” • ∃ - Existential Quantifier • This is true iff at least one x satisfies Q(x) • EX: ∃x ε D such that x^2 = x • 1^2 = 1 and is the only value besides 0 that is true
Using Quantifiers in Statements • Universal Conditional Statements • “∀x, P(x) → Q(x)” means “for all x, if P(x) is true, Q(x) follows • A statement of this form can always be translated to “∀x ε D, Q(x)” by making D the set of truth values for P(x) • The same general rule applies for Existential statements
Manipulating Quantified Statements • Negation of Quantified Statements • ~(All x in D, Q(x)) = There exists at least one x in D such that ~Q(x) • ~(∀x ε D, Q(x)) = ∃x ε D such that ~Q(x) • The negation of “All Are” is logically equivalent to “Some Are Not” • ~(∃x ε D such that Q(X)) = ∀x ε D, ~Q(x) • The negation of “Some Are” is logically equivalent to “All Are Not” • Caution: when translating to informal language, check the placement of “not” to ensure no ambiguity
Negations • Negations of Universal Conditional Statements • ~(∀x, P(x) → Q(x)) = ∃x such that (P(x)^~Q(x)) • ~(for all x, if P(x) then Q(x)) = there exists an x such that P(x) is true and Q(x) is false • This is a culmination of a lot of information. Basically , this means that if a universal conditional statement is false, then there is an element that makes the statement false.
Quantified DeMorgan’s Laws • ∀, ∃, ^, v • ∀x ε D, Q(x) = Q(x₁)^Q(x₂)^…^Q(xn) • A for all statement is logically equivalent to an and chain of all possible Q(x)’s • ∃x ε D such that Q(x) = Q(x₁) v Q(x₂)v…vQ(xn) • A there exists statement is logically equivalent to an or chain of all possible Q(x)’s • This is why the negation of for all is there exists and vise versa
Manipulating Conditional Statements • Variants of Universal Conditional Statements • Given ∀x in D, P(x) → Q(x) • Contrapositive: ∀x, ~Q(x) → ~P(x) • Logically Equivalent to original • Converse: ∀x, Q(x) → P(x) • Not Logically Equivalent • Inverse: ∀x, ~P(x) → ~Q(x) • Not Logically Equivalent
Statements With Multiple Quantifiers • When ∀ and ∃ are both used • The quantifiers are co-equal and are evaluated from left to right • ∀x ε D, ∃y ε S such that P(x,y) • For any x in D, a value y in S can be found to satisfy the predicate P(x,y) (given x, choose y) • ∃x ε D such that ∀y ε E, P(x,y) • There exists an x in D such that any y in E satisfies P(x,y) (choose x, then given y)
Logical Definition of a Limit • Limits • “Lim(n → ∞) an = L” means that as n approaches infinity, the value a[n] approaches L • For any positive number ε, there exists an integer Z such that whenever n > Z, a sub n sits between L- εand L+ ε. • Symbolically: ∀ε > 0, ∃ an integer Z such that ∀integers n, if n > Z then L- ε < an < L+ ε • This definition is logically complex, but can be easily tested with values
Operations with Multiple Quantifiers • Negations of Multiply Quantified Statements • For any number of quantifiers, the same basic rules can be applied • ~(∀x in D, ∃y in E such that P(x,y) = ∃x in D such that ∀y in E, ~P(x,y) • ~(∃x in D such that ∀y in E, P(x,y) = ∀x in D, ∃y in E such that ~P(x,y) • These two equivalencies were obtained using the negations of quantified statements introduced earlier
Order Counts • The Order of Quantifiers • By reversing the order of quantifiers ∀ and ∃, it is possible to reverse the truth values of the statement (this is not always so) • If two of the same quantifiers are next to each other and are reversed, the meaning is left unchanged • ∀reals x and ∀reals y, x + y = y + x. This is true both ways • ∀ real numbers x and y,… is the exact same statement
A Note on Symbolism • The Language of First-Order Logic • The collection of all symbols for quantifiers, connectives, variables, etc. is not just a bunch of garble. It’s a language through which most situations can be described. There are many dialects for many different situations but the same general rule applies to each: you can’t learn it if you don’t use it. • It’s important that you understand the symbols used in logic because they are the golden standard in mathematics; be it a proof, a solution or some other kind of process, the language of logic will be used to describe it.
Logic as a Computer Language • Did You Know? • An entire programming language called Prolog (programming in logic) was developed for logical manipulation • Using symbolic manipulation, Prolog can solve all your logical problems for you if you know how to use it • This course is not language specific, but it may be worth looking into
Arguments with Quantified Statements • Rule of Universal Instantiation • If something is true for everything in a domain, then it is true for any particular thing in the domain • If something is true for a type or class of objects, then it is true for any particular object of the types or class • This lets you apply general rules and theorems to specific objects without changing or having to prove the theorem used
Common Universal Forms • Universal Modus Ponens • ∀x, if P(x) then Q(x): P(a) for a particular a :: Q(a) • If x satisfies P(x) then it satisfies Q(x). It is known that “a” satisfies P(a) so Q(a) must be true • This is a valid – and very useful – argument form • Universal Modus Tollens • ∀x, if P(x) then Q(x):~Q(a) for a particular a :: ~P(a) • If x satisfies P(x) then it satisfies Q(x). It is known that “a” fails Q(a) so it must also fail P(a)
Proving Universal Arguments • Proving Validity of Arguments with Quantified Statements • An argument form is valid regardless of the predicates used iff the conclusion is true when the premises are all true • An argument is valid iff its argument form is valid • A form can be proven true using other forms, theorems, and diagrams like truth tables
Using Visual Aids • The Use of Diagrams • Picture each domain in an argument as a disk • If a particular domain exists within a larger domain then place the particular disk into the larger disk • EX: all integers are real numbers. Draw a disk for reals and then draw an integer disk inside the reals disk • If something is not on the larger disk, it can’t be on the smaller one either • If a number is not a real number, then it cannot be an integer • If a number is an integer, then it is also a real number
Interpreting Visual Aids • More on Diagrams • One must be careful to ensure that the diagrams are fit together properly. Both the converse and inverse errors can be miss-interpreted diagrammatically to say that the form is valid, when in fact the form is abstract. In general, diagrams are helpful when used to represent argument forms.
Common Errors • Quantified Converse Error • ∀x, if P(x) then Q(x): Q(a) for a particular a:: P(a) • This is invalid • EX: P(x) = “x is an integer”, Q(x) = “x is a real number” • If Q(x) is true, P(x) doesn’t necessarily follow because x could be .5, which is real, but is not an integer • Quantified Inverse Error • ∀x, if P(x) then Q(x): ~P(a) for a particular a :: ~Q(a) • Invalid form • EX: P(x) = “x is an integer”, Q(x) = “x is a real number” • If x is .5, P(x) is false but Q(x) is still true. The truth of Q(x) didn’t follow from the truth of P(x)
Additional Universal Argument Forms • Obtaining Additional Argument Forms • In order to transform an established argument form into its universal equivalent, combine each statement in the form with Universal Instantiation • EX: Universal Transitivity • ∀x, P(x)→Q(x): ∀x, Q(x)→R(x) :: ∀x, P(x)→R(x) • Anything that makes P(x) true makes Q(x) true, anything that makes Q(x) true makes R(x) true, anything that makes P(x) true must make R(x) true
“Proof” by Abduction • Abduction • Sometimes, converse and inverse errors are useful • ∀x, P(x)→Q(x): Q(x) :: P(x) is a converse error, but is not totally useless. It can be used to search for a logically correct statement • Say that a doctor knows two things: • If someone has chicken pox, they will have red bumps • A patient complains that he has red bumps • It is not valid to say that the patient has chicken pox, but the doctor knows that he can perform a test that will prove chicken pox is true • Thanks to the converse error, the doctor was able to narrow his search. This comes in handy when designing expert systems and artificial intelligence
Significance • In the world of mathematics, proving your statements is an essential skill. Don’t believe us? • Say an engineer is designing a new type of engine for a commercial plane. According to his calculations, the engine will not malfunction under standard conditions. In testing, this fact may seem to be true, but if his calculations were not proven valid, there will always be a lingering uncertainty. • When people’s lives depend on your correctness, you have to be absolutely sure that you are in fact correct