\documentclass{beamer}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{mathrsfs}
\usepackage{tikz}
\usepackage{graphicx}
\usetikzlibrary{calc,decorations.markings,positioning,arrows.meta}

\tikzset{->-/.style={decoration={
  markings,
  mark=at position #1 with {\arrow{>}}},postaction={decorate}}}
  
\author{Tom Cuchta}
\title{}
\mode<presentation> {
\usetheme{Warsaw}
\setbeamertemplate{navigation symbols}{}
}
\begin{document}
\begin{frame}{Old rules}
\textbf{Rule of Universal Specification (US)} If a formula $S$ results from a formula $R$ by substituting a term $t$ for every free occurrence of a variable $v$ in $R$ then $S$ is derivable from $(\forall v)R$. \\
\textbf{Rule of Universal Generalization (UG)} From a formula $S$ we may derive $(\forall v)S$, provided the variable $v$ is not flagged in $S$. \\
\textbf{Rule of Existential Specification (ES)} If a formula $S$ results from a formula $R$ by substituting for every free occurrence of a variable $v$ in $R$ an ambiguous name which has not previously been used in the derivation, then $S$ is derivable from $(\exists v)R$.  \\
\textbf{Rule of Existential Generalization (EG)} If a formula $S$ results from a formula $R$ by substituting a variable $v$ for every occurrence in $R$ of some ambiguous (or proper) name, then $(\exists v)S$ is derivable from $R$.
\end{frame}

\begin{frame}{New rules}
\textbf{\underline{Rule $Q_1$:}} If $v$ is any variable and if a formula $S$ results from $R$ by replacing at least one occurrence of the universal quantifier $(\forall v)$ by $\neg (\exists v) \neg$, then $S$ is derivable from $R$, and conversely. \\
\textbf{\underline{Rule $Q_2$:}} If $v$ is any variable and if a formula $S$ results from $R$ by replacing at least one occurrence of the existential quantifier $(\exists v)$ by $\neg (\forall v) \neg$, then $S$ is derivable from $R$, and conversely.\\
\textbf{\underline{Rule for Tautological Equivalence (TE):}} If a formula $P$ occurs as part of a formula $R$, if a formula $Q$ is tautologically equivalent to $P$, and if a formula $S$ results from $R$ by replacing at least one occurrence of $P$ in $R$ by $Q$, then $S$ is derivable from $R$, and conversely.
\end{frame}

\begin{frame}{Examples}
(Problem from ``Notes on Rule C.P.", 14 Feb)
\begin{tabular}{|lll|}
\hline
$\{1\}$ & (1) $P \rightarrow Q$ & Premise \\
$\{2\}$ & (2) $\neg (\neg Q) \rightarrow R$ & Premise \\
$\{2\}$ & (3) $Q \rightarrow R$ & 2 TE \\
$\{1,2\}$ & (4) $P \rightarrow R$ & 1, 3 Law of Hypothetical Syllogism \\
\hline
\end{tabular} \\
\end{frame}

\begin{frame}{Examples}
(Problem pg. 35 \# 8 (HW4))
\begin{tabular}{|lll|}
\hline
$\{1\}$ & (1) $S \vee O$ & Premise \\
$\{2\}$ & (2) $S \rightarrow \neg E$ & Premise \\
$\{3\}$ & (3) $O \rightarrow M$ & Premise \\
$\{2\}$ & (4) $\neg (\neg E) \rightarrow \neg S$ & 2 Law of Contraposition \\
$\{2\}$ & (5) $E \rightarrow \neg S$ & 4 TE \\
$\{6\}$ & (6) $\neg S$ & Premise \\
$\{1,6\}$ & (7) $O$ & 1 6 Modus tollendo tollens \\
$\{1\}$ & (8) $\neg S \rightarrow O$ & 6 7 CP \\
$\{1,2\}$ & (9) $E \rightarrow O$ & 5 8 Law of Hypothetical Syllogism \\
$\{1,2,3\}$ & (10) $E \rightarrow M$ & 3 9 Law of Hypothetical Syllogism \\
$\{1,2,3\}$ & (11) $\neg E \vee M$ & 10 LEID \\
\hline
\end{tabular}
\end{frame}

\begin{frame}{Examples}
(From HW7 \# 2)  What is \textbf{wrong} with this deduction? \\
\begin{tabular}{|lll|}
\hline
$\{1\}$ & (1) $(\forall x)(Nx \rightarrow Mx)$ & Premise \\
$\{2\}$ & (2) $(\forall x)(Mx \rightarrow Tx)$ & Premise \\
$\{1,2\}$ & (3) $(\forall x)(Nx \rightarrow Tx)$ & 1 2 TE \\
\hline
\end{tabular}\\
\onslide<2->{It appears to use hypothetical syllogism to combine $Nx \rightarrow Mx$ and $Mx \rightarrow Tx$, but hypothetical syllogism is \textbf{not} a tautological equivalence.}
\end{frame}

\begin{frame}
pg. 88: ``If there is a federal court which will sustain the decision, then every member of the bar is wrong. However, some members of the bar are not wrong.\\Therefore, no federal court will sustain the decision."
\begin{tabular}{|lll|}
\hline
$\{1\}$ & (1) $(\exists x)(Fx \wedge Sx) \rightarrow (\forall y)(My \rightarrow Wy)$ & Premise \\
$\{2\}$ & (2) $(\exists y)(My \wedge \neg Wy)$ & Premise \\
$\{2\}$ & (3) $\neg (\forall y)\neg (My \wedge \neg Wy)$ & 2 Q2 \\
$\{2\}$ & (4) $\neg (\forall y)(My \rightarrow Wy)$ & 3 TE (neg of imp) \\
$\{1\}$ & (5) $\neg (\forall y)(My \rightarrow Wy) \rightarrow \neg(\exists x) (Fx \wedge Sx)$ & 1 Contraposition \\
$\{1,2\}$ & (6) $\neg (\exists x)(Fx \wedge Sx)$ & 4 5 Detachment \\
$\{1,2\}$ & (7) $\neg \neg (\forall x)(\neg (Fx \wedge Sx))$ & 6 Q2 \\ 
$\{1,2\}$ & (8) $(\forall x)(\neg(Fx \wedge Sx))$ & 7 T Double Negation \\
$\{1,2\}$ & (9) $(\forall x)(Fx \rightarrow \neg Sx)$ & 7 TE \\
\hline
\end{tabular}

\end{frame}

\begin{frame}{Subscripts}
We want to \textbf{avoid} this technically true derivation with ``Rule EG" from earlier: \\
\begin{tabular}{|lll|}
\hline
$\{1\}$ & (1) $(\forall x)(\exists y)(x <y )$ & Premise \\
$\{1\}$ & (2) $(\exists y)(x < y)$ & 1 US \\
$\{1\}$ & (3) $x < \alpha$ & 2 ES \\
$\{1\}$ & (4) $(\exists x)(x < x)$ & 3 EG (error) \\
\hline
\end{tabular} \\
\textbf{Definition:} A subscript of an ambiguous name (i.e. Greek letter) is written provided that variable is free in the formula on which EG is applied. \\
\textbf{New restriction on EG:} Cannot use rule $EG$ to a formula that uses a variable as a subscript of that formula.
\end{frame}


\begin{frame}{Subscripts}
Correctly written, we get \\
\begin{tabular}{|lll|}
\hline
$\{1\}$ & (1) $(\forall x)(\exists y)(x <y )$ & Premise \\
$\{1\}$ & (2) $(\exists y)(x < y)$ & 1 US \\
$\{1\}$ & (3) $x < \alpha_x$ & 2 ES \\
$\{1\}$ & (4) $(\exists y)(x < y)$ & 3 EG\\
\hline
\end{tabular} \\

\end{frame}

\begin{frame}{New rules}
We would like to \textbf{avoid} the following:
\begin{tabular}{|lll|}
\hline
$\{1\}$ & (1) $(\forall x)(\exists y)(x<y)$ & Premise \\
$\{1\}$& (2) $(\exists y)(x < y)$ & 1 US \\
$\{1\}$ & (3) $x < \alpha_x$ & 2 ES \\
$\{1\}$ & (4) $(\forall x)(x < \alpha_x)$ & 3 UG (error) \\
$\{1\}$ & (5) $(\exists y)(\forall x)(x<y)$ & 4 EG \\
\hline
\end{tabular}\\
\textbf{New restriction on UG}: We may not apply a universal quantifier to a given formula using a variable which occurs as a subscript in the formula. \\

\end{frame}

\begin{frame}{New rules}
We would like to \textbf{avoid} the following:
\begin{tabular}{|lll|}
\hline
$\{1\}$ & (1) $(\forall x)(\exists y)(x<y)$ & Premise \\
$\{1\}$ & (2) $(\exists y)(y<y)$ & 1 US (error) \\
\hline
\end{tabular} \\
\textbf{New restriction on UG}: Do not substitute a term containing a variable which becomes bound by a quantifier in the original formula.
\end{frame}

\begin{frame}{New rules}
We would like to \textbf{avoid} \\
\begin{tabular}{|lll|}
\hline
$\{1\}$ & (1) $(\exists x)(\forall y)(x+y=y)$ & Premise \\
$\{1\}$ & (2) $(\forall y)(\alpha + y = y)$ & 1 ES \\
$\{1\}$ & (3) $(\exists y)(\forall y)(y+y=y)$ & 2 EG (error) \\
$\{1\} $ & (4) $(\forall y)(y+y=y)$ & 3 ES \\
\hline
\end{tabular}
(Line (4) follows because there are no free variable in line (3) which we could replace with an ambiguous name.) \\
\textbf{Second new rule for EG:} Do not replace an ambiguous name by a variable which becomes bound by a quantifier in the original formula. 
\end{frame}

\begin{frame}{New rules}
We would like to \textbf{avoid} \\
\begin{tabular}{|lll|}
\hline
$\{1\}$ & (1) $(\exists x)(\neg Ox)$ & Premise \\
$\{2\}$ & (2) $Ox$ & $x$ Premise \\
$\{1\}$ & (3) $\neg O \alpha$ & 1 ES \\
$\{1,2\}$ & (4) $Ox \wedge \neg O\alpha$ & $x$, 2 3 Adjunction \\
$\{1,2\}$ & (5) $(\exists x)(Ox \wedge \neg Ox)$ & 4 EG (error) \\
\hline
\end{tabular} \\
\textbf{New rule for EG:} Do not use a variable flagged in a formula to eliminate an actual occurrence of a name from the formula.
\end{frame}

\begin{frame}{Summary of general inferences rules}
\begin{tabular}{|lp{4cm}p{5cm}|}
\hline
Abbrev & Rule & Restriction \\
\hline
P & Add a premise & None \\
T & Use a tautology & None \\
CP & Conditional Proof & None \\
RAA & Reductio ad absurdum & None \\
US & Universal specification -- from $(\forall v)S$ derive $St$ & no free occurrence of $v$ within scope of quantifier using variable of $t$ \\
UG & Universal generalization -- from $S$ derive $(\forall v)S$ & $v$ not flagged, $v$ not subscript \\
ES & Existential specification -- from $(\exists v)S$ derive $S\alpha$ & ambiguous name $\alpha$ not previously used \\
EG & Existential generalization -- from $S\alpha$ derive $(\exists v)Sv$ & $v$ not a subscript, no occurrence of name $\alpha$ within scope of quantifier using $v$, $v$ not flagged if $\alpha$ actually occurs in $S\alpha$ \\
\hline
\end{tabular}
\end{frame}
\end{document}
