<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="m10518">
  
<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Comp280 hw03: First-order logic</name>
<metadata xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
  <md:version xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2.18</md:version>
  <md:created xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2002/02/18 18:00:00 US/Central</md:created>
  <md:revised xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2004/05/28 13:47:14.180 GMT-5</md:revised>
  <md:authorlist xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
      <md:author xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="ian">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Ian</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Barland</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">ian@cs.rice.edu</md:email>
    </md:author>
      <md:author xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="greiner">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">John</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Greiner</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">greiner@cs.rice.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="ian">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Ian</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Barland</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">ian@cs.rice.edu</md:email>
    </md:maintainer>
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="peggy">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Peggy</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Fidelman</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">peggy@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="greiner">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">John</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Greiner</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">greiner@cs.rice.edu</md:email>
    </md:maintainer>
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="justin">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Justin</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Garcia</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">bih@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="cohen">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Brian</md:firstname>
      <md:othername xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">E</md:othername>
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Cohen</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">cohen@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="set">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Sarah</md:firstname>
      <md:othername xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Elizabeth</md:othername>
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Trowbridge</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">set@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="seleniat">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Bryan</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Cash</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">seleniat@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="iamjack">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Fuching</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Chi</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">iamjack@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  

  <md:abstract xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Solve these problems!</md:abstract>
</metadata>






<content xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">

<note xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="Due">
2004.Feb.10 (Tues), 17:00, Duncan 3117.
</note>

<exercise xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="exercise1">
<problem xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"><para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para1"> (2pts)
Add yourself to the 
<link xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" src="http://www.cs.rice.edu/~grademgr/add-student.shtml">online 
grade-database</link>.
This part is due by Monday Feb.09, 17:00,
so that we can return earlier homeworks to you in class on Tuesday 10th!
</para>
</problem>

</exercise>


<section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="section1">
<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">First-order logic</name>

<exercise xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="exercise2">
<problem xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para2">
(3 pts.) Rosen, Section 1.3, pg.44, #58.
     <note xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="N.B.">Carried over from original hw02 assignment.</note>
     <note xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="Hint">Express all formulas using <m:math><m:mo>∀</m:mo></m:math>,
            to make your life easier for part (d).</note>
   <list xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="list1">
   <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> No ducks are willing to waltz
   </item>
   <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> No officers ever decline to waltz
   </item>
   <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> All my poultry are ducks
   </item>
   <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> My poultry are not officers
   </item>
   <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> Does (d) follow from (a), (b), (c) ?
          Argue informally; you don't need to use the 
          algebra or inference rules for first-order logic here.
   </item>
   </list>
</para>
</problem>

</exercise>


<exercise xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="exercise3">
<problem xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para3"> (4pts)
You come home one evening
to find your roommate exuberant because
they have managed to prove that there is an even prime numbers bigger than two.
More precisely, they have a correct proof of
       <m:math><m:mo>∃</m:mo><m:ci>y</m:ci><m:mtext>.</m:mtext><m:mfenced open="(" close=")" separators=""><m:mfenced open="(" close=")" separators=""><m:mo>P</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>y</m:ci></m:mfenced> <m:mo>∧</m:mo> <m:reln><m:gt/><m:ci>y</m:ci><m:cn>2</m:cn></m:reln></m:mfenced> <m:mo>→</m:mo> <m:mo>E</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>y</m:ci></m:mfenced></m:mfenced></m:math>
       ,
for the domain of natural numbers
with 
<m:math><m:mo>P</m:mo></m:math>
interpreted as "is prime?" and
<m:math><m:mo>E</m:mo></m:math>
interpreted as "is even?".
While they are celebrating their imminent fame at this amazing mathematical
discovery, you ponder…
</para>
<list xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="list2">
<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
…and realize the formula is indeed true 
for that interpretation.
Briefly explain why.
(You don't need to give a formal proof using inference rules or boolean algebra;
just give a particular value for <m:math><m:ci>y</m:ci></m:math> and explain why
 it does satisfy the body of "<m:math><m:mo>∃</m:mo><m:ci>y</m:ci><m:mtext>.</m:mtext></m:math>".)
</item>
<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
Is their formula still true, when restricted to
the domain of natural numbers two or less?
(Using the same interpretation of
<m:math><m:mo>P</m:mo></m:math>,
<m:math><m:mo>E</m:mo></m:math>.
Briefly explain why.
</item>
<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
Is their formula still true, when restricted to the empty domain?
Briefly explain why.
</item>
<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
Give a formula that <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">does</emphasis> actually capture the
notion "there is an even prime number bigger than 2".
</item>
</list>
</problem>

</exercise>



<exercise xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="exercise4">
  <problem xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para4"> (Extra Credit 2 pts) 
    For the sentence
    <m:math><m:mo>∀</m:mo><m:ci>x</m:ci><m:mtext>.</m:mtext>
       <m:mo>∀</m:mo><m:ci>y</m:ci><m:mtext>.</m:mtext>
          <m:mfenced open="(" close=")" separators=""><m:mfenced open="(" close=")" separators=""><m:mo>A</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>x</m:ci></m:mfenced> <m:mo>∧</m:mo> <m:mo>B</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>x</m:ci><m:ci>y</m:ci></m:mfenced></m:mfenced> <m:mo>→</m:mo> <m:mo>A</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>y</m:ci></m:mfenced></m:mfenced></m:math>
       
    
    state whether it is true or false,
    relative to the following interpretations:
    <list xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="enumerated" id="list3">
      <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> The domain of the natural numbers, where 
             <m:math><m:mo>A</m:mo></m:math> is interpreted as "even?" and 
             <m:math><m:mo>B</m:mo></m:math> is interpreted as "equals"
      </item>
      <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> The domain of the Booleans (just {<m:math><m:true/></m:math>, <m:math><m:false/></m:math>}), where 
             <m:math><m:mo>A</m:mo></m:math> is interpreted as "false?" and 
             <m:math><m:mo>B</m:mo></m:math> is interpreted as "equals"
      </item>
      <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> The domain of WaterWorld locations
             in the particular board
             where locations Y and Z contain pirates,
             but all other locations are safe,
             and the relation symbol
             <m:math><m:mo>A</m:mo></m:math> is interpreted as "safe?" and 
             <m:math><m:mo>B</m:mo></m:math> is interpreted as "neighbors"
      </item>
      <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> All WaterWorld boards, where
             <m:math><m:mo>A</m:mo></m:math> is interpreted as "safe?" and 
             <m:math><m:mo>B</m:mo></m:math> is interpreted as "neighbors".
             (That is, is the formula valid for WaterWorld?)
      </item>
    </list>
    </para>
  </problem>

  
</exercise>






<exercise xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="exercise5">
  <problem xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para5"> (5pts)
    Translate the following conversational English 
     statements
    into first-order logic, using the suggested predicates,
    or inventing appropriately-named ones if none provided.
    (You may also freely use <m:math><m:mo>=</m:mo></m:math>,
     which (for us) is always interpreted as equality.)

    

    For the WaterWorld problems,
    use the set of locations as the domain, and use predicates 
    <m:math><m:mo>nhbr</m:mo></m:math> (binary), and unary predicates
    <m:math><m:mo>hasPirate</m:mo></m:math>, <m:math><m:mo>shows3</m:mo></m:math>, and <m:math><m:mo>shows2</m:mo></m:math>.

    
    </para>

    <list xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="enumerated" id="list4">

         <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
            "All books rare and used".
           This is claimed by a local bookstore;
                
           what is the intended domain?
           Do you believe they mean to claim
           "all books rare <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">or</emphasis> used"?
         </item>

      <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> "Everybody who has truly been kidnapped by a UFO
             knows that Agent Mulder is alive."
            (Is this true, presuming that no UFOs have actually 
             visited Earth…yet?)
      </item>


      <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> "In WaterWorld, location <m:math><m:ci>λ</m:ci></m:math> has exactly one neighbor."
             (Your answer will be a formula with <m:math><m:ci>λ</m:ci></m:math> free,
              just as in the notes we developed formulas like "<m:math><m:ci>n</m:ci></m:math> is prime"
              where <m:math><m:ci>n</m:ci></m:math> was free.)
      </item>

      <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> "If a WaterWorld location shows a 3, 
             then any neighboring location is a pirate."
             (This is only true for certain boards.)
      </item>

      <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> "If a WaterWorld location shows a 1, 
             and has exactly one neighbors,
             then that neighbor has a pirate."
           Re-use existing code!
      </item>


      
    


    

   

      

      

      

      
    </list>
  </problem>

  
</exercise>

<exercise xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="exercise6">
      <problem xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"><para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para6">  (Extra Credit 2pts)
       Write a formula that is 
        the conjunction of
          <list xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="enumerated" id="list5">
            <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
             All for one, and one for all!
            </item>
            <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
             If you're not for us, you're against us.
            </item>
            <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
             The enemy of your enemy is your friend.
            </item>
            <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Somebody has an enemy.
              (Not sure of an aphorism expressing this.
               Maybe, ``Life's not a bed of roses''?)
              
            </item>
            </list>
        Use just the relations 
            <m:math><m:mo>isFor</m:mo></m:math>, and
            <m:math><m:mo>isAgainst</m:mo></m:math>,
        both to be interpreted on pairs of people.
        Clarifying some of the ambiguous English: 
          <list xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="list6">
            <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">We'll take "one" to mean "one particular person".
             <note xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="footnote">
              Dumas' original musketeers presumably meant something
              different -- that <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">each</emphasis> one of
              them was for all; but this makes the sentence more
              boring for domains which include everybody,
              rather than just Athos, Porthos, and Aramis.)
             The English is meant to convey group unity --
             so, the first part is trying to say  
             "All for [the same] one particular person",
             rather than "each for their own one favorite."
             (Whew, natural language sure can be ambiguous!
              'Course, that's one of its strengths, in non-engineering areas.)
             </note>
            </item>
            <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
             For "us", we'll take it to mean "any one particular individual".
             You can think of it as each person saying to each other,
               "if you're not for me, you're against me".  Similarly for "you".
             This captures the intent of the English -- these sayings are
             meant to apply to everybody, not just one particular person.
            </item>
            <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
             "your enemy" will mean "somebody you are against",
             and "your friend" will mean "somebody you are for".
             (Careful -- this may be different 
             than "somebody who is against/for you").
            </item>
            </list>
      </para>
          
           <note xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="aside">
            For clarity feel free to express the formula in parts:

    "<m:math><m:mfenced open="(" close=")" separators=""><m:msub><m:ci>φ</m:ci><m:cn>1</m:cn></m:msub> <m:mo>∧</m:mo> <m:msub><m:ci>φ</m:ci><m:cn>2</m:cn></m:msub> <m:mo>∧</m:mo> <m:msub><m:ci>φ</m:ci><m:cn>3</m:cn></m:msub> <m:mo>∧</m:mo> <m:msub><m:ci>φ</m:ci><m:cn>4</m:cn></m:msub></m:mfenced></m:math>,
    where 
    <m:math><m:msub><m:ci>φ</m:ci><m:cn>1</m:cn></m:msub></m:math> = …,
    <m:math><m:msub><m:ci>φ</m:ci><m:cn>2</m:cn></m:msub></m:math> = …,
     …."
This is akin simplifying code into subroutines -- even in
situations where you don't call the subroutine more than once,
it still adds clarity.

You don't <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">have</emphasis> to split up your answer like this;
some people might want
to have quantifiers that span all four concepts; that's
okay, though still strive for an formula that clearly
corresponds to the question.
</note>

</problem>

</exercise>

<exercise xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="exercise7">
<problem xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para7"> (Extra Credit 2pts)
      For the four-part "Musketeer" formula from the preceding exercise,
          find two (fundamentally different) interpretations
          of <m:math><m:mo>isFor</m:mo></m:math> which satisfy the
          formula on a domain of three people.
</para>
<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para8">       
          (Depict each of these interpretations as a <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">graph</term> --
           draw three  circles (<term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">nodes</term>) representing the
           three people, and an arrow (<term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">edge</term>) from a person
           to each person they like.
           (You can glance at Rosen p.542 (Section 8.1), Figure 8 for
            one such example of a graph.)
           
</para>
</problem>

</exercise>

<exercise xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="exercise8">
  <problem xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para9"> (7pts)
    Translate the following statements into first-order logic.
    The domain is to be natural numbers, and the binary relation
    <m:math><m:mo>kth</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>k</m:ci><m:ci>n</m:ci></m:mfenced></m:math>
    indicates whether or not 
    the <m:math><m:ci>k</m:ci></m:math>th number of the sequence
    is <m:math><m:ci>n</m:ci></m:math>.
    That is, for the sequence 
    &lt;5,7,5&gt;,
    the corresponding relation <m:math><m:mo>kth</m:mo></m:math> is 
    {(1,5), (2,7), (3,5)}. 

       
       
    You can also use the binary relations
    <m:math><m:mo>=</m:mo></m:math>, <m:math><m:mo>&lt;</m:mo></m:math>,
    and/or <m:math><m:mo>&lt;=</m:mo></m:math> but no others.
    </para>

    <list xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="enumerated" id="list7">
      <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> The sequence is finite.
      </item>
      <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> The sequence contains three unique numbers 
         <note xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
           Containing three numbers doesn't preclude it containing
           more than three.
         </note>
      </item>
      <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> The sequence is sorted.
             (What, exactly, does your formula "sorted" capture --
              ascending, descending;
              allowing duplicates (i.e. non-decreasing or non-increasing)?
              Any of those four are fine, but say which yours is.)
      </item>
      <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> 
             The sequence is sorted except for (up to) one location.
             (For example, the sequence  &lt; 20, 30, 1, 40, 50 &gt;.)
      </item>
    </list>
  </problem>

  
</exercise>

  

<exercise xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="exercise9">
<problem xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
  <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para10">(7 pts)
  Alternation of quantifiers:
  Determine the truth of each of the following sentences
  in each of the indicated domains.
  <note xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="hint">
    To help yourself, you might want to develop an
    English version of what the logic sentences say.
  </note>
  
  <list xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="list8">
    <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> S2:
           <m:math><m:mo>∀</m:mo><m:ci>x</m:ci><m:mtext>.</m:mtext>
              <m:mo>∀</m:mo><m:ci>y</m:ci><m:mtext>.</m:mtext>
                 <m:mo>∃</m:mo><m:ci>z</m:ci><m:mtext>.</m:mtext> 
                    <m:mfenced open="(" close=")" separators=""><m:mo>likes</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>x</m:ci><m:ci>y</m:ci></m:mfenced> <m:mo>∧</m:mo> <m:mfenced open="(" close=")" separators=""><m:apply><m:mo>¬</m:mo><m:apply><m:mo>=</m:mo><m:ci>z</m:ci> <m:ci>y</m:ci></m:apply></m:apply> <m:mo>→</m:mo> <m:mfenced open="" close="" separators=""><m:mo>¬</m:mo><m:mo>likes</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>y</m:ci><m:ci>z</m:ci></m:mfenced></m:mfenced></m:mfenced></m:mfenced></m:math>
                 
              
           
    </item>
    <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> S3:
           <m:math><m:mo>∃</m:mo><m:ci>x</m:ci><m:mtext>.</m:mtext>
              <m:mo>∀</m:mo><m:ci>y</m:ci><m:mtext>.</m:mtext>
                 <m:mo>∀</m:mo><m:ci>z</m:ci><m:mtext>.</m:mtext> 
                    <m:mfenced open="(" close=")" separators=""><m:mo>likes</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>x</m:ci><m:ci>y</m:ci></m:mfenced> <m:mo>∧</m:mo> <m:mfenced open="(" close=")" separators=""><m:apply><m:mo>¬</m:mo><m:apply><m:mo>=</m:mo><m:ci>z</m:ci> <m:ci>y</m:ci></m:apply></m:apply> <m:mo>→</m:mo> <m:mfenced open="" close="" separators=""><m:mo>¬</m:mo><m:mo>likes</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>y</m:ci><m:ci>z</m:ci></m:mfenced></m:mfenced></m:mfenced></m:mfenced></m:math>
                 
              
           
    </item>
    <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> S4:
           <m:math><m:mo>∃</m:mo><m:ci>x</m:ci><m:mtext>.</m:mtext>
              <m:mo>∃</m:mo><m:ci>y</m:ci><m:mtext>.</m:mtext>
                 <m:mo>∀</m:mo><m:ci>z</m:ci><m:mtext>.</m:mtext> 
                    <m:mfenced open="(" close=")" separators=""><m:mo>likes</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>x</m:ci><m:ci>y</m:ci></m:mfenced> <m:mo>∧</m:mo> <m:mfenced open="(" close=")" separators=""><m:apply><m:mo>¬</m:mo><m:apply><m:mo>=</m:mo><m:ci>z</m:ci> <m:ci>y</m:ci></m:apply></m:apply> <m:mo>→</m:mo> <m:mfenced open="" close="" separators=""><m:mo>¬</m:mo><m:mo>likes</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>y</m:ci><m:ci>z</m:ci></m:mfenced></m:mfenced></m:mfenced></m:mfenced></m:math>
                 
              
            
    </item>
    <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> S5:
           <m:math><m:mo>∀</m:mo><m:ci>x</m:ci><m:mtext>.</m:mtext>
              <m:mo>∃</m:mo><m:ci>y</m:ci><m:mtext>.</m:mtext>
                 <m:mo>∀</m:mo><m:ci>z</m:ci><m:mtext>.</m:mtext> 
                    <m:mfenced open="(" close=")" separators=""><m:mo>likes</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>x</m:ci><m:ci>y</m:ci></m:mfenced> <m:mo>∧</m:mo> <m:mfenced open="(" close=")" separators=""><m:apply><m:mo>¬</m:mo><m:apply><m:mo>=</m:mo><m:ci>z</m:ci> <m:ci>y</m:ci></m:apply></m:apply> <m:mo>→</m:mo> <m:mfenced open="" close="" separators=""><m:mo>¬</m:mo><m:mo>likes</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>y</m:ci><m:ci>z</m:ci></m:mfenced></m:mfenced></m:mfenced></m:mfenced></m:math>
                 
              
           
    </item>
  </list>
  </para>

  <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para11">
  <list xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="list9">
    <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> D0: The empty domain.
    </item>
    <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> D1: A world with one person, who doesn't like herself.
    </item>
    <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> D2: A world with Yorick and Zelda,
           where Yorick likes Zelda, Zelda likes herself, and that's all.
    </item>
    <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> D3: A world with many people, including 
           CJ (Catherine Zeta-Jones), JC (John Cusack), and
           JR (Julia Roberts).
           Everybody likes themselves;
           everybody likes JC;
           everybody likes CJ except JR;
           everybody likes JR except CJ and IB.
           Any others may or may not like each other, as you choose,
             subject to the preceding.
           (You may wish to sketch a graph of this <m:math><m:mo>likes</m:mo></m:math>
            relation.)
    </item>
  </list>
  Note how we don't just specify the domain
  which the logic variables range over,
  but also how to interpret the logic's relation-symbol <m:math><m:mo>likes</m:mo></m:math>.
  </para>

  <table xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" rowsep="true" colsep="true" frame="all" pgwide="no" id="table1">
    <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Determine the truth of these combinations.</name>
 
    
<tgroup xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" cols="5" align="center" colsep="1" rowsep="1">
<thead xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">\\</entry><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">D0</entry><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">D1</entry><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">D2</entry><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">D3</entry></row></thead>

<tbody xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">S2 </entry><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> </entry><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> </entry><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> </entry><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> </entry></row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">S3 </entry><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> </entry><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> </entry><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> </entry><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> </entry></row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">S4 </entry><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> </entry><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> </entry><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> </entry><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> </entry></row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">S5 </entry><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> </entry><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> </entry><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> </entry><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> </entry></row></tbody>
</tgroup>
  </table>
  </problem>

  
</exercise>

</section> 


<section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="section2">
<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Reasoning with Equivalences</name>

<exercise xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="exercise10">
  <problem xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para12"> (4pts)
    In class, we characterized a prime number as
    a number <m:math><m:ci>z</m:ci></m:math> satisfying
    <m:math><m:mo>∀</m:mo><m:ci>q</m:ci><m:mtext>.</m:mtext>
       <m:mo>∀</m:mo><m:ci>r</m:ci><m:mtext>.</m:mtext>
          <m:mfenced open="(" close=")" separators=""><m:apply><m:mo>=</m:mo><m:apply><m:times/><m:ci>q</m:ci> <m:ci>r</m:ci></m:apply> <m:ci>z</m:ci></m:apply> <m:mo>→</m:mo> <m:mfenced open="(" close=")" separators=""><m:apply><m:mo>=</m:mo><m:ci>q</m:ci> <m:cn>1</m:cn></m:apply> <m:mo>∨</m:mo> <m:apply><m:mo>=</m:mo><m:ci>r</m:ci> <m:cn>1</m:cn></m:apply></m:mfenced></m:mfenced></m:math>
       
    .
    Using the algebraic equivalences for first-order logic,
    show step-by-step that this is equivalent to the formula
    <m:math><m:mfenced open="" close="" separators=""><m:mo>¬</m:mo> <m:mo>∃</m:mo><m:ci>q</m:ci><m:mtext>.</m:mtext>
             <m:mo>∃</m:mo><m:ci>r</m:ci><m:mtext>.</m:mtext>
                <m:mfenced open="(" close=")" separators=""><m:apply><m:mo>=</m:mo><m:apply><m:times/><m:ci>q</m:ci><m:ci>r</m:ci></m:apply> <m:ci>z</m:ci></m:apply> <m:mo>∧</m:mo> <m:apply><m:mo>¬</m:mo><m:apply><m:mo>=</m:mo><m:ci>q</m:ci> <m:cn>1</m:cn></m:apply></m:apply> <m:mo>∧</m:mo> <m:apply><m:mo>¬</m:mo><m:apply><m:mo>=</m:mo><m:ci>r</m:ci> <m:cn>1</m:cn></m:apply></m:apply></m:mfenced>
             
          
    </m:mfenced></m:math>.
    </para>
  </problem>

  
</exercise>

<exercise xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="exercise11">
  <problem xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para13"> (5pts)
    Simplify the following formula, so that the body of each quantifier
    contains only a single atomic formula involving that quantified
    variable.  
    (Recall, an atomic formula is one with no connectives.)
      
    Provide reasoning for each step of your simplification.
    </para>

    <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para14">
    <m:math><m:mo>∀</m:mo><m:ci>x</m:ci><m:mtext>.</m:mtext>
       <m:mo>∀</m:mo><m:ci>y</m:ci><m:mtext>.</m:mtext>
          <m:mo>∃</m:mo><m:ci>z</m:ci><m:mtext>.</m:mtext>
             <m:mfenced open="(" close=")" separators=""><m:mfenced open="(" close=")" separators=""><m:mo>A</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>x</m:ci></m:mfenced> <m:mo>∧</m:mo> <m:mo>B</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>y</m:ci></m:mfenced></m:mfenced> <m:mo>→</m:mo> <m:mo>C</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>z</m:ci></m:mfenced></m:mfenced></m:math>
          
       
    
    </para>
  </problem>

  
</exercise>

</section> 





<section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="section3">
<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Reasoning with Inference Rules</name>



<note xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="Deferred">
These final three exercises will be deferred to hw04 
(after we have discussed the first-order inference rules in lecture).
</note>

<exercise xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="exercise12">
  <problem xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para15"> (4pts) Using the inference rules,
            <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">formally</emphasis> prove problem (2e).
    </para>
  </problem>
</exercise>

<exercise xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="exercise13">
  <problem xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para16"> (3pts)
    What is wrong with the following "proof" of
             <m:math><m:mfenced open="(" close=")" separators=""><m:mo>∃</m:mo><m:ci>x</m:ci><m:mtext>.</m:mtext>
                     <m:mo>E</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>x</m:ci></m:mfenced>
                   <m:mo>→</m:mo> <m:mo>E</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>c</m:ci></m:mfenced></m:mfenced></m:math>?
    </para>

    <table xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" rowsep="true" colsep="true" frame="all" pgwide="no" id="table2">

<tgroup xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" cols="4" align="center" colsep="1" rowsep="1">
<colspec xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" colname="c1"/>
<colspec xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" colname="c2"/>
<colspec xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" colname="c3"/>
<colspec xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" colname="c4"/>

<tbody xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" align="left">1</entry><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" namest="c2" nameend="c3">subproof:<m:math><m:mfenced open="" close="" separators=""><m:mfenced open="" close="" separators=","><m:mrow><m:mo>∃</m:mo><m:ci>x</m:ci><m:mtext>.</m:mtext>
                         <m:mo>E</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>x</m:ci></m:mfenced>
                      </m:mrow></m:mfenced> <m:mo>⊢</m:mo> <m:mo>E</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>c</m:ci></m:mfenced></m:mfenced></m:math></entry><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"/><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" colname="c4"/>
</row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" align="left">1.a</entry><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"/> <entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" namest="c3" nameend="c3"><m:math><m:mo>∃</m:mo><m:ci>x</m:ci><m:mtext>.</m:mtext>
                         <m:mo>E</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>x</m:ci></m:mfenced></m:math>
                      </entry><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" colname="c4"> premise for subproof
                      </entry>
</row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" align="left">1.b</entry><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"/> <entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" namest="c3" nameend="c3"><m:math><m:mo>E</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>c</m:ci></m:mfenced></m:math></entry><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" colname="c4"> <m:math><m:mo>∃</m:mo></m:math>Elim,
                                      by line 1.1
                      </entry>
</row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" align="left">2</entry><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" namest="c2" nameend="c3"><m:math><m:mfenced open="(" close=")" separators=""><m:mo>∃</m:mo><m:ci>x</m:ci><m:mtext>.</m:mtext>
                     <m:mo>E</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>x</m:ci></m:mfenced>
                   <m:mo>→</m:mo> <m:mo>E</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>c</m:ci></m:mfenced></m:mfenced></m:math></entry><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"/><entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" colname="c4"> <m:math><m:mo>→</m:mo></m:math>Intro,
                             by line 1
             </entry>
</row></tbody>
</tgroup>
</table>
  </problem>

  
</exercise>

<exercise xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="exercise14">
  <problem xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para17">(6pts)</para>
    <list xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="enumerated" id="list10">
      <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> (4pts)Prove the following:
             <m:math><m:mfenced open="" close="" separators=""><m:mfenced open="" close="" separators=","><m:mrow><m:mo>∃</m:mo><m:ci>x</m:ci><m:mtext>.</m:mtext>
                         <m:mo>P</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>x</m:ci></m:mfenced>
                      </m:mrow><m:mrow><m:mo>∀</m:mo><m:ci>y</m:ci><m:mtext>.</m:mtext>
                         <m:mfenced open="(" close=")" separators=""><m:mo>P</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>y</m:ci></m:mfenced> <m:mo>→</m:mo> <m:mo>Q</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>y</m:ci></m:mfenced></m:mfenced>
                      </m:mrow></m:mfenced> <m:mo>⊢</m:mo> <m:mrow><m:mo>∃</m:mo><m:ci>z</m:ci><m:mtext>.</m:mtext>
                         <m:mo>Q</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>z</m:ci></m:mfenced>
                      </m:mrow></m:mfenced></m:math>
      </item>

      <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> Give an interpretation in which these premises are true.
      </item>

      <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"> Why <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">can't</emphasis> and <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">shouldn't</emphasis>
             we conclude
             <m:math><m:mo>∀</m:mo><m:ci>z</m:ci><m:mtext>.</m:mtext>
                <m:mo>Q</m:mo><m:mfenced open="(" close=")" separators=", "><m:ci>z</m:ci></m:mfenced></m:math>
             ?
      </item>
    </list>
  </problem>

  
</exercise>


    

</section> 

</content>
</document>
