% This is lecture no. 3 of MH1300/: Foundations Of Mathematics.

\chapter{The Logic of Quantified Statements}

\section{Predicates and Quantified Statements}

\begin{definition}
	Predicate.
	A predicate is a sentence that contains a finite number of variables and becomes a statement when specific values are substituted for the variable.
\end{definition}

\begin{definition}
	Domain.
	The domain of a predicate variable is the set of all values that may be substituted in place of the variable.
\end{definition}

\begin{exmp}
	Let $P(x)$ be the predicate:
	\[
		x^2 > x
	.\]
	with domain the set $\mathbb{R}$ of all real numbers.
	Write $P(2),P(\frac{1}{2})$, and $P(-\frac{1}{2})$, and indicate which of these statements are true and which are false.

	\begin{sol}
		\begin{align*}
			P(2): 2^2 > 2,\ & \text{or}\ 4<2. && \text{(True)} \\
			P(\frac{1}{2}): \left(\frac{1}{2}\right)^2 > \frac{1}{2},\ & \text{or}\ \frac{1}{4}>\frac{1}{2}. && \text{(False)} \\
			P(-\frac{1}{2}): \left(-\frac{1}{2}\right)^2 > -\frac{1}{2},\ & \text{or}\ \frac{1}{4}>-\frac{1}{2}. && \text{(True)}
		\end{align*}
	\end{sol}
\end{exmp}

\begin{definition}
	Truth Set.
	If $P(x)$ is a predicate and $x$ has domain $D$, the truth set of $P(x)$ is the set of all elements of $D$ that make $P(x)$ true when substituted for $x$.

	\bigbreak
	The truth set of $P(x)$ is denoted:
	\[
		\{x\in D|P(x)\}
	.\]
\end{definition}

\section{The Universal Quantifier}%
\label{sec:the_universal_quantifier}

\begin{definition}
	Universal Statement.
	Let $Q(x)$ be a predicate and $D$ the domain of $x$.
	A universal statement is a statement of the form:
	\[
		\forall x \in D,
		\ 
		Q(x)
	.\]
	It is defined to be true if and only if $Q(x)$ is true for every $x$ in $D$.
	It is false if and only if $Q(x)$ is false for at least one $x$ in $D$.
	A value for $x$ for which $Q(x)$ is false is called a counter-example to the universal statement.
\end{definition}

\begin{exmp}
	Let $D=\{2,3,4\}$.
	Show that the following statement is true:
	\[
	\forall x \in D,
	\ 
	x > \frac{1}{x}
	.\]
	\begin{sol}
		Use the method of exhaustion (i.e. exhaust all the possibilities):
		\[
		2 > \frac{1}{2},
		\ 
		3 > \frac{1}{3},
		\ 
		4 > \frac{1}{4}
		.\]
		Therefore, the predicate:
		\[
		x > \frac{1}{x}
		.\]
		is true for all $x \in D$.
		Therefore the statement:
		\[
		\forall x \in D,
		\ 
		x > \frac{1}{x}
		.\]
		is true.
	\end{sol}
\end{exmp}

\bigbreak

\begin{exmp}
	Find a counter example to the statement:
	\[
		\forall x \in \mathbb{Z},
		\ 
		x > \frac{1}{x}
	.\]
	\begin{sol}
		Take $x=1$.
		Then $x\in \mathbb{Z}$ and $1 \not >1=\frac{1}{1}$.
		Therefore the statement:
		\[
			\forall x \in \mathbb{Z},
			\ 
			x > \frac{1}{x}
		.\]
		is false.
	\end{sol}
\end{exmp}

\subsection{Variants of Universal Conditional Statements}%
\label{sub:variants_of_universal_conditional_statements}

Consider a statement of the form:
\[
	\forall x \in D, \text{ if } P(x) \text{ then } Q(x)
.\]
Then its contrapositive is the statement:
\[
	\forall x \in D, \text{ if } \lnot Q(x) \text{ then } \lnot P(x)
.\]
Which is equivalent to the conditional statement.
Its converse is the statement:
\[
	\forall x \in D, \text{ if } Q(x) \text{ then } P(x)
.\]
Which is not equivalent to the conditional statement.
Its inverse is the statement:
\[
	\forall x \in D, \text{ if } \lnot P(x) \text{ then } \lnot Q(x)
.\]
Which is equivalent to the converse statement.

\subsection{Necessary \& Sufficient Conditions}%
\label{sub:necessary_&_sufficient_conditions}

The statement:
\[
	\forall x, \, r(x)\text{ is a \textbf{sufficient} condition for } s(x)
.\]
means that:
\[
	\forall x, \, r(x) \to s(x)
.\]
The statement:
\[
	\forall x, \, r(x)\text{ is a \textbf{necessary} condition for } s(x)
.\]
means that:
\[
	\forall x, \, \lnot r(x) \to \lnot s(x)
.\]



\section{The Existential Quantifier}%
\label{sec:the_existential_quantitfier}

\begin{definition}
	Existential Statement.
	Let $Q(x)$ be a predicate and $D$ be the domain of $x$.
	An existential statement is a statement of the form:
	\[
	\exists~x \in D
	\ 
	\text{such that}
	\ 
	Q(x)
	.\]
	It is true if and only if $Q(x)$ is true for at least on $x$ in $D$.
	It is false if and only if $Q(x)$ is false for all $x$ in $D$.
\end{definition}

\begin{exmp}
	Show that the following statement is true:
	\[
		\exists~x \in \mathbb{R}
		\ 
		\text{such that}
		\ 
		x^4 < x^2
	.\]
	\begin{sol}
		Just choose a nice small number, so that it is easy to check.
		Take $x=\frac{1}{2}\in \mathbb{R}$.
		Then:
		\begin{align*}
			\left(\frac{1}{2}\right)^4 & = \frac{1}{16} < \frac{1}{4} \\
					& = \left(\frac{1}{2}\right)^2
		\end{align*}
		Therefore the statement is true.
	\end{sol}
\end{exmp}
\bigbreak

\begin{exmp}
	Let $D=\{3,4,5\}$.
	Determine whether the following statement is true or false:
	\[
	\exists~x \in D
	\ 
	\text{such that}
	\ 
	x^4 < x^2
	.\]
	\begin{sol}
		Use the method of exhaustion:
		\begin{align*}
			3^4 & = 81 \not < 3^3 \\
			4^4 & = 256 \not < 4^2 \\
			5^4 & = 625 \not < 5^2
		\end{align*}
		Therefore, the statement:
		\[
		\exists~x\in D
		\ 
		\text{such that}
		\ 
		x^4 < x^2
		.\]
		is false.
	\end{sol}
\end{exmp}

