Skip to content

Commit f884e14

Browse files
committed
pull out quantifiers section
1 parent 6cee5a3 commit f884e14

File tree

3 files changed

+3
-119
lines changed

3 files changed

+3
-119
lines changed

source/ch_intro.ptx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616

1717
<xi:include href="./sec_intro-intro.ptx"/>
1818
<xi:include href="./sec_intro-structures.ptx"/>
19-
<xi:include href="./sec_intro-sets.ptx"/>
20-
<xi:include href="./sec_intro-functions.ptx"/>
19+
<!-- <xi:include href="./sec_intro-sets.ptx"/>
20+
<xi:include href="./sec_intro-functions.ptx"/> -->
2121
</chapter>

source/ch_logic.ptx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@
145145
</introduction>
146146
<xi:include href="./sec_logic-statements.ptx"/>
147147
<xi:include href="./sec_logic-prop.ptx"/>
148+
<xi:include href="./sec_logic-quant.ptx"/>
148149
<xi:include href="./sec_logic-proofs.ptx"/>
149150
<xi:include href="./sec_logic-conc.ptx"/>
150151
</chapter>

source/sec_logic-prop.ptx

Lines changed: 0 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,124 +1275,7 @@
12751275
</example>
12761276
</subsection>
12771277

1278-
<subsection>
1279-
<title>Beyond
1280-
Propositions</title>
1281-
<p> As we saw in <xref ref="sec_logic-statements" />, not every statement can
1282-
be analyzed using logical connectives alone. For example, we might want to work with the
1283-
statement: </p>
1284-
1285-
<blockquote>
1286-
<p>
1287-
All primes greater than 2 are odd.
1288-
</p>
1289-
</blockquote>
1290-
1291-
<p> To write this
1292-
statement symbolically, we must use quantifiers. We can translate as follows: <me>
1293-
\forall x ((P(x) \wedge x \gt 2) \imp O(x))
1294-
</me>. In this case, we are using <m>
1295-
P(x)</m> to denote <q><m>x</m> is prime</q> and <m>O(x)</m> to denote <q><m>x</m> is odd.</q> These are not
1296-
propositions, since their truth value depends on the input <m>x</m>. Better to think of <m>P</m> and <m>
1297-
O</m> as denoting <em>properties</em> of their input. The technical term for these is <term>predicates</term>
1298-
and when we study them in logic, we need to use <term>predicate logic</term>. </p>
1299-
1300-
<p> It is important
1301-
to stress that predicate logic <em>extends</em> propositional logic (much in the way quantum
1302-
mechanics extends classical mechanics). You will notice that our statement above still used
1303-
the (propositional) logical connectives. Everything that we learned about logical equivalence
1304-
and deductions still applies. However, predicate logic allows us to analyze statements at a
1305-
higher resolution, digging down into the individual propositions <m>P</m>, <m>Q</m>, etc. </p>
1306-
1307-
<p>
1308-
A full treatment of predicate logic is beyond the scope of this text.
1309-
One reason is that there is no systematic procedure for deciding whether two statements in
1310-
predicate logic are logically equivalent (i.e., there is no analogue to truth tables here).
1311-
Rather, we end with a two examples of logical equivalence and deduction,
1312-
to pique your interest.
1313-
</p>
1314-
1315-
<example>
1316-
<statement>
1317-
<p>
1318-
Suppose we claim that there is no smallest number. We can translate this into symbols as <me>
1319-
\neg \exists x \forall y (x \le y)
1320-
</me> (literally, <q>it is not
1321-
true that there is a number <m>x</m> such that for all numbers <m>y</m>, <m>x</m> is less than or
1322-
equal to <m>y</m></q>). </p>
1323-
1324-
<p> However, we know how negation interacts with quantifiers: we can
1325-
pass a negation over a quantifier by switching the quantifier type (between universal and
1326-
existential). So the statement above should be <em>logically equivalent</em> to <me>
1327-
\forall x \exists y (y \lt x)
1328-
</me>. Notice that <m>y \lt x</m> is
1329-
the negation of <m>x \le y</m>. This literally says, <q>for every number <m>x</m> there is a number <m>
1330-
y</m> which is smaller than <m>x</m>.</q> We see that this is another way to make our
1331-
original claim. </p>
1332-
</statement>
1333-
</example>
1334-
1335-
<example>
1336-
<statement>
1337-
<p> Can you switch the order of
1338-
quantifiers? For example, consider the two statements: <me>
1339-
\forall x \exists y P(x,y) \qquad \mathrm{ and } \qquad \exists y \forall x P(x,y)
1340-
</me>.
1341-
Are these logically equivalent? </p>
1342-
</statement>
1343-
<solution>
1344-
<p> These statements are NOT logically
1345-
equivalent. To see this, we should provide an interpretation of the predicate <m>P(x,y)</m>
1346-
which makes one of the statements true and the other false. </p>
1347-
1348-
<p> Let <m>P(x,y)</m> be the
1349-
predicate <m>x \lt y</m>. It is true, in the natural numbers, that for all <m>x</m> there is
1350-
some <m>y</m> greater than that <m>x</m> (since there are infinitely many numbers). However,
1351-
there is not a natural number <m>y</m> which is greater than every number <m>x</m>. Thus it is
1352-
possible for <m>\forall x \exists y P(x,y)</m> to be true while <m>\exists y \forall x P(x,y)</m>
1353-
is false. </p>
1354-
1355-
<p> We cannot do the reverse of this though. If there is some <m>y</m> for which
1356-
every <m>x</m> satisfies <m>P(x,y)</m>, then certainly for every <m>x</m> there is some <m>y</m> which
1357-
satisfies <m>P(x,y)</m>. The first is saying we can find one <m>y</m> that works for every <m>x</m>.
1358-
The second allows different <m>y</m>'s to work for different <m>x</m>'s, but there is nothing
1359-
preventing us from using the same <m>y</m> that work for every <m>x</m>. In other words, while
1360-
we don't have logical equivalence between the two statements, we do have a valid deduction
1361-
rule: </p>
13621278

1363-
<sidebyside>
1364-
1365-
<tabular halign="center">
1366-
<row bottom="minor">
1367-
<cell />
1368-
<cell><m>\exists y \forall x P(x,y)</m>
1369-
</cell>
1370-
</row>
1371-
<row>
1372-
<cell><m>
1373-
\therefore</m>
1374-
</cell>
1375-
<cell><m>\forall x \exists y P(x,y)</m>
1376-
</cell>
1377-
</row>
1378-
</tabular>
1379-
1380-
</sidebyside>
1381-
1382-
<p>
1383-
Put yet another way, this says that the single statement <me>
1384-
\exists y \forall x P(x,y) \imp \forall x \exists y P(x,y)
1385-
</me>
1386-
is always true. This is sort of like a tautology, although we reserve that term for
1387-
necessary truths in propositional logic. A statement in predicate logic that is
1388-
necessarily true gets the more prestigious designation of a <term>law of logic</term>
1389-
<idx>law of
1390-
logic</idx> (or sometimes <term>logically valid</term>, <idx><h>logically valid</h><see>law of logic</see>
1391-
</idx>
1392-
but that is less fun). </p>
1393-
</solution>
1394-
</example>
1395-
</subsection>
13961279

13971280
<reading-questions xml:id="rqs-logic-prop">
13981281
<exercise label="rq-logic-prop-equiv">

0 commit comments

Comments
 (0)