Skip to content

Commit cb30cc3

Browse files
committed
Preface: misc edits and notes
1 parent 0b7e28a commit cb30cc3

File tree

2 files changed

+72
-39
lines changed

2 files changed

+72
-39
lines changed

Diff for: src/Preface.lidr

+60-37
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,20 @@ together five conceptual threads:
4747

4848
1. basic tools from _logic_ for making and justifying precise claims about
4949
programs;
50-
2. the use of _proof assistants_ to construct rigorous logical arguments;
5150

52-
3. the idea of _functional programming_, both as a method of programming that
53-
simplifies reasoning about programs and as a bridge between programming and
54-
logic;
51+
2. the use of \glspl{proof assistant} to construct rigorous logical
52+
arguments;
53+
54+
3. the idea of \gls{functional programming}, both as a method of programming
55+
that simplifies reasoning about programs and as a bridge between programming
56+
and logic;
5557

5658
4. formal techniques for _reasoning about the properties of specific programs_
5759
(e.g., the fact that a sorting function or a compiler obeys some formal
5860
specification); and
5961

60-
5. the use of _type systems_ for establishing well-behavedness guarantees for
61-
_all_ programs in a given programming language (e.g., the fact that
62+
5. the use of \glspl{type system} for establishing well-behavedness guarantees
63+
for _all_ programs in a given programming language (e.g., the fact that
6264
well-typed Java programs cannot be subverted at runtime).
6365

6466
Each of these topics is easily rich enough to fill a whole course in its own
@@ -72,16 +74,15 @@ information for all cited works can be found in the \nameref{bib} chapter.
7274

7375
=== Logic
7476

75-
Logic is the field of study whose subject matter is _proofs_ -- unassailable
76-
arguments for the truth of particular propositions. Volumes have been written
77-
about the central role of logic in computer science. Manna and Waldinger called
78-
it "the calculus of computer science," while Halpern et al.'s paper _On the
79-
Unusual Effectiveness of Logic in Computer Science_ catalogs scores of ways in
80-
which logic offers critical tools and insights. Indeed, they observe that "As a
81-
matter of fact, logic has turned out to be significantly more effective in
82-
computer science than it has been in mathematics. This is quite remarkable,
83-
especially since much of the impetus for the development of logic during the
84-
past one hundred years came from mathematics."
77+
Logic is the field of study whose subject matter is \glspl{proof}. Volumes have
78+
been written about the central role of logic in computer science. Manna and
79+
Waldinger called it "the calculus of computer science," while Halpern et al.'s
80+
paper _On the Unusual Effectiveness of Logic in Computer Science_ catalogs
81+
scores of ways in which logic offers critical tools and insights. Indeed, they
82+
observe that "As a matter of fact, logic has turned out to be significantly more
83+
effective in computer science than it has been in mathematics. This is quite
84+
remarkable, especially since much of the impetus for the development of logic
85+
during the past one hundred years came from mathematics."
8586
8687
In particular, the fundamental notion of inductive proofs is ubiquitous in all
8788
of computer science. You have surely seen them before, in contexts from discrete
@@ -103,20 +104,28 @@ propositions. These tools fall into two broad categories:
103104
in a huge variety of settings. Examples of such tools include SAT solvers,
104105
SMT solvers, and model checkers.
105106
106-
- _Proof assistants_ are hybrid tools that automate the more routine aspects
107-
of building proofs while depending on human guidance for more difficult
108-
aspects. Widely used proof assistants include Isabelle, Agda, Twelf, ACL2,
109-
PVS, Coq, and Idris among many others.
110-
111-
This course is based around Coq, a proof assistant that has been under
112-
development, mostly in France, since 1983 and that in recent years has attracted
113-
a large community of users in both research and industry. Coq provides a rich
114-
environment for interactive development of machine-checked formal reasoning. The
115-
kernel of the Coq system is a simple proof-checker, which guarantees that only
116-
correct deduction steps are performed. On top of this kernel, the Coq
107+
- \Glspl{proof assistant} are hybrid tools that automate the more routine
108+
aspects of building proofs while depending on human guidance for more
109+
difficult aspects. Widely used \glspl{proof assistant} include Isabelle,
110+
Agda, Twelf, ACL2, PVS, Coq, and Idris among many others.
111+
112+
\todo[inline]{Edit the following}
113+
114+
This course is based around Idris, a general purpose pure functional programming
115+
language with _dependent types_ that has been under development since 2006 and
116+
that in recent years has attracted a large community of users in both research
117+
and hobby. Idris provides a rich environment for interactive development of
118+
machine-checked formal reasoning. The kernel of the Idris system is full
119+
_dependent types_ with _dependent pattern matching_, which allow \glspl{type} to
120+
be predicated on _values_, enabling some aspects of a program's behavior to be
121+
specified precisely in the \gls{type}. On top of this kernel, the Idris
117122
environment provides high-level facilities for proof development, including
118123
powerful tactics for constructing complex proofs semi-automatically, and a large
119-
library of common definitions and lemmas.
124+
library of common definitions and lemmas. In some ways, Idris's theorem-proving
125+
is similar to Coq.
126+
127+
\todo[inline]{Consider comparing Coq and Idris here, or at least qualifying
128+
"some ways"}
120129

121130
Coq has been a critical enabler for a huge variety of work across computer
122131
science and mathematics:
@@ -158,14 +167,18 @@ initials of the Calculus of Constructions (CoC) on which it is based." The
158167
rooster is also the national symbol of France, and C-o-q are the first three
159168
letters of the name of Thierry Coquand, one of Coq's early developers.
160169
170+
Idris, on the other hand, was named after the singing dragon character from
171+
\href{https://en.wikipedia.org/wiki/Ivor_the_Engine#Idris_the_Dragon}{Ivor the
172+
Engine}.
173+
161174
162175
=== Functional Programming
163176
164177
The term _functional programming_ refers both to a collection of programming
165178
idioms that can be used in almost any programming language and to a family of
166179
programming languages designed to emphasize these idioms, including Haskell,
167180
OCaml, Standard ML, F#, Scala, Scheme, Racket, Common Lisp, Clojure, Erlang,
168-
and Coq.
181+
Coq, and Idris.
169182
170183
Functional programming has been developed over many decades -- indeed, its roots
171184
go back to Church's lambda-calculus, which was invented in the 1930s, before
@@ -205,19 +218,19 @@ and is used by Google to index the entire web is a classic example of functional
205218
programming.
206219
207220
For this course, functional programming has yet another significant attraction:
208-
it serves as a bridge between logic and computer science. Indeed, Coq itself can
209-
be viewed as a combination of a small but extremely expressive functional
210-
programming language plus with a set of tools for stating and proving logical
211-
assertions. Moreover, when we come to look more closely, we find that these two
212-
sides of Coq are actually aspects of the very same underlying machinery -- i.e.,
213-
_proofs are programs_.
221+
it serves as a bridge between logic and computer science. Indeed, Idris itself
222+
can be viewed as a combination of a small but extremely expressive functional
223+
programming language with full _dependent types_ and a set of tools for stating
224+
and proving logical assertions. Moreover, when we come to look more closely, we
225+
find that these two sides of Idris are actually aspects of the very same
226+
underlying machinery -- i.e., _proofs are programs_.
214227
215228
216229
=== Program Verification
217230
218231
Approximately the first third of the book is devoted to developing the
219232
conceptual framework of logic and functional programming and gaining enough
220-
fluency with Coq to use it for modeling and reasoning about nontrivial
233+
fluency with Idris to use it for modeling and reasoning about nontrivial
221234
artifacts. From this point on, we increasingly turn our attention to two broad
222235
topics of critical importance to the enterprise of building reliable software
223236
(and hardware): techniques for proving specific properties of particular
@@ -277,6 +290,9 @@ checkers, contract checkers, and run-time property monitoring techniques for
277290
detecting when some component of a system is not behaving according to
278291
specification.
279292
293+
\todo[inline]{Edit the following: mention dependent types and maybe the
294+
underlying theory}
295+
280296
This topic brings us full circle: the language whose properties we study in this
281297
part, the _simply typed lambda-calculus_, is essentially a simplified model of
282298
the core of Coq itself!
@@ -293,11 +309,15 @@ treatment of a particular topic will find suggestions for further reading in the
293309
294310
=== Chapter Dependencies
295311
312+
\todo[inline]{Copy/recreate deps.html}
313+
296314
A diagram of the dependencies between chapters and some suggested
297315
paths through the material can be found in the file [deps.html].
298316
299317
=== System Requirements
300318
319+
\todo[inline]{Rewrite this for Idris}
320+
301321
Coq runs on Windows, Linux, and OS X. You will need:
302322
303323
- A current installation of Coq, available from the Coq home page. Everything
@@ -346,7 +366,10 @@ readers not post solutions to the exercises anyplace where they can be found by
346366
search engines.
347367
348368
349-
=== Downloading the Coq Files
369+
=== Downloading the Idris Files
370+
371+
\todo[inline]{Edit the following, generate HTML files (update pandoc-minted.hs
372+
accordingly) and update the URL.}
350373
351374
A tar file containing the full sources for the "release version" of these notes
352375
(as a collection of Coq scripts and HTML files) is available here:

Diff for: src/glossary.tex

+12-2
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,20 @@
115115
description={\todo{define}}
116116
}
117117

118-
\newglossaryentry{proof assistant}
118+
\newglossaryentry{proof}
119119
{
120+
name={proof},
121+
description={unassailable arguments for the truth of a particular
122+
proposition},
123+
descriptionplural={unassailable arguments for the truth of particular
124+
propositions},
125+
firstplural={\glsentryplural{proof} -- \glsentrydescplural{proof}}
126+
}
127+
128+
\newglossaryentry{proof assistant}{
120129
name={proof assistant},
121-
description={\todo{define}}
130+
description={\todo{define}},
131+
see=[see also]{proof}
122132
}
123133

124134
\newglossaryentry{structural recursion}

0 commit comments

Comments
 (0)