Skip to content

Commit e76559e

Browse files
committed
Final few changes to Z Toolkit for submission
1 parent c047937 commit e76559e

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

List_Extra.thy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,8 +1167,8 @@ lemma listpow_add: "xs ^^ (m + n) = xs ^^ m @ xs ^^ n"
11671167

11681168
subsection \<open> Alternative List Lexicographic Order \<close>
11691169

1170-
text \<open> Since we can't instantiate the order class twice for lists, and we want prefix as
1171-
the default order for the UTP we here add syntax for the lexicographic order relation. \<close>
1170+
text \<open> Since we can't instantiate the order class twice for lists, and we often want prefix as
1171+
the default order, we here add syntax for the lexicographic order relation. \<close>
11721172

11731173
definition list_lex_less :: "'a::linorder list \<Rightarrow> 'a list \<Rightarrow> bool" (infix "<\<^sub>l" 50)
11741174
where "xs <\<^sub>l ys \<longleftrightarrow> (xs, ys) \<in> lexord {(u, v). u < v}"

Z_Toolkit_Overview.thy

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ text \<open> The objective of this theory development is an implementation of th
1616
specification based on ZF set theory, whereas HOL targets an efficient proof system capable
1717
of scalable verification. The aim then is to reconcile these two objectives in one development.
1818
19-
In Z, the type system is very simple, consisting only of given types closed under powerset and
20-
product constructions. For example, in Z a total function is simply encoded as its graph in a
19+
In Z, the type system is very simple, consisting of given types closed under powerset and
20+
product constructions. For example, in Z a total function is encoded as its graph in a
2121
relation, and a relation is simply a set of pairs. There is no distinct type constructor for
2222
functions. Similarly, a sequence (list in HOL) is a finite function whose domain is
2323
@{term "{1::nat..n}"}, for some natural number @{term n}. This means in Z, we can write expressions
@@ -30,13 +30,12 @@ text \<open> The objective of this theory development is an implementation of th
3030
system to capture new mathematical concepts, such as vectors, bounded continuous functions, and
3131
physical quantities, to name a few examples. This approach has proven to be very successful and
3232
scalable, as evidenced by large verification projects like seL4, and the ever growing Archive of
33-
Formal Proofs.
33+
Formal Proofs\footnote{Archive of Formal Proofs. \url{http://www.isa-afp.org}} (AFP).
3434
3535
Now, it is entirely possible to reconstruct the Z mathematical toolkit in the way described above,
3636
following the ISO standard, such that everything boils down to sets. However, there is a major
3737
downside to this, which is that we cannot easily use the results in the HOL standard library (@{theory Main})
38-
and the Archive of Formal Proofs\footnote{Archive of Formal Proofs. \url{http://www.isa-afp.org}},
39-
since these are all built using the HOL type universe extension paradigm. There are also several
38+
and the AFP, since these are all built using the HOL type universe extension paradigm. There are also several
4039
benefits to the HOL approach, notably that the type system can be used to deduce when a function
4140
is closed under a set. This in turn greatly improves proof automation, since there is no
4241
obligation to check well-formedness of expressions as part of the proof. Consequently, we chose
@@ -45,7 +44,7 @@ text \<open> The objective of this theory development is an implementation of th
4544
However, in order to be faithful with Z, we also implement the Z universe as a set of definitions,
4645
based on the ISO standard. Much of this already in implemented in the theory @{theory HOL.Relation},
4746
but we extend it with functions like application, domain restriction, and overriding, which
48-
are all part of the Z metalanguage. Crucially, this development is all based on sets and relations,
47+
are all part of the Z meta-language. Crucially, this development is all based on sets and relations,
4948
not HOL functions, and therefore is a faithful encoding with Z. Upon this foundation, we construct
5049
a hierarchy of types corresponding to partial functions, finite functions, and total functions,
5150
and we reuse the HOL @{typ "'a list"} type. We then prove that every HOL typed construction can
@@ -55,8 +54,8 @@ text \<open> The objective of this theory development is an implementation of th
5554
In order to achieve compatibility between this HOL type hierarchy, and the Z mathematical toolkit,
5655
the principle problem to solve is the necessity of type coercions. As mentioned, in Z, sequences
5756
are subtypes of sets, and so set-based functions can be directly applied to functions, which is
58-
often benefical. For example, the domain of a sequence is the set of indices of that sequence. So
59-
the technical goal s to allow HOL to accept expressions of this kind. Our solution is to use a
57+
often beneficial. For example, the domain of a sequence is the set of indices of that sequence. So
58+
the technical goal is to allow HOL to accept expressions of this kind. Our solution is to use a
6059
mixture of coercive subtyping and type overloading to achieve this. This allows the user to
6160
write Z expressions into Isabelle, which are then internally mapped into HOL expressions.
6261

document/root.tex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
\begin{document}
4343

4444
\title{Z Mathematical Toolkit in Isabelle/HOL}
45-
\author{Simon Foster \and Pedro Ribeiro \and Frank Zeyda}
45+
\author{Simon Foster, Pedro Ribeiro and Frank Zeyda \\[.5ex] University of York, UK \\[2ex] \texttt{\small simon.foster@york.ac.uk}}
4646
\maketitle
4747

4848
\begin{abstract}
@@ -56,6 +56,7 @@
5656
\end{abstract}
5757

5858
\tableofcontents
59+
\newpage
5960

6061
% sane default for proof documents
6162
\parindent 0pt\parskip 0.5ex

0 commit comments

Comments
 (0)