\documentclass{article}%
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{lmodern}
\usepackage{fullpage}
\usepackage[usenames,dvipsnames]{color}
\usepackage{amssymb,amsthm}%
\setcounter{MaxMatrixCols}{30}
%TCIDATA{OutputFilter=latex2.dll}
%TCIDATA{Version=5.50.0.2953}
%TCIDATA{LastRevised=Thursday, November 21, 2013 14:16:11}
%TCIDATA{<META NAME="GraphicsSave" CONTENT="32">}
%TCIDATA{<META NAME="SaveForMode" CONTENT="1">}
%TCIDATA{BibliographyScheme=Manual}
%BeginMSIPreambleData
\providecommand{\U}[1]{\protect\rule{.1in}{.1in}}
%EndMSIPreambleData
\PassOptionsToPackage{dvipsnames}{xcolor}
\newcommand{\setT}{\mathbb{T}}
\newcommand{\setF}{\mathbb{F}}
\newcommand{\setZ}{\mathbb{Z}}
\newtheoremstyle{examplesty}
{}
{}
{\upshape}
{}
{\bfseries}
{}
{1em}
{}
\theoremstyle{examplesty}
\newtheorem{example}{Example}
\newenvironment{solution}
{\let\oldqedsymbol=\qedsymbol
\renewcommand{\qedsymbol}{$\blacktriangleleft$}
\begin{proof}[\bfseries\upshape Solution]}
{\end{proof}
\renewcommand{\qedsymbol}{\oldqedsymbol}}
\begin{document}

\title{Logic 1\\{\textit{First-Order Logic}}}
\author{M\u{a}d\u{a}lina Era\c{s}cu and Tudor Jebelean\\Research Institute for Symbolic Computation,\\Johannes Kepler University, Linz, Austria\\\texttt{\{merascu,tjebelea\}@risc.jku.at} }
\date{November 21, 2013}
\maketitle

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% ex: Semantics (Example 1) %%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{example}
[Semantics]Let%
\begin{align*}
F_{1}\text{ \ }  &  :\iff\text{ \ }\underset{x}{\forall}\ \underset{y}%
{\forall}\ x\leq y\\
I  &  :\left\{
\begin{tabular}
[c]{l}%
$D=\{0,1\}$\\
$\leq_{I}$ $\rightarrow$ $\leq_{\mathbb{Z}}$%
\end{tabular}
\right.
\end{align*}

\end{example}

\begin{solution}
$\langle F_{1}\rangle_{I}=\mathbb{T}$ iff for each $d\in D$:%
\[
\left\langle \underset{y}{\forall}\ x\leq y\right\rangle _{\sigma
\Cup\{x\rightarrow d\}}^{I}=\mathbb{T}%
\]


\begin{itemize}
\item \textcolor{blue}{Case $x\rightarrow0.$} We have%
\[
\left\langle \underset{y}{\forall}\ x\leq y\right\rangle _{\{x\rightarrow
0\}}^{I}=\mathbb{T}\text{ iff for each }d\in D:\text{ \ }\left\langle x\leq
y\right\rangle _{\{x\rightarrow0\}\Cup\{y\rightarrow d\}}^{I}=\mathbb{T}%
\]


\begin{itemize}
\item \textcolor{ForestGreen}{Case $y\rightarrow0.$} We have%
\begin{align*}
&  \ \ \left\langle x\leq y\right\rangle _{\{x\rightarrow0,y\rightarrow
0\}}^{I}\\
\leadsto &  \ \ \leq_{\mathbb{Z}}\left[  \left\langle x\right\rangle
_{\{x\rightarrow0,y\rightarrow0\}}^{I},\left\langle y\right\rangle
_{\{x\rightarrow0,y\rightarrow0\}}^{I}\right] \\
\leadsto &  \ \ \leq_{\mathbb{Z}}\left[  0,0\right] \\
\leadsto &  \ \ \mathbb{T}%
\end{align*}


\item \textcolor{ForestGreen}{Case $y\rightarrow1.$} We have%
\begin{align*}
&  \ \ \left\langle x\leq y\right\rangle _{\{x\rightarrow0,y\rightarrow
1\}}^{I}\\
\leadsto &  \ \ \leq_{\mathbb{Z}}\left[  \left\langle x\right\rangle
_{\{x\rightarrow0,y\rightarrow1\}}^{I},\left\langle y\right\rangle
_{\{x\rightarrow0,y\rightarrow1\}}^{I}\right] \\
\leadsto &  \ \ \leq_{\mathbb{Z}}\left[  0,1\right] \\
\leadsto &  \ \ \mathbb{T}%
\end{align*}

\end{itemize}

\item \textcolor{blue}{Case $x\rightarrow1.$} We have%
\[
\left\langle \underset{y}{\forall}\ x\leq y\right\rangle _{\{x\rightarrow
1\}}^{I}=\mathbb{T}\text{ iff for each }d\in D:\text{ \ }\left\langle x\leq
y\right\rangle _{\{x\rightarrow1\}\Cup\{y\rightarrow d\}}^{I}=\mathbb{T}%
\]


\begin{itemize}
\item \textcolor{ForestGreen}{Case $y\rightarrow0.$} We have%
\begin{align*}
&  \ \ \left\langle x\leq y\right\rangle _{\{x\rightarrow1,y\rightarrow
0\}}^{I}\\
\leadsto &  \ \ \leq_{\mathbb{Z}}\left[  \left\langle x\right\rangle
_{\{x\rightarrow1,y\rightarrow0\}}^{I},\left\langle y\right\rangle
_{\{x\rightarrow1,y\rightarrow0\}}^{I}\right] \\
\leadsto &  \ \ \leq_{\mathbb{Z}}\left[  1,0\right] \\
\leadsto &  \ \ \mathbb{F}%
\end{align*}

\end{itemize}
\end{itemize}

\noindent Hence $\langle F_{1}\rangle_{I}=\mathbb{F}$.
\end{solution}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% ex: Semantics (Example 2) %%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{example}
[Semantics]Let%
\begin{align*}
F_{2}\text{ \ }  &  :\iff\text{ \ }\underset{x}{\forall}\ \underset{y}%
{\exists}\ x+y>c\\
I  &  :\left\{
\begin{tabular}
[c]{l}%
$D=\{0,1\}$\\
$c_{I}=0$\\
$+_{I}$ $\rightarrow$ $+_{\mathbb{Z}}$\\
$>_{I}$ $\rightarrow$ $>_{\mathbb{Z}}$%
\end{tabular}
\ \ \ \right.
\end{align*}

\end{example}

\begin{solution}
$\langle F_{2}\rangle_{I}=\mathbb{T}$ iff for each $d\in D$:%
\[
\left\langle \underset{y}{\exists}\ x+y>c\right\rangle _{\sigma\Cup
\{x\rightarrow d\}}^{I}=\mathbb{T}%
\]


\begin{itemize}
\item \textcolor{blue}{Case $x\rightarrow0.$} We have%
\[
\left\langle \underset{y}{\exists}\ x+y>c\right\rangle _{\{x\rightarrow
0\}}^{I}=\mathbb{T}\text{ iff for some }d\in D:\text{ \ }\left\langle
x+y>c\right\rangle _{\{x\rightarrow0\}\Cup\{y\rightarrow d\}}^{I}=\mathbb{T}%
\]


\begin{itemize}
\item \textcolor{ForestGreen}{Case $y\rightarrow0.$} We have%
\begin{align*}
&  \ \ \left\langle x+y>c\right\rangle _{\{x\rightarrow0,y\rightarrow0\}}%
^{I}\\
\leadsto &  \ \ >_{\mathbb{Z}}\left[  \left\langle x+y\right\rangle
_{\{x\rightarrow0,y\rightarrow0\}}^{I},\left\langle c\right\rangle
_{\{x\rightarrow0,y\rightarrow0\}}^{I}\right] \\
\leadsto &  \ \ >_{\mathbb{Z}}\left[  +_{\mathbb{Z}}\left[  \left\langle
x\right\rangle _{\{x\rightarrow0,y\rightarrow0\}}^{I},\left\langle
y\right\rangle _{\{x\rightarrow0,y\rightarrow0\}}^{I}\right]  ,0\right] \\
\leadsto &  \ \ >_{\mathbb{Z}}\left[  +_{\mathbb{Z}}\left[  0,0\right]
,0\right] \\
\leadsto &  \ \ >_{\mathbb{Z}}\left[  0,0\right] \\
\leadsto &  \ \ \mathbb{F}%
\end{align*}


\item \textcolor{ForestGreen}{Case $y\rightarrow1.$} We have%
\begin{align*}
&  \ \ \left\langle x+y>c\right\rangle _{\{x\rightarrow0,y\rightarrow1\}}%
^{I}\\
\leadsto &  \ \ >_{\mathbb{Z}}\left[  \left\langle x+y\right\rangle
_{\{x\rightarrow0,y\rightarrow1\}}^{I},\left\langle c\right\rangle
_{\{x\rightarrow0,y\rightarrow1\}}^{I}\right] \\
\leadsto &  \ \ >_{\mathbb{Z}}\left[  +_{\mathbb{Z}}\left[  \left\langle
x\right\rangle _{\{x\rightarrow0,y\rightarrow1\}}^{I},\left\langle
y\right\rangle _{\{x\rightarrow0,y\rightarrow1\}}^{I}\right]  ,0\right] \\
\leadsto &  \ \ >_{\mathbb{Z}}\left[  +_{\mathbb{Z}}\left[  0,1\right]
,0\right] \\
\leadsto &  \ \ >_{\mathbb{Z}}\left[  1,0\right] \\
\leadsto &  \ \ \mathbb{T}%
\end{align*}

\end{itemize}

\item \textcolor{blue}{Case $x\rightarrow1.$} We have%
\[
\left\langle \underset{y}{\exists}\ x+y>c\right\rangle _{\{x\rightarrow
1\}}^{I}=\mathbb{T}\text{ iff for some }d\in D:\text{ \ }\left\langle
x+y>c\right\rangle _{\{x\rightarrow1\}\Cup\{y\rightarrow d\}}^{I}=\mathbb{T}%
\]


\begin{itemize}
\item \textcolor{ForestGreen}{Case $y\rightarrow0.$} We have%
\begin{align*}
&  \ \ \left\langle x+y>c\right\rangle _{\{x\rightarrow1,y\rightarrow0\}}%
^{I}\\
\leadsto &  \ \ >_{\mathbb{Z}}\left[  \left\langle x+y\right\rangle
_{\{x\rightarrow1,y\rightarrow0\}}^{I},\left\langle c\right\rangle
_{\{x\rightarrow1,y\rightarrow0\}}^{I}\right] \\
\leadsto &  \ \ >_{\mathbb{Z}}\left[  +_{\mathbb{Z}}\left[  \left\langle
x\right\rangle _{\{x\rightarrow1,y\rightarrow0\}}^{I},\left\langle
y\right\rangle _{\{x\rightarrow1,y\rightarrow0\}}^{I}\right]  ,0\right] \\
\leadsto &  \ \ >_{\mathbb{Z}}\left[  +_{\mathbb{Z}}\left[  1,0\right]
,0\right] \\
\leadsto &  \ \ >_{\mathbb{Z}}\left[  1,0\right] \\
\leadsto &  \ \ \mathbb{T}%
\end{align*}

\end{itemize}
\end{itemize}

\noindent Hence $\langle F_{2}\rangle_{I}=\mathbb{T}$.
\end{solution}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% ex: Semantics (Example 3) %%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{example}
[Semantics]Let%
\begin{align*}
F_{3}\text{ \ }  &  :\iff\text{ \ }\underset{x}{\forall}\ \left(
P[x]\Longrightarrow Q[f[x],a]\right) \\
I  &  :\left\{
\begin{tabular}
[c]{ll}%
$D=\{1,2\}$ & \\
$a_{I}=1$ & \\
$f_{I}:D\rightarrow D$ & $\left\{
\begin{tabular}
[c]{l}%
$f_{I}[1]=1$\\
$f_{I}[2]=1$%
\end{tabular}
\ \right.  $\\
$P_{I}:D\rightarrow\left\{  {\mathbb{T},\mathbb{F}}\right\}  $ & $\left\{
\begin{tabular}
[c]{l}%
$P_{I}[1]=\mathbb{T}$\\
$P_{I}[2]=\mathbb{F}$%
\end{tabular}
\ \right.  $\\
$Q_{I}:D^{2}\rightarrow\left\{  {\mathbb{T},\mathbb{F}}\right\}  $ & $\left\{
%
\begin{tabular}
[c]{ll}%
$Q_{I}[1,1]=\mathbb{T}$ & $Q_{I}[1,2]=\mathbb{F}$\\
$Q_{I}[2,1]=\mathbb{F}$ & $Q_{I}[2,2]=\mathbb{T}$%
\end{tabular}
\ \right.  $%
\end{tabular}
\ \right.
\end{align*}

\end{example}

\begin{solution}
$\langle F_{3}\rangle_{I}=\mathbb{T}$ iff for each $d\in D$:%
\[
\left\langle P[x]\Longrightarrow Q[f[x],a]\right\rangle _{\sigma
\Cup\{x\rightarrow d\}}^{I}=\mathbb{T}%
\]


\begin{itemize}
\item \textcolor{blue}{Case $x\rightarrow1.$} We have%
\begin{align*}
&  \ \ \left\langle P[x]\Longrightarrow Q[f[x],a]\right\rangle
_{\{x\rightarrow1\}}^{I}\\
\leadsto &  \ \ \mathcal{B}_{\Longrightarrow}\left[  \left\langle
P[x]\right\rangle _{\{x\rightarrow1\}}^{I},\left\langle Q[f[x],a]\right\rangle
_{\{x\rightarrow1\}}^{I}\right] \\
\leadsto &  \ \ \mathcal{B}_{\Longrightarrow}\left[  P_{I}[\left\langle
[x]\right\rangle _{\{x\rightarrow1\}}^{I}],\text{ \ }Q_{I}[f_{I}[\left\langle
x\right\rangle _{\{x\rightarrow1\}}^{I}],\text{ }\left\langle a\right\rangle
_{\{x\rightarrow1\}}^{I}\right] \\
\leadsto &  \ \ \mathcal{B}_{\Longrightarrow}\left[  P_{I}[1],\text{ \ }%
Q_{I}\left[  f_{I}[1],\text{ }1\right]  \right] \\
\leadsto &  \ \ \mathcal{B}_{\Longrightarrow}\left[  P_{I}[1],\text{ \ }%
Q_{I}[1,\text{ }1]\right] \\
\leadsto &  \ \ \mathcal{B}_{\Longrightarrow}\left[  \mathbb{T},\text{
\ }\mathbb{T}\right] \\
\leadsto &  \ \ \mathbb{T}%
\end{align*}


\item \textcolor{blue}{Case $x\rightarrow2.$} We have%
\begin{align*}
&  \ \ \left\langle P[x]\Longrightarrow Q[f[x],a]\right\rangle
_{\{x\rightarrow2\}}^{I}\\
\leadsto &  \ \ \mathcal{B}_{\Longrightarrow}\left[  \left\langle
P[x]\right\rangle _{\{x\rightarrow2\}}^{I},\left\langle Q[f[x],a]\right\rangle
_{\{x\rightarrow2\}}^{I}\right] \\
\leadsto &  \ \ \mathcal{B}_{\Longrightarrow}\left[  P_{I}[\left\langle
[x]\right\rangle _{\{x\rightarrow2\}}^{I}],\text{ \ }Q_{I}[f_{I}[\left\langle
x\right\rangle _{\{x\rightarrow2\}}^{I}],\text{ }\left\langle a\right\rangle
_{\{x\rightarrow2\}}^{I}\right] \\
\leadsto &  \ \ \mathcal{B}_{\Longrightarrow}\left[  P_{I}[2],\text{ \ }%
Q_{I}\left[  f_{I}[2],\text{ }1\right]  \right] \\
\leadsto &  \ \ \mathcal{B}_{\Longrightarrow}\left[  P_{I}[2],\text{ \ }%
Q_{I}[1,\text{ }1]\right] \\
\leadsto &  \ \ \mathcal{B}_{\Longrightarrow}\left[  {\mathbb{F}},\text{
\ }\mathbb{T}\right] \\
\leadsto &  \ \ \mathbb{T}%
\end{align*}

\end{itemize}

\noindent Hence $\langle F_{1}\rangle_{I}=\mathbb{T}$.
\end{solution}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% ex: (Un)Satisfiability \& (In)Validity %%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{example}
[(Un)Satisfiability \& (In)Validity]Prove that the formula
\[
\underset{x} \forall P[x] \ \wedge\ \underset{y} \exists\neg P[y]
\]


\noindent is inconsistent by definition.
\end{example}

\begin{solution}
We have to prove that the formula is ${\mathbb{F}}$ for all interpretations
$I.$

\noindent Let $I=(D_{I},P_{I})$ be an arbitrary interpretation. Then%
\begin{align*}
&  \ \ \left\langle \underset{x}{\forall}P[x]\ \wedge\ \underset{y}{\exists
}\lnot P[y]\right\rangle _{I}=\mathbb{F}\\
\leadsto &  \ \ \mathcal{B}_{\wedge}\left[  \left\langle \underset{x}{\forall
}P[x]\right\rangle _{I}\text{ , }\left\langle \underset{y}{\exists}\lnot
P[y]\right\rangle _{I}\right]  =\mathbb{F}%
\end{align*}


\begin{itemize}
\item Case $\left\langle \underset{x}{\forall}P[x]\right\rangle _{I}%
=\mathbb{T}$ and $\left\langle \underset{y}{\exists}\lnot P[y]\right\rangle
_{I}=\mathbb{F}$. We have

\begin{itemize}
\item For each $x\in D_{I},$ $\left\langle P[x]\right\rangle _{I}=\mathbb{T}$ and

\item For some $y\in D_{I},$ $\left\langle \lnot P[y]\right\rangle
_{I}=\mathbb{F}$ and further for some $y\in D_{I},$ $\mathcal{B }_{\lnot
}\left[  \left\langle P[y]\right\rangle _{I}\right]  =\mathbb{F}$ We obtain
that for some $y\in D_{I},$ $\left\langle P[y]\right\rangle _{I}=\mathbb{T}$
\end{itemize}

\item Case $\left\langle \underset{x}{\forall}P[x]\right\rangle _{I}%
=\mathbb{F}$ and $\left\langle \underset{y}{\exists}\lnot P[y]\right\rangle
_{I}=\mathbb{T}$. Similarly.
\end{itemize}
\end{solution}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%% ex: CNF %%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{example}
[CNF]Prove the following by bringing the formulas into CNF
\[
\left(  \underset{x}{\forall}P[x]\right)  \Rightarrow Q\text{ \ }\equiv\text{
\ }\underset{x}{\exists}\left(  P[x]\Rightarrow Q\right)  .
\]

\end{example}

\begin{solution}
We have%
\[
\left(  \underset{x}{\forall}P[x]\right)  \Rightarrow Q\text{ \ }\equiv\text{
\ }\lnot\left(  \underset{x}{\forall}P[x]\right)  \vee Q\text{ \ }\equiv\text{
\ }\left(  \underset{x}{\exists}\lnot P[x]\right)  \vee Q\text{ \ }%
\equiv\text{ \ }\underset{x}{\exists}\left(  \lnot P[x]\vee Q\right)
\]
Further we have%
\[
\underset{x}{\exists}\left(  P[x]\Rightarrow Q\right)  \text{ \ }\equiv\text{
\ }\underset{x}{\exists}\left(  \lnot P[x]\vee Q\right)
\]

\end{solution}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% ex: Skolem Standard Form %%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{example}
[Skolem Standard Form]Bring the following formula into Skolem Standard Form
\[
\underset{x}{\forall}\ \underset{y,z}{\exists}\left(  (\lnot P[x,y]\text{
}\wedge\text{ }Q[x,z])\text{ }\vee\text{ }R[x,y,z]\right)
\]

\end{example}

\begin{solution}%
\begin{align*}
&  \ \ \underset{x}{\forall}\ \underset{y,z}{\exists}\left(  (\lnot
P[x,y]\text{ }\wedge\text{ }Q[x,z])\text{ }\vee\text{ }R[x,y,z]\right) \\
\iff &  \ \ \underset{x}{\forall}\ \underset{y,z}{\exists}\left(  (\lnot
P[x,y]\text{ }\vee\text{ }R[x,y,z])\text{ }\wedge\text{ }(Q[x,z]\text{ }%
\vee\text{ }R[x,y,z])\right) \\
\leadsto &  \ \ \underset{x}{\forall}\left(  (\lnot P[x,f[x]]\text{ }%
\vee\text{ }R[x,f[x],g[x]])\text{ }\wedge\text{ }(Q(x,g[x])\text{ }\vee\text{
}R[x,f[x],g[x]])\right)
\end{align*}

\end{solution}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% ex: Skolem Standard Form %%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{example}
[Skolem Standard Form]Bring the following formula into Skolem Standard Form
\[
\underset{x,y}{\forall}\left(  \underset{z}{\exists}P[x,z]\wedge
P[y,z]\right)  \text{ }\Rightarrow\text{ }\underset{u}{\exists}Q[x,y,u]
\]

\end{example}

\begin{solution}%
\begin{align*}
&  \ \ \underset{x,y}{\forall}\left(  \underset{z}{\exists}P[x,z]\wedge
P[y,z]\right)  \text{ }\Rightarrow\text{ }\underset{u}{\exists}Q[x,y,u]\\
\iff &  \ \ \underset{x,y}{\forall}\lnot\left(  \underset{z}{\exists
}P[x,z]\wedge P[y,z]\right)  \text{ }\vee\text{ }\underset{u}{\exists
}Q[x,y,u]\\
\iff &  \ \ \underset{x,y}{\forall}\left(  \underset{z}{\forall}\lnot
P[x,z]\vee\lnot P[y,z]\right)  \text{ }\vee\text{ }\underset{u}{\exists
}Q[x,y,u]\\
\iff &  \ \ \underset{x,y,z}{\forall}\left(  \lnot P[x,z]\vee\lnot
P[y,z]\right)  \text{ }\vee\text{ }\underset{u}{\exists}Q[x,y,u]\\
\iff &  \ \ \underset{x,y,z}{\forall}\ \underset{u}{\exists}\ \left(  \lnot
P[x,z]\vee\lnot P[y,z]\right)  \text{ }\vee\text{ }Q[x,y,u]\\
\leadsto &  \ \ \underset{x,y,z}{\forall}\lnot P[x,z]\vee\lnot P[y,z]\text{
}\vee\text{ }Q[x,y,f[x,y,z]]
\end{align*}

\end{solution}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% ex: (Un)Satisfiability \& (In)Validity %%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{example}
Prove that the formula
\[
\underset{x} \forall P[x] \ \Rightarrow\ \underset{y} \exists P[y]
\]


\noindent is valid by equivalent transformations.
\end{example}

\begin{solution}
We assume that the formula is invalid and derive a contradiction. Hence, it
exists an interpretation $I$ under which the formula is false. That is
\begin{align*}
&  \ \left\langle \underset{x}{\forall}P[x]\right\rangle ^{I} =\mathbb{T}\\
&  \ \wedge\\
&  \ \left\langle \underset{y}{\exists}P[y]\right\rangle ^{I} =\mathbb{F}%
\text{ \ }\mathbb{\leadsto}\text{ \ }\left\langle \underset{y}{\forall}\lnot
P[y]\right\rangle ^{I}=\mathbb{T}%
\end{align*}
From the above we obtain that
\[
\left\langle \underset{x}{\forall}P[x]\right\rangle ^{I}=\left\langle
\underset{y}{\forall}\lnot P[y]\right\rangle ^{I}\text{ which is a
contradiction}
\]

\end{solution}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% ex: (Un)Satisfiability \& (In)Validity %%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{example}
[(Un)Satisfiability \& (In)Validity]Prove that the formula
\[
\underset{x} \forall P[x] \ \wedge\ \underset{y} \exists\neg P[y]
\]


\noindent is inconsistent by equivalent transformations.
\end{example}

\begin{solution}
We have
\[
\underset{x}{\forall}P[x]\ \wedge\ \underset{y}{\exists}\lnot P[y]\text{
\ }\equiv\text{ \ }\underset{x}{\forall}P[x]\ \wedge\ \lnot\left(
\underset{y}{\forall}P[y]\right)  \text{ \ }\equiv\text{ \ }\underset
{x}{\forall}P[x]\ \wedge\ \lnot\left(  \underset{x}{\forall}P[x]\right)
\text{ \ }\equiv\text{ \ }\mathbb{F}%
\]

\end{solution}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%% ex: Clausification %%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{example}
[Clausification]Transform the formulas $F_{1}$, $F_{2}$, $F_{3}$, $F_{4}$, and
$\lnot G$ into a set of clauses, where%
\[%
\begin{tabular}
[c]{ll}%
$F_{1}:$ & $\underset{x,y}{\forall}\ \underset{z}{\exists}P[x,y,z]$\\
& \\
$F_{2}:$ & $%
\begin{array}
[c]{l}%
\underset{x,y,z,u,v,w}{\forall}\left(  P[x,y,u]\text{ }\wedge\text{
}P[y,z,v]\text{ }\wedge\text{ }P[u,z,w]\text{ \ }\Rightarrow\text{
\ }P[x,v,w]\right) \\
\wedge\\
\underset{x,y,z,u,v,w}{\forall}\left(  P[x,y,u]\text{ }\wedge\text{
}P[y,z,v]\text{ }\wedge\text{ }P[x,v,w]\text{ \ }\Rightarrow\text{
\ }P[u,z,w]\right)
\end{array}
$\\
& \\
$F_{3}:$ & $\underset{x}{\forall}P[x,e,x]$ $\wedge$ $\underset{x}{\forall
}P[e,x,x]$\\
& \\
$F_{4}:$ & $\underset{x}{\forall}P[x,i[x],e]$ $\wedge$ $\underset{x}{\forall
}P[i[x],x,e]$\\
& \\
$G:$ & $\left(  \underset{x}{\forall}P[x,x,e]\right)  $ $\ \Rightarrow$
$\ \left(  \underset{u,v,w}{\forall}\left(  P[u,v,w]\text{\ }\Rightarrow\text{
}P[v,u,w]\right)  \right)  $%
\end{tabular}
\ \ \ \ \
\]

\end{example}

\begin{solution}
$F_{1}$, $F_{2}$,$F_{3}$,$F_{4}$ can almost immediately transformed into
clauses. We have%
\begin{align*}
&  P[x,y,f[x,y]]\\
&  \lnot P[x,y,u]\text{ }\vee\text{ }\lnot P[y,z,v]\text{ }\vee\text{ }\lnot
P[u,z,w]\text{ }\vee\text{\ }P[x,v,w]\\
&  \lnot P[x,y,u]\text{ }\vee\text{ }\lnot P[y,z,v]\text{ }\vee\text{ }\lnot
P[x,v,w]\text{\ }\vee\text{\ }P[u,z,w]\\
&  P[x,e,x]\\
&  P[e,x,x]\\
&  P[x,i[x],e]\\
&  P[i[x],x,e]
\end{align*}
We transform $\lnot G$ into standard form%
\begin{align*}
&  \lnot\left(  \left(  \underset{x}{\forall}P[x,x,e]\right)  \ \ \Rightarrow
\ \ \left(  \underset{u,v,w}{\forall}\left(  P[u,v,w]\text{\ }\Rightarrow
\text{ }P[v,u,w]\right)  \right)  \right) \\
\iff &  \lnot\left(  \lnot\left(  \underset{x}{\forall}P[x,x,e]\right)
\ \vee\ \left(  \underset{u,v,w}{\forall}\left(  \lnot P[u,v,w]\text{\ }%
\vee\text{ }P[v,u,w]\right)  \right)  \right) \\
\iff &  \left(  \underset{x}{\forall}P[x,x,e]\right)  \ \wedge\ \left(
\underset{u,v,w}{\exists}\left(  P[u,v,w]\text{\ }\wedge\text{ }\lnot
P[v,u,w]\right)  \right) \\
\leadsto &  \underset{x}{\forall}P[x,x,e]\ \wedge\ P[a,b,c]\text{\ }%
\wedge\text{ }\lnot P[b,a,c]
\end{align*}
which gives the following clauses%
\begin{align*}
&  P[x,x,e]\\
&  P[a,b,c]\\
&  \lnot P[b,a,c]
\end{align*}

\end{solution}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%% ex:Most General Unifier %%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{example}
%[Most General Unifier]Find a most general unifier for
%\[
%W = \{P[a,x,f[g[y]]], \ P[z,f[z],f[u]] \}
%\]
%\end{example}
%\begin{solution}
%Let $\sigma_{0} = \varepsilon$ and $W_{0} = W$. Since $W_{0}$ is not a
%singleton, $\sigma_{0}$ is not a mgu of $W$.
%\noindent$D_{0} = \{a,z\}$.
%\noindent Let $\sigma_{1}=\varepsilon\circ\{z\rightarrow a\}$, $W_{1}%
%=W_{0}\sigma_{1}=\{P[a,x,f[g[y]]],\ P[a,f[a],f[u]]\}$.
%\noindent$W_{1}$ is not a singleton. $D_{1}=\{x,f[a]\}$.
%\noindent Let $\sigma_{2}=\{z\rightarrow a\}\{x\rightarrow
%f[a]\}=\{z\rightarrow a,x\rightarrow f[a]\}.$ $W_{2}=W_{1}\sigma
%_{2}=\{P[a,f[a],f[g[y]]],\ P[a,f[a],f[u]]\}.$
%\noindent$W_{2}$ is not a singleton. $D_{2}=\{g[y],u\}$.
%\noindent Let $\sigma_{3}=\sigma_{2}\{u\rightarrow g[y]\}=\{z\rightarrow
%a,x\rightarrow f[a],u\rightarrow g[y]\}.$
%\noindent$W_{3}=W_{2}\sigma_{2}%
%=\{P[a,f[a],f[g[y]]],\ P[a,f[a],f[g[y]]]\}=\{P[a,f[a],f[g[y]]]\}.$
%\noindent Since $W_{3}$ is a singleton. $\sigma_{3}=\{z\rightarrow
%a,x\rightarrow f[a],u\rightarrow g[y]\}$ is a mgu for $W.$
%\end{solution}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%% ex:Most General Unifier %%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{example}
%[Most General Unifier]Find a most general unifier for
%\[
%W = \{Q[a], \ Q[b] \}
%\]
%\end{example}
%\begin{solution}
%Let $\sigma_{0} = \varepsilon$ and $W_{0} = W$. Since $W_{0}$ is not a
%singleton, $\sigma_{0}$ is not a mgu of $W$.
%\noindent$D_{0} = \{a,b\}$. Since none of the elements of $D_{0}$ is a
%variable we conclude that $W$ is not unifiable.
%\end{solution}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%% ex:Resolution 1 %%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{example}
%[Resolution $1$]Prove by resolution the following%
%\[
%\underset{x}{\forall}F[x]\text{ }\vee\text{ }\underset{x}{\forall}H[x]
%\ \ \ \not \equiv \ \ \ \underset{x}{\forall}\left(  F[x]\text{ }\vee\text{
%}H[x]\right)
%\]
%\end{example}
%\begin{solution}
%\noindent Direction \textquotedblleft$\Rightarrow$\textquotedblright. Let%
%\begin{align*}
%F\text{\ \ }  &  :\iff\text{ \ }\underset{x}{\forall}F[x]\text{ }\vee\text{
%}\underset{x}{\forall}H[x]\\
%G\text{\ \ }  &  :\iff\text{ \ }\underset{x}{\forall}\left(  F[x]\text{ }%
%\vee\text{ }H[x]\right)
%\end{align*}
%\noindent We prove that $G$ is a logical consequence of $F$ by resolution. We
%have%
%\begin{align*}
%F\text{\ \ }  &  :\iff\text{ \ }\underset{x}{\forall}F[x]\text{ }\vee\text{
%}\underset{x}{\forall}H[x]\\
%&  \iff\text{ \ }\underset{x,y}{\forall}F[x]\text{ }\vee\text{ }H[y]\\
%\lnot G\text{\ \ }  &  :\iff\text{ \ }\lnot\left(  \underset{x}{\forall
%}\left(  F[x]\text{ }\vee\text{ }H[x]\right)  \right) \\
%&  \iff\text{ \ }\underset{x}{\exists}\left(  \lnot F[x]\text{ }\wedge\text{
%}\lnot H[x]\right) \\
%&  \leadsto\text{ \ }\lnot F[a]\text{ }\wedge\text{ }\lnot H[a]
%\end{align*}
%\noindent By transforming them into a set of clauses we have%
%\[%
%\begin{tabular}
%[c]{ll}%
%$(1)$ & $F[x]\text{ }\vee\text{ }H[y]$\\
%$(2)$ & $\lnot F[a]$\\
%$(3)$ & $\lnot H[a]$%
%\end{tabular}
%\ \ \
%\]
%\noindent By applying resolution we obtain the following clauses%
%\[%
%\begin{tabular}
%[c]{lll}%
%$(4)$ & $H[a]$ & $(1)\wedge(2),\{x\rightarrow a,y\rightarrow a\}$\\
%$(5)$ & $\emptyset$ & $(3)\wedge(4)$%
%\end{tabular}
%\]
%\medskip
%\noindent Direction \textquotedblleft$\Leftarrow$\textquotedblright. Let%
%\begin{align*}
%F\text{\ \ }  &  :\iff\text{ \ }\underset{x}{\forall}\left(  F[x]\text{ }%
%\vee\text{ }H[x]\right) \\
%G\text{\ \ }  &  :\iff\text{ \ }\underset{x}{\forall}F[x]\text{ }\vee\text{
%}\underset{x}{\forall}H[x]
%\end{align*}
%\noindent We prove that $G$ is a logical consequence of $F$ by resolution. We
%have%
%\begin{align*}
%F\text{\ \ }  &  :\iff\text{ \ }\underset{x}{\forall}\left(  F[x]\text{ }%
%\vee\text{ }H[x]\right) \\
%\lnot G\text{\ \ }  &  :\iff\text{ \ }\lnot\left(  \underset{x}{\forall
%}F[x]\text{ }\vee\text{ }\underset{x}{\forall}H[x]\right) \\
%&  \iff\text{ \ }\underset{x}{\exists}\lnot F[x]\text{ }\wedge\text{
%}\underset{x}{\exists}\lnot H[x]\\
%&  \leadsto\text{ \ }\lnot F[a]\text{ }\wedge\text{ }\lnot H[b]
%\end{align*}
%\noindent By transforming them into a set of clauses we have%
%\[%
%\begin{tabular}
%[c]{ll}%
%$(1)$ & $F[x]$ $\vee$ $H[x]$\\
%$(2)$ & $\lnot F[a]$\\
%$(3)$ & $\lnot H[b]$%
%\end{tabular}
%\]
%\noindent By applying resolution we obtain the following clauses%
%\[%
%\begin{tabular}
%[c]{lll}%
%$(4)$ & $H[a]$ & $(1)\wedge(2),\{x\rightarrow a\}$\\
%$(5)$ & $F[b]$ & $(1)\wedge(3),\{x\rightarrow b\}$%
%\end{tabular}
%\
%\]
%\end{solution}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%% ex:Resolution 2 %%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{example}
%[Resolution $2$]Prove by resolution that $G$ is a logical consequence of
%$F_{1}$ and $F_{2}$ where%
%\[%
%\begin{tabular}
%[c]{ll}%
%$F_{1}:$ & $\underset{x}{\forall}\left(  C[x]\ \ \Rightarrow\ \ \left(
%W[x]\text{ }\wedge\text{ }R[x]\right)  \right)  $\\
%$F_{2}:$ & $\underset{x}{\exists}(C[x]$ $\wedge$ $O[x])$\\
%$G:$ & $\underset{x}{\exists}(O[x]$ $\wedge$ $R[x])$%
%\end{tabular}
%\]
%\end{example}
%\begin{solution}
%We show that $F_{1}$ $\wedge$ $F_{2}$ $\wedge$ $\lnot G$ is unsatisfiable by
%resolution. We transform $F_{1}$, $F_{2}$, $\lnot G$ into Skolem standard
%form. We have%
%\begin{align*}
%F_{1}  &  :\text{ \ }\underset{x}{\forall}\left(  C[x]\ \ \Rightarrow
%\ \ \left(  W[x]\text{ }\wedge\text{ }R[x]\right)  \right) \\
%\iff &  \ \underset{x}{\forall}\left(  \lnot C[x]\ \ \vee\ \ \left(
%W[x]\text{ }\wedge\text{ }R[x]\right)  \right) \\
%\iff &  \ \underset{x}{\forall}\left(  \lnot C[x]\ \vee\ W[x])\text{ }%
%\wedge\text{\ }(\lnot C[x]\ \vee\ R[x]\right) \\
%& \\
%F_{2}  &  :\text{ \ }\underset{x}{\exists}(C[x]\wedge O[x])\\
%\leadsto &  \text{ \ }C[a]\wedge O[a]\\
%& \\
%\lnot G  &  :\text{ \ }\lnot\left(  \underset{x}{\exists}(O[x]\wedge
%R[x])\right) \\
%\iff &  \text{ \ }\underset{x}{\forall}(\lnot O[x]\vee\lnot R[x])
%\end{align*}
%We have the following set of clauses%
%\[%
%\begin{tabular}
%[c]{ll}%
%$(1)$ & $\lnot C[x]\ \vee\ W[x]$\\
%$(2)$ & $\lnot C[x]\ \vee\ R[x]$\\
%$(3)$ & $C[a]$\\
%$(4)$ & $O[a]$\\
%$(5)$ & $\lnot O[x]\vee\lnot R[x]$%
%\end{tabular}
%\
%\]
%By resolution we obtain also the following clauses%
%\[%
%\begin{tabular}
%[c]{lll}%
%$(6)$ & $\lnot R[a]$ & $(4)\wedge(5),\{x\rightarrow a\}$\\
%$(7)$ & $\lnot C[a]$ & $(6)\wedge(2),\{x\rightarrow a\}$\\
%$(8)$ & $\emptyset$ & $(7)\wedge(3)$%
%\end{tabular}
%\
%\]
%\end{solution}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%% ex:Resolution 3 %%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{example}
%[Resolution $3$]Prove by resolution that $G$ is a logical consequence of
%$F_{1}$ and $F_{2}$ where%
%\[%
%\begin{tabular}
%[c]{ll}%
%$F_{1}:$ & $\underset{x}{\exists}\left(  P[x]\ \wedge\ \underset{y}{\forall
%}\left(  D[y]\text{ }\Rightarrow\text{ }L[x,y]\right)  \right)  $\\
%$F_{2}:$ & $\underset{x}{\forall}\left(  P[x]\ \Rightarrow\ \underset
%{y}{\forall}\left(  Q[y]\text{ }\Rightarrow\text{ }\lnot L[x,y]\right)
%\right)  $\\
%$G:$ & $\underset{x}{\forall}\left(  D[x]\ \Rightarrow\ \lnot Q[x]\right)  $%
%\end{tabular}
%\ \
%\]
%\end{example}
%\begin{solution}
%We show that $F_{1}$ $\wedge$ $F_{2}$ $\wedge$ $\lnot G$ is unsatisfiable by
%resolution. We transform $F_{1}$, $F_{2}$, $\lnot G$ into Skolem standard
%form. We have%
%\begin{align*}
%F_{1}  &  :\text{ \ }\underset{x}{\exists}\left(  P[x]\ \wedge\ \underset
%{y}{\forall}\left(  D[y]\text{ }\Rightarrow\text{ }L[x,y]\right)  \right) \\
%\iff &  \ \underset{x}{\exists}\left(  P[x]\ \wedge\ \underset{y}{\forall
%}\left(  \lnot D[y]\text{ }\vee\text{ }L[x,y]\right)  \right) \\
%\iff &  \ \underset{x}{\exists}\underset{y}{\forall}\left(  P[x]\ \wedge
%\ \left(  \lnot D[y]\text{ }\vee\text{ }L[x,y]\right)  \right) \\
%\leadsto &  \text{ \ }\underset{y}{\forall}\left(  P[a]\ \wedge\ \left(  \lnot
%D[y]\text{ }\vee\text{ }L[a,y]\right)  \right) \\
%& \\
%F_{2}  &  :\text{ \ }\underset{x}{\forall}\left(  P[x]\ \Rightarrow
%\ \underset{y}{\forall}\left(  Q[y]\text{ }\Rightarrow\text{ }\lnot
%L[x,y]\right)  \right) \\
%\iff &  \text{ \ }\underset{x}{\forall}\left(  P[x]\ \Rightarrow\ \underset
%{y}{\forall}\left(  \lnot Q[y]\text{ }\vee\text{ }\lnot L[x,y]\right)  \right)
%\\
%\iff &  \text{ \ }\underset{x}{\forall}\left(  \lnot P[x]\ \vee\ \underset
%{y}{\forall}\left(  \lnot Q[y]\text{ }\vee\text{ }\lnot L[x,y]\right)  \right)
%\\
%\iff &  \text{ \ }\underset{x}{\forall}\underset{y}{\forall}\left(  \lnot
%P[x]\ \vee\ \lnot Q[y]\text{ }\vee\text{ }\lnot L[x,y]\right) \\
%& \\
%\lnot G  &  :\text{ \ }\lnot\left(  \underset{x}{\forall}\left(
%D[x]\ \Rightarrow\ \lnot Q[x]\right)  \right) \\
%\iff &  \text{ }\lnot\left(  \underset{x}{\forall}\left(  \lnot D[x]\ \vee
%\ \lnot Q[x]\right)  \right) \\
%\iff &  \text{ \ }\underset{x}{\exists}\left(  D[x]\ \wedge\ Q[x]\right) \\
%\leadsto &  \text{ \ }D[a]\ \wedge\ Q[a]
%\end{align*}
%We have the following set of clauses%
%\[%
%\begin{tabular}
%[c]{ll}%
%$(1)$ & $P[a]$\\
%$(2)$ & $\lnot D[y]\text{ }\vee\text{ }L[a,y]$\\
%$(3)$ & $\lnot P[x]\ \vee\ \lnot Q[y]\text{ }\vee\text{ }\lnot L[x,y]$\\
%$(4)$ & $D[a]$\\
%$(5)$ & $Q[a]$%
%\end{tabular}
%\
%\]
%By resolution we obtain also the following clauses%
%\[%
%\begin{tabular}
%[c]{lll}%
%$(6)$ & $L[a,a]$ & $(2)\wedge(4),\{y\rightarrow a\}$\\
%$(7)$ & $\lnot P[a]\ \vee\ \lnot Q[a]$ & $(3)\wedge(6),\{x\rightarrow
%a,y\rightarrow a\}$\\
%$(8)$ & $\lnot Q[a]$ & $(1)\wedge(7)$\\
%$(9)$ & $\emptyset$ & $(5)\wedge(8)$%
%\end{tabular}
%\
%\]
%\end{solution}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%% ex:Resolution 4 %%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{example}
%[Resolution $4$]Prove by resolution that $G$ is a logical consequence of $F$
%where%
%\[%
%\begin{tabular}
%[c]{ll}%
%$F:$ & $\underset{x}{\forall}\underset{y}{\exists}\left(  S[x,y]\text{ }%
%\wedge\text{ }M[y]\right)  \ \ \Rightarrow\text{ \ }\underset{y}{\exists
%}\left(  I[y]\text{ }\wedge\text{ }E[x,y]\right)  $\\
%$G:$ & $\lnot\underset{x}{\exists}I[x]\ \ \Rightarrow$ \ $\underset
%{x,y}{\forall}$ $(S[x,y]$ $\Rightarrow$ $\lnot M[y])$%
%\end{tabular}
%\
%\]
%\end{example}
%\begin{solution}
%We show that $F$ $\wedge$ $\lnot G$ is unsatisfiable. First we transform the
%formulas into standard form. We have%
%\begin{align*}
%F  &  :\text{ \ }\underset{x}{\forall}\left(  \underset{y}{\exists}\left(
%S[x,y]\text{ }\wedge\text{ }M[y]\right)  \right)  \ \ \Rightarrow\text{
%\ }\underset{y}{\exists}\left(  I[y]\text{ }\wedge\text{ }E[x,y]\right) \\
%\text{ \ }  &  \iff\text{ \ }\underset{x}{\forall}\lnot\left(  \underset
%{y}{\exists}\left(  S[x,y]\text{ }\wedge\text{ }M[y]\right)  \right)
%\ \vee\text{\ }\underset{y}{\exists}\left(  I[y]\text{ }\wedge\text{
%}E[x,y]\right) \\
%&  \iff\text{ \ }\underset{x}{\forall}\left(  \underset{y}{\forall}\left(
%\lnot S[x,y]\text{ }\vee\text{ }\lnot M[y]\right)  \right)  \ \vee
%\text{\ }\underset{y}{\exists}\left(  I[y]\text{ }\wedge\text{ }E[x,y]\right)
%\\
%&  \iff\text{ \ }\underset{x}{\forall}\left(  \underset{y}{\forall}\left(
%\lnot S[x,y]\text{ }\vee\text{ }\lnot M[y]\right)  \right)  \ \vee
%\text{\ }\left(  I[f[x]]\text{ }\wedge\text{ }E[x,f[x]]\right) \\
%&  \iff\text{ \ }\underset{x}{\forall}\underset{y}{\forall}\left(  \lnot
%S[x,y]\text{ }\vee\text{ }\lnot M[y]\right)  \ \vee\ \left(  I[f[x]]\text{
%}\wedge\text{ }E[x,f[x]]\right) \\
%&  \iff\text{ \ }\underset{x}{\forall}\underset{y}{\forall}\left(  \left(
%\lnot S[x,y]\text{ }\vee\text{ }\lnot M[y]\ \vee\ I[f[x]]\right)  \text{
%}\wedge\text{ }\left(  \lnot S[x,y]\text{ }\vee\text{ }\lnot M[y]\ \vee
%\ E[x,f[x]]\right)  \right) \\
%\lnot G  &  :\lnot\left(  \lnot\underset{x}{\exists}I[x]\ \ \Rightarrow
%\ \underset{x,y}{\forall}(S[x,y]\Rightarrow\lnot M[y])\right) \\
%&  \iff\text{ \ }\lnot\left(  \lnot\underset{x}{\exists}I[x]\ \ \Rightarrow
%\ \underset{x,y}{\forall}(\lnot S[x,y]\vee\lnot M[y])\right) \\
%&  \iff\text{ \ }\lnot\left(  \underset{x}{\exists}I[x]\ \ \vee\ \underset
%{x,y}{\forall}(\lnot S[x,y]\vee\lnot M[y])\right) \\
%&  \iff\text{ \ }\left(  \underset{x}{\forall}\lnot I[x]\ \ \wedge
%\ \underset{x,y}{\exists}(S[x,y]\wedge M[y])\right) \\
%&  \iff\text{ \ }\underset{z}{\forall}\lnot I[z]\ \ \wedge\ \underset
%{x,y}{\exists}(S[x,y]\wedge M[y])\\
%&  \leadsto\text{ \ }\underset{z}{\forall}\lnot I[z]\ \ \wedge\ S[a,b]\wedge
%M[b]
%\end{align*}
%We have the following set of clauses%
%\[%
%\begin{tabular}
%[c]{ll}%
%$(1)$ & $\lnot S[x,y]\text{ }\vee\text{ }\lnot M[y]\ \vee\ I[f[x]]$\\
%$(2)$ & $\lnot S[x,y]\text{ }\vee\text{ }\lnot M[y]\ \vee\ E[x,f[x]]$\\
%$(3)$ & $\lnot I[z]$\\
%$(4)$ & $S[a,b]$\\
%$(5)$ & $M[b]$%
%\end{tabular}
%\]
%By resolution we obtain also the following clauses%
%\[%
%\begin{tabular}
%[c]{lll}%
%$(6)$ & $\lnot S[x,y]\text{ }\vee\text{ }\lnot M[y]$ & $(1)\wedge
%(3),\{z\rightarrow f[x]\}$\\
%$(7)$ & $\lnot M[b]$ & $(4)\wedge(6),\{x\rightarrow a,y\rightarrow b\}$\\
%$(8)$ & $\emptyset$ & $(5)\wedge(7)$%
%\end{tabular}
%\
%\]
%\end{solution}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%% ex:Resolution 5 %%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{example}
%[Resolution $5$]Prove by resolution that $G$ is a logical consequence of
%$F_{1},F_{2},$ and $F_{3}$ where%
%\[%
%\begin{tabular}
%[c]{ll}%
%$F_{1}:$ & $\underset{x}{\forall}\left(  Q[x]\text{ }\Rightarrow\text{ }\lnot
%P[x]\right)  $\\
%$F_{2}:$ & $\underset{x}{\forall}\left(  \left(  R[x]\text{ }\wedge\text{
%}\lnot Q[x]\right)  \text{ \ }\Rightarrow\text{ \ }\underset{y}{\exists
%}\left(  T[x,y]\text{ }\wedge\text{ }S[y]\right)  \right)  $\\
%$F_{3}:$ & $\underset{x}{\exists}\left(  P[x]\text{ }\wedge\text{ }%
%\underset{y}{\forall}\left(  T[x,y]\text{ }\Rightarrow\text{ }P[y]\right)
%\text{ }\wedge\text{ }R[x]\right)  $\\
%$G:$ & $\underset{x}{\exists}\left(  S[x]\wedge P[x]\right)  $%
%\end{tabular}
%\]
%\end{example}
%\begin{solution}
%We show that $F_{1}$ $\wedge$ $F_{2}$ $\wedge$ $F_{3}$ $\wedge$ $\lnot G$ is
%unsatisfiable. First we transform the formulas into standard form.%
%\begin{align*}
%F_{1} &  :\underset{x}{\text{ \ }\forall}\left(  Q[x]\text{ }\Rightarrow\text{
%}\lnot P[x]\right)  \text{ \ }\iff\text{ \ }\underset{x}{\forall}\left(  \lnot
%Q[x]\text{ }\vee\text{ }\lnot P[x]\right)  \\
%F_{2} &  :\text{ \ }\underset{x}{\forall}\left(  \left(  R[x]\text{ }%
%\wedge\text{ }\lnot Q[x]\right)  \text{ \ }\Rightarrow\text{ \ }\underset
%{y}{\exists}\left(  T[x,y]\text{ }\wedge\text{ }S[y]\right)  \right)  \\
%&  \iff\text{ \ }\underset{x}{\forall}\left(  \lnot\left(  R[x]\text{ }%
%\wedge\text{ }\lnot Q[x]\right)  \text{ \ }\vee\text{ \ }\underset{y}{\exists
%}\left(  T[x,y]\text{ }\wedge\text{ }S[y]\right)  \right)  \\
%&  \iff\text{ \ }\underset{x}{\forall}\left(  \lnot R[x]\text{ }\vee\text{
%}Q[x]\text{ \ }\vee\text{ \ }\underset{y}{\exists}\left(  T[x,y]\text{ }%
%\wedge\text{ }S[y]\right)  \right)  \\
%&  \iff\text{ \ }\underset{x}{\forall}\underset{y}{\exists}\left(  \lnot
%R[x]\text{ }\vee\text{ }Q[x]\text{ \ }\vee\text{ \ }\left(  T[x,y]\text{
%}\wedge\text{ }S[y]\right)  \right)  \\
%&  \iff\text{ \ }\underset{x}{\forall}\underset{y}{\exists}\left(  \left(
%\lnot R[x]\text{ }\vee\text{ }Q[x]\text{ \ }\vee\text{ \ }T[x,y]\right)
%\text{ }\wedge\text{ }\left(  \lnot R[x]\text{ }\vee\text{ }Q[x]\text{ }%
%\vee\text{ }S[y]\right)  \right)  \\
%&  \leadsto\text{ \ }\underset{x}{\forall}\left(  \left(  \lnot R[x]\text{
%}\vee\text{ }Q[x]\text{ \ }\vee\text{ \ }T[x,f[x]]\right)  \text{ }%
%\wedge\text{ }\left(  \lnot R[x]\text{ }\vee\text{ }Q[x]\text{ }\vee\text{
%}S[f[x]]\right)  \right)  \\
%F_{3} &  :\text{ \ }\underset{x}{\exists}\left(  P[x]\text{ }\wedge\text{
%}\underset{y}{\forall}\left(  T[x,y]\text{ }\Rightarrow\text{ }P[y]\right)
%\text{ }\wedge\text{ }R[x]\right)  \\
%&  \iff\text{ \ }\underset{x}{\exists}\left(  P[x]\text{ }\wedge\text{
%}\underset{y}{\forall}\left(  \lnot T[x,y]\text{ }\vee\text{ }P[y]\right)
%\text{ }\wedge\text{ }R[x]\right)  \\
%&  \iff\text{ \ }\underset{x}{\exists}\underset{y}{\forall}\left(  P[x]\text{
%}\wedge\text{ }\left(  \lnot T[x,y]\text{ }\vee\text{ }P[y]\right)  \text{
%}\wedge\text{ }R[x]\right)  \\
%&  \leadsto\text{ \ }\underset{y}{\forall}\left(  P[a]\text{ }\wedge\text{
%}\left(  \lnot T[a,y]\text{ }\vee\text{ }P[y]\right)  \text{ }\wedge\text{
%}R[a]\right)  \\
%\lnot G &  :\lnot\left(  \underset{x}{\exists}\left(  S[x]\wedge P[x]\right)
%\right)  \\
%&  \iff\text{ \ }\underset{x}{\forall}\left(  \lnot S[x]\vee\lnot P[x]\right)
%\end{align*}
%We have the following set of clauses%
%\[%
%\begin{tabular}
%[c]{lll}%
%$(1)$ & $\lnot Q[x]\text{ }\vee\text{ }\lnot P[x]$ & \\
%$(2)$ & $\lnot R[x]\text{ }\vee\text{ }Q[x]\text{ \ }\vee\text{ \ }T[x,f[x]]$
%& \\
%$(3)$ & $\lnot R[x]\text{ }\vee\text{ }Q[x]\text{ }\vee\text{ }S[f[x]]$ & \\
%$(4)$ & $P[a]$ & \\
%$(5)$ & $\lnot T[a,y]\text{ }\vee\text{ }P[y]$ & \\
%$(6)$ & $R[a]$ & \\
%$(7)$ & $\lnot S[x]\vee\lnot P[x]$ & \\
%$(8)$ & $\lnot Q[a]$ & $(1)\wedge(4),\{x\rightarrow a\}$\\
%$(9)$ & $\lnot R[a]\text{\ }\vee\text{ }T[a,f[a]]$ & $(8)\wedge
%(2),\{x\rightarrow a\}$\\
%$(10)$ & $\lnot R[a]\text{ }\vee\text{ }P[f[a]]$ & $(9)\wedge
%(5),\{y\rightarrow f[a]\}$\\
%$(11)$ & $P[f[a]]$ & $(10)\wedge(6)$\\
%$(12)$ & $\lnot S[f[a]]$ & $(11)\wedge(7)$\\
%$(13)$ & $\lnot R[a]\text{ }\vee\text{ }Q[a]$ & $(12)\wedge(3)$\\
%$(14)$ & $Q[a]$ & $(13)\wedge(6)$\\
%$(15)$ & $\emptyset$ & $(14)\wedge(8)$%
%\end{tabular}
%\
%\]
%\end{solution}



\end{document}