\documentclass[12pt]{article}

\usepackage[Mickael]{ammaths}

\begin{document}

\module{Formal Logic}{2}{03}{1 period}

%\prereq{}

\object{\begin{itemize}
        \item Discover the five logical operators ``not'', ``and'', ``or'', ``if'' and ``iff''.
	\item Learn how to prove that two logical propositions are formally equivalent.
        \end{itemize}}

\mater{\begin{itemize}
	\item Fact sheet about formal logic.
	\item Beamer about formal logic.
	\end{itemize}}

\modpart{Group work : the five operators}{20 mins}

Students work in 9 groups of 4 or 5. They are handed out cards with a
proposition involving a logical operator, or an explanation, 
the notation or a diagram. The have to match each proposition with the right 
explanation and notation. The answers are then given with a beamer.

\modpart{Lecture}{35 mins}

The teacher presents the notions of truth table, negation, conjuntion,
disjunction, conditional and biconditional. The lecture is based on a beamer,
with hand-outs to be given at the end. Students must be involved in the lesson
and help build the truth tables.


\pagebreak

\moddocdis{Formal Logic}{2}{03}{Lesson}
\en\nocouleur

\emph{Formal logic} is a branch of mathematics (and philosophy)
where the validity of logical deductions and propositions is studied,
without any reference to the truth of the statements involved. We
only study the form, not the content.


\section{A logical proposition and its negation}

\txt{Any proposition, such as ``it's raining'' or ``ABCD is a
rectangle'' can be true or false. For any proposition $p$, we will
write 0 if it's false and 1 if it's true. The \emph{truth table} of
the proposition $p$ gives all the possibilities about the truth of $p$.
It's fairly simple when we consider just one proposition.}

\begin{minipage}{13cm}
\defi{Negation}{The \emph{negation} of a proposition $p$, noted by the logical operator $\neg$ and the
word \emph{not}, is true when $p$ is false. In other words, $\neg p$
is the contrary of $p$.}
\end{minipage}
\begin{minipage}{3cm}
\begin{center}
\begin{tabular}{c|c}
$p$ &  $\neg p$ \\
\hline
$0$ & $1$ \\
$1$ & $0$  \\
\end{tabular}
\end{center}
\end{minipage}

\exe{The negation of the proposition ``the door is closed'' is ``the
door is not closed''.}

\section{The main logical operators}

\txt{Using two or more propositions, we can build a new one. For
example, "it's raining and I don't have an umbrella'' is made of two
distinct propositions. We will now consider some logical formulas made
of two or more propositions.}

\begin{minipage}{13cm}
\defi{Conjunction}{The \emph{conjunction} of two propositions $p$ and $q$, noted by the logical
operator $\wedge$ and the word \emph{and}, is true when both propositions are true. In other
words, $p\wedge q$ is true when $p$ and $q$ are true.}
\end{minipage}
\begin{minipage}{3cm}
\begin{center}
\begin{tabular}{c|c|c}
$p$ & $q$ & $p\wedge q$ \\
\hline
$0$ & $0$ & $0$ \\
$0$ & $1$ & $0$ \\
$1$ & $0$ & $0$ \\
$1$ & $1$ & $1$ \\
\end{tabular}
\end{center}
\end{minipage}


\exe{The conjunction of the propositions ``I like chocolate'' and
``there's some chocolate in the kitchen'' is ``I like chocolate and
there's some chocolate in the kitchen''.}


\begin{minipage}{13cm}
\defi{Disjunction}{The \emph{disjunction} of two propositions $p$ and $q$, noted by the logical operator
$\vee$ and the word \emph{or}, is true when at least one of the propositions is
true. In other words, $p\vee q$ is true when at least $p$ or $q$ is
true. Beware, the logical disjunction is true when both propositions
are true. It's different from the exclusive disjunction, often used
in the common langage, as in ``cheese or dessert'', ``open or
closed''.}
\end{minipage}
\begin{minipage}{3cm}
\begin{center}
\begin{tabular}{c|c|c}
$p$ & $q$ & $p\vee q$ \\
\hline
$0$ & $0$ & $0$ \\
$0$ & $1$ & $1$ \\
$1$ & $0$ & $1$ \\
$1$ & $1$ & $1$ \\
\end{tabular}
\end{center}
\end{minipage}

\exe{The disjunction of the propositions ``$ABCD$ is a rectangle'' and
``$ABCD$ is a diamond'' is ``$ABCD$ is a rectangle or a diamond''.
Note that both propositions may be true at the same time.}

\begin{minipage}{13cm}
\defi{Conditional}{The \emph{conditional} of $p$ and $q$, noted by the logical operator
$\rightarrow$ and
the words \emph{if \ldots\ then \ldots}, is always true except if $p$ is
true and $q$ is false.}
\end{minipage}
\begin{minipage}{3cm}
\begin{center}
\begin{tabular}{c|c|c}
$p$ & $q$ & $p\rightarrow q$ \\
\hline
$0$ & $0$ & $1$ \\
$0$ & $1$ & $1$ \\
$1$ & $0$ & $0$ \\
$1$ & $1$ & $1$ \\
\end{tabular}
\end{center}
\end{minipage}

\exe{The conditional of ``it's raining'' and ``I'll take my
umbrella'' is ``if it's raining then I'll take my umbrella''.}

\begin{minipage}{13cm}
\defi{Biconditional}{The \emph{biconditional} of $p$ and $q$, noted by the logical operator
$\leftrightarrow$ and the words \emph{if and only if}, is true when $p$ and $q$ have the same
truth value.}
\end{minipage}
\begin{minipage}{3cm}
\begin{center}
\begin{tabular}{c|c|c}
$p$ & $q$ & $p\leftrightarrow q$ \\
\hline
$0$ & $0$ & $1$ \\
$0$ & $1$ & $0$ \\
$1$ & $0$ & $0$ \\
$1$ & $1$ & $1$ \\
\end{tabular}
\end{center}
\end{minipage}

\exe{The biconditional of propositions ``$ABC$ is a right angled
triangle in $A$'' and ``$BC^2=AB^2+AC^2$'' is ``$ABC$ is a right
angled triangle in $A$ if and only if $BC^2=AB^2+AC^2$''.}

\section{Formal equivalences}

\defi{Formal equivalence}{Two logical statements are formally equivalent if they share the
same truth table. To prove the formal equivalence of two statements,
the easiest way is to compute their truth tables and compare them.}


\begin{minipage}{11cm}
\prop{Converse}{Let $p$ and $q$ be any two propositions. The proposition
$q\rightarrow p$ is called the converse of $p\rightarrow q$. It's
not formally equivalent to $p\rightarrow q$.}
\end{minipage}
\begin{minipage}{5cm}
\begin{center}
\begin{tabular}{c|c|c|c}
$p$ & $q$ & $p\rightarrow q$ & $q\rightarrow p$ \\
\hline
$0$ & $0$ & $1$ & $1$\\
$0$ & $1$ & $1$ & $0$\\
$1$ & $0$ & $0$ & $1$\\
$1$ & $1$ & $1$ & $1$\\
\end{tabular}
\end{center}
\end{minipage}

\begin{minipage}{8cm}
\prop{Contrapositive}{Let $p$ and $q$ be any two propositions. The proposition $\neg
q\rightarrow \neg p$ is called the contrapositive of $p\rightarrow
q$. It's formally equivalent to $p\rightarrow q$.}
\end{minipage}
\begin{minipage}{8cm}
\begin{center}
\begin{tabular}{c|c|c|c|c|c}
$p$ & $q$ & $p\rightarrow q$ & $\neg q$ & $\neg p$ & $\neg q\rightarrow \neg p$ \\
\hline
$0$ & $0$ & $1$ & $1$ & $1$ & $1$\\
$0$ & $1$ & $1$ & $0$ & $1$ & $1$\\
$1$ & $0$ & $0$ & $1$ & $0$ & $0$\\
$1$ & $1$ & $1$ & $0$ & $0$ & $1$\\
\end{tabular}
\end{center}
\end{minipage}

\defi{Tautology and contradiction}{A \emph{tautology} is a logical statement that is true by virtue of its logical form,
that
requires no assumptions to determine its veracity. A
\emph{contradiction} is a statement that is always false.}

\pagebreak

\moddoc{Matching game}


\fbox{\begin{minipage}{16cm}

\begin{multicols}{2}

{\bf Five sentences}

\begin{enumerate}
 \item $a$ is not even.
 \item $a$ is even and $b$ is divisible by 4.
 \item $a$ is even or $b$ is divisible by 4.
 \item If $a$ is even then $b$ is divisible by 4.
 \item $a$ is even if and only if $b$ is divisible by 4.
\end{enumerate}

\bigskip

{\bf Five notations}

\begin{enumerate}
 \item[i.] $(2|a)\vee (4|b)$
 \item[i.] $(2|a)\rightarrow (4|b)$
 \item[iii.] $(2|a)\leftrightarrow (4|b)$
 \item[iv.] $\neg(2|a)$
 \item[v.] $(2|a)\wedge (4|b)$
\end{enumerate}

{\bf Five explanations}

\begin{enumerate}
 \item[a.] True only if both propositions are true.
 \item[b.] True if the proposition is false and false if the proposition is true.
 \item[c.] True except if the second proposition can be false while the first property is
true.
 \item[d.] True as soon as one of the two propositions is true.
 \item[e.] True if whenever one of the proposition is true, the other is also true, and whenever one
proposition is false, the other is also false.
\end{enumerate}

\end{multicols}

\begin{center}
\begin{tabular}{p{7cm}p{7cm}}
\begin{center}
\psset{xunit=0.65cm,yunit=0.65cm,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}
\begin{pspicture*}(-0.51,0)(9.74,5)
\rput{-6.61}(4.47,2.34){\psellipse(0,0)(4.39,2.22)}
\rput{-5.42}(3.45,2.42){\psellipse[fillstyle=hlines](0,0)(1.64,1.06)}
\rput{-2.62}(5.64,2.04){\psellipse[fillstyle=vlines](0,0)(1.68,1.03)}
\uput[dl](9.8,5){A}
\end{pspicture*}
\end{center} &
\begin{center}
\psset{xunit=0.65cm,yunit=0.65cm,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}
\begin{pspicture*}(-0.51,0)(9.74,5)
\rput{-6.61}(4.47,2.34){\psellipse(0,0)(4.39,2.22)}
\pspolygon[fillstyle=hlines](4.8,2.95)(4.68,2.9)(4.51,2.83)(4.33,2.71)(4.22,2.62)(4.12,2.51)(4.05,2.39)(3.99,2.26)(3.97,
2.09)(4,1.86)(4.04,1.77)(4.11,1.66)(4.18,1.58)(4.23,1.52)(4.29,1.47)(4.39,1.5)(4.54,1.57)(4.63,1.62)(4.74,1.7)(4.82,
1.77)(4.91,1.86)(5,2)(5.05,2.1)(5.07,2.21)(5.09,2.34)(5.07,2.46)(5.02,2.63)(4.97,2.73)(4.92,2.8)(4.85,2.89)
\rput{-5.42}(3.45,2.42){\psellipse(0,0)(1.64,1.06)}
\rput{-2.62}(5.64,2.04){\psellipse(0,0)(1.68,1.03)}
\uput[dl](9.8,5){B}
\end{pspicture*}
\end{center}
\\ 
\begin{center}
\psset{xunit=0.5cm,yunit=0.5cm,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}
\begin{pspicture*}(-0.51,-0.58)(9.85,5.51)
\rput{-6.61}(4.47,2.34){\psellipse[fillstyle=solid,fillcolor=white](0,0)(4.39,2.22)}
\rput{-5.42}(3.45,2.42){\psellipse[fillstyle=hlines](0,0)(1.64,1.06)}
\rput{-5.42}(3.45,2.42){\psellipse[fillstyle=vlines,fillcolor=gray](0,0)(1.64,1.06)}
\uput[dl](9.8,5){C}
\end{pspicture*}
\end{center} &
\begin{center}
\psset{xunit=0.5cm,yunit=0.5cm,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}
\begin{pspicture*}(-0.51,0)(9.85,5)
\rput{-6.61}(4.47,2.34){\psellipse[fillstyle=hlines](0,0)(4.39,2.22)}
\rput{-5.42}(3.45,2.42){\psellipse[fillstyle=solid,fillcolor=white](0,0)(1.64,1.06)}
\uput[dl](9.8,5){D}
\end{pspicture*}
\end{center}\\ 
\begin{center}
\psset{xunit=0.5cm,yunit=0.5cm,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}
\begin{pspicture*}(-0.51,0)(9.85,5)
\rput{-6.61}(4.47,2.34){\psellipse[fillstyle=solid,fillcolor=white](0,0)(4.39,2.22)}
\rput{-5.42}(3.45,2.42){\psellipse[fillstyle=hlines](0,0)(1.64,1.06)}
\rput{-4.42}(3.65,2.5){\psellipse[fillstyle=vlines](0,0)(0.9,0.7)}
\uput[dl](9.8,5){E}
\end{pspicture*}
\end{center} &
\\ 
\end{tabular}
\end{center}

\end{minipage}}




\end{document}
