tex/theory1_ex8.tex
author Eugen Sawin <sawine@me73.com>
Wed, 13 Jul 2011 01:26:19 +0200
changeset 11 df83621781e1
child 12 847768226d25
permissions -rw-r--r--
8.2
     1 \documentclass[a4paper, 10pt, pagesize, smallheadings]{article}  
     2 \usepackage{graphicx}
     3 %\usepackage[latin1]{inputenc}
     4 \usepackage{amsmath, amsthm, amssymb}
     5 \usepackage{typearea}
     6 \usepackage{algorithm}
     7 \usepackage{algorithmic}
     8 \usepackage{fullpage}
     9 \usepackage{mathtools}
    10 \usepackage[all]{xy}
    11 \title{Theory I, Sheet 8 Solution}
    12 \author{Eugen Sawin}
    13 \renewcommand{\familydefault}{\sfdefault}
    14 \newcommand{\Pos}{\mathcal{P}os}
    15 \include{pythonlisting}
    16 
    17 \pagestyle{empty}
    18 \begin{document}
    19 \maketitle
    20 
    21 \section*{Exercise 8.1}
    22 Let $s, t \in T(\Sigma, X)$ be terms over $X$ and $p, q$ be strings over the natural numbers. We provide proofs by induction.
    23 \subsection*{1. $pq \in \Pos(s) \implies p \in \Pos(s)$ }
    24 $(IH): pq \in \Pos(s) \implies p \in \Pos(s)$\\\\
    25 \emph{Base case:}\\
    26 From $s \in X$ or $s \in \Sigma^{(0)}$ follows $\Pos(s) = \{\epsilon\}$.\\
    27 Trivially it follows that $pq \in \Pos(s) \iff pq = \epsilon$ and $pq \in \Pos(s) \implies p \in \Pos(s)$ with $pq \notin \Pos(s) \lor pq = p = \epsilon$. \\ 
    28 
    29 \noindent \emph{Inductive case:}\\
    30 Let $s = f(t_1, ...,t_n) \in T(\Sigma, X)$ it follows $\Pos(s) = \{\epsilon\} \cup \bigcup_{i = 1}^{n}\{ip \mid p \in \Pos(t_i)\}$.\\
    31 \begin{align*}
    32 pq \in \Pos(s) &\implies p \in \Pos(s)\\ 
    33 \iff pq \in \{\epsilon\} \cup \bigcup_{i = 1}^{n}\{ip \mid p \in \Pos(t_i)\} &\implies p \in \{\epsilon\} \cup \bigcup_{i = 1}^{n}\{ip \mid p \in \Pos(t_i)\}\\
    34 \end{align*}
    35 
    36 \section*{Exercise 8.2}
    37 \subsection*{1. $t = \neg (x \land (\top \lor y)), \sigma = \{x \mapsto \bot, y \mapsto \top \land x\}, \tau = \{z \mapsto \top, x \mapsto \top\}$}
    38 \begin{align*}
    39 \sigma(t) &= \neg (\bot \land (\top \lor ( \top \land x)))\\
    40 \tau \sigma(t) &= \tau(\neg (\bot \land (\top \lor ( \top \land x)))) = \neg (\bot \land (\top \lor (\top \land \top)))\\
    41 \end{align*}
    42 
    43 \subsection*{2. $t = \neg(\top \land (\bot \lor y)), s = \neg(x \land (\bot \lor (x \land \bot)))$}
    44 \[\sigma(t) = \sigma(s) \text{ with } \sigma = \{x \mapsto \top, y \mapsto \top \land \bot \} \]
    45 
    46 \subsection*{3.}
    47 Substitution composition is \emph{not} commutative, we give a counterexample.
    48 Let $t = x$, $\sigma = \{x \mapsto \bot\}$ and $\tau = \{x \mapsto \top\}$, it follows:
    49 \[\tau\sigma(t) = \bot\]
    50 \[\sigma\tau(t) = \top\]
    51 We see that $\tau\sigma(t) \neq \sigma\tau(t)$.
    52 
    53 \end{document}