Skip to content

Commit c32cc2c

Browse files
authored
Merge pull request #108 from math-comp/small-glitches
Small glitches
2 parents 821e80c + d34ce52 commit c32cc2c

File tree

8 files changed

+27
-22
lines changed

8 files changed

+27
-22
lines changed

tex/chProgramming.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
.
1313
\end{coqdef}
1414

15-
\chapter{Functions and Computation}\label{ch:prog}
15+
\chapter{Functions and computation}\label{ch:prog}
1616

1717
In the formalism underlying the \Coq{} system, functions play a
1818
central role akin to the one of sets in set theory. However,

tex/chProofLanguage.tex

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
\chapter{A Proof Language for Formal Proofs}{}
1+
\chapter{A proof language for formal proofs}{}
22
\label{ch:script}
33

44

@@ -87,7 +87,7 @@ \chapter{A Proof Language for Formal Proofs}{}
8787
%\section{Managing the proof context}
8888

8989
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
90-
\section{Bookkeeping: Goals as stacks}\label{ssec:stack}
90+
\section{Bookkeeping: goals as stacks}\label{ssec:stack}
9191
\index[concept]{goal stack model}
9292

9393
The presentation we gave so far of proof commands like \C{case: n => [|m]}
@@ -247,8 +247,12 @@ \subsection{Pulling from the stack}
247247
new variable (the predecessor of what used to be called \C{y}).
248248
Since \C{y} is destructed we could have reused that name for
249249
its predecessor, as it is often done in the \mcbMC{} library.
250-
Recall the definition of \C{odd} \marginpar{odd is never given}:
251-
when applied to \C{z.+1} it simplifies to \C{\~\~ odd z}.
250+
In fact, the boolean predicate \C{odd} is defined by case analysis,
251+
and induction, on its argument of type \C{nat}:
252+
\begin{coq}{}{}
253+
Fixpoint odd n := if n is n'.+1 then ~~ odd n' else false.
254+
\end{coq}
255+
Therefore, when applied to \C{z.+1}, it simplifies to \C{\~\~ odd z}.
252256

253257
Now, the fact that \C{z} is even is not needed to conclude, so we can
254258
discard it by giving it the \C{\_} dummy name.~\footnote{

tex/chProofs.tex

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
\end{coqdef}
3232

3333

34-
\chapter{First Steps in Formal Proofs}{}
34+
\chapter{First steps in formal proofs}{}
3535
\label{ch:proofs}
3636
% In this chapter we explain how to state a lemma,
3737
% how to prove it, and how to search existing, loaded library.
@@ -1554,8 +1554,7 @@ \subsection{Using lemmas in proofs}
15541554
\end{coq}
15551555
\coqrun{name=testexp}{ssr,exp,abort}
15561556

1557-
where \D{p \%| m`!} stands for ``\C{p} divides the factorial of \C{m}''.\marginpar{there is a problem with the factorial notation at the beginning
1558-
of this line}
1557+
where \D{p \%| m`!} stands for ``\C{p} divides the factorial of \C{m}''.
15591558

15601559
The first step of our formal proof will be to give a name to the
15611560
hypothesis \C{(prime p)}, which means that we add it to the

tex/chSigmaBool.tex

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
Require Import tuple.
2020
\end{coqdef}
2121

22-
\chapter{Sub-Types}{}\label{ch:sigmabool}
22+
\chapter{Sub-types}{}\label{ch:sigmabool}
2323

2424
Inductive data types have been used to both code data, like lists, and
2525
logical connectives, like the existential quantifier.
@@ -264,8 +264,9 @@ \section{$n$-tuples, lists with an invariant on the length}
264264

265265
The global table of canonical solutions is extended as follows.
266266

267+
\vspace{1ex}
267268
\noindent
268-
\begin{tcolorbox}[colframe=blue!60!white,before=\hfill,after=\hfill,center title,tabularx={ll|l|l},fonttitle=\sffamily\bfseries,title=Canonical Structures Index]
269+
\begin{tcolorbox}[colframe=orange!60!white,before=\hfill,after=\hfill,center title,tabularx={ll|l|l},fonttitle=\sffamily\bfseries,title=Canonical Structures Index]
269270
projection & value & solution & combines solutions for \\ \hline
270271
\lstinline/tval N A/ & \lstinline/rev A S/ & \lstinline/rev_tuple N A T/
271272
& \lstinline/T/ $\leftarrow$ (\lstinline/tval N A/, \lstinline/S/) \\

tex/chSpecification.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
\chapter{Inductive Specifications}{}
1+
\chapter{Inductive specifications}{}
22
\label{ch:boolrefl}
33

44
% in addition to the photos:

tex/chTT.tex

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
\chapter{Dependent Type Theory}{}
1+
\chapter{Dependent type theory}{}
22
\label{ch:ttch}
33

44
%% Summary of the 22/02 discussion:
@@ -171,7 +171,6 @@ \section{Propositions as types, proofs as programs}\label{sec:patpap}
171171
term of the corresponding type. Objects of the formalism are programs,
172172
and proofs are themselves objects of the formalism.
173173

174-
% \marginpar{meta is condusing here: take more time to talk about this}
175174
In this setting the analogue of ``a proposition has a proof''
176175
is that ``a term has a given type''. Such a statement, called a
177176
\emph{typing judgment}, is a ternary relation written as follows:
@@ -732,8 +731,6 @@ \section{Conversion}\label{sec:conv}
732731
homonymous algebraic structure~\cite{gregoire:hal-00819484}.
733732

734733

735-
%\marginpar{Say here that computation can be used for automation? and
736-
% simpl? and that controlling it is a delicate issue?}
737734

738735

739736
% One can also benefit from convertibility whenever one applies a lemma;

tex/chTypeInference.tex

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
Abort.
1313
\end{coqdef}
1414

15-
\chapter{Implicit Parameters}{}
15+
\chapter{Implicit parameters}{}
1616

1717
The rules of the \mcbCIC{}, as the ones sketched in~\ref{ch:ttch},
1818
are expressed on the syntax of terms and
@@ -91,7 +91,7 @@ \chapter{Implicit Parameters}{}
9191
%\mcbLEARN{HO unif is hard}
9292
%\mcbREQUIRE{}
9393
%\mcbPROVIDE{terminology}
94-
\section{Type inference and Higher-Order unification}\label{sec:hounif}
94+
\section{Type inference and higher-order unification}\label{sec:hounif}
9595
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9696

9797
The type inference algorithm is quite similar to the type checking
@@ -612,7 +612,8 @@ \section{Records as relations}\label{sec:eqtype}
612612
Whenever a record instance is declared as canonical \Coq{}
613613
adds to such table an entry for each field of the record type.
614614

615-
\begin{tcolorbox}[colframe=blue!60!white,before=\hfill,after=\hfill,width=8cm,center title,tabularx={ll|l},fonttitle=\sffamily\bfseries,title=canonical structures Index]
615+
\vspace{1ex}
616+
\begin{tcolorbox}[colframe=orange!60!white,before=\hfill,after=\hfill,width=8cm,center title,tabularx={ll|l},fonttitle=\sffamily\bfseries,title=canonical structures Index]
616617
projection & value & solution \\ \hline
617618
\lstinline/sort/ & \lstinline/nat/ & \lstinline/nat_eqType/ \\
618619
\lstinline/sort/ & \lstinline/bool/ & \lstinline/bool_eqType/ \\
@@ -727,8 +728,9 @@ \section{Records as relations}\label{sec:eqtype}
727728

728729
The global table of canonical solutions is extended as follows.
729730

731+
\vspace{1ex}
730732
\noindent
731-
\begin{tcolorbox}[colframe=blue!60!white,before=\hfill,after=\hfill,center title,tabularx={ll|l|l},fonttitle=\sffamily\bfseries,title=canonical structures Index]
733+
\begin{tcolorbox}[colframe=orange!60!white,before=\hfill,after=\hfill,center title,tabularx={ll|l|l},fonttitle=\sffamily\bfseries,title=canonical structures Index]
732734
projection & value & solution & combines solutions for \\ \hline
733735
\lstinline/sort/ & \lstinline/nat/ & \lstinline/nat_eqType/ & \\
734736
\lstinline/sort/ & \lstinline/bool/ & \lstinline/bool_eqType/ & \\
@@ -1531,8 +1533,9 @@ \subsection{Assumptions of a bigop lemma}\label{sec:bigoplemmas}
15311533
This command adds the following rule to the canonical structures
15321534
index:
15331535

1536+
\vspace{1ex}
15341537
\noindent
1535-
\begin{tcolorbox}[colframe=blue!60!white,before=\hfill,after=\hfill,width=8cm,center title,tabularx={ll|l},fonttitle=\sffamily\bfseries,title=canonical structures Index]
1538+
\begin{tcolorbox}[colframe=orange!60!white,before=\hfill,after=\hfill,width=8cm,center title,tabularx={ll|l},fonttitle=\sffamily\bfseries,title=canonical structures Index]
15361539
projection & value & solution \\ \hline
15371540
\lstinline/Monoid.operator/ & \lstinline/addn/ & \lstinline/addn_monoid/ \\
15381541
\hline

tex/main.tex

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@
5858
\makeindex[name=coq,title=Definitions and Notations,intoc]
5959
\makeindex[name=vernac,title=Coq Commands,intoc]
6060

61-
\newcommand{\partonename}{Languages for writing Formal Mathematics}
62-
\newcommand{\parttwoname}{Crafting a Formal Library}
61+
\newcommand{\partonename}{Languages for writing formal mathematics}
62+
\newcommand{\parttwoname}{Crafting a formal library}
6363

6464

6565

@@ -127,6 +127,7 @@
127127

128128
\pagestyle{empty} % No headers
129129

130+
\setcounter{tocdepth}{1}
130131
\tableofcontents % Print the table of contents itself
131132

132133
\cleardoublepage{} % Forces the first chapter to start on an odd page so it's on the right

0 commit comments

Comments
 (0)