1 / 8

Nested Quantifiers

Nested Quantifiers. Nested Quantifiers. Needed to express statements with multiple variables Example 1 : “ x+y = y+x for all real numbers”  xy ( x+y = y+x ) where the domains of x and y are real numbers Example 2 : “Every real number has an inverse ”

media
Télécharger la présentation

Nested Quantifiers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Nested Quantifiers

  2. Nested Quantifiers • Needed to express statements with multiple variables • Example 1: “x+y = y+x for all real numbers” • xy(x+y = y+x) • where the domains of x and y are real numbers • Example 2: “Every real number has an inverse” • x y(x + y = 0) • where the domains of x and y are real numbers • Each quantifier is within the scope of the preceding quantifier: • x y(x+y=0) can be viewed as • x Q(x) where Q(x) is y P(x, y) where P(x, y) is (x+y=0)

  3. Order of Quantifiers Example 1: • Let P(x,y) be the statement “x+y=y+x” • Assume that U are real numbers • Then xyP(x,y)≡yxP(x,y)≡Tbecause for any combination of x and y the statement holds Example 2: • Let Q(x,y) be the statement “x+y=0” • Assume that U are real numbers. • Then xyP(x,y)≡T, because for every x there is always an inverse y • butyxP(x,y)≡F because for a given y not every x will add up to zero

  4. Quantifications of Two Variables • General rules:

  5. Translating Math Statements Example : “The sum of two positive integers is always positive” Solution: • Rewrite the statement to make the implied quantifiers and domains explicit: • “For every two positive integers, their sum is positive.” • Introduce variablesx and y: • “For all positive integers x and y, x+y is positive.” • Introduce quantifiers: • xy ((x > 0)∧ (y > 0)→ (x + y > 0)) • where the domain of both variables is integers

  6. Translation from English • Decide on the domain; choose the obvious predicates; express in predicate logic. • Example 1: “Brothers are siblings.” • domain: all people • x y (B(x,y) → S(x,y)) • Example 2: “Siblinghood is symmetric.” • x y (S(x,y) → S(y,x)) • Example 3: “Everybody loves somebody.” • x yL(x,y)

  7. Translation from English • Example 4: “There is someone who is loved by everyone.” • yxL(x,y) • Example 5: “There is someone who loves someone.” • xyL(x,y) • Example 6: “Everyone loves himself” • xL(x,x)

  8. Negating Nested Quantifiers • Recall De Morgan’s laws for quantifiers • ¬x P(x) ≡ x ¬P(x) • ¬x P(x) ≡ x ¬P(x) • Starting from left to right, successively apply these laws to nested quantifiers • Example: ¬w a f (P(w,f ) ∧ Q(f,a)) ≡ ≡ w ¬a f (P(w,f ) ∧ Q(f,a)) by De Morgan’s for  ≡ w a ¬f (P(w,f ) ∧ Q(f,a)) by De Morgan’s for  ≡ w a f ¬(P(w,f ) ∧ Q(f,a)) by De Morgan’s for  ≡ w a f (¬P(w,f ) ∨¬Q(f,a)) by De Morgan’s for ∧

More Related