%% LyX 1.1 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{babel}
\usepackage{amssymb}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\providecommand{\LyX}{L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{ccfonts}
\usepackage{fullpage}
\usepackage{endnotes}
\renewcommand{\bfseries}{\scshape}
\renewcommand{\footnote}{\endnote}

\makeatother
\begin{document}

\title{CSC165H, Mathematical expression and reasoning for computer science\\
week 3}

\maketitle
Gary Baumgartner and Danny Heap

heap@cs.toronto.edu

SF4306A

416-978-5899

http://www.cs.toronto.edu/\textasciitilde{}heap/165/S2005/index.shtml


\section*{Universal quantification and implication again}

So far we have considered an implication to be universal quantification
in disguise:

\begin{description}
\item [Claim~1:]If an employee is male, then he makes less than 55,000.\( \forall e\in E,M(e)\Rightarrow L(e) \)
\end{description}
The English indefinite article {}``an'' signals that this means
{}``Every male employee makes less than 55,000,'' and this closed
sentence is either true or false, depending on the domain of employees.
Since there is quantification going on, it's natural to wonder what
open sentence is being quantified.

\begin{description}
\item [Claim~2:]If the employee is male, then he makes less than 55,000.\( M(e)\Rightarrow L(e) \)
\end{description}
The English definite article {}``the'' often signals and unspecified
value, and hence an open sentence. We could transform Claim 2 into
Claim 1 by prefixing it with {}``For every employee, ...''

\begin{description}
\item [Claim~1':]For every employee, if the employee is male, then he makes
less than 55,000.
\end{description}
This distinction is probably clearer in symbolic notation. Let \( E \)
mean the set of employees, predicate \( L(e) \) mean that employee
\( e \) makes less than 55,000, and \( M(e) \) mean that employee
\( e \) is male. The Claims 1 and 2' correspond to%
\footnote{\( \forall e\in E,M(e)\Rightarrow L(e) \)
}, whereas Claim 2 (no prime) corresponds to%
\footnote{\( M(e)\Rightarrow L(e) \)
}. Since the claim is about male employees, we are tempted to say \( \forall m\in M,L(m) \),
however we usually take the approach of setting our domain to the
largest universe in which the predicates make sense. We don't want
to avoid reasoning about non-males. How do you feel about verifying
Claim 2 for all six values in \( E \), which are true/false?%
\footnote{\begin{itemize}
\item If Al is male, then Al makes less than 55,000.
\item If Betty is male, then Betty makes less than 55,000.
\item If Carlos is male, then Carlos makes less than 55,000.
\item If Doug is male, then Doug makes less than 55,000.
\item If Ellen is male, then Ellen makes less than 55,000.
\item If Flo is male, then Flo makes less than 55,000.\end{itemize}
}

Do you feel uncomfortable saying that the implications with false
antecedents are true? Implications are strange, especially when we
consider them to involve causality (which we don't in logic). Consider:

\begin{description}
\item [Claim~3:]If it rains in Toronto on June 2 2006, then there are no
clouds.
\end{description}
Is Claim 3 true or false? Would your answer change if you could wait
a year? What if you waited a year and June 2 was a completely dry
day in Toronto, is Claim 3 true or false?%
\footnote{True, regardless of the cloud situation. In logic \( P\Rightarrow Q \)
is false exactly when \( P \) is true and \( Q \) is false. All
other configurations of truth values for \( P \) and \( Q \) are
true (assuming that we can evaluate whether \( P \) and \( Q \)
are true or false).
} 


\section*{Vacuous truth}

We use the fact that the empty set is a subset of any set. Let \( x\in \mathbf{R} \)
(the domain is the real numbers). Is the following implication true
or false?

\begin{description}
\item [Claim~4:]If \( x^{2}-2x+2=0 \), then \( x>x+5 \).
\end{description}
A natural tendency is to process \( x>x+5 \) and think {}``that's
impossible, so the implication is false.'' However, there is no real
number \( x \) such that \( x^{2}-2x+2=0 \), so the antecedent is
false for every real \( x \). Whenever the antecedent is false and
the consequent is either true or false, the implication as a whole
is true. Another way of thinking of this is that the set where the
antecedent is true is empty (vacuous), and hence a subset of every
set. Such an implication is sometimes called \textbf{vacuously true.}

In general, if there are no \( P \)s, we consider \( P\Rightarrow Q \)
to be true, regardless of whether there are any \( Q \)s. Another
way of thinking of this is that the empty set contains no counterexamples.
Use this sort of thinking to evaluate the claims:%
\footnote{All these claims are true, although possibly misleading. Any claim
about elements of the empty set is true, since there are no counterexamples.
}

\begin{description}
\item [Claim~4:]All employees making over 80,000 are female.
\item [Claim~5:]All employees making over 80,000 are male.
\item [Claim~6:]All employees making over 80,000 have supernatural powers.
\end{description}

\section*{Equivalence}

Suppose Al quits the domain \( E \). Consider the claim

\begin{description}
\item [Claim~6a:]Every male employee makes between 25,000 and 45,000. Converse:
Every employee who earns between 25,000 and 45,000 is male.
\end{description}
Is Claim 6a true? What is its converse?%
\footnote{Every employee making between 25,000 and 45,000 is male.
} Is the converse true? Draw a Venn diagram. The two properties describe
the same set of employees; they are \textbf{equivalent}. In everyday
language, we might say {}``An employee is male if and only if the
employee makes between 25,000 and 45,000.'' This can be decomposed
into two statements:

\begin{quote}
An employee is male if the employee makes between 25,000 and 45,000.
\( B(e)\Rightarrow M(e) \)

An employee is male only if the employee makes between 25,000 and
45,000. \( M(e)\Rightarrow B(e) \)
\end{quote}
Here are some other everyday ways of expressing equivalence:

\begin{itemize}
\item \( P \) iff \( Q \) ({}``iff'' being an abbreviation for {}``if
and only if'').
\item \( P \) is necessary and sufficient for \( Q \).
\item \( P\Rightarrow Q \), and conversely.
\end{itemize}
You may also hear

\begin{itemize}
\item \( P \) {[}exactly / precisely{]} when \( Q \)
\end{itemize}
For example, if our domain is \( \mathbf{R} \), you might say {}``\( x^{2}+4x+4=0 \)
precisely when \( x=-2 \).'' Equivalence is getting at the {}``sameness''
(so far as our domain goes) of \( P \) and \( Q \). We may define
properties \( P \) and \( Q \) differently, but the same members
of the domain have these properties (they define the same sets). Symbolically
we write \( P\Leftrightarrow Q \). So now

\begin{quote}
An employee is male \( \Leftrightarrow  \) he makes between 25,000
and 45,000.
\end{quote}
Consider the following

\begin{quote}
Only female employees make less than 1,000. Converse of: If an employee
is female, then she makes less than 1,000.
\end{quote}
This is the (true) converse of the (false):

\begin{quote}
If an employee is female, then she makes less than 1,000.
\end{quote}
The first statement can be re-written as its own contrapositive, as
a statement about male employees:

\begin{quote}
If an employee is male, then he does not make less than 1,000.
\end{quote}
Summing up

\begin{itemize}
\item \( P\Rightarrow Q \) tells us about \( Ps \). It's converse tells
us about non-\( P \)s.
\item The equivalence \( P\Leftrightarrow Q \) can be decomposed into \( P\Rightarrow Q\wedge Q\Rightarrow P \),
so it tells us about \( P \)s, \( Q \)s, non-\( P \)s, and non-\( Q \)s.
\end{itemize}
In everyday langauge you will hear people confuse (sometimes deliberately)
an implication with its converse:

\begin{quote}
If you are a criminal, then you have something to hide.

Suppose you have something to hide.

Then you are a criminal.
\end{quote}

\section*{Existential quantification}

Consider another sort of quantification, \textbf{existential quantification:}

\begin{description}
\item [Claim~7:]There is an employee who makes less than 15,000.
\item [Claim~8:](An) Some employee makes more than 100,000.
\end{description}
Although the indefinite article {}``an'' is used here, we don't
take it to signal universal quantification in Claim 7, due to the
phrase {}``There is.'' Claim 8 is a bit ambiguous, and would be
clearer if re-written as {}``Some employee...'' How do we prove
Claim 7 true?%
\footnote{Look up the table entry for Betty.
} Express this in terms of sets.%
\footnote{The set of employees making less than 15,000 is not empty.
} How do you prove or disprove Claim 8?%
\footnote{You have to check every employee. The absence of \textbf{examples}
(rather than \textbf{counterexamples}) makes it false.
} What does this mean in terms of sets?%
\footnote{The set of employees earning over 100,000 is empty.
}

Existential quantification can turn an open sentence into a closed
sentence (statement): {}``For some employee, the employee makes less
than 15,000.'' In symbols we write \( \exists  \), which we pronounce
{}``there exists.'' If \( E \) means the set of employees, \( L(e) \)
means that \( e \) makes less than 15,000, then we can write (with
increasing symbolic content):

\begin{itemize}
\item \( \exists  \) employee, the employee makes less than 15,000.
\item \( \exists  \) employee \( e \), \( e \) makes less than 15,000.
\item \( \exists e\in E,L(e) \).
\end{itemize}
In everyday language existential quantification is expressed as:

\begin{quote}
There {[}is / exists{]} {[}a / an / some / at least one{]} ... {[}such
that / for which{]} ..., or {[}For{]} {[}a / an / some / at least
one{]} ...
\end{quote}
Note that the English word {}``some'' is always used \textbf{inclusively}
here, so {}``some object is a \( P \)'' is true if every object
is a \( P \). When is \( \exists x,P(x) \) false?%
\footnote{When \( \forall x,\neg P(x) \) is true.
} The truth values of \( \neg \exists x,P(x) \) and \( \forall x,\neg P(x) \)
are the same. Apply negation again.%
\footnote{So \( \exists x,P(x) \) is equivalent to \( \neg \forall x,\neg P(x) \).
We could live without existential quantifiers, but would our life
be as good?
} Saying Claim 8 is false is the same as saying {}``Every employee
does not make more than 100,000.'' Recall our test of when \( \forall x,P(x) \)
is false.%
\footnote{When \( \exists x,\neg P(x) \) is true. Notice the symmetry with
the test of when \( \forall x,P(x) \) is false, that is when \( \exists x,\neg P(x) \).
} When there's a counterexample. Existential quantifiers can restrict
the domain being considered:

\begin{description}
\item [Claim~9:]Some female employee makes more than 25,000.
\item [Claim~10:]There exists a male employee making less than 10,000.
\end{description}
For universal quantification we express the restriction with implication
(similar to subset inclusion), for existential quantification we express
the restriction with AND (symbolically \( \wedge  \)), which is like
intersection of sets. In general

\begin{itemize}
\item {}``Every \( P \) is also a \( Q \)'' becomes \( \forall x,P(x)\Rightarrow Q(x) \).
What's the difference between this and \( \forall x,P(x)\wedge Q(x) \)?
\item {}``Some \( P \) is also a \( Q \)'' becomes \( \exists x,P(x)\wedge Q(x) \).
What's the difference between this and \( \exists x,P(x)\Rightarrow Q(x) \)?
\end{itemize}
Now Claim 9 becomes {}``\( \exists  \) employee \( e \), \( e \)
is female and \( e \) makes more than 25,000.'' The existence of
example Flo makes Claim 9 true. Claim 10 is false, because no male
employee makes less than 10,000. In symbols \( \forall  \)employees
\( e \), \( e \) male \( \Rightarrow  \) \( \neg  \)(\( e \)
makes less than 10000). The following are equivalent, and you should
become comfortable with reasoning why they are:

\begin{itemize}
\item \( \neg (\exists x,P(x)\wedge Q(x))\Leftrightarrow \forall x,(P(x)\Rightarrow \neg Q(x)) \).
In words {}``No \( P \) is a \( Q \)'' is equivalent to {}``Every
\( P \) is a non-\( Q \).''
\item \( \neg (\forall x,P(x)\Rightarrow Q(x))\Leftrightarrow \exists x(P(x)\wedge \neg Q(x)) \).
In words {}``Not every \( P \) is a \( Q \)'' is equivalent to
{}``There is some \( P \) that is a non-\( Q \).''
\end{itemize}

\section*{Conjunction, disjunction}

Notice that, symbolically \( P\wedge Q \) is true exactly when both
\( P \) and \( Q \) are true, and false if only one of them is true
and the other is false. Similarly \( P\vee Q \) is true if either
one (or both) of \( P \) or \( Q \) is true. More on this next time.

\newpage

\begingroup

\setlength{\parindent}{0pt}

\setlength{\parskip}{2ex}

\renewcommand{\enotesize}{\normalsize}

\theendnotes\endgroup
\end{document}
