Skip to content

Commit 5b7c981

Browse files
committed
notes start
1 parent 03da086 commit 5b7c981

File tree

1 file changed

+91
-33
lines changed

1 file changed

+91
-33
lines changed

presentation/COMP3710-presentation.htex

Lines changed: 91 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
%% Show notes on other screen
88
\usepackage{pgfpages}
9-
% \setbeameroption{show notes on second screen=right}
9+
%notes%\setbeameroption{show notes on second screen=right}
1010

1111
%% Use overlays for enum and item environments.
1212
% \beamerdefaultoverlayspecification{<+->}
@@ -51,77 +51,96 @@
5151
\begin{document}
5252
\begin{frame}[plain]
5353
\titlepage{}
54+
\note{Hi, I'm Alexander Cox. Today I'm going to tell you about my COMP3710 project which I have been doing as part of my Bachelor of Science.}
5455
\end{frame}
5556

5657
\section{Introduction}
57-
\subsection{Introduction}
5858
\begin{frame}
5959
\frametitle{Introduction}
6060
Over the summer, I have been formalising some proof theory in the HOL4 theorem prover.
61+
\note[item]{This summer I have been using the HOL interactive theorem prover to formalise some mathematical logic.}
6162

6263
\bigskip
6364
The proof I have been formalising is the equivalence between Natural Deduction and Sequent Calculus, for intuitionistic propositional logic.
65+
\note[item]{I wanted to formalise the proof of the equivalence between two propositional logic calculi, Natural Deduction and Sequent Calculus. }
6466

6567
\bigskip
6668
I have been working from \textcite{bpt}, with some small deviations which I shall explain along the way.
69+
\note[item]{I have been working from the book "basic proof theory" by Troelstra and Schwichtenburg. I will note any differences from the book when relevant.}
6770
\end{frame}
6871

6972
\section{Theorem Proving}
70-
\subsection{Introduction}
7173
\begin{frame}{Theorem Provers}
7274
\begin{itemize}
7375
\item{I assume you already have some knowledge of theorem provers, but I include this brief definition for completeness.}
76+
\note[item]{I am guessing that you have seen many of the definitions I am going to give, but I will include the important ones for completeness.}
7477
\item An \emph{Interactive Theorem Prover} or \emph{Proof Assistant} is software used to formalise and verify the correctness of proofs.
78+
\note[item]{A Theorem Prover is a software environment in which you can formalise and check the correctness of proofs.}
7579
\item Proving a proposition in a theorem prover usually takes significantly more time than proving an informal proof on paper.
80+
\note[item]{Using a theorem prover to formalise something usually takes more time and effort than it would on paper.}
7681
\end{itemize}
7782
\end{frame}
7883

79-
\subsection{HOL4}
80-
\begin{frame}{The HOL Theorem Prover}
81-
I have been using the HOL theorem prover (HOL4), a theorem prover which implements a Higher Order Logic which is a variant of Church's Simple Theory of Types.
82-
83-
\bigskip
84-
HOL is engineered so that theorems can only be produced under the control of a small trusted kernel. This small trusted kernel consists of a handful of axioms and some basic inference rules. Larger, more complicated, inference rules are constructed using this small trusted kernel.
85-
\end{frame}
86-
8784
\subsection{Motivation}
8885
\begin{frame}{Why Bother?}
86+
\note{So why have I chosen to use a theorem prover, given that it takes so much time and effort? }
8987
\begin{enumerate}
9088
\item Once a theorem is proved in a theorem prover, you can trust that it is a correct proof, provided that the theorem prover itself is sound.
89+
\note[item]{Well, given that your theorem prover is sound, proving a proposition in the theorem prover gives you a guarantee of correctness for your proof.}
9190
\item Proving a theorem formally can reveal problems with the informal proof in some cases, since details cannot be skimmed over like they sometimes are in informal proofs.
91+
\note[item]{Also, sometimes when mathematicians prove something informally, they make small mistakes, or skim over details which appear trivial. In a theorem prover this is not possible, every step needs to be justified.}
9292
\item I wanted to learn about theorem provers, and this seemed like a good project for that.
93+
\note[item]{Another reason I wanted to do this project is because I wanted to learn to use a theorem prover, and this project seemed like a good fit for that purpose.}
9394
\end{enumerate}
9495
\end{frame}
9596

97+
\subsection{HOL4}
98+
\begin{frame}{The HOL Theorem Prover}
99+
I have been using the HOL theorem prover (HOL4), a theorem prover which implements a Higher Order Logic which is a variant of Church's Simple Theory of Types.
100+
\note[item]{The theorem prover I have been using is HOL4, which I will refer to as just HOL. It implements a variant of Church's Simple Theory of Types, which is a Higher Order Logic.}
101+
102+
\bigskip
103+
HOL is engineered so that theorems can only be produced under the control of a small trusted kernel. This small trusted kernel consists of a handful of axioms and some basic inference rules. Larger, more complicated, inference rules are constructed using this small trusted kernel.
104+
\note[item]{HOL theorems can only be constructed using a small trusted kernel. This kernel consists of just a few axioms and inference rules which are considered correct by the HOL community. All higher level inference relies on only this small trusted kernel.}
105+
\end{frame}
106+
96107
\section{Proof Theory and Logic}
97108

98109
\subsection{Proof Theory}
99110
\begin{frame}{Proofs about proofs}
100111
I have been talking about proofs in HOL, now I'm going to talk about proof theory in HOL, i.e., proofs about proofs in HOL. This discussion is syntactical, and not semantic.
112+
\note[item]{Before I proceed, I'd like to make sure I don't confuse you. I have just been talking about proving mathematical propositions in HOL, these could be any mathematical proofs.}
113+
\note[item]{I'm about to talk about proof theory in HOL, which involves proofs about proofs.}
101114

102115
\bigskip
103-
HOL is the meta-logic used to formalise the (object-)logic which is used in the proof systems I am analysing.
116+
HOL is the meta-logic used to formalise the (object-)logic which is used in the proof systems I am analysing. The object-logic is intuitionistic propositional logic.
117+
\note[item]{HOL is the meta-logic I am using to formalise the object-logic of the proof calculi I have studied. These calculi use intuitionistic propositional logic.}
104118

105119
\bigskip
106120
Standard ML is the meta-language of HOL and the interface to the logic.
121+
\note[item]{HOL is written in the functional programming language Standard ML, which is also the main interface of HOL. This makes Standard ML the meta-language of HOL.}
107122

108123
\bigskip
109124
English is the language and meta-language of this talk.
125+
\note[item]{English is both the language and meta-language of this talk.}
110126
\end{frame}
111127

112128
\subsection{Logic}
113129

114130
\begin{frame}[fragile]
115131
\frametitle{Propositional Logic Syntax}
132+
\note[item]{The formulae of propositional logic are defined inductively. Here is the definition in Backus-Naur Form:}
116133
Propositional logic formulae are defined inductively as follows:
134+
\note[item]{A formula phi is either a variable, a disjunction of formulae, a conjunction of formulae, a implication between formulae, or the falsity operator.}
117135
\[ \varphi ::= a~|~\varphi \lor \varphi~|~\varphi \land \varphi~|~\varphi \to \varphi~|~\bot \]
118136

119137
\bigskip
120138
In HOL:
139+
\note[item]{Here is the definition of formulae as I formalised it in HOL, which is much the same as in mathematical notation above, but defines a datatype named formula, which above I called phi, and the logical operators are given in prefix notation rather than infix as they are in the mathematical form.}
121140
\begin{HOLmath}
122141
\HOLthm{FormulaSyntax.datatype_formula}
123142
\end{HOLmath}
124-
\note{These connectives are defined in prefix even though they are used as infix later.}
143+
\note[item]{These connectives are defined in prefix here due to the way datatypes are defined in HOL, but are used in infix later.}
125144

126145
I'm using typeset definitions and theorems exported from HOL.
127146
\end{frame}
@@ -130,10 +149,15 @@
130149
\begin{notn}
131150
I use $A,B,C$ for arbitrary formulae.
132151
\end{notn}
152+
\note[item]{The remainder of propositional logic syntax is defined by abbreviation.}
153+
\note[item]{The following lines beginning with a turnstile are definitions exported from HOL.}
133154
\begin{notn}
134155
Lines beginning with $\vdash$ are `theorems' (the \texttt{thm} type), from HOL.
135156
\end{notn}
136157

158+
\note[item]{Negation is defined as implication of falsity.}
159+
\note[item]{Bi-implication is defined as the conjunction of the implication and it's converse.}
160+
\note[item]{Truth is defined as falsity implying itself}
137161
\begin{defn}
138162
\begin{HOLmath}
139163
\HOLthm[tt]{FormulaSyntax.Not_def}\\
@@ -147,30 +171,37 @@
147171
\subsection{Inference Rules}
148172

149173
\newcommand{\bs}{\char`\\}
150-
\begin{frame}[fragile]
151-
\frametitle{Inference Rules}
152-
An inference rule in a system $S$ is a condition under which a conclusion can be inferred from hypotheses:
153-
\[
154-
\AxiomC{$\Gamma_0 \vdash_S \varphi_0$}
155-
\AxiomC{$\dots$}
156-
\AxiomC{$\Gamma_n \vdash_S \varphi_n$}
157-
\RightLabel{(rule)}
158-
\TrinaryInfC{$\Delta \vdash_S \psi$}
159-
\DisplayProof
160-
\]
161-
Presented with hypotheses above and conclusion below.
174+
\begin{frame}[fragile]{Inference Rules}
175+
\note[item]{I use inference rules to define my calculi, so I will first define inference rules.}
176+
An inference rule in a system $S$ is a condition under which a conclusion can be inferred from hypotheses:
177+
\note[item]{An inference rule in a system is a condition under which a conclusion can be inferred from hypotheses.}
178+
\[
179+
\AxiomC{$\Gamma_0 \vdash_S \varphi_0$}
180+
\AxiomC{$\dots$}
181+
\AxiomC{$\Gamma_n \vdash_S \varphi_n$}
182+
\RightLabel{(rule)}
183+
\TrinaryInfC{$\Delta \vdash_S \psi$}
184+
\DisplayProof
185+
\]
186+
Presented with hypotheses above and conclusion below.
187+
\note[item]{The hypotheses are presented above the line, the rule name to the right, and the conclusion below.}
162188

163-
\bigskip
164-
In HOL I type:
165-
\begin{alltt}
166-
S \(\Gamma_0\) \(\varphi_0\) /\bs{} ... /\bs{} S \(\Gamma_n\) \(\varphi_n\) ==> S \(\Delta\) \(\psi\)
167-
\end{alltt}
189+
\bigskip
190+
In HOL I type:
191+
\begin{alltt}
192+
S \(\Gamma_0\) \(\varphi_0\) /\bs{} ... /\bs{} S \(\Gamma_n\) \(\varphi_n\) ==> S \(\Delta\) \(\psi\)
193+
\end{alltt}
194+
\note[item]{And here is how it is typed in HOL, as a conjunction of hypotheses implying a conclusion.}
195+
\note[item]{Note that in my project code I used a prefix relation for each calculi, and in this presentation I use and infix turnstile with the system name as a subscript.}
168196

169-
In HOL, I represent the infix binary relation ($\vdash_S$) as a prefix \texttt{S} relation, for no particular reason.
197+
In HOL, I represent the infix binary relation ($\vdash_S$) as a prefix \texttt{S} relation, for no particular reason.
170198
\end{frame}
171199

172200
\subsection{Natural Deduction}
173201
\begin{frame}{Natural Deduction}
202+
\note[item]{The first Calculus I will talk about is Natural Deduction, which I present in sequent style.}
203+
\note[item]{I represent the open assumptions as a set of hypotheses to the left of the turnstile.}
204+
\note[item]{Natural Deduction has one axiom in addition to introduction and elimination rules for each operator except falsity, which only has an elimination rule.}
174205
In Natural Deduction (\textbf{N}) the hypotheses are a represented as a set of formulae (\textbf{N} is in sequent style). \textbf{N} has introduction and elimination rules, as well as one axiom.
175206
\begin{defn}[Some \textbf{N} rules]
176207
\begin{HOLmath}
@@ -185,11 +216,13 @@
185216
\begin{remk}
186217
I will only present some of the rules in this talk, there are introduction and elimination rules for each formula connective.
187218
\end{remk}
219+
\note[item]{There are more rules than these, please ask at the end of the talk if you'd like to see them.}
188220

189221
\end{frame}
190222

191223
\begin{frame}{Weakening in Natural Deduction}
192224
You can add additional assumptions if you like, this is called weakening.
225+
\note[item]{Weakening is permitted in Natural Deduction, here is the proof}
193226

194227
\begin{lemma}[\textbf{N} weakening]
195228
\begin{HOLmath}
@@ -213,12 +246,15 @@
213246
\end{corl}
214247
\end{frame}
215248

216-
\begin{frame}{Discharge deviation from book}
249+
\begin{frame}{Discharge difference from book}
217250
\begin{remk}
218251
In the book, the hypotheses are labelled. In my formalisation I keep them unlabelled (Complete Discharge Convention, permissible).
219252
\end{remk}
253+
\note[item]{The standard formulation in the book uses labelled assumptions, which are discharged separately even if they are the same formula. I use the complete discharge convention from the book, which is equivalent to the labelled discharge for my purposes.}
220254

221255
\bigskip
256+
\note[item]{The inference rules I use which have a discharge are slightly different from those in the book.}
257+
\note[item]{My rules have a set union above the line, the book has a set difference below the line. Here are the rules which differ.}
222258
\begin{defn}[\textbf{Nd} discharge rules]
223259
The book has different rules for discharge, which I formalised as \textbf{Nd}:
224260
\begin{HOLmath}
@@ -230,14 +266,16 @@
230266

231267
\end{frame}
232268

233-
\begin{frame}{The deviation is equivalent}
269+
\begin{frame}{The difference is equivalent}
270+
\note[item]{I prove that the two formulations are equivalent, that is, they derive the same formulae from the same assumptions.}
234271
\begin{thm}[\textbf{N} is equivalent to \textbf{Nd}]
235272
Both formulations derive the same formulae from the same hypotheses:
236273
\begin{HOLmath}
237274
\HOLthm{IntuitionisticProof.N_Nd}
238275
\end{HOLmath}
239276
\end{thm}
240277

278+
\note[item]<1>{First I prove from my formulation to theirs.}
241279
\begin{onlyenv}<1>
242280
\begin{proof}[Proof (only if).]
243281
By rule induction on \textbf{N}.
@@ -549,6 +587,26 @@ rw[SUBSET_DEF]
549587
\end{alltt}
550588
\end{frame}
551589

590+
\subsection{Primary Theorem}
591+
\begin{frame}[fragile]{Proof Of The Primary Theorem}
592+
593+
\begin{thm}[Equivalence of \textbf{G} and \textbf{N}]
594+
595+
\begin{HOLmath}
596+
\HOLthm{IntuitionisticProof.G_iff_N}
597+
\end{HOLmath}
598+
\end{thm}
599+
\begin{proof}
600+
\begin{alltt}
601+
rw[] >>
602+
EQ_TAC >- rw[G_N] >>
603+
rw[] >>
604+
`G (unibag \HOLtm{Gamma}) A` by metis_tac[N_G] >>
605+
metis_tac[G_unibag]
606+
\end{alltt}
607+
\end{proof}
608+
\end{frame}
609+
552610
\section{Conclusion}
553611

554612
\subsection{Future Work}

0 commit comments

Comments
 (0)