diff options
| author | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2020-09-06 19:29:27 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2020-09-06 19:29:27 +0200 |
| commit | 7862d4e51530dc1d97fb20b63060d017f04b6a24 (patch) | |
| tree | b778c62cd38fa7a4bd239e02c7d64fae684e597c /exercises/preplogic-exercises.tex | |
| parent | 92fe0e599cf079aea24fa75af8890fbc05bb078d (diff) | |
| download | preplogic-7862d4e51530dc1d97fb20b63060d017f04b6a24.tar.gz preplogic-7862d4e51530dc1d97fb20b63060d017f04b6a24.zip | |
Added exercises and some pages to the slides
Diffstat (limited to '')
| -rw-r--r-- | exercises/preplogic-exercises.tex | 48 |
1 files changed, 42 insertions, 6 deletions
diff --git a/exercises/preplogic-exercises.tex b/exercises/preplogic-exercises.tex index cd37db7..1bf37b0 100644 --- a/exercises/preplogic-exercises.tex +++ b/exercises/preplogic-exercises.tex | |||
| @@ -3,11 +3,12 @@ | |||
| 3 | \usepackage{amsmath} | 3 | \usepackage{amsmath} |
| 4 | \usepackage{amsthm} | 4 | \usepackage{amsthm} |
| 5 | \usepackage{amssymb} | 5 | \usepackage{amssymb} |
| 6 | \usepackage[top=2cm]{geometry} | ||
| 6 | 7 | ||
| 7 | \theoremstyle{definition} \newtheorem{exercise}{Exercise}[section] | 8 | \theoremstyle{definition} \newtheorem{exercise}{Exercise}[section] |
| 8 | 9 | ||
| 9 | \author{Sebastiano Tronto (uni.lu)} | 10 | \author{Sebastiano Tronto (\texttt{sebastiano.tronto@uni.lu})} |
| 10 | \title{Elementary logic exercises (Prep Camp 2020)} | 11 | \title{Elementary Logic exercises (Prep Camp 2020)} |
| 11 | 12 | ||
| 12 | \begin{document} | 13 | \begin{document} |
| 13 | \maketitle | 14 | \maketitle |
| @@ -15,7 +16,7 @@ | |||
| 15 | \section{Logical operations} | 16 | \section{Logical operations} |
| 16 | 17 | ||
| 17 | \begin{exercise} | 18 | \begin{exercise} |
| 18 | Determine if the following statement are \textbf{true} or \textbf{false}: | 19 | Determine if the following statements are \textbf{true} or \textbf{false}: |
| 19 | \begin{enumerate} | 20 | \begin{enumerate} |
| 20 | \item ``Today is Tuesday or Germany has more inhabitants than Luxembourg'' | 21 | \item ``Today is Tuesday or Germany has more inhabitants than Luxembourg'' |
| 21 | \item ``$7$ is odd and $2+2=5$'' | 22 | \item ``$7$ is odd and $2+2=5$'' |
| @@ -84,21 +85,35 @@ here}'' ? | |||
| 84 | \section{Quantifiers} | 85 | \section{Quantifiers} |
| 85 | 86 | ||
| 86 | \begin{exercise} | 87 | \begin{exercise} |
| 88 | Write the negation of the following statements: | ||
| 89 | \begin{enumerate} | ||
| 90 | \item $\exists x\in \mathbb N,\, x^2-2=0$ | ||
| 91 | \item ``Every prime number is odd'' | ||
| 92 | \item ``Every person I have met likes pizza'' | ||
| 93 | \item ``There is at least one number greater than $7$'' | ||
| 94 | \item $\forall x\in \mathbb N,\,x\geq 0$ | ||
| 95 | \item $\forall x\in \mathbb Z,\,(\exists y\in\mathbb Z,\,x+y=0)$ | ||
| 96 | \end{enumerate} | ||
| 97 | \end{exercise} | ||
| 98 | |||
| 99 | \begin{exercise} | ||
| 87 | There is another quantifier that we did not cover in the lecture, namely | 100 | There is another quantifier that we did not cover in the lecture, namely |
| 88 | $\exists!$ (read ``there exists exactly one''). For example, the sentence | 101 | $\exists!$ (read ``there exists exactly one''). For example, the sentence |
| 89 | ``\emph{there exists exactly one natural number x such that x+2=5}'' can be | 102 | ``\emph{there exists exactly one natural number x such that x+2=5}'' can be |
| 90 | written in symbols as ``$\exists!x\in \mathbb N,\,x+2=5$. | 103 | written in symbols as ``$\exists!x\in \mathbb N,\,x+2=5$''. |
| 104 | |||
| 91 | In this exercise, your task is to give a formal definition of this quantifier | 105 | In this exercise, your task is to give a formal definition of this quantifier |
| 92 | using the logical symbols that we have defined in class. In particular, you | 106 | using the logical symbols that we have defined in class. In particular, you |
| 93 | will need the following: | 107 | will need the following: |
| 94 | \begin{itemize} | 108 | \begin{itemize} |
| 95 | \item the universal ($\forall$) and existential ($\exists$) quantifier | 109 | \item the universal ($\forall$) and existential ($\exists$) quantifiers |
| 96 | \item the conjunction $\land$ | 110 | \item the conjunction $\land$ |
| 97 | \item the implication $\implies$ | 111 | \item the implication $\implies$ |
| 98 | \end{itemize} | 112 | \end{itemize} |
| 99 | Moreover, you will need the equality symbol $=$ between two elements of a set | 113 | Moreover, you will need the equality symbol $=$ between two elements of a set |
| 100 | (if $a$ and $b$ are two elements of the same set, ``$a=b$'' is a mathematical | 114 | (if $a$ and $b$ are two elements of the same set, ``$a=b$'' is a mathematical |
| 101 | statement and it is \textbf{true} if and only if they are the same element). | 115 | statement and it is \textbf{true} if and only if $a$ and $b$ are the same |
| 116 | element). | ||
| 102 | 117 | ||
| 103 | \emph{Warning: your definition must depend on a set $S$ and on a ``variable | 118 | \emph{Warning: your definition must depend on a set $S$ and on a ``variable |
| 104 | statement'' $A(x)$, as the existential and universal quantifiers.} | 119 | statement'' $A(x)$, as the existential and universal quantifiers.} |
| @@ -107,6 +122,27 @@ here}'' ? | |||
| 107 | \section{Proofs} | 122 | \section{Proofs} |
| 108 | 123 | ||
| 109 | \begin{exercise} | 124 | \begin{exercise} |
| 125 | Prove by induction that | ||
| 126 | \begin{align*} | ||
| 127 | \forall n\in\mathbb N,\quad \sum_{k=1}^n(2k-1)=n^2 | ||
| 128 | \end{align*} | ||
| 129 | (here $\sum_{k=1}^n(2k-1)$ means $1+3+5+\cdots+ (2n-1)$). | ||
| 130 | \end{exercise} | ||
| 131 | |||
| 132 | \begin{exercise} | ||
| 133 | If $n\in \mathbb N$ the \emph{factorial} of $n$, denoted by $n!$ is defined | ||
| 134 | as follows: | ||
| 135 | \begin{align*} | ||
| 136 | n!=\begin{cases} | ||
| 137 | 1&\text{if } n=0,\\ | ||
| 138 | n\times (n-1)! & \text{if } n> 0. | ||
| 139 | \end{cases} | ||
| 140 | \end{align*} | ||
| 141 | Prove by induction that if $n\geq 4$ then $n!\geq 2^n$. | ||
| 142 | \end{exercise} | ||
| 143 | |||
| 144 | |||
| 145 | \begin{exercise} | ||
| 110 | Is the following statement true or false? Give a proof of your answer. | 146 | Is the following statement true or false? Give a proof of your answer. |
| 111 | \begin{align*} | 147 | \begin{align*} |
| 112 | \forall n\in \mathbb N,\, n^2 -4n +5>n | 148 | \forall n\in \mathbb N,\, n^2 -4n +5>n |
