--- a/doc-src/Logics/HOL.tex Fri Oct 23 16:11:01 1998 +0200
+++ b/doc-src/Logics/HOL.tex Fri Oct 23 16:27:56 1998 +0200
@@ -1539,7 +1539,6 @@
class of all \HOL\ types.
\end{warn}
-
\section{Record types}
At a first approximation, records are just a minor generalization of tuples,
@@ -1575,7 +1574,7 @@
\subsection{Proof tools}
-\section{Datatype declarations}
+\section{Datatype definitions}
\label{sec:HOL:datatype}
\index{*datatype|(}
@@ -1583,8 +1582,9 @@
non-trivial applications of \HOL. In principle, such types could be
defined by hand via \texttt{typedef} (see \S\ref{sec:typedef}), but
this would be far too tedious. The \ttindex{datatype} definition
-package of \HOL\ automates such chores. It generates freeness theorems
-and induction rules from a very simple description of the new type
+package of \HOL\ automates such chores. It generates and proves
+freeness theorems and induction rules, as well as theorems for
+recursion and case combinators from a very simple description of the new type
provided by the user.
@@ -1593,76 +1593,168 @@
The general \HOL\ \texttt{datatype} definition is of the following form:
\[
-\mathtt{datatype}~(\alpha@1, \dots, \alpha@n) \, t ~=~
-C@1~\tau@{11}~\dots~\tau@{1k@1} ~\mid~ \dots ~\mid~
-C@m~\tau@{m1}~\dots~\tau@{mk@m}
+\begin{array}{llcl}
+\mathtt{datatype} & (\alpha@1,\ldots,\alpha@h)t@1 & = &
+ C^1@1~\tau^1@{1,1}~\ldots~\tau^1@{1,m^1@1} ~\mid~ \ldots ~\mid~
+ C^1@{k@1}~\tau^1@{k@1,1}~\ldots~\tau^1@{k@1,m^1@{k@1}} \\
+ & & \vdots \\
+\mathtt{and} & (\alpha@1,\ldots,\alpha@h)t@n & = &
+ C^n@1~\tau^n@{1,1}~\ldots~\tau^n@{1,m^n@1} ~\mid~ \ldots ~\mid~
+ C^n@{k@n}~\tau^n@{k@n,1}~\ldots~\tau^n@{k@n,m^n@{k@n}}
+\end{array}
\]
-where $\alpha@i$ are type variables, $C@i$ are distinct constructor
-names and $\tau@{ij}$ are types. The latter may be one of the
-following:
+where $\alpha@i$ are type variables, $C^j@i$ are distinct constructor
+names and $\tau^j@{i,i'}$ are {\em admissible} types containing at
+most the type variables $\alpha@1, \ldots, \alpha@h$. A type $\tau$
+occurring in a \texttt{datatype} definition is {\em admissible} if
\begin{itemize}
-\item type variables $\alpha@1, \dots, \alpha@n$,
+\item $\tau$ is non-recursive, i.e. $\tau$ does not contain any of the
+newly defined type constructors $t@1,\ldots,t@n$, or
+\item $\tau = (\alpha@1,\ldots,\alpha@h)t@{j'}$ where $1 \leq j' \leq n$, or
+\item $\tau = (\tau'@1,\ldots,\tau'@{h'})t'$, where $t'$ is
+the type constructor of an already existing datatype and $\tau'@1,\ldots,\tau'@{h'}$
+are admissible types.
+\end{itemize}
+If some $(\alpha@1,\ldots,\alpha@h)t@{j'}$ occurs in a type $\tau^j@{i,i'}$
+of the form
+\[
+(\ldots,\ldots ~ (\alpha@1,\ldots,\alpha@h)t@{j'} ~ \ldots,\ldots)t'
+\]
+this is called a {\em nested} occurrence. A very simple example of a datatype
+is the type {\tt list}, which can be defined by
+\begin{ttbox}
+datatype 'a list = Nil
+ | Cons 'a ('a list)
+\end{ttbox}
+Arithmetic expressions {\tt aexp} and boolean expressions {\tt bexp} can be modelled
+by the mutually recursive datatype definition
+\begin{ttbox}
+datatype 'a aexp = If_then_else ('a bexp) ('a aexp) ('a aexp)
+ | Sum ('a aexp) ('a aexp)
+ | Diff ('a aexp) ('a aexp)
+ | Var 'a
+ | Num nat
+and 'a bexp = Less ('a aexp) ('a aexp)
+ | And ('a bexp) ('a bexp)
+ | Or ('a bexp) ('a bexp)
+\end{ttbox}
+The datatype {\tt term}, which is defined by
+\begin{ttbox}
+datatype ('a, 'b) term = Var 'a
+ | App 'b ((('a, 'b) term) list)
+\end{ttbox}
+is an example for a datatype with nested recursion.
-\item types $(\beta@1, \dots, \beta@l) \, t'$ where $t'$ is a
- previously declared type constructor or type synonym and $\{\beta@1,
- \dots, \beta@l\} \subseteq \{\alpha@1, \dots, \alpha@n\}$,
-
-\item the newly defined type $(\alpha@1, \dots, \alpha@n) \, t$.
-\end{itemize}
-Recursive occurences of $(\alpha@1, \dots, \alpha@n) \, t$ are quite
-restricted. To ensure that the new type is non-empty, at least one
-constructor must consist of only non-recursive type components. If
-you would like one of the $\tau@{ij}$ to be a complex type expression
-$\tau$ you need to declare a new type synonym $syn = \tau$ first and
-use $syn$ in place of $\tau$. Of course this does not work if $\tau$
-mentions the recursive type itself, thus ruling out problematic cases
-like $\mathtt{datatype}~ t ~=~ C \, (t \To t)$, but also unproblematic
-ones like $\mathtt{datatype}~ t ~=~ C \, (t~list)$.
+Types in HOL must be nonempty. Each of the new datatypes
+$(\alpha@1,\ldots,\alpha@h)t@j$ with $1 \le j \le n$ is nonempty iff
+it has a constructor $C^j@i$ with the following property: For all
+argument types $\tau^j@{i,i'}$ of the form $(\alpha@1,\ldots,\alpha@h)t@{j'}$
+the datatype $(\alpha@1,\ldots,\alpha@h)t@{j'}$ is nonempty.
+
+If there are no nested occurrences of the newly defined datatypes,
+obviously at least one of the newly defined datatypes
+$(\alpha@1,\ldots,\alpha@h)t@j$ must have a constructor $C^j@i$ without
+recursive arguments -- a so-called {\em base case} -- to ensure that
+the new types are nonempty. If there are nested occurrences, a datatype
+can even be nonempty without having a base case itself: Since {\tt list}
+is a nonempty datatype, {\tt datatype t = C (t list)} is nonempty
+as well.
The constructors are automatically defined as functions of their respective
type:
-\[ C@j :: [\tau@{j1},\dots,\tau@{jk@j}] \To (\alpha@1,\dots,\alpha@n)t \]
+\[ C^j@i :: [\tau^j@{i,1},\dots,\tau^j@{i,m^j@i}] \To (\alpha@1,\dots,\alpha@h)t@j \]
These functions have certain {\em freeness} properties --- they are
distinct:
\[
-C@i~x@1~\dots~x@{k@i} \neq C@j~y@1~\dots~y@{k@j} \qquad
-\mbox{for all}~ i \neq j.
+C^j@i~x@1~\dots~x@{m^j@i} \neq C^j@{i'}~y@1~\dots~y@{m^j@{i'}} \qquad
+\mbox{for all}~ i \neq i'.
\]
and they are injective:
\[
-(C@j~x@1~\dots~x@{k@j} = C@j~y@1~\dots~y@{k@j}) =
-(x@1 = y@1 \land \dots \land x@{k@j} = y@{k@j})
+(C^j@i~x@1~\dots~x@{m^j@i} = C^j@i~y@1~\dots~y@{m^j@i}) =
+(x@1 = y@1 \land \dots \land x@{m^j@i} = y@{m^j@i})
\]
Because the number of inequalities is quadratic in the number of
constructors, a different representation is used if there are $7$ or
more of them. In that case every constructor term is mapped to a
natural number:
\[
-t_ord \, (C@i \, x@1 \, \dots \, x@{k@i}) = i - 1
+t@j_ord \, (C^j@i \, x@1 \, \dots \, x@{m^j@i}) = i - 1
\]
Then distinctness of constructor terms is expressed by:
\[
-t_ord \, x \neq t_ord \, y \Imp x \neq y.
+t@j_ord \, x \neq t@j_ord \, y \Imp x \neq y.
\]
-\medskip Generally, the following structural induction rule is
-provided:
+\medskip For datatypes without nested recursion, the following
+structural induction rule is provided:
+\[
+\infer{P@1~x@1 \wedge \dots \wedge P@n~x@n}
+ {\begin{array}{lcl}
+ \Forall x@1 \dots x@{m^1@1}.
+ \List{P@{s^1@{1,1}}~x@{r^1@{1,1}}; \dots;
+ P@{s^1@{1,l^1@1}}~x@{r^1@{1,l^1@1}}} & \Imp &
+ P@1~\left(C^1@1~x@1~\dots~x@{m^1@1}\right) \\
+ & \vdots \\
+ \Forall x@1 \dots x@{m^1@{k@1}}.
+ \List{P@{s^1@{k@1,1}}~x@{r^1@{k@1,1}}; \dots;
+ P@{s^1@{k@1,l^1@{k@1}}}~x@{r^1@{k@1,l^1@{k@1}}}} & \Imp &
+ P@1~\left(C^1@{k@1}~x@1~\ldots~x@{m^1@{k@1}}\right) \\
+ & \vdots \\
+ \Forall x@1 \dots x@{m^n@1}.
+ \List{P@{s^n@{1,1}}~x@{r^n@{1,1}}; \dots;
+ P@{s^n@{1,l^n@1}}~x@{r^n@{1,l^n@1}}} & \Imp &
+ P@n~\left(C^n@1~x@1~\ldots~x@{m^n@1}\right) \\
+ & \vdots \\
+ \Forall x@1 \dots x@{m^n@{k@n}}.
+ \List{P@{s^n@{k@n,1}}~x@{r^n@{k@n,1}}; \dots
+ P@{s^n@{k@n,l^n@{k@n}}}~x@{r^n@{k@n,l^n@{k@n}}}} & \Imp &
+ P@n~\left(C^n@{k@n}~x@1~\ldots~x@{m^n@{k@n}}\right)
+ \end{array}}
+\]
+where
\[
-\infer{P \, x}
-{\begin{array}{lcl}
-\Forall x@1\dots x@{k@1}.
- \List{P~x@{r@{11}}; \dots; P~x@{r@{1l@1}}} &
- \Imp & P \, (C@1~x@1~\dots~x@{k@1}) \\
- & \vdots & \\
-\Forall x@1\dots x@{k@m}.
- \List{P~x@{r@{m1}}; \dots; P~x@{r@{ml@m}}} &
- \Imp & P \, (C@m~x@1~\dots~x@{k@m})
-\end{array}}
+\begin{array}{rcl}
+Rec^j@i & := &
+ \left\{\left(r^j@{i,1},s^j@{i,1}\right),\ldots,
+ \left(r^j@{i,l^j@i},s^j@{i,l^j@i}\right)\right\} = \\[2ex]
+&& \left\{(i',i'')~\left|~
+ 1\leq i' \leq m^j@i \wedge 1 \leq i'' \leq n \wedge
+ \tau^j@{i,i'} = (\alpha@1,\ldots,\alpha@h)t@{i''}\right.\right\}
+\end{array}
\]
-where $\{r@{j1},\dots,r@{jl@j}\} = \{i \in \{1,\dots k@j\} ~\mid~ \tau@{ji}
-= (\alpha@1,\dots,\alpha@n)t \} =: Rec@j$, i.e.\ the property $P$ can be
-assumed for all arguments of the recursive type.
+i.e.\ the properties $P@j$ can be assumed for all recursive arguments. For
+datatypes with nested recursion such as {\tt term}, things are a bit more
+complicated. Isabelle's datatype package unfolds the definition
+\begin{ttbox}
+datatype ('a, 'b) term = Var 'a
+ | App 'b ((('a, 'b) term) list)
+\end{ttbox}
+to the equivalent definition
+\begin{ttbox}
+datatype ('a, 'b) term = Var
+ | App 'b (('a, 'b) term_list)
+and ('a, 'b) term_list = Nil'
+ | Cons' (('a,'b) term) (('a,'b) term_list)
+\end{ttbox}
+having no nestings. However, note that the type {\tt ('a,'b) term_list}
+and the constructors {\tt Nil'} and {\tt Cons'} are not really introduced by the datatype
+package. Instead, you can simply use the -- isomorphic -- type {\tt (('a, 'b) term) list}
+and the constructors {\tt Nil} and {\tt Cons}. Thus, the structural induction rule
+for {\tt term} has the form
+\[
+\infer{P@1~x@1 \wedge P@2~x@2}
+ {\begin{array}{l}
+ \Forall x.~P@1~(\mathtt{Var}~x) \\
+ \Forall x@1~x@2.~P@2~x@2 \Imp P@1~(\mathtt{App}~x@1~x@2) \\
+ P@2~\mathtt{Nil} \\
+ \Forall x@1~x@2. \List{P@1~x@1; P@2~x@2} \Imp P@2~(\mathtt{Cons}~x@1~x@2)
+ \end{array}}
+\]
+Note that there are two predicates $P@1$ and $P@2$, one for the type {\tt ('a,'b) term}
+and one for the type {\tt (('a, 'b) term) list}.
+\medskip
For convenience, the following additional constructions are predefined for
each datatype.
@@ -1671,12 +1763,12 @@
The type comes with an \ML-like \texttt{case}-construct:
\[
\begin{array}{rrcl}
-\mbox{\tt case}~e~\mbox{\tt of} & C@1~x@{11}~\dots~x@{1k@1} & \To & e@1 \\
+\mbox{\tt case}~e~\mbox{\tt of} & C^j@1~x@{1,1}~\dots~x@{1,m^j@1} & \To & e@1 \\
\vdots \\
- \mid & C@m~x@{m1}~\dots~x@{mk@m} & \To & e@m
+ \mid & C^j@{k@j}~x@{k@j,1}~\dots~x@{k@j,m^j@{k@j}} & \To & e@{k@j}
\end{array}
\]
-where the $x@{ij}$ are either identifiers or nested tuple patterns as in
+where the $x@{i,j}$ are either identifiers or nested tuple patterns as in
\S\ref{subsec:prod-sum}.
\begin{warn}
In contrast to \ML, {\em all} constructors must be present, their order is
@@ -1685,18 +1777,18 @@
\end{warn}
To perform case distinction on a goal containing a \texttt{case}-construct,
-the theorem \texttt{split_}$t$\texttt{_case}\tdx{split_$t$_case} is provided:
+the theorem $t@j.$\texttt{split} is provided:
\[
\begin{array}{@{}rcl@{}}
-P(t_\mathtt{case}~f@1~\dots~f@m~e) &=&
-((\forall x@1 \dots x@{k@1}. e = C@1~x@1\dots x@{k@1} \to
- P(f@1~~x@1\dots x@{k@1})) \\
-&& ~\land~ \dots ~\land \\
-&&~ (\forall x@1 \dots x@{k@m}. e = C@m~x@1\dots x@{k@m} \to
- P(f@m~~x@1\dots x@{k@m})))
+P(t@j_\mathtt{case}~f@1~\dots~f@{k@j}~e) &\!\!\!=&
+\!\!\! ((\forall x@1 \dots x@{m^j@1}. e = C^j@1~x@1\dots x@{m^j@1} \to
+ P(f@1~x@1\dots x@{m^j@1})) \\
+&&\!\!\! ~\land~ \dots ~\land \\
+&&~\!\!\! (\forall x@1 \dots x@{m^j@{k@j}}. e = C^j@{k@j}~x@1\dots x@{m^j@{k@j}} \to
+ P(f@{k@j}~x@1\dots x@{m^j@{k@j}})))
\end{array}
\]
-where $t$\texttt{_case} is the internal name of the \texttt{case}-construct.
+where $t@j$\texttt{_case} is the internal name of the \texttt{case}-construct.
This theorem can be added to a simpset via \ttindex{addsplits}
(see~\S\ref{subsec:HOL:case:splitting}).
@@ -1706,35 +1798,41 @@
$\alpha\To nat$. Each datatype defines a particular instance of \texttt{size}
according to the following scheme:
\[
-size(C@j~x@{j1}~\dots~x@{jk@1}) =
+size(C^j@i~x@1~\dots~x@{m^j@i}) = \!
\left\{
\begin{array}{ll}
-0 & \mbox{if $Rec@j = \emptyset$} \\
-size(x@{r@{j1}}) + \cdots + size(x@{r@{jl@j}}) + 1 &
- \mbox{if $Rec@j = \{r@{j1},\dots,r@{jl@j}\}$}
+0 & \!\mbox{if $Rec^j@i = \emptyset$} \\
+\!\!\begin{array}{l}
+size~x@{r^j@{i,1}} + \cdots \\
+\cdots + size~x@{r^j@{i,l^j@i}} + 1
+\end{array} &
+ \!\mbox{if $Rec^j@i = \left\{\left(r^j@{i,1},s^j@{i,1}\right),\ldots,
+ \left(r^j@{i,l^j@i},s^j@{i,l^j@i}\right)\right\}$}
\end{array}
\right.
\]
-where $Rec@j$ is defined above. Viewing datatypes as generalized trees, the
+where $Rec^j@i$ is defined above. Viewing datatypes as generalized trees, the
size of a leaf is 0 and the size of a node is the sum of the sizes of its
subtrees $+1$.
\subsection{Defining datatypes}
-A datatype is defined in a theory definition file using the keyword
+Datatypes are defined in a theory definition file using the keyword
{\tt datatype}. The definition following this must conform to the
syntax of {\em typedecl} specified in Fig.~\ref{datatype-grammar} and
must obey the rules in the previous section. As a result the theory is
-extended with the new type, the constructors, and the theorems listed
+extended with the new types, the constructors, and the theorems listed
in the previous section.
\begin{figure}
\begin{rail}
-typedecl : typevarlist id '=' (cons + '|')
+typedecl : ( type '=' (cons + '|') ) + 'and'
+ ;
+type : typevarlist id ( () | '(' infix ')' )
;
-cons : name (typ *) ( () | mixfix )
+cons : name (argtype *) ( () | ( '(' mixfix ')' ) )
;
-typ : id | tid | ('(' typevarlist id ')')
+argtype : id | tid | ('(' typevarlist id ')')
;
\end{rail}
\caption{Syntax of datatype declarations}
@@ -1743,30 +1841,34 @@
\begin{warn}
Every theory containing a datatype declaration must be based, directly or
- indirectly, on the theory \texttt{Arith}, if necessary by including it
+ indirectly, on the theory \texttt{Datatype}, if necessary by including it
explicitly as a parent.
\end{warn}
-Most of the theorems about the datatype become part of the default simpset
+Most of the theorems about the datatypes become part of the default simpset
and you never need to see them again because the simplifier applies them
automatically. Only induction is invoked by hand:
\begin{ttdescription}
\item[\ttindexbold{induct_tac} {\tt"}$x${\tt"} $i$]
applies structural induction on variable $x$ to subgoal $i$, provided the
- type of $x$ is a datatype or type \tydx{nat}.
+ type of $x$ is a datatype.
+\item[\ttindexbold{mutual_induct_tac} {\tt["}$x@1${\tt",}$\ldots${\tt,"}$x@n${\tt"]} $i$]
+ applies simultaneous structural induction on the variables $x@1,\ldots,x@n$ to subgoal $i$.
+ This is needed to prove properties of mutually recursive datatypes such as {\tt aexp} and
+ {\tt bexp} or datatypes with nested recursion such as {\tt term}.
\end{ttdescription}
In some cases, induction is overkill and a case distinction over all
constructors of the datatype suffices:
\begin{ttdescription}
\item[\ttindexbold{exhaust_tac} {\tt"}$u${\tt"} $i$]
performs an exhaustive case analysis for the term $u$ whose type
- must be a datatype or type \tydx{nat}. If the datatype has $n$ constructors
- $C@1$, \dots $C@n$, subgoal $i$ is replaced by $n$ new subgoals which
- contain the additional assumption $u = C@j~x@1~\dots~x@{k@j}$ for
- $j=1$, $\dots$,~$n$.
+ must be a datatype. If the datatype has $k@j$ constructors
+ $C^j@1$, \dots $C^j@{k@j}$, subgoal $i$ is replaced by $k@j$ new subgoals which
+ contain the additional assumption $u = C^j@{i'}~x@1~\dots~x@{m^j@{i'}}$ for
+ $i'=1$, $\dots$,~$k@j$.
\end{ttdescription}
\begin{warn}
- Induction is only allowed on a free variable that should not occur among
+ Induction is only allowed on free variables that should not occur among
the premises of the subgoal. Exhaustion works for arbitrary terms.
\end{warn}
\bigskip
@@ -1781,15 +1883,40 @@
val distinct : thm list
val inject : thm list
val induct : thm
+val exhaust : thm
val cases : thm list
+val split : thm
+val split_asm : thm
+val recs : thm list
+val size : thm list
val simps : thm list
-val induct_tac : string -> int -> tactic
\end{ttbox}
-{\tt distinct}, \texttt{inject} and \texttt{induct} contain the theorems
+{\tt distinct}, \texttt{inject}, \texttt{induct}, {\tt size}
+and {\tt split} contain the theorems
described above. For user convenience, \texttt{distinct} contains
inequalities in both directions. The reduction rules of the {\tt
case}-construct are in \texttt{cases}. All theorems from {\tt
distinct}, \texttt{inject} and \texttt{cases} are combined in \texttt{simps}.
+In case of mutually recursive datatypes, {\tt recs}, {\tt size}, {\tt induct}
+and {\tt simps} are contained in a separate structure named $t@1_\ldots_t@n$.
+
+\subsection{Representing types as datatypes}
+For technical reasons, some types such as {\tt nat}, {\tt *}, {\tt +},
+{\tt bool} and {\tt unit} are not directly defined in a {\tt datatype}
+section. To be able to use the tactics {\tt induct_tac} and
+{\tt exhaust_tac} and to define functions by primitive recursion
+on these types, they have to be represented as datatypes.
+This is done by specifying an induction rule, as well as theorems
+stating the distinctness and injectivity of constructors
+in a {\tt rep_datatype} section, e.g.
+\begin{ttbox}
+rep_datatype nat
+ distinct Suc_not_Zero, Zero_not_Suc
+ inject Suc_Suc_eq
+ induct nat_induct
+\end{ttbox}
+The datatype package automatically derives additional theorems
+for recursion and case combinators from these rules.
\subsection{Examples}
@@ -1798,9 +1925,9 @@
We want to define the type $\alpha~mylist$.\footnote{This is just an
example, there is already a list type in \HOL, of course.} To do
this we have to build a new theory that contains the type definition.
-We start from the theory of arithmetic.
+We start from the theory \texttt{Datatype}.
\begin{ttbox}
-MyList = Arith +
+MyList = Datatype +
datatype 'a mylist = Nil | Cons 'a ('a mylist)
end
\end{ttbox}
@@ -1859,7 +1986,7 @@
notation \verb|#| for \texttt{Cons}. To do this we simply add mixfix
annotations after the constructor declarations as follows:
\begin{ttbox}
-MyList = Arith +
+MyList = Datatype +
datatype 'a mylist =
Nil ("[]") |
Cons 'a ('a mylist) (infixr "#" 70)
@@ -1877,8 +2004,7 @@
datatype days = Mon | Tue | Wed | Thu | Fri | Sat | Sun
end
\end{ttbox}
-Because there are more than 6 constructors, the theory must be based
-on \texttt{Arith}. Inequality is expressed via a function
+Because there are more than 6 constructors, inequality is expressed via a function
\verb|days_ord|. The theorem \verb|Mon ~= Tue| is not directly
contained among the distinctness theorems, but the simplifier can
prove it thanks to rewrite rules inherited from theory \texttt{Arith}:
@@ -1950,7 +2076,7 @@
\begin{ttbox}
Append = MyList +
consts app :: ['a mylist, 'a mylist] => 'a mylist
-primrec app MyList.mylist
+primrec
"app [] ys = ys"
"app (x#xs) ys = x#app xs ys"
end
@@ -1958,7 +2084,7 @@
Isabelle will now check that the two rules do indeed form a primitive
recursive definition, preserving consistency. For example
\begin{ttbox}
-primrec app MyList.mylist
+primrec
"app [] ys = us"
\end{ttbox}
is rejected with an error message \texttt{Extra variables on rhs}.
@@ -1967,37 +2093,28 @@
The general form of a primitive recursive definition is
\begin{ttbox}
-primrec {\it function} {\it type}
+primrec
{\it reduction rules}
\end{ttbox}
-where
-\begin{itemize}
-\item \textit{function} is the name of the function, either as an \textit{id}
- or a \textit{string}.
-\item \textit{type} is the name of the datatype, either as an \textit{id} or
- in the long form \texttt{$T$. $t$} ($T$ is the name of the theory
- where the datatype has been declared, $t$ the name of the datatype).
- The long form is required if the \texttt{datatype} and the {\tt
- primrec} sections are in different theories.
-\item \textit{reduction rules} specify one or more equations of the form
- \[ f \, x@1 \, \dots \, x@m \, (C \, y@1 \, \dots \, y@k) \, z@1 \,
- \dots \, z@n = r \] such that $C$ is a constructor of the datatype,
- $r$ contains only the free variables on the left-hand side, and all
- recursive calls in $r$ are of the form $f \, \dots \, y@i \, \dots$
- for some $i$. There must be exactly one reduction rule for each
- constructor. The order is immaterial. Also note that all reduction
- rules are added to the default simpset!
+where \textit{reduction rules} specify one or more equations of the form
+\[ f \, x@1 \, \dots \, x@m \, (C \, y@1 \, \dots \, y@k) \, z@1 \,
+\dots \, z@n = r \] such that $C$ is a constructor of the datatype,
+$r$ contains only the free variables on the left-hand side, and all
+recursive calls in $r$ are of the form $f \, \dots \, y@i \, \dots$
+for some $i$. There must be at most one reduction rule for each
+constructor. The order is immaterial. For missing constructors,
+the function is defined to return an arbitrary value.
+Also note that all reduction rules are added to the default simpset.
- If you would like to refer to some rule by name, then you must prefix
- \emph{each} rule with an identifier. These identifiers, like those in the
- \texttt{rules} section of a theory, will be visible at the \ML\ level.
-\end{itemize}
+If you would like to refer to some rule by name, then you must prefix
+the rule with an identifier. These identifiers, like those in the
+\texttt{rules} section of a theory, will be visible at the \ML\ level.
The primitive recursive function can have infix or mixfix syntax:
\begin{ttbox}\underscoreon
Append = MyList +
consts "@" :: ['a mylist, 'a mylist] => 'a mylist (infixr 60)
-primrec "op @" MyList.mylist
+primrec
"[] @ ys = ys"
"(x#xs) @ ys = x#(xs @ ys)"
end
@@ -2011,6 +2128,102 @@
by (ALLGOALS Asm\_simp\_tac);
\end{ttbox}
+\subsubsection{Example: Evaluation of expressions}
+Using mutual primitive recursion, we can define evaluation functions {\tt eval_aexp}
+and {\tt eval_bexp} for the datatypes of arithmetic and boolean expressions mentioned in
+\S\ref{subsec:datatype:basics}:
+\begin{ttbox}
+consts
+ eval_aexp :: "['a => nat, 'a aexp] => nat"
+ eval_bexp :: "['a => nat, 'a bexp] => bool"
+
+primrec
+ "eval_aexp env (If_then_else b a1 a2) =
+ (if eval_bexp env b then eval_aexp env a1 else eval_aexp env a2)"
+ "eval_aexp env (Sum a1 a2) = eval_aexp env a1 + eval_aexp env a2"
+ "eval_aexp env (Diff a1 a2) = eval_aexp env a1 - eval_aexp env a2"
+ "eval_aexp env (Var v) = env v"
+ "eval_aexp env (Num n) = n"
+
+ "eval_bexp env (Less a1 a2) = (eval_aexp env a1 < eval_aexp env a2)"
+ "eval_bexp env (And b1 b2) = (eval_bexp env b1 & eval_bexp env b2)"
+ "eval_bexp env (Or b1 b2) = (eval_bexp env b1 & eval_bexp env b2)"
+\end{ttbox}
+Since the value of an expression depends on the value of its variables,
+the functions {\tt eval_aexp} and {\tt eval_bexp} take an additional
+parameter, an {\em environment} of type {\tt 'a => nat}, which maps
+variables to their values.
+
+Similarly, we may define substitution functions {\tt subst_aexp}
+and {\tt subst_bexp} for expressions: The mapping {\tt f} of type
+{\tt 'a => 'a aexp} given as a parameter is lifted canonically
+on the types {'a aexp} and {'a bexp}:
+\begin{ttbox}
+consts
+ subst_aexp :: "['a => 'b aexp, 'a aexp] => 'b aexp"
+ subst_bexp :: "['a => 'b aexp, 'a bexp] => 'b bexp"
+
+primrec
+ "subst_aexp f (If_then_else b a1 a2) =
+ If_then_else (subst_bexp f b) (subst_aexp f a1) (subst_aexp f a2)"
+ "subst_aexp f (Sum a1 a2) = Sum (subst_aexp f a1) (subst_aexp f a2)"
+ "subst_aexp f (Diff a1 a2) = Diff (subst_aexp f a1) (subst_aexp f a2)"
+ "subst_aexp f (Var v) = f v"
+ "subst_aexp f (Num n) = Num n"
+
+ "subst_bexp f (Less a1 a2) = Less (subst_aexp f a1) (subst_aexp f a2)"
+ "subst_bexp f (And b1 b2) = And (subst_bexp f b1) (subst_bexp f b2)"
+ "subst_bexp f (Or b1 b2) = Or (subst_bexp f b1) (subst_bexp f b2)"
+\end{ttbox}
+In textbooks about semantics one often finds {\em substitution theorems},
+which express the relationship between substitution and evaluation. For
+{'a aexp} and {'a bexp}, we can prove such a theorem by mutual induction,
+followed by simplification:
+\begin{ttbox}
+Goal
+ "eval_aexp env (subst_aexp (Var(v := a')) a) =
+ eval_aexp (env(v := eval_aexp env a')) a &
+ eval_bexp env (subst_bexp (Var(v := a')) b) =
+ eval_bexp (env(v := eval_aexp env a')) b";
+by (mutual_induct_tac ["a","b"] 1);
+by (ALLGOALS Asm_full_simp_tac);
+\end{ttbox}
+
+\subsubsection{Example: A substitution function for terms}
+Functions on datatypes with nested recursion, such as the type
+{\tt term} mentioned in \S\ref{subsec:datatype:basics}, are
+also defined by mutual primitive recursion. A substitution
+function {\tt subst_term} on type {\tt term}, similar to the functions
+{\tt subst_aexp} and {\tt subst_bexp} described above, can
+be defined as follows:
+\begin{ttbox}
+consts
+ subst_term :: "['a => ('a, 'b) term, ('a, 'b) term] => ('a, 'b) term"
+ subst_term_list ::
+ "['a => ('a, 'b) term, ('a, 'b) term list] => ('a, 'b) term list"
+
+primrec
+ "subst_term f (Var a) = f a"
+ "subst_term f (App b ts) = App b (subst_term_list f ts)"
+
+ "subst_term_list f [] = []"
+ "subst_term_list f (t # ts) =
+ subst_term f t # subst_term_list f ts"
+\end{ttbox}
+Since datatypes with nested recursion are unfolded, the recursion scheme
+follows the structure of the unfolded definition of type {\tt term}
+shown in \S\ref{subsec:datatype:basics}. To prove properties of this
+substitution function, mutual induction is needed:
+\begin{ttbox}
+Goal
+ "(subst_term ((subst_term f1) o f2) t) =
+ (subst_term f1 (subst_term f2 t)) &
+ (subst_term_list ((subst_term f1) o f2) ts) =
+ (subst_term_list f1 (subst_term_list f2 ts))";
+by (mutual_induct_tac ["t", "ts"] 1);
+by (ALLGOALS Asm_full_simp_tac);
+\end{ttbox}
+
\index{recursion!primitive|)}
\index{*primrec|)}
@@ -2219,8 +2432,6 @@
Many of the result structure's components have been discussed in the paper;
others are self-explanatory.
\begin{description}
-\item[\tt thy] is the new theory containing the recursive sets.
-
\item[\tt defs] is the list of definitions of the recursive sets.
\item[\tt mono] is a monotonicity theorem for the fixedpoint operator.
@@ -2232,15 +2443,16 @@
the recursive sets. The rules are also available individually, using the
names given them in the theory file.
-\item[\tt elim] is the elimination rule.
+\item[\tt elims] is the list of elimination rule.
+
+\item[\tt elim] is the head of the list {\tt elims}.
\item[\tt mk_cases] is a function to create simplified instances of {\tt
elim}, using freeness reasoning on some underlying datatype.
\end{description}
-For an inductive definition, the result structure contains two induction
-rules, \texttt{induct} and \verb|mutual_induct|. (To save storage, the latter
-rule is just \texttt{True} unless more than one set is being defined.) For a
+For an inductive definition, the result structure contains the
+rule \texttt{induct}. For a
coinductive definition, it contains the rule \verb|coinduct|.
Figure~\ref{def-result-fig} summarizes the two result signatures,
@@ -2249,16 +2461,15 @@
\begin{figure}
\begin{ttbox}
sig
-val thy : theory
val defs : thm list
val mono : thm
val unfold : thm
val intrs : thm list
+val elims : thm list
val elim : thm
val mk_cases : thm list -> string -> thm
{\it(Inductive definitions only)}
val induct : thm
-val mutual_induct: thm
{\it(Coinductive definitions only)}
val coinduct : thm
end
@@ -2279,11 +2490,7 @@
{\tt coinductive}.
The \texttt{monos} and \texttt{con_defs} sections are optional. If present,
-each is specified as a string, which must be a valid \ML{} expression
-of type \texttt{thm list}. It is simply inserted into the generated
-\ML{} file that is generated from the theory definition; if it is
-ill-formed, it will trigger ML error messages. You can then inspect
-the file on your directory.
+each is specified by a list of identifiers.
\begin{itemize}
\item The \textit{inductive sets} are specified by one or more strings.
@@ -2309,9 +2516,6 @@
\item The names of the recursive sets must be alphanumeric
identifiers.
-\item Side-conditions must not be conjunctions. However, an introduction rule
-may contain any number of side-conditions.
-
\item Side-conditions of the form $x=t$, where the variable~$x$ does not
occur in~$t$, will be substituted through the rule \verb|mutual_induct|.
\end{itemize}
@@ -2347,7 +2551,7 @@
inductive "acc r"
intrs
pred "pred a r: Pow(acc r) ==> a: acc r"
- monos "[Pow_mono]"
+ monos Pow_mono
end
\end{ttbox}
The \HOL{} distribution contains many other inductive definitions.
@@ -2394,7 +2598,7 @@
with nested recursion.
Directory \texttt{HOL/Induct} presents simple examples of (co)inductive
-definitions.
+definitions and datatypes.
\begin{itemize}
\item Theory \texttt{PropLog} proves the soundness and completeness of
classical propositional logic, given a truth table semantics. The only
@@ -2402,11 +2606,10 @@
set of theorems defined inductively. A similar proof in \ZF{} is
described elsewhere~\cite{paulson-set-II}.
-\item Theory \texttt{Term} develops an experimental recursive type definition;
- the recursion goes through the type constructor~\tydx{list}.
+\item Theory \texttt{Term} defines the datatype {\tt term}.
-\item Theory \texttt{Simult} constructs mutually recursive sets of trees and
- forests, including induction and recursion rules.
+\item Theory \texttt{ABexp} defines arithmetic and boolean expressions
+ as mutually recursive datatypes.
\item The definition of lazy lists demonstrates methods for handling
infinite data structures and coinduction in higher-order
--- a/doc-src/Logics/logics.ind Fri Oct 23 16:11:01 1998 +0200
+++ b/doc-src/Logics/logics.ind Fri Oct 23 16:27:56 1998 +0200
@@ -3,64 +3,64 @@
\item {\tt !} symbol, 60, 62, 69, 70, 82
\item {\tt[]} symbol, 82
\item {\tt\#} symbol, 82
- \item {\tt\#*} symbol, 48, 128
- \item {\tt\#+} symbol, 48, 128
+ \item {\tt\#*} symbol, 48, 133
+ \item {\tt\#+} symbol, 48, 133
\item {\tt\#-} symbol, 48
- \item {\tt\&} symbol, 7, 60, 105
- \item {\tt *} symbol, 27, 61, 79, 119
+ \item {\tt\&} symbol, 7, 60, 110
+ \item {\tt *} symbol, 27, 61, 79, 124
\item {\tt *} type, 77
- \item {\tt +} symbol, 44, 61, 79, 119
+ \item {\tt +} symbol, 44, 61, 79, 124
\item {\tt +} type, 77
- \item {\tt -} symbol, 26, 61, 79, 128
- \item {\tt -->} symbol, 7, 60, 105, 119
+ \item {\tt -} symbol, 26, 61, 79, 133
+ \item {\tt -->} symbol, 7, 60, 110, 124
\item {\tt ->} symbol, 27
\item {\tt -``} symbol, 26
\item {\tt :} symbol, 26, 68
\item {\tt <} constant, 80
\item {\tt <} symbol, 79
- \item {\tt <->} symbol, 7, 105
+ \item {\tt <->} symbol, 7, 110
\item {\tt <=} constant, 80
\item {\tt <=} symbol, 26, 68
- \item {\tt =} symbol, 7, 60, 105, 119
+ \item {\tt =} symbol, 7, 60, 110, 124
\item {\tt ?} symbol, 60, 62, 69, 70
\item {\tt ?!} symbol, 60
\item {\tt\at} symbol, 60, 82
- \item {\tt `} symbol, 26, 119
+ \item {\tt `} symbol, 26, 124
\item {\tt ``} symbol, 26, 68
\item \verb'{}' symbol, 68
- \item {\tt |} symbol, 7, 60, 105
- \item {\tt |-|} symbol, 128
+ \item {\tt |} symbol, 7, 60, 110
+ \item {\tt |-|} symbol, 133
\indexspace
- \item {\tt 0} constant, 26, 79, 117
+ \item {\tt 0} constant, 26, 79, 122
\indexspace
- \item {\tt absdiff_def} theorem, 128
- \item {\tt add_assoc} theorem, 128
- \item {\tt add_commute} theorem, 128
- \item {\tt add_def} theorem, 48, 128
- \item {\tt add_inverse_diff} theorem, 128
- \item {\tt add_mp_tac}, \bold{126}
- \item {\tt add_mult_dist} theorem, 48, 128
- \item {\tt add_safes}, \bold{111}
- \item {\tt add_typing} theorem, 128
- \item {\tt add_unsafes}, \bold{111}
- \item {\tt addC0} theorem, 128
- \item {\tt addC_succ} theorem, 128
+ \item {\tt absdiff_def} theorem, 133
+ \item {\tt add_assoc} theorem, 133
+ \item {\tt add_commute} theorem, 133
+ \item {\tt add_def} theorem, 48, 133
+ \item {\tt add_inverse_diff} theorem, 133
+ \item {\tt add_mp_tac}, \bold{131}
+ \item {\tt add_mult_dist} theorem, 48, 133
+ \item {\tt add_safes}, \bold{116}
+ \item {\tt add_typing} theorem, 133
+ \item {\tt add_unsafes}, \bold{116}
+ \item {\tt addC0} theorem, 133
+ \item {\tt addC_succ} theorem, 133
\item {\tt Addsplits}, \bold{76}
- \item {\tt addsplits}, \bold{76}, 81, 87
- \item {\tt ALL} symbol, 7, 27, 60, 62, 69, 70, 105
- \item {\tt All} constant, 7, 60, 105
+ \item {\tt addsplits}, \bold{76}, 81, 90
+ \item {\tt ALL} symbol, 7, 27, 60, 62, 69, 70, 110
+ \item {\tt All} constant, 7, 60, 110
\item {\tt All_def} theorem, 64
\item {\tt all_dupE} theorem, 5, 9, 66
\item {\tt all_impE} theorem, 9
\item {\tt allE} theorem, 5, 9, 66
\item {\tt allI} theorem, 8, 66
- \item {\tt allL} theorem, 107, 111
- \item {\tt allL_thin} theorem, 108
- \item {\tt allR} theorem, 107
+ \item {\tt allL} theorem, 112, 116
+ \item {\tt allL_thin} theorem, 113
+ \item {\tt allR} theorem, 112
\item {\tt and_def} theorem, 43, 64
\item {\tt app_def} theorem, 50
\item {\tt apply_def} theorem, 32
@@ -70,10 +70,10 @@
\item {\tt apply_Pair} theorem, 40, 58
\item {\tt apply_type} theorem, 40
\item {\tt arg_cong} theorem, 65
- \item {\tt Arith} theory, 47, 80, 127
+ \item {\tt Arith} theory, 47, 80, 132
\item assumptions
\subitem contradictory, 16
- \subitem in {\CTT}, 116, 126
+ \subitem in {\CTT}, 121, 131
\indexspace
@@ -82,9 +82,9 @@
\item {\tt Ball_def} theorem, 31, 71
\item {\tt ballE} theorem, 33, 34, 72
\item {\tt ballI} theorem, 34, 72
- \item {\tt basic} theorem, 107
- \item {\tt basic_defs}, \bold{124}
- \item {\tt best_tac}, \bold{112}
+ \item {\tt basic} theorem, 112
+ \item {\tt basic_defs}, \bold{129}
+ \item {\tt best_tac}, \bold{117}
\item {\tt beta} theorem, 40, 41
\item {\tt Bex} constant, 26, 30, 68, 70
\item {\tt bex_cong} theorem, 33, 34
@@ -112,7 +112,7 @@
\indexspace
\item {\tt case} constant, 44
- \item {\tt case} symbol, 63, 80, 81, 87
+ \item {\tt case} symbol, 63, 80, 81, 90
\item {\tt case_def} theorem, 44
\item {\tt case_Inl} theorem, 44
\item {\tt case_Inr} theorem, 44
@@ -121,23 +121,23 @@
\item {\tt ccontr} theorem, 66
\item {\tt classical} theorem, 66
\item {\tt coinduct} theorem, 45
- \item {\tt coinductive}, 96--99
+ \item {\tt coinductive}, 101--104
\item {\tt Collect} constant, 26, 27, 30, 68, 70
\item {\tt Collect_def} theorem, 31
\item {\tt Collect_mem_eq} theorem, 70, 71
\item {\tt Collect_subset} theorem, 37
- \item {\tt CollectD} theorem, 72, 102
+ \item {\tt CollectD} theorem, 72, 107
\item {\tt CollectD1} theorem, 33, 35
\item {\tt CollectD2} theorem, 33, 35
\item {\tt CollectE} theorem, 33, 35, 72
- \item {\tt CollectI} theorem, 35, 72, 102
+ \item {\tt CollectI} theorem, 35, 72, 107
\item {\tt comp_assoc} theorem, 46
\item {\tt comp_bij} theorem, 46
\item {\tt comp_def} theorem, 46
\item {\tt comp_func} theorem, 46
\item {\tt comp_func_apply} theorem, 46
\item {\tt comp_inj} theorem, 46
- \item {\tt comp_rls}, \bold{124}
+ \item {\tt comp_rls}, \bold{129}
\item {\tt comp_surj} theorem, 46
\item {\tt comp_type} theorem, 46
\item {\tt Compl} constant, 68
@@ -158,12 +158,12 @@
\item {\tt conj_impE} theorem, 9, 10
\item {\tt conjE} theorem, 9, 65
\item {\tt conjI} theorem, 8, 65
- \item {\tt conjL} theorem, 107
- \item {\tt conjR} theorem, 107
+ \item {\tt conjL} theorem, 112
+ \item {\tt conjR} theorem, 112
\item {\tt conjunct1} theorem, 8, 65
\item {\tt conjunct2} theorem, 8, 65
- \item {\tt conL} theorem, 108
- \item {\tt conR} theorem, 108
+ \item {\tt conL} theorem, 113
+ \item {\tt conR} theorem, 113
\item {\tt cons} constant, 26, 27
\item {\tt cons_def} theorem, 32
\item {\tt Cons_iff} theorem, 50
@@ -172,38 +172,38 @@
\item {\tt ConsI} theorem, 50
\item {\tt consI1} theorem, 36
\item {\tt consI2} theorem, 36
- \item Constructive Type Theory, 116--138
- \item {\tt contr} constant, 117
+ \item Constructive Type Theory, 121--143
+ \item {\tt contr} constant, 122
\item {\tt converse} constant, 26, 40
\item {\tt converse_def} theorem, 32
- \item {\tt could_res}, \bold{110}
- \item {\tt could_resolve_seq}, \bold{110}
- \item {\tt CTT} theory, 1, 116
+ \item {\tt could_res}, \bold{115}
+ \item {\tt could_resolve_seq}, \bold{115}
+ \item {\tt CTT} theory, 1, 121
\item {\tt Cube} theory, 1
- \item {\tt cut} theorem, 107
+ \item {\tt cut} theorem, 112
\item {\tt cut_facts_tac}, 19
- \item {\tt cutL_tac}, \bold{109}
- \item {\tt cutR_tac}, \bold{109}
+ \item {\tt cutL_tac}, \bold{114}
+ \item {\tt cutR_tac}, \bold{114}
\indexspace
- \item {\tt datatype}, 86--91
+ \item {\tt datatype}, 87--94
\item {\tt Delsplits}, \bold{76}
\item {\tt delsplits}, \bold{76}
- \item {\tt diff_0_eq_0} theorem, 128
+ \item {\tt diff_0_eq_0} theorem, 133
\item {\tt Diff_cancel} theorem, 42
\item {\tt Diff_contains} theorem, 37
\item {\tt Diff_def} theorem, 31
- \item {\tt diff_def} theorem, 48, 128
+ \item {\tt diff_def} theorem, 48, 133
\item {\tt Diff_disjoint} theorem, 42
\item {\tt Diff_Int} theorem, 42
\item {\tt Diff_partition} theorem, 42
- \item {\tt diff_self_eq_0} theorem, 128
+ \item {\tt diff_self_eq_0} theorem, 133
\item {\tt Diff_subset} theorem, 37
- \item {\tt diff_succ_succ} theorem, 128
- \item {\tt diff_typing} theorem, 128
+ \item {\tt diff_succ_succ} theorem, 133
+ \item {\tt diff_typing} theorem, 133
\item {\tt Diff_Un} theorem, 42
- \item {\tt diffC0} theorem, 128
+ \item {\tt diffC0} theorem, 133
\item {\tt DiffD1} theorem, 36
\item {\tt DiffD2} theorem, 36
\item {\tt DiffE} theorem, 36
@@ -213,10 +213,10 @@
\item {\tt disjE} theorem, 8, 65
\item {\tt disjI1} theorem, 8, 65
\item {\tt disjI2} theorem, 8, 65
- \item {\tt disjL} theorem, 107
- \item {\tt disjR} theorem, 107
- \item {\tt div} symbol, 48, 79, 128
- \item {\tt div_def} theorem, 48, 128
+ \item {\tt disjL} theorem, 112
+ \item {\tt disjR} theorem, 112
+ \item {\tt div} symbol, 48, 79, 133
+ \item {\tt div_def} theorem, 48, 133
\item {\tt div_geq} theorem, 80
\item {\tt div_less} theorem, 80
\item {\tt Divides} theory, 80
@@ -234,28 +234,28 @@
\indexspace
- \item {\tt Elem} constant, 117
- \item {\tt elim_rls}, \bold{124}
- \item {\tt elimL_rls}, \bold{124}
+ \item {\tt Elem} constant, 122
+ \item {\tt elim_rls}, \bold{129}
+ \item {\tt elimL_rls}, \bold{129}
\item {\tt empty_def} theorem, 71
- \item {\tt empty_pack}, \bold{110}
+ \item {\tt empty_pack}, \bold{115}
\item {\tt empty_subsetI} theorem, 34
\item {\tt emptyE} theorem, 34, 73
\item {\tt Eps} constant, 60, 62
- \item {\tt Eq} constant, 117
- \item {\tt eq} constant, 117, 122
+ \item {\tt Eq} constant, 122
+ \item {\tt eq} constant, 122, 127
\item {\tt eq_mp_tac}, \bold{10}
- \item {\tt EqC} theorem, 123
- \item {\tt EqE} theorem, 123
- \item {\tt Eqelem} constant, 117
- \item {\tt EqF} theorem, 123
- \item {\tt EqFL} theorem, 123
- \item {\tt EqI} theorem, 123
- \item {\tt Eqtype} constant, 117
- \item {\tt equal_tac}, \bold{125}
- \item {\tt equal_types} theorem, 120
- \item {\tt equal_typesL} theorem, 120
- \item {\tt equalityCE} theorem, 70, 72, 102, 103
+ \item {\tt EqC} theorem, 128
+ \item {\tt EqE} theorem, 128
+ \item {\tt Eqelem} constant, 122
+ \item {\tt EqF} theorem, 128
+ \item {\tt EqFL} theorem, 128
+ \item {\tt EqI} theorem, 128
+ \item {\tt Eqtype} constant, 122
+ \item {\tt equal_tac}, \bold{130}
+ \item {\tt equal_types} theorem, 125
+ \item {\tt equal_typesL} theorem, 125
+ \item {\tt equalityCE} theorem, 70, 72, 107, 108
\item {\tt equalityD1} theorem, 34, 72
\item {\tt equalityD2} theorem, 34, 72
\item {\tt equalityE} theorem, 34, 72
@@ -264,8 +264,8 @@
\item {\tt equals0I} theorem, 34
\item {\tt eresolve_tac}, 16
\item {\tt eta} theorem, 40, 41
- \item {\tt EX} symbol, 7, 27, 60, 62, 69, 70, 105
- \item {\tt Ex} constant, 7, 60, 105
+ \item {\tt EX} symbol, 7, 27, 60, 62, 69, 70, 110
+ \item {\tt Ex} constant, 7, 60, 110
\item {\tt EX!} symbol, 7, 60
\item {\tt Ex1} constant, 7, 60
\item {\tt Ex1_def} theorem, 64
@@ -277,26 +277,26 @@
\item {\tt exCI} theorem, 11, 15, 66
\item {\tt excluded_middle} theorem, 11, 66
\item {\tt exE} theorem, 8, 66
- \item {\tt exhaust_tac}, \bold{89}
+ \item {\tt exhaust_tac}, \bold{92}
\item {\tt exI} theorem, 8, 66
- \item {\tt exL} theorem, 107
- \item {\tt Exp} theory, 100
- \item {\tt exR} theorem, 107, 111, 112
- \item {\tt exR_thin} theorem, 108, 112, 113
+ \item {\tt exL} theorem, 112
+ \item {\tt Exp} theory, 105
+ \item {\tt exR} theorem, 112, 116, 117
+ \item {\tt exR_thin} theorem, 113, 117, 118
\item {\tt ext} theorem, 63, 64
\item {\tt extension} theorem, 31
\indexspace
- \item {\tt F} constant, 117
- \item {\tt False} constant, 7, 60, 105
+ \item {\tt F} constant, 122
+ \item {\tt False} constant, 7, 60, 110
\item {\tt False_def} theorem, 64
\item {\tt FalseE} theorem, 8, 65
- \item {\tt FalseL} theorem, 107
- \item {\tt fast_tac}, \bold{112}
- \item {\tt FE} theorem, 123, 127
- \item {\tt FEL} theorem, 123
- \item {\tt FF} theorem, 123
+ \item {\tt FalseL} theorem, 112
+ \item {\tt fast_tac}, \bold{117}
+ \item {\tt FE} theorem, 128, 132
+ \item {\tt FEL} theorem, 128
+ \item {\tt FF} theorem, 128
\item {\tt field} constant, 26
\item {\tt field_def} theorem, 32
\item {\tt field_subset} theorem, 39
@@ -304,8 +304,8 @@
\item {\tt fieldE} theorem, 39
\item {\tt fieldI1} theorem, 39
\item {\tt fieldI2} theorem, 39
- \item {\tt filseq_resolve_tac}, \bold{110}
- \item {\tt filt_resolve_tac}, 110, 125
+ \item {\tt filseq_resolve_tac}, \bold{115}
+ \item {\tt filt_resolve_tac}, 115, 130
\item {\tt filter} constant, 82
\item {\tt Fin.consI} theorem, 49
\item {\tt Fin.emptyI} theorem, 49
@@ -318,18 +318,18 @@
\item {\tt Fixedpt} theory, 43
\item {\tt flat} constant, 50
\item {\tt flat_def} theorem, 50
- \item flex-flex constraints, 106
- \item {\tt FOL} theory, 1, 5, 11, 126
+ \item flex-flex constraints, 111
+ \item {\tt FOL} theory, 1, 5, 11, 131
\item {\tt FOL_cs}, \bold{11}
\item {\tt FOL_ss}, \bold{6}
\item {\tt foldl} constant, 82
- \item {\tt form_rls}, \bold{124}
- \item {\tt formL_rls}, \bold{124}
- \item {\tt forms_of_seq}, \bold{109}
+ \item {\tt form_rls}, \bold{129}
+ \item {\tt formL_rls}, \bold{129}
+ \item {\tt forms_of_seq}, \bold{114}
\item {\tt foundation} theorem, 31
- \item {\tt fst} constant, 26, 33, 77, 117, 122
+ \item {\tt fst} constant, 26, 33, 77, 122, 127
\item {\tt fst_conv} theorem, 38, 77
- \item {\tt fst_def} theorem, 32, 122
+ \item {\tt fst_def} theorem, 32, 127
\item {\tt Fun} theory, 75
\item {\textit {fun}} type, 61
\item {\tt fun_cong} theorem, 65
@@ -341,7 +341,7 @@
\item {\tt fun_is_rel} theorem, 40
\item {\tt fun_single} theorem, 41
\item function applications
- \subitem in \CTT, 119
+ \subitem in \CTT, 124
\subitem in \ZF, 26
\indexspace
@@ -356,8 +356,8 @@
\indexspace
- \item {\tt hd} constant, 82, 94
- \item higher-order logic, 59--103
+ \item {\tt hd} constant, 82, 99
+ \item higher-order logic, 59--108
\item {\tt HOL} theory, 1, 59
\item {\sc hol} system, 59, 62
\item {\tt HOL_basic_ss}, \bold{75}
@@ -365,12 +365,12 @@
\item {\tt HOL_quantifiers}, \bold{62}, 70
\item {\tt HOL_ss}, \bold{75}
\item {\tt HOLCF} theory, 1
- \item {\tt hyp_rew_tac}, \bold{126}
+ \item {\tt hyp_rew_tac}, \bold{131}
\item {\tt hyp_subst_tac}, 6, 75
\indexspace
- \item {\textit {i}} type, 25, 116
+ \item {\textit {i}} type, 25, 121
\item {\tt id} constant, 46
\item {\tt id_def} theorem, 46
\item {\tt If} constant, 60
@@ -380,15 +380,15 @@
\item {\tt if_P} theorem, 36, 66
\item {\tt ifE} theorem, 19
\item {\tt iff} theorem, 63, 64
- \item {\tt iff_def} theorem, 8, 107
+ \item {\tt iff_def} theorem, 8, 112
\item {\tt iff_impE} theorem, 9
\item {\tt iffCE} theorem, 11, 66, 70
\item {\tt iffD1} theorem, 9, 65
\item {\tt iffD2} theorem, 9, 65
\item {\tt iffE} theorem, 9, 65
\item {\tt iffI} theorem, 9, 19, 65
- \item {\tt iffL} theorem, 108, 114
- \item {\tt iffR} theorem, 108
+ \item {\tt iffL} theorem, 113, 119
+ \item {\tt iffR} theorem, 113
\item {\tt ifI} theorem, 19
\item {\tt IFOL} theory, 5
\item {\tt IFOL_ss}, \bold{6}
@@ -399,13 +399,13 @@
\item {\tt impCE} theorem, 11, 66
\item {\tt impE} theorem, 9, 10, 65
\item {\tt impI} theorem, 8, 63
- \item {\tt impL} theorem, 107
- \item {\tt impR} theorem, 107
+ \item {\tt impL} theorem, 112
+ \item {\tt impR} theorem, 112
\item {\tt in} symbol, 28, 61
\item {\textit {ind}} type, 78
\item {\tt induct} theorem, 45
- \item {\tt induct_tac}, 80, \bold{89}
- \item {\tt inductive}, 96--99
+ \item {\tt induct_tac}, 80, \bold{92}
+ \item {\tt inductive}, 101--104
\item {\tt Inf} constant, 26, 30
\item {\tt infinity} theorem, 32
\item {\tt inj} constant, 46, 75
@@ -417,13 +417,13 @@
\item {\tt inj_on_def} theorem, 75
\item {\tt inj_Suc} theorem, 79
\item {\tt Inl} constant, 44, 79
- \item {\tt inl} constant, 117, 122, 132
+ \item {\tt inl} constant, 122, 127, 137
\item {\tt Inl_def} theorem, 44
\item {\tt Inl_inject} theorem, 44
\item {\tt Inl_neq_Inr} theorem, 44
\item {\tt Inl_not_Inr} theorem, 79
\item {\tt Inr} constant, 44, 79
- \item {\tt inr} constant, 117, 122
+ \item {\tt inr} constant, 122, 127
\item {\tt Inr_def} theorem, 44
\item {\tt Inr_inject} theorem, 44
\item {\tt insert} constant, 68
@@ -469,21 +469,21 @@
\item {\tt IntPr.safe_step_tac}, \bold{10}
\item {\tt IntPr.safe_tac}, \bold{10}
\item {\tt IntPr.step_tac}, \bold{10}
- \item {\tt intr_rls}, \bold{124}
- \item {\tt intr_tac}, \bold{125}, 134, 135
- \item {\tt intrL_rls}, \bold{124}
+ \item {\tt intr_rls}, \bold{129}
+ \item {\tt intr_tac}, \bold{130}, 139, 140
+ \item {\tt intrL_rls}, \bold{129}
\item {\tt inv} constant, 75
\item {\tt inv_def} theorem, 75
\indexspace
- \item {\tt lam} symbol, 27, 29, 119
+ \item {\tt lam} symbol, 27, 29, 124
\item {\tt lam_def} theorem, 32
\item {\tt lam_type} theorem, 40
\item {\tt Lambda} constant, 26, 30
- \item {\tt lambda} constant, 117, 119
+ \item {\tt lambda} constant, 122, 124
\item $\lambda$-abstractions
- \subitem in \CTT, 119
+ \subitem in \CTT, 124
\subitem in \ZF, 27
\item {\tt lamE} theorem, 40, 41
\item {\tt lamI} theorem, 40, 41
@@ -502,7 +502,7 @@
\item {\tt Let} constant, 25, 26, 60, 63
\item {\tt let} symbol, 28, 61, 63
\item {\tt Let_def} theorem, 25, 31, 63, 64
- \item {\tt LFilter} theory, 100
+ \item {\tt LFilter} theory, 105
\item {\tt lfp_def} theorem, 45
\item {\tt lfp_greatest} theorem, 45
\item {\tt lfp_lowerbound} theorem, 45
@@ -510,7 +510,6 @@
\item {\tt lfp_subset} theorem, 45
\item {\tt lfp_Tarski} theorem, 45
\item {\tt List} theory, 81, 82
- \item {\textit {list}} type, 100
\item {\textit{list}} type, 81
\item {\tt list} constant, 50
\item {\tt List.induct} theorem, 50
@@ -520,10 +519,10 @@
\item {\tt list_rec_Cons} theorem, 50
\item {\tt list_rec_def} theorem, 50
\item {\tt list_rec_Nil} theorem, 50
- \item {\tt LK} theory, 1, 104, 108
- \item {\tt LK_dup_pack}, \bold{111}, 112
- \item {\tt LK_pack}, \bold{111}
- \item {\tt LList} theory, 100
+ \item {\tt LK} theory, 1, 109, 113
+ \item {\tt LK_dup_pack}, \bold{116}, 117
+ \item {\tt LK_pack}, \bold{116}
+ \item {\tt LList} theory, 105
\item {\tt logic} class, 5
\indexspace
@@ -542,31 +541,32 @@
\item {\tt mem_irrefl} theorem, 36
\item {\tt min} constant, 61, 80
\item {\tt minus} class, 61
- \item {\tt mod} symbol, 48, 79, 128
- \item {\tt mod_def} theorem, 48, 128
+ \item {\tt mod} symbol, 48, 79, 133
+ \item {\tt mod_def} theorem, 48, 133
\item {\tt mod_geq} theorem, 80
\item {\tt mod_less} theorem, 80
\item {\tt mod_quo_equality} theorem, 48
\item {\tt Modal} theory, 1
\item {\tt mono} constant, 61
\item {\tt mp} theorem, 8, 63
- \item {\tt mp_tac}, \bold{10}, \bold{126}
+ \item {\tt mp_tac}, \bold{10}, \bold{131}
\item {\tt mult_0} theorem, 48
- \item {\tt mult_assoc} theorem, 48, 128
- \item {\tt mult_commute} theorem, 48, 128
- \item {\tt mult_def} theorem, 48, 128
+ \item {\tt mult_assoc} theorem, 48, 133
+ \item {\tt mult_commute} theorem, 48, 133
+ \item {\tt mult_def} theorem, 48, 133
\item {\tt mult_succ} theorem, 48
\item {\tt mult_type} theorem, 48
- \item {\tt mult_typing} theorem, 128
- \item {\tt multC0} theorem, 128
- \item {\tt multC_succ} theorem, 128
+ \item {\tt mult_typing} theorem, 133
+ \item {\tt multC0} theorem, 133
+ \item {\tt multC_succ} theorem, 133
+ \item {\tt mutual_induct_tac}, \bold{92}
\indexspace
- \item {\tt N} constant, 117
+ \item {\tt N} constant, 122
\item {\tt n_not_Suc_n} theorem, 79
\item {\tt Nat} theory, 47, 80
- \item {\textit {nat}} type, 79, 80, 89
+ \item {\textit {nat}} type, 79, 80
\item {\textit{nat}} type, 78--81
\item {\tt nat} constant, 48
\item {\tt nat_0I} theorem, 48
@@ -579,32 +579,32 @@
\item {\tt nat_rec} constant, 80
\item {\tt nat_succI} theorem, 48
\item {\tt NatDef} theory, 78
- \item {\tt NC0} theorem, 121
- \item {\tt NC_succ} theorem, 121
- \item {\tt NE} theorem, 120, 121, 129
- \item {\tt NEL} theorem, 121
- \item {\tt NF} theorem, 121, 130
- \item {\tt NI0} theorem, 121
- \item {\tt NI_succ} theorem, 121
- \item {\tt NI_succL} theorem, 121
+ \item {\tt NC0} theorem, 126
+ \item {\tt NC_succ} theorem, 126
+ \item {\tt NE} theorem, 125, 126, 134
+ \item {\tt NEL} theorem, 126
+ \item {\tt NF} theorem, 126, 135
+ \item {\tt NI0} theorem, 126
+ \item {\tt NI_succ} theorem, 126
+ \item {\tt NI_succL} theorem, 126
\item {\tt Nil_Cons_iff} theorem, 50
\item {\tt NilI} theorem, 50
- \item {\tt NIO} theorem, 129
- \item {\tt Not} constant, 7, 60, 105
+ \item {\tt NIO} theorem, 134
+ \item {\tt Not} constant, 7, 60, 110
\item {\tt not_def} theorem, 8, 43, 64
\item {\tt not_impE} theorem, 9
\item {\tt not_sym} theorem, 65
\item {\tt notE} theorem, 9, 10, 65
\item {\tt notI} theorem, 9, 65
- \item {\tt notL} theorem, 107
+ \item {\tt notL} theorem, 112
\item {\tt notnotD} theorem, 11, 66
- \item {\tt notR} theorem, 107
+ \item {\tt notR} theorem, 112
\item {\tt null} constant, 82
\indexspace
\item {\tt O} symbol, 46
- \item {\textit {o}} type, 5, 104
+ \item {\textit {o}} type, 5, 109
\item {\tt o} symbol, 60, 71
\item {\tt o_def} theorem, 64
\item {\tt of} symbol, 63
@@ -615,9 +615,9 @@
\indexspace
- \item {\tt pack} ML type, 110
+ \item {\tt pack} ML type, 115
\item {\tt Pair} constant, 26, 27, 77
- \item {\tt pair} constant, 117
+ \item {\tt pair} constant, 122
\item {\tt Pair_def} theorem, 32
\item {\tt Pair_eq} theorem, 77
\item {\tt Pair_inject} theorem, 38, 77
@@ -626,52 +626,52 @@
\item {\tt Pair_neq_0} theorem, 38
\item {\tt PairE} theorem, 77
\item {\tt pairing} theorem, 35
- \item {\tt pc_tac}, \bold{112}, \bold{127}, 133, 134
+ \item {\tt pc_tac}, \bold{117}, \bold{132}, 138, 139
\item {\tt Perm} theory, 43
\item {\tt Pi} constant, 26, 29, 41
\item {\tt Pi_def} theorem, 32
\item {\tt Pi_type} theorem, 40, 41
\item {\tt plus} class, 61
- \item {\tt PlusC_inl} theorem, 123
- \item {\tt PlusC_inr} theorem, 123
- \item {\tt PlusE} theorem, 123, 127, 131
- \item {\tt PlusEL} theorem, 123
- \item {\tt PlusF} theorem, 123
- \item {\tt PlusFL} theorem, 123
- \item {\tt PlusI_inl} theorem, 123, 132
- \item {\tt PlusI_inlL} theorem, 123
- \item {\tt PlusI_inr} theorem, 123
- \item {\tt PlusI_inrL} theorem, 123
+ \item {\tt PlusC_inl} theorem, 128
+ \item {\tt PlusC_inr} theorem, 128
+ \item {\tt PlusE} theorem, 128, 132, 136
+ \item {\tt PlusEL} theorem, 128
+ \item {\tt PlusF} theorem, 128
+ \item {\tt PlusFL} theorem, 128
+ \item {\tt PlusI_inl} theorem, 128, 137
+ \item {\tt PlusI_inlL} theorem, 128
+ \item {\tt PlusI_inr} theorem, 128
+ \item {\tt PlusI_inrL} theorem, 128
\item {\tt Pow} constant, 26, 68
\item {\tt Pow_def} theorem, 71
\item {\tt Pow_iff} theorem, 31
\item {\tt Pow_mono} theorem, 53
\item {\tt PowD} theorem, 34, 54, 73
\item {\tt PowI} theorem, 34, 54, 73
- \item {\tt primrec}, 92--93
+ \item {\tt primrec}, 95--98
\item {\tt primrec} symbol, 80
\item {\tt PrimReplace} constant, 26, 30
\item priorities, 2
- \item {\tt PROD} symbol, 27, 29, 118, 119
- \item {\tt Prod} constant, 117
+ \item {\tt PROD} symbol, 27, 29, 123, 124
+ \item {\tt Prod} constant, 122
\item {\tt Prod} theory, 77
- \item {\tt ProdC} theorem, 121, 137
- \item {\tt ProdC2} theorem, 121
- \item {\tt ProdE} theorem, 121, 134, 136, 138
- \item {\tt ProdEL} theorem, 121
- \item {\tt ProdF} theorem, 121
- \item {\tt ProdFL} theorem, 121
- \item {\tt ProdI} theorem, 121, 127, 129
- \item {\tt ProdIL} theorem, 121
+ \item {\tt ProdC} theorem, 126, 142
+ \item {\tt ProdC2} theorem, 126
+ \item {\tt ProdE} theorem, 126, 139, 141, 143
+ \item {\tt ProdEL} theorem, 126
+ \item {\tt ProdF} theorem, 126
+ \item {\tt ProdFL} theorem, 126
+ \item {\tt ProdI} theorem, 126, 132, 134
+ \item {\tt ProdIL} theorem, 126
\item {\tt prop_cs}, \bold{11}, \bold{76}
- \item {\tt prop_pack}, \bold{110}
+ \item {\tt prop_pack}, \bold{115}
\indexspace
\item {\tt qcase_def} theorem, 44
\item {\tt qconverse} constant, 43
\item {\tt qconverse_def} theorem, 44
- \item {\tt qed_spec_mp}, 90
+ \item {\tt qed_spec_mp}, 93
\item {\tt qfsplit_def} theorem, 44
\item {\tt QInl_def} theorem, 44
\item {\tt QInr_def} theorem, 44
@@ -686,43 +686,43 @@
\indexspace
- \item {\tt range} constant, 26, 68, 101
+ \item {\tt range} constant, 26, 68, 106
\item {\tt range_def} theorem, 32, 71
\item {\tt range_of_fun} theorem, 40, 41
\item {\tt range_subset} theorem, 39
\item {\tt range_type} theorem, 40
- \item {\tt rangeE} theorem, 39, 73, 102
+ \item {\tt rangeE} theorem, 39, 73, 107
\item {\tt rangeI} theorem, 39, 73
\item {\tt rank} constant, 49
\item {\tt rank_ss}, \bold{24}
- \item {\tt rec} constant, 48, 117, 120
+ \item {\tt rec} constant, 48, 122, 125
\item {\tt rec_0} theorem, 48
\item {\tt rec_def} theorem, 48
\item {\tt rec_succ} theorem, 48
- \item {\tt recdef}, 93--96
+ \item {\tt recdef}, 98--101
\item recursion
- \subitem general, 93--96
- \subitem primitive, 92--93
- \item recursive functions, \see{recursion}{91}
- \item {\tt red_if_equal} theorem, 120
- \item {\tt Reduce} constant, 117, 120, 126
- \item {\tt refl} theorem, 8, 63, 107
- \item {\tt refl_elem} theorem, 120, 124
- \item {\tt refl_red} theorem, 120
- \item {\tt refl_type} theorem, 120, 124
- \item {\tt REPEAT_FIRST}, 125
- \item {\tt repeat_goal_tac}, \bold{112}
+ \subitem general, 98--101
+ \subitem primitive, 95--98
+ \item recursive functions, \see{recursion}{94}
+ \item {\tt red_if_equal} theorem, 125
+ \item {\tt Reduce} constant, 122, 125, 131
+ \item {\tt refl} theorem, 8, 63, 112
+ \item {\tt refl_elem} theorem, 125, 129
+ \item {\tt refl_red} theorem, 125
+ \item {\tt refl_type} theorem, 125, 129
+ \item {\tt REPEAT_FIRST}, 130
+ \item {\tt repeat_goal_tac}, \bold{117}
\item {\tt RepFun} constant, 26, 29, 30, 33
\item {\tt RepFun_def} theorem, 31
\item {\tt RepFunE} theorem, 35
\item {\tt RepFunI} theorem, 35
\item {\tt Replace} constant, 26, 29, 30, 33
\item {\tt Replace_def} theorem, 31
- \item {\tt replace_type} theorem, 124, 136
+ \item {\tt replace_type} theorem, 129, 141
\item {\tt ReplaceE} theorem, 35
\item {\tt ReplaceI} theorem, 35
\item {\tt replacement} theorem, 31
- \item {\tt reresolve_tac}, \bold{112}
+ \item {\tt reresolve_tac}, \bold{117}
\item {\tt res_inst_tac}, 62
\item {\tt restrict} constant, 26, 33
\item {\tt restrict} theorem, 40
@@ -731,31 +731,31 @@
\item {\tt restrict_type} theorem, 40
\item {\tt rev} constant, 50, 82
\item {\tt rev_def} theorem, 50
- \item {\tt rew_tac}, 19, \bold{126}
+ \item {\tt rew_tac}, 19, \bold{131}
\item {\tt rewrite_rule}, 19
\item {\tt right_comp_id} theorem, 46
\item {\tt right_comp_inverse} theorem, 46
\item {\tt right_inverse} theorem, 46
- \item {\tt RL}, 131
- \item {\tt RS}, 136, 138
+ \item {\tt RL}, 136
+ \item {\tt RS}, 141, 143
\indexspace
- \item {\tt safe_goal_tac}, \bold{112}
- \item {\tt safe_tac}, \bold{127}
- \item {\tt safestep_tac}, \bold{127}
+ \item {\tt safe_goal_tac}, \bold{117}
+ \item {\tt safe_tac}, \bold{132}
+ \item {\tt safestep_tac}, \bold{132}
\item search
- \subitem best-first, 103
+ \subitem best-first, 108
\item {\tt select_equality} theorem, 64, 66
\item {\tt selectI} theorem, 63, 64
\item {\tt separation} theorem, 35
- \item {\tt Seqof} constant, 105
- \item sequent calculus, 104--115
+ \item {\tt Seqof} constant, 110
+ \item sequent calculus, 109--120
\item {\tt Set} theory, 67, 70
\item {\tt set} constant, 82
\item {\tt set} type, 67
\item set theory, 24--58
- \item {\tt set_current_thy}, 103
+ \item {\tt set_current_thy}, 108
\item {\tt set_diff_def} theorem, 71
\item {\tt show_sorts}, 62
\item {\tt show_types}, 62
@@ -768,15 +768,14 @@
\subitem of conjunctions, 6, 75
\item {\tt singletonE} theorem, 36
\item {\tt singletonI} theorem, 36
- \item {\tt size} constant, 88
- \item {\tt snd} constant, 26, 33, 77, 117, 122
+ \item {\tt size} constant, 90
+ \item {\tt snd} constant, 26, 33, 77, 122, 127
\item {\tt snd_conv} theorem, 38, 77
- \item {\tt snd_def} theorem, 32, 122
- \item {\tt sobj} type, 108
+ \item {\tt snd_def} theorem, 32, 127
+ \item {\tt sobj} type, 113
\item {\tt spec} theorem, 8, 66
- \item {\tt split} constant, 26, 33, 77, 117, 131
+ \item {\tt split} constant, 26, 33, 77, 122, 136
\item {\tt split} theorem, 38, 77
- \item {\tt split_$t$_case} theorem, 87
\item {\tt split_all_tac}, \bold{78}
\item {\tt split_def} theorem, 32
\item {\tt split_if} theorem, 66, 76
@@ -786,7 +785,7 @@
\item {\tt ssubst} theorem, 9, 65, 67
\item {\tt stac}, \bold{75}
\item {\tt Step_tac}, 22
- \item {\tt step_tac}, 23, \bold{112}, \bold{127}
+ \item {\tt step_tac}, 23, \bold{117}, \bold{132}
\item {\tt strip_tac}, \bold{67}
\item {\tt subset_def} theorem, 31, 71
\item {\tt subset_refl} theorem, 34, 72
@@ -795,15 +794,15 @@
\item {\tt subsetD} theorem, 34, 56, 70, 72
\item {\tt subsetI} theorem, 34, 54, 55, 72
\item {\tt subst} theorem, 8, 63
- \item {\tt subst_elem} theorem, 120
- \item {\tt subst_elemL} theorem, 120
- \item {\tt subst_eqtyparg} theorem, 124, 136
- \item {\tt subst_prodE} theorem, 122, 124
- \item {\tt subst_type} theorem, 120
- \item {\tt subst_typeL} theorem, 120
+ \item {\tt subst_elem} theorem, 125
+ \item {\tt subst_elemL} theorem, 125
+ \item {\tt subst_eqtyparg} theorem, 129, 141
+ \item {\tt subst_prodE} theorem, 127, 129
+ \item {\tt subst_type} theorem, 125
+ \item {\tt subst_typeL} theorem, 125
\item {\tt Suc} constant, 79
\item {\tt Suc_not_Zero} theorem, 79
- \item {\tt succ} constant, 26, 30, 117
+ \item {\tt succ} constant, 26, 30, 122
\item {\tt succ_def} theorem, 32
\item {\tt succ_inject} theorem, 36
\item {\tt succ_neq_0} theorem, 36
@@ -811,8 +810,8 @@
\item {\tt succE} theorem, 36
\item {\tt succI1} theorem, 36
\item {\tt succI2} theorem, 36
- \item {\tt SUM} symbol, 27, 29, 118, 119
- \item {\tt Sum} constant, 117
+ \item {\tt SUM} symbol, 27, 29, 123, 124
+ \item {\tt Sum} constant, 122
\item {\tt Sum} theory, 43, 78
\item {\tt sum_case} constant, 79
\item {\tt sum_case_Inl} theorem, 79
@@ -824,69 +823,69 @@
\item {\tt SUM_Int_distrib2} theorem, 42
\item {\tt SUM_Un_distrib1} theorem, 42
\item {\tt SUM_Un_distrib2} theorem, 42
- \item {\tt SumC} theorem, 122
- \item {\tt SumE} theorem, 122, 127, 131
+ \item {\tt SumC} theorem, 127
+ \item {\tt SumE} theorem, 127, 132, 136
\item {\tt sumE} theorem, 79
\item {\tt sumE2} theorem, 44
- \item {\tt SumE_fst} theorem, 122, 124, 136, 137
- \item {\tt SumE_snd} theorem, 122, 124, 138
- \item {\tt SumEL} theorem, 122
- \item {\tt SumF} theorem, 122
- \item {\tt SumFL} theorem, 122
- \item {\tt SumI} theorem, 122, 132
- \item {\tt SumIL} theorem, 122
- \item {\tt SumIL2} theorem, 124
+ \item {\tt SumE_fst} theorem, 127, 129, 141, 142
+ \item {\tt SumE_snd} theorem, 127, 129, 143
+ \item {\tt SumEL} theorem, 127
+ \item {\tt SumF} theorem, 127
+ \item {\tt SumFL} theorem, 127
+ \item {\tt SumI} theorem, 127, 137
+ \item {\tt SumIL} theorem, 127
+ \item {\tt SumIL2} theorem, 129
\item {\tt surj} constant, 46, 71, 75
\item {\tt surj_def} theorem, 46, 75
\item {\tt surjective_pairing} theorem, 77
\item {\tt surjective_sum} theorem, 79
\item {\tt swap} theorem, 11, 66
- \item {\tt swap_res_tac}, 16, 103
- \item {\tt sym} theorem, 9, 65, 107
- \item {\tt sym_elem} theorem, 120
- \item {\tt sym_type} theorem, 120
- \item {\tt symL} theorem, 108
+ \item {\tt swap_res_tac}, 16, 108
+ \item {\tt sym} theorem, 9, 65, 112
+ \item {\tt sym_elem} theorem, 125
+ \item {\tt sym_type} theorem, 125
+ \item {\tt symL} theorem, 113
\indexspace
- \item {\tt T} constant, 117
- \item {\textit {t}} type, 116
+ \item {\tt T} constant, 122
+ \item {\textit {t}} type, 121
\item {\tt take} constant, 82
\item {\tt takeWhile} constant, 82
- \item {\tt TC} theorem, 123
- \item {\tt TE} theorem, 123
- \item {\tt TEL} theorem, 123
- \item {\tt term} class, 5, 61, 104
- \item {\tt test_assume_tac}, \bold{125}
- \item {\tt TF} theorem, 123
- \item {\tt THE} symbol, 27, 29, 37, 105
- \item {\tt The} constant, 26, 29, 30, 105
- \item {\tt The} theorem, 107
+ \item {\tt TC} theorem, 128
+ \item {\tt TE} theorem, 128
+ \item {\tt TEL} theorem, 128
+ \item {\tt term} class, 5, 61, 109
+ \item {\tt test_assume_tac}, \bold{130}
+ \item {\tt TF} theorem, 128
+ \item {\tt THE} symbol, 27, 29, 37, 110
+ \item {\tt The} constant, 26, 29, 30, 110
+ \item {\tt The} theorem, 112
\item {\tt the_def} theorem, 31
\item {\tt the_equality} theorem, 36, 37
\item {\tt theI} theorem, 36, 37
- \item {\tt thinL} theorem, 107
- \item {\tt thinR} theorem, 107
- \item {\tt TI} theorem, 123
+ \item {\tt thinL} theorem, 112
+ \item {\tt thinR} theorem, 112
+ \item {\tt TI} theorem, 128
\item {\tt times} class, 61
\item {\tt tl} constant, 82
\item tracing
\subitem of unification, 62
- \item {\tt trans} theorem, 9, 65, 107
- \item {\tt trans_elem} theorem, 120
- \item {\tt trans_red} theorem, 120
+ \item {\tt trans} theorem, 9, 65, 112
+ \item {\tt trans_elem} theorem, 125
+ \item {\tt trans_red} theorem, 125
\item {\tt trans_tac}, 81
- \item {\tt trans_type} theorem, 120
- \item {\tt True} constant, 7, 60, 105
- \item {\tt True_def} theorem, 8, 64, 107
+ \item {\tt trans_type} theorem, 125
+ \item {\tt True} constant, 7, 60, 110
+ \item {\tt True_def} theorem, 8, 64, 112
\item {\tt True_or_False} theorem, 63, 64
\item {\tt TrueI} theorem, 9, 65
- \item {\tt Trueprop} constant, 7, 60, 105
- \item {\tt TrueR} theorem, 108
- \item {\tt tt} constant, 117
- \item {\tt Type} constant, 117
+ \item {\tt Trueprop} constant, 7, 60, 110
+ \item {\tt TrueR} theorem, 113
+ \item {\tt tt} constant, 122
+ \item {\tt Type} constant, 122
\item type definition, \bold{84}
- \item {\tt typechk_tac}, \bold{125}, 130, 133, 137, 138
+ \item {\tt typechk_tac}, \bold{130}, 135, 138, 142, 143
\item {\tt typedef}, 81
\indexspace
@@ -943,7 +942,7 @@
\indexspace
- \item {\tt when} constant, 117, 122, 131
+ \item {\tt when} constant, 122, 127, 136
\indexspace
@@ -951,7 +950,7 @@
\indexspace
- \item {\tt zero_ne_succ} theorem, 120, 121
+ \item {\tt zero_ne_succ} theorem, 125, 126
\item {\tt ZF} theory, 1, 24, 59
\item {\tt ZF_cs}, \bold{24}
\item {\tt ZF_ss}, \bold{24}