41/186
\begin{frame}
\frametitle{Parse Trees}

What is the formula corresponding to the following parse tree?
\bigskip
\begin{center}
\begin{tikzpicture}[default]
\begin{scope}[tree,nodes={node_yellow,minimum size=6mm}]
%!begin{tree}{magic:006780749442385126}
% $\to$:e($\wedge$:l($\neg$:ll($p$:lll),$q$:lr),$\wedge$:r($p$:rl,$\vee$:rr($q$:rrl,$\neg$:rrr($r$:rrrr))))
\node (e) {$\to$}
child { node (l) {$\wedge$}
child { node (ll) {$\neg$}
child { node (lll) {$p$}
}
}
child { node (lr) {$q$}
}
}
child { node (r) {$\wedge$}
child { node (rl) {$p$}
}
child { node (rr) {$\vee$}
child { node (rrl) {$q$}
}
child { node (rrr) {$\neg$}
child { node (rrrr) {$r$}
}
}
}
};
\begin{pgfonlayer}{background}
\end{pgfonlayer}

%!end{tree}{magic:006780749442385126}
\end{scope}

\begin{scope}[dgreen]
\mpause[1]{
\node [lhead=lll] {$p$};
}
\mpause{
\node [rhead=lr] {$q$};
\node [lhead=rl] {$p$};
\node [lhead=rrl] {$q$};
\node [rhead=rrrr] {$r$};
}
\mpause{
\node [lhead=ll] {$\neg p$};
}
\mpause{
\node [lhead=l] {$\neg p \wedge q$};
}
\mpause{
\node [rhead=rrr] {$\neg r$};
}
\mpause{
\node [rhead=rr] {$q \vee \neg r$};
}
\mpause{
\node [rhead=r] {$p \wedge (q \vee \neg r)$};
}
\mpause{
\node [ahead=e] (l) {$(\neg p \wedge q) \to (p \wedge (q \vee \neg r))$};
}
\mpause{
\node [ahead=l] (l) {$\neg p \wedge q \to p \wedge (q \vee \neg r) =$};
}
\end{scope}
\end{tikzpicture}
\end{center}
\end{frame}