\documentclass[pdf,slideColor,plainsem]{prosper}

\usepackage{xspace}
\usepackage{latexsym}
\usepackage{amssymb}

\usepackage{pst-node}
\usepackage{pst-uml-prosper}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def\MiniPage#1#2{\begin{minipage}[t]{.49\hsize}#1\end{minipage}%
\hspace{1ex}\begin{minipage}[t]{.49\hsize}#2\end{minipage}}

\newlength{\ParLen}
\def\Parbox#1#2{\settowidth{\ParLen}{#1}\parbox[t]{\ParLen}{#2}}

\newcommand {\minitab}  {\hspace*{1ex}}
\newcommand {\smalltab} {\hspace*{5mm}}
\newcommand {\tab}      {\hspace*{10mm}}
\newcommand {\bigtab}   {\hspace*{15mm}}
\newcommand {\hugetab}  {\hspace*{20mm}}

\newcommand{\per}{\mathpunct{\mbox{\bf .}}}
\newcommand{\nl}{\\\tab}

\def\centerpar#1{\renewcommand{\arraystretch}{0.7}%
\begin{tabular}{c}#1\end{tabular}\renewcommand{\arraystretch}{1}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% symbols for UML package
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newlength{\umlunitbox}
\def\umlcard#1%
  {\umlcsize #1\hspace*{-.5ex}}
\def\umlclass#1#2%
  {\rnode{#1}{\umlClass{\makebox[\umlunitbox]{#2}}{\hline\hline}}}
\def\umlclassred#1#2%
  {\color{red}%
  \rnode{#1}{\umlClass[linecolor=red]{\makebox[\umlunitbox]{#2}}{\hline\hline}}}
\def\umlclassa#1#2#3%
  {\rnode{#1}{\umlClass{\makebox[\umlunitbox]{#2}}%
  {#3\\\hline\hline}}}
\def\umldefclass#1#2%
  {\rnode{#1}{\umlClass{\makebox[\umlunitbox]%
      {{\bf /}#2}}{\hline\hline}}}
\renewcommand{\ncputicon}[2][]{%
   \setkeys{psset}{npos=0,nrot=:D}%
   \setkeys{psset}{#1}%
   \ncput{#2}}
\def\umlIsa{%
   \pstriangle[gangle=-90,%
              linestyle=solid,%
              fillstyle=solid,%
              fillcolor=white]%
          (-0.15,0)(0.12,0.15)} % (centre)(Width,Length)

%%%%%%%%%% Macros %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\vtrue}{{\tt T}}
\newcommand{\vfalse}{{\tt F}}
\newcommand{\interp}{{\cal I}}
\newcommand{\interf}{{\cal I}}
\newcommand{\domain}{{\bf D}}
\newcommand{\jinterp}{{\cal J}}
\newcommand{\interfj}{{\cal J}}
\newcommand{\minterp}{{\cal M}}
\newcommand{\formel}{{\cal F}}
\newcommand{\clauses}{{\cal C}}
\newcommand{\intf}[1]{{#1}^{\cal I}}
\newcommand{\intfj}[1]{{#1}^{\cal J}}
\newcommand{\varmap}{{\alpha}}
\newcommand{\intfv}[1]{{#1}^{{\cal I},\varmap}}

\newcommand{\predA}{{\tt A}}
\newcommand{\predB}{{\tt B}}
\newcommand{\predR}{{\tt R}}

\newcommand{\tl}[1]{#1^\ast}    % translation of modal logic formulae
                                % into predicate logic formulae

\newcommand{\implies}{\Rightarrow}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\semtitle{Description Logics}
\semsubject{Foundations of Propositional Logic}
\semauthor{Enrico Franconi}
\sememail{franconi@cs.man.ac.uk}
\semwebpage{http://www.cs.man.ac.uk/\~{}franconi}
\seminstitution{Department of Computer Science, University of Manchester}

\begin{document}

\makesemtitle

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Knowledge bases}

\begin{tabular}{|c|l}
    \cline{1-1} 
    Inference engine & $\longleftarrow$ domain-independent algorithms \\
    \cline{1-1}
    Knowledge base &$\longleftarrow$  domain-specific content \\
    \cline{1-1}
\end{tabular}

\vspace{1em}

\begin{itemize}
\item Knowledge base = set of \textit{sentences} in a \textit{formal} 
language = logical \textit{theory}

\item \textit{Declarative} approach to building an agent (or other
system):\\ {\sc Tell} it what it needs to know

\item Then it can {\sc Ask} itself what to do---answers should follow
from the KB

\item Agents can be viewed at the \textit{knowledge level}\\
   i.e., what they know, regardless of how implemented

\item Or at the \textit{implementation level}\\
   i.e., data structures in KB and algorithms that manipulate them

\end{itemize}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Logic in general}

\begin{itemize}
\item \textit{Logics} are formal languages for representing information
   such that conclusions can be drawn

\item \textit{Syntax} defines the sentences in the language

\item \textit{Semantics} define the ``meaning'' of sentences;
   i.e., define \textit{truth} of a sentence in a world

\item E.g., the language of arithmetic

\begin{itemize}
\item[] $x+2 \geq y$ is a sentence; $x2+y>{}$ is not a sentence

\item[] $x+2 \geq y$ is true iff the number $x+2$ is no less
than the number $y$

\item[] $x+2 \geq y$ is true in a world where $x= 7,\ y= 1$
\item[] $x+2 \geq y$ is false in a world where $x= 0,\ y= 6$
\item[]  $x+2 \geq x+1$ is true in every world
\end{itemize}
\end{itemize}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{The {\em one and only} Logic?}

\begin{itemize}
\item Logics of higher order
\item Modal logics
\begin{itemize}
\item[$\circ$] epistemic
\item[$\circ$] temporal and spatial
\item[$\circ$] \ldots
\end{itemize}
\item Description logic
\item Non-monotonic logic
\item Intuitionistic logic
\item \ldots
\end{itemize}

{\bf But:} There are ``standard approaches''  \\
\tab$\leadsto$ propositional and predicate logic

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Types of logic}

\begin{itemize}
\item Logics are characterized by what they commit to as ``primitives''

\item Ontological commitment: what exists---facts? objects? time? beliefs?

\item Epistemological commitment: what states of knowledge?

\end{itemize}

\vspace{1em}

\begin{LARGE}
\includegraphics[width=\hsize]{fig06.07.ps}
\end{LARGE}

{\Large\color{blue}Classical logics are based on the notion of TRUTH}


\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Entailment -- Logical Implication}

\[\fbox{$KB \models \alpha$}\]

\vspace{2em}

\begin{itemize}
\item Knowledge base $KB$ \textit{entails} sentence $\alpha$\\\tab if and
only if\\
$\alpha$ is {\color{blue}true} in all worlds where $KB$ is true

\item E.g., the KB containing ``Manchester United won'' and
  ``Manchester City won''\\
  entails ``Either Manchester United won or Manchester City
  won''

\end{itemize}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Models}

\begin{itemize}
\item Logicians typically think in terms of \textit{models},
  which are formally\\
  \textit{structured worlds} with respect to which truth can be evaluated

\item We say $m$ is a \textit{model} of a sentence $\alpha$
if $\alpha$ is true in $m$

\item $M(\alpha)$ is the set of all models of $\alpha$

\item Then $KB \models \alpha$ if and only if $M(KB) \subseteq M(\alpha)$

\item E.g. $KB$ = United won and City won\nl
     $\alpha$ = City won\\or\nl
      $\alpha$ = Manchester won\\or\nl
       $\alpha$ = either City or Manchester won

\end{itemize}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Inference -- Deduction -- Reasoning}

\vspace{-1em}
\[\fbox{$KB \vdash_i \alpha$}\]

%\vspace{2em}

\begin{itemize}
\item $KB\vdash_i\alpha$ = sentence $\alpha$ can be derived from $KB$
by \textbf{procedure} $i$

\item \textit{Soundness}: $i$ is sound if\nl
whenever $KB\vdash_i\alpha$, it is also true that $KB\models\alpha$

\item \textit{Completeness}: $i$ is complete if\nl
whenever $KB\models\alpha$, it is also true that $KB\vdash_i\alpha$

\item We will define a logic (first-order logic) which is
expressive enough to say almost anything of interest, and for which
there exists a sound and complete inference procedure.

\end{itemize}


\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Propositional Logics: Basic Ideas}

{\bf Statements}: 

The elementary building blocks of propositional logic are 
{\em atomic statements\/} that cannot be decomposed any further:
\textit{propositions}.
E.g., 

\begin{itemize}
\item  ``The block is red''
\item  ``The proof of the pudding is in the eating''
\item  ``It is raining''
\end{itemize}

and logical connectives ``and'', ``or'', ``not'', by which we can
build \\ {\bf propositional formulas}.

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Propositional Logics: Reasoning}

We are interested in the questions:

\begin{itemize}
\item when is a statement {\bf logically implied} by a set of
  statements, \\ in symbols: $\Theta \models \phi$
\item can we define {\bf deduction} in such a way that deduction and
  entailment coincide?
\end{itemize}


\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Syntax of Propositional Logic}

Countable alphabet $\Sigma$ of {\bf atomic propositions}: 
$a,b, c, \ldots$. 

{\bf Propositional formulas}:~~~\parbox[t]{.6\textwidth}{%
$\begin{array}{@{~~~}lcll}
\phi,\psi & \longrightarrow & a & \mbox{\em atomic formula} \\
& | & \bot & \mbox{\em false} \\
& | & \top & \mbox{\em true} \\
& | & \neg \phi & \mbox{\em negation} \\
& | & \phi \wedge \psi & \mbox{\em conjunction} \\
& | & \phi \vee \psi & \mbox{\em disjunction} \\
& | & \phi \rightarrow \psi & \mbox{\em implication} \\
& | & \phi \leftrightarrow \psi & \mbox{\em equivalence}
\end{array}$}

\vspace{\topsep}
\MiniPage{%
\begin{itemize}
\item {\bf Atom:} atomic formula
\item {\bf Literal:} (negated) atomic formula
\end{itemize}}{%
\begin{itemize}
\item {\bf Clause:} disjunction of literals
\end{itemize}}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Semantics: Intuition}

\begin{itemize}
\item Atomic statements can be {\em true\/} $\vtrue$ or {\em false\/} $\vfalse$.

\item The truth value of formulas is determined by the truth values of the
atoms (\textit{truth value assignment} or \textit{interpretation}).
\end{itemize}

\vspace{1em}

{\bf Example:} $(a \vee b) \wedge c $

\vspace{1em}
\begin{itemize}
\item If $a$ and $b$ are wrong and $c$ is true, then the formula is not true.

\item Then {\em logical entailment\/} could be defined as follows:

\item $\phi$ is implied by $\Theta$, 
if $\phi$ is true in all ``states of the world'',
in which $\Theta$ is true. 
\end{itemize}


\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Semantics: Formally}
  
  A {\bf truth value assignment} (or {\bf interpretation}) of the
  atoms in $\Sigma$ is a function ${\interp}$:
\[{\interp}\colon \Sigma \rightarrow \{\vtrue,\vfalse\}.\]

Instead of $\interp(a)$ we also write $a^{\interp}$.

A formula $\phi$ is {\em satisfied\/} by an interpretation $\interp$ 
($\interp \models \phi$) or is {\em true} under  $\interp$:

\vspace{-1em}
{\small
\MiniPage{%
\begin{eqnarray*}
& \interp \models \top \\
& \interp \not\models \bot \\
\interp \models a & \mbox{\color{blue}iff} & a^{\interp} = \vtrue \\
\interp \models \neg \phi & \mbox{\color{blue}iff} & \interp \not\models \phi \\
\interp \models \phi \wedge \psi & \mbox{\color{blue}iff} & \interp
\models \phi \: \mbox{and} \: \interp
\models \psi \\
\interp \models \phi \vee \psi & \mbox{\color{blue}iff} & \interp
\models \phi \: \mbox{or} \: \interp
\models \psi 
\end{eqnarray*}}
{\begin{eqnarray*}
\interp \models \phi \rightarrow \psi & \mbox{\color{blue}iff} & 
\!\!\!\!\begin{array}[t]{l}
\mbox{if} \: \interp
\models \phi, 
\: \mbox{then} \: \interp \models \psi 
\end{array} \\
\interp \models \phi \leftrightarrow \psi & \mbox{\color{blue}iff} &
\!\! \!\!\begin{array}[t]{l}
\: \interp
\models \phi, \: \mbox{if and}
\: \mbox{only if} \: \interp \models \psi
\end{array}
\end{eqnarray*}}}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Example}

\[\interp\colon\left\{
\begin{array}{rcl}
a & \mapsto & \vtrue \\
b & \mapsto & \vfalse \\
c & \mapsto & \vfalse \\
d & \mapsto & \vtrue \\
& \vdots &
\end{array}
\right.
\]

\[ ((a \vee b) \leftrightarrow (c \vee d)) \wedge (\neg (a \wedge b)
\vee (c \wedge \neg d)).\]

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Exercise}

\begin{itemize}
    \item Find an interpretation and a formula such that the formula
    is true in that interpretation (or: the interpretation satisfies
    the formula).  
    
    \item Find an interpretation and a formula such that the formula
    is not true in that interpretation (or: the interpretation does
    not satisfy the formula).
    
    \item Find a formula which can't be true in any interpretation 
    (or: no interpretation can satisfy the formula).
    
\end{itemize}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Satisfiability and Validity}

An interpretation $\interp$ is a {\bf model} of $\phi$:
\[\interp \models \phi\]

A formula $\phi$ is
\begin{itemize}
\item {\bf satisfiable}, if there is some $\interp$ that satisfies~$\phi$,
\item {\bf unsatisfiable}, if $\phi$ is not satisfiable,
\item {\bf falsifiable}, if there is some $\interp$
      that does not satisfy $\phi$,
\item {\bf valid} (i.e., a {\bf tautology}),  if every  $\interp$
      is a model of $\phi$.
\end{itemize}

Two formulas are {\bf logically equivalent}  \mbox{($\phi \equiv \psi$)}, 
if for all $\interp$:
\begin{eqnarray*}
\interp \models \phi  \:\: \mbox{\color{blue}iff} 
\:\: \interp
\models \psi
\end{eqnarray*}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Exercise}

Satisfiable, tautology?

\begin{eqnarray*}
& (((a \wedge b) \leftrightarrow a) \rightarrow b) \\
& ((\neg \phi \rightarrow \neg \psi) \rightarrow (\psi \rightarrow \phi)) \\
& (a \vee b \vee \neg c) \wedge (\neg a \vee \neg b \vee d) \wedge (\neg
a \vee  b \vee \neg d)
\end{eqnarray*}

\vspace{2em}

Equivalent?

\begin{eqnarray*}
(\phi \vee (\psi \wedge \chi)) & \equiv & ((\phi \vee \psi) \wedge (\psi \wedge \chi)) \\
\neg (\phi \vee \psi) & \equiv & \neg \phi \wedge \neg \psi 
\end{eqnarray*}

\vspace{2em}

Try to use \textbf{truth tables} to support your conclusions.

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Consequences}

{\bf Proposition:}\mbox{}
\begin{itemize}
\item $\phi$ is a tautology iff $\neg \phi$ is unsatisfiable
\item $\phi$ is unsatisfiable iff $\neg \phi$ is a tautology.
\end{itemize}

\vspace{1em}
{\bf Proposition:} $\phi \equiv \psi$ iff $\phi \leftrightarrow \psi$
is a tautology.

\vspace{1em}
{\bf Theorem:} If $\phi$ and $\psi$ are equivalent, 
and $\chi'$ results from replacing $\phi$ in $\chi$ by $\psi$,
then $\chi$ and $\chi'$ are equivalent. 

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Entailment}

Extension of the entailment relationship to sets of formulas $\Theta$:
\begin{eqnarray*}
 \interp \models \Theta & \mbox{\color{blue}iff} &  \interp \models
\phi \: \mbox{\ for all } \: \phi \in \Theta
\end{eqnarray*}


Remember: we want the formula $\phi$ to be implied by a set $\Theta$,
if $\phi$ is true 
in all models of $\Theta$ 
(symbolically, $\Theta \models \phi$):
\begin{eqnarray*}
\Theta \models \phi & \mbox{\color{blue}iff} & \interp \models \phi \: 
\mbox{\ for all models\ } \interp \: \mbox{\ of } \Theta
\end{eqnarray*}


\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\overlays{5}{
\begin{slide}{Propositional inference: Enumeration method}

Let $\alpha = A \lor B$ and $KB = (A\lor C) \land (B \lor \lnot C)$

Is it the case that $KB\models\alpha$?

Check all possible models -- 
{\color{blue}$\alpha$ must be true wherever $KB$ is true}

\vspace{1em}
{\footnotesize
\begin{tabular}{|c|c|c||c|c|c|c|}
\hline
 $A$ & $B$ & $C$ & 
\ $A\lor C$\ & $B \lor \lnot C$ &\ \ \  $KB$\ \ \ &\ \ \ \ $\alpha$\ \ \ \ \\
\hline 
$False$ & $False$ & $False$ & \fromSlide*{2}{$False$} & \fromSlide*{3}{$True
$} & \fromSlide*{4}{$False$} & \fromSlide*{5}{$False$} \\
$False$ & $False$ & $True $ & \fromSlide*{2}{$True $} & \fromSlide*{3}{$False$} & 
\fromSlide*{4}{$False$} & \fromSlide*{5}{$False$} \\
$False$ & $True $ & $False$ & \fromSlide*{2}{$False$} & \fromSlide*{3}{$True $} & 
\fromSlide*{4}{$False$} & \fromSlide*{5}{$True $}\\
$False$ & $True $ & $True $ & \fromSlide*{2}{$True $} & \fromSlide*{3}{$True
$} & \fromSlide*{4}{$True $} & \fromSlide*{5}{$True $} \\
$True $ & $False$ & $False$ & \fromSlide*{2}{$True $} & \fromSlide*{3}{$True $} & 
\fromSlide*{4}{$True $} & \fromSlide*{5}{$True $} \\
$True $ & $False$ & $True $ & \fromSlide*{2}{$True $} & \fromSlide*{3}{$False$} & 
\fromSlide*{4}{$False$} & \fromSlide*{5}{$True $} \\
$True $ & $True $ & $False$ & \fromSlide*{2}{$True $} & \fromSlide*{3}{$True $} & 
\fromSlide*{4}{$True $} & \fromSlide*{5}{$True $} \\
$True $ & $True $ & $True $ & \fromSlide*{2}{$True $} & \fromSlide*{3}{$True $} & 
\fromSlide*{4}{$True $} & \fromSlide*{5}{$True $} \\
\hline
\end{tabular}}

\end{slide}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Properties of Entailment}


\begin{itemize}
\item $\Theta \cup \{\phi\} \models \psi$ iff $\Theta \models \phi
\rightarrow \psi$ \\ \fbox{(Deduction Theorem)}
\item $\Theta \cup \{\phi\} \models \neg \psi$ iff $\Theta \cup \{\psi\}
\models \neg \phi$ \\ (Contraposition Theorem)
\item $\Theta \cup \{\phi\}$ is unsatisfiable iff $\Theta \models \neg
\phi$ \\ (Contradiction Theorem)
\end{itemize}

% {\bf Question}: 
% Can we decide whether $\Theta \models \psi$ without considering
% all interpretations?

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Equivalences (I)}

$\begin{array}{lrcl}
\mbox{Commutativity} & \phi \vee \psi & \equiv & \psi \vee \phi \\
&  \phi \wedge \psi & \equiv & \psi \wedge \phi \\
& \phi \leftrightarrow \psi & \equiv & \psi \leftrightarrow \phi \\
\mbox{Associativity} & (\phi \vee \psi) \vee \chi & \equiv & \phi \vee (\psi \vee
\chi) \\
 & (\phi \wedge \psi) \wedge \chi & \equiv & \phi \wedge (\psi \wedge
\chi) \\
\mbox{Idempotence} & \phi \vee \phi & \equiv & \phi \\
 & \phi \wedge \phi & \equiv & \phi \\
\mbox{Absorption} & \phi \vee (\phi \wedge \psi) & \equiv & \phi \\
& \phi \wedge (\phi \vee \psi) & \equiv & \phi \\
\mbox{Distributivity} & \phi \wedge (\psi \vee \chi) & \equiv &
\!\!\begin{array}[t]{l} (\phi \wedge \psi)
\vee
(\phi \wedge \chi) 
\end{array}
\\
& \phi \vee (\psi \wedge \chi) & \equiv & 
\!\!\begin{array}[t]{l} (\phi \vee \psi) \wedge
(\phi \vee \chi) 
\end{array} 
\end{array}$

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Equivalences (II)}

$\begin{array}{lrcl}
\mbox{Tautology} & \phi \vee \top & \equiv & \top \\
\mbox{Unsatisfiability} & \phi \wedge \bot & \equiv & \bot
\\
\mbox{Negation} & \phi \vee \neg\phi & \equiv & \top \\
& \phi \wedge \neg\phi & \equiv & \bot \\
\mbox{Neutrality}& \phi \wedge \top & \equiv & \phi \\
& \phi \vee \bot & \equiv & \phi \\
\mbox{Double Negation} & \neg\neg \phi & \equiv & \phi \\
\mbox{De Morgan} & \neg (\phi \vee \psi) & \equiv & \neg \phi \wedge \neg \psi \\
& \neg (\phi \wedge \psi) & \equiv & \neg \phi \vee \neg \psi \\
\\
\mbox{Implication} & \phi \rightarrow \psi & \equiv & \neg \phi \vee
\psi 
\end{array}$

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Normal Forms}

Other approaches to inference use syntactic operations
on sentences, often expressed in standardized forms

\textit{Conjunctive Normal Form} (CNF)\nl
    {\em conjunction} of $\underbrace{\mbox{{\em disjunctions} of {\em literals}}}$:
    \tab $\bigwedge_{i=1}^n (\bigvee_{j=1}^{m} l_{i,j})$\nl
    \phantom{{\em conjunction} of {\em disjuncti}}{\em clauses}\nl
    E.g., $(A \lor \lnot B) \land (B \lor \lnot C \lor \lnot D)$

\textit{Disjunctive Normal Form} (DNF)\nl
    {\em disjunction} of $\underbrace{\mbox{{\em conjunctions} of {\em 
    literals}}}$: \tab $\bigvee_{i=1}^n (\bigwedge_{j=1}^{m} l_{i,j})$\nl
    \phantom{{\em disjunction} of {\em conjuncti}}{\em terms}\nl
    E.g., $(A\land B) \lor (A \land \lnot C) \lor (A \land \lnot D)
           \lor (\lnot B \land \lnot C) \lor (\lnot B \land \lnot D)$

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Normal Forms, cont.}

\textit{Horn Form} (restricted)\nl
    {\em conjunction} of {\em Horn clauses} (clauses with $\leq 1$ positive literal)\nl
    E.g., $(A \lor \lnot B) \land (B \lor \lnot C \lor \lnot D)$\nl
    Often written as set of implications:\nl
    $B \implies A$ and $(C \land D) \implies B$

\vspace{1em}
{\bf Theorem}
For every formula, there exists an equivalent formula in CNF and one
in DNF.

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Why Normal Forms?}

\begin{itemize}
\item We can transform propositional formulas, in particular, we can
construct their CNF and DNF.

\item DNF tells us something as to whether a formula is satisfiable. 
If all disjuncts contain $\bot$ or complementary literals, then no
model exists.  Otherwise, the formula is satisfiable.

\item CNF tells us something as to whether a formula is a tautology. 
If all clauses (= conjuncts) contain $\top$ or complementary literals,
then the formula is a tautology.  Otherwise, the formula is
falsifiable.

\end{itemize}

{\bf But}: 
\begin{itemize}
\item the transformation into DNF or CNF is expensive (in time/space)
\item it is only possible for finite sets of formulas
\end{itemize}


\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Summary: important notions}

\begin{itemize}
    
    \item Syntax: formula, atomic formula, literal, clause
    \item Semantics: truth value, assignment, interpretation
    \item Formula satisfied by an interpretation
    \item Logical implication, entailment
    \item Satisfiability, validity, tautology, logical equivalence
    \item Deduction theorem, Contraposition Theorem
    \item Conjunctive normal form, Disjunctive Normal form, Horn form
    
\end{itemize}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\end{document}
