Abstract
Based on a formalization of open formulas as statements in context, the paper presents a freshly new and abstract view of logics and specification formalisms. Generalizing concepts like sets of generators in Group Theory, underlying graph of a sketch in Category Theory, sets of individual names in Description Logic and underlying graph-based structure of a software model in Software Engineering, we coin an abstract concept of context. We show how to define, in a category independent way, arbitrary first-order statements in arbitrary contexts. Examples of those statements are defining relations in Group Theory, commutative, limit and colimit diagrams in Category Theory, assertional axioms in Description Logic and constraints in Software Engineering. To validate the appropriateness of the newly proposed abstract framework, we prove that our category independent definitions and constructions give us a very broad spectrum of Institutions of Statements at hand. For any Institution of Statements, a specification (presentation) is given by a context together with a set of first-order statements in that context. Since many of our motivating examples are variants of sketches, we will simply use the term sketch for those specifications. We investigate exhaustively different kinds of arrows between sketches and their interrelations. To pave the way for a future development of category independent deduction calculi for sketches, we define arbitrary first-order sketch conditions and corresponding sketch constraints as a generalization of graph conditions and graph constraints, respectively. Sketch constraints are the crucial conceptual tool to describe and reason about the structure of sketches. We close the paper with some vital observations, insights and ideas related to future deduction calculi for sketches. Moreover, we outline that our universal method to define sketch constraints enables us to establish and to work with conceptual hierarchies of sketches.
Keywords:
first-order logic; abstract model theory; institution; sketch; algebraic specification; description logic; graph conditions; graph constraints; diagram predicate framework MSC:
03B70; 03C95; 18C30; 68N30; 68Q65
1. Introduction
The impetus towards abstraction is often triggered by the feeling that we do, again and again, the “same thing”—that there are structural similarities between concepts and problems in various areas and on different conceptual levels. We experience facing “similar patterns” when formalizing and reasoning about certain kinds of concepts and problems.
Once we obtain the strong impression that concepts, constructions, proofs and results in various areas and on different conceptual levels are somehow related, we may feel the urge to find out what the commonalities really are and to formalize them in an adequate mathematical language. Naturally, such a formalization will be a pretty abstract one if it should cover a broader range of areas.
In light of these remarks, the paper presents the first stage of expansion of a conceptual framework intended to provide a unified view to a broad range of concepts, constructions and problems we dealt with in our long-standing research in various areas and on different conceptual levels in formal specification. The framework should enable us to describe a wide range of specification formalisms (modelling techniques) in a uniform way and thus to relate them. Since category theory is the mathematical language of choice to describe and study relations between structures and constructions, we utilize categorical concepts to describe our framework.
1.1. Background, Motivations, Challenges and Principles
In this subsection, we outline different lines of motivation and challenges encouraging us to develop our abstract conceptual framework. In particular, we discuss and try to justify the methodological principles upon which the development of the framework is based.
1.1.1. Universal Algebra and Algebraic Specifications:
We consider a morphism between two equational specifications, i.e., a signature morphism such that the set of -equations entails the set of translated -equations. For any -algebra there is a -algebra freely generated by along . The construction of can be described in four steps: (1) Construct a “syntactic encoding” of ; (2) Translate this syntactic encoding along the signature morphism ; (3) Use semantic entailment or a deduction calculus to extend the translated encoding of to a syntactic encoding of a -algebra; and (4) Transform the extended encoding into a -algebra .
There is a widely-used technique to encode a -algebra syntactically (see, for example, [1]): The elements of the carrier A of are added as auxiliary constants to the signature and the complete behaviour of the operations in is encoded by a set of ground -equations. To make the construction of free algebras work, we have to extend and , in such a way that we obtain a signature morphisms and is constructed as a quotient of the ground -term algebra .
In abstract model theory, this technique is reflected by the idea to define variables by means of signature extensions. (In this paper, we use the term “model” in two conflicting meanings: A “software model”, e.g., is a syntactic representation of (certain properties) of a software system (semantic structure) while a “model” in logic is a semantic structure conforming to a formal syntactic description). This is the traditional approach in the theory of institutions (compare [2]). Note that this only works if the signatures in question comprise the concept of operation!
We perceive the above outlined technique in Universal Algebra as not fully adequate. The construction of free algebras becomes unnecessarily involved and we are, unfortunately, forced to work with infinite signatures since there is a kind of circularity in the sense that signatures have to be defined in such a way that the carrier of any potential -algebra for any signature can be encoded by a signature extension of . Somehow, the concept of signature is not a “syntactic” one anymore. In our humble opinion, signatures are (or should be) located on a conceptual level above carriers of algebras. Following the principle of separation of concerns, we would therefore formulate the following first requirement for our framework.
| Requirement 1: Define signatures independent of and prior to carriers of algebras. |
Adhering to Requirement 1, we will be allowed, for example, to base a specification formalism on finite or enumerable signatures only! Another observation is that signatures are always given by sets, thus we have to adhere to Requirement 1 if we want to work with algebras where the carriers are graphs instead of sets, for example [3].
Generalizing the concept of a group generated by a set of generators and a set of defining relations the small school on Partial Algebraic Specifications in former East-Germany [4,5,6,7] developed the concept of a partial -algebra freely generated by a set X of variables (generators) and a set R of -equations on X where is a set of conditional existence -equations. Based on this concept, a fully-fledged theory of Partial Algebraic Specifications, including free functor semantics as well as limits and colimits of signatures, specifications and partial algebras, resp., has been developed [6].
We consider here the case of total algebras. Any -algebra is isomorphic to , which, in turn, is isomorphic to since also encodes the fact that satisfies all the conditional equations in . However, there may be other, hopefully finite, sets X and R such that . For any such syntactic representation of a -algebra and any specification morphism , we can construct the free algebra as the -algebra , which is a quotient of the -term algebra .
Freely generated algebras also play a crucial role in proving the completeness of the deduction calculus for conditional equations [6,7]: A deduction rule generates new equations from a set of given equations. Any conditional equation can be transformed into a deduction rule and vice versa. Given , the deduction calculus generates the smallest -congruence in which contains and is closed w.r.t. the rules arising from . We consider the quotient -term algebra . For any -algebra we have for the -homomorphism , and it can be shown that satisfies a set of conditional equations if, and only if, the kernel is closed under the deduction rules arising from . This insures that is a -algebra. To show the completeness of the deduction calculus, we only have to prove that is indeed freely generated by . Note that we work here with a kind of semantic deduction theorem: A set of conditional equations entails a conditional equation if, and only if, .
In the East-German school of Algebraic Specifications, we do have syntactic representations , of -algebras which are well distinguished from signatures and algebras, respectively. At the same time, deduction means the step-wise generation of the congruence relations starting with . In [7], we describe these congruence relations, for example, as fixed points of so-called derivation operators describing the effect of parallel one-step applications of deduction rules. We are convinced that the definition of any specification formalism would benefit if it includes a separated “technological layer” where the syntactic representations of semantic structures live and where we can describe the effects of deduction explicitly and in detail.
| Requirement 2: Define a separated technological layer where the syntactic representations of semantic structures live and where deduction takes place. |
Looking back, we have been left, after all the years, with two related questions:
| Question 1: Is there a general principle behind the one-to-one correspondence between conditional equations and deduction rules? |
| Question 2: Is there indeed a kind of general semantic deduction theorem behind the equivalence between entailment of conditional equations and entailment of equations? |
We hope that our framework will enable us to give satisfactory answers.
1.1.2. Categorical Algebra
Due to Lawvere [8], one can construct for any specification with E a set of -equations a category with finite products such that the category of all -algebras is equivalent to the category of all product preserving functors from into . Analogously, one can construct for any specification with a set of conditional -equations a category with finite limits such that the category of all -algebras is equivalent to the category of all finite limit preserving functors from into .
In [9], we generalized this result to many-sorted signatures and partial algebras. We showed how to construct for any specification , with a many-sorted signature and a set of conditional existence -equations, a category with finite limits such that the category of all partial -algebras is equivalent to the category of all limit preserving functors from into the functor category with S the corresponding discrete category, i.e., set, of sorts declared in .
The construction of those syntactic categories starts by introducing objects that correspond to declarations of finite sets of variables. After adding for each operation symbol in a morphism between the appropriate objects, one continues by constructing new morphisms and an equivalence relation between morphisms. In case of finite product categories , no other objects are generated while in case of the finite limit categories and , resp., we have to introduce new objects representing the set of “solutions” of the set R of (existential) -equations on X, i.e., a corresponding equalizer. Triggered by this example and supported by later experiences, especially with diagrammatic specification techniques, we vote for:
| Requirement 3: Define variables prior to operation and predicate symbols and use variables to define the arities of operations and predicates. |
In [9], we specified finite limit categories as partial -algebras (with a signature declaring two sorts Ob, Mor and operations like source, target, composition, product, equalizer, subobject, …) satisfying a corresponding set of conditional existence equations. The category was then constructed as the freely generated partial -algebra with declaring one variable of sort Mor for each operation symbol in and one variable of sort Mor for each conditional existence equation in . R describes source and target of the variables in as well as the subobject property of the variables in .
Thus, what we did is to reuse the formalism of partial algebras and conditional existence equations on the higher conceptual level of formalisms to coin a (meta) specification of the specification formalism “finite limits”. In the process, we downgraded operations and conditional equations, playing the leading part in Section 1.1.1, to simple variables (generators). It seems quite natural to require a similar flexibility from our conceptual framework:
| Objective 1: The framework should enable us to describe and to work with specification formalisms on different conceptual levels in a uniform way. |
1.1.3. Sketches in Category Theory
Categories are graphs equipped with identities and composition; thus, a string-based formalism like algebraic specifications, for example, may be not always the most adequate tool to describe and reason about categorical structures.
In the 1960s, Charles Ehresmann invented a graph-based specification formalism–the so-called sketches. Later sketches were promoted for applications in computer science by Barr and Wells [10] and applied to data modeling problems by Johnson and Rosebrugh [11] (see [12] for a survey).
A sketch consists of a graph G and sets D, L and K of diagrams in G. In Category Theory, a diagram in a graph G of shape I is a graph homomorphism . A model of a sketch in a category is a graph homomorphism from G to the underlying graph of that takes every diagram in D to a commutative diagram, every diagram in L to a limit diagram and every diagram in K to a colimit diagram [10].
We use in this paper the term “diagrammatic” as a synonym for “graph-based” in a broad sense. We consider, for example, any functor (presheaf) with a small category as a “graph-based” structure. Sketches give us a diagrammatic pendant to algebraic specifications at hand and are, at the same time, more expressive. Equational specifications can be equivalently described by finite product sketches, i.e., sketches where K is empty and L contains only finite product diagrams, while algebraic specification with conditional equations can be transformed into equivalent finite limit sketches with K empty and L containing only finite limit diagrams.
Analogous to Section 1.1.2, we can construct for any finite product sketch , for example, a corresponding finite product category freely generated by . The methodologically important observation is that the items in the graph G now play the role of “variables (generators)” while the diagrams in D and L are the “defining relations”.
1.1.4. Generalized Sketches
Sketches are a very expressive specification formalism but reveal some essential deficiencies when it comes to the formalization of diagrammatic specification techniques in Software Engineering, for example (see the discussion in [13]).
We have to deal with other properties than just commutativity, limit or colimit. In addition, we meet structures that go beyond plain graphs like typed graphs or E-graphs [14], for example.
Extending the sketch formalism along the two dimensions–properties and/or structures–we arrive at generalized sketches. Generalized sketches were developed in the 1990s independently by Makkai, motivated by his work on an abstract formulation of Completeness Theorems in Logic [15], and a group in Latvia around Diskin, triggered by their work on data modeling [16,17].
To define a certain generalized sketch formalism, we chose a category which may differ from the category of graphs. We coin for each property we want to deal with in our formalism a predicate symbol P and define, analogous to the shape graphs in traditional sketches, the arity of this predicate by an object in . Analogous to a diagram in a sketch, we define an atomic statement about an object K in by a morphism in . A generalized sketch is then nothing but an object K in together with a set of atomic statements about K (see [13]).
1.1.5. Diagram Predicate Framework (DPF)
Software models and a plethora of modeling artifacts in various scientific and industrial areas are essentially diagrammatic. Traditional string-based formalisms turn out to be unwieldy and inadequate to define syntax and semantics of diagrammatic modeling techniques and to formalize diagrammatic reasoning. Instead of trying to emulate diagrammatic models and reasoning by means of traditional string-based formalisms, we adapted therefore generalized sketches when we started, around fifteen years ago, to work with Model Driven Software Engineering (MDSE).
Software models are (or, at least, appear as) graph-based structures complemented with constraints the modeled software system has to comply with. For us, it was striking that generalized sketches are the most adequate concept to formalize those artifacts. A software model can be formalized as a generalized sketch , where K represents the underlying graph-based structure of the model and the set of constraints in the model. We further developed the generalized sketch approach as a theoretical foundation of MDSE [13,18,19,20] and called it, after a while, the Diagram Predicate Framework (DPF) since it turned out to be nearly impossible to convince software engineers that a “sketch” is something precise with a well-defined syntax and semantics. For the same reason, generalized sketches are called diagrammatic specifications in DPF.
DPF has been applied to a wide range of problems in MDSE with a special focus on model transformations and meta-modeling [18,21]. Thereby, we restricted ourselves to categories of graphs or typed graphs, respectively, as the base categories. (To reduce self citation, we followed the suggestion of the editors and dropped all references to papers just illustrating applications of DPF but not being relevant for the content of the paper).
While sketches and companions are relegated to a niche existence in all the traditional formalisms we discussed so far, they take center stage in DPF. The framework, presented in this paper, arose to a big extent from the attempt to lift ideas and insights from the development of the theoretical foundations of DPF to a more general level.
| Objective 2: The framework provides a formalization of the general idea of sketches as syntactic descriptions and/or representations of semantic entities. |
Our hope is that this sketch-centered approach enables us to achieve another goal.
| Objective 3: The framework allows us to describe, in a uniform way, not only string-based formalisms, like Algebraic Specifications and First-Order Logic, but also a wide variety of diagrammatic specification formalisms/techniques. |
At present, DPF does have some deficiencies that we will discuss shortly.
Expressiveness of Statements
We utilize in DPF only atomic statements, called “atomic constraints”, i.e., statements like in predicate logic stating that and are the parents of . With those statements, we can not express all relevant constraints for software systems. String-based languages like the Object Constraint Language (OCL), for example, are traditionally used to express those constraints. OCL is built upon a fragment of first-order predicate logic and we want to extend the diagrammatic language of sketches in such a way that we can work with statements incorporating the usual logical connectives as well as universal and existential quantification. We want to be able to formulate statements like in traditional first-order predicate logic stating that is the sibling of someone.
Our framework obtained its abstract appearance after we realized that our initial ideas to define such an extension for graph-based sketches would work in arbitrary categories!
Structure of Software Models
There are plenty of different kinds of software models. For each kind, there is a corresponding description of the required structure of software models of this kind. Those descriptions are often called meta-models. Adapting the concepts sketch-axiom [15] and graph constraint [14], we introduced “universal constraints” and “negative universal constraints”, respectively, to specify the structure of software models (sketches) [18,21].
Universal constraints are, however, not expressive enough to specify all the restrictions we want or have to impose on software models. Analogous to arbitrary first-order statements, to be used as components of sketches, we want to also define therefore arbitrary first-order sketch constraints to be used to specify the structure of sketches.
To achieve this goal, we have been choosing a more unconventional approach. We neither wanted to encode traditional first-order logic of binary predicates by graphs [22] nor to emulate nested graph conditions by traditional first-order formulas [23]. We instead developed a method to define, in a conservative way, first-order constraints in arbitrary categories of sketches. By conservative, we mean that the application of our universal method to different categories of graphs, as in [22,23,24,25], for example, allows us to describe the various corresponding variants of (nested) graph constraints.
To validate the use of the term “first-order”, we have to ensure, in addition, that the application of our method to the category results in constraints comprising essential features of traditional first-order predicate logic.
Semantics of Diagrammatic Predicates
The advantage of the traditional Ehresmann sketches in Category Theory is that there are fixed universal definitions (formulated in a language based on the concepts graph, composition and identity) of the properties commutative, limit and colimit, respectively. Since these definitions axiomatize the concepts limit and colimit “up to isomorphism”, we can presuppose a fixed semantics of all corresponding diagrammatic predicates in any category, i.e., for any fixed interpretation of the concepts graph, composition and identity complying to the axioms of a category.
A price we have to pay, moving from Ehresmann sketches to generalized sketches, is that we have to describe the intended semantics of the predicates we want to include in a formalism on our own. In some cases, a complete axiomatization of the semantics of predicates will be not feasible but we should provide, at least, a partial axiomatization.
At present, we do have in DPF only the very simple notion of sketch entailment at hand to express properties of predicates. We have to extend this notion or find other notions of “arrows” between sketches that provide more appropriate tools for the axiomatization of the semantics of predicates.
On the other side, if we find a way to define arbitrary first-order diagrammatic statements, we will also have closed formulas, like , available for axiomatization purposes.
We intend to develop necessary tools to describe the semantics of diagrammatic predicates. We want to understand how these tools are related and, especially, find an answer to the question:
| Question 3: How are the concepts specification morphism, universal constraint and specification entailment in DPF actually related? |
Operations and Substitutions
One of the crucial motivations to write this paper was to find an answer to the:
| General Question: What mathematical infrastructure we need to define a formalism enabling us to specify semantic structures with the full expressive power of first-order predicate logic? |
Our answer will be: We need nothing but a category!
We are able to give such a general answer since we use only predicate symbols and no operation symbols to construct first-order statements in context. This restriction allows us to realize the translation of first-order statements along context morphisms by simple composition. In particular, there is no need for any kind of “substitution” to define those translations and thus to construct first-order formalisms for specification purposes.
For a future development of reasonable deduction calculi within our framework, we have to rely, however, on “substitutions” and, to have substitutions at hand, we need more infrastructure than just a simple category. In particular, we will need well-behaved pushout constructions as it will be shortly demonstrated in the paper.
Makkai’s work [15,26] exemplifies that predicates may be, in principal, quite sufficient to build reasonable specification formalisms.
However, for applications in Software Engineering, for example, operations are sadly missed. Therefore, we are also interested in finding out if and how we can define operations in arbitrary categories. As an initial step, we started to develop a theory of graph operations [3]. It turns out that the step from traditional set operations to graph operations is not trivial at all. We are, however, optimistic that it will be possible to lift the concepts and results of a future comprehensive theory of graph operations, at least, to the level of arbitrary presheaf topoi.
Deduction
To keep software models readable and feasible, we should not overload them with unnecessary items and/or information. In particular, we should drop information that can be derived from the already given information.
To put this principle into practice, we have, however, to rely on mechanisms to derive information. Applied to DPF, this means, especially, that we need rules enabling us to deduce statements from given statements and those deduction rules should be sound.
In the paper, we introduce the concept sketch arrow and discuss the utilization of sketch arrows as deduction rules. The development of a fully fledged deduction calculus for Logics of Statements has, however, to be left as a topic of future research. We will, nevertheless, present and discuss some vital observations, insights and ideas for this future expansion of our framework.
Category Theory can be seen as a diagrammatic specification formalism since it is based on the concepts graph, composition and identity. The development of our abstract framework is also triggered and guided by the quest to put this understanding on a precise formal ground and to develop a purely diagrammatic presentation of Category Theory where the properties commutative, limit and colimit are described by first-order statements on graphs. Most of the diagrammatic pictures in textbooks on Category Theory are nothing but sketches. The vision is to define concepts and to prove results in Category Theory based on pure “diagrammatic reasoning”–or, to formulate it differently: Let us present Category Theory in such a way that “diagram chasing” becomes a precise and well-founded proof technique. As result of such a project, one would probably end up with something very much related to the language of diagrams introduced in [27] and used in [28] to present and define categorical concepts and carry out proofs in a diagrammatic manner. We became acquainted with this language only in the final stage of writing this paper and will include a discussion of this language in the future development of a fully fledged deduction calculus for Logics of Statements.
Meta-Modeling
In DPF, we utilize categories of typed graphs, i.e., slice categories, to define the semantics of sketches. This enabled us to formalize arbitrary deep modeling hierarchies in a quite straightforward way. In this paper, we follow the tradition in logic and work with a Tarskian semantics of sketches, i.e., we work with functor categories instead of slice categories. This makes the formalization of modeling hierarchies rather involved.
Meta-modeling is a big topic on its own and, at the present stage, we are not capable of providing a detailed analysis and treatment of meta-modeling in Logics of Statements. The examples are, however, designed in such a way that we can, at least, point at the meta-modeling issue. We have to include, nevertheless, meta-modeling is an important item on our overall wish list:
| Objective 4: The framework enables us to address and formalize meta-modeling. |
1.1.6. Abstract Model Theory
From our various studies in Abstract Model Theory, the technical report [29] is particularly relevant for the present paper. That time, we proved in detail and in a systematic way that four specification formalisms are indeed institutions. Our main finding was that the proof of the satisfaction condition always boiled down to the existence of what we called corresponding assignments and corresponding evaluations, respectively. This finding has been integrated later by Pawlowski in his concept of context institutions [30]. One of the main motivations for context institutions was to incorporate open formulas in the abstract description of specification formalisms and the term context has been coined as an abstract pendant for a “set of variables”.
What we call feature expressions in our framework are nothing but a generalization of open formulas. We differentiate, however, conceptually between variable declarations and contexts. In some specification formalisms, both concepts may denote the same thing. In other formalisms, any variable declaration will be also a context but not vice versa. In addition, there can be formalisms where variable declarations and contexts are kept apart, as in Description Logic for example. We use the term context as an abstract pendant for things like a set of generators in Group Theory, an underlying graph of a sketch in Category Theory, an underlying graph of a software model in Software Engineering, a set of literals (atomic values) in Logic Programming and a set of individual names in Description Logic, for example.
1.2. Content and Structure of the Paper
Section 2 recapitulates some basic concepts and corresponding notational conventions. We include a short discussion concerning foundations and outline how the tuple notation is used in this paper to represent (partial) finite maps.
In Section 3, we present a universal mechanism to define first-order statements and their semantics in arbitrary categories. We show that any choice of the seven parameters we are going to introduce (see Figure 1) gives us a corresponding Institution of Statements at hand. The concept of institution [2,31] is a very simple one and lives on the same abstraction level as categories and functors. We utilize institutions as a very convenient guideline to present logical formalisms in a uniform and well-organized way. The satisfaction condition is the only more complicated thing and simply tells us that we designed syntax and semantics compatible in the way that the translation of sentences corresponds exactly to model extensions (see [32,33,34]). Thus, validating the satisfaction condition is a kind of sanity check for the design of our formalism. At the beginning of the section, we introduce the five running examples we have chosen to illustrate and validate our definitions and constructions.
Figure 1.
Stepwise construction of an Institution of Statements (IoS).
At the present stage, Institutions of Statements do not incorporate operations since we have not found yet a way to define operations in arbitrary categories. To close, nevertheless, the circle to the ideas and motivations discussed in the Introduction Section 1.1.1, we recapitulate in Section 4 the traditional concepts of operations on sets and many-sorted equations. We show that the procedure we developed in Section 3 to construct Institutions of Statements enables us also to construct corresponding Institutions of Equational Statements. Substitutions play a central role in Universal Algebra, and this section may also provide some hints and guidelines for the future development of a more abstract and general account of substitutions in Logics of Statements.
Any institution gives us a corresponding category of presentations and an extension of the model functor of the institution to the category of presentations at hand [2,31]. In Section 5, we outline this construction for Institutions of Statements and Institutions of Equations, respectively. To distinguish presentations for Institutions of Statements (Equations) from presentations in general, we will use the term sketch for these specific presentations. The general theory of institutions [2,31] also provides us with a standard notion of morphism between sketches (presentations). Those morphisms are of minor importance in this paper. We introduce and investigate, in addition, sketch arrows and sketch implications as well as the relationships between these three concepts. As a pendant to elementary diagrams in traditional first-order logic, we define sketch encodings of semantic structures and will give a kind of positive answer to Question 4 (p. 39): Is there any justification to ignore completely the concept of semantic structure (model)?
To describe the syntactic structure of software models and, more generally, the structure of sketch encodings of semantic structures, we introduce and study in Section 6 arbitrary first-order sketch conditions and sketch constraints, thereby unifying and generalizing the different concepts of graph conditions and graph constraints in the area of Graph Transformations. We outline that we can, analogous to the hierarchy of generalized sketches in [15], also establish a conceptual hierarchy of sketches and sketch constraints. Moreover, we present some vital observations, insights, concepts and ideas to establish a basis for the future development of deduction calculi for Institutions of Statements.
We conclude the paper with a discussion of the results, findings and shortcomings of the paper and highlight future research directions.
The only categorical concepts we actually use in this paper are category, functor, product, functor category and slice category, and a basic understanding of these concepts is recommended. Looking up the definition of institutions may not be necessary but helpful.
2. Notations and Preliminaries
denotes the collection of objects of a category and the collection of morphisms of , respectively. is the collection of all morphisms from object a to object b in . We use the diagrammatic notation for the composition of morphisms and in . states that category is a subcategory of category . A category is small if the collection , and thus also the collection , is a set. is the category of all small categories. denotes the category of all sets and all (total) maps, while is the category of all sets and partial maps. We consider as a subcategory of . , and are not small!
A (directed multi) graph is given by a collection of vertices, a collection of edges and maps , assigning to each edge its source and target vertex, respectively. denotes the underlying graph of a category , i.e., we have and . A graph G is small if and are sets. A homomorphism between two graphs is given by a pair of maps , such that and . is the category of all small graphs and all graph homomorphims between them.
The category comprising as well finite and small graphs as the underlying graphs of categories like , , and , for example, is denoted by , while is the category containing all the corresponding collections of vertices and edges, respectively. Correspondingly, we denote the category with all small categories and categories like , , and as objects by .
Remark 1 (Foundations).
We rely on Tarski–Grothendieck set theory, which is based on the concept of Grothendieck universes. That is, we allow ourselves to work, in principal, with open hierarchies of sets, graphs and categories, respectively. In contrast, many expositions of set theory and category theory, respectively, rely on a strict two level approach. We cite from [35], page 5:
Is a category in itself? Our answer here is to treat as a regulative idea; which is an inevitable way of thinking about categories and functors, but not a strictly legitimate entity. (Compare the self, the universe, and God in Kant “Kritik der Reinen Vernunft”.)
Here, we work with a three-level hierarchy. That is, we also consider , and as legitimate entities but take the level above as a “regulative level”.
In view of the category appears in two different roles: First, is an object in . Second, is a subcategory of . We consider the inclusion functor as an anonymous coercion functor which embeds any object in into the bigger context of where we can even consider functors between and , for example. (We use the term coercion analogous to programming languages where coercion describes the implicit conversion of a value into another equivalent value of a different data type). If necessary, we will indicate in what role a small category appears in a certain situation in , namely as an object in (the default case) or as an element in , respectively.
Analogously, we assume corresponding anonymous coercion functors and , respectively. Note that the isomorphisms between small categories and the corresponding objects in as well as the anonymous coercion functors are not living in ! They are located on our third regulative level. Finally, we assume also implicit coercion from the categories , and , respectively, to the regulative level.
In other words, we comply with the following principles: (1) Any item on a certain level of the hierarchy can be used at any level above but it can not be used at any level below the level where it has been declared or constructed. (2) Located on a certain level of the hierarchy, we can see, declare and construct items on this level and on all levels below. (3) We are, however, not allowed to push an item to a lower level! Instead, we have to declare or construct a “new” item on the lower level and establish an isomorphism between the given item and the new item. The lowest level, where the isomorphism could be established, is the level of the given item but sometimes we will be only able to establish the isomorphism on an even higher level.
To achieve Objective 3 (p. 6), we have to pay a small price. In addition to the conventional interpretation of an n-tuple as a “list of values of length n”, we will also work with a more unconventional interpretation. We interpret an n-tuple with and as a convenient shorthand notation for an “indexed array” of length n, i.e., for a set of assignments representing a map with and . That is, the numbers in indicate the corresponding position in the tuple. The empty tuple represents, in such a way, the only map from into A.
Given an -indexed family , of sets, i.e., a map , we denote the set of all maps with for all by , or simply , respectively. Relying on the assumption that is (implicitly) equipped with the total irreflexive order , we can still use the traditional tuple notation to represent those maps, as discussed in the last paragraph. The traditional Cartesian product and are isomorphic and both give us a categorical product of the family of objects in at hand. If necessary, we will use the term traditional tuple to indicate the traditional interpretation of a tuple as a simple “list of values”.
To describe, for example, the concept of a row in Relational Databases (see Section 3.1.5), we also take the step from indexed arrays to “associative arrays”.
Instead of the standard sets of indexes, we consider arbitrary finite sets I of indexes (identifiers, names) with n elements. For an I-indexed set , i.e., a map , we denote by , or simply , the set of all maps with for all . is a categorical product of the I-indexed family A of objects in where for any the corresponding projection map is simply defined by for all .
Each element in can be represented by a corresponding associative array, i.e., by the set of assignments. To be able, however, to utilize the tuple notation to represent the elements in , we have to equip the set I, explicitly, with a fixed (!) total order . Under this assumption, we can then represent each in by the tuple with for all .
In practice, it is often more convenient to work with interpretation categories instead of functor categories. An interpretation of a graph G in a category is a graph homomorphism from G to denoted by . A natural transformation between two interpretations and is a family , of morphism in such that for all edges in G. All interpretations of G in and all natural transformations between them constitute the interpretation category with composition–the vertical composition of natural transformations. (In [10], interpretations are called “models of G in ”, and the notation is used instead of . For our purposes, the more neutral and general term “interpretation” is more convenient, and we do not want to overload the term “model” too heavily). For convenience and uniformity reasons, we will often consider a set A as a graph without edges and use the interpretation category to represent all maps from A into . Moreover, we will also use the more compact notations and instead of or , respectively.
3. Institutions of Statements
Before we are going to define Institutions of Statements, we outline the running examples we have chosen to illustrate and validate our definitions. The reader should be aware that our framework is very abstract and thus also very flexible. It enables us to present one and the same specification formalism in various ways. Thus, the way we have chosen for each single sample formalism may be not the most adequate one and, especially, not the one preferred by the reader.
3.1. Examples
3.1.1. First-Order Predicate Logic (FOL)
Our category independent framework does not incorporate operations. Therefore, we examine many-sorted first-order predicate logic without functions. We consider many-sorted signatures with S a set of sort symbols, P a set of predicate symbols and a map assigning to each predicate symbol its arity. We may sometimes omit the word ‘symbol’ and simply refer to sort symbols as sorts and to predicate symbols as predicates. We show that any many-sorted signature can be represented quite naturally within our framework and therefore gives rise to different institutions of statements. We will demonstrate this by means of a sample signature.
3.1.2. Description Logic (ALC)
Description logics are a family of formal knowledge representation languages. We discuss the prototypical description logic Attributive Concept Language with Complements (ALC) which can be seen as a fragment of unsorted FOL without functions (see [36]). We include this non-classical example to illustrate that our framework may be indeed suitable to describe a wide variety of specification formalisms.
This adaption of First-Order Logic to deal with the practical problem of knowledge representation and the example of DPF demonstrate that contexts and sketches, as they are defined in our framework, appear quite natural as conceptual building blocks in practical specification formalisms.
3.1.3. The Formalism “First-Order Predicate Logic” (mFOL)
This example is meant to provide some evidence that our framework lives up to Objective 1 (p. 4). In the FOL-example, we work within the formalism many-sorted first-order logic without functions. Here, we move one abstraction level up and intend to describe this formalism as such. The “m” in “mFOL” stands for meta.
The sketches in the FOL-example are related to concepts like generators and defining relations in Group Theory and literals and facts in Logic Programming but are not a common ingredient in traditional expositions of First-Order Logic. The sketches that appear in this example, however, reconstruct the concept many-sorted signature as we meet it in the FOL-example. As an example, we reconstruct the sample signature we will work with in the FOL-example. Thus, the FOL-example and the mFOL-example together exemplify the topic of meta-modeling.
3.1.4. Category Theory (CT)
Together with the DPF-example, this example should demonstrate the potential of our framework to support a shift of paradigm from string-based to diagrammatic specification formalisms.
Located on the same abstraction (modeling) level as the examples FOL and ALC and reflecting the viewpoint that a category is a graph equipped with composition and identities, we outline a diagrammatic version of the theory of small categories.
In fact, we take a step back from Ehresmann’s sketches. We restrict ourselves to the language of graphs, composition and identities and reconstruct the concepts commutative diagram, limit and colimit, respectively, by means of diagrammatic first-order statements formulated in this restricted language. The universal properties defining the different kinds of limits and colimits, respectively, do have a uniform and very simple logical structure; thus, we need only a very restricted form of first-order statements to express them. In the light of this observation, our envisioned diagrammatic version of the theory of small categories goes beyond Ehresmann’s sketches in the sense that we allow for utilizing arbitrary first-order statements. Even if we do not need the full “first-order power” to define limits and colimits, this power will be probably useful (or even necessary) to formulate category theoretic statements and to prove them.
3.1.5. Diagram Predicate Framework (DPF)
Now, we arrive indeed at generalized sketches since we will utilize typed graphs instead of just plain graphs as in the CT-example. We are on the same abstraction level as the mFOL-example.
DPF has been developed to describe and relate, in a uniform and precise formal way, a wide variety of diagrammatic modeling techniques in Software Engineering. Each diagrammatic modeling technique, like database schemata, ER diagrams, class diagrams, workflow diagrams, for example, is characterized by a certain footprint. A sketch for such a footprint formalizes then nothing but a single software model. As an example, we outline in this paper a revised and extended version of our diagrammatic Relational Data Model (RM) [18,21].
In Relational Databases, we do have data types and tables with rows and columns. In addition, we can declare different kinds of constraints. A table is identified by a name, and each table has a fixed non-empty set of columns. All columns in a certain table are identified by a unique name; thus, the order of columns is immaterial. It is allowed to use the same column name in different tables. All values in a certain column have to be of the same data type. A table is considered as a set of rows with one cell for each column. In some cells of a table, there may be no values. A row with no values at all is not allowed! Let us declare a table with name T, a corresponding set of column names and a declaration of a data type name for each column name

We represent this declaration by the graph shown above. To define the semantics of table T, we first have to fix the semantics of the data type names by assigning to each data type name a fixed set of data values. This gives us an C-indexed set at hand.
Since there may be no values in some of the cells in a row, we generalize the definitions in Section 2 and describe a row in table T as a partial map with as long as is defined. We denote by , or simply , the set of all those partial maps except the completely undefined map (empty row). For any , we obtain as projection a partial map defined for all by if is defined. These projections turn into a categorical product of the C-indexed set in the category of all sets and partial maps.
Reflecting the idea of a row in a table, we can still utilize the tuple notation, discussed in Section 2, to denote the elements in . We fix a total order on C and represent a partial map by the tuple with if is defined and an anonymous indicator “␣” for nothing in all other cases.
The content of table T may change. At any point in time, however, the content (semantics) of table T is a finite subset of and the semantics of the edges are the corresponding restrictions of the projections .

To discuss constraints, let us consider a database schema declaring two data types Int(eger), String and two tables Empl(oyee), Addr(ess) with columns as depicted in the diagram above.
Since a table is a set (!) of rows, we need a mechanism to identify rows uniquely. These are the so-called primary keys (pk). For each table, one of the columns has to be declared as a primary key. In the example, we declare the primary keys (employee identity) in table and (social security number) in table indicated by underlined names. All values in a primary key have to be distinct and empty cells are not allowed. This means that the corresponding projection has to be injective and total. To require only injectivity, we declare a unique constraint and a not null constraint will enforce a total projection. We may put both constraints on the column in . This will, however, not turn into a primary key but only into a candidate key. A primary key is the one of the candidate keys we have chosen to serve as a primary key!
To store and retrieve information, the tables in a database have to be somehow connected. To find, for example, the address of an employee, we have to consult Table . Foreign key (fk) constraints are the mechanism to connect tables. In the example, we declare a foreign key from column in to column in indicated by a star . A column declared as a foreign key may contain empty cells but any value appearing in this column has to also appear in the column the key refers to. This means, especially, that both columns are required to have the same data type!
The Blueprint for Constructing Institutions of Statements
In the following subsections, we define Institutions of Statements (IoS). Each Institution of Statements is characterized by seven parameters that we will introduce step by step. The reader can keep track of the development consulting the scheme in Figure 1.
3.2. Base Category
To define a certain Institution of Statements, we first have to choose a base category comprising as well the basic syntactic entities as the semantic domains. The base category fixes, somehow, the linguistic and conceptual universe we intend to work within.
Definition 1
(First parameter: Base Category). The first parameter of an Institution of Statements is a chosen base category .
Remark 2
(Uniformity). All components of a logic are related with each other; thus, it seems to be natural to require that they all live in the same category (universe). It turns out, however, that this uniformity requirement is not as trivial, as it looks like at a first glance. Some effort may be needed to present known logic’s and formalisms in such a uniform way. One underlying cause for this kind of additional effort is that we follow the tradition in logic and work here with the semantics-as-interpretation paradigm (Tarskian semantics) (see Section 3.3.2).
One problem could be that we become obliged to reflect a distinction between different syntactic entities, like predicate symbols and sort symbols, for example, already on the semantic level. In the more practical relational data model example, this is quite appropriate while it needs getting used to in the mFOL-example.
In other words: We take the chance to present the mFOL-example in a more unconventional way also with the intention to illustrate the flexibility of our framework.
Example 1
(FOL: Base category). There is a particular dependency in many-sorted first-order signatures. We have first to establish a set of sort symbols before we can define the arity of predicates (compare Chapter 12 in [2]). We fix a set of sort symbols and consider S as a graph (without edges) in . Relying on the coercion (see Remark 1), we choose the interpretation category in as base category . We call the objects in S-sets and the morphisms S-maps, respectively.
Example 2
(ALC: Base category). The prototypical description logic Attributive Concept Language with Complements (ALC) can be seen as a fragment of unsorted FOL without functions [36], thus the category in is our base category of choice.
Example 3
(mFOL: Base category). In this example, we describe the traditional formalism many-sorted first-order logic without functions as such.
In this formalism, sorts and predicates are the only concepts. Therefore, we use the set of concept symbols. Relying on coercion , we define the base category as a slice category . (For any category and any object T in we can define the slice category with objects all pairs of an object A and a morphism in and morphisms given by morphisms in satisfying the condition .) We use the term-typed set for the objects in , i.e., for pairs of a set A and a typing map .
Example 4
(CT: Base category). Located on the same abstraction (modeling) level as the examples FOL and ALC and reflecting the viewpoint that a category is a graph equipped with composition and identities, we outline a diagrammatic version of the theory of small categories; thus, the category of small graphs is chosen as the base category . Note that is isomorphic to the interpretation category with the graph
thus we follow somehow the same pattern as in example FOL.
thus we follow somehow the same pattern as in example FOL.Example 5
(RM: Base category). The relational data model relies on the concepts table, column and datatype. Analogously to example mFOL, we use a graph of concept symbols and define the base category as a slice category relying on the coercion . We use the term -typed graph for the objects in , i.e., for pairs of a graph G and a typing morphism .
3.3. Variables, Features and Footprints
3.3.1. Variables, Features and Footprints: Syntax
Traditionally, the construction of syntactic entities in logic, like terms, expressions and formulas, starts by declaring what variables can be used in the language of a certain logic. Often, we assume an enumerable set of variables and then any term, expression or formula is based upon a chosen finite subset of this enumerable set of variables. Moreover, variable translations can be described by maps between finite sets of variables. Generalizing this traditional approach, we announce what kind of variables we want to use in our institution.
Definition 2
(Second parameter: Variables). As the second parameter of an Institution of Statements, we choose a subcategory of the base category . We refer to the objects in as variable declarations while the morphisms in will be called variable translations.
If has initial objects, we assume that contains exactly one of them denoted by .
This is a completely different view on variables compared to the tradition in the theory of institutions [2], where variables generally depend on the notion of signature.
Example 6
(FOL: Variables). Variable declarations are traditionally just finite S-sets of variables. We take to be the full subcategory of given by all finite and disjoint S-sets with a subset of the set for all .
Example 7
(ALC: Variables). Officially, there are no variables in ALC. To describe ALC as a fragment of FOL we need, however, variables. As , we take the subcategory of with objects all finite subsets of the set and morphisms all injective maps.
Example 8
(mFOL: Variables). We choose as the full subcategory of given by all finite -typed sets such that the pre-image is a subset of the set and .
Example 9
(CT: Variables). The variable declarations are graphs of variables, i.e., we work with two kinds of variables: vertex variables and edge variables that are connecting vertex variables. We choose to be the full subcategory of given by all finite graphs with a finite subset of the set and a finite subset of the set . “e” stands for edge while “v” refers to vertex.
Example 10
(RM: Variables). As , we choose the full subcategory of given by all finite -typed graphs such that the pre-image is a finite subset of the set , is a finite subset of and is a finite subset of , respectively.
Guided by Requirement 3 (p. 4), we introduced variables first and can utilize them now to define arities.
Definition 3
(Third parameter: Footprint). The third parameter of an Institution of Statements is a footprint over given by a set Φ of feature symbols and a map . For any feature symbol , the variable declaration is called the arity of F. We will often write for .
Remark 3
(Terminology: Footprint vs. signature). In most of our applications of DPF, footprints occur as meta-signatures, in the sense that each specification formalism (modeling technique) is characterized by a certain footprint. Each of the formalisms Universal Algebra, Category Theory, First-Order Logic, ER diagrams, class diagrams is characterized by a certain footprint. The sketch data model in [11] corresponds to a certain footprint and so on. For the footprint of the modeling technique class diagrams, we refer to [18,21].
Until today, we used in all our DPF papers the terms signature instead of footprint and predicate symbol instead of feature symbol (compare [13,21]). This turned out to be a source for serious misunderstandings and misleading perceptions; thus, we decided to coin new terms.
Remark 4
(Dependencies between features). Extending Makkai’s approach [15], we worked in [13] with categories Φ of feature symbols, instead of just sets of feature symbols, and with arity functors , instead of just arity maps. Arrows between feature symbols represent dependencies between features. This allows us to reflect, already on the level of feature symbols and thus prior to arities and semantics of features that certain features depend on (are based upon) other features. As examples, one may express that both concepts pullback and pushout are based upon the concept commutative square and that the categorical concept inverse image depends on the concept monomorphism.
Any semantics of feature symbols then has to respect those dependencies. Dependency arrows are a tool to represent knowledge about and requirements on features prior to and independent of any kind of logic. Dependency arrows somehow make the framework of generalized sketches conceptual and structural round.
It may be worth mentioning that the concept of order-sorted algebra is somehow related to our idea of dependencies since it works with arrows between sort symbols [37].
In this first paper about Logics of Statements, we drop dependency arrows due to, at least, three reasons: (1) We do not want to deviate too much from the traditional first-order logic setting. (2) Dependencies trigger an additional theoretical overhead that may be not worth it at the moment. If we introduce dependencies between feature symbols, we should consequently describe, for example, to what extent and how they generate dependencies between feature expressions (introduced in Section 3.4). On one side, this is technically not fully trivial, if possible at all. On the other side, such an effort has no relevance for our applications. (3) The requirements expressed by dependency arrows can be mimicked by the logical tools we are going to introduce later.
Example 11
(FOL: Footprint). We show, first, how an arbitrary traditional many-sorted signature can be transformed into a footprint and then we present a sample FOL-footprint to be used in the forthcoming parts of this example.
The set S of sort symbols has been already transformed into the IoS-setting by choosing the base category . The set of feature symbols is nothing but the set P of predicate symbols. Thus, it remains to transform each into a corresponding S-set of variables.
The empty sequence is simply transformed into the empty S-set . A non-empty sequence gives rise to a list of variable declarations, i.e., to a canonical set of variables, equipped with a canonical total order , together with a map from into S. is defined by for all . In the examples, we will use lists of variable declarations to represent S-sets of variables.
To complete the definition of , we simply set for all .
As an example for a FOL-footprint, we chose with sort symbols “” for person and “” for natural number, respectively. The sample footprint is then defined by the feature symbols with the following S-sets as arities: represented by , represented by , represented by and represented by .
Example 12
(ALC: Footprint). A signature in ALC declares a set of concept names and a disjoint set of role names. In view of Definition 3, this means defining a footprint with , for all and for all .
A signature in ALC also declares a set of individual names (nominals, objects). In our framework, those sets of individual names are considered as contexts (see Definition 11).
Example 13
(mFOL: Footprint). An mFOL-footprint describes which one of the enumerable many formal toolsn-ary many-sorted predicates we will have at hand. As an example, we consider an mFOL-footprint providing the formal tools unary many-sorted predicates, binary many-sorted predicates and tertiary many-sorted predicates, respectively.
We have with given by and , . Analogously to Example 11, we represent the -typed set by the list of variable declarations. is defined by while is given by , respectively. Keep in mind that, for any set M in the interpretation category and the slice category are equivalent.
Example 14
(CT: Footprint). Category Theory relies on a language based upon the concepts object (vertex), morphism (arrow, edge), composition and identity. The concept graph comprises already the concepts object (vertex) and morphism (arrow, edge); thus, a footprint for our diagrammatic reconstruction of the theory of small categories only needs to take care of composition and identity.
We do not have operations in footprints; thus, we have to formalize composition and identity by means of features (predicates). Therefore, the footprint for the formalism Category Theory declares two feature symbols and . The arities of the feature symbols in are described in Table 1:
Table 1.
CT Footprint.
Example 15
(RM: Footprint). The footprint declares features for the concepts table with n columns, primary key, foreign key, not null (total) and unique (injective), respectively. We discussed these concepts in Section 3.1.5 where we introduced the relational data model example. The arities of the feature symbols in are -typed graphs and are described in Table 2. Analogously to Example 13, we use the colon-notation “” to represent the typing morphisms .
Table 2.
Materials and Methods
Remark 5
(Category of footprints). We indicated the arrow from (2) to (3) in Figure 1 as construction+choice since we could straightforwardly define a category of footprints on while we decided to consider only one footprint. To also explore categories of footprints goes simply beyond the scope of this first paper on Logics of Statements. In Remark 20, we will, however, outline, what has to be done if we want or need to work with a category of footprints.
3.3.2. Variables, Features and Footprints: Semantics
To make things not too complicated and to deviate not too far from traditional logic, we work here with the semantics-as-interpretation paradigm, also called indexed or Tarskian semantics. In contrast, we spelled out in [13] the semantics-as-instance paradigm, also called fibred semantics. To define the semantics of variables and features, we first have to decide for (potential) carriers of structures.
Definition 4
(Fourth parameter: Carriers). As the fourth parameter of an Institution of Statements, we choose a subcategory of of (potential) carriers of Ξ-structures.
Example 16
(FOL: Carriers). In this example, we follow the traditional approach and choose simply .
Example 17
(ALC: Carriers). ALC considers only non-empty sets as potential carriers and calls them domains (of an interpretation). Thus, we take as the full subcategory of given by all non-empty sets.
Example 18
(mFOL: Carriers). A potential carrier of a -structure should provide a family of sets to define the semantics of sort symbols as well as a family of sets to define the semantics of predicate symbols. As , we choose therefore the full subcategory of given by all -typed sets with . Note that we consider here (and thus also C) as an element in and not as a subset of (compare Remark 1).
Example 19
(CT: Carriers). We could choose only those graphs that appear as underlying graphs of small categories. We will, however, not restrict ourselves and choose, analogous to Example 16, .
Example 20
(RM: Carriers). Tables are sets of rows and data types are sets of data values while columns can be formalized as maps assigning to each row in a table the value in the corresponding column. As discussed in Section 3.1.5, these maps can be partial since there may be no values in some cells of a table.
Analogous to Example 18, we choose therefore as the full subcategory of given by all -typed graphs with G a subgraph of . We consider here (and thus also G) as an element in and not as a subgraph of (compare Remark 1). Be aware that we can have in G only maps from sets in to sets in since is the only edge in !
The semantics of a variable declaration relative to a chosen carrier is simply the set of all variable assignments (keep in mind that and ):
Structures for footprints are defined in full analogy to the definition of structures for signatures in traditional first-order logic.
Definition 5
(Structures). A Ξ-structure is given by an object U in , the carrier of , and a family of sets of valid interpretations of feature symbols F in U.
Homomorphisms are also defined in the usual way that “truth is preserved”.
Definition 6 
(Homomorphisms). A homomorphism between Ξ-structures is given by a morphism in such that implies for all feature symbols F in Φ and all interpretations .

Identities of carriers define identity homomorphisms and composition of homomorphisms is inherited from composition in . In such a way, we obtain a category of all available -structures. We are, however, free to choose only those structures we are interested in (see Figure 1).
Definition 7
(Fifth parameter: Semantics). As the fifth parameter of an Institution of Statements, we choose a certain subcategory of the category of all Ξ-structures.
Example 21
(FOL: Semantics). In accordance with the traditional approach comprises all -structures , given by an arbitrary S-set U, where as in Example 11, together with arbitrary subsets , , and , as well as all homomorphisms between those -structures.
Example 22
(ALC: Semantics). Any terminological interpretation in ALC includes the choice of a non-empty set , called domain, an interpretation of each concept name in as a subset of and an interpretation of each role name in as a subset of . Obviously, there is a one-to-one correspondence between a terminological interpretation and a -structure in the sense of Definition 5. Homomorphisms are not considered in ALC; thus, is a discrete category.
Example 23
(mFOL: Semantics). In contrast to the Examples 21 and 22, we transform any carrier in (see Example 18) into exactly one corresponding -structure with:
is given by all these -structures and all homomorphims between them according to Definition 6. Note that the homomorphisms in resemble the idea of functors that preserve finite products and monomorphisms (inclusions).
To cover the traditional approach that a predicate in a first-order structure can be an arbitrary subset of a corresponding Cartesian product of sorts (compare Example 21), we choose as the full subcategory of given by all -structures such that is the union of all power sets , , with A, B, C ranging over all the sets in .
Example 24
(Category Theory: Semantics). Analogously to Example 21, comprises all -structures given by an arbitrary small graph U together with arbitrary subsets , , and . That is, we also include structures like categories without identities, categories with partial composition and so on. Moreover, includes all homomorphisms between those -structures.
Example 25
(RM: Semantics). Analogous to Example 23, we transform any carrier in into exactly one corresponding -structure . We take, however, into account that tables do have only finitely many rows:
is the set of all -typed graph homomorphisms such that is a finite (!) subset of and the partial maps are exactly the corresponding restricted projections.
Reflecting the usual definition of foreign keys, we define as the set of all -typed graph homomorphisms such that , i.e., each value in row in table has to appear in row in table .
is the set of all such that is total. comprises, correspondingly, all cases where is injective and all cases where is as well total as injective.
As , we can choose the full subcategory of given by all -structures such that is the union of all power sets with and the ’s ranging over all the sets in . We could require, in addition, that the sets in are restricted to those data types that appear in a certain version of SQL, for example.
3.4. First-Order Feature Expressions
3.4.1. Syntax of Feature Expressions
By a feature expression, we mean something like a “formula with free variables” in traditional FOL. However, we do not consider them as formulas, but rather as derived anonymous features. For us, a formula is, semantically seen, the subject of being “valid or not valid” in a given structure, while the semantics of a feature expression, with respect to a given structure, is the set of all its solutions, i.e., the set of all valid interpretations of the derived feature in this structure. We experience this perspective as the most adequate one when formalizing and working with constraints in Model Driven Software Engineering. Sets of solutions have also been utilized to define the validity of conditional existence equations in [7,9], for example.
Definition 8
(Feature expressions: Syntax). For a footprint over we define inductively and in parallel a family of sets of (first-order) feature -expressions on X, in symbols, where X varies over all the objects in :
- Atomic expressions: for any and any morphism in .
- Everything: for any object X in .
- Void: for any object X in .
- Conjunction: for any expressions and .
- Disjunction: for any expressions and .
- Implication: for any expressions and .
- Negation: for any expression .
- Quantification: and for any expression and any morphism in that is not an isomorphism.
Remark 6
(Notation for expressions). In traditional FOL, X and Y are sets of variables and, instead of arbitrary maps , only inclusion maps are considered. Moreover, only the quantified variables are recorded while Y has to be (re)constructed as the union . In other words, our Y lists all (!) variables that are allowed to appear as free variables in ! We record the whole Y for three reasons: (1) Already in (not to talk about arbitrary presheaf topoi), we do not have complements; (2) We quantify actually over morphisms with source Y when we define the semantics of quantifications (compare Definition 10); (3) In contrast to traditional FOL, is allowed to be non-monic.
We allow non-monic morphims to express identifications. In such a way, we can survive, for the moment, without explicit equations even in cases where is a subcategory of a set-based category. We illustrate this mechanism in the Examples 26 and 29.
If is a subcategory of a set-based category, like , , , or , for example, variable declarations X are constituted by single entities; thus, we can talk about individual "variables". Moreover, inclusions of sets give us corresponding inclusion morphisms at hand. In case, is such an inclusion morphism we will drop φ (see Examples 26, 28 and 29).
If is an isomorphism, quantification is obsolete; thus, we excluded those cases.
Remark 7
(Everything and Void). For the definition of sketch conditions in Section 6, we need another pair of symbols for “true” and “false”; thus, we decided to use for feature expressions the symbols ⊤ and ⊥, respectively.
We consider ⊤ and ⊥ not as logical constants but as special feature symbols, inbuilt in any Institution of Statements (analogously to the equation symbol in Universal Algebra).
To make this statement fully precise, we have to assume that , and thus also , has an initial object . is then the arity of ⊤ and ⊥, while the fixed semantics for any carrier U is given by the two subsets of the singleton , namely and . Consequently, we could use then the same notation as for atomic expressions, namely and where is the unique initial morphism into X.
Remark 8
(Closed expressions: Syntax). If has an initial object , feature expressions of the form will be called closed expressions. Note that quantification will generate closed expressions only in case where is the only choice for φ, in this case.
Example 26
(with the empty S-set) expressing that a child is always younger than a parent.
with defined by the assignments . Note that the -expression on encodes the inequality .
(FOL: Expressions). We intend to illustrate that and how traditional first-order formulas appear in our framework. First, we consider only those cases where the morphism φ in quantifications is an inclusion morphisms and will be therefore dropped.
In Example 11, we proposed to represent finite S-sorted sets by lists of variable declarations. The arity for the feature symbol , for example, is represented by . Pursuing the idea to consider a tuple as a convenient notation for an “associative array”, we can denote the atomic expression , with an -map, simply as .
Relying on this notational convention, we obtain, for example, the closed -expression
Our main point, however, is to consider feature expressions as derived features enabling us to denote properties in an anonymous way. The following feature -expression , for example, gives us the property younger than at hand by hiding the exact age of a person:
The next feature -expression provides the property being a sibling of someone:
For convenience, we could introduce an auxiliary feature symbol with arity and use as a shorthand (macro) for this derived feature expression. The conjunction would then represent a unary property being brother of someone. To ensure that then any feature expression , containing the auxiliary feature symbol , can be expanded into an equivalent feature expression , containing only the original feature symbols and , we need a corresponding substitution mechanism.
Remark 9
(Substitution). Fortunately, we do not need substitution mechanisms to define Institutions of Statements and to utilize them for specifications purposes. We need, essentially, only a category as we show and demonstrate it in this paper. To develop, however, fully fledged and practical Logics of Statements and, especially, corresponding deduction calculi, we will need appropriate substitution mechanisms.
An exhaustive and systematic study on what additional categorical infrastructure we have to presuppose to have handy substitution mechanisms at hand is out of range for this paper. In Appendix A, we present, nevertheless, some first observations, definitions and constructions.
Example 27
(ALC: Expressions). ALC focuses on derived concepts, i.e., in our view, on feature expressions with X a singleton. To describe, however, all derived concepts as feature expressions, we have to use arbitrary finite sets of variables and inclusions between them. We outline the standard encoding of ALC in FOL. Using our notational conventions, the ALC construct “universal restriction for any role , any (derived) concept ”, can be described as follows: For any role in , any expression and any variables , not appearing in , we have: where is given by and the expression is obtained by substituting each occurrence of y in by and by extending each variable declaration Y in by the “fresh variable” (compare Appendix A). Analogously, the ALC construct “the existential restriction of a concept by a role ” can be described by existential quantification: For any role in , any expression and any variables , not appearing in , we have: .
Example 28
(mFOL: Expressions). This is an example where we do not need the full first-order power. Actually, we only need atomic feature -expressions to state that a set is the subset of a unary, binary or tertiary product of other sets.
Example 29 








(CT: Expressions). To support the shift of paradigm from string-based to diagrammatic logic was one of our main motivations to develop our framework. Therefore, we will spend a bit more space and put some more effort on this example.
Representation and visualization of graph homomorphisms: For a finite graph A, we can represent and visualize a graph homomorphism by means of the corresponding graph of assignments with , where and are defined for all by and , respectively. The graphs A and are isomorphic by construction. Note that we actually simply lift the idea of “tuples as associative arrays” to graphs instead of sets of indexes.
We consider the graph Y, visualized below on the left. For the graph morphism , defined by the assignments , , , , , , the corresponding graph of assignments is visualized below in the middle. In many cases, we can fortunately use for the shorthand graph, on the right, without causing unambiguities.

As proposed in [3], we can also work with a sequential representation of the shorthand graph (compare also Example 26): We can represent finite graphs by a list of edges plus a list of vertexes, respectively. Pursuing the idea of tuples as associative arrays, a graph homomorphism is then denoted by a list of image edges and a list of image vertexes in graph B.

In such a way, we can visualize the atomic -expression by the graph above and represent it also by the string . Since has no isolated vertexes, is uniquely determined by the edge-assignments; thus, we could even use the shorthand notation instead.
-Expressions: The local property composition is defined for a certain pair of edges can be formalized by the following feature -expression:

Universal quantification transforms this property into a general property composition is always defined formalized by the following feature -expression, where is the empty graph:

The general property composition is always unique is given by the expression :

where φ simply maps and to . Analogously, we can also represent the other axioms of categories–existence and uniqueness of identity morphisms, both identity laws and the associativity law–by means of feature -expressions. In addition, feature expressions are a handy tool to hide auxiliary items in diagrammatic specifications. The property commutative square, for example, is given by the feature -expression , where we hide the diagonal:

That concepts and constructions are defined byuniversal propertiesis the crucial characteristic of Category Theory as a modeling technique. The concept monomorphism, for example, is defined by the feature -expression :

where φ maps and to . In most cases, however, a universal property is the conjunction of a universally quantified existence assertion and a universally quantified uniqueness assertion (see Remark 10). The concept final object, for example, is defined by the feature -expression where φ maps and to :

In case, we want to work with an explicit property two parallel morphisms are equal, we are free to utilize the -expression where φ maps and to :

Remark 10 
(Limits and Colimits). The fact that the universal properties in Category Theory do have a uniform and relatively simple logical structure shaped the theory of generalized sketches in [15]. The main ingredients of the definition of (co)limits are categorical diagrams, i.e., graph homomorphisms, thus we can beneficially use feature -expressions to characterize the logical structure of the concept (co)limit.
The universal property, defining a finite (co)limit, is a conjunction of two assertions–existence of mediators and uniqueness of mediators. We can express those assertions by feature -expressions with the following structure (compare the definition of the conceptfinal objectin Example 29):

I is the shape graph of the (co)limit, i.e., the empty graph in the case of final objects. adds to I the shape of a (co)cone with base I while extends with the shape of a second (co)cone with base I. is the conjunction of all atomic -expressions on turning both (co)cones into commutative ones. extends by a single mediator while is the conjunction of all atomic -expressions on expressing the commutativity requirements for the mediator. extends by two parallel mediators and is the conjunction of all atomic -expressions on expressing the commutativity requirements for both mediators. simply identifies the two mediators in .
Example 30
(RM: Expressions). To formalize declarations of tables and data base schemes, respectively, we need only atomic feature -expressions; thus, we consider in this example only atomic -expressions. To deal also with so-called business rules, we would need, however, the full spectrum of first-order -expressions.
As seen in the examples, there are cases where we need only a restricted selection of first-order feature expressions. The freedom to select only the feature expressions we are interested in establishes a new parameter (see Figure 1).
Definition 9
(Sixth parameter: Choice of expressions). As the sixth parameter of an Institution of Statements, we choose an -indexed family of subsets of first-order Ξ-expressions on .
Despite the fact that the family , of sets of first-order feature expressions is defined by mutual induction, there is no explicit relationship between the different sets since we do not base the definition of our framework on translation maps induced by variables translations, i.e., morphisms in (see Definition A1 in Appendix A). Therefore, the choice of for a certain X can be made independently from all the other choices! However, if we also incorporate later translation maps, it will be reasonable to require that the choices of the different are compatible with translation maps!
What are natural choices? We could simply choose all first-order feature expressions, i.e., for all , as we will do it in the FOL-example as well as in the CT-example. The other extreme case is to forget about “first-order” and to restrict ourselves to atomic feature expressions. This we have done in [13] and in DPF [18,21] since first-order feature expressions have not been available. For the mFOL-example and the RM-example, it is sufficient to use atomic expressions only.
Besides these two extreme cases, we could, for example, exclude negation or we could choose a minimal set of logical connectives and so on. In the ALC-example, we choose only the first-order feature expressions necessary to encode ALC in first-order logic (compare Example 27).
If has an initial object, we could restrict ourselves to closed expressions only (see Remark 8). In this case, we are back to traditional institutions since we do not need contexts to utilize closed formulas for specification purposes. The definition of closed formulas and of the satisfaction relation for closed formulas goes, however, always via open formulas and therefore any deduction calculus for closed formulas is based on a manipulation of open formulas. In other words: We are convinced that the concept of a context, defined in Definition 11, is relevant and beneficial for any logic beyond propositional logic even for traditional first-order predicate logic!
3.4.2. Semantics of Feature Expressions
Due to Definition 5, a -structure fixes for each feature symbol its semantics in as a set of all valid interpretations of F in U.
Relying on the inductive definition of first-order feature expressions, we can extend the semantics of feature symbols and define the semantics of a feature expression in a -structure as a set of all valid interpretations (solutions) of in . This semantics is a restriction of the semantics of X relative to the carrier U as defined by Equation (1), i.e., . For interpretations , we will use, instead of , also the more traditional notation .
Given a morphism in , we say that an interpretation is an expansion of an interpretation via if, and only if, .

Definition 10
(Feature expressions: Semantics). The semantics of feature Ξ-expressions in an arbitrary, but fixed, Ξ-structure is defined inductively:
- Atomic expressions: iff

- Everything:
- Void:
- Conjunction:
- Disjunction:
- Implication: iff implies
- Negation:
- Existential quantification: iff there exists an expansion ϱ of ι via φ such that .
Universal quantification: iff for all expansions ϱ of ι via φ we have .
Remark 11
(Feature expressions: Semantics). Every feature symbol F in Φ reappears as the Ξ-expression and Definition 10 ensures .
The universal quantification is trivially valid if there is no expansion of ι via φ at all, while the existential quantification is not valid, in this case.
Two expressions and are semantical equivalent, in symbols, if, and only if, for all Ξ-structures in . Definition 10 ensures that we do have the usual semantic equivalences available. In particular, conjunction and disjunction are associative; thus we can drop, for convenience, the corresponding parenthesis as we have done already at some places in the examples.
Remark 12
(Closed expressions: Semantics). For a closed expression (see Remark 8), is a singleton with the initial morphism as the only element. In such a way, we have either , i.e., , or , i.e., .
3.5. Institutions of Statements
Generalizing concepts like set of generators in Group Theory, underlying graph of a sketch in Category Theory, set of individual names in Description Logics and underlying graph of a model in Software Engineering, we introduce in this section the concept of a context as one of our main conceptual and methodological proposals. Furthermore, we introduce the concept statement (in a context) in generalizing the corresponding concepts defining relation in Group Theory, diagram in a sketch in Category Theory, concept/role assertion in Description Logic and constraint in Software Engineering. We use institutions [2,31] as a methodological guideline to define and present the formalisms build upon these new concepts.
3.5.1. Category of Contexts and Sentence Functor
As abstract signatures in an Institution of Statements, we introduce contexts.
Definition 11
(Seventh parameter: Contexts). As the seventh parameter of an Institution of Statements, we choose another subcategory of . The objects in are called contexts while we refer to the morphisms in as context morphisms.
If has initial objects, we assume that contains, at least, one of them denoted by .
Even if is called the “seventh parameter”, the choice of relies only on the chosen and does not depend on all the other parameters we introduced (see Figure 1)!
Remark 13
(Variables vs. context vs. carrier). Introducing contexts, we establish a technological layer independent of “pure syntax” (variables) and “pure semantics” (carriers of structures) as we postulated it in Requirement 2 (p. 3). We prefer to consider variable declarations as something finite or enumerable while contexts can be arbitrary.
In case is a subcategory of , we perceive the inclusion as a change of roles: Variables are essentially syntactic items but can also serve as generators of structures, like groups and (term) algebras, for example.
If we are interested in completeness proofs and corresponding freely generated structures, we have to suppose . Coming back to the discussion in Section 1.1.1, the introduction of contexts allows us to keep syntax and semantics separated and to avoid, in such a way, certain kinds of circularity in the definition of formalisms.
Example 31
(FOL: Context). PROLOG distinguishes between atomic values (literals) and (logical) variables. Literals can be either number literals or symbolic literals.
Our choice of contexts reflects this line of tradition. We define as the subcategory of given by all S-sets with a finite set of literals and logical variables for all .
For the sample footprint with (see Example 11), we consider a sample context K with the set of all natural numbers from 0 to 200 and .
Example 32
(ALC: Context). This example has been chosen since it works explicitly with contexts in our sense. ALC uses the term individual name instead of symbolic literal and contexts in ALC are sets of individual names.
Example 33
(mFOL: Context). In this example, we describe the traditional formalism many-sorted first-order logic without functions as such; thus, a context should declare finite sets of sort and predicate symbols, respectively.
Analogously to the definition of in Example 8, we assume an enumerable set of admissible predicate symbols and an enumerable set of admissible sort symbols. is then the full subcategory of given by all finite -typed sets such that and .
To be able to reconstruct the sample FOL-footprint (see Example 11), we choose for the sample mFOL-footprint in Example 13 the sample context with and .
Example 34 
(CT: Context). We simply choose . As an example, we consider the following finite graph G.

Example 35 
(RM: Context). A context in this example declares the items in a database schema, i.e., a finite graph with table identifiers, datatype identifiers, and column identifiers, respectively. Analogously to Example 33, we assume an enumerable sets of admissible table identifiers, of admissible datatype identifiers and of admissible column identifiers, respectively.
As , we choose the full subcategory of given by all finite -typed graphs such that , and . We intend to formalize the database schema, discussed in Section 3.1.5, and consider the sample RM-context as depicted in the following diagram.

Note that both tables do have a column with name ; thus, we distinguish between them by means of the table identifiers. □
Feature expressions can be utilized to make statements in a certain context. Those statements in context are the sentences in an Institution of Statements.
Definition 12
(Statement). An -statement in context is given by a feature Ξ-expression in and a binding morphism in .
By , we denote the set of all -statements in K.
Statements are part of sketches and examples of sketches are presented in Section 5.
Remark 14
(Atomic statements). For a feature symbol and a context K there can be different variable declarations X, , morphisms , and binding morphisms , such that . That is, the distinct statement expressions and represent somehow the “same statement” in K.
We choose therefore a kind ofnormal formto define the concept atomic statement: Atomic statements in context K are statements of the form , . For any context K we denote by the set of all atomic statements in K.
In abuse of notation, we will sometimes use for atomic statements the same notation as for atomic expressions. Thus, we can, in the examples, take advantage of our notational conventions based on the idea of “associative arrays”.
Remark 15
(General statements and closed formulas). If has an initial object , there is for any closed expression (see Remarks 8 and 12) a unique initial morphism ; thus, we have for any context K and all the closed expressions in . We call a general statement inK.
The general statements in , i.e., statements of the form are the precise formal counterpart of traditional closed formulaswithin our framework. Be aware that there may be statements in with X non-initial.
Remark 16
(Expression vs. statement). The idea behind our definition of statements is to encapsulate the relatively intricate construction of first-order syntactic entities and do it once and for all. In such a way, we achieve the following objectives: (1) There is no need to lift arbitrary “semantic entities”, like elements in the carrier of a structure, to the syntactic level. (2) We can define and work with first-order statements in arbitrary base categories. (3) We do not depend on translation maps (compare Definition A1 in Appendix A) to translate first-order statements. (4) The translation of first-order statements is simply performed by composition in the category !
This encapsulation trick we have seen in [31] where it is used for “initial/free constraints”.
Any morphism in induces a map defined by simple post-composition for all statements in K:

It is easy to show that the assignments and provide a functor . This is the sentence functor of an Institution of Statements.
3.5.2. Model Functor
Interpretations of contexts are the models in an Institution of Statements.
Definition 13 
(Context interpretations). An interpretationof a context is given by a Ξ-structure in and a morphism in .
A morphism between two interpretations of K is given by a morphism in such that for the underlying morphism in .

For any context K in we denote by the category of all interpretations of K and all morphisms between them and by the obvious projection functor.
Note that, for an initial object , the projection functor is an isomorphism.
For any -structure in , the corresponding fiber over , i.e., the subcategory of given by all interpretations of K in , is a discrete category representing the hom-set .
Remark 17
(Functorial semantics). We present in this paper an abstract and general definition of Institutions of Statements covering a brought range of applications. Therefore, we are not assuming any structure on the hom-sets .
In examples, following the path of Functorial Semantics, will be constituted by Ξ-structures where U is provided by a category like or , for example. In those cases, will be a category with morphisms reflecting the idea of natural transformations.
For those special cases, we can vary Definition 13 in such a way that a morphism between the two interpretations of K is given by a morphism in and a morphism in from to ϱ. We are convinced that all the following constructions and results can be transferred, more or less straightforwardly, to this extended version of morphisms between interpretations. We let this as a topic of future research.
Any context morphism induces a functor with:
defined by simple pre-composition: for all interpretations of G, and for any morphism between two interpretations of G the same underlying morphism in establishes a morphism between the corresponding two interpretations of K.

It is straightforward to validate that the assignments and define a functor . This is the model functor of an Institution of Statements.
3.5.3. Satisfaction Relation and Satisfaction Condition
The last two steps, in establishing an institution, are the definition of satisfaction relations and the proof of the so-called satisfaction condition. The satisfaction relations are simply given by the semantics of features expressions, as described in Definition 10.
Definition 14 
(Satisfaction relation). For any context , any -statement in K and any interpretation of context K we define:

Remark 18
(Validity of Closed Formulas). In case , we do have for any Ξ-structure in exactly one interpretation thus for any closed formula (see Remark 15) means nothing but that the closed formula is valid in in the traditional sense. Therefore, we will also write instead of .
Moreover, the validity of closed formulas is context independent in the following sense: For any context K and any closed expressions , we have:
After we developed everything in a systematic modular way, we obtain the satisfaction condition nearly “for free”.
Corollary 1 
(Satisfaction condition). For any morphism in , any -statement in K and any interpretation of context G we have:

Proof.
Due to the definition of the functors and , we obtain the commutative diagram, above on the right, thus the satisfaction condition follows immediately from Definition 14. □
Remark 19
(Satisfaction Condition). As mentioned in the introductory Section 1.1.6, the finding of corresponding assignments and corresponding evaluations enabled us to prove in [29] the satisfaction condition for four formalisms in a systematic, uniform and straightforward way. The proof of Corollary 1 mirrors the essence of this uniform and straightforward way at a very high abstraction level.
Summarizing all definitions and results, we obtain the main result of this section:
Theorem 1
(Institution of Statements). Any choice of a category , of subcategories , , of , of a footprint Ξ over , of a category of Ξ-structures and of an -indexed family of first-order Ξ-expressions establishes a corresponding Institution of Statements .
Remark 20
(Indexed institutions). We come back to the discussion in Remark 5. If we consider a category of footprints over we will obtain, due to Theorem 1, for each footprint a corresponding institution of statements. To lift morphisms between footprints to corresponding morphisms between institutions of statements, we have, however, to coordinate somehow the construction of the different institutions (consult Figure 1).
All institutions should share, besides and also the same categories and . We have to show that this assumption ensures that the assignments can be lifted to a functor . Analogously, the assignments should also provide a functor . Finally, the choices of and have to be aligned in such a way that we obtain corresponding restrictions of the functors and , respectively.
Under these assumptions, we will hopefully be able to establish a category of institutions of statements indexed by the category of footprints; thus, we can benefit from all the nice results and constructions in [2]. In particular, the construction of the corresponding Grothendieck institution will surely become relevant.
4. Institutions of Equations
With this section about Institutions of Equational Statements, or short Institutions of Equations, we start to close the circle to the ideas and motivations discussed in the introductory Section 1.1.1 Universal Algebra and Algebraic Specifications. In these areas, substitutions play a central role and, analyzing the situation in these areas, we may obtain also some hints and guidelines for the future development of a more abstract and general account of substitutions in Logics of Statements.
Equations are the main conceptual tool in Universal Algebra. To define equational statements, we could again apply the encapsulation trick we have used in the last subsections to define statements for footprints with feature symbols only. That is, we could introduce atomic equations , define atomic equational statements in contexts K with and translate atomic equational statements along context morphisms by simple post-composition.
This idea works fine as long as we are only interested in formalisms to describe and specify algebraic structures. The encapsulation approach seems to be not appropriate, however, to describe and work with instances of equations w.r.t. substitutions of variables by terms. The construction of those instances is a crucial tool in any deduction calculus in Universal Algebra; thus, we decided to work instead of the encapsulation-based two-step approach with a one-step approach defining directly equations in contexts K.
This means that we adapt for Institutions of Equations the construction scheme in Figure 1 in the following way: We have . Step (6) is dropped and we construct directly as a set of equations in context K. Correspondingly, the satisfaction relations are defined by means of the evaluation of terms in algebras.
As a complement to the FOL-example, we consider many-sorted total algebras and conditional equations. In this section, we define corresponding Institutions of Equations while conditional equations are formalized and discussed in Section 5.3.
In accordance with the FOL-example, we fix a finite set of sort symbols and choose as the interpretation category . is the full subcategory of given by all finite and disjoint S-sets with a subset of the set for all .
4.1. Signatures, Algebras and Contexts
Signatures correspond to traditional many-sorted algebraic signatures and are given by a set of operation symbols, a map assigning to each operation symbol an object in , its arity, and a map . For convenience, we assume that , ; thus, we can represent as a list of variable declarations (compare Example 11).
We have . As structures, we consider - algebras with an S-set and a family of operations , , where is a shorthand for the set of all S-maps from into A.
A homomorphism between -algebras and is given by an S-map such that for all where the map is defined by for all S-maps .

is the category of all -algebras and all homomorphisms between them.
We choose . The model functor of an Institution of Equations is defined in full analogy to Institutions of Statements.
An interpretation of a context K in , i.e., of an S-set K, is given by a -algebra and an S-map .
A morphism between two interpretations of K is given by a homomorphism such that for the underlying S-map .

For any context K in , denotes the category of all interpretations of K and all morphisms between them and is the corresponding projection functor. The fiber over a -algebra represents the semantics of a context K in , i.e., the set of all S-maps from K into the carrier of .
Note that, in the case of the empty S-set the projection functor is an isomorphism.
Any S-map induces a functor with:
defined by simple pre-composition: for all interpretations of G, and for any morphism between two interpretations of G the same underlying S-map establishes a morphism between the corresponding two interpretations of K.

The assignments and define a functor . This is the model functor of an Institution of Equations.
4.2. Terms and Equations
To define equations, we need terms! For any S-set K the S-set of all -terms on K is defined inductively as the smallest S-set such that:
- for all with the empty S-set .
- for all with non-empty and all S-maps where is the assumed representation of as a list of variable declarations.
A -equation in K is given by two -terms for some and denotes the set of all -equations in K. In the usual way, the inductive definition of -terms allows us to extend any S-map between S-sets to an S-map such that thus induces a map with:
for all -equations in K.

Since and for all , , the assignments and define a functor . This is the sentence functor of an Institution of Equations.
The semantics of terms is based on the evaluation of terms in algebras: Due to the inductive definition of -terms, we can extend any interpretation of a context K in a -algebra to an S-map such that:

In such a way, we can define the semantics of a -term in a -algebra as a map defined by for all . Thus, feature expressions represent derived properties while terms represent derived operations!
4.3. Satisfaction Relation and Satisfaction Condition
Definition 15 
(Satisfaction relation for equations).
For any context , any Σ-equation in K and any interpretation of context K in a Σ-algebra , we define:

The satisfaction condition is ensured by the well-behaved interplay of translations of terms along context morphisms and evaluations of terms.
Proposition 1 
(Satisfaction condition for equations). For any morphism in , any Σ-equation in K and any interpretation of context G in a Σ-algebra , we have:

Proof.
Due to the definition of the functors , and the fact that , we obtain the commutative diagram, above on the right, thus the satisfaction condition follows immediately from Definition 15. □
Summarizing all definitions and results, we obtain the main result in this section:
Proposition 2
(Institution of Equations). Any choice of a finite set S and a signature establishes a corresponding Institution of Equations .
5. Sketches
Any institution gives us a corresponding category of presentations and an extension of the model functor of the institution to the category of presentations at hand [2,31]. We outline this construction for Institutions of Statements and Institutions of Equations.
We would like to use a specific term to distinguish presentations for Institutions of Statements or Equations, resp., from presentations in general. Since many of our motivating examples are variants of sketches, we will simply use the term sketch. In Section 5.1 and Section 5.2, we concentrate on sketches for Institutions of Statements while Section 5.3 outlines the corresponding variations for Institutions of Equations.
5.1. Sketches of Statements: Syntax and Semantics
To be prepared for the topics in Section 6, we introduce a very abstract and semantics-independent concept of sketch.
Definition 16
(Sketch). Let us have a category of contexts and a functor , assigning to each a set of all statements in context K.
An- sketch is given by a context and a set of statements in context K.
In this subsection, we consider the case , with an arbitrary Institution of Statements according to Theorem 1.
All definitions and constructions are, however, institution-independent; thus, they apply analogously to the case , with an arbitrary Institution of Equations according to Proposition 2.
Example 36
(FOL: Sketches). We extend the sample context K in Example 31 to an -sketch with the atomic statements (facts) , , and the proper first-order statements , , , . The expression , representing the property being sibling of someone, and the expression , representing the property younger than, are defined in Example 26.
Example 37
(ALC: Sketches). Contexts in ALC are sets of individual names as already mentioned in Example 32. A concept assertion in ALC, i.e., a statement of the form with and a (derived) concept, can be seen as a statement in where the assignment defines a binding with .
A role assertion, i.e., a statement of the form where and is a role, can be seen as a statement in . An ABox in ALC is a finite set of assertional axioms. Thus, a pair of a set of individual names and an ABox of assertional axioms in is just an -sketch in our sense.
Example 38
(mFOL: Sketches). We extend the context in Example 33 to an -sketch with the atomic statements , , and .
Obviously, this -sketch describes exactly the sample footprint in Example 11! Actually, we can describe all FOL-footprints, declaring only unary, binary or tertiary predicate symbols, as -sketches. This fact confirms that the mFOL-example establishes indeed a meta-level for the FOL-example.
We have to be aware, however, that not all -sketches correspond to FOL-footprints. For each predicate symbol in a FOL-footprint, we have to declare an arity, and this arity should be unique! Therefore, only those -sketches, with exactly one atomic statement for each element in correspond to FOL-footprints. To describe those requirements concerning the structure of sketches, we can utilize sketch implications, introduced in the next subsection, and/or sketch constraints introduced in Section 6.
Example 39 
(CT: Sketches). These are just the sketches, as we know them from Category Theory, with the essential difference that we are not restricting ourselves to commutative, limit and colimit statements only. We do not need to encode, for example, the concept monomorphism by means of pullbacks but can define it directly as a property of edges utilizing the -expressions we discussed in Example 29.

As an example, we consider the context G from Example 34 and extend it to an -sketch visualized above. contains the atomic statements , , and the proper first-order statements:
, , .
Example 40 
(RM: Sketches). We extend the sample context from Example 35 to an -sketch . First, we declare two tables, i.e., contains two atomic statements , with bindings and visualized by the following typed graphs:

Then, we declare for each table a primary key, i.e., we add two atomic statements , with bindings , given by and . Moreover, we declare a foreign key with depicted by .
We could also require that each employee has a name and add an atomic statement with given by .
Analogously to the requirements in Example 38, we do have the requirement that a table identifier can only appear once in a -statement. There are, however, other database specific requirements: Any table should have exactly one primary key, a foreign key has to refer to a primary key, and others. As said before, to describe those kinds of structural requirements, we need sketch implications and/or sketch constraints. □
For any context K in , any set of statements in K and any interpretation of context K in a -structure we define, relying on Definition 14:
Be aware that the statements in S may have different variable declarations X.
Definition 17
(Interpretation of sketch). A valid interpretation (model)of an -sketch is an interpretation of context K such that .
We denote by the full subcategory of determined by all valid interpretations of and by we denote the corresponding restriction of the projection functor .
Remark 21
(Traditional presentations). If has an initial object , we can consider sketches with only containing closed formulas, i.e., statements of the form (see Remark 15). As discussed before, the projection functor , due to Definition 13, is an isomorphism. In such a way, is not only determining the interpretation subcategory but can also be seen as a presentation (specification) of the corresponding full subcategory of isomorphic to .
In other words: due to Remark 18, we can describe as the full subcategory of given by all Ξ-structures in such that for all closed formulas in .
Example 41
(FOL: Interpretations). If we interpret the symbolic literals in by the real persons in our family in December 2021, we will not obtain a valid interpretation of the -sketch in Example 36 since the statement is not satisfied by this interpretation. If we use, however, the statement instead, the interpretation becomes valid.
Note that the statement is satisfied by the interpretation even if there is no witness for this statement in the context. ’s only sister is not present in the context K!
Example 42
(mFOL: Interpretations). An interpretation of the sample context assigns to each element in and , respectively, a set. Since is the slice category , a certain set can either serve as a sort or as a predicate.
Our choice of in Example 23 ensures, in addition, that the valid interpretations of the sample -sketch from Example 38 are in one-to-one correspondence to the -structures in . We do have such a semantical one-to-one correspondence for any FOL-footprint, declaring only unary, binary or tertiary predicate symbols, and the corresponding -sketch. This confirms that the mFOL-example establishes a meta-level for the FOL-example also w.r.t. semantics.
It is maybe worth mentioning that any -sketch with two different atomic statements for, at least, one element in has no valid interpretation at all in .
Example 43
(Category Theory: Interpretations). Since we defined in Example 24 a very liberal semantics, we do have interpretations , of the sample -sketch in Example 39, where the graph homomorphism maps the edges e and f to different edges in U even if both are declared as the composition of a and b.
If we would have also included into the sketch the general statement with the closed expression expressing the property composititon is always unique (see Example 29), could be only a valid interpretation of if ι identifies e and f.
Example 44
(RM: Interpretations). Analogously to Example 42, our choice of in Example 25 ensures that the valid interpretations of “well-formed” -sketches, i.e., -sketches representing database schemata, formalize exactly the traditional semantics of database schemata as outlined in Section 3.1.5.
Morphisms between sketches are defined by means of semantic entailment in a certain Institution of Statements .
Definition 18
(Statement entailment). For any context K in and any sets of statements in K, we say that S entails T in a - structure , in symbols, if, and only if, for all interpretations of K in : implies .
Sentails T, in symbols, if, and only if, for all Ξ-structures in .
Definition 19
(Sketch morphism). An -morphism between two -sketches , is a morphism in such that . An -morphism is calledstrictif .
denotes the category of all -sketches and all -morphisms between them. Its subcategory of all -sketches and all strict -morphisms is denoted by .
We will consider three different kinds of directed relationships between sketches distinguished by three different kinds of arrow-symbols. We choose the arrow-symbol “⤏” for sketch morphisms since it is the kind of directed relationship we will mention the least.
If is clear from the context, we will also use the shorthand notations and instead of and , respectively.
-morphisms with and simply reflect statement entailments. For any -morphism , the condition ensures, due to the satisfaction condition that the functor restricts to a functor from () into (). In such a way, the assignments extend to a functor .
According to well-known general results (see Corollary 4.3 in [2]), we know that has whatever limits or colimits the category has since limits and colimits in the category of -sketches and -morphisms are constructed by means of limits and colimits in the category , respectively (compare Propositions 5 and 6). This ensures also that we do have amalgamation [1,2,38]: maps all colimits in that are preserved by the inclusion , to limits in .
The Theory of Institutions gives us “for free” -sketches, -morphisms, the category as well as the extended model functor.
However, to employ sketches as a specification formalism and to develop deduction calculi for sketches, we need a number of other concepts, constructions and results.
5.2. Sketches of Statements vs. Structures
In the Introduction, we discussed, among other things, two central motivations for the development of our framework: (1) We want to be able to give a general abstract account of the concept of free structures generalizing concepts like a group generated by a set of generators and a set of defining relations. (2) We want to provide an alternative general mechanism to encode structures “syntactically” that avoids the kind of circularity inherent to the technique of “signature extensions”.
In the remaining part of this section, we outline proposals to meet these objectives.
5.2.1. Freely Generated Structures
To reconstruct the concept of a group generated by a set of generators and a set of defining relations, we need operations only. Those cases of free algebras are discussed in Section 5.3.1.
First, We Consider Structures Freely Generated in
A -structure is freely generated in by an -sketch if, and only if, is in and there is a valid interpretation of in that is universal relative to . That is, for all -structures in and all valid interpretations of in there exists a unique morphism in such that in , i.e., such that establishes an interpretation morphism in according to Definition 13.

A -structure, freely generated in by an -sketch , is obviously uniquely determined “up to isomorphism in ” if it exists.
The universal property of entails that is initial in (), thus the projection functor establishes a functor from () into the co-slice category .
In the case that contains only atomic statements, the definition of morphisms between -structures ensures for any morphism in ; thus, the assignments establish a functor from into . Due to the universal property of , we obtain . Together with the equation , this ensures that the two functors establish an isomorphism between and (compare Proposition 4.10 in [2]). This justifies that we can call, in this atomic case, the pair a sketch representation of .
Note that the -structure with a -indexed family of empty sets is trivially freely generated in by .
Second, We Consider Structures Freely Generated Relative to a Subcategory :
Let be an arbitrary full subcategory of . A -structure is freely generated in by an -sketch if, and only if, is an object in and there is a valid interpretation of in that is universal relative to . That is, for all -structures in and all valid interpretations of in there exists a unique morphism in such that in , i.e., such that establishes an interpretation morphism in .

A -structure, freely generated in by an -sketch is, obviously, uniquely determined “up to isomorphism in ” if it exists. In this case, the universal property of entails that is initial in the subcategory of all valid interpretations of in -structures in . Analogous to the case , we obtain, moreover, an isomorphism between and the co-slice category if contains only atomic statements.
Third, We Consider Subcategories Described by Logical Means
One logical means to describe subcategories of are -sketches with only containing closed formulas, i.e., statements of the form . As discussed in Remark 21, those sketches can be seen as presentations in the traditional sense of the Theory of Institutions specifying subcategories of .
As another logical means to describe subcategories of , we will introduce sketch implications in Section 5.2.3 (see Remark 27).
5.2.2. Elementary Diagrams
To establish sketch-based mechanisms to encode structures “syntactically”, we have to assume an Institution of Statements with and for all contexts K in , i.e., contains all atomic statements in K.
There are two canonical ways to transform a -structure into an -sketch. The atomic variant encodes only the semantics of feature symbols and uses therefore only atomic statements:
The full variant is available if for all and encodes the semantics of all feature expressions:
We obviously have . For any statement in U we obtain, according to (13) and the definition of satisfaction relations in Definition 14,
thus is a valid interpretation of as well as of .
In traditional First-Order Logic, we meet the full variant in the form of elementary diagrams [39]. The difference to our encoding is that the carrier of a first-order structure is not considered as a context. Instead, each element of the carrier is added as a constant to the signature. The encoding of structures as sketches avoids this kind of circularity. The “signature extension trick” works only for first-order signatures with constants symbols and, more critically, it requires that the carriers of first-order structures are sets! It looks like the sketch encoding mechanism is much more flexible and general.
The elementary diagrams in [2] give an abstract account of the signature extension approach but are based on an atomic variant of encoding.
There are no structures at all in [15] only atomic sketches! In [13], we followed Makkai and have not considered structures either. Instead, we worked, directly, with the atomic sketch encodings of structures.
To validate, in retrospective, the approaches in [13,15], a noticeable portion of the remaining part of the paper, will be spent to answer the following question:
| Question 4: Is there any justification to ignore completely the concept of semantic structure (model)? |
By construction, any -structure in is freely generated in by the -sketch with the universal interpretation . contains only atomic statements thus becomes a sketch representation of in the sense of the last subsection. In particular, there is an isomorphism between and .
The crucial observation is, however, that the assignments define an embedding of into the category of all -sketches and all -sketch arrows defined in the next subsection in Definition 20. This embedding establishes, moreover, an isomorphism between and the subcategory of given by all atomic -sketches and all strict -sketch arrows between them. An -sketch is atomic if (see Remark 14).
The concepts (atomic) -sketch and (strict) -sketch arrow concern only the “structure” of sketches and are completely semantics-independent. That is, the transition along the encoding functor from the category to the isomorphic category implements an abstraction from the concept semantic structure (model) to the concept atomic sketch. In case , this abstraction is exhaustive. In case , however, we need an additional semantics-independent, purely structural characterization identifying exactly all those atomic -sketches in with in , to make the abstraction complete (see Remark 29).
A sketch is constituted by a context and a set of statements. The informal term “structure of a sketch” takes into account the context; for each statement, the syntactic structure of the corresponding expression and its “location”, i.e., its binding morphism, the set of statements as such and the “distribution” of the statements over the context.
5.2.3. Sketch Arrows and Sketch Implications
We can not only transform -structures into the -sketches and . We can even encode the validity of certain classes of “closed formulas” in by means of semantics-independent, pure structural closedness properties of or , respectively. To see this, we need some preparations.
First, we have to take a step back and consider a very simple, semantics-independent relationship between sketches. To be prepared for Section 6, we define this relationship on the same level of abstraction as Definition 16 (Sketch).
Definition 20
(Sketch Arrow). Let us be given a category and a functor . An arrow between two -sketches , is given by a context morphism . is calledstrictif .
denotes the category of all -sketches and all -sketch arrows between them. Its subcategory of all -sketches and all strict -sketch arrows is denoted by .
If is clear from the context, we will also use the shorthand notations and instead of and , respectively. If and , we will also just write instead of . We consider the case , with an Institution of Statements.
Remark 22
(Sketch Morphisms vs. Sketch Arrows). An -morphism is a -sketch arrow satisfying the semantical morphism condition . Not every -sketch arrow provides an -morphism , but each -morphism has an underlying -sketch arrow.
Any strict -sketch arrow satisfies, trivially, the morphism condition and provides, in such a way, a strict -morphism due to Definition 19.
There is, however, another semantical condition that is kind of dual to the morphism condition. We call this condition the implication condition and, as a “terminological sleight of hand”, we introduce the concept of a “sketch implication”, simply indicating that a sketch arrow is intended to be the subject of this dual semantical condition.
Definition 21
(Sketch implication). An - implication is given by two -sketches , and a context morphism .
An -implication is calledstrictif .
denotes the category of all -sketches and all -implications between them. Its subcategory of all -sketches and all strict -implications is denoted by .
If is clear from the context, we will also use the shorthand notations and instead of and , respectively. If and , we will also simply write instead of .
What we call the implication condition is nothing but the usual condition that an implication is valid if each “solution” of the premise gives rise to a “solution” of the conclusion.
Definition 22 
(Validity of Sketch Implications). Let us be given an -implication between two -sketches and .
Aninterpretation of context P in a Ξ-structure satisfies, in symbols, if, and only if, implies that there exists an interpretation of context C in with such that .
is valid in a -structure , in symbols, if, and only if, we have for all interpretations of P in .

isvalid (in ), in symbols, if, and only if, for all Ξ-structures in .
Remark 23
(Subcategories of valid Sketch Implications). For any Ξ-structure and any -sketch we have . Moreover, and implies . In such a way, the collection of all -implications, valid in a Ξ-structure , defines a corresponding subcategory of with the same objects as .
Intersecting all those subcategories for all Ξ-structures in , we obtain the subcategory of given by all -implications valid in .
Remark 24
(Sketch Implications vs. Sketch Arrows). An -implication is simply another notation for a -sketch arrow . The only difference is that we allow to be the subject of semantical implication conditions , like , while the corresponding -sketch arrow is considered as a pure structural entity without any semantical significance.
In contrast to -morphisms (compare Remark 22), a strict -sketch arrow does not give, trivially, rise to an -implication satisfying semantical implication conditions.
For any -sketch arrow , we can construct a respective strict -sketch arrow with . The satisfaction condition ensures that the corresponding -implications and are semantically equivalent: if, and only if, for all Ξ-structures .
Remark 25
(Sketch Implications vs. Sketch Morphisms). The concepts sketch morphism and sketch implication are skewed but kind of dual. Sketch morphisms talk about “reducts of models” while sketch implications state the existence of “model extensions”.
In case and , a -sketch arrow provides an -morphism if, and only if, while the validity in of the corresponding -implication means semantic entailment exactly in the opposite direction !
Remark 26
(Deduction Rules). Attention, the exposition in the following remarks and examples, relies implicitly on the observation that sketch arrows can be utilized asdeduction rules. A deduction rule, given by a -sketch arrow , issoundfor a certain Institution of Statements if, and only if, the respective -implication is valid in !
The utilization of sketch arrows as deduction rules is triggered by Definition 23 as well as Proposition 3 and Corollary 2 at the end of this subsection and will be discussed shortly in Remark 32.
Remark 27
(Valid Sketch Implications and Axioms). There are -implications (or, more precisely, -implication schemata) that areuniversalin the sense that they are valid in any Institution of Statements , since they reflect the structure and semantics of feature expressions. In particular, the introduction and elimination rules for logical connectives can be described by those universal sketch implications. In case of conjunction∧, for example, we do have the two -sketches and . In addition, the “elimination rule” as the “introduction rule” are universal sketch implications.
For existential quantification, we do also have a kind of modus ponens at hand described by the following universal sketch implication:
The validity of other -implications may only depend on the chosen base category of an Institution of Statements. As long as is a presheaf topos, we do have, for example, -implications at hand expressing reflexivity, symmetry and transitivity of equality, i.e., reflecting the properties of identifications of entities by means of maps (compare the definition of the -expression in Example 29).
Besides universal -implications, we do also have -implications that are valid in all Ξ-structures , and we have chosen to be in . In case , we may be able to axiomatize in the sense that there is a set of -implications such that where is the full subcategory of given by all those Ξ-structures such that for all -implications in .
In the same way, we can utilize any set of -implications as a set ofaxiomsdescribing the full subcategory of given by all those Ξ-structures in such that for all -implications in .
At the end of Section 5.2.1, we described a mechanism to define subcategories of by means of axioms in the traditional Hilbert-style, i.e., by -sketches with only containing closed formulas, i.e., statements of the form . This mechanism can be integrated in the sketch implication based axiomatization mechanism, in a trivial way, by simply adding to a corresponding introduction rule. For certain classes of closed formulas, there exist more elaborated transformations of Hilbert-style axioms into sketch implication based axioms, as discussed in Section 5.2.4.
Example 45
(FOL: Sketch implications). Horn clauses are defined and utilized in PROLOG, in a way that it seems to be appropriate to consider them as sketch implications rather than universally quantified implications. That is, we consider a Horn clause not as a closed formula with a finite conjunction of atomic expressions , with and an atomic expression , , but rather as the corresponding -implication with , and , .
Example 46
(ALC: Sketch implications). A so-called TBox in ALC is a finite set of terminological axioms, i.e., of general concept inclusions . For the way the semantics of general concept inclusions is defined in ALC, they correspond, analogous to Horn clauses, rather to sketch implications (than to closed formulas):
Example 47
(Category Theory: Sketch implications). There are, at least, three ways to axiomatize that all vertices do have an identity. First, we can require, due to Remark 18:
where graph X consists only of a vertex and is the inclusion of X into (see Examples 14 and 29). As proposed in Remark 27, we can equivalently add the introduction rule:
to our axioms. According to a general pattern, discussed in the next Section 5.2.4, we can use, instead, the equivalent rule:
In turn, this second rule can be composed with a simple variant of the modus ponens rule (15), and we obtain a third equivalent rule:
Example 48
(RM: Sketch implication). In DPF, we worked, until now, only with atomic statements and atomic sketch implications called universal constraint. In [18,21], the reader can find many examples of those sketch implications expressing properties like: any table should have exactly one primary key, a foreign key has to refer to a primary key, and many, many others. In Remark 28, we will relate the present DPF-terminology to the concepts introduced in this paper. □
In the remaining part of the subsection, we demonstrate how to encode the validity of sketch implications by a semantics-independent, pure structural closedness property of the sketch encodings of -structures as defined in (13).
For any context P any statement in P and any interpretation of P in a -structure , we have , due to (2), thus the satisfaction condition and the equivalences in (14) provide the following equivalence of statements:

To be prepared for Section 6, we define the closedness property on the same level of abstraction as Definition 16 (Sketch) and Definition 20 (Sketch Arrow).
Definition 23 
(Closedness). Let us be given a category and a functor . A -sketch is closed w.r.t. a- sketch arrow relative to a strict- sketch arrow if, and only if, there exists a strict -sketch arrow such that .

A -sketch isclosed w.r.t. a- sketch arrow if, and only if, it is closed w.r.t. relative to each strict -sketch arrow .
We consider the case , with an Institution of Statements. From Definition 22, Definition 23 and Equation (16), we obtain immediately:
Proposition 3 
(Validity ≅ Closedness). For any -sketch arrow , the following two statements are equivalent for any Ξ-structure :
- The corresponding -implication is valid in , i.e., .
- The -sketch , defined by (13), is closed w.r.t. .

In case of arrows between atomic sketches, we can obviously replace by .
Corollary 2
(Validity ≅ Closedness). For any -sketch arrow with and atomic, the following two statements are equivalent for any Ξ-structure :
- The corresponding -implication is valid in , i.e., .
- The atomic -sketch , defined by Equation (13), is closed w.r.t. .
Remark 28
(DPF–Answer to Question 3). In DPF, we worked, until now, only with atomic statements and we have not considered sketch arrows [18,21]. Having now the concept sketch arrow explicitly at hand, we can gain a better understanding of the present situation in DPF and are able to answer Question 3 (p. 7).
The “specification morphisms” in DPF are strict sketch morphisms in the sense of Definition 19. “Specification entailments” in DPF are sketch implications in the sense of Definition 21 but only of the special kind , i.e., we have, especially, . The validity of specification entailments is defined analogously to the validity of sketch implications in Definition 22.
“Universal constraints” in DPF correspond to strict sketch arrows in the sense of Definition 20, and we defined the semantics of universal constraints in accordance with Definition 23. The crucial flaw is that we used, unfortunately and inadequately, the concept specification morphism to define universal constraints and the closedness property. Effectively, we utilized only the pure structural “strict sketch arrow feature” of DPF specification morphisms for this purpose. However, because of the semantic denotation of the concept specification morphism, this was wrong and caused confusion.
We touched upon the construction of strict sketch arrows , as discussed in Remark 24, but only in the skewed understanding that “each specification entailment gives rise to a universal constraint”. Besides this, we have been aware and utilized the observation that “each universal constraint gives rise to a transformation rule ” (compare Remarks 26 and 32).
5.2.4. Sketch Implications, Closed Formulas and Makkai’s Generalized Sketches
A closer look at the definition of validity of sketch implications in Definition 22 and at the definition of the semantics of feature expressions in Definition 10 makes, straightforwardly, it apparent that the definition of the satisfaction relation in Definition 14 establishes an equivalence between finite sketch implications and universally quantified conditional existence statements (see also Remark 18).
Proposition 4
(Sketch Implications ≅ Closed Formulas). For any Ξ-structure and any closed expression , the following two statements are equivalent:
In the case that and are conjunctions, we can be even more specific.
Corollary 3
(Sketch Implications ≅ Closed Formulas). For any Ξ-structure and any closed expression with and , the following two statements are equivalent:
Finally, we can specialize the equivalence to conjunctions of atomic statements.
Corollary 4
(Sketch Implications ≅ Closed Formulas: Atomic-case). For any Ξ-structure and any closed expression with a finite conjunction of atomic expressions , , and a finite conjunction of atomic expressions , , , the following two statements are equivalent:
Now we are sufficiently prepared to give a reasonable answer to Question 4 (p. 39).
Remark 29
(Answer to Question 4). We discussed in Section 5.2.2 that the assignments establish an isomorphism between and the subcategory of given by all atomic -sketches and all strict -sketch arrows between them.
A sufficient condition to complete the abstraction from structures to atomic sketches is the existence of a set of atomic (!) -implications such that (see Remark 27). The “purely structural characterization of exactly all those atomic -sketches in with in ”, we have been asking for in Section 5.2.2, is then provided by Corollary 2 and is nothing but the closedness of an atomic -sketch w.r.t. all the -sketch arrows underlying the atomic -implications in .
If we are only interested in those subcategories of which can be axiomatized by a set of atomic (!) -implications, we can indeed completely forget about structures and can be content with the “universe of atomic sketches”.
This is exactly Makkai’s approach in [15]. He does not consider Ξ-structures at all. He relies, instead, on categories of atomic -sketches and strict -sketch arrows between them. He uses the term sketch entailment for those strict sketch arrows which are utilized for specification purposes. Note that the restriction to strict sketch arrows means that he works exclusively with sketch entailments of the form (see Remark 24).
In the terminology of Institutions of Statements, Makkai’s approach can be characterized by the choices and for all objects K in . In particular, he focuses on presheaf topoi, i.e., functor categories , as base categories.
The structure of limit and colimit statements (see Remark 10) is strongly related to the structure of those closed formulas that can be equivalently described by atomic sketch implications (see Corollary 4). We guess that this is one of the underlying reasons that Makkai contents himself with atomic sketches and sketch arrows between them?
We should mention, however, that Makkai uses an additional mechanism to be able to reside in the “universe of atomic sketches”. This mechanism (also known in Category Theory as the collage or the cograph of a distributor/profunctor) transforms atomic multi sketches for a presheaf topos and a certain footprint on into plain contexts, i.e., into objects in another presheaf toposwith a category constructed out of and Ξ. We explain and exemplify this construction in Remark 41 in Section 6.
In cases where atomic sketch implications (and thus the corresponding universally quantified conditional existence statements in Corollary 3) are not expressive enough to axiomatize the structures , we are interested in, and where we need more expressive first-order statements, to do the job, we can utilize the general first-order sketch constraints, introduced in Section 6, for a pure structural characterization of the respective atomic sketch encodings (see Corollary 7).
5.2.5. A Semantic Deduction Theorem
We consider semantic entailment between sketch implications.
Definition 24
(Entailment of Sketch Implications). A set of -implications entails an - implication semantically, in symbols, if, and only if, for all Ξ-structures in , it holds that , i.e., for all in , implies .
Any -sketch arrow can be factorized, i.e., can be obtained by composing the -sketch arrows and , where .
Due to Definition 22, for any interpretation of context P in a -structure the statement means nothing but simply the existence of a morphism in such that . That is, we have, especially, if, and only if, if, and only if, . Moreover, this allows for reformulating the validity of sketch implications.
Lemma 1
(Factorization of Sketch Implications). For any set of -implications and any -implication , the following two statements are equivalent:
- and
Lemma 1 means, in practice, that we can restrict ourselves to - implications of the form to specify (axiomatize) subcategories of . By coincidence, we even have a semantic deduction theorem available for those special kinds of sketch implications.
Theorem 2
(Semantic Deduction Theorm). For any set of -implications of the form and any -implication , the following two statements are equivalent:
- For all Ξ-structures in and all interpretations of context in : and implies .
Theorem 2 guarantees that it is a reasonable idea to describe the deduction of sketch implications, which are semantically entailed by a given set of sketch implications, by means of deduction calculi generating new sketches from a given sketch based on a utilization of the sketch implications in as deduction rules. To deduce all (!) semantically entailed sketch implications, it may be necessary to also include deduction rules related to a set of sketch implications representing the choice of , and , respectively (compare Remarks 27 and 29). This is exactly the approach in [6,7].
In [7], we also presented a deduction calculus which constructs directly sketch implications from a set of given sketch implications. Besides the composition of sketch implications, as mentioned in Remark 23, we could choose parallel composition and instantiation as the other basic constructions for such a deduction calculus:
- Parallel composition: and implies
- Instantiation: For any context morphism : implies .
Of course, we could also use, instead, more specialized and sophisticated constructions analogously to resolution in PROLOG or parallel resolution in [7], for example.
Remark 30
(Resolution in PROLOG). In Example 45, we argued that Horn clauses in PROLOG should be rather considered as sketch implications than universally quantified implications.
Concerning resolution, there is also a discrepancy between the theoretical justification and the actual effect of the resolution procedure in PROLOG. Resolution is explained as a special case of the general principle of “proof by refutation” [40]. Actually, PROLOG computes, however, (in a constructive way!) a Horn clause that is semantically entailed by the Horn clauses and the facts in the given PROLOG program (compare the Semantic Deduction Theorem 2).
5.3. Sketches of Equations
For an Institutions of Equations an -sketch is given by a context X in , i.e., an S-set X, and a set E of -equations in X. A valid interpretation of is an interpretation of context X in a -algebra such that , i.e., for all -equations in E according to (9).
Based on these definitions, we can define -morphisms, -sketch arrows and -implications, respectively, exactly in the same way as we have done it for Institutions of Statements in Section 5.1 and Section 5.2. Moreover, we have, obviously, for Institutions of Equations also corresponding variants of Definition 22 (Validity of Sketch Implications), Definition 24 (Entailment of Sketch Implications), Lemma 1 (Factorization of Sketch Implications) and Theorem 2 (Semantic Deduction Theorem) available.
Abstract and Universal Algebra have been developed independent of First-Order Logic and conditional -equations are usually not introduced as “universally quantified implications”. They are rather described as -implications , in the sense of Definition 21 where represents the set of equations in the premise of a conditional -equation and the single equation in the conclusion. In particular, the validity of conditional -equations in -algebras is defined in perfect accordance with Definition 22 (Validity of Sketch Implications) (compare [6,7,41]). Therefore, we will also use the term conditional -equation for -implications with Y, finite and a singleton.
Finally, we reached the point where we can give an answer to Question 2 (p. Section 1.1.1): Yes, Theorem 2 is the general Semantic Deduction Theorem, we have been looking for and the equivalence, mentioned in the question, corresponds to the specialization of the general Semantic Deduction Theorem for conditional -equations.
5.3.1. Freely Generated Algebras
The footprints in Institutions of Equations are algebraic signatures and we have . Conditional -equations are the traditional means to specify subcategories of . Given a set of Conditional -equations, we denote by the subcategory of given by all those -algebras such that , i.e., (as defined in Definition 22) for all conditional -equations in (compare Remark 27).
In case , we may call a conditional -equation with an empty premise. Note that there is a simply but crucial conceptual difference between a -equation and the corresponding conditional -equation with an empty premise. is just a simple statement in context Y while is a tool to make statements about -algebras. Being not aware of this difference is often a source of confusion!
First, We Consider -Algebras Freely Generated in
A -algebra is freely generated by an -sketch if, and only if, there is a valid interpretation of in that is universal relative to . That is, for all -algebras and all valid interpretations of in there exists a unique morphism such that in , i.e., such that establishes an interpretation morphism in (see Section 4.1).

The universal property of entails that is initial in (), thus the projection functor establishes a functor from () into the co-slice category .
In contrast to Institutions of Statements, we have for arbitrary (!) -sketches (and not only for atomic -sketches) that the definition of homomorphisms between -algebras ensures for any homomorphism in thus the assignments establish a functor from into . Due to the universal property of , we obtain . Together with the equation , this ensures that the two functors establish an isomorphism between and (compare Proposition 4.10 in [2]). This justifies that we can call the pair a sketch representation of .
For arbitrary -sketches , a -algebra , freely generated by , exists and is uniquely determined “up to isomorphism”. In the introductory Section 1.1.1, we used the notation to denote those freely generated -algebras.
The -algebra, freely generated by is nothing but the -term algebra on X and the unique morphism is simply the evaluation of terms ( see Equation (8)). In general, can be constructed as a quotient of .
Second, We Consider -Algebras Freely Generated Relative to a Subcategory
Let be a set of conditional -equations. A -algebra is freely generated in by an -sketch if, and only if, , and there is a valid interpretation of in that is universal relative to . That is, for all -algebras in and all valid interpretations of in there exists a unique morphism such that in , i.e., such that establishes an interpretation morphism in .

In this case, the universal property of entails that is initial in the subcategory of given by all valid interpretations of in -algebras in . Moreover, we obtain an isomorphism between and the co-slice category .
For arbitrary sets of conditional -equations and arbitrary -sketches , a -algebra , freely generated by in , exists and is uniquely determined “up to isomorphism”. In the introductory Section 1.1.1, we used the notation to denote those freely generated -algebras. can be constructed as a quotient of .
In case of groups, is a set of conditional -equations with an empty premise, representing the group axioms, and is called the group freely generated by the set of generators X and the set R of defining relations.
5.3.2. Elementary Diagrams for Algebras
For Institutions of Equations, we have chosen . An atomic -equation in a context K is a -equation of the form:
where is the assumed representation of as a list of variable declarations (see Section 4.2). Note that the usual encoding of n-ary operations by (n + 1)-ary predicates establishes a one-to-one correlation between the corresponding atomic equations and atomic statements, respectively.
By , we denote the subset of of all atomic -equation in a context K. The assignments extend to a functor .
In full analogy to Institutions of Statements, there are two canonical ways to transform a -algebra into an -sketch. The atomic variant encodes only the semantics of the operations in :
The full variant encodes the semantics of all terms (derived operations):
We have obviously and is a valid interpretation of as well as of . Any -algebra is freely generated by the -sketch as well as by the -sketch with the universal interpretation . That is, as are sketch representations of in the sense of the last subsection.
Conditional -equations are not atomic; thus, we have to rely on the full encodings of -algebras to have a chance to express the validity of conditional -equations by a closedness property analogously to Proposition 3.
Fortunately, the assignments define an embedding of into the category of all -sketches and all -sketch arrows transforming each homomorphism between -algebras into a strict -sketch arrow.
5.3.3. Generalized Sketch Arrows and Sketch Implications
To be able to formulate a characterization of the validity of conditional -equations by means of a closedness property, in the sense of Proposition 3, we have to consider more general sketch arrows based on the substitution of variables by terms. First, we extend the category by Kleisli morphisms.
Definition 25
(Generalized Context Morphisms). We consider an Institution of Equations and a signature . A - context morphism is given by an S-map . The composition of two Σ-context morphisms , is given by the S-map where is the usual translation of Σ-terms induced by the substitution. denotes the category of all contexts and all Σ-context morphisms.
By construction, is a subcategory of for any signature . Second, the sentence functor extends to a functor with:
for all -context morphisms , i.e., for all S-maps , and all -equations in K. Since and for all S-maps , , this defines indeed a functor.
Remark 31
(Generalized Sketch Implications). We will use, implicitly, strict -sketch arrows to formulate a characterization of the validity of conditional Σ-equations by means of a closedness property in the sense of Proposition 3.
Besides this, it is very tempting to consider also “generalized sketch implications”, defined by -sketch arrows, and to study validity, entailment and factorization for those generalized sketch implications. In particular, it would be interesting to clarify the relation between those generalized sketch implications and the morphisms in the Lawvere theories for partial algebraic specifications we studied in [9].
For now, we overcome this temptation and postpone the study of generalized sketch implications to a following paper. We will concentrate on conditional Σ-equations and corresponding constructions and results.
Before this, we would like to add a short side note: Σ-terms appear on an “internal level” as constituents of Σ-equations and on an “external level” as constituents of generalized context morphisms. Our ongoing studies around graph algebras indicate that we will probably need closely related, but different, concepts for these distinct levels if we want to generalize the idea of operations to graphs (and other kinds of presheaves). □
To avoid headaches, we formulate explicitly the respective instance of Definition 23 for conditional -equations (compare [7]).
Definition 26
(Closedness for Conditional Equations). An -sketch is closed w.r.t. the underlying -sketch arrow of a conditional Σ-equation if, and only if, for all Σ-context morphisms , i.e., all substitutions , it holds that implies .
In addition, here is the respective specialized instance of Proposition 3.
Corollary 5
(Validity ≅ Closedness for Conditional Equations). For any -sketch arrow , the following two statements are equivalent for any Σ-algebra :
- The corresponding conditional Σ-equation is valid in , i.e., .
- The -sketch , defined by Equation (19), is closed w.r.t. the -sketch arrow according to Definition 26.
Remark 32 
(Sketch Arrows as Deduction Rules). The most natural thing to do, if a structure is not closed w.r.t. a certain construction, is to repair this flaw by simply adding the missing parts. Applying this universal “repairing principle” to the closedness property in Definition 26, means nothing but to add new Σ-equations to a given set of Σ-equations by deploying -sketch arrows as deduction rules.
To apply an -sketch arrow as a deduction rule, we have, first, to find amatchof the left-hand side of the rule in an -sketch , i.e., a substitution such that . Second, we apply the rule for this match and generate the -sketch . The resulting commutative square becomes a pushout in the category of all strict -sketch arrows if .

Remark 33
(Answer to Question 1). Based on the concepts sketch, sketch implication, sketch arrow and the related general definitions and results, we presented so far, we can give a kind of reasonable answer to Question 1 (p.3):
Each sketch implication has an underlying sketch arrow and, the other way around, each sketch arrow gives rise to a sketch implication. Due to Proposition 3 (Validity ≅ Closedness), the validity of sketch implications in semantic structures can be, moreover, equivalently expressed by a closedness property of sketch encodings of semantic structures w.r.t. sketch arrows.
Each sketch arrow of the form can be utilized as a rule allowing us to deduce new sketches from given sketches (as exemplified in Remark 32). Proposition 3 and Theorem 2 (Semantic Deduction Theorem) ensure that those deductions are sound and that they allow us, moreover, to deduce sketch implications semantically entailed by a given set of sketch implications.
6. Sketch Conditions and Constraints
In the preceding sections, we identified two main motivations to develop concepts and tools, deploying the expressiveness of first-order logic, to describe and reason about the structure of sketches. First, there is the need for those tools to specify the syntactic structure of software models. The second, more general, motivation concerns the structure of sketch encodings of semantic structures. If we use first-order tools to axiomatize the semantic structures we are interested in, it would be good to have corresponding first-order tools to axiomatize and reason about the sketch encodings of those semantic structures.
Software models are usually graph-based structures, thus we should not ignore the concepts and tools, developed in the area of Graph Transformations, to describe and axiomatize the structure of graphs. Therefore, we discuss in this section also four representative first-order based approaches to describe and axiomatize the structure of (different kinds of) graphs [22,23,24,25]. We will present a universal and fully first-order mechanism to describe the structure of sketches which unifies and generalizes all these approaches.
6.1. Abstract Sketches
In this section, we consider sketches independent of Institutions of Statements or Institutions of Equations, respectively. That is, we rely on Definition 16 (Sketch) and assume a category of contexts and a functor assigning to each a set of all statements in context K. An -sketch is given by a context K in and a set of statements in context K. For any statement , we will denote the image also simply by .
Guided by Definition 23 (Closedness) and Proposition 3 (Validity ≅ Closedness), we focus on the category of all strict -sketch arrows according to Definition 20 (Sketch Arrow). Generalizing the constructions and results in [19], one can prove that has pushouts and pullbacks as long as does.
Proposition 5 
(Pushouts). Let be a span of strict -sketch morphisms. If there exists a pushout of the span of morphisms in , then the diagram, below on the left, is a pushout in , where:

Proposition 6
(Pullbacks). Let be a cospan of strict -sketch morphisms. If there exists a pullback of the cospan of morphisms in , then the diagram, above on the right, is a pullback in where:
Remark 34
(Adhesiveness). The concept of Adhesive Category has been introduced by Lack and Sobociński [42] and is based on the so-called Van-Kampen squares (see [14,20,43]). Adhesive categories are intensively used to present, systematize and generalize concepts, constructions and results in the area of Graph transformations [14]; thus, it seems to be worth including this remark.
The category will be, in general, not adhesive, even if is adhesive, since in Proposition 5 is not constructed by a pushout in and in Proposition 6 not by a pullback in either.
To repair this deficiency, we can work with “multi sketches” where statements do have their own identity. Amulti- sketch is given by a context K, a set of identifiers and a map . Astrict arrow between two multi -sketches and is given by a morphism in and a map such that for all . Pushouts in the category of multi -sketches and strict arrows can always be constructed by componentwise pushouts of contexts in and of sets of identifiers in , respectively. To ensure that componentwise pullbacks in and , respectively, give us a pullback in , we have to assume, however, that the functor preserves pullbacks.
This is the case for the sentence functor in any Institution of Statements as well as the sentence functor in any Institution of Equations.
If preserves pullbacks, the monomorphisms in are exactly the componentwise monomorphisms and becomes adhesive if is adhesive. Note that any topos is adhesive [44], thus especially the categories in Institutions of Equations are adhesive.
Example 49 
(Category Theory: Sketches (modified)). For didactic reasons, we need for this section an example of an atomic sketch. We modify therefore the Category Theory example: We add to in Example 14 the feature symbols with arity and with arity . Correspondingly, we vary the sample -sketch in Example 39 by dropping the statement and replacing the statements , by corresponding atomic statements and , respectively.

Example 50
(GraTra: Sketches). Traditionally, there is no explicit use of “statements” in the area of Graph Transformations; thus sketches, in our sense, are just plain contexts where different kinds of graphs are chosen as contexts in the different approaches.
In [23], is a category of directed, labeled multi graphs and Ref. [24] restricts to a category of finite directed, labeled multi graphs. In contrast, Ref. [22] works with directed, labeled simple graphs in the sense that parallel edges with the same label are not allowed. Ref. [25] uses as a category of directed, labeled multi graphs typed over a graph .
To a certain extent, we can, however, interpret the transition from graphs to labeled/typed graphs as the utilization of rudimentary forms of “statements”, in our sense, where the choice of label alphabets or type graphs , respectively, corresponds to the choice of footprints. The encoding of binary relations by means of labeled edges in [22] makes this analogy apparent. In view of Institutions of Statements, we can reconstruct the concept of graph in [22] in the following way: is the subcategory of given by all subsets of a “countable universe of nodes ” and has a two-element set as its only object. The footprint is given by a “countable universe ” of predicate symbols with for all . An atomic -statement in context is, in such a way, given by a and a binding (see Remark 14 (Atomic Statements)). Relying on the isomorphism between the Cartesian product and the set of maps, it is easy to check that the category in [22] is isomorphic to the non-adhesive (!) category of all -sketches and all strict sketch arrows.
6.2. First-Order Sketch Conditions and Constraints
Generalizing different variants of graph conditions [14,22,23,24,25] as well as universal conditions and negative universal conditions in DPF [18,21], we define general first-order sketch conditions, which are redundant in the sense that we introduce, for example, as well existential as universal quantification and as well a symbol for “true” as the the empty conjunction . We define fully fledged first-order conditions and do not restrict ourselves to the traditional approach in Graph Transformations to define tree-like first-order conditions only (even if we see the practical relevance of those tree-like conditions). We define first-order sketch conditions in full analogy to the Definition 8 of first-order feature expressions. We underline, however, that feature expressions are “finitary syntactic entities” while sketch conditions have rather the flavor of sets of structural requirements!
Definition 27
(Sketch conditions: Syntax). For a category and a functor , we define inductively and in parallel a family of sets of first-order - sketch conditions in context K, or in symbols, where K varies over all objects in :
- Statements: for any context K.
- True: for any context K.
- False: for any context K.
- Conjunction: for any set of conditions in K.
- Disjunction: for any set of conditions in K.
- Implication: for any conditions and .
- Negation: for any condition .
- Quantification: and for any condition and any morphism in that is not an isomorphism.
Remark 35
(Sketch conditions: Syntax). Non-monic morphisms are also used in [22,23,24] to express identifications.
For sketch conditions, we apply the same notational conventions as described in Remark 6 for feature expressions.
If is an initial object in , we call aclosed- sketch condition.
Remark 36
(GraTra: Conditions). If we drop in Definition 27 the “Implication” rule, we would obtain tree-like conditions analogously to the conditions in [23,24,25], where the tree structure is established by the context morphisms in the “Quantification” rule and the choice of the sets C in the “Conjunction” and/or “Disjunction” rule, respectively.
To cover also the tree-like conditions in [22], we have, in addition, to replace the “Quantification” rule by a rule like:
- Guarded quantification: for , any quantifier free condition , any condition and any morphism in .
Those tree-like conditions can be seen as a generalizing modification of the Q(uantifier)-trees of the language of diagrams in [28].
In [23,25], only existential quantification is used and is encoded by . In [24], the symbols “∃” and “∀” are used in a bit unconventional, but consistent, way: In view of Definition 27, the symbol “∃” in [24] combines “disjunction and existential quantification” while “∀” combines conjunction and universal quantification. The conditions in [24] correspond to sketch conditions that can be generated by a single rule like:
for any family of context morphisms and any conditions , . is encoded in [24] by the empty conjunction and by the empty disjunction , respectively.
Generalizing the traditional approaches [14,22,23,24,25] to define a satisfaction relation between graph morphisms and graph conditions, we can define a satisfaction relation between context morphisms and sketch conditions.
More precisely, we consider interpretations of contexts K in -sketches and define valid interpretations of -sketch conditions in K.
Definition 28
(Sketch conditions: Satisfaction). We define inductively and in parallel a family of satisfaction relations between interpretations of contexts K in -sketches and -sketch conditions on K:
- Statement: For all : iff .
- True:
- False:
- Conjunction: iff for every .
- Disjunction: iff for some .
- Implication: iff implies
- Negation: iff .
- Existential quantification: iff there exists a with and
Universal quantification: iff for all with we have
The satisfaction of graph/sketch conditions by a graph/context morphism is a powerful and practical useful tool to control the application of transformation rules. This is extensively demonstrated and validated in the Graph Transformation literature as in [14,22,23,24,25], for example. In DPF, we used until now only non-nested negative application conditions to control the application of non-deleting model transformation rules [18,21]. The paper paves the way for utilizing arbitrary first-order conditions to control model transformations in DPF. In this paper, we will, however, not explore this promising direction of applying first-order sketch conditions. We rather concentrate on two other aspects of diagrammatic modeling techniques–namely “syntactic structure” of models and “deducing information from and reason about models” in a diagrammatic manner.
Developing and applying DPF, we realized that typing mechanisms are not powerful enough to formalize all relevant restrictions concerning the syntactic structure of models. To overcome this deficiency, we introduced “universal constraints” and “negative universal constraints” [18,21] analogous to the non-nested graph constraints in [14].
Fortunately, sketch conditions and their satisfaction, as defined in Definition 28, now give us also more powerful general first-order sketch constraints at hand to describe the syntactic structure of models. The simple, but crucial, observation is that an assertion can be interpreted as well as an assertion concerning the structure of .
Definition 29
(Sketch constraints). An - sketch K- constraint on context G is given by a context K, a sketch condition in context K and a context morphism .
An -sketch satisfiesthe K-constraint , in symbols, if, and only if, .
Remark 37
(Attached Statements). Only at this point and a few days before the paper deadline, we realized that it may be beneficial to apply the “reinterpretation principle” in Definition 29 also to structures. That is, for any Ξ-structure , context K, morphism and statement in K we can define:
and may call the pair a statement attached to or a statement about .
To realize this idea, would, however, require a major revision of the paper.
If the sketch condition c does not contain any statements, as it usually the case in the area of Graph Transformations (compare Example 50), is just an assertion about the structure of the context G. In all other cases, tells us also something about the presence or non-presence of statements as well as the relations between the statements in .
Due to rule “Statement”, all statements reappear as conditions. The following simple corollary illustrates that the requirement for strict sketch arrows to preserve statements “on the nose” encodes a structural constraint on the target.
Corollary 6
(Strict Sketch Arrow vs. Sketch Constraint). A context morphism constitutes a strict -sketch arrow between two -sketches and if, and only if, .
Remark 38
(General constraints). A K-constraint is, in general, only a local constraint, in the sense that it constrains the structure of “around the image” of K w.r.t. τ. Thus, in case and , is an assertion about the structure of as such.
If has an initial object , any closed condition gives rise to a sketch constraint with the initial morphism into G. is a general constraint, in the sense that the statement can be seen as a characterization of the overall structure of . In the Graph Transformation literature, only general constraints have been considered [23,25].
6.3. Statements and Sketch Constraints
In this subsection, we outline that first-order sketch constraints give us indeed the means at hand to express the validity of statements in semantic structures, in an equivalent way, by structural properties of sketch encodings of those semantic structures (see Remark 29). In particular, we are interested to extend Makkai’s approach and to encode the validity of arbitrary first-order statements in semantic structures by structural properties of atomic sketch encodings.
Thus, we go back to the setting in Section 5.2.2 and assume an Institution of Statements with , and thus for all contexts K in , i.e., contains all atomic statements in K.
We consider the instances of Definition 27 and Definition 28, respectively, for the category of contexts and the functor assigning to each context K the set of all atomic statements in K as described in Remark 14.
Definition 27 of the syntax of sketch conditions follows exactly the same pattern as Definition 8 of the syntax of feature expression; thus, it should be possible to translate, for any context K, the statements in K into -sketch conditions on K. This is indeed possible! However, to be able to translate quantifications, we have to assume that has pushouts (compare Appendix A).
Definition 30
(From Statements to Sketch conditions). We assume that has pushouts. For an arbitrary but fixed choice of pushouts in we construct inductively and in parallel a family of maps , where K varies over all objects in : For arbitry variable declarations X and arbitrary binding morphism , we define
- Atomic expr.:
- Everything:
- Void:
- Conjunction:
- Disjunction:
- Implication:
- Negation:
- Quantification:for where is the chosen pushout of .
Remark 39
(Translation of Feature Expressions). Every feature expression reappears as the statement , thus we can consider as the translation of the feature expression into a -sketch condition.
Besides syntax, also Definition 10 of the semantics of feature expressions (and thus Definition 14 of satisfaction of statements) and Definition 28 of satisfaction of sketch conditions (and thus Definition 29 of satisfaction of sketch constraints) follow exactly the same pattern. This enables us to prove straightforwardly that the family of translation maps establishes an equivalence between first-order statements and first-order -sketch conditions. Note that the proposal in Remark 37 would make the statement in the following proposition even more catchy.
Proposition 7
(Statements ≅ Sketch Constraints). For any Ξ-structure , context K, morphism and statement in K we have:
where is the atomic sketch encoding of structure as defined by (12).
Instantiating this equivalence for the identity on U gives us exactly what we have been looking for, namely that the atomic sketch encoding of structures in an Institution of Statements encodes likewise all properties of structures that can be expressed by first-order statements and formulas.
Corollary 7
(Statements ≅ Sketch Constraints). For any Ξ-structure and any statement in U we have:
where is the atomic sketch encoding of structure as defined by (12).
The case , and thus , corresponds to closed formulas and, due to Remark 18 (Validity of Closed Formulas), Corollary 7 ensures that we can detect all closed formulas that are valid in , by inspecting the atomic sketch encoding .
Proposition 7 and Corollary 7 are very good news for DPF and any other diagrammatic approach to Software Engineering. They ensure that we can describe both structure and constraints in the same diagrammatic, modelcentric format. There is, in principle, no need to combine diagrammatic models with dissimilar descriptions, like OCL code, for example, even if it comes to first-order properties. We can reason about and deal with a real system at a higher level of abstraction within one and the same diagrammatic paradigm!
Example 51 





(CT: Sketch constraints). Relying on Definition 30 and Remark 39, we can translate all the sample -expressions in Example 29 into corresponding sketch conditions. Concerning the visual representation, there is no essential difference between a -expression and the corresponding sketch condition: We replace ▹ by ▸ and ⊤ by . We rewrite to and so on.
The -expressions in Example 29 is transformed into the sketch condition

and the -expressions , representing the property composition is always defined, is transformed into the sketch condition:

For the sample sketch in Example 49, we do have , with given by the assignments , but , with given by , thus . General constraints imposing uniqueness of composition, independent of the existence of composition, can be formulated by the closed condition :

φ simply maps and to . does not satisfy the constraint but would satisfy it if we delete the edge "f", for example. The remaining requirements–existence and uniqueness of identities, identity laws and associativity law–can be expressed analogously.
Besides formalizing the "laws of a category", we can also take advantage of our knowledge about the properties of the features in –or to put it the other way around: We can formulate requirements that any intended semantics of the feature symbols in has to comply with. For example, we can require that, for a final object, all outgoing morphisms are monic:
We can require that monomorphisms are closed under composition:

Note that we use because the single triangle between the curly brackets visualizes, actually, three atomic -statements! We can also express our knowledge concerning the decomposition of monomorphisms:

simply because there is no match in G of the triangular context in satisfying the premise of the implication in . In contrast, with the only counterexample given by the assignments .
To be prepared for discussions, later in this section, we consider also the sketch condition defining the concept monomorphism and obtained by transforming the -expressions in Example 29:

where φ maps and to .
6.4. Sketch Arrows, Constraints, Deduction, Meta-Modeling
In this subsection, we present vital observations, insights, concepts and ideas to establish a basis for the future further development of the “logic dimension” of Institutions of Statements and, especially of DPF, based on the new concepts and results presented in this paper.
Constraints in DPF at Present
Following [15] and analogous to [14], we use in DPF until now, instead of sketch constraints in the sense of Definition 29, only plain sketch arrows and call them (positive) universal constraints or negative universal constraints, respectively [18,21]. We define the satisfaction of universal constraints in DPF by means of the closedness property in Definition 23. That is, a sketch satisfies the “universal constraint” if, and only if, for any strict sketch arrow there is a strict sketch arrow such that .
By Proposition 7, we can transfer many findings in Section 5.2.3 and Section 5.2.4 into the sketch constraints setting. Corollary 6 and Definition 28 ensure that the satisfaction of a universal constraint in a sketch can be equivalently expressed by the assertion that satisfies the general constraint with (compare Corollary 3):
.
Be aware that the identifier in does not refer to the sketch arrow but to the underlying context morphism . Note further that we can replace by without losing the equivalence!
Furthermore, we say that a sketch satisfies the "negative universal constraint" if, and only if, for any strict sketch arrow , there does not exist a strict sketch arrow such that . This requirement is equivalent to the statement that satisfies the general constraint with:
What can we do if a sketch does not satisfy a general constraint for a simple condition of the form where is a set of statements in L and a set of statements in R, respectively?
We can repair this flaw by applying the sketch arrow as a transformation rule for all sketch morphisms not satisfying the conclusion in condition c. In other words, a match of the transformation rule is given by a context morphism such that and . Note that the negative application condition ensures that we do not apply the rule twice for the same match . Applying the rule via the match means nothing but to construct a pushout in the category of sketches and strict sketch arrows (compare Remark 32).

Depending on the properties of the context morphism the pushout construction may have different effects. The context G can be extended and/or factorized and, if , we will add new statements to the statements originating from .
In terms of sketch constraints, we can describe the crucial effect of the rule application as follows: satisfies the constraint in addition to the constraint inherited from .
Example 52 
(Repairing -sketches). As discussed in Example 51, there is one violation of the general constraints uniqueness of composition by the -sketch in Example 49 and one violation of decomposition of monomorphisms. Repairing these two violations by pushout constructions, as described above, will result in a -sketch like the one visualized below.

also does not satisfy the general constraint definedness of composition and the general constraint existence of identities that has not been formalized in Example 51. We do not want to require that any -sketch satisfies these two general constraints since we do not intend to use -sketches just as encodings of categories but rather as (hopefully finite) representations of (possibly infinite) categories. This is the original purpose of sketches in category theory. See also the later discussion in Remark 40.
Deduction
Generating new statements from given statements by means of rules is the essence of deduction in logic. An interesting observation is that the “repairing procedure”, discussed in the last paragraph, can be also described as a procedure deducing new sketch constraints from given sketch constraints.
We consider a sketch together with a set of sketch constraints on G. If contains a general constraint with , we can deduce a local sketch constraint on G for any context morphism . This step corresponds to the universal elimination rule in classical first-order logic.
We do have a sound “quasi-propositional” modus ponens rule schemata for sketch constraints at hand: For all contexts X, all sketch conditions , and all context morphisms , the sketch constraints and imply the sketch constraint .
If there is a constraint , we can apply this modus ponens rule and deduce the sketch constraint on G. Keep in mind that ! The pushout construction generates, finally, the constraint on H. This looks very much like an analogon to Skolemization in classical first-order logic. More precisely, we can consider this pushout construction as a pendant to the introduction of Skolem constants. This is quite in accordance with the characterization of operations in graph term algebras by pushouts in [3].
As another example, motivating the use of sketch constraints as “first class citizens”, we discuss atomic -statements, as introduced and discussed in the Examples 39 and 49: We included now the feature symbols and in our sample footprint to exemplify, in a more appropriate way, the use of feature symbols in diagrammatic specifications in general. In Example 51, we discussed, first, that we can specify known or desired properties of features by means of sketch conditions. Later, we have shown that we can even express the universal properties, defining the concepts “monomorphism” and “final object”, respectively, by means of sketch conditions.
Given a -sketch , the sketch condition , defining the concept monomorphism, may help us to deduce from the -statements, present in that two parallel edges in G have to be identified. We need just a rule which generates for each atomic -statement in a corresponding sketch constraint on . This works so easy, since we designed our examples in such a way that the context of is just . In general, any atomic -statement and any condition may generate a sketch constraint for any context morphism . Since binds all “free variables” in , we just need to adapt the three steps (1) universal elimination, (2) modus ponens and (3) Skolemization, as discussed above for general constraints, to deduce identifications of parallel edges in G.
To keep as small as possible, we have not included in feature symbols for other limits and colimits like , , , , for example. Employing sketch constraints we can even avoid to do this! As discussed in Remark 10, any (co)limit of shape I is axiomatized by the feature -expressions and .
Analogous to “anonymous functions” in programming, we can use the sketch condition as an anonymous feature representing the (co)limit concept that corresponds to the shape graph I. With anonymous features, we can not formulate statements, i.e., entities within a sketch , but constraints, like on the sketch .
There should be now sufficient evidence that it will be beneficial to work in future DPF with sketch constraints as first class citizens and our discussion suggests, especially, to employ pairs of a sketch and a set of sketch constraints on as an appropriate formalization of software models. We call those pairs constrained sketches.
Remark 40
(Constrained sketches in MDE). Our approach to use and develop DPF as a theoretical foundation of MDE is based on the idea that any diagrammatic specification formalism/technique is characterized by a certain choice of a category and a footprint Ξ where the corresponding diagrams/models can be described as -sketches. Sketch conditions and sketch constraints have been developed to provide the necessary additional means to describe/constrain the syntactic structure of diagrams/models. In such a way, we can characterize now a diagrammatic specification formalism not only by a certain category and a certain footprint Ξ but also by an additional set of -sketch conditions.
We should, however, distinguish between two kinds of -sketch conditions: The first kind of conditions is used to formulate those constraints on -sketches that can be legally used as elements in . For a constrained -sketch , the occurrence of a constraint in will certify that . Requirements for the relational data model [18,21] like “every table must have a primary key” and “a foreign key should only refer to a primary key” will be formalized by conditions of this kind.
Conditions formalizing requirements like “inheritance is transitive” or “a subclass inherits all attributes of all its superclasses”, however, should not be included in any to avoid diagrams/models becoming too polluted with redundant information. Those additional conditions are part of the formalism as a whole and represent the background knowledge and rules that can be used to deduce for any constrained sketch information from the information given in and , respectively, and to repair violations of the constraints in .
Conceptual Hierarchy
Introducing constrained sketches teleports us “back to start” but on a higher conceptual level: We do have a category of sketches. To any sketch , we can assign the set of all sketch constraints on context G with c a first-order sketch condition in according to Definition 27. Analogously to the translation of statements in Institutions of Statements, we can define for any sketch morphism a map by simple post-composition with the underlying context morphism : for all . This gives us trivially a functor at hand.
This situation is, however, just an instance of the abstract pattern we started with in this section: The category can be taken as an instance of and the functor as an instance of , respectively. The constrained sketches are then nothing but the “abstract sketches” for this instance! We can now consider first-order sketch conditions and sketch constraints for this new instance and will finally obtain a further instance of the “abstract pattern”. Potentially, we can even iterate this procedure ad infinitum.
Iterating this procedure is maybe not that relevant for DPF at the moment. We take it, however, as a good sign that our category independent approach allows us to move in and furnish the next higher level in the conceptual hierarchy whenever it is necessary and/or opportune.
Remark 41 

represents the graph K. The set holds all the identifiers with while the maps , , encode all the corresponding bindings . Morphisms in , i.e., natural transformations, encode strict -sketch arrows between multi -sketches .
(Makkai’s Hierarchy of Sketches). We continue the discussion in Remark 29 and rise the question: How is our conceptual hierarchy related to the “hierarchy of sketches” in [15]?
Makkai considers only atomic statements and starts with a presheaf topos, i.e., a functor category . Note that topoi are adhesive [44]! As an example, we consider the presheaf topos:

Then, he describes an instance of a general construction in Category Theory: For any footprint , , there is a category such that the category of multi -sketches (see Remark 34) is isomorphic to the presheaf topos .
can be constructed as follows: We take the disjoint union of Φ (as a discrete category) and . For any feature symbol , any object C in , and any , we add an arrow . Finally, we define the composition for the new pairs of composable arrows: for all in .
As an example, we take with arities as in Example 49. The category is visualized below. Composition in is defined by the equations , and these equations encode the arity of ! The isomorphism transforms any multi -sketch into a corresponding functor .

represents the graph K. The set holds all the identifiers with while the maps , , encode all the corresponding bindings . Morphisms in , i.e., natural transformations, encode strict -sketch arrows between multi -sketches .After transforming into , we can define another footprint , on this next level of the hierarchy and start again but this time with atomic -statements.
There are no sketch conditions in [15] but any multi -sketch corresponds to the -sketch condition and any strict -sketch arrow corresponds to a -sketch condition of the form . As we have seen, sketch conditions of this special form, and thus strict -sketch arrows, allow us to axiomatize arbitrary limits or colimits, respectively.
In such a way, all the arities in the footprint correspond to very simple -sketch conditions that are just conjunctions of -statements and atomic -statements are simply conjunctions of those conjunctions of -statements, which are introduced by the arities and obtained the “label” P’.
As an example, we consider the footprint , with and arities as in Example 14. For the footprint , , we assume that, for any , the arity corresponds to an -sketch that represents one of the commutative (co)cones described in Remark 10. In such a way, an atomic ’-sketch represents a graph with a set of commutative (co)cones labelled by feature symbols from Φ’. Strict atomic ’-sketch arrows should allow us then to formulate propositions like: If we have binary products and equalizers, do we also have pullbacks!?
We close this remark with a revision of the concept of graph in [22]: For the footprint in Example 50, we can consider α as a map with V the only object in and for all . contains then for each :

an “edge sort” P and is the category of graphs with an -indexed family of edges. This category is adhesive in contrast to the category of -labelled graphs in [22]! □
7. Conclusions
The paper presents an abstract framework allowing us to construct, in a uniform and universal way, specification formalisms in arbitrary categories enabling us to specify semantic structures while employing the full expressive power of first-order logic.
The framework is based upon a formalization of “open formulas” as statements in contexts and offers a freshly new and abstract view of logics and specification formalisms.
Relying on the new framework, we present a general and universal account of “syntactic” encodings and representations of semantic structures generalizing the idea of elementary diagrams in traditional first-order logic.
Guided by the top-down principle, we consider at this first stage of extension of our framework just simple categories. To extend a specification formalism to a proper logic, we also have to develop, however, appropriate deduction calculi. To establish those deduction calculi, we should have features, like the translation of statements along variable substitutions, for example, at hand. As exemplified in the paper, we have to assume at least the existence of pushouts to support those features. We are not logicians, but the extension of our framework by general deduction calculi will be one of the main topics in our future work.
Another main topic will be operations. At the present stage, our abstract framework does not comprise operations since it is not clear for us how to generalize the concept of operation from set-based structures to semantic structures defined in an arbitrary category. Already, the step from operations on sets to operations on graphs is not that trivial, and even the concepts, constructions and results we developed for graph operations in [3] are not fully satisfactory yet.
Funding
This research received no external funding.
Institutional Review Board Statement
Not applicable.
Data Availability Statement
Data sharing is not applicable.
Acknowledgments
I want to thank the guest editor of this special volume for encouraging me to write this paper.
Conflicts of Interest
The author declares no conflict of interest.
Appendix A. Translation of Feature Expressions
For a footprint and an object X in we denote by the set of all feature -expressions on X. In Example 26, we discussed the replacement of auxiliary feature symbols by feature expressions. To formalize those replacements, we consider footprint morphisms. A morphism between two footprints over the same category is given by a map assigning to each feature symbol a feature -expression . is called simple if , with and , for all .
Any footprint morphism induces an -indexed family of maps . To define these maps for non-simple footprint morphisms, we have to rely, however, on a mechanism translating feature expressions along variable translations. Fortunately, we can establish such a mechanism, if has pushouts, and we fix a choice of pushouts in .
Definition A1
( Translation maps). We define inductively and in parallel a family oftranslation maps with ψ ranging over all variable translations :
- Atomic: .
- Everything: .
- Void: .
- Conjunction: .
- Disjunction: .
- Implication:
- Negation: .
- Quantification:for where is the chosen pushout of :
Note that the pushout construction formalizes and generalizes the “introduction of fresh variables” in traditional FOL! If we choose the cospan , whenever is an isomorphism, we ensure, especially, that becomes the identity map on . Since the composition of chosen pushouts does not result, in general, in a chosen pushout, the assignments constitute only a pseudo functor from into . This may be a hint to develop future deduction calculi for Institutions of Statements rather in a fibred setting (compare [45])?
The translation of the universal property of monomorphisms in Example 29 along the unique graph morphism
gives us, for example, a definition of monic loops at hand.
gives us, for example, a definition of monic loops at hand.For any footprint morphism , we can define inductively and in parallel for all variable declarations X a substitution map where the only non-trivial case is the base case:
- 1.
- Atomic: for any and in .
If is simple, this base case degenerates, according to Definition A1, to a simple replacement of feature symbols:
- 1’.
- Atomic’:.
Thus, we do not need to employ translation maps to define substitution maps in case of simple footprint morphisms!
References
- Ehrig, H.; Mahr, B. Fundamentals of Algebraic Specification 1: Equations and Initial Semantics; EATCS Monographs on Theoretical Computer Science; Springer: Berlin, Germany, 1985; Volume 6. [Google Scholar]
- Diaconescu, R. Institution-Independent Model Theory; Studies in Universal Logic: Basel, Switzerland, 2008. [Google Scholar] [CrossRef] [Scilit]
- Wolter, U.; Diskin, Z.; König, H. Graph Operations and Free Graph Algebras. In Graph Transformation, Specifications, and Nets—In Memory of Hartmut Ehrig; Springer: Cham, Switzerland, 2018; Volume 10800, pp. 313–331. [Google Scholar] [CrossRef]
- Kaphengst, H.; Reichel, H. Algebraische Algorithmentheorie; WIB 1; VEB Robotron, Zentrum für Forschung und Technik: Dresden, Germany, 1971. [Google Scholar]
- Reichel, H.; Hupbach, U.R.; Kaphengst, H. Initial Algebraic Specification of Data Types, Parameterized Data Types, and Algorithms; Technical Report 15; VEB Robotron, Zentrum für Forschung und Technik: Dresden, Germany, 1980. [Google Scholar]
- Reichel, H. Initial Computability, Algebraic Specifications, and Partial Algebras; Oxford University Press: Oxford, UK, 1987. [Google Scholar]
- Wolter, U. An Algebraic Approach to Deduction in Equational Partial Horn Theories. J. Inf. Process. Cybern. 1990, 27, 85–128. [Google Scholar]
- Lawvere, F.W. Functorial Semantics of Algebraic Theories. Proc. Natl. Acad. Sci. USA 1963, 50, 869–872. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Claßen, I.; Große-Rhode, M.; Wolter, U. Categorical concepts for parameterized partial specifications. Math. Struct. in Comp. Science 1995, 5, 153–188. [Google Scholar] [CrossRef] [Scilit]
- Barr, M.; Wells, C. Category Theory for Computing Science; Series in Computer Science; Prentice Hall International: London, UK, 1990. [Google Scholar]
- Johnson, M.; Rosebrugh, R.; Wood, R. Entity-relationship-attribute designs and sketches. Theory Appl. Categ. 2002, 10, 94–112. [Google Scholar]
- Wells, C. Sketches: Outline with References; Addendum 2009; Department of Mathematics, Case Western Reserve University: Cleveland, UH, USA, 1993. [Google Scholar]
- Diskin, Z.; Wolter, U. A Diagrammatic Logic for Object-Oriented Visual Modeling. Electron. Notes Theor. Comput. Sci. 2008, 203/6, 19–41. [Google Scholar] [CrossRef] [Scilit]
- Ehrig, H.; Ehrig, K.; Prange, U.; Taentzer, G. Fundamentals of Algebraic Graph Transformations; EATCS Monographs on Theoretical Computer Science; Springer: Berlin/Heidelberg, Germany, 2006. [Google Scholar] [CrossRef] [Scilit]
- Makkai, M. Generalized Sketches as a Framework for Completeness Theorems. J. Pure Appl. Algebra 1997, 115, 49274. [Google Scholar] [CrossRef] [Scilit]
- Cadish, B.; Diskin, Z. Heterogeneous view integration via sketches and equations. In Proceedigs of the 9th International Symposium on Methodologies for Intelligent Systems, Zakopane, Poland, 9–13 June 1996; Springer: Berlin/Heidelberg, Germany, 1996; pp. 603–612. [Google Scholar] [CrossRef] [Scilit]
- Diskin, Z. Towards algebraic graph-based model theory for computer science. Bull. Symb. Log. 1997, 3, 144–145. [Google Scholar]
- Rutle, A. Diagram Predicate Framework: A Formal Approach to MDE. Ph.D. Thesis, Department of Informatics, University of Bergen, Bergen, Norway, 2010. [Google Scholar]
- Wolter, U.; Mantz, F. The Diagram Predicate Framework in View of Adhesive Categories; Technical Report 358; Department of Informatics, University of Bergen: Bergen, Norway, 2013. [Google Scholar]
- König, H.; Wolter, U. Van Kampen Colimits and Path Uniqueness. Log. Methods Comput. Sci. 2018, 14, 1–27. [Google Scholar] [CrossRef] [Scilit]
- Rutle, A.; Rossini, A.; Lamo, Y.; Wolter, U. A formal approach to the specification and transformation of constraints in MDE. J. Log. Algebr. Program. 2012, 81/4, 422–457. [Google Scholar] [CrossRef] [Scilit]
- Rensink, A. Representing first-order logic using graphs. In Proceedings of the Graph Transformations, Second International Conference, ICGT 2004, Rome, Italy, 28 September–2 October 2004; Springer: Berlin/Heidelberg, Germany, 2004; Volume 3256, pp. 319–335. [Google Scholar] [CrossRef] [Scilit]
- Habel, A.; Pennemann, K. Correctness of high-level transformation systems relative to nested conditions. Math. Struct. Comput. Sci. 2009, 19, 245–296. [Google Scholar] [CrossRef] [Scilit]
- Bruggink, H.J.S.; Cauderlier, R.; Hülsbusch, M.; König, B. Conditional reactive systems. Proceeding of the IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science, FSTTCS 2011, Mumbai, India, 12–14 December 2011; Schloss Dagstuhl–Leibniz-Zentrum für Informatik: Wadern, Germany, 2011; Volume 13, pp. 191–203. [Google Scholar] [CrossRef] [Scilit]
- Kosiol, J.; Strüber, D.; Taentzer, G.; Zschaler, S. Graph consistency as a graduated property–consistency–sustaining and-improving graph transformations. In Proceedings of the 13th International Conference, ICGT 2020, Bergen, Norway, 25–26 June 2020; Springer: Cham, Switzerland, 2020; Volume 12150, pp. 239–256. [Google Scholar] [CrossRef] [Scilit]
- Makkai, M. First Order Logic with Dependent Sorts, with Applications to Category Theory. Available online: http://www.math.mcgill.ca/makkai/ (accessed on 31 January 2022).
- Freyd, P.J. Properties invariant within equivalence types of categories. In Algebra, Topology and Category Theory: A Collection of Papers in Honour of Samuel Eilenberg; Heller, A., Tierney, M., Eds.; Academic Press: Cambridge, MA, USA, 1976; pp. 55–61. [Google Scholar]
- Freyd, P.J.; Scedrov, A. Categories, Allegories; North-Holland Mathematical Library; North-Holland: Amsterdam, The Netherlands, 1990; Volume 39. [Google Scholar]
- Wolter, U.; Klar, M.; Wessäly, R.; Cornelius, F. Four Institutions—A Unified Presentation of Logical Systems for Specification; Technical Report Bericht-Nr. 94-24; Fachbereich Informatik: Berlin, Germany, 1994. [Google Scholar]
- Pawlowski, W. Context institutions. In Proceedings of the 11th COMPASS/ADT Workshop on Specification of Abstract Data Types Joint with the 8th COMPASS Workshop, Oslo, Norway, 19–23 September 1995; Springer: Cham, Switzerland, 1995; Volume 1130, pp. 436–457. [Google Scholar]
- Goguen, J.A.; Burstall, R.M. Institutions: Abstract Model Theory for Specification and Programming. J. ACM 1992, 39, 95–146. [Google Scholar] [CrossRef] [Scilit]
- Wolter, U. Institutional frames. In Proceedings of the 10th Workshop on Specification of Abstract Data Types Joint with the 5th COMPASS Workshop, Santa Margherita Ligure, Italy, 30 May–3 June1994; Springer: Cham, Switzerland, 1995; Volume 906, pp. 469–482. [Google Scholar] [CrossRef] [Scilit]
- Martini, A.; Wolter, U.; Haeusler, E.H. Fibred and Indexed Categories for Abstract Model Theory. Log. J. IGPL 2007, 15, 707–739. [Google Scholar] [CrossRef] [Scilit]
- Wolter, U.; Martini, A.; Haeusler, E.H. Towards a uniform presentation of logical systems by indexed categories and adjoint situations. J. Log. Comput. Oxf. Univ. Press 2015, 25, 57–93. [Google Scholar] [CrossRef] [Scilit]
- McLarty, C. Elementary Categories, Elementary Toposes; Oxford Logic Guides (Book 21); Clarendon Press: Oxford, UK, 1991. [Google Scholar]
- Baader, F.; Horrocks, I.; Sattler, U. Chapter 3. Description logics. In Handbook of Knowledge Representation; Elsevier: Amsterdam, The Netherland, 2007. [Google Scholar]
- Goguen, J.A.; Meseguer, J. Order-sorted Algebra I: Equational Deduction for Multiple Inheritance, Overloading, Exceptions and Partial Operations. Theor. Comput. Sci. 1992, 105, 217–273. [Google Scholar] [CrossRef] [Scilit]
- Ehrig, H.; Große-Rhode, M.; Wolter, U. Applications of Category Theory to the Area of Algebraic Specification in Computer Science. Appl. Categ. Struct. 1998, 6, 1–35. [Google Scholar] [CrossRef] [Scilit]
- Chang, C.C.; Keisler, H.J. Model Theory; Studies in Logic and the Foundations of Mathematics; Elsevier: Amsterdam, The Netherland, 1990. [Google Scholar]
- Lloyd, J.W. Foundations of Logic Programming, 2nd ed.; Springer: Cham, Switzerland, 1987. [Google Scholar]
- Wechler, W. Universal Algebra for Computer Scientists; EATCS Monographs on Theoretical Computer Science; Springer: Berlin, Germany, 1992; Volume 25. [Google Scholar]
- Lack, S.; Sobociński, P. Adhesive categories. In Proceedings of the FOSSACS 2004 International Conference on Foundations of Software Science and Computation Structures, Barcelona, Spain, 29 March–2 April 2004; Volume 2987, pp. 273–288. [Google Scholar]
- Wolter, U. Indexed vs. fibred structures—A field report. Rom. J. Pure Appl. Math. 2020, 66, 813–830. [Google Scholar]
- Lack, S.; Sobocinski, P. Toposes are adhesive. In Proceedings of the Third International Conference, ICGT 2006, Natal, Rio Grande do Norte, Brazil, 17–23 September 2006; Springer: Cham, Switzerland, 2006; Volume 4178, pp. 184–198. [Google Scholar] [CrossRef] [Scilit]
- Wolter, U.; Martini, A.R.; Haeusler, E.H. Indexed and fibred structures for hoare logic. In Electronic Notes in Theoretical Computer Science; Elsevier: Amsterdam, The Netherland, 2020; pp. 125–145. [Google Scholar] [CrossRef] [Scilit]
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).





