Compare commits
4 Commits
Author | SHA1 | Date |
---|---|---|
Sameer Rahmani | e4e8da96e4 | |
Sameer Rahmani | a1f6581d9a | |
Sameer Rahmani | ad33bf5b0d | |
Sameer Rahmani | ff850139ad |
16
Makefile
16
Makefile
|
@ -1,11 +1,15 @@
|
|||
1:
|
||||
latexmk -f -xelatex -interaction=nonstopmode -output-directory=$(PWD)/build/ ep1.tex
|
||||
pdftoppm -png -f 1 -l 1 -singlefile -r 1200 -scale-to-x 1920 -scale-to-y 1080 $(PWD)/build/ep1.pdf $(PWD)/build/ep1
|
||||
.PHONY: build
|
||||
build: cv.pdf
|
||||
%:
|
||||
latexmk -f -xelatex -interaction=nonstopmode -output-directory=$(PWD)/build/ ep$@.tex
|
||||
pdftoppm -png -f 1 -l 1 -singlefile -r 1200 -scale-to-x 1920 -scale-to-y 1080 $(PWD)/build/ep$@.pdf $(PWD)/build/ep$@
|
||||
|
||||
deps:
|
||||
@echo "Source San Pro font family must be installed"
|
||||
tlmgr update --list
|
||||
tlmgr install fontspec
|
||||
tlmgr install sourcesanspro
|
||||
tlmgr install fontawesome5
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf build
|
||||
rm -f *~
|
||||
all: build
|
||||
|
|
30
ep1.tex
30
ep1.tex
|
@ -28,7 +28,7 @@
|
|||
\maketitle
|
||||
\begin{frame}{So far\ldots}{}
|
||||
\begin{itemize}
|
||||
\item In the first season we created a super simple compiler
|
||||
\item In the first season, we created a super simple compiler
|
||||
\item We learned about the basics of LLVM and MLIR
|
||||
\item We created a basic platform to develop a programming language, that includes:
|
||||
\begin{itemize}
|
||||
|
@ -38,7 +38,7 @@
|
|||
\item and few other bits and pieces
|
||||
\end{itemize}
|
||||
\item BUT we didn't come up with a specification for \href{https://serene-lang.org}{Serene}
|
||||
\item We didn't design the language yet
|
||||
\item We didn't design the language, yet
|
||||
\item That's what we're going to do in this series
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
@ -47,7 +47,7 @@
|
|||
\begin{itemize}
|
||||
\item Not all the programming langs have specification
|
||||
\item A spec or standard brings clarity for users and developers
|
||||
\item We could've just implement an already exist spec like \href{http://www.r6rs.org/}{R6RS} (Scheme)
|
||||
\item We could've just implemented an already exist spec like \href{http://www.r6rs.org/}{R6RS} (Scheme)
|
||||
\item Or just create a language based on our intuition (many languages have done this)
|
||||
\item Or design a standard from scratch \\
|
||||
We can use about 100 years of Mathematics and Computer Science to our benefit
|
||||
|
@ -56,9 +56,9 @@
|
|||
|
||||
\begin{frame}{Where to look?}
|
||||
\begin{itemize}
|
||||
\item Based on the past experience we have some initial idea on where to look
|
||||
\item Later on we will find out whether or not our initial ideas were good
|
||||
\item For example
|
||||
\item Based on the experience, we have some initial idea on where to look
|
||||
\item Later on, we will find out whether our initial ideas were good
|
||||
\item For example,
|
||||
\begin{itemize}
|
||||
\item I prefer functional programming
|
||||
\item Dynamic type systems
|
||||
|
@ -77,14 +77,14 @@
|
|||
\item Proof theory
|
||||
\end{itemize}
|
||||
\item They all describe the same world from different perspectives
|
||||
\item Also, there are few papers that we need to look at, like the lisp paper
|
||||
\item Furthermore, there are few papers that we need to look at, like the lisp paper
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}{Required tools}
|
||||
\begin{itemize}
|
||||
\item We need build up few mathematical skills
|
||||
\item E.g We need to learn:
|
||||
\item We need to build up few mathematical skills
|
||||
\item E.g. We have to learn:
|
||||
\begin{itemize}
|
||||
\item Logic
|
||||
\item Set theory
|
||||
|
@ -95,32 +95,32 @@
|
|||
|
||||
\begin{frame}{The Plan}{}
|
||||
\begin{itemize}
|
||||
\item I like this series to be self contained as much as possible
|
||||
\item I like this series to be self-contained as much as possible
|
||||
\item We're going to start from basics
|
||||
\item We will cover
|
||||
\begin{itemize}
|
||||
\item What is mathematics? and why do we need it?
|
||||
\item What is mathematics? And why do we need it?
|
||||
\item Mathematical thinking
|
||||
\item Discrete mathematics
|
||||
\item $\lambda$-calculus
|
||||
\item Type theory
|
||||
\item and the rest
|
||||
\end{itemize}
|
||||
\item We will study the history of computer science an mathematics as well
|
||||
\item We will study the history of computer science and mathematics as well.
|
||||
\item History is a great guide
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}{Disclaimer}{}
|
||||
\begin{itemize}
|
||||
\item I'm not a professional mathematician
|
||||
\item I'm just sharing the result of my research and things that I learn. Take it with a grain of salt
|
||||
\item I'm not a professional mathematician.
|
||||
\item I'm just sharing the result of my research and things that I learn. Take it with a grain of salt.
|
||||
\item ``Nullius in verba''
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}{Contact}{}
|
||||
Please shared your thoughts and ideas or researches and papers that you want me to have a look at via:
|
||||
Please, share your thoughts and ideas or researches and papers that you want me to have a look at via:
|
||||
\begin{itemize}
|
||||
\item Comment section on \href{https://youtube.com/c/lxsameer}{youtube}
|
||||
\item \href{https://lxsameer.com}{https://lxsameer.com}
|
||||
|
|
|
@ -0,0 +1,128 @@
|
|||
%!TEX TS-program = xelatex
|
||||
%!TEX encoding = UTF-8 Unicode
|
||||
% Lxsameer's CV Latex class
|
||||
% Copyright (C) 2022 Sameer Rahmani <lxsameer@gnu.org>
|
||||
%
|
||||
% This program is free software; you can redistribute it and/or
|
||||
% modify it under the terms of the GNU General Public License
|
||||
% as published by the Free Software Foundation; either version 2
|
||||
% of the License, or (at your option) any later version.
|
||||
%
|
||||
% This program is distributed in the hope that it will be useful,
|
||||
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
% GNU General Public License for more details.
|
||||
%
|
||||
% You should have received a copy of the GNU General Public License
|
||||
% along with this program; if not, write to the Free Software
|
||||
% Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
\documentclass{lxpresent}
|
||||
|
||||
\date{\today}
|
||||
\title{Mathematics of Programming Languages}
|
||||
\setep{02}{Basics of Logic}
|
||||
|
||||
\begin{document}
|
||||
\maketitle
|
||||
|
||||
\begin{frame}{Why logic?}{}
|
||||
\begin{itemize}
|
||||
\item Logic serves as the backbone of computer science
|
||||
\item it provides the fundamental principles and tools necessary for understanding,
|
||||
designing, and building complex systems
|
||||
\item It forms the basis of logical reasoning, proofs, problem solving, and program correctness.
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
|
||||
\begin{frame}{What is logic?}{}
|
||||
\begin{itemize}
|
||||
\item One of the key aspects of Mathematics is unambiguity
|
||||
\item The study of the principles of reasoning
|
||||
\item Logic is tool to remove ambiguity from our arguments and thoughts
|
||||
\item Most of the definitions of formal logic have been developed so that they agree with the
|
||||
natural or intuitive logic used by people.
|
||||
\item The difference between formal logic and intuitive logic exists to avoid ambiguity and obtain consistency.
|
||||
\item To put it simply logic is all about what counts as a good argument. A good argument is a valid argument. One that, preserves truth from premises to conclusion.
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}{Arguments}{Propositional logic}
|
||||
\begin{itemize}
|
||||
\item An argument is a sequence of statements aimed at demonstrating the truth of an assertion.
|
||||
\item The assertion at the end of the sequence is called the \textbf{conclusion}.
|
||||
\item The preceding statements are called \textbf{premises}.
|
||||
\item As an example:\\
|
||||
\begin{flalign*}
|
||||
&\text{If} \overbrace{\text{Earth is a planet}}^{\textit{premise}} \text{then} \overbrace{\text{Earth is round}}^{\textit{conclusion}}\\
|
||||
&\text{Earth is a planet}\\
|
||||
\therefore \hspace{0.2em} &\text{Earth is round}.
|
||||
\end{flalign*}
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}{Arguments}{Symbolic logic}
|
||||
\begin{itemize}
|
||||
\item In logic, the form of an argument is distinguished from its content.
|
||||
\item Logic, won't help you determine the intrinsic merit of an argument’s content.
|
||||
\item It will help you analyze an argument’s form to determine whether the truth of the conclusion follows \textit{necessarily} from the truth of the premises.
|
||||
\begin{flalign*}
|
||||
&\text{If} \overbrace{\text{Earth is a planet}}^{\textit{p}} \text{then} \overbrace{\text{Earth is round}}^{\textit{q}}\\
|
||||
&\overbrace{\text{Earth is a planet}}^{\textit{p}}\\
|
||||
\therefore \hspace{0.2em} &\overbrace{\text{Earth is round}}^{\textit{q}}.
|
||||
\end{flalign*}
|
||||
\item Convension: We will use letters \textit{p}, \textit{q}, and \textit{r} to represent
|
||||
component sentences.
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
|
||||
\begin{frame}{Proposition}{}
|
||||
\begin{itemize}
|
||||
\item In any mathematical theory, new terms are defined by using those that have been
|
||||
previously defined. (E.g. A mathematical system)
|
||||
\item This process has to start somewhere
|
||||
\item In logic, the words \textbf{\textit{sentence}}, \textbf{\textit{true}}, \textbf{\textit{false}} are the initial
|
||||
undefined terms
|
||||
\item A \textbf{proposition} (or \textbf{statement}) is a sentence that is true or false but not both.
|
||||
\item For example:
|
||||
\begin{itemize}
|
||||
\item ``Earth is a planet'' (true)
|
||||
\item ``Earth is flat'' (false)
|
||||
\item $x + 5 > 0$ (Depends on the value of $x$)
|
||||
\item ``How are you?'' (not a proposition)
|
||||
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}{Compound propositions}{}
|
||||
\begin{itemize}
|
||||
\item We can use \textbf{logical connectives} to connect propositions together to form compound propositions.
|
||||
\item For example:
|
||||
\begin{itemize}
|
||||
\item $\overbrace{\text{\say{Earth is a planet}}}^{\textit{p}}$ \textbf{or} $\overbrace{\text{\say{Sun is a planet}}}^{\textit{q}}$
|
||||
\item $\overbrace{\text{\say{Alice is at work}}}^{\textit{p}}$ \textbf{and} $\overbrace{\text{\say{Bob is at work}}}^{\textit{q}}$
|
||||
\item $\overbrace{\text{\say{Earth is \textbf{not} flat}}}^{\textit{p}}$
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}{More symbols}{}
|
||||
Let's rewrite the propositions from before using symbolic variables:
|
||||
\begin{itemize}
|
||||
\item $\overbrace{\text{\say{Earth is a planet}}}^{\textit{p}}$ \textbf{or} $\overbrace{\text{\say{Sun is a planet}}}^{\textit{q}}$: ($p \lor q$)
|
||||
\item $\overbrace{\text{\say{Alice is at work}}}^{\textit{p}}$ \textbf{and} $\overbrace{\text{\say{Bob is at work}}}^{\textit{q}}$: ($p \land q$)
|
||||
\item $\overbrace{\text{\say{Earth is \textbf{not} flat}}}^{\textit{p}}$: ($\neg p$)
|
||||
\end{itemize}
|
||||
|
||||
\end{frame}
|
||||
\begin{frame}{Contact}{}
|
||||
Please, share your thoughts and ideas or researches and papers that you want me to have a look at via:
|
||||
\begin{itemize}
|
||||
\item Comment section on \href{https://youtube.com/c/lxsameer}{youtube}
|
||||
\item \href{https://lxsameer.com}{https://lxsameer.com}
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
\end{document}
|
Binary file not shown.
After Width: | Height: | Size: 63 KiB |
Binary file not shown.
After Width: | Height: | Size: 154 KiB |
|
@ -0,0 +1,10 @@
|
|||
\usepackage[sfdefault]{roboto} %% Option 'sfdefault' only if the base font of the document is to be sans serif
|
||||
\usepackage[T1]{fontenc}
|
||||
\mdseries
|
||||
\documentclass{article}
|
||||
\begin{document}
|
||||
\begin{math}
|
||||
\psi(x_b, t_b) = \int_{-\infty}^{+\infty} K(b, a)\psi(x_a, t_a)dx_a
|
||||
\end{math}
|
||||
%% K(b, a) = (\frac{m}{ih(t_b - t_a)})^\frac{1}{2} exp \frac{im(x_b - x_a)^2}{2\hbar(t_b - t_a)}
|
||||
\end{document}
|
|
@ -30,6 +30,8 @@
|
|||
\RequirePackage[normalem]{ulem}
|
||||
\RequirePackage{amsmath}
|
||||
\RequirePackage{amssymb}
|
||||
\RequirePackage{mathtools}
|
||||
\RequirePackage{dirtytalk}
|
||||
\RequirePackage{capt-of}
|
||||
|
||||
\newcommand*{\setep}[2]{\def\@ep{#1}\def\@eptitle{#2}}
|
||||
|
@ -44,7 +46,7 @@
|
|||
\setbeamercolor{palette secondary} {fg=spurple,bg=white}
|
||||
\setbeamercolor{structure}{fg=white,bg=spurple}
|
||||
\setbeamercolor{title in head/foot}{fg=white,bg=spurple}
|
||||
\setbeamercolor{date in head/foot}{fg=lightgray,bg=spurple}
|
||||
\setbeamercolor{date in head/foot}{fg=lightgray}
|
||||
\setbeamercolor{background canvas}{bg=spurple}
|
||||
\setbeamercolor{title}{fg=blue,bg=spurple}
|
||||
\setbeamercolor{normal text}{fg=white}
|
||||
|
@ -63,13 +65,10 @@
|
|||
% definition of the footline template
|
||||
\defbeamertemplate*{footline}{mytheme}{%
|
||||
\leavevmode%
|
||||
\hbox{\begin{beamercolorbox}[wd=.3\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm]{title in head/foot}%
|
||||
\makebox[2em][l]{{\usebeamerfont{title in head/foot}\textcolor{white}{\@ep}}}%
|
||||
{\usebeamercolor{title in head/foot}{\@eptitle}}
|
||||
\end{beamercolorbox}%
|
||||
\begin{beamercolorbox}[wd=.3\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm,right]{title in head/foot}%
|
||||
\end{beamercolorbox}}%
|
||||
\vskip0pt%
|
||||
\hspace{0.5em}
|
||||
\hbox{
|
||||
{\usebeamercolor{title in head/foot}{\@ep \- \@eptitle}}}
|
||||
\vspace{0.5em}
|
||||
}
|
||||
|
||||
% definition of the title page template
|
||||
|
@ -113,3 +112,7 @@
|
|||
\defbeamertemplate*{itemize item}{mysymbol}{\small\raise0.5pt\hbox{\mysymbol}}
|
||||
\defbeamertemplate*{itemize subitem}{mysymbol}{\footnotesize\raise0.5pt\hbox{\mysymbol}}
|
||||
\defbeamertemplate*{itemize subsubitem}{mysymbol}{\footnotesize\raise0.5pt\hbox{\mysymbol}}
|
||||
|
||||
|
||||
\newcommand{\pic}[2]{
|
||||
\includegraphics[width=#2\textwidth]{#1}}
|
||||
|
|
Loading…
Reference in New Issue