1
\documentclass{article}
5
\newcommand{\minicoq}{\textsf{minicoq}}
6
\newcommand{\nonterm}[1]{\textit{#1}}
7
\newcommand{\terminal}[1]{\textsf{#1}}
8
\newcommand{\listzero}{\textit{LIST$_0$}}
9
\newcommand{\listun}{\textit{LIST$_1$}}
10
\newcommand{\sep}{\textit{SEP}}
12
\title{Minicoq: a type-checker for the pure \\
13
Calculus of Inductive Constructions}
20
\section{Introduction}
22
\minicoq\ is a minimal toplevel for the \Coq\ kernel.
25
\section{Grammar of terms}
27
The grammar of \minicoq's terms is given in Figure~\ref{fig:terms}.
33
term & ::= & identifier \\
34
& $|$ & \terminal{Rel} integer \\
35
& $|$ & \terminal{Set} \\
36
& $|$ & \terminal{Prop} \\
37
& $|$ & \terminal{Type} \\
38
& $|$ & \terminal{Const} identifier \\
39
& $|$ & \terminal{Ind} identifier integer \\
40
& $|$ & \terminal{Construct} identifier integer integer \\
41
& $|$ & \terminal{[} name \terminal{:} term
43
& $|$ & \terminal{(} name \terminal{:} term
45
& $|$ & term \verb!->! term \\
46
& $|$ & \terminal{(} \listun\ term \terminal{)} \\
47
& $|$ & \terminal{(} term \terminal{::} term \terminal{)} \\
48
& $|$ & \verb!<! term \verb!>! \terminal{Case}
49
term \terminal{of} \listzero\ term \terminal{end}
51
name & ::= & \verb!_! \\
56
\caption{Grammar of terms}
61
The grammar of \minicoq's commands are given in
62
Figure~\ref{fig:commands}. All commands end with a dot.
68
command & ::= & \terminal{Definition} identifier \terminal{:=} term. \\
69
& $|$ & \terminal{Definition} identifier \terminal{:} term
70
\terminal{:=} term. \\
71
& $|$ & \terminal{Parameter} identifier \terminal{:} term. \\
72
& $|$ & \terminal{Variable} identifier \terminal{:} term. \\
73
& $|$ & \terminal{Inductive} \terminal{[} \listzero\ param
74
\terminal{]} \listun\ inductive \sep\
76
& $|$ & \terminal{Check} term.
78
param & ::= & identifier
80
inductive & ::= & identifier \terminal{:} term \terminal{:=}
81
\listzero\ constructor \sep\ \terminal{$|$}
83
constructor & ::= & identifier \terminal{:} term