Skip to content

Commit

Permalink
[abschluss] Nicely format code examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jspam committed Mar 10, 2012
1 parent c0241c1 commit 20db19c
Showing 1 changed file with 30 additions and 32 deletions.
62 changes: 30 additions & 32 deletions abschluss/presentation.tex
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@
{
if (i / 2) $ \cdot $ 2 = i {
return true

} else {
return false

}
}
\end{lstlisting}
Expand All @@ -102,6 +104,7 @@
\begin{onlyenv}<2>
\begin{lstlisting}[frame=lines,mathescape=true]
function Boolean isEven(Integer i)

{
if (i / 2) $ \cdot $ 2 = i {
return true
Expand All @@ -117,11 +120,14 @@
\begin{onlyenv}<3>
\begin{lstlisting}[frame=lines,mathescape=true]
function Boolean isEven(Integer i)

{
if (i / 2) $ \cdot $ 2 = i {
_assert true = true $\Leftrightarrow $ i % 2 = 0

_assert true = true $\Leftrightarrow $ i % 2 = 0
} else {
_assert false = true $\Leftrightarrow $ i % 2 = 0

_assert false = true $\Leftrightarrow $ i % 2 = 0
}
}
\end{lstlisting}
Expand All @@ -130,13 +136,14 @@
\begin{onlyenv}<4>
\begin{lstlisting}[frame=lines,mathescape=true]
function Boolean isEven(Integer i)

{
if (i / 2) $ \cdot $ 2 = i {
// hier gilt (i / 2) $ \cdot $ 2 = i
_assert true = true $\Leftrightarrow $ i % 2 = 0
_assert true = true $\Leftrightarrow $ i % 2 = 0
} else {
// hier gilt $\neg$((i / 2) $ \cdot $ 2 = i)
_assert false = true $\Leftrightarrow $ i % 2 = 0
_assert false = true $\Leftrightarrow $ i % 2 = 0
}
}
\end{lstlisting}
Expand All @@ -145,48 +152,39 @@
\begin{onlyenv}<5>
\begin{lstlisting}[frame=lines,mathescape=true]
function Boolean isEven(Integer i)

{
_assert (i / 2) $ \cdot $ 2 = i $\Rightarrow$
(true = true $\Leftrightarrow $ i % 2 = 0)
_assert
(i / 2) $ \cdot $ 2 = i $\Rightarrow$
(true = true $\Leftrightarrow $ i % 2 = 0)
$\wedge$
$\neg$((i / 2) $ \cdot $ 2 = i) $\Rightarrow$
(false = true $\Leftrightarrow $ i % 2 = 0)

_assert $\neg$((i / 2) $ \cdot $ 2 = i) $\Rightarrow$
(false = true $\Leftrightarrow $ i % 2 = 0)
}
\end{lstlisting}
\end{onlyenv}

\begin{onlyenv}<6>
\begin{lstlisting}[frame=lines,mathescape=true]
function Boolean isEven(Integer i)
{
_assert (i / 2) $ \cdot $ 2 = i $\Rightarrow$
(true = true $\Leftrightarrow $ i % 2 = 0)

$\wedge$

$\neg$((i / 2) $ \cdot $ 2 = i) $\Rightarrow$
(false = true $\Leftrightarrow $ i % 2 = 0)
}
\end{lstlisting}
\end{onlyenv}

\begin{onlyenv}<7-8>
\begin{onlyenv}<6-7>
\begin{lstlisting}[frame=lines,mathescape=true]
_assert $\forall$ i $\in \mathbb{N} :$


(i / 2) $ \cdot $ 2 = i $\Rightarrow$
(true = true $\Leftrightarrow $ i % 2 = 0)

$\wedge$

$\neg$((i / 2) $ \cdot $ 2 = i) $\Rightarrow$
(false = true $\Leftrightarrow $ i % 2 = 0)
_assert $\forall$ i $\in \mathbb{N} :$

(i / 2) $ \cdot $ 2 = i $\Rightarrow$
(true = true $\Leftrightarrow $ i % 2 = 0)
$\wedge$
$\neg$((i / 2) $ \cdot $ 2 = i) $\Rightarrow$
(false = true $\Leftrightarrow $ i % 2 = 0)


\end{lstlisting}
\end{onlyenv}

\vspace{1cm}

\only<8> {
\only<7> {
$\Rightarrow$ Diese Formel ist beweis- oder widerlegbar!
}
\end{frame}
Expand Down

0 comments on commit 20db19c

Please sign in to comment.