Calculational Relation-Algebraic Proofs in Isabelle/Isar Wolfram Kahl Department of Computing and Software McMaster University Abstract. We propose a collection of theories in the proof assistant Isabelle/Isar that support calculational reasoning in and about hetero- geneous relational algebras and Kleene algebras. 1 Introduction and Related Work Abstract relational algebra is a useful tool for high-level reasoning that, through appropriate models, provides theorems in fields such as data mining, fuzzy databases, graph transformation, and game theory. Frequently, once an applica- tion structure is identified as a model of a particular relation-algebraic theory, that theory becomes the preferred reasoning environment in this application area. Since relation-algebraic reasoning typically follows a very calculational style, and, due to the expressive power of its constructs and rules, also pro- ceeds in relatively formal steps, one would expect that computer support for this kind of reasoning should be relatively easy to implement. Since the number of rules that can be applied in any given situation tends to be quite large, and expressions can become quite complex, computer support also appears to be very desirable. Some applications, such as fuzzy relations [Fur98], or graph transforma- tion [Kah01, Kah02], involve structures where complements in particular may not be available. These structures therefore require weaker formalisations, such as Dedekind categories, or other kinds of allegories [FS90]. Besides the cate- gory structure encompassing composition and identities, allegories are equipped with meet and converse, and are closely related with data-flow graphs. The dual view of control-flow graphs corresponds to Kleene algebras which besides com- position and identities feature join and iteration (via the Kleene star). Recent years have seen a rapid growth of interest in computer science applications of Kleene algebras and related structures, studied from a relational perspective, see e.g. [DM01]. Since all of these structures still share a considerable body of common theory, it appears desirable to structure the theory support for relation- algebraic reasoning in such a way that the organisation of results reflects the nec- essary premises in an intuitive way. On the “data-flow side”, the different kinds of allegories proposed in [FS90] offer themselves naturally for this structuring; on the “control-flow side”, we will use Kleene algebras and several extensions like Kleene algebras with tests [Koz97] and Kleene algebras with domain [DMS03]. R. Berghammer et al. (Eds.): RelMiCS/Kleene-Algebra Ws 2003, LNCS 3051, pp. 178–190, 2004. c Springer-Verlag Berlin Heidelberg 2004