Formal Logic




        Mathematical Structures
         for Computer Science
                Chapter 1	





Copyright © 2006 W.H. Freeman & Co.       MSCS Slides   Formal Logic
Variables and Statements
  ●     Variables in Logic	

  ●     A variable is a symbol that stands for an individual in a collection
        or set. For example, the variable x may stand for one of the days.
        We may let x = Monday or x = Tuesday, etc. 	

  ●     Incomplete Statements	

  ●     A sentence containing a variable is called an incomplete statement.
        An incomplete statement is about the individuals in a definite
        domain or set. When we replace the variable by the name of an
        individual in the set we obtain a statement about that individual. 	

          ■    Example of an incomplete statement : “x has 30 days.” 	

  ●     Here, x can be any month and substituting that, we will get a
        complete statement.	





Section 1.3                              Quantifiers, Predicates and Validity    1
Quantifiers and Predicates
     ●        Quantifiers: 	

     ●        Quantifiers are phrases that refer to given quantities, such as
              “for some” or “for all” or “for every,” indicating how many
              objects have a certain property. 	


     ●        Two kinds of quantifiers: Universal and Existential	

     ●        Universal Quantifier: represented by ∀	

     ●        The symbol is translated as and means “for all”, “given any”,
              “for each,” or “for every,” and is known as the universal
              quantifier. 	


     ●        Existential Quantifier: represented by ∃	

     ●        The symbol is translated as and means variously “for some,”
              “there exists,” “there is a,” or “for at least one”.	


Section 1.3                             Quantifiers, Predicates and Validity   2
Quantifiers and Predicates
     ●        Predicate	

     ●        It is the verbal statement that describes the property of a
              variable. Usually represented by the letter P, the notation P(x) is
              used to represent some unspecified property or predicate that x
              may have	

               ■    e.g. P(x) = x has 30 days. 	

               ■    P(April) = April has 30 days.	

     ●        Combining the quantifier and the predicate, we get a complete
              statement of the form ∀(x)P(x) or ∃(x)P(x). 	

     ●        The collection of objects that satisfy the property P(x) is called
              the domain of interpretation.	

     ●        Truth value of expressions formed using quantifiers and
              predicates	

               ■       What is the truth value of ∀(x)P(x) where x is all the months and 	

                    	

P(x) = x has less than 32 days.	

               ■       Undoubtedly, the above is true since no month has 32 days.	


Section 1.3                                   Quantifiers, Predicates and Validity             3
Truth value of the following expressions
     ●        Truth of expression ∀(x)P(x)	

              1.    P(x) is the property that x is yellow, and the domain of
                    interpretation is the collection of all flowers: 	

  not true	

              2.    P(x) is the property that x is a plant, and the domain of
                    interpretation is the collection of all flowers:	

   true	

              3.    P(x) is the property that x is positive, and the domain of
                    interpretation consists of integers:	

              not true	

              ■     Can you find one interpretation in which both ∀(x)P(x) is true and
                    ∃(x)P(x) is false?	

                        Not possible	

              ■     Can you find one interpretation in which both ∃(x)P(x) is true and
                    ∀(x)P(x) is false?      	

                 Case 1 as mentioned above	

     ●        Predicates involving properties of single variables : unary
              predicates 	

     ●        Binary, ternary and n-ary predicates are also possible.	

              ■     (∀x) (∃y)Q(x,y) is a binary predicate. This expression reads as
                    “for every x there exists a y such that Q(x,y).”	



Section 1.3                                 Quantifiers, Predicates and Validity           4
Interpretation
     ●       Formal definition: An interpretation for an expression involving
             predicates consists of the following:	

          	

A collection of objects, called the domain of interpretation,
             which must include at least one object.	

          	

An assignment of a property of the objects in the domain to each
             predicate in the expression.	

          	

An assignment of a particular object in the domain to each
             constant symbol in the expression.	


     ●        Predicate wffs can be built similar to propositional wffs using
              logical connectives with predicates and quantifiers.	

     ●        Examples of predicate wffs	

               ■    (∀x)[P(x) → Q(x)]	

               ■    (∀x) ((∃y)[P(x,y) V Q(x,y)] → R(x)) 	

                        	

	

               ■    S(x,y) Λ R(x,y)	



Section 1.3                                 Quantifiers, Predicates and Validity            5
Scope of a variable in an expression

     ●        Brackets are used wisely to identify the scope of the variable.	

               ■    (∀x) [∃(y)[P(x,y) V Q(x,y)] → R(x)] 	

	

               ■    Scope of (∃y) is P(x,y) V Q(x,y) while the scope of (∀x) is the entire
                    expression.	

               ■    (∀x)S(x) V (∃y)R(y) 	

               ■    Scope of x is S(x) while the scope of y is R(y). 	

               ■    (∀x)[P(x,y) → (∃y) Q(x,y)]	

               ■    Scope of variable y is not defined for P(x,y) hence y is called a free
                    variable. Such expressions might not have a truth value at all.	

     ●        What is the truth of the expression	

               ■    ∃(x)[A(x) Λ ∀(y)[B(x,y) → C(y)]] in the interpretation	

               ■    A(x) is “x > 0” , B(x, y) is “x > y” and C(y) is “y ≤ 0” where the
                    domain of x is positive integers and the domain of y is all integers	



   True, x=1 is a positive integer and any integer less than x is ≤ 0 	


Section 1.3                                  Quantifiers, Predicates and Validity             6
Translation: Verbal statements to symbolic form
     ●        “Every person is nice” can be rephrased as “For any thing, if it
              is a person, then it is nice.” So, if P(x) is “x is a person” and Q
              (x) be “x is nice,” the statement can be symbolized as 	

               ■    (∀x)[P(x) → Q(x)]	

               ■    “All persons are nice” or “Each person is nice” will also have the
                    same symbolic form.	

     ●        “There is a nice person” can be rewritten as “There exists
              something that is both a person and nice.”	

               ■    In symbolic form, (∃x)[P(x) Λ Q(x)].	

               ■    Variations: “Some persons are nice” or “There are nice persons.”	

     ●        What would the following form mean for the example above?	

          	

    	

     	

      	

(∃x)[P(x) → Q(x)]	

               ■    This will only be true if there are no persons in the world but that
                    is not the case. 	

               ■    Hence such a statement is false, so almost always, ∃ goes with Λ
                    (conjunction) and ∀ goes with → (implication).	



Section 1.3                                  Quantifiers, Predicates and Validity          7
Translation
●    Hint: Avoid confusion by framing the statement in different forms as
     possible.	

●    The word “only” can be tricky depending on its presence in the
     statement.	

       ■      X loves only Y ⇔ If X loves anything, then that thing is Y.	

       ■      Only X loves Y ⇔ If anything loves Y, then it is X.	

       ■      X only loves Y ⇔ If X does anything to Y, then it is love.	

●    Example for forming symbolic forms from predicate symbols	

       ■      D(x) is “x is dog”; R(x) is “x is a rabbit”; C(x,y) is “x chases y”	

       ■      All dogs chase all rabbits ⇔ For anything, if it is a dog, then for any
              other thing, if it is a rabbit, then the dog chases it ⇔ (∀x)[D(x) → (∀y)(R
              (y) → C(x,y)]	

       ■      Some dogs chase all rabbits ⇔ There is something that is a dog and for
              any other thing, if that thing is a rabbit, then the dog chases it ⇔ (∃x)[D
              (x) Λ (∀y)(R(y) → C(x,y)]	

       ■      Only dogs chase rabbits ⇔ For any two things, if one is a rabbit and the
              other chases it, then the other is a dog ⇔ (∀y) (∀x)[R(y) Λ C(x,y) → D
              (x)]	

Section 1.3                              Quantifiers, Predicates and Validity          8
Negation of statements
   ●     A(x): Everything is fun	

   ●     Negation will be “it is false that everything is fun,” i.e. “something
         is nonfun.” 	

   ●     In symbolic form, [(∀x)A(x)]ʹ′ ⇔ (∃x)[A(x)]ʹ′ 	

   ●     Similarly negation of “Something is fun” is “Nothing is fun” or
         “Everything is boring.”	

   ●     Hence, [(∃x)A(x)]ʹ′ ⇔ (∀x)[A(x)]ʹ′ 	





Section 1.3                         Quantifiers, Predicates and Validity          9
Class Exercise
     ●        What is the negation of “Everybody loves somebody sometime.”	

               ■    Everybody hates somebody sometime	

               ■    Somebody loves everybody all the time	

               ■    Everybody hates everybody all the time	

               ■    Somebody hates everybody all the time	

                 √

     ●        What is the negation of the following statements?	

     ●        Some pictures are old and faded.       	

	

                  Every picture is neither old nor faded.	

     ●        All people are tall and thin. 	

      	

	

                  Someone is short or fat.	

     ●        Some students eat only pizza.   	

    	

	

                  Every student eats something that is not pizza.	

     ●        Only students eat pizza.        	

    	

	

                 There is a non-student who eats pizza.	


Section 1.3                                 Quantifiers, Predicates and Validity   10
Class exercise
     ●        S(x): x is a student; I(x): x is intelligent; M(x): x likes music	

     ●        Write wffs that express the following statements:	

               ■    All students are intelligent.	

                     For anything, if it is a student, then it is intelligent ⇔
                     (∀x)[S(x) → I (x)]
               ■    Some intelligent students like music.	

                     There is something that is intelligent and it is a student and it likes music ⇔
                     (∃x)[I(x) Λ S(x) Λ M(x)]
               ■    Everyone who likes music is a stupid student.	


               For anything, if that thing likes music, then it is a student and it is not intelligent ⇔
                (∀x)(M(x) → S(x) Λ [I (x)]ʹ′)

               ■    Only intelligent students like music.	

                    For any thing, if it likes music, then it is a student and it is intelligent ⇔
                    (∀x)(M(x) → S(x) Λ I(x))

Section 1.3                                     Quantifiers, Predicates and Validity                 11
Validity
     ●        Analogous to a tautology of propositional logic.	

     ●        Truth of a predicate wff depends on the interpretation.	

     ●        A predicate wff is valid if it is true in all possible interpretations
              just like a propositional wff is true if it is true for all rows of the
              truth table.	

     ●        A valid predicate wff is intrinsically true.	


                                        Propositional Wffs	

                            Predicate Wffs	


               Truth values	

 True or false – depends on                   True, false or neither (if the
                               the truth value of statement                 wff has a free variable)	

                               letters	

              Intrinsic truth	

 Tautology – true for all truth             Valid wff – true for all
                                 values of its statements	

                interpretations	

              Methodology	

 Truth table to determine if it                 No algorithm to determine
                             is a tautology	

                              validity	



Section 1.3                                       Quantifiers, Predicates and Validity                       12
Validity examples
     ●        (∀x)P(x) → (∃x)P(x)	

               ■    This is valid because if every object of the domain has a certain
                    property, then there exists an object of the domain that has the
                    same property.	

     ●        (∀x)P(x) → P(a)	

               ■    Valid – quite obvious since is a member of the domain of x.	

     ●        (∃x)P(x) → (∀x)P(x)	

               ■    Not valid since the property cannot be valid for all objects in the
                    domain if it is valid for some objects of than domain. Can use a
                    mathematical context to check as well. 	

               ■    Say P(x) = “x is even,” then there exists an integer that is even but
                    not every integer is even.	

     ●        (∀x)[P(x) V Q(x)] → (∀x)P(x) V (∀x)Q(x) 	

               ■    Invalid, can prove by mathematical context by taking P(x) = x is
                    even and Q(x) = x is odd. 	

               ■    In that case, the hypothesis is true but the conclusion is false
                    because it is not the case that every integer is even or that every
                    integer is odd.	

Section 1.3                                  Quantifiers, Predicates and Validity           13
Class Exercise
     ●        What is the truth of the following wffs where the domain consists
              of integers:	

     ●        (∀x)[L(x) → O(x)] where O(x) is “x is odd” and L(x) is “x < 10”?	

     ●        (∃y)(∀x)(x + y = 0)?	

     ●        (∃y)(∃x)(x2 = y)?	

     ●        (∀x)[x < 0 → (∃y)(y > 0 Λ x + y = 0)]?	


     ●        Using predicate symbols and appropriate quantifiers, write the
              symbolic form of the following English statement:	

     ●        D(x) is “x is a day” 	

M is “Monday”	

           	

T is “Tuesday”	

     ●        S(x) is “x is sunny” 	

       	

R(x) is “x is rainy”	

     ●        Some days are sunny and rainy.	

     ●        It is always a sunny day only if it is a rainy day.	

     ●        It rained both Monday and Tuesday.	

     ●        Every day that is rainy is not sunny.	


Section 1.3                                Quantifiers, Predicates and Validity         14

More Related Content

PPTX
Propositional logic
PPTX
TOPOLOGY and TYPES OF TOPOLOGY PowerPoint
PPTX
Context free grammar
PPTX
Limits of functions
PPTX
Mathematical induction
PPT
Mathematical Logic - Part 1
PPT
Set in discrete mathematics
PPTX
Logic (LESSON) - Truth Table, Negation, Conjunction, Dis junction,
Propositional logic
TOPOLOGY and TYPES OF TOPOLOGY PowerPoint
Context free grammar
Limits of functions
Mathematical induction
Mathematical Logic - Part 1
Set in discrete mathematics
Logic (LESSON) - Truth Table, Negation, Conjunction, Dis junction,

What's hot (20)

PPT
Absolute value functions
PPTX
Geometric Proofs
PPTX
Limits and continuity powerpoint
PPTX
t6 polar coordinates
PDF
Poset in Relations(Discrete Mathematics)
PPT
Predicates and Quantifiers
PDF
Formal Logic - Lesson 4 - Tautology, Contradiction and Contingency
PPTX
Differential equations
PPTX
Types of function
PDF
Intro to Discrete Mathematics
PPT
Context free grammars
PDF
Functions and Relations
PDF
Lecture: Context-Free Grammars
PPTX
Method of direct proof
PDF
Rules of inference
PPTX
Exponential and logarithmic functions
PPTX
Basic Calculus 11 - Derivatives and Differentiation Rules
PPT
Lec 01 proposition (Discrete Mathematics)
PPTX
Combined Functions
PPT
systems of linear equations & matrices
Absolute value functions
Geometric Proofs
Limits and continuity powerpoint
t6 polar coordinates
Poset in Relations(Discrete Mathematics)
Predicates and Quantifiers
Formal Logic - Lesson 4 - Tautology, Contradiction and Contingency
Differential equations
Types of function
Intro to Discrete Mathematics
Context free grammars
Functions and Relations
Lecture: Context-Free Grammars
Method of direct proof
Rules of inference
Exponential and logarithmic functions
Basic Calculus 11 - Derivatives and Differentiation Rules
Lec 01 proposition (Discrete Mathematics)
Combined Functions
systems of linear equations & matrices
Ad

Similar to CPSC 125 Ch 1 sec 3 (20)

PPTX
#4 formal methods – predicate logic
PDF
Lecture 2 predicates quantifiers and rules of inference
PPTX
predicate and appliedmathemeticsfour.pptx
DOCX
PPTX
PPT
Nested loop
PPTX
Quantifiers and its Types
PPT
Predicate Logic
PDF
Formal Logic - Lesson 8 - Predicates and Quantifiers
PPTX
CMSC 56 | Lecture 3: Predicates & Quantifiers
PPT
PredicateLogic (1).ppt
PPTX
PredicateLogic.pptx
PPTX
m.a.t.h.e.m.a.t.i.c.s.d.i.s.c.r.e.t.e.pptx
PPTX
Chapter 1.4.pptx Chapter 1.4.pptx DISCREATE MATH
PDF
Predicate Logic and Propositional Logic in Discrete Structure
PDF
Discrete Structure Lecture #5 & 6.pdf
PDF
02 Predicates and Quantifiers is about predicates
PDF
Formal languages
PDF
Predicate_Logic.pdf
PPTX
Ai quantifiers
#4 formal methods – predicate logic
Lecture 2 predicates quantifiers and rules of inference
predicate and appliedmathemeticsfour.pptx
Nested loop
Quantifiers and its Types
Predicate Logic
Formal Logic - Lesson 8 - Predicates and Quantifiers
CMSC 56 | Lecture 3: Predicates & Quantifiers
PredicateLogic (1).ppt
PredicateLogic.pptx
m.a.t.h.e.m.a.t.i.c.s.d.i.s.c.r.e.t.e.pptx
Chapter 1.4.pptx Chapter 1.4.pptx DISCREATE MATH
Predicate Logic and Propositional Logic in Discrete Structure
Discrete Structure Lecture #5 & 6.pdf
02 Predicates and Quantifiers is about predicates
Formal languages
Predicate_Logic.pdf
Ai quantifiers
Ad

More from David Wood (20)

PPTX
Internet of Things (IoT) two-factor authentication using blockchain
PPTX
Returning to Online Privacy?
PPTX
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
PPTX
BlockSW 2019 Keynote
PDF
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
PDF
Privacy in the Smart City
PDF
Controlling Complexities in Software Development
PDF
Privacy Concerns related to Verifiable Claims
PDF
Implementing the Verifiable Claims data model
PDF
So You Wanna be a Startup CTO 20170301
PDF
Functional manipulations of large data graphs 20160601
PDF
When Metaphors Kill
PDF
Secularism in Australia
PDF
Meditations on Writing in Paradoxes, Oxymorons, and Pleonasms
PDF
Building a writer's platform with social media
PDF
Summary of the Hero's Journey
PDF
Open by Default
PDF
Lod Then, Now and Next 20110926
PDF
Linked Data ROI 20110426
PDF
Introduction to Linked Data: RDF Vocabularies
Internet of Things (IoT) two-factor authentication using blockchain
Returning to Online Privacy?
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
BlockSW 2019 Keynote
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
Privacy in the Smart City
Controlling Complexities in Software Development
Privacy Concerns related to Verifiable Claims
Implementing the Verifiable Claims data model
So You Wanna be a Startup CTO 20170301
Functional manipulations of large data graphs 20160601
When Metaphors Kill
Secularism in Australia
Meditations on Writing in Paradoxes, Oxymorons, and Pleonasms
Building a writer's platform with social media
Summary of the Hero's Journey
Open by Default
Lod Then, Now and Next 20110926
Linked Data ROI 20110426
Introduction to Linked Data: RDF Vocabularies

Recently uploaded (20)

PDF
A review of recent deep learning applications in wood surface defect identifi...
PPTX
Chapter 5: Probability Theory and Statistics
PPT
What is a Computer? Input Devices /output devices
PPTX
2018-HIPAA-Renewal-Training for executives
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
DOCX
search engine optimization ppt fir known well about this
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
1 - Historical Antecedents, Social Consideration.pdf
PPTX
Modernising the Digital Integration Hub
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PPTX
Configure Apache Mutual Authentication
PDF
Abstractive summarization using multilingual text-to-text transfer transforme...
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Architecture types and enterprise applications.pdf
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
CloudStack 4.21: First Look Webinar slides
PPTX
The various Industrial Revolutions .pptx
PDF
Developing a website for English-speaking practice to English as a foreign la...
A review of recent deep learning applications in wood surface defect identifi...
Chapter 5: Probability Theory and Statistics
What is a Computer? Input Devices /output devices
2018-HIPAA-Renewal-Training for executives
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
search engine optimization ppt fir known well about this
Hindi spoken digit analysis for native and non-native speakers
Getting started with AI Agents and Multi-Agent Systems
1 - Historical Antecedents, Social Consideration.pdf
Modernising the Digital Integration Hub
The influence of sentiment analysis in enhancing early warning system model f...
Configure Apache Mutual Authentication
Abstractive summarization using multilingual text-to-text transfer transforme...
A comparative study of natural language inference in Swahili using monolingua...
Architecture types and enterprise applications.pdf
Enhancing emotion recognition model for a student engagement use case through...
CloudStack 4.21: First Look Webinar slides
The various Industrial Revolutions .pptx
Developing a website for English-speaking practice to English as a foreign la...

CPSC 125 Ch 1 sec 3

  • 1. Formal Logic Mathematical Structures for Computer Science Chapter 1 Copyright © 2006 W.H. Freeman & Co. MSCS Slides Formal Logic
  • 2. Variables and Statements ●  Variables in Logic ●  A variable is a symbol that stands for an individual in a collection or set. For example, the variable x may stand for one of the days. We may let x = Monday or x = Tuesday, etc. ●  Incomplete Statements ●  A sentence containing a variable is called an incomplete statement. An incomplete statement is about the individuals in a definite domain or set. When we replace the variable by the name of an individual in the set we obtain a statement about that individual. ■  Example of an incomplete statement : “x has 30 days.” ●  Here, x can be any month and substituting that, we will get a complete statement. Section 1.3 Quantifiers, Predicates and Validity 1
  • 3. Quantifiers and Predicates ●  Quantifiers: ●  Quantifiers are phrases that refer to given quantities, such as “for some” or “for all” or “for every,” indicating how many objects have a certain property. ●  Two kinds of quantifiers: Universal and Existential ●  Universal Quantifier: represented by ∀ ●  The symbol is translated as and means “for all”, “given any”, “for each,” or “for every,” and is known as the universal quantifier. ●  Existential Quantifier: represented by ∃ ●  The symbol is translated as and means variously “for some,” “there exists,” “there is a,” or “for at least one”. Section 1.3 Quantifiers, Predicates and Validity 2
  • 4. Quantifiers and Predicates ●  Predicate ●  It is the verbal statement that describes the property of a variable. Usually represented by the letter P, the notation P(x) is used to represent some unspecified property or predicate that x may have ■  e.g. P(x) = x has 30 days. ■  P(April) = April has 30 days. ●  Combining the quantifier and the predicate, we get a complete statement of the form ∀(x)P(x) or ∃(x)P(x). ●  The collection of objects that satisfy the property P(x) is called the domain of interpretation. ●  Truth value of expressions formed using quantifiers and predicates ■  What is the truth value of ∀(x)P(x) where x is all the months and P(x) = x has less than 32 days. ■  Undoubtedly, the above is true since no month has 32 days. Section 1.3 Quantifiers, Predicates and Validity 3
  • 5. Truth value of the following expressions ●  Truth of expression ∀(x)P(x) 1.  P(x) is the property that x is yellow, and the domain of interpretation is the collection of all flowers: not true 2.  P(x) is the property that x is a plant, and the domain of interpretation is the collection of all flowers: true 3.  P(x) is the property that x is positive, and the domain of interpretation consists of integers: not true ■  Can you find one interpretation in which both ∀(x)P(x) is true and ∃(x)P(x) is false? Not possible ■  Can you find one interpretation in which both ∃(x)P(x) is true and ∀(x)P(x) is false? Case 1 as mentioned above ●  Predicates involving properties of single variables : unary predicates ●  Binary, ternary and n-ary predicates are also possible. ■  (∀x) (∃y)Q(x,y) is a binary predicate. This expression reads as “for every x there exists a y such that Q(x,y).” Section 1.3 Quantifiers, Predicates and Validity 4
  • 6. Interpretation ●  Formal definition: An interpretation for an expression involving predicates consists of the following: A collection of objects, called the domain of interpretation, which must include at least one object. An assignment of a property of the objects in the domain to each predicate in the expression. An assignment of a particular object in the domain to each constant symbol in the expression. ●  Predicate wffs can be built similar to propositional wffs using logical connectives with predicates and quantifiers. ●  Examples of predicate wffs ■  (∀x)[P(x) → Q(x)] ■  (∀x) ((∃y)[P(x,y) V Q(x,y)] → R(x)) ■  S(x,y) Λ R(x,y) Section 1.3 Quantifiers, Predicates and Validity 5
  • 7. Scope of a variable in an expression ●  Brackets are used wisely to identify the scope of the variable. ■  (∀x) [∃(y)[P(x,y) V Q(x,y)] → R(x)] ■  Scope of (∃y) is P(x,y) V Q(x,y) while the scope of (∀x) is the entire expression. ■  (∀x)S(x) V (∃y)R(y) ■  Scope of x is S(x) while the scope of y is R(y). ■  (∀x)[P(x,y) → (∃y) Q(x,y)] ■  Scope of variable y is not defined for P(x,y) hence y is called a free variable. Such expressions might not have a truth value at all. ●  What is the truth of the expression ■  ∃(x)[A(x) Λ ∀(y)[B(x,y) → C(y)]] in the interpretation ■  A(x) is “x > 0” , B(x, y) is “x > y” and C(y) is “y ≤ 0” where the domain of x is positive integers and the domain of y is all integers True, x=1 is a positive integer and any integer less than x is ≤ 0 Section 1.3 Quantifiers, Predicates and Validity 6
  • 8. Translation: Verbal statements to symbolic form ●  “Every person is nice” can be rephrased as “For any thing, if it is a person, then it is nice.” So, if P(x) is “x is a person” and Q (x) be “x is nice,” the statement can be symbolized as ■  (∀x)[P(x) → Q(x)] ■  “All persons are nice” or “Each person is nice” will also have the same symbolic form. ●  “There is a nice person” can be rewritten as “There exists something that is both a person and nice.” ■  In symbolic form, (∃x)[P(x) Λ Q(x)]. ■  Variations: “Some persons are nice” or “There are nice persons.” ●  What would the following form mean for the example above? (∃x)[P(x) → Q(x)] ■  This will only be true if there are no persons in the world but that is not the case. ■  Hence such a statement is false, so almost always, ∃ goes with Λ (conjunction) and ∀ goes with → (implication). Section 1.3 Quantifiers, Predicates and Validity 7
  • 9. Translation ●  Hint: Avoid confusion by framing the statement in different forms as possible. ●  The word “only” can be tricky depending on its presence in the statement. ■  X loves only Y ⇔ If X loves anything, then that thing is Y. ■  Only X loves Y ⇔ If anything loves Y, then it is X. ■  X only loves Y ⇔ If X does anything to Y, then it is love. ●  Example for forming symbolic forms from predicate symbols ■  D(x) is “x is dog”; R(x) is “x is a rabbit”; C(x,y) is “x chases y” ■  All dogs chase all rabbits ⇔ For anything, if it is a dog, then for any other thing, if it is a rabbit, then the dog chases it ⇔ (∀x)[D(x) → (∀y)(R (y) → C(x,y)] ■  Some dogs chase all rabbits ⇔ There is something that is a dog and for any other thing, if that thing is a rabbit, then the dog chases it ⇔ (∃x)[D (x) Λ (∀y)(R(y) → C(x,y)] ■  Only dogs chase rabbits ⇔ For any two things, if one is a rabbit and the other chases it, then the other is a dog ⇔ (∀y) (∀x)[R(y) Λ C(x,y) → D (x)] Section 1.3 Quantifiers, Predicates and Validity 8
  • 10. Negation of statements ●  A(x): Everything is fun ●  Negation will be “it is false that everything is fun,” i.e. “something is nonfun.” ●  In symbolic form, [(∀x)A(x)]ʹ′ ⇔ (∃x)[A(x)]ʹ′ ●  Similarly negation of “Something is fun” is “Nothing is fun” or “Everything is boring.” ●  Hence, [(∃x)A(x)]ʹ′ ⇔ (∀x)[A(x)]ʹ′ Section 1.3 Quantifiers, Predicates and Validity 9
  • 11. Class Exercise ●  What is the negation of “Everybody loves somebody sometime.” ■  Everybody hates somebody sometime ■  Somebody loves everybody all the time ■  Everybody hates everybody all the time ■  Somebody hates everybody all the time √ ●  What is the negation of the following statements? ●  Some pictures are old and faded. Every picture is neither old nor faded. ●  All people are tall and thin. Someone is short or fat. ●  Some students eat only pizza. Every student eats something that is not pizza. ●  Only students eat pizza. There is a non-student who eats pizza. Section 1.3 Quantifiers, Predicates and Validity 10
  • 12. Class exercise ●  S(x): x is a student; I(x): x is intelligent; M(x): x likes music ●  Write wffs that express the following statements: ■  All students are intelligent. For anything, if it is a student, then it is intelligent ⇔ (∀x)[S(x) → I (x)] ■  Some intelligent students like music. There is something that is intelligent and it is a student and it likes music ⇔ (∃x)[I(x) Λ S(x) Λ M(x)] ■  Everyone who likes music is a stupid student. For anything, if that thing likes music, then it is a student and it is not intelligent ⇔ (∀x)(M(x) → S(x) Λ [I (x)]ʹ′) ■  Only intelligent students like music. For any thing, if it likes music, then it is a student and it is intelligent ⇔ (∀x)(M(x) → S(x) Λ I(x)) Section 1.3 Quantifiers, Predicates and Validity 11
  • 13. Validity ●  Analogous to a tautology of propositional logic. ●  Truth of a predicate wff depends on the interpretation. ●  A predicate wff is valid if it is true in all possible interpretations just like a propositional wff is true if it is true for all rows of the truth table. ●  A valid predicate wff is intrinsically true. Propositional Wffs Predicate Wffs Truth values True or false – depends on True, false or neither (if the the truth value of statement wff has a free variable) letters Intrinsic truth Tautology – true for all truth Valid wff – true for all values of its statements interpretations Methodology Truth table to determine if it No algorithm to determine is a tautology validity Section 1.3 Quantifiers, Predicates and Validity 12
  • 14. Validity examples ●  (∀x)P(x) → (∃x)P(x) ■  This is valid because if every object of the domain has a certain property, then there exists an object of the domain that has the same property. ●  (∀x)P(x) → P(a) ■  Valid – quite obvious since is a member of the domain of x. ●  (∃x)P(x) → (∀x)P(x) ■  Not valid since the property cannot be valid for all objects in the domain if it is valid for some objects of than domain. Can use a mathematical context to check as well. ■  Say P(x) = “x is even,” then there exists an integer that is even but not every integer is even. ●  (∀x)[P(x) V Q(x)] → (∀x)P(x) V (∀x)Q(x) ■  Invalid, can prove by mathematical context by taking P(x) = x is even and Q(x) = x is odd. ■  In that case, the hypothesis is true but the conclusion is false because it is not the case that every integer is even or that every integer is odd. Section 1.3 Quantifiers, Predicates and Validity 13
  • 15. Class Exercise ●  What is the truth of the following wffs where the domain consists of integers: ●  (∀x)[L(x) → O(x)] where O(x) is “x is odd” and L(x) is “x < 10”? ●  (∃y)(∀x)(x + y = 0)? ●  (∃y)(∃x)(x2 = y)? ●  (∀x)[x < 0 → (∃y)(y > 0 Λ x + y = 0)]? ●  Using predicate symbols and appropriate quantifiers, write the symbolic form of the following English statement: ●  D(x) is “x is a day” M is “Monday” T is “Tuesday” ●  S(x) is “x is sunny” R(x) is “x is rainy” ●  Some days are sunny and rainy. ●  It is always a sunny day only if it is a rainy day. ●  It rained both Monday and Tuesday. ●  Every day that is rainy is not sunny. Section 1.3 Quantifiers, Predicates and Validity 14