From 7862d4e51530dc1d97fb20b63060d017f04b6a24 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sun, 6 Sep 2020 19:29:27 +0200 Subject: Added exercises and some pages to the slides --- exercises/preplogic-exercises.fdb_latexmk | 18 +++-- exercises/preplogic-exercises.fls | 12 +++ exercises/preplogic-exercises.log | 117 ++++++++++++++++++++++-------- exercises/preplogic-exercises.pdf | Bin 125146 -> 146771 bytes exercises/preplogic-exercises.synctex.gz | Bin 12003 -> 15152 bytes exercises/preplogic-exercises.tex | 48 ++++++++++-- 6 files changed, 154 insertions(+), 41 deletions(-) (limited to 'exercises') diff --git a/exercises/preplogic-exercises.fdb_latexmk b/exercises/preplogic-exercises.fdb_latexmk index c0a94f2..425b289 100644 --- a/exercises/preplogic-exercises.fdb_latexmk +++ b/exercises/preplogic-exercises.fdb_latexmk @@ -1,5 +1,5 @@ # Fdb version 3 -["pdflatex"] 1599407243 "preplogic-exercises.tex" "preplogic-exercises.pdf" "preplogic-exercises" 1599407243 +["pdflatex"] 1599413298 "preplogic-exercises.tex" "preplogic-exercises.pdf" "preplogic-exercises" 1599413298 "/usr/share/texmf-dist/fonts/enc/dvips/cm-super/cm-super-ts1.enc" 1594687104 2900 1537cc8184ad1792082cd229ecc269f4 "" "/usr/share/texmf-dist/fonts/map/fontname/texfonts.map" 1594687104 3524 cb3e574dea2d1052e39280babc910dc8 "" "/usr/share/texmf-dist/fonts/map/pdftex/updmap/pdftex.map" 1594687104 4851843 f8aac22e46e9a458223e5c13b1e20998 "" @@ -26,18 +26,24 @@ "/usr/share/texmf-dist/fonts/tfm/public/cm/cmsy6.tfm" 1594687104 1116 933a60c408fc0a863a92debe84b2d294 "" "/usr/share/texmf-dist/fonts/tfm/public/cm/cmsy8.tfm" 1594687104 1120 8b7d695260f3cff42e636090a8002094 "" "/usr/share/texmf-dist/fonts/tfm/public/cm/cmti10.tfm" 1594687104 1480 aa8e34af0eb6a2941b776984cf1dfdc4 "" + "/usr/share/texmf-dist/fonts/tfm/public/cm/cmtt12.tfm" 1594687104 772 9a936b7f5e2ff0557fce0f62822f0bbf "" "/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb" 1594687104 34811 78b52f49e893bcba91bd7581cdc144c0 "" "/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb" 1594687104 32080 340ef9bf63678554ee606688e7b5339d "" + "/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmex10.pfb" 1594687104 30251 6afa5cb1d0204815a708a080681d4674 "" "/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb" 1594687104 36299 5f9df58c2139e7edcf37c8fca4bd384d "" "/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi5.pfb" 1594687104 37912 77d683123f92148345f3fc36a38d9ab1 "" + "/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi7.pfb" 1594687104 36281 c355509802a035cadc5f15869451dcee "" "/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb" 1594687104 35752 024fb6c41858982481f6968b5fc26508 "" "/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb" 1594687104 32722 d7379af29a190c3f453aba36302ff5a9 "" "/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb" 1594687104 32362 179c33bbf43f19adbb3825bb4e36e57a "" "/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb" 1594687104 32762 224316ccc9ad3ca0423a14971cfa7fc1 "" "/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb" 1594687104 32569 5e5ddc8df908dea60932f3c484a54c0d "" "/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmti10.pfb" 1594687104 37944 359e864bd06cde3b1cf57bb20757fb06 "" + "/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt12.pfb" 1594687104 24252 1e4e051947e12dfb50fee0b7f4e26e3a "" "/usr/share/texmf-dist/fonts/type1/public/amsfonts/symbols/msbm10.pfb" 1594687104 34694 ad62b13721ee8eda1dcc8993c8bd7041 "" "/usr/share/texmf-dist/fonts/type1/public/cm-super/sfrm1000.pfb" 1594687104 138258 6525c253f16cededa14c7fd0da7f67b2 "" + "/usr/share/texmf-dist/tex/generic/iftex/iftex.sty" 1594687104 6501 4011d89d9621e0b0901138815ba5ff29 "" + "/usr/share/texmf-dist/tex/generic/iftex/ifvtex.sty" 1594687104 1057 525c2192b5febbd8c1f662c9468335bb "" "/usr/share/texmf-dist/tex/latex/amscls/amsthm.sty" 1594687104 12594 0d51ac3a545aaaa555021326ff22a6cc "" "/usr/share/texmf-dist/tex/latex/amsfonts/amsfonts.sty" 1594687104 5949 3f3fd50a8cc94c3d4cbf4fc66cd3df1c "" "/usr/share/texmf-dist/tex/latex/amsfonts/amssymb.sty" 1594687104 13829 94730e64147574077f8ecfea9bb69af4 "" @@ -51,12 +57,14 @@ "/usr/share/texmf-dist/tex/latex/base/article.cls" 1594687104 20023 e427dd9e17e239bf926ef3aab67fe35e "" "/usr/share/texmf-dist/tex/latex/base/inputenc.sty" 1594687104 5050 8933a39ad74377accd18991c5eb90c58 "" "/usr/share/texmf-dist/tex/latex/base/size10.clo" 1594687104 8446 9874cccac5fee462272c582807dbbf56 "" + "/usr/share/texmf-dist/tex/latex/geometry/geometry.sty" 1594687104 41601 9cf6c5257b1bc7af01a58859749dd37a "" + "/usr/share/texmf-dist/tex/latex/graphics/keyval.sty" 1594687104 2590 e3b24ff953e5b58d924f163d25380312 "" "/usr/share/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def" 1594687104 25742 5de23a2d2bc67a3139433e702e64a437 "" "/usr/share/texmf-dist/web2c/texmf.cnf" 1597672114 39446 755423e82e7afb756f49b242a15f4ec2 "" "/usr/share/texmf-var/web2c/pdftex/pdflatex.fmt" 1598712773 2434818 64d78922a5d2a9baf6bf1beec95a9374 "" - "preplogic-exercises.aux" 1599407243 398 c1412237ecba2ce936c17ace596c30a6 "pdflatex" - "preplogic-exercises.tex" 1599407242 3546 94e18075fe4f9c11a865c64ac581a692 "" + "preplogic-exercises.aux" 1599413298 398 c1412237ecba2ce936c17ace596c30a6 "pdflatex" + "preplogic-exercises.tex" 1599413295 4576 b03ca92fc16bbca83f264a2bb3016bef "" (generated) - "preplogic-exercises.log" - "preplogic-exercises.pdf" "preplogic-exercises.aux" + "preplogic-exercises.pdf" + "preplogic-exercises.log" diff --git a/exercises/preplogic-exercises.fls b/exercises/preplogic-exercises.fls index 2dcc725..bcdb67c 100644 --- a/exercises/preplogic-exercises.fls +++ b/exercises/preplogic-exercises.fls @@ -25,6 +25,14 @@ INPUT /usr/share/texmf-dist/tex/latex/amsfonts/amssymb.sty INPUT /usr/share/texmf-dist/tex/latex/amsfonts/amssymb.sty INPUT /usr/share/texmf-dist/tex/latex/amsfonts/amsfonts.sty INPUT /usr/share/texmf-dist/tex/latex/amsfonts/amsfonts.sty +INPUT /usr/share/texmf-dist/tex/latex/geometry/geometry.sty +INPUT /usr/share/texmf-dist/tex/latex/geometry/geometry.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/keyval.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/keyval.sty +INPUT /usr/share/texmf-dist/tex/generic/iftex/ifvtex.sty +INPUT /usr/share/texmf-dist/tex/generic/iftex/ifvtex.sty +INPUT /usr/share/texmf-dist/tex/generic/iftex/iftex.sty +INPUT /usr/share/texmf-dist/tex/generic/iftex/iftex.sty INPUT /usr/share/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def INPUT /usr/share/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def INPUT preplogic-exercises.aux @@ -54,6 +62,7 @@ INPUT /usr/share/texmf-dist/tex/latex/amsfonts/umsb.fd INPUT /usr/share/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm10.tfm INPUT /usr/share/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm10.tfm INPUT /usr/share/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm7.tfm +INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmtt12.tfm INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmr12.tfm INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmbx12.tfm INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmbx10.tfm @@ -73,13 +82,16 @@ INPUT preplogic-exercises.aux INPUT /usr/share/texmf-dist/fonts/enc/dvips/cm-super/cm-super-ts1.enc INPUT /usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb INPUT /usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb +INPUT /usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmex10.pfb INPUT /usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb INPUT /usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi5.pfb +INPUT /usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi7.pfb INPUT /usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb INPUT /usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb INPUT /usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb INPUT /usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb INPUT /usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb INPUT /usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmti10.pfb +INPUT /usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt12.pfb INPUT /usr/share/texmf-dist/fonts/type1/public/amsfonts/symbols/msbm10.pfb INPUT /usr/share/texmf-dist/fonts/type1/public/cm-super/sfrm1000.pfb diff --git a/exercises/preplogic-exercises.log b/exercises/preplogic-exercises.log index 340c2da..66c9478 100644 --- a/exercises/preplogic-exercises.log +++ b/exercises/preplogic-exercises.log @@ -1,4 +1,4 @@ -This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/VoidLinux) (preloaded format=pdflatex 2020.8.29) 6 SEP 2020 17:47 +This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/VoidLinux) (preloaded format=pdflatex 2020.8.29) 6 SEP 2020 19:28 entering extended mode restricted \write18 enabled. file:line:error style messages enabled. @@ -100,52 +100,109 @@ Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support LaTeX Font Info: Redeclaring math symbol \hbar on input line 98. LaTeX Font Info: Overwriting math alphabet `\mathfrak' in version `bold' (Font) U/euf/m/n --> U/euf/b/n on input line 106. +)) (/usr/share/texmf-dist/tex/latex/geometry/geometry.sty +Package: geometry 2020/01/02 v5.9 Page Geometry + (/usr/share/texmf-dist/tex/latex/graphics/keyval.sty +Package: keyval 2014/10/28 v1.15 key=value parser (DPC) +\KV@toks@=\toks28 +) (/usr/share/texmf-dist/tex/generic/iftex/ifvtex.sty +Package: ifvtex 2019/10/25 v1.7 ifvtex legacy package. Use iftex instead. + (/usr/share/texmf-dist/tex/generic/iftex/iftex.sty +Package: iftex 2020/03/06 v1.0d TeX engine tests )) -\c@exercise=\count187 +\Gm@cnth=\count187 +\Gm@cntv=\count188 +\c@Gm@tempcnt=\count189 +\Gm@bindingoffset=\dimen144 +\Gm@wd@mp=\dimen145 +\Gm@odd@mp=\dimen146 +\Gm@even@mp=\dimen147 +\Gm@layoutwidth=\dimen148 +\Gm@layoutheight=\dimen149 +\Gm@layouthoffset=\dimen150 +\Gm@layoutvoffset=\dimen151 +\Gm@dimlist=\toks29 +) +\c@exercise=\count190 (/usr/share/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def File: l3backend-pdfmode.def 2020-06-03 L3 backend support: PDF mode -\l__kernel_color_stack_int=\count188 +\l__kernel_color_stack_int=\count191 \l__pdf_internal_box=\box47 ) (./preplogic-exercises.aux) \openout1 = `preplogic-exercises.aux'. -LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 12. -LaTeX Font Info: ... okay on input line 12. -LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 12. -LaTeX Font Info: ... okay on input line 12. -LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 12. -LaTeX Font Info: ... okay on input line 12. -LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 12. -LaTeX Font Info: ... okay on input line 12. -LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 12. -LaTeX Font Info: ... okay on input line 12. -LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 12. -LaTeX Font Info: ... okay on input line 12. -LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 12. -LaTeX Font Info: ... okay on input line 12. -LaTeX Font Info: Trying to load font information for U+msa on input line 13. - (/usr/share/texmf-dist/tex/latex/amsfonts/umsa.fd +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 13. +LaTeX Font Info: ... okay on input line 13. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 13. +LaTeX Font Info: ... okay on input line 13. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 13. +LaTeX Font Info: ... okay on input line 13. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 13. +LaTeX Font Info: ... okay on input line 13. +LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 13. +LaTeX Font Info: ... okay on input line 13. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 13. +LaTeX Font Info: ... okay on input line 13. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 13. +LaTeX Font Info: ... okay on input line 13. + +*geometry* driver: auto-detecting +*geometry* detected driver: pdftex +*geometry* verbose mode - [ preamble ] result: +* driver: pdftex +* paper: a4paper +* layout: +* layoutoffset:(h,v)=(0.0pt,0.0pt) +* modes: +* h-part:(L,W,R)=(89.62709pt, 418.25368pt, 89.6271pt) +* v-part:(T,H,B)=(56.9055pt, 686.7347pt, 101.40665pt) +* \paperwidth=597.50787pt +* \paperheight=845.04684pt +* \textwidth=418.25368pt +* \textheight=686.7347pt +* \oddsidemargin=17.3571pt +* \evensidemargin=17.3571pt +* \topmargin=-52.36449pt +* \headheight=12.0pt +* \headsep=25.0pt +* \topskip=10.0pt +* \footskip=30.0pt +* \marginparwidth=57.0pt +* \marginparsep=11.0pt +* \columnsep=10.0pt +* \skip\footins=9.0pt plus 4.0pt minus 2.0pt +* \hoffset=0.0pt +* \voffset=0.0pt +* \mag=1000 +* \@twocolumnfalse +* \@twosidefalse +* \@mparswitchfalse +* \@reversemarginfalse +* (1in=72.27pt=25.4mm, 1cm=28.453pt) + +LaTeX Font Info: Trying to load font information for U+msa on input line 14. +(/usr/share/texmf-dist/tex/latex/amsfonts/umsa.fd File: umsa.fd 2013/01/14 v3.01 AMS symbols A ) -LaTeX Font Info: Trying to load font information for U+msb on input line 13. +LaTeX Font Info: Trying to load font information for U+msb on input line 14. (/usr/share/texmf-dist/tex/latex/amsfonts/umsb.fd File: umsb.fd 2013/01/14 v3.01 AMS symbols B ) [1 {/usr/share/texmf-dist/fonts/map/pdftex/updmap/pdftex.map}] [2] (./preplogic-exercises.aux) ) Here is how much of TeX's memory you used: - 1629 strings out of 480478 - 20291 string characters out of 5905927 - 258779 words of memory out of 5000000 - 17679 multiletter control sequences out of 15000+600000 - 540575 words of font info for 56 fonts, out of 8000000 for 9000 + 2168 strings out of 480478 + 27947 string characters out of 5905927 + 275547 words of memory out of 5000000 + 18202 multiletter control sequences out of 15000+600000 + 540744 words of font info for 57 fonts, out of 8000000 for 9000 1141 hyphenation exceptions out of 8191 - 30i,13n,31p,234b,251s stack positions out of 5000i,500n,10000p,200000b,80000s -{/usr/share/texmf-dist/fonts/enc/dvips/cm-super/cm-super-ts1.enc} -Output written on preplogic-exercises.pdf (2 pages, 125146 bytes). + 30i,16n,31p,234b,270s stack positions out of 5000i,500n,10000p,200000b,80000s +{/usr/share/texmf-dist/fonts/enc/dvips/cm-super/cm-super-ts1.enc} +Output written on preplogic-exercises.pdf (2 pages, 146771 bytes). PDF statistics: - 60 PDF objects out of 1000 (max. 8388607) - 43 compressed objects within 1 object stream + 72 PDF objects out of 1000 (max. 8388607) + 52 compressed objects within 1 object stream 0 named destinations out of 1000 (max. 500000) 1 words of extra memory for PDF output out of 10000 (max. 10000000) diff --git a/exercises/preplogic-exercises.pdf b/exercises/preplogic-exercises.pdf index 7db8e9f..09381d6 100644 Binary files a/exercises/preplogic-exercises.pdf and b/exercises/preplogic-exercises.pdf differ diff --git a/exercises/preplogic-exercises.synctex.gz b/exercises/preplogic-exercises.synctex.gz index 1a25b1d..7531587 100644 Binary files a/exercises/preplogic-exercises.synctex.gz and b/exercises/preplogic-exercises.synctex.gz differ 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 @@ \usepackage{amsmath} \usepackage{amsthm} \usepackage{amssymb} +\usepackage[top=2cm]{geometry} \theoremstyle{definition} \newtheorem{exercise}{Exercise}[section] -\author{Sebastiano Tronto (uni.lu)} -\title{Elementary logic exercises (Prep Camp 2020)} +\author{Sebastiano Tronto (\texttt{sebastiano.tronto@uni.lu})} +\title{Elementary Logic exercises (Prep Camp 2020)} \begin{document} \maketitle @@ -15,7 +16,7 @@ \section{Logical operations} \begin{exercise} - Determine if the following statement are \textbf{true} or \textbf{false}: + Determine if the following statements are \textbf{true} or \textbf{false}: \begin{enumerate} \item ``Today is Tuesday or Germany has more inhabitants than Luxembourg'' \item ``$7$ is odd and $2+2=5$'' @@ -83,22 +84,36 @@ here}'' ? \section{Quantifiers} +\begin{exercise} + Write the negation of the following statements: + \begin{enumerate} + \item $\exists x\in \mathbb N,\, x^2-2=0$ + \item ``Every prime number is odd'' + \item ``Every person I have met likes pizza'' + \item ``There is at least one number greater than $7$'' + \item $\forall x\in \mathbb N,\,x\geq 0$ + \item $\forall x\in \mathbb Z,\,(\exists y\in\mathbb Z,\,x+y=0)$ + \end{enumerate} +\end{exercise} + \begin{exercise} There is another quantifier that we did not cover in the lecture, namely $\exists!$ (read ``there exists exactly one''). For example, the sentence ``\emph{there exists exactly one natural number x such that x+2=5}'' can be - written in symbols as ``$\exists!x\in \mathbb N,\,x+2=5$. + written in symbols as ``$\exists!x\in \mathbb N,\,x+2=5$''. + In this exercise, your task is to give a formal definition of this quantifier using the logical symbols that we have defined in class. In particular, you will need the following: \begin{itemize} - \item the universal ($\forall$) and existential ($\exists$) quantifier + \item the universal ($\forall$) and existential ($\exists$) quantifiers \item the conjunction $\land$ \item the implication $\implies$ \end{itemize} Moreover, you will need the equality symbol $=$ between two elements of a set (if $a$ and $b$ are two elements of the same set, ``$a=b$'' is a mathematical - statement and it is \textbf{true} if and only if they are the same element). + statement and it is \textbf{true} if and only if $a$ and $b$ are the same + element). \emph{Warning: your definition must depend on a set $S$ and on a ``variable statement'' $A(x)$, as the existential and universal quantifiers.} @@ -106,6 +121,27 @@ here}'' ? \section{Proofs} +\begin{exercise} + Prove by induction that + \begin{align*} + \forall n\in\mathbb N,\quad \sum_{k=1}^n(2k-1)=n^2 + \end{align*} + (here $\sum_{k=1}^n(2k-1)$ means $1+3+5+\cdots+ (2n-1)$). +\end{exercise} + +\begin{exercise} + If $n\in \mathbb N$ the \emph{factorial} of $n$, denoted by $n!$ is defined + as follows: + \begin{align*} + n!=\begin{cases} + 1&\text{if } n=0,\\ + n\times (n-1)! & \text{if } n> 0. + \end{cases} + \end{align*} + Prove by induction that if $n\geq 4$ then $n!\geq 2^n$. +\end{exercise} + + \begin{exercise} Is the following statement true or false? Give a proof of your answer. \begin{align*} -- cgit v1.3