Next Article in Journal
Construction of Cubic Trigonometric Curves with an Application of Curve Modelling
Next Article in Special Issue
Representing 3/2-Institutions as Stratified Institutions
Previous Article in Journal
Nonlinear Static Stability of Imperfect Bio-Inspired Helicoidal Composite Beams
Previous Article in Special Issue
Supervised Learning Perspective in Logic Mining
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Logics of Statements in Context-Category Independent Basics

Department of Informatics, University of Bergen, 5020 Bergen, Norway
Mathematics 2022, 10(7), 1085; https://doi.org/10.3390/math10071085
Submission received: 1 February 2022 / Revised: 17 March 2022 / Accepted: 18 March 2022 / Published: 28 March 2022
(This article belongs to the Special Issue Logic and Computation)

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.

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 φ : ( Σ , E ) ( Σ , E ) between two equational specifications, i.e., a signature morphism φ : Σ Σ such that the set E of Σ -equations entails the set φ ( E ) of translated Σ -equations. For any ( Σ , E ) -algebra A   there is a ( Σ , E ) -algebra F φ ( A ) freely generated by A along φ . The construction of F φ ( A ) can be described in four steps: (1) Construct a “syntactic encoding” of A ; (2) Translate this syntactic encoding along the signature morphism φ ; (3) Use semantic entailment or a deduction calculus to extend the translated encoding of A to a syntactic encoding of a ( Σ , E ) -algebra; and (4) Transform the extended encoding into a ( Σ , E ) -algebra F φ ( A ) .
There is a widely-used technique to encode a Σ -algebra A syntactically (see, for example, [1]): The elements of the carrier A of A are added as auxiliary constants to the signature Σ and the complete behaviour of the operations in A is encoded by a set R A of ground ( Σ + A ) -equations. To make the construction of free algebras work, we have to extend ( Σ , E ) and φ , in such a way that we obtain a signature morphisms φ A : ( Σ + A , E + R A ) ( Σ + φ ( A ) , E + φ ( R A ) ) and F φ ( A ) is constructed as a quotient of the ground ( Σ + φ ( A ) ) -term algebra T Σ + φ ( A ) ( ) .
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 ( Σ , C E E ) -algebra F ( Σ , C E E , X , R ) freely generated by a set X of variables (generators) and a set R of Σ -equations on X where C E E 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 ( Σ , C E ) -algebra A is isomorphic to F ( Σ , C E , A , R A ) , which, in turn, is isomorphic to F ( Σ , , A , R A ) since R A also encodes the fact that A satisfies all the conditional equations in C E . However, there may be other, hopefully finite, sets X and R such that A F ( Σ , C E , X , R ) . For any such syntactic representation ( X , R ) of a ( Σ , C E ) -algebra A and any specification morphism φ : ( Σ , C E ) ( Σ , C E ) , we can construct the free algebra F φ ( A ) as the Σ -algebra F ( Σ , C E , φ ( X ) , φ ( R ) ) , which is a quotient of the Σ -term algebra T Σ ( φ ( X ) ) .
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 ( X , R ) , the deduction calculus generates the smallest Σ -congruence C ( Σ , C E , X , R ) in T Σ ( X ) which contains ( X , R ) and is closed w.r.t. the rules arising from C E . We consider the quotient Σ -term algebra F ( Σ , C E , X , R ) = T Σ ( X ) / C ( Σ , C E , X , R ) . For any Σ -algebra A   we have A T Σ ( A ) / k e r ( i d A * ) for the Σ -homomorphism i d A * : T Σ ( A ) A , and it can be shown that A satisfies a set C E of conditional equations if, and only if, the kernel k e r ( i d A * ) is closed under the deduction rules arising from C E . This insures that F ( Σ , C E , X , R ) is a ( Σ , C E ) -algebra. To show the completeness of the deduction calculus, we only have to prove that F ( Σ , C E , X , R ) is indeed freely generated by ( X , R ) . Note that we work here with a kind of semantic deduction theorem: A set C E of conditional equations entails a conditional equation ( X : R t = t ) if, and only if, ( t , t ) C ( Σ , C E , X , R ) .
In the East-German school of Algebraic Specifications, we do have syntactic representations ( A , R A ) , ( X , R ) 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 C ( Σ , C E , X , R ) starting with ( X , R ) . 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 ( Σ , E ) with E a set of Σ -equations a category FP ( Σ , E ) with finite products such that the category of all ( Σ , E ) -algebras is equivalent to the category of all product preserving functors from FP ( Σ , E ) into Set . Analogously, one can construct for any specification ( Σ , C E ) with C E a set of conditional Σ -equations a category FL ( Σ , C E ) with finite limits such that the category of all ( Σ , C E ) -algebras is equivalent to the category of all finite limit preserving functors from FL ( Σ , C E ) into Set .
In [9], we generalized this result to many-sorted signatures and partial algebras. We showed how to construct for any specification ( Σ , C E E ) , with Σ a many-sorted signature and C E E a set of conditional existence Σ -equations, a category FL ( Σ , C E E ) with finite limits such that the category of all partial ( Σ , C E E ) -algebras is equivalent to the category of all limit preserving functors from FL ( Σ , C E E ) into the functor category Set S 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 FP ( Σ , E ) , no other objects are generated while in case of the finite limit categories FL ( Σ , C E ) and FL ( Σ , C E E ) , resp., we have to introduce new objects ( X , R ) 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 Σ F L -algebras (with Σ F L a signature declaring two sorts Ob, Mor and operations like source, target, composition, product, equalizer, subobject, ) satisfying a corresponding set C E E F L of conditional existence equations. The category FL ( Σ , C E E ) was then constructed as the freely generated partial ( Σ F L , C E E F L ) -algebra F ( Σ F L , C E E F L , O P + C E E , R ) with O P + C E E declaring one variable of sort Mor for each operation symbol in Σ and one variable of sort Mor for each conditional existence equation in C E E . R describes source and target of the variables in O P + C E E as well as the subobject property of the variables in C E E .
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 S = ( G , D , L , K ) 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 δ : I G . A model M of a sketch S in a category C is a graph homomorphism from G to the underlying graph of C 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) F : C Set with C 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 S = ( G , D , L ) , for example, a corresponding finite product category freely generated by S . 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 Base which may differ from the category Graph 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 α P in Base . Analogous to a diagram in a sketch, we define an atomic statement about an object K in Base by a morphism δ : α P K in Base . A generalized sketch K = ( K , S t K ) is then nothing but an object K in Base together with a set S t K 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 K = ( K , S t K ) , where K represents the underlying graph-based structure of the model and S t K 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 parent ( A n n a , U w e , G a b i ) in predicate logic stating that U w e and G a b i are the parents of A n n a . 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 ( x 1 x 2 x 3 : parent ( A n n a , x 2 , x 3 ) parent ( x 1 , x 2 , x 3 ) ) in traditional first-order predicate logic stating that A n n a 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 Set 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 ( x 1 x 2 x 3 : parent ( x 1 , x 2 , x 3 ) ) , 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.
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

C O b j denotes the collection of objects of a category C and C M o r the collection of morphisms of C , respectively. C ( a , b ) is the collection of all morphisms from object a to object b in C . We use the diagrammatic notation f ; g : a c for the composition of morphisms f : a b and g : b c in C . C D states that category C is a subcategory of category D . A category C is small if the collection C M o r , and thus also the collection C O b j , is a set. Cat is the category of all small categories. Set denotes the category of all sets and all (total) maps, while Par is the category of all sets and partial maps. We consider Set as a subcategory of Par . Cat , Set and Par are not small!
A (directed multi) graph G = ( G V , G E , s c G , t g G ) is given by a collection G V of vertices, a collection G E of edges and maps s c G : G E G V , t g G : G E G V assigning to each edge its source and target vertex, respectively. g r ( C ) denotes the underlying graph of a category C , i.e., we have g r ( C ) V : = C O b j and g r ( C ) E : = C M o r . A graph G is small if G V and G E are sets. A homomorphism φ : G H between two graphs is given by a pair of maps φ V : G V H V , φ E : G E H E such that s c G ; φ V = φ E ; s c H and t g G ; φ V = φ E ; t g H . Graph 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 Cat , Set , Par and Graph , for example, is denoted by GRAPH , while SET 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 Cat , Set , Par and Graph as objects by CAT .
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 CAT a category in itself? Our answer here is to treat CAT 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 SET , GRAPH and CAT as legitimate entities but take the level above as a “regulative level”.
In view of CAT the category Cat appears in two different roles: First, Cat is an object in CAT . Second, Cat is a subcategory of CAT . We consider the inclusion functor Cat CAT as an anonymous coercion functor which embeds any object C in Cat into the bigger context of CAT where we can even consider functors between C and Cat , 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 C appears in a certain situation in CAT , namely as an object in Cat CAT O b j (the default case) or as an element in CAT O b j , respectively.
Analogously, we assume corresponding anonymous coercion functors Set SET and Graph GRAPH , respectively. Note that the isomorphisms between small categories C and the corresponding objects in CAT as well as the anonymous coercion functors are not living in CAT ! They are located on our third regulative level. Finally, we assume also implicit coercion from the categories SET , GRAPH and CAT , 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 ( a 1 , , a n ) as a “list of values of length n”, we will also work with a more unconventional interpretation. We interpret an n-tuple a = ( a 1 , , a n ) with n 1 and a 1 , , a n A as a convenient shorthand notation for an “indexed array” of length n, i.e., for a set of assignments { 1 a 1 , , n a n } representing a map a : [ n ] A with [ n ] : = { 1 , , n } and a ( i ) = a i . That is, the numbers in [ n ] indicate the corresponding position in the tuple. The empty tuple ( ) represents, in such a way, the only map from [ 0 ] : = into A.
Given an [ n ] -indexed family A 1 , , A n , n 1 of sets, i.e., a map A : [ n ] Set O b j , we denote the set of all maps a : [ n ] i [ n ] A i with a ( i ) A i for all i [ n ] by A 1 A n , i [ n ] A i or simply A , respectively. Relying on the assumption that [ n ] is (implicitly) equipped with the total irreflexive order 1 < 2 < < n , we can still use the traditional tuple notation to represent those maps, as discussed in the last paragraph. The traditional Cartesian product A 1 × × A n and A are isomorphic and both give us a categorical product of the family A 1 , , A n of objects in Set 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 [ n ] of indexes, we consider arbitrary finite sets I of indexes (identifiers, names) with n elements. For an I-indexed set A = ( A ( i ) i I ) , i.e., a map A : I Set O b j , we denote by i I A ( i ) , or simply A , the set of all maps a : I i I A ( i ) with a ( i ) A ( i ) for all i I . A is a categorical product of the I-indexed family A of objects in Set where for any i I the corresponding projection map π i : A A ( i ) is simply defined by π i ( a ) : = a ( i ) for all a A .
Each element a in A can be represented by a corresponding associative array, i.e., by the set { i a ( i ) i I } of assignments. To be able, however, to utilize the tuple notation to represent the elements in A , we have to equip the set I, explicitly, with a fixed (!) total order i 1 < i 2 < < i n . Under this assumption, we can then represent each a in A by the tuple ( a 1 , , a n ) with a j = a ( i j ) for all 1 j n .
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 C is a graph homomorphism φ from G to g r ( C ) denoted by φ : G C . A natural transformation μ : φ ψ between two interpretations φ : G C and ψ : G C is a family μ v : φ V ( v ) ψ V ( v ) , v G V of morphism in C such that φ E ( f ) ; μ u = μ v ; ψ E ( f ) for all edges f : v u in G. All interpretations of G in C and all natural transformations between them constitute the interpretation category [ G C ] with composition–the vertical composition of natural transformations. (In [10], interpretations φ : G C are called “models of G in C ”, and the notation Mod ( G , C ) is used instead of [ G C ] . 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 [ A C ] to represent all maps from A into C O b j . Moreover, we will also use the more compact notations C G and C A instead of [ G C ] or [ A C ] , 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 Σ = ( S , P , a r : P S * ) with S a set of sort symbols, P a set of predicate symbols and a map a r : P S * 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 C = { c n 1 , , c n m } of column names and a declaration of a data type name d n j for each column name c n j
Mathematics 10 01085 i001
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 d n j by assigning to each data type name d n j a fixed set D d n j of data values. This gives us an C-indexed set D = ( D d n j c n j C ) 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 r in table T as a partial map r : C D with r ( c n j ) D d n j as long as r ( c n j ) is defined. We denote by j I p D d n j , or simply p D , the set of all those partial maps except the completely undefined map (empty row). For any c n j C , we obtain as projection a partial map π c n j : p D D d n j defined for all r p D by π c n j ( r ) : = r ( c n j ) if r ( c n j ) is defined. These projections turn p D into a categorical product of the C-indexed set D = ( D d n j c n j C ) in the category Par 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 p D . We fix a total order c n 1 < c n 2 < < c n n on C and represent a partial map r : C D by the tuple ( r 1 , , r n ) with r j = r ( c n j ) if r ( c n j ) is defined and r j 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 p D and the semantics of the edges c n j are the corresponding restrictions of the projections π c n j : p D D d n j .
Mathematics 10 01085 i002
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 e i d (employee identity) in table E m p l and s s n (social security number) in table A d d r 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 s s n in E m p l . This will, however, not turn s s n 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 A d d r . Foreign key (fk) constraints are the mechanism to connect tables. In the example, we declare a foreign key from column s s n in E m p l to column s s n in A d d r indicated by a star s s n * . 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 Base .
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 S Set O b j of sort symbols and consider S as a graph (without edges) in Graph . Relying on the coercion Graph GRAPH (see Remark 1), we choose the interpretation category Set S = [ S Set ] in CAT as base category Base F O L . We call the objects in [ S Set ] 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 Base A L C : = Set in CAT 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 M m F : = { S , P } Set O b j of concept symbols. Relying on coercion Set SET , we define the base category as a slice category Base m F : = SET / M m F . (For any category C and any object T in C we can define the slice category C / T with objects all pairs ( A , φ ) of an object A and a morphism φ : A T in C and morphisms f : ( A , φ ) ( B , ψ ) given by morphisms f : A B in C satisfying the condition φ = f ; ψ .) We use the term M m F -typed set for the objects in SET / M m F , i.e., for pairs ( A , τ A ) of a set A and a typing map τ A : A M m F .
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 Graph of small graphs is chosen as the base category Base C T . Note that Graph is isomorphic to the interpretation category [ M C T Set ] with M C T the graph Mathematics 10 01085 i003 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 M R M : = ( T c D ) Graph O b j of concept symbols and define the base category as a slice category Base R M : = GRAPH / M R M relying on the coercion Graph GRAPH . We use the term M R M -typed graph for the objects in GRAPH / M R M , i.e., for pairs ( G , τ G ) of a graph G and a typing morphism τ G : G M R M .

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 Var of the base category Base . We refer to the objects in Var as variable declarations while the morphisms in Var will be called variable translations.
If Base has initial objects, we assume that Var contains exactly one of them denoted by 0 .
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 Var F O L to be the full subcategory of Base F O L = [ S Set ] given by all finite and disjoint S-sets X = ( X s s S ) with X s a subset of the set { x , x 1 , x 2 , , y , y 1 , y 2 , } for all s S .
Example 7
(ALC: Variables). Officially, there are no variables in ALC. To describe ALC as a fragment of FOL we need, however, variables. As Var A L C , we take the subcategory of Set with objects all finite subsets of the set { x , x 1 , x 2 , , y , y 1 , y 2 , } and morphisms all injective maps.
Example 8
(mFOL: Variables). We choose as Var m F the full subcategory of Set / M m F Base m F = SET / M m F given by all finite M m F -typed sets ( X , τ X : X M m F ) such that the pre-image τ X 1 ( S ) is a subset of the set { x s , x s 1 , x s 2 , , y s , y s 1 , y s 2 , } and τ X 1 ( P ) = { x p } .
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 Var C T to be the full subcategory of Base C T = Graph given by all finite graphs X = ( X V , X E , s c X , t g X ) with X V a finite subset of the set { x v , x v 1 , x v 2 , , y v , y v 1 , y v 2 , } and X E a finite subset of the set { x e , x e 1 , x e 2 , , y e , y e 1 , y e 2 , } . “e” stands for edge while “v” refers to vertex.
Example 10
(RM: Variables). As Var R M , we choose the full subcategory of Graph / M R M Base R M = GRAPH / M R M given by all finite M R M -typed graphs ( X , τ X : X M R M ) such that the pre-image τ X 1 ( T ) is a finite subset of the set { x t , x t 1 , x t 2 , , y t , y t 1 , y t 2 , } , τ X 1 ( D ) is a finite subset of { x d , x d 1 , x d 2 , , y d , y d 1 , y d 2 , } and τ X 1 ( c ) is a finite subset of { x c , x c 1 , x c 2 , , y c , y c 1 , y c 2 , } , 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 Var given by a set Φ of feature symbols and a map α : Φ Var O b j . For any feature symbol F Φ , the variable declaration α ( F ) is called the arity of F. We will often write α F for α ( F ) .
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 α : Φ Var , 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 Σ = ( S , P , a r : P S * ) 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 [ S Set ] . The set Φ Σ of feature symbols is nothing but the set P of predicate symbols. Thus, it remains to transform each w S * into a corresponding S-set X w of variables.
The empty sequence ε S * is simply transformed into the empty S-set X ε : = ( s S ) . A non-empty sequence w = s 1 s 2 s n gives rise to a list [ x 1 : s 1 , x 2 : s 2 , , x n : s n ] of variable declarations, i.e., to a canonical set { x 1 , x 2 , , x n } of variables, equipped with a canonical total order x 1 < x 2 < < x n , together with a map from { x 1 , x 2 , , x n } into S. X w is defined by X s w : = { x i s i = s } for all s S . In the examples, we will use lists of variable declarations to represent S-sets of variables.
To complete the definition of Ξ Σ , we simply set α Σ ( p ) : = X a r ( p ) for all p Φ Σ = P .
As an example for a FOL-footprint, we chose S = { p r s , n a t } with sort symbols “ p r s ” for person and “ n a t ” for natural number, respectively. The sample footprint Ξ F O L = ( Φ F O L , α F O L ) is then defined by the feature symbols Φ F O L : = { parent , male , age , less } with the following S-sets as arities: α F O L ( parent ) : = ( { x 1 , x 2 , x 3 } , ) represented by [ x 1 : p r s , x 2 : p r s , x 3 : p r s ] , α F O L ( male ) : = ( { x } , ) represented by [ x : p r s ] , α F O L ( age ) : = ( { x 1 } , { x 2 } ) represented by [ x 1 : p r s , x 2 : n a t ] and α F O L ( less ) : = ( , { x 1 , x 2 } ) represented by [ x 1 : n a t , x 2 : n a t ] .
Example 12
(ALC: Footprint). A signature in ALC declares a set N C of concept names and a disjoint set N R of role names. In view of Definition 3, this means defining a footprint Ξ A L C = ( Φ A L C , α A L C ) with Φ A L C = N C N R , α A L C ( F ) = { x } for all F N C and α A L C ( F ) = { x 1 , x 2 } for all F N R .
A signature in ALC also declares a set N O 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 Ξ m F = ( Φ m F , α m F ) providing the formal tools unary many-sorted predicates, binary many-sorted predicates and tertiary many-sorted predicates, respectively.
We have Φ m F : = { un , bin , trt } with α m F ( un ) = ( X un , τ X un : X un M m F ) given by X un : = { x p , x s } and τ X un ( x p ) : = P , τ X un ( x s ) : = S . Analogously to Example 11, we represent the M m F -typed set ( X un , τ X un ) by the list [ x p : P , x s : S ] of variable declarations. ( X bin , τ X bin ) is defined by [ x p : P , x s 1 : S , x s 2 : S ] while ( X trt , τ X trt ) is given by [ x p : P , x s 1 : S , x s 2 : S , x s 3 : S ] , respectively. Keep in mind that, for any set M in Set the interpretation category [ M Set ] and the slice category Set / M 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 Ξ C T for the formalism Category Theory declares two feature symbols cmp and id . The arities of the feature symbols in Φ C T : = { cmp , id } are described in Table 1:
Example 15
(RM: Footprint). The footprint Ξ R M = ( Φ R M , α R M ) declares features Φ R M : = { tb ( n ) , pk , fk , tot , inj } 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 Φ R M are M R M -typed graphs ( G , τ G ) and are described in Table 2. Analogously to Example 13, we use the colon-notation “ _ : _ ” to represent the typing morphisms τ G : G M R M .
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 Var 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 Carr of Base of (potential) carriers of Ξ-structures.
Example 16
(FOL: Carriers). In this example, we follow the traditional approach and choose simply Carr F O L : = Base F O L = Set S = [ S Set ] .
Example 17
(ALC: Carriers). ALC considers only non-empty sets as potential carriers and calls them domains (of an interpretation). Thus, we take as Carr A L C the full subcategory of Base A L C = Set given by all non-empty sets.
Example 18
(mFOL: Carriers). A potential carrier of a Ξ m F -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 Carr m F , we choose therefore the full subcategory of Base m F = SET / M m F given by all M m F -typed sets ( C , τ C ) with C Set O b j . Note that we consider here Set O b j (and thus also C) as an element in SET O b j and not as a subset of SET O b j (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, Carr C T : = Base C T = Graph .
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 Carr R M the full subcategory of Base R M = GRAPH / M R M given by all M R M -typed graphs ( G , τ G : G M R M ) with G a subgraph of g r ( Par ) . We consider here g r ( Par ) (and thus also G) as an element in GRAPH O b j and not as a subgraph of g r ( GRAPH ) (compare Remark 1). Be aware that we can have in G only maps from sets in τ G 1 ( T ) to sets in τ G 1 ( D ) since c is the only edge in M R M !
The semantics of a variable declaration X Var O b j relative to a chosen carrier U Carr is simply the set of all variable assignments (keep in mind that Var Base and Carr Base ):
[ [ X ] ] U : = Base ( X , U ) .
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 U = ( U , Φ U ) is given by an object U in Carr , the carrier of U , and a family Φ U = { [ [ F ] ] U F Φ } of sets [ [ F ] ] U Base ( α F , U ) 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 ς : U V between Ξ-structures is given by a morphism ς : U V in Carr such that ι [ [ F ] ] U implies ι ; ς [ [ F ] ] V for all feature symbols F in Φ and all interpretations ι : α F U .
Mathematics 10 01085 i004
Identities of carriers define identity homomorphisms and composition of homomorphisms is inherited from composition in Carr . In such a way, we obtain a category Str ( Ξ ) 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 Sem ( Ξ ) of the category Str ( Ξ ) of all Ξ-structures.
Example 21
(FOL: Semantics). In accordance with the traditional approach Sem ( Ξ F O L ) : = Str ( Ξ F O L ) comprises all Ξ F O L -structures U , given by an arbitrary S-set U, where S = { p r s , n a t } as in Example 11, together with arbitrary subsets [ [ parent ] ] U Set S ( ( { x 1 , x 2 , x 3 } , ) , U ) , [ [ male ] ] U Set S ( ( { x } , ) , U ) , [ [ age ] ] U Set S ( ( { x 1 } , { x 2 } ) , U ) and [ [ less ] ] U Set S ( ( , { x 1 , x 2 } ) , U ) , as well as all homomorphisms between those Ξ F O L -structures.
Example 22
(ALC: Semantics). Any terminological interpretation I in ALC includes the choice of a non-empty set Δ I , called domain, an interpretation of each concept name in N C as a subset of Δ I Set ( { x } , Δ I ) and an interpretation of each role name in N R as a subset of Δ I × Δ I Set ( { x 1 , x 2 } , Δ I ) . Obviously, there is a one-to-one correspondence between a terminological interpretation and a Ξ F O L -structure in the sense of Definition 5. Homomorphisms are not considered in ALC; thus, Sem ( Ξ A L C ) : = Str ( Ξ A L C ) is a discrete category.
Example 23
(mFOL: Semantics). In contrast to the Examples 21 and 22, we transform any carrier ( U , τ U ) in Carr m F (see Example 18) into exactly one corresponding Ξ m F -structure U with:
[ [ un ] ] U : = { ι : ( X un , τ X un ) ( U , τ U ) ι ( x p ) ι ( x s ) }
[ [ bin ] ] U : = { ι : ( X bin , τ X bin ) ( U , τ U ) ι ( x p ) ι ( x s 1 ) ι ( x s 2 ) }
[ [ trt ] ] U : = { ι : ( X trt , τ X trt ) ( U , τ U ) ι ( x p ) ι ( x s 1 ) ι ( x s 2 ) ι ( x s 3 ) }
Str ( Ξ m F ) is given by all these Ξ m F -structures and all homomorphims between them according to Definition 6. Note that the homomorphisms in Str ( Ξ m F ) 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 Sem ( Ξ m F ) the full subcategory of Str ( Ξ m F ) given by all Ξ m F -structures U = ( ( U , τ U ) , Φ m F U ) such that τ U 1 ( P ) is the union of all power sets ( A ) , ( A B ) , ( A B C ) with A, B, C ranging over all the sets in τ U 1 ( S ) .
Example 24
(Category Theory: Semantics). Analogously to Example 21, Sem ( Ξ C T ) : = Str ( Ξ C T ) comprises all Ξ C T -structures U = ( U , Φ C T U ) given by an arbitrary small graph U together with arbitrary subsets [ [ id ] ] U Graph ( α C T ( id ) , U ) , [ [ cmp ] ] U Graph ( α C T ( cmp ) , U ) , [ [ mon ] ] U Graph ( α C T ( mon ) , U ) and [ [ fnl ] ] U Graph ( α C T ( fnl ) , U ) . That is, we also include structures like categories without identities, categories with partial composition and so on. Moreover, Sem ( Ξ C T ) includes all homomorphisms between those Ξ C T -structures.
Example 25
(RM: Semantics). Analogous to Example 23, we transform any carrier ( U , τ U ) in Carr R M into exactly one corresponding Ξ R M -structure U . We take, however, into account that tables do have only finitely many rows:
[ [ tb ( n ) ] ] U is the set of all M R M -typed graph homomorphisms ι : α R M ( tb ( n ) ) ( U , τ U ) such that ι ( x t ) is a finite (!) subset of p ( ι ( x d i ) 1 i n ) and the partial maps ι ( x c i ) : ι ( x t ) ι ( x d i ) are exactly the corresponding restricted projections.
Reflecting the usual definition of foreign keys, we define [ [ fk ] ] U as the set of all M R M -typed graph homomorphisms ι : α R M ( fk ) ( U , τ U ) such that ι ( x c 1 ) ( ι ( x t 1 ) ) ι ( x c 2 ) ( ι ( x t 2 ) ) , i.e., each value in row x c 1 in table x t 1 has to appear in row x c 2 in table x t 2 .
[ [ tot ] ] U is the set of all ι : α R M ( tot ) ( U , τ U ) such that ι ( x c ) : ι ( x t ) ι ( x d ) is total. [ [ inj ] ] U comprises, correspondingly, all cases where ι ( x c ) is injective and [ [ pk ] ] U all cases where ι ( x c ) is as well total as injective.
As Sem ( Ξ R M ) , we can choose the full subcategory of Str ( Ξ R M ) given by all Ξ R M -structures U = ( ( U , τ U ) , Φ R M U ) such that τ U 1 ( T ) is the union of all power sets f i n ( p ( A i 1 i n ) with 1 n and the A i ’s ranging over all the sets in τ U 1 ( D ) . We could require, in addition, that the sets in τ U 1 ( D ) 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 Var we define inductively and in parallel a family FE ( Ξ ) of sets FE ( Ξ , X ) of (first-order) feature Ξ -expressions E x on X, X E x in symbols, where X varies over all the objects in Var :
  • Atomic expressions: X F ( β ) for any F Φ and any morphism β : α F X in Var .
  • Everything: X for any object X in Var .
  • Void: X for any object X in Var .
  • Conjunction: X ( E x 1 E x 2 ) for any expressions X E x 1 and X E x 2 .
  • Disjunction: X ( E x 1 E x 2 ) for any expressions X E x 1 and X E x 2 .
  • Implication: X ( E x 1 E x 2 ) for any expressions X E x 1 and X E x 2 .
  • Negation: X ¬ E x for any expression X E x .
  • Quantification: X ( φ , Y : E x ) and X ( φ , Y : E x ) for any expression Y E x and any morphism φ : X Y in Var 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 φ : X Y , only inclusion maps φ = i n X , Y : X Y are considered. Moreover, only the quantified variables Y X are recorded while Y has to be (re)constructed as the union X ( Y X ) . In other words, our Y lists all (!) variables that are allowed to appear as free variables in E x ! We record the whole Y for three reasons: (1) Already in Graph (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, φ : X Y is allowed to be non-monic.
We allow non-monic morphims φ : X Y to express identifications. In such a way, we can survive, for the moment, without explicit equations even in cases where Var is a subcategory of a set-based category. We illustrate this mechanism in the Examples 26 and 29.
If Var is a subcategory of a set-based category, like Set , [ S Set ] , Set / M m F , Graph or Graph / M R M , 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, φ = i n X , Y : X Y is such an inclusion morphism we will drop φ (see Examples 26, 28 and 29).
If φ : X Y 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 Base , and thus also Var , has an initial object 0 . 0 is then the arity of and , while the fixed semantics for any carrier U is given by the two subsets of the singleton Base ( 0 , U ) = { ! U : 0 U } , namely [ [ ] ] U = and [ [ ] ] U = { ! U } . Consequently, we could use then the same notation as for atomic expressions, namely X ( ! X ) and X ( ! X ) where ! X : 0 X is the unique initial morphism into X.
Remark 8
(Closed expressions: Syntax). If Base has an initial object 0 , feature expressions of the form 0 E x will be called closed expressions. Note that quantification will generate closed expressions only in case X = 0 where φ = ! Y : 0 Y is the only choice for φ, in this case.
Example 26
(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 α F O L ( parent ) : = ( { x 1 , x 2 , x 3 } , ) for the feature symbol parent Φ F O L , for example, is represented by [ x 1 : p r s , x 2 : p r s , x 3 : p r s ] . Pursuing the idea to consider a tuple as a convenient notation for an “associative array”, we can denote the atomic expression parent ( β ) , with β : α F O L ( parent ) Y an { p r s , n a t } -map, simply as parent ( β ( x 1 ) , β ( x 2 ) , β ( x 3 ) ) .
Relying on this notational convention, we obtain, for example, the closed Ξ F O L -expression
0 ( [ x 1 : p r s , x 2 : p r s , x 3 : p r s , y 1 : n a t , y 2 : n a t ] : ( ( parent ( x 1 , x 2 , x 3 ) age ( x 1 , y 1 ) ) age ( x 2 , y 2 ) ) less ( y 1 , y 2 ) )
(with 0 the empty S-set) expressing that a child is always younger than a parent.
Our main point, however, is to consider feature expressions as derived features enabling us to denote properties in an anonymous way. The following feature Ξ F O L -expression y o u n g e r , for example, gives us the property younger than at hand by hiding the exact age of a person:
[ y : p r s , x : n a t ] ( [ y : p r s , x : n a t , x 1 : n a t ] : ( less ( x , x 1 ) age ( y , x 1 ) ) )
The next feature Ξ F O L -expression s b l provides the property being a sibling of someone:
[ y : p r s ] ( [ y : p r s , x 1 : p r s , x 2 : p r s , x 3 : p r s ] : parent ( y , x 2 , x 3 ) parent ( x 1 , x 2 , x 3 ) ¬ ( φ , [ x : p r s , x 2 : p r s , x 3 : p r s ] : ) )
with φ : [ y : p r s , x 1 : p r s , x 2 : p r s , x 3 : p r s ] [ x : p r s , x 2 : p r s , x 3 : p r s ] defined by the assignments y , x 1 x ; x 2 x 2 ; x 3 x 3 . Note that the Ξ F O L -expression ¬ ( φ , [ x : p r s , x 2 : p r s , x 3 : p r s ] : ) on [ y : p r s , x 1 : p r s , x 2 : p r s , x 3 : p r s ] encodes the inequality ¬ ( y = x 1 ) .
For convenience, we could introduce an auxiliary feature symbol sibling with arity [ y : p r s ] and use sibling ( y ) as a shorthand (macro) for this derived feature expression. The conjunction ( male ( y ) sibling ( y ) ) would then represent a unary property being brother of someone. To ensure that then any feature expression X E x , containing the auxiliary feature symbol sibling , can be expanded into an equivalent feature expression X E x , containing only the original feature symbols male and parent , 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 R . C for any role R N R , any (derived) concept C ”, can be described as follows: For any role R in N R , any expression { y } C and any variables x 1 , x 2 , not appearing in C , we have: { x 1 } ( { x 1 , x 2 } : R ( x 1 , x 2 ) C ψ ( x 2 ) ) where ψ : { y } { x 1 , x 2 } is given by ψ ( y ) = x 2 and the expression { x 1 , x 2 } C ψ ( x 2 ) is obtained by substituting each occurrence of y in C by x 2 and by extending each variable declaration Y in C by the “fresh variable” x 1 (compare Appendix A). Analogously, the ALC construct “the existential restriction R . C of a concept C by a role R N R ” can be described by existential quantification: For any role R in N R , any expression { y } C and any variables x 1 , x 2 , not appearing in C , we have: { x 1 } ( { x 1 , x 2 } : R ( x 1 , x 2 ) C ψ ( x 2 ) ) .
Example 28
(mFOL: Expressions). This is an example where we do not need the full first-order power. Actually, we only need atomic feature Ξ m F -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 φ : A B by means of the corresponding graph of assignments A φ = ( A V φ , A E φ , s c A φ , t g A φ ) with A V φ : = { ( v , φ V ( v ) ) v A V } , A E φ : = { ( e , φ E ( e ) ) e A E } where s c A φ and t g A φ are defined for all e A E by s c A φ ( e , φ E ( e ) ) = ( s c A ( e ) , φ V ( s c A ( e ) ) ) and t g A φ ( e , φ E ( e ) ) = ( t g A ( e ) , φ V ( t g A ( e ) ) ) , respectively. The graphs A and A φ 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 φ : α ( cmp ) Y , defined by the assignments x v 1 y v 3 , x v 2 y v 2 , x v 3 y v 4 , x e 1 y e 5 , x e 2 y e 4 , x e 3 y e 3 , the corresponding graph of assignments α ( cmp ) φ is visualized below in the middle. In many cases, we can fortunately use for α ( cmp ) φ the shorthand graph, on the right, without causing unambiguities.
Mathematics 10 01085 i005
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 φ : A B is then denoted by a list of image edges and a list of image vertexes in graph B.
Mathematics 10 01085 i006
In such a way, we can visualize the atomic Ξ C T -expression cmp ( φ ) by the graph above and represent it also by the string cmp ( y e 5 , y e 4 , y e 3 ; y v 3 , y v 2 , y v 4 ) . Since α ( cmp ) has no isolated vertexes, φ : α ( cmp ) Y is uniquely determined by the edge-assignments; thus, we could even use the shorthand notation cmp ( y e 5 , y e 4 , y e 3 ) instead.
Ξ C T -Expressions: The local property composition is defined for a certain pair of edges can be formalized by the following feature Ξ C T -expression:
Mathematics 10 01085 i007
Universal quantification transforms this property into a general property composition is always defined formalized by the following feature Ξ C T -expression, where 0 is the empty graph:
Mathematics 10 01085 i008
The general property composition is always unique is given by the expression g u c :
Mathematics 10 01085 i009
where φ simply maps x e 3 and x e 4 to x e . 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 Ξ C T -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 Ξ C T -expression c s q , where we hide the diagonal:
Mathematics 10 01085 i010
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 Ξ C T -expression m o n :
Mathematics 10 01085 i011
where φ maps x e 1 and x e 2 to x e 4 . 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 Ξ C T -expression f n l where φ maps x e 1 and x e 2 to x e :
Mathematics 10 01085 i012
In case, we want to work with an explicit property two parallel morphisms are equal, we are free to utilize the Ξ C T -expression [ = ] where φ maps x e 1 and x e 2 to x e :
Mathematics 10 01085 i013
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 Ξ C T -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 Ξ C T -expressions with the following structure (compare the definition of the conceptfinal objectin Example 29):
Mathematics 10 01085 i014
I is the shape graph of the (co)limit, i.e., the empty graph in the case of final objects. C I adds to I the shape of a (co)cone with base I while C I + C I extends C I with the shape of a second (co)cone with base I. E x 1 is the conjunction of all atomic cmp -expressions on C I + C I turning both (co)cones into commutative ones. C I + C I extends C I + C I by a single mediator while E x 2 is the conjunction of all atomic cmp -expressions on C I + C I expressing the commutativity requirements for the mediator. C I + C I extends C I + C I by two parallel mediators and E x 3 is the conjunction of all atomic cmp -expressions on C I + C I expressing the commutativity requirements for both mediators. φ : C I + C I C I + C I simply identifies the two mediators in C I + C I .
Example 30
(RM: Expressions). To formalize declarations of tables and data base schemes, respectively, we need only atomic feature Ξ R M -expressions; thus, we consider in this example only atomic Ξ R M -expressions. To deal also with so-called business rules, we would need, however, the full spectrum of first-order Ξ R M -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 Var O b j -indexed family XE ( Ξ ) of subsets XE ( Ξ , X ) FE ( Ξ , X ) of first-order Ξ-expressions on X Var O b j .
Despite the fact that the family FE ( Ξ , X ) , X Var O b j of sets of first-order feature expressions is defined by mutual induction, there is no explicit relationship between the different sets FE ( Ξ , X ) since we do not base the definition of our framework on translation maps induced by variables translations, i.e., morphisms in Var (see Definition A1 in Appendix A). Therefore, the choice of XE ( Ξ , X ) 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 XE ( Ξ , X ) are compatible with translation maps!
What are natural choices? We could simply choose all first-order feature expressions, i.e., XE ( Ξ , X ) = FE ( Ξ , X ) for all X Var O b j , 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 Base 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 U = ( U , Φ U ) fixes for each feature symbol F Φ its semantics in U as a set [ [ F ] ] U Base ( α F , U ) 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 X E x in a Ξ -structure U as a set [ [ E x ] ] X U of all valid interpretations (solutions) of X E x in U . This semantics is a restriction of the semantics of X relative to the carrier U as defined by Equation (1), i.e., [ [ E x ] ] X U [ [ X ] ] U = Base ( X , U ) . For interpretations  ι : X U , we will use, instead of ι [ [ E x ] ] X U , also the more traditional notation ι U X E x .
Given a morphism φ : X Y in Var , we say that an interpretation ϱ : Y U is an expansion of an interpretation ι : X U  via  φ if, and only if, φ ; ϱ = ι .
Mathematics 10 01085 i015
Definition 10
(Feature expressions: Semantics). The semantics of feature Ξ-expressions in an arbitrary, but fixed, Ξ-structure U = ( U , Φ U ) is defined inductively:
  • Atomic expressions: ι [ [ F ( β ) ] ] X U iff β ; ι [ [ F ] ] U
    Mathematics 10 01085 i016
  • Everything: [ [ ] ] X U : = [ [ X ] ] U = Base ( X , U )
  • Void: [ [ ] ] X U : =
  • Conjunction: [ [ ( E x 1 E x 2 ) ] ] X U : = [ [ E x 1 ] ] X U [ [ E x 2 ] ] X U
  • Disjunction: [ [ ( E x 1 E x 2 ) ] ] X U : = [ [ E x 1 ] ] X U [ [ E x 2 ] ] X U
  • Implication: ι [ [ E x 1 E x 2 ] ] X U iff ι [ [ E x 1 ] ] X U implies ι [ [ E x 2 ] ] X U
  • Negation: [ [ ¬ E x ] ] X U : = Base ( X , U ) [ [ E x ] ] X U
  • Existential quantification: ι [ [ ( φ , Y : E x ) ] ] X U iff there exists an expansion ϱ of ι via φ such that ϱ [ [ E x ] ] Y U .
    Mathematics 10 01085 i017
    Universal quantification: ι [ [ ( φ , Y : E x ) ] ] X U iff for all expansions ϱ of ι via φ we have ϱ [ [ E x ] ] Y U .
Remark 11
(Feature expressions: Semantics). Every feature symbol F in Φ reappears as the Ξ-expression α F F ( i d α F ) and Definition 10 ensures [ [ F ( i d α F ) ] ] α F U = [ [ F ] ] U .
The universal quantification X ( φ , Y : E x ) is trivially valid if there is no expansion of ι via φ at all, while the existential quantification X ( φ , Y : E x ) is not valid, in this case.
Two expressions X E x 1 and X E x 2 are semantical equivalent, X E x 1 E x 2 in symbols, if, and only if, [ [ E x 2 ] ] X U = [ [ E x 2 ] ] X U for all Ξ-structures U in Sem ( Ξ ) . 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 0 E x (see Remark 8), [ [ 0 ] ] U = Base ( 0 , U ) is a singleton with the initial morphism ! U : 0 U as the only element. In such a way, we have either [ [ E x ] ] 0 U = [ [ ] ] 0 U = { ! U } , i.e., ! U U 0 E x , or [ [ E x ] ] 0 U = [ [ ] ] 0 U = , i.e., ! U U 0 E x .

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 Cxt of Base . The objects in Cxt are called contexts while we refer to the morphisms in Cxt as context morphisms.
If Base has initial objects, we assume that Cxt contains, at least, one of them denoted by 0 .
Even if Cxt is called the “seventh parameter”, the choice of Cxt relies only on the chosen Base 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 Var is a subcategory of Cxt , we perceive the inclusion Var Cxt 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 Carr Cxt . 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 Cxt F O L as the subcategory of Carr F O L = Base F O L = Set S given by all S-sets K = ( K s s S ) with K s a finite set of literals and logical variables for all s S .
For the sample footprint Ξ F O L = ( Φ F O L , α F O L ) with S = { p r s , n a t } (see Example 11), we consider a sample context K with K n a t the set of all natural numbers from 0 to 200 and K p r s = { A n n a , M i c h a e l , D o r a , H e i n z , S o r i n , G a b i , U w e } .
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 N O 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 Var m F in Example 8, we assume an enumerable set P S y m of admissible predicate symbols and an enumerable set S S y m of admissible sort symbols. Cxt m F is then the full subcategory of Set / M m F given by all finite M m F -typed sets ( K , τ K : K M m F ) such that τ K 1 ( S ) S S y m and τ K 1 ( P ) P S y m .
To be able to reconstruct the sample FOL-footprint Ξ F O L = ( Φ F O L , α F O L ) (see Example 11), we choose for the sample mFOL-footprint Ξ m F = ( Φ m F , α m F ) in Example 13 the sample context ( K , τ K : K M m F ) with τ K 1 ( S ) : = { p r s , n a t } and τ K 1 ( P ) : = { parent , male , age , less } .
Example 34
(CT: Context). We simply choose Cxt C T : = Carr C T = Base C T = Graph . As an example, we consider the following finite graph G.
Mathematics 10 01085 i018
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 T I d of admissible table identifiers, D I d of admissible datatype identifiers and C I d of admissible column identifiers, respectively.
As Cxt R M , we choose the full subcategory of Graph / M R M given by all finite M R M -typed graphs ( K , τ K : K M R M ) such that τ K 1 ( T ) T I d , τ K 1 ( D ) D I d and τ K 1 ( c ) C I d . We intend to formalize the database schema, discussed in Section 3.1.5, and consider the sample RM-context ( K , τ K ) as depicted in the following diagram.
Mathematics 10 01085 i019
Note that both tables do have a column with name s s n ; 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 XE ( Ξ ) -statement ( X , E x , γ ) in context K Cxt O b j is given by a feature Ξ-expression X E x in XE ( Ξ , X ) and a binding morphism γ : X K in Base .
By Stm ( K ) , we denote the set of all XE ( Ξ ) -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 F Φ and a context K there can be different variable declarations X, X , morphisms β : α F X , β : α F X and binding morphisms γ : X K , γ : X K such that β ; γ = β ; γ . That is, the distinct statement expressions ( X , F ( β ) , γ ) and ( X , F ( β ) , γ ) 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 ( α F , F ( i d α F ) , γ ) , γ : α F K . For any context K we denote by At ( K ) the set of all atomic statements in K.
In abuse of notation, we will sometimes use for atomic statements the same notation F ( γ ) 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 Base has an initial object 0 , there is for any closed expression 0 E x (see Remarks 8 and 12) a unique initial morphism γ = ! K : 0 K ; thus, we have ( 0 , E x , ! K ) Stm ( K ) for any context K and all the closed expressions 0 E x in XE ( Ξ , 0 ) . We call ( 0 , E x , ! K ) a general statement inK.
The general statements in Stm ( 0 ) , i.e., statements of the form ( 0 , E x , i d 0 ) are the precise formal counterpart of traditional closed formulaswithin our framework. Be aware that there may be statements ( X , E x , γ : X 0 ) in Stm ( 0 ) 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 Base !
This encapsulation trick we have seen in [31] where it is used for “initial/free constraints”.
Any morphism φ : K G in Cxt induces a map Stm ( φ ) : Stm ( K ) Stm ( G ) defined by simple post-composition for all statements ( X , E x , γ ) in K:
Stm ( φ ) ( X , E x , γ ) : = ( X , E x , γ ; φ )
Mathematics 10 01085 i020
It is easy to show that the assignments K Stm ( K ) and φ Stm ( φ ) provide a functor Stm : Cxt Set . 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 interpretation ( ι , U ) of a context K Cxt O b j is given by a Ξ-structure U = ( U , Φ U ) in Sem ( Ξ ) and a morphism ι : K U in Base .
A morphism ς : ( ι , U ) ( ϱ , V ) between two interpretations of K is given by a morphism ς : U V in Sem ( Ξ ) such that ι ; ς = ϱ for the underlying morphism ς : U V in Carr .
Mathematics 10 01085 i021
For any context K in Cxt we denote by Int ( K ) the category of all interpretations of K and all morphisms between them and by Π K : Int ( K ) Sem ( Ξ ) the obvious projection functor.
Note that, for an initial object K = 0 , the projection functor Π 0 : Int ( 0 ) Sem ( Ξ ) is an isomorphism.
For any Ξ -structure U in Sem ( Ξ ) , the corresponding fiber over  U , i.e., the subcategory of Int ( K ) given by all interpretations of K in U , is a discrete category representing the hom-set Base ( K , U ) .
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 Base ( K , U ) .
In examples, following the path of Functorial Semantics, Sem ( Ξ ) will be constituted by Ξ-structures U = ( U , Φ U ) where U is provided by a category like Set or Par , for example. In those cases, Base ( K , U ) 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 ς : U V in Carr and a morphism in Base ( K , V ) 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 φ : K G induces a functor Int ( φ ) : Int ( G ) Int ( K ) with:
Int ( φ ) ; Π K = Π G : Int ( G ) Sem ( Ξ )
defined by simple pre-composition: Int ( φ ) ( ϱ , V ) : = ( φ ; ϱ , V ) for all interpretations ( ϱ , V ) of G, and for any morphism ς : ( ι , U ) ( ϱ , V ) between two interpretations of G the same underlying morphism ς : U V in Carr establishes a morphism Int ( φ ) ( ς ) : = ς : ( φ ; ι , U ) ( φ ; ϱ , V ) between the corresponding two interpretations of K.
Mathematics 10 01085 i022
It is straightforward to validate that the assignments K Int ( K ) and φ Int ( φ ) define a functor Int : Cxt o p Cat . 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 K Cxt , any XE ( Ξ ) -statement ( X , E x , γ ) in K and any interpretation ( ι , U ) of context K we define:
( ι , U ) K ( X , E x , γ ) i f f γ ; ι U X E x ( i . e . γ ; ι [ [ E x ] ] X U )
Mathematics 10 01085 i023
Remark 18
(Validity of Closed Formulas). In case X = K = 0 , we do have for any Ξ-structure U = ( U , Φ U ) in Sem ( Ξ ) exactly one interpretation ( ! U , U ) thus for any closed formula ( 0 , E x , i d 0 ) (see Remark 15) ( ! U , U ) 0 ( 0 , E x , i d 0 ) means nothing but that the closed formula ( 0 , E x , i d 0 ) is valid in U in the traditional sense. Therefore, we will also write U ( 0 , E x , i d 0 ) instead of ( ! U , U ) 0 ( 0 , E x , i d 0 ) .
Moreover, the validity of closed formulas is context independent in the following sense: For any context K and any closed expressions 0 E x , we have:
( ι , U ) K ( 0 , E x , ! K ) i f f ! K ; ι = ! U U 0 E x i f f [ [ E x ] ] 0 U = { ! U } i f f U ( 0 , E x , i d 0 )
After we developed everything in a systematic modular way, we obtain the satisfaction condition nearly “for free”.
Corollary 1
(Satisfaction condition). For any morphism φ : K G in Cxt , any XE ( Ξ ) -statement ( X , E x , γ ) in K and any interpretation ( ϱ , U ) of context G we have:
Int ( φ ) ( ϱ , U ) K ( X , E x , γ ) i f f ( ϱ , U ) G Stm ( φ ) ( X , E x , γ ) .
Mathematics 10 01085 i024
Proof. 
Due to the definition of the functors Int : Cxt o p Cat and Stm : Cxt Set , 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 Base , of subcategories Var , Cxt , Carr of Base , of a footprint Ξ over Var , of a category Sem ( Ξ ) of Ξ-structures and of an Var O b j -indexed family XE ( Ξ ) of first-order Ξ-expressions establishes a corresponding Institution of Statements IS = ( Cxt , Stm , Int , ) .
Remark 20
(Indexed institutions). We come back to the discussion in Remark 5. If we consider a category of footprints over Var 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 Base and Var also the same categories Carr and Cxt . We have to show that this assumption ensures that the assignments Ξ Str ( Ξ ) can be lifted to a functor Str . Analogously, the assignments Ξ FE ( Ξ ) should also provide a functor FE . Finally, the choices of Sem ( Ξ ) and XE ( Ξ ) have to be aligned in such a way that we obtain corresponding restrictions of the functors Str and FE , 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 X t 1 = t 2 , define atomic equational statements ( X , t 1 = t 2 , γ ) in contexts K with γ : X K 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 K t 1 = t 2 in contexts K.
This means that we adapt for Institutions of Equations the construction scheme in Figure 1 in the following way: We have Str ( Ξ ) = Sem ( Ξ ) . Step (6) is dropped and we construct directly Stm ( K ) as a set of equations in context K. Correspondingly, the satisfaction relations K 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 S Set O b j of sort symbols and choose as Base E Q the interpretation category Set S = [ S Set ] . Var E Q is the full subcategory of Base E Q given by all finite and disjoint S-sets X = ( X s s S ) with X s a subset of the set { x , x 1 , x 2 , , y , y 1 , y 2 , } for all s S .

4.1. Signatures, Algebras and Contexts

Signatures Σ = ( Ω , i n , o u t ) correspond to traditional many-sorted algebraic signatures and are given by a set Ω of operation symbols, a map i n assigning to each operation symbol ω Ω an object i n ( ω ) in Var E Q , its arity, and a map o u t : Ω S . For convenience, we assume that i n ( ω ) = { x 1 , x 2 , , x n } , n 0 ; thus, we can represent i n ( ω ) as a list [ x 1 : s 1 , x 2 : s 2 , , x n : s n ] of variable declarations (compare Example 11).
We have Carr E Q : = Base E Q . As structures, we consider Σ - algebras  A = ( A , Ω A ) with an S-set A = ( A s s S ) and a family Ω A of operations ω A : A i n ( ω ) A o u t ( ω ) , ω Ω , where A i n ( ω ) is a shorthand for the set Set S ( i n ( ω ) , A ) of all S-maps from i n ( ω ) into A.
A homomorphism  ς : A B between Σ -algebras A and B is given by an S-map ς = ( ς s s S ) : A B such that ω A ; ς s = ς i n ( ω ) ; ω B for all ω Ω where the map ς i n ( ω ) : A i n ( ω ) B i n ( ω ) is defined by ς i n ( ω ) ( τ ) : = τ ; ς for all S-maps τ A i n ( ω ) .
Mathematics 10 01085 i025
Alg ( Σ ) is the category of all Σ -algebras and all homomorphisms between them.
We choose Cxt E Q : = Carr E Q = Base E Q = Set S . The model functor of an Institution of Equations is defined in full analogy to Institutions of Statements.
An interpretation ( ι , A ) of a context K in Cxt E Q , i.e., of an S-set K, is given by a Σ -algebra A = ( A , Ω A ) and an S-map ι : K A .
A morphism ς : ( ι , A ) ( ϱ , B ) between two interpretations of K is given by a homomorphism ς : A B such that ι ; ς = ϱ for the underlying S-map ς : A B .
Mathematics 10 01085 i026
For any context K in Cxt E Q , Int ( K ) denotes the category of all interpretations of K and all morphisms between them and Π K : Int ( K ) Alg ( Σ ) is the corresponding projection functor. The fiber over a Σ -algebra A represents the semantics of a context K in A , i.e., the set A K : = Set S ( K , A ) of all S-maps from K into the carrier of A .
Note that, in the case of the empty S-set K = 0 = ( s S ) the projection functor Π 0 : Int ( 0 ) Alg ( Σ ) is an isomorphism.
Any S-map φ : K G induces a functor Int ( φ ) : Int ( G ) Int ( K ) with:
Int ( φ ) ; Π K = Π G : Int ( G ) Alg ( Σ )
defined by simple pre-composition: Int ( φ ) ( ϱ , B ) : = ( φ ; ϱ , B ) for all interpretations ( ϱ , B ) of G, and for any morphism ς : ( ι , A ) ( ϱ , B ) between two interpretations of G the same underlying S-map ς : A B establishes a morphism Int ( φ ) ( ς ) : = ς : ( φ ; ι , A ) ( φ ; ϱ , B ) between the corresponding two interpretations of K.
Mathematics 10 01085 i027
The assignments K Int ( K ) and φ Int ( φ ) define a functor Int : Cxt E Q o p Cat . 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 T Σ ( K ) of all Σ -terms on K is defined inductively as the smallest S-set such that:
  • K T Σ ( K )
  • ω T Σ ( K ) o u t ( ω ) for all ω Ω with i n ( ω ) the empty S-set 0 = ( s S ) .
  • ω τ s 1 ( x 1 ) , , τ s n ( x n ) T Σ ( K ) o u t ( ω ) for all ω Ω with i n ( ω ) non-empty and all S-maps τ : i n ( ω ) T Σ ( K ) where [ x 1 : s 1 , x 2 : s 2 , , x n : s n ] is the assumed representation of i n ( ω ) as a list of variable declarations.
A Σ -equation ( K , t 1 = t 2 ) in K is given by two Σ -terms t 1 , t 2 T Σ ( K ) s for some s S and Eq ( K ) denotes the set of all Σ -equations ( K , t 1 = t 2 ) in K. In the usual way, the inductive definition of Σ -terms allows us to extend any S-map φ : K G between S-sets to an S-map φ * : T Σ ( K ) T Σ ( G ) such that ; φ * = φ ; thus φ : K G induces a map Eq ( φ ) : Eq ( K ) Eq ( G ) with:
Eq ( φ ) ( K , t 1 = t 2 ) : = ( G , φ * ( t 1 ) = φ * ( t 2 ) )
for all Σ -equations ( K , t 1 = t 2 ) in K.
Mathematics 10 01085 i028
Since i d K * = i d T Σ ( K ) and ( φ ; ψ ) * = φ * ; ψ * for all φ : K G , ψ : G H , the assignments K Eq ( K ) and φ Eq ( φ ) define a functor Eq : Cxt E Q Set . 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 ι : K A of a context K in a Σ -algebra A = ( A , Ω A ) to an S-map ι : T Σ ( K ) A such that:
; ι = ι .
Mathematics 10 01085 i029
In such a way, we can define the semantics t A of a Σ -term t T Σ ( K ) , s S in a Σ -algebra A as a map t A : A K A s defined by t A ( ι ) : = ι ( t ) for all ι : K A . 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 K Cxt E Q , any Σ-equation ( K , t 1 = t 2 ) in K and any interpretation ( ι , A ) of context K in a Σ-algebra A = ( A , Ω A ) , we define:
( ι , A ) K ( K , t 1 = t 2 ) i f f ι ( t 1 ) = ι ( t 2 ) ( i . e . t 1 A ( ι ) = t 2 A ( ι ) )
Mathematics 10 01085 i030
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 φ : K G in Cxt E Q , any Σ-equation ( K , t 1 = t 2 ) in K and any interpretation ( ϱ , A ) of context G in a Σ-algebra A = ( A , Ω A ) , we have:
Int ( φ ) ( ϱ , A ) K ( K , t 1 = t 2 ) i f f ( ϱ , A ) G Eq ( φ ) ( K , t 1 = t 2 ) .
Mathematics 10 01085 i031
Proof. 
Due to the definition of the functors Int : Cxt E Q o p Cat , Eq : Cxt E Q Set 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 Σ = ( Ω , i n , o u t ) establishes a corresponding Institution of Equations IE = ( Cxt E Q , Eq , Int , ) .

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 Ct of contexts and a functor St : Ct Set , assigning to each K Ct O b j a set St ( K ) of all statements in context K.
An St - sketch K = ( K , S t K ) is given by a context K Ct O b j and a set S t K St ( K ) of statements in context K.
In this subsection, we consider the case Ct = Cxt , St = Stm with IS = ( Cxt , Stm , Int , ) an arbitrary Institution of Statements according to Theorem 1.
All definitions and constructions are, however, institution-independent; thus, they apply analogously to the case Ct = Cxt E Q , St = Eq with IE = ( Cxt E Q , Eq , Int , ) an arbitrary Institution of Equations according to Proposition 2.
Example 36
(FOL: Sketches). We extend the sample context K in Example 31 to an Stm F O L -sketch K with the atomic statements (facts) parent ( A n n a , U w e , G a b i ) , parent ( U w e , H e i n z , D o r a ) , male ( M i c h a e l ) and the proper first-order statements ( [ y : p r s ] , s b l , ( y M i c h a e l ) ) , ( [ y : p r s ] , s b l , ( y U w e ) ) , ( [ y : p r s , x : n a t ] , y o u n g e r , ( y M i c h a e l , x 12 ) ) , ( [ y : p r s ] , s b l , ( y G a b i ) ) . The expression [ y : p r s ] s b l , representing the property being sibling of someone, and the expression [ y : p r s , x : n a t ] y o u n g e r , representing the property younger than, are defined in Example 26.
Example 37
(ALC: Sketches). Contexts in ALC are sets N O of individual names as already mentioned in Example 32. A concept assertion in ALC, i.e., a statement of the form a : C with a N O and C a (derived) concept, can be seen as a statement ( { x 1 } , C ( x 1 ) , ( x 1 a ) ) in N O where the assignment ( x 1 a ) defines a binding β : { x 1 } N O with β ( x 1 ) = a .
A role assertion, i.e., a statement of the form ( a , b ) : R where a , b N O and R is a role, can be seen as a statement ( { x 1 , x 2 } , R ( x 1 , x 2 ) , ( x 1 a , x 2 b ) ) in N O . An ABox in ALC is a finite set of assertional axioms. Thus, a pair ( N O , A ) of a set N O of individual names and an ABox A of assertional axioms in N O is just an Stm A L C -sketch in our sense.
Example 38
(mFOL: Sketches). We extend the context ( K , τ K : K M m F ) in Example 33 to an Stm m F -sketch with the atomic statements un ( m a l e : P , p r s : S ) , bin ( l e s s : P , n a t : S , n a t : S ) , bin ( a g e : P , p r s : S , n a t : S ) and trt ( p a r e n t : P , p r s : S , p r s : S , p r s : S ) .
Obviously, this Stm m F -sketch describes exactly the sample footprint Ξ F O L in Example 11! Actually, we can describe all FOL-footprints, declaring only unary, binary or tertiary predicate symbols, as Stm m F -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 Stm m F -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 Stm m F -sketches, with exactly one atomic statement for each element in τ K 1 ( P ) 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 Ξ C T -expressions we discussed in Example 29.
Mathematics 10 01085 i032
As an example, we consider the context G from Example 34 and extend it to an Stm C T -sketch G = ( G , S t G ) visualized above. S t G contains the atomic statements cmp ( a , b , e ) , cmp ( a , b , f ) , cmp ( c , d , g ) and the proper first-order statements:
( x v , f n l , ( x v 3 ) ) , ( x v 1 x e x v 2 , m o n , ( x e b ) ) , ( x v 1 x e x v 2 , m o n , ( x e g ) ) .
Example 40
(RM: Sketches). We extend the sample context ( K , τ K ) from Example 35 to an Stm R M -sketch K = ( K , S t K ) . First, we declare two tables, i.e., S t K contains two atomic statements tb ( 3 ) ( γ 1 ) , tb ( 3 ) ( γ 2 ) with bindings γ 1 and γ 2 visualized by the following typed graphs:
Mathematics 10 01085 i033
Then, we declare for each table a primary key, i.e., we add two atomic statements pk ( γ 3 ) , pk ( γ 4 ) with bindings γ 3 , γ 4 given by E m p l : T e i d : c I n t : D and A d d r : T A . s s n : c I n t : D . Moreover, we declare a foreign key fk ( γ 5 ) with γ 5 depicted by E m p l : T E . s s n : c I n t : D A . s s n : c x t 2 : T .
We could also require that each employee has a name and add an atomic statement tot ( γ 6 ) with γ 6 given by E m p l : T n a m e : c S t r i n g : D .
Analogously to the requirements in Example 38, we do have the requirement that a table identifier can only appear once in a tb ( n ) -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 Cxt , any set S Stm ( K ) of statements in K and any interpretation ( ι , U ) of context K in a Ξ -structure U we define, relying on Definition 14:
( ι , U ) K S i f f ( ι , U ) K ( X , E x , γ ) f o r a l l ( X , E x , γ ) S .
Be aware that the statements in S may have different variable declarations X.
Definition 17
(Interpretation of sketch). A valid interpretation (model)of an Stm -sketch K = ( K , S t K ) is an interpretation ( ι , U ) of context K such that ( ι , U ) K S t K .
We denote by Int ( K ) the full subcategory of Int ( K ) determined by all valid interpretations of K and by Π K : Int ( K ) Sem ( Ξ ) we denote the corresponding restriction of the projection functor Π K : Int ( K ) Sem ( Ξ ) .
Remark 21
(Traditional presentations). If Base has an initial object 0 , we can consider sketches ( 0 , S t ) with S t only containing closed formulas, i.e., statements of the form ( 0 , E x , i d 0 ) (see Remark 15). As discussed before, the projection functor Π 0 : Int ( 0 ) Sem ( Ξ ) , due to Definition 13, is an isomorphism. In such a way, ( 0 , S t ) is not only determining the interpretation subcategory Int ( 0 , S t ) Int ( 0 ) but can also be seen as a presentation (specification) of the corresponding full subcategory Sem ( Ξ , ( 0 , S t ) ) : = Π 0 ( Int ( 0 , S t ) ) of Sem ( Ξ ) isomorphic to Int ( 0 , S t ) .
In other words: due to Remark 18, we can describe Sem ( Ξ , ( 0 , S t ) ) as the full subcategory of Sem ( Ξ ) given by all Ξ-structures U = ( U , Φ U ) in Sem ( Ξ ) such that U ( 0 , E x , i d 0 ) for all closed formulas ( 0 , E x , i d 0 ) in S t .
Example 41
(FOL: Interpretations). If we interpret the symbolic literals in K p r s = { A n n a , M i c h a e l , D o r a , H e i n z , S o r i n , G a b i , U w e } by the real persons in our family in December 2021, we will not obtain a valid interpretation of the Stm F O L -sketch K in Example 36 since the statement ( [ y : p r s ] , s b l , ( y G a b i ) ) is not satisfied by this interpretation. If we use, however, the statement ( [ y : p r s ] , ¬ s b l , ( y G a b i ) ) instead, the interpretation becomes valid.
Note that the statement ( [ y : p r s ] , s b l , ( y U w e ) ) is satisfied by the interpretation even if there is no witness for this statement in the context. U w e ’s only sister B r i t a is not present in the context K!
Example 42
(mFOL: Interpretations). An interpretation of the sample context ( K , τ K ) assigns to each element in τ K 1 ( S ) : = { p r s , n a t } and τ K 1 ( P ) : = { parent , male , age , less } , respectively, a set. Since Base m F is the slice category SET / M m F , a certain set can either serve as a sort or as a predicate.
Our choice of Sem ( Ξ m F ) in Example 23 ensures, in addition, that the valid interpretations of the sample Stm m F -sketch from Example 38 are in one-to-one correspondence to the Ξ F O L -structures in Sem ( Ξ F O L ) = Str ( Ξ F O L ) . 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 Stm m F -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 Stm m F -sketch with two different atomic statements for, at least, one element in τ K 1 ( P ) has no valid interpretation at all in Sem ( Ξ m F ) .
Example 43
(Category Theory: Interpretations). Since we defined in Example 24 a very liberal semantics, we do have interpretations ( ι , U ) , U = ( U , Φ C T U ) of the sample Stm C T -sketch G = ( G , S t G ) in Example 39, where the graph homomorphism ι : G U 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 G the general statement ( 0 , g u c , ! G ) with the closed expression 0 g u c expressing the property composititon is always unique (see Example 29), ( ι , U ) could be only a valid interpretation of G if ι identifies e and f.
Example 44
(RM: Interpretations). Analogously to Example 42, our choice of Sem ( Ξ R M ) in Example 25 ensures that the valid interpretations of “well-formed” Stm R M -sketches, i.e., Stm R M -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 IS = ( Cxt , Stm , Int , ) .
Definition 18
(Statement entailment). For any context K in Cxt and any sets S , T Stm ( K ) of statements in K, we say that S entails T in a Ξ - structure U , S K U T in symbols, if, and only if, for all interpretations ( ι , U ) of K in U : ( ι , U ) K S implies ( ι , U ) K T .
Sentails T, S K T in symbols, if, and only if, S K U T for all Ξ-structures U in Sem ( Ξ ) .
Definition 19
(Sketch morphism). An IS -morphism φ : K G between two Stm -sketches K = ( K , S t K ) , G = ( G , S t G ) is a morphism φ : K G in Cxt such that S t G G Stm ( φ ) ( S t K ) . An IS -morphism φ : K G is calledstrictif S t G Stm ( φ ) ( S t K ) .
Sk ( IS ) m denotes the category of all Stm -sketches and all IS -morphisms between them. Its subcategory of all Stm -sketches and all strict IS -morphisms is denoted by Sk ( IS ) s m .
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 is clear from the context, we will also use the shorthand notations Sk m and Sk s m instead of Sk ( IS ) m and Sk ( IS ) s m , respectively.
IS -morphisms φ : K G with K = G and φ = i d K simply reflect statement entailments. For any IS -morphism φ : K G , the condition S t G G Stm ( φ ) ( S t K ) ensures, due to the satisfaction condition that the functor Int ( φ ) : Int ( G ) Int ( K ) restricts to a functor from Int ( G ) into Int ( K ). In such a way, the assignments K Int ( K ) extend to a functor Int Sk : ( Sk m ) o p Cat .
According to well-known general results (see Corollary 4.3 in [2]), we know that Sk m has whatever limits or colimits the category Cxt has since limits and colimits in the category Sk m of Stm -sketches and IS -morphisms are constructed by means of limits and colimits in the category Cxt , respectively (compare Propositions 5 and 6). This ensures also that we do have amalgamation [1,2,38]: Int Sk : ( Sk m ) o p Cat maps all colimits in Cxt that are preserved by the inclusion Cxt Base , to limits in Cat .
The Theory of Institutions gives us “for free” Stm -sketches, IS -morphisms, the category Sk m as well as the extended model functor Int Sk : ( Sk m ) o p Cat .
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 Sem ( Ξ )

A Ξ -structure F = ( F , Φ F ) is freely generated in Sem ( Ξ ) by an Stm -sketch G = ( G , S t G ) if, and only if, F is in Sem ( Ξ ) and there is a valid interpretation ( η G , F ) of G in F that is universal relative to Sem ( Ξ ) . That is, for all Ξ -structures U = ( U , Φ U ) in Sem ( Ξ ) and all valid interpretations ( ι , U ) of G in U there exists a unique morphism ι * : F U in Sem ( Ξ ) such that η G ; ι * = ι in Base , i.e., such that ι * establishes an interpretation morphism ι * : ( η G , F ) ( ι , U ) in Int ( G ) Int ( G ) according to Definition 13.
Mathematics 10 01085 i034
A Ξ -structure, freely generated in Sem ( Ξ ) by an Stm -sketch G = ( G , S t G ) , is obviously uniquely determined “up to isomorphism in Sem ( Ξ ) ” if it exists.
The universal property of ( η G , F ) entails that ( η G , F ) is initial in Int ( G ), thus the projection functor Π G : Int ( G ) Sem ( Ξ ) establishes a functor from Int ( G ) into the co-slice category F / Sem ( Ξ ) .
In the case that S t G contains only atomic statements, the definition of morphisms between Ξ -structures ensures ( η G ; ϱ , U ) G S t G for any morphism ϱ : F U in Sem ( Ξ ) ; thus, the assignments ( ϱ : F U ) ( η G ; ϱ , U ) establish a functor from F / Sem ( Ξ ) into Int ( G ) . Due to the universal property of ( η G , F ) , we obtain ( η G ; ϱ ) * = ϱ . Together with the equation η G ; ι * = ι , this ensures that the two functors establish an isomorphism between Int ( G ) and F / Sem ( Ξ ) (compare Proposition 4.10 in [2]). This justifies that we can call, in this atomic case, the pair ( G , η G ) a sketch representation of F .
Note that the Ξ -structure ( G , Φ ) with Φ a Φ -indexed family of empty sets is trivially freely generated in Sem ( Ξ ) by G = ( G , ) .

Second, We Consider Structures Freely Generated Relative to a Subcategory D :

Let D be an arbitrary full subcategory of Sem ( Ξ ) . A Ξ -structure F = ( F , Φ F ) is freely generated in D by an Stm -sketch G = ( G , S t G ) if, and only if, F is an object in D and there is a valid interpretation ( η G , F ) of G in F that is universal relative to D . That is, for all Ξ -structures U = ( U , Φ U ) in D and all valid interpretations ( ι , U ) of G in U there exists a unique morphism ι * : F U in D such that η G ; ι * = ι in Base , i.e., such that ι * establishes an interpretation morphism ι * : ( η G , F ) ( ι , U ) in Int ( G ) Int ( G ) .
Mathematics 10 01085 i035
A Ξ -structure, freely generated in D by an Stm -sketch G = ( G , S t G ) is, obviously, uniquely determined “up to isomorphism in D ” if it exists. In this case, the universal property of ( η G , F ) entails that ( η G , F ) is initial in the subcategory Int ( G ) D : = Π G 1 ( D ) of all valid interpretations of G in Ξ -structures in D . Analogous to the case D = Sem ( Ξ ) , we obtain, moreover, an isomorphism between Int ( G ) D and the co-slice category F / D if S t G contains only atomic statements.

Third, We Consider Subcategories Described by Logical Means

One logical means to describe subcategories of Sem ( Ξ ) are Stm -sketches ( 0 , S t ) with S t only containing closed formulas, i.e., statements of the form ( 0 , E x , i d 0 ) . As discussed in Remark 21, those sketches can be seen as presentations in the traditional sense of the Theory of Institutions specifying subcategories Sem ( Ξ , ( 0 , S t ) ) of Sem ( Ξ ) .
As another logical means to describe subcategories of Sem ( Ξ ) , 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 IS = ( Cxt , Stm , Int , ) with Carr Cxt and At ( K ) Stm ( K ) for all contexts K in Cxt , i.e., Stm ( K ) contains all atomic statements in K.
There are two canonical ways to transform a Ξ -structure U = ( U , Φ U ) into an Stm -sketch. The atomic variant S Φ U = ( U , S t Φ U ) encodes only the semantics of feature symbols and uses therefore only atomic statements:
S t Φ U : = { ( α F , F ( i d α F ) , γ ) F Φ , γ [ [ F ] ] U } At ( U ) .
The full variant S U = ( U , S t U ) is available if XE ( Ξ , X ) = FE ( Ξ , X ) for all X Var O b j and encodes the semantics of all feature expressions:
S t U : = { ( X , E x , γ ) X Var O b j , E x FE ( Ξ , X ) , γ [ [ E x ] ] X U } Stm ( U ) .
We obviously have S t Φ U S t U . For any statement ( X , E x , γ ) in U we obtain, according to (13) and the definition of satisfaction relations in Definition 14,
( X , E x , γ ) S t U i f f γ ; i d U = γ [ [ E x ] ] X U i f f ( i d U , U ) U ( X , E x , γ ) .
thus ( i d U , U ) is a valid interpretation of S Φ U as well as of S U .
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 S Φ U 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 U = ( U , Φ U ) in Sem ( Ξ ) is freely generated in Sem ( Ξ ) by the Stm -sketch S Φ U = ( U , S t Φ U ) with the universal interpretation ( i d U , U ) . S t Φ U contains only atomic statements thus ( S Φ U , i d U ) becomes a sketch representation of U in the sense of the last subsection. In particular, there is an isomorphism between Int ( S Φ U ) and U / Sem ( Ξ ) .
The crucial observation is, however, that the assignments U S Φ U define an embedding Enc : Str ( Ξ ) Sk ( Stm ) a of Str ( Ξ ) into the category Sk ( Stm ) a of all Stm -sketches and all Stm -sketch arrows defined in the next subsection in Definition 20. This embedding establishes, moreover, an isomorphism between Str ( Ξ ) and the subcategory atSk ( Stm ) s a of Sk ( Stm ) a given by all atomic Stm -sketches and all strict Stm -sketch arrows between them. An Stm -sketch K = ( K , S t K ) is atomic if S t K At ( K ) (see Remark 14).
The concepts (atomic) Stm -sketch and (strict) Stm -sketch arrow concern only the “structure” of sketches and are completely semantics-independent. That is, the transition along the encoding functor Enc from the category Str ( Ξ ) to the isomorphic category atSk ( Stm ) s a implements an abstraction from the concept semantic structure (model) to the concept atomic sketch. In case Sem ( Ξ ) = Str ( Ξ ) , this abstraction is exhaustive. In case Sem ( Ξ ) O b j Str ( Ξ ) O b j , however, we need an additional semantics-independent, purely structural characterization identifying exactly all those atomic Stm -sketches S Φ U in atSk ( Stm ) s a with U in Sem ( Ξ ) , 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 U into the Stm -sketches S Φ U and S U . We can even encode the validity of certain classes of “closed formulas” in U by means of semantics-independent, pure structural closedness properties of S Φ U or S U , 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 Ct and a functor St : Ct Set . An arrow φ : K G between two St -sketches K = ( K , S t K ) , G = ( G , S t G ) is given by a context morphism φ : K G . φ : K G is calledstrictif S t G St ( φ ) ( S t K ) .
Sk ( St ) a denotes the category of all St -sketches and all St -sketch arrows between them. Its subcategory of all St -sketches and all strict St -sketch arrows is denoted by Sk ( St ) s a .
If St is clear from the context, we will also use the shorthand notations Sk a and Sk s a instead of Sk ( St ) a and Sk ( St ) s a , respectively. If K = G and φ = i d K , we will also just write K G instead of φ : K G . We consider the case Ct = Cxt , St = Stm with IS = ( Cxt , Stm , Int , ) an Institution of Statements.
Remark 22
(Sketch Morphisms vs. Sketch Arrows). An IS -morphism φ : K G is a Stm -sketch arrow φ : K G satisfying the semantical morphism condition S t G G Stm ( φ ) ( S t K ) . Not every Stm -sketch arrow φ : K G provides an IS -morphism φ : K G , but each IS -morphism φ : K G has an underlying Stm -sketch arrow φ : K G .
Any strict Stm -sketch arrow φ : K G satisfies, trivially, the morphism condition and provides, in such a way, a strict IS -morphism φ : K G 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 IS - implication P φ C is given by two Stm -sketches P = ( P , S t P ) , C = ( C , S t C ) and a context morphism φ : P C .
An IS -implication P φ C is calledstrictif S t C Stm ( φ ) ( S t P ) .
Sk ( IS ) i denotes the category of all Stm -sketches and all IS -implications between them. Its subcategory of all Stm -sketches and all strict IS -implications is denoted by Sk ( IS ) s i .
If IS is clear from the context, we will also use the shorthand notations Sk i and Sk s i instead of Sk ( IS ) i and Sk ( IS ) s i , respectively. If P = C and φ = i d P , we will also simply write P C instead of P i d P C .
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 IS -implication P φ C between two Stm -sketches P = ( P , S t P ) and C = ( C , S t C ) .
Aninterpretation ( ι , U ) of context P in a Ξ-structure U satisfies P φ C , ( ι , U ) P φ C in symbols, if, and only if, ( ι , U ) P S t P implies that there exists an interpretation ( ϱ , U ) of context C in U with φ ; ϱ = ι such that ( ϱ , U ) C S t C .
P φ C is valid in a Ξ -structure U , U P φ C in symbols, if, and only if, we have ( ι , U ) P φ C for all interpretations ( ι , U ) of P in U .
Mathematics 10 01085 i036
P φ C isvalid (in IS ), P φ C in symbols, if, and only if, U P φ C for all Ξ-structures U in Sem ( Ξ ) .
Remark 23
(Subcategories of valid Sketch Implications). For any Ξ-structure U and any Stm -sketch P we have U P i d P P . Moreover, U A φ B and U B ψ C implies U A φ ; ψ C . In such a way, the collection of all IS -implications, valid in a Ξ-structure U , defines a corresponding subcategory of Sk i with the same objects as Sk i .
Intersecting all those subcategories for all Ξ-structures U in Sem ( Ξ ) , we obtain the subcategory Sk i ( Sem ( Ξ ) ) of Sk i given by all IS -implications valid in IS .
Remark 24
(Sketch Implications vs. Sketch Arrows). An IS -implication P φ C is simply another notation for a Stm -sketch arrow φ : P C . The only difference is that we allow P φ C to be the subject of semantical implication conditions , like U P φ C , while the corresponding Stm -sketch arrow φ : P C is considered as a pure structural entity without any semantical significance.
In contrast to IS -morphisms (compare Remark 22), a strict Stm -sketch arrow φ : P C does not give, trivially, rise to an IS -implication P φ C satisfying semantical implication conditions.
For any Stm -sketch arrow φ : P C , we can construct a respective strict Stm -sketch arrow φ : P C φ with C φ : = ( C , S t C Stm ( φ ) ( S t P ) ) . The satisfaction condition ensures that the corresponding IS -implications P φ C and P φ C φ are semantically equivalent: U P φ C if, and only if, U P φ C φ for all Ξ-structures U .
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 P = C and φ = i d P , a Stm -sketch arrow φ : P C provides an IS -morphism i d P : P C if, and only if, S t C P S t P while the validity in IS of the corresponding IS -implication P C means semantic entailment exactly in the opposite direction S t P P S t C !
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 Stm -sketch arrow φ : P C , issoundfor a certain Institution of Statements IS = ( Cxt , Stm , Int , ) if, and only if, the respective IS -implication P φ C is valid in IS !
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 IS -implications (or, more precisely, IS -implication schemata) that areuniversalin the sense that they are valid in any Institution of Statements IS = ( Cxt , Stm , Int , ) , 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 Stm -sketches L = ( X , { ( X , E x 1 E x 2 , i d X ) } ) and R = ( X , { ( X , E x 1 , i d X ) , ( X , E x 2 , i d X ) } ) . In addition, the “elimination rule” L R as the “introduction rule” R L 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:
( X , { ( X , E x 1 , i d X ) , ( X , E x 1 ( φ , Y : E x ) , i d X ) } ) φ ( Y , { ( Y , E x 2 , i d Y ) } ) .
The validity of other IS -implications may only depend on the chosen base category Base of an Institution of Statements. As long as Base is a presheaf topos, we do have, for example, IS -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 Ξ C T -expression [ = ] in Example 29).
Besides universal IS -implications, we do also have IS -implications that are valid in all Ξ-structures U , and we have chosen to be in Sem ( Ξ ) . In case Sem ( Ξ ) O b j Str ( Ξ ) O b j , we may be able to axiomatize Sem ( Ξ ) in the sense that there is a set S E M of IS -implications such that Sem ( Ξ ) = Str ( Ξ , S E M ) where Str ( Ξ , S E M ) is the full subcategory of Str ( Ξ ) given by all those Ξ-structures U such that U P φ C for all IS -implications P φ C in S E M .
In the same way, we can utilize any set I M P of IS -implications as a set ofaxiomsdescribing the full subcategory Sem ( Ξ , I M P ) of Sem ( Ξ ) given by all those Ξ-structures U in Sem ( Ξ ) such that U P φ C for all IS -implications P φ C in I M P .
At the end of Section 5.2.1, we described a mechanism to define subcategories of Sem ( Ξ ) by means of axioms in the traditional Hilbert-style, i.e., by Stm -sketches ( 0 , S t ) with S t only containing closed formulas, i.e., statements of the form ( 0 , E x , i d 0 ) . This mechanism can be integrated in the sketch implication based axiomatization mechanism, in a trivial way, by simply adding to I M P a corresponding introduction rule ( 0 , ) ( 0 , S t ) . 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 ( 0 , ( X : E x E x ) , i d 0 ) with E x a finite conjunction of atomic expressions X F i ( β i ) , β i : α F i X with 1 i n and an atomic expression X E x = F ( β ) , β : α F X , but rather as the corresponding IS -implication P C with P = ( X , S t P ) , S t P = { ( α F i , F i ( i d α F i ) , β i ) 1 i n } and C = ( X , S t C ) , S t C = { ( α F i , F ( i d α F ) , β ) } .
Example 46
(ALC: Sketch implications). A so-called TBox in ALC is a finite set of terminological axioms, i.e., of general concept inclusions C D . 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):
( { p 1 } , { ( { p 1 } , C ( p 1 ) , i d { p 1 } ) } ) ( { p 1 } , { ( { p 1 } , D ( p 1 ) , i d { p 1 } ) } )
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:
U ( 0 , ( X : ( i n , α C T ( id ) : id ( i d α C T ( id ) ) ) ) , i d 0 )
where graph X consists only of a vertex x v and i n : X α C T ( id ) is the inclusion of X into α C T ( id ) (see Examples 14 and 29). As proposed in Remark 27, we can equivalently add the introduction rule:
( 0 , ) ( 0 , { ( 0 , ( X : ( i n , α C T ( id ) : id ( i d α C T ( id ) ) ) ) , i d 0 ) } )
to our axioms. According to a general pattern, discussed in the next Section 5.2.4, we can use, instead, the equivalent rule:
( X , ) ( X , { ( X , ( i n , α C T ( id ) : id ( i d α C T ( id ) ) ) , i d X ) } ) .
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:
( X , ) i n ( α C T ( id ) , { ( α C T ( id ) , id ( i d α C T ( id ) ) ) , i d α C T ( id ) ) } )
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 S U = ( U , S t U ) of Ξ -structures U as defined in (13).
For any context P any statement ( X , E x , β ) in P and any interpretation ( ι , U ) of P in a Ξ -structure U , we have Stm ( ι ) ( X , E x , β ) = ( X , E x , β ; ι ) , due to (2), thus the satisfaction condition and the equivalences in (14) provide the following equivalence of statements:
( ι , U ) P ( X , E x , β ) i f f ( i d U , U ) U ( X , E x , β ; ι ) i f f Stm ( ι ) ( X , E x , β ) S t U
Mathematics 10 01085 i037
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 Ct and a functor St : Ct Set . A St -sketch K = ( K , S t K ) is closed w.r.t. a St - sketch arrow φ : P C relative to a strict St - sketch arrow ι : P K if, and only if, there exists a strict St -sketch arrow ϱ : C K such that ι = φ ; ϱ .
Mathematics 10 01085 i038
A St -sketch K isclosed w.r.t. a St - sketch arrow φ : P C if, and only if, it is closed w.r.t. φ : P C relative to each strict St -sketch arrow ι : P K .
We consider the case Ct = Cxt , St = Stm with IS = ( Cxt , Stm , Int , ) an Institution of Statements. From Definition 22, Definition 23 and Equation (16), we obtain immediately:
Proposition 3
(Validity ≅ Closedness). For any Stm -sketch arrow φ : P C , the following two statements are equivalent for any Ξ-structure U :
  • The corresponding IS -implication P φ C is valid in U , i.e., U P φ C .
  • The Stm -sketch S U = ( U , S t U ) , defined by (13), is closed w.r.t. φ : P C .
Mathematics 10 01085 i039
In case of arrows between atomic sketches, we can obviously replace S U by S Φ U .
Corollary 2
(Validity ≅ Closedness). For any Stm -sketch arrow φ : P C with P and C atomic, the following two statements are equivalent for any Ξ-structure U :
  • The corresponding IS -implication P φ C is valid in U , i.e., U P φ C .
  • The atomic Stm -sketch S Φ U = ( U , S t U ) , defined by Equation (13), is closed w.r.t. φ : P C .
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 P i d P C , i.e., we have, especially, P = C . 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 φ : P C φ , 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 U and any closed expression 0 ( X : E x ( φ , Y : E x ) ) , the following two statements are equivalent:
  • U ( 0 , ( X : E x ( φ , Y : E x ) ) , i d 0 )
  • U ( X , { ( X , E x , i d X ) } ) φ ( Y , { ( Y , E x , i d Y ) } )
In the case that E x and E x are conjunctions, we can be even more specific.
Corollary 3
(Sketch Implications ≅ Closed Formulas). For any Ξ-structure U and any closed expression 0 ( X : E x ( φ , Y : E x ) ) with E x = E x 1 E x n 1 n and E x = E x 1 E x m 1 m , the following two statements are equivalent:
  • U ( 0 , ( X : E x ( φ , Y : E x ) ) , i d 0 )
  • U ( X , { ( X , E x 1 , i d X ) , , ( X , E x n , i d X ) } ) φ ( Y , { ( Y , E x 1 , i d Y ) , , ( X , E x m , i d X ) } )
Finally, we can specialize the equivalence to conjunctions of atomic statements.
Corollary 4
(Sketch Implications ≅ Closed Formulas: Atomic-case). For any Ξ-structure U and any closed expression 0 ( X : E x ( φ , Y : E x ) ) with E x a finite conjunction of atomic expressions X F i ( β i ) , β i : α F i X , 1 i n and E x a finite conjunction of atomic expressions Y F i ( β i ) , β i : α F i Y , 1 i m , the following two statements are equivalent:
  • U ( 0 , ( X : E x ( φ , Y : E x ) ) , i d 0 )
  • U ( X , { ( α F i , F i ( i d α F i ) , β i ) 1 i n } ) φ ( Y , { ( α F i , F i ( i d α F i ) , β i ) 1 i m } )
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 U S Φ U establish an isomorphism between Str ( Ξ ) and the subcategory atSk ( Stm ) s a of Sk ( Stm ) a given by all atomic Stm -sketches and all strict Stm -sketch arrows between them.
A sufficient condition to complete the abstraction from structures to atomic sketches is the existence of a set S E M of atomic (!) IS -implications such that Sem ( Ξ ) = Str ( Ξ , S E M ) (see Remark 27). The “purely structural characterization of exactly all those atomic Stm -sketches S Φ U in atSk ( Stm ) s a with U in Sem ( Ξ ) ”, 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 Stm -sketch w.r.t. all the Stm -sketch arrows underlying the atomic IS -implications in S E M .
If we are only interested in those subcategories Sem ( Ξ , I M P ) = Str ( Ξ , S E M I M P ) of Sem ( Ξ ) which can be axiomatized by a set I M P of atomic (!) IS -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 atSk ( Stm ) s a of atomic Stm -sketches and strict Stm -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 φ : P C φ (see Remark 24).
In the terminology of Institutions of Statements, Makkai’s approach can be characterized by the choices Base = Var = Cxt and Stm ( K ) = At ( K ) for all objects K in Cxt . In particular, he focuses on presheaf topoi, i.e., functor categories Base = [ C Set ] , 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 Base = [ C Set ] and a certain footprint Ξ = ( Φ , α ) on Base into plain contexts, i.e., into objects in another presheaf topos Base = Cxt = [ Φ α C Set ] with Φ α C a category constructed out of C 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 U , 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 S Φ U (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 I M P of IS -implications entails an IS - implication P φ C semantically, I M P P φ C in symbols, if, and only if, for all Ξ-structures U in Sem ( Ξ ) , it holds that U I M P , i.e., U K φ G for all K φ G in I M P , implies U P φ C .
Any Stm -sketch arrow φ : P C can be factorized, i.e., can be obtained by composing the Stm -sketch arrows φ : P C φ and i d C : C φ C , where C φ : = ( C , Stm ( φ ) ( S t P ) ) .
Due to Definition 22, for any interpretation ( ι , U ) of context P in a Ξ -structure U the statement ( ι , U ) P φ C φ means nothing but simply the existence of a morphism ϱ : C U in Base such that φ ; ϱ = ι . That is, we have, especially, I M P P φ C φ if, and only if, P φ C φ if, and only if, P φ C φ . Moreover, this allows for reformulating the validity of sketch implications.
Lemma 1
(Factorization of Sketch Implications). For any set I M P of IS -implications and any IS -implication P φ C , the following two statements are equivalent:
  • I M P P φ C
  • P φ C φ and I M P C φ C
Lemma 1 means, in practice, that we can restrict ourselves to IS - implications of the form K G to specify (axiomatize) subcategories Sem ( Ξ , I M P ) of Sem ( Ξ ) . 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 I M P of IS -implications of the form K G and any IS -implication P C , the following two statements are equivalent:
  • I M P P C
  • For all Ξ-structures U in Sem ( Ξ ) and all interpretations ( ι , U ) of context P = C in U : U I M P and ( ι , U ) P S t P implies ( ι , U ) P S t C .
Theorem 2 guarantees that it is a reasonable idea to describe the deduction of sketch implications, which are semantically entailed by a given set I M P of sketch implications, by means of deduction calculi generating new sketches ( P , S t C ) from a given sketch ( P , S t P ) based on a utilization of the sketch implications in I M P as deduction rules. To deduce all (!) semantically entailed sketch implications, it may be necessary to also include deduction rules related to a set S E M of sketch implications representing the choice of Base , Ξ and Sem ( Ξ ) , 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: I M P ( P , S t 1 ) ( P , S t 1 ) and I M P ( P , S t 2 ) ( P , S t 2 ) implies I M P ( P , S t 1 S t 2 ) ( P , S t 1 S t 2 )
  • Instantiation: For any context morphism μ : P R : I M P ( P , S t ) ( P , S t ) implies I M P ( R , Stm ( μ ) ( S t ) ) ( R , Stm ( μ ) ( S t ) ) .
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 IE = ( Cxt E Q , Eq , Int , ) an Eq -sketch E = ( X , E ) is given by a context X in Cxt E Q , i.e., an S-set X, and a set E of Σ -equations in X. A valid interpretation of E = ( X , E ) is an interpretation ( ι , A ) of context X in a Σ -algebra A = ( A , Ω A ) such that ( ι , A ) X E , i.e., ( ι , A ) X ( X , t 1 = t 2 ) for all Σ -equations ( X , t 1 = t 2 ) in E according to (9).
Based on these definitions, we can define IE -morphisms, Eq -sketch arrows and IE -implications, respectively, exactly in the same way as we have done it for Institutions of Statements IS = ( Cxt , Stm , Int , ) 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 IE -implications ( Y , P r e m ) ( Y , C o n c ) , in the sense of Definition 21 where P r e m represents the set of equations in the premise of a conditional Σ -equation and C o n c the single equation in the conclusion. In particular, the validity of conditional Σ -equations in Σ -algebras A 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 IE -implications ( Y , P r e m ) ( Y , C o n c ) with Y, P r e m finite and C o n c 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 Σ = ( Ω , i n , o u t ) and we have Str ( Σ ) = Sem ( Σ ) : = Alg ( Σ ) . Conditional Σ -equations are the traditional means to specify subcategories of Alg ( Σ ) . Given a set C E of Conditional Σ -equations, we denote by Alg ( Σ , C E ) the subcategory of Alg ( Σ ) given by all those Σ -algebras A such that A C E , i.e., A P C (as defined in Definition 22) for all conditional Σ -equations P C in C E (compare Remark 27).
In case P = ( Y , ) , we may call P C a conditional Σ -equation with an empty premise. Note that there is a simply but crucial conceptual difference between a Σ -equation ( Y , t 1 = t 2 ) and the corresponding conditional Σ -equation ( Y , ) ( Y , { ( Y , t 1 = t 2 ) } ) with an empty premise. ( Y , t 1 = t 2 ) is just a simple statement in context Y while ( Y , ) ( Y , { ( Y , t 1 = t 2 ) } ) 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 Alg ( Σ )

A Σ -algebra F = ( F , Ω F ) is freely generated by an Eq -sketch G = ( X , R ) if, and only if, there is a valid interpretation ( η G , F ) of G in F that is universal relative to Alg ( Σ ) . That is, for all Σ -algebras A = ( A , Ω A ) and all valid interpretations ( ι , A ) of G in A there exists a unique morphism ι : F A such that η G ; ι = ι in Base E Q , i.e., such that ι establishes an interpretation morphism ι : ( η G , F ) ( ι , A ) in Int ( G ) Int ( X ) (see Section 4.1).
Mathematics 10 01085 i040
The universal property of ( η G , F ) entails that ( η G , F ) is initial in Int ( G ), thus the projection functor Π G : Int ( G ) Alg ( Σ ) establishes a functor from Int ( G ) into the co-slice category F / Alg ( Σ ) .
In contrast to Institutions of Statements, we have for arbitrary (!) Eq -sketches G = ( X , R ) (and not only for atomic Eq -sketches) that the definition of homomorphisms between Σ -algebras ensures ( η G ; ϱ , A ) X R for any homomorphism ϱ : F A in Alg ( Σ ) thus the assignments ( ϱ : F A ) ( η G ; ϱ , A ) establish a functor from F / Alg ( Σ ) into Int ( G ) . Due to the universal property of ( η G , F ) , we obtain ( η G ; ϱ ) = ϱ . Together with the equation η G ; ι = ι , this ensures that the two functors establish an isomorphism between Int ( G ) and F / Alg ( Σ ) (compare Proposition 4.10 in [2]). This justifies that we can call the pair ( G , η G ) = ( ( X , R ) , η G ) a sketch representation of F .
For arbitrary Eq -sketches G = ( X , R ) , a Σ -algebra F , freely generated by G , exists and is uniquely determined “up to isomorphism”. In the introductory Section 1.1.1, we used the notation F ( Σ , , X , R ) to denote those freely generated Σ -algebras.
The Σ -algebra, freely generated by ( X , ) is nothing but the Σ -term algebra T Σ ( X ) = F ( Σ , , X , ) on X and the unique morphism ι : T Σ ( X ) A is simply the evaluation of terms ( see Equation (8)). In general, F ( Σ , , X , R ) can be constructed as a quotient of T Σ ( X ) .

Second, We Consider Σ -Algebras Freely Generated Relative to a Subcategory Alg ( Σ , C E )

Let C E be a set of conditional Σ -equations. A Σ -algebra F = ( F , Ω F ) is freely generated in Alg ( Σ , C E ) by an Eq -sketch G = ( X , R ) if, and only if, F C E , and there is a valid interpretation ( η G , F ) of G in F that is universal relative to Alg ( Σ , C E ) . That is, for all Σ -algebras A = ( A , Ω A ) in Alg ( Σ , C E ) and all valid interpretations ( ι , A ) of G in A there exists a unique morphism ι : F A such that η G ; ι = ι in Base E Q , i.e., such that ι establishes an interpretation morphism ι : ( η G , F ) ( ι , A ) in Int ( G ) Int ( X ) .
Mathematics 10 01085 i041
In this case, the universal property of ( η G , F ) entails that ( η G , F ) is initial in the subcategory Int ( G ) Alg ( Σ , C E ) = Π G 1 ( Alg ( Σ , C E ) ) of Int ( G ) given by all valid interpretations of G in Σ -algebras in Alg ( Σ , C E ) . Moreover, we obtain an isomorphism between Int ( G ) Alg ( Σ , C E ) and the co-slice category F / Alg ( Σ , C E ) .
For arbitrary sets C E of conditional Σ -equations and arbitrary Eq -sketches G = ( X , R ) , a Σ -algebra F , freely generated by G in Alg ( Σ , C E ) , exists and is uniquely determined “up to isomorphism”. In the introductory Section 1.1.1, we used the notation F ( Σ , C E , X , R ) to denote those freely generated Σ -algebras. F ( Σ , C E , X , R ) can be constructed as a quotient of T Σ ( X ) .
In case of groups, C E is a set of conditional Σ -equations with an empty premise, representing the group axioms, and F ( Σ , C E , X , R ) 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 Cxt E Q = Carr E Q = Base E Q = Set S . An atomic Σ -equation in a context K is a Σ -equation of the form:
( K , ω k 1 , , k n = k ) with ω Ω , k i K s i , 1 i n and k K o u t ( ω )
where [ x 1 : s 1 , x 2 : s 2 , , x n : s n ] is the assumed representation of i n ( ω ) 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 At ( K ) , we denote the subset of Eq ( K ) of all atomic Σ -equation in a context K. The assignments K At ( K ) extend to a functor At : Cxt E Q Set .
In full analogy to Institutions of Statements, there are two canonical ways to transform a Σ -algebra A = ( A , Ω A ) into an Eq -sketch. The atomic variant E Ω A = ( A , E q Ω A ) encodes only the semantics of the operations in Ω A :
E q Ω A : = { ( A , ω a 1 , , a n = ω A ( a 1 , , a n ) ) ω Ω , a i A s i , 1 i n }
The full variant E A = ( A , E q A ) encodes the semantics of all terms (derived operations):
E q A : = { ( A , t 1 = t 2 ) t 1 , t 2 T Σ ( A ) s , s S , t 1 A ( i d A ) = t 2 A ( i d A ) } Eq ( A ) .
We have obviously E q Ω A E q A and ( i d A , A ) is a valid interpretation of E Ω A as well as of E A . Any Σ -algebra A = ( A , Ω A ) is freely generated by the Eq -sketch E Ω A = ( A , E q Ω A ) as well as by the Eq -sketch E A = ( A , E q A ) with the universal interpretation ( i d A , A ) . That is, ( E Ω A , i d A ) as ( E A , i d A ) are sketch representations of A 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 A E A define an embedding of Alg ( Σ ) into the category Sk ( Eq ) a of all Eq -sketches and all Eq -sketch arrows transforming each homomorphism between Σ -algebras into a strict Eq -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 Cxt E Q by Kleisli morphisms.
Definition 25
(Generalized Context Morphisms). We consider an Institution of Equations IE = ( Cxt E Q , Eq , Int , ) and a signature Σ = ( Ω , i n , o u t ) . A Σ - context morphism φ : K G is given by an S-map φ : K T Σ ( G ) . The composition φ ; ψ : K H of two Σ-context morphisms φ : K G , ψ : G H is given by the S-map φ ; ψ * : K T Σ ( H ) where ψ * : T Σ ( G ) T Σ ( H ) is the usual translation of Σ-terms induced by the substitution ψ : G T Σ ( H ) . Cxt E Q Σ denotes the category of all contexts and all Σ-context morphisms.
By construction, Cxt E Q is a subcategory of Cxt E Q Σ for any signature Σ . Second, the sentence functor Eq : Cxt E Q Set extends to a functor Eq Σ : Cxt E Q Σ Set with:
Eq Σ ( φ ) ( K , t 1 = t 2 ) : = ( G , φ * ( t 1 ) = φ * ( t 2 ) )
for all Σ -context morphisms φ : K G , i.e., for all S-maps φ : K T Σ ( G ) , and all Σ -equations ( K , t 1 = t 2 ) in K. Since i d K * = i d T Σ ( K ) and ( φ ; ψ * ) * = φ * ; ψ * for all S-maps φ : K T Σ ( G ) , ψ : G T Σ ( H ) , this defines indeed a functor.
Remark 31
(Generalized Sketch Implications). We will use, implicitly, strict Eq Σ -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 Eq Σ -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 Eq -sketch E = ( X , E ) is closed w.r.t. the underlying Eq -sketch arrow ( Y , P r e m ) ( Y , C o n c ) of a conditional Σ-equation ( Y , P r e m ) ( Y , C o n c ) if, and only if, for all Σ-context morphisms ι : Y X , i.e., all substitutions ι : Y T Σ ( X ) , it holds that ι * ( P r e m ) E implies ι * ( C o n c ) E .
In addition, here is the respective specialized instance of Proposition 3.
Corollary 5
(Validity ≅ Closedness for Conditional Equations). For any Eq -sketch arrow ( Y , P r e m ) ( Y , C o n c ) , the following two statements are equivalent for any Σ-algebra A :
  • The corresponding conditional Σ-equation ( Y , P r e m ) ( Y , C o n c ) is valid in A , i.e., A ( Y , P r e m ) ( Y , C o n c ) .
  • The Eq -sketch E A = ( A , E q A ) , defined by Equation (19), is closed w.r.t. the Eq -sketch arrow ( Y , P r e m ) ( Y , C o n c ) 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 Eq -sketch arrows as deduction rules.
To apply an Eq -sketch arrow ( Y , P r e m ) ( Y , C o n c ) as a deduction rule, we have, first, to find amatchof the left-hand side ( Y , P r e m ) of the rule in an Eq -sketch E = ( X , E ) , i.e., a substitution ι : Y T Σ ( X ) such that ι * ( P r e m ) E . Second, we apply the rule for this match and generate the Eq -sketch ( X , E ι * ( C o n c ) ) . The resulting commutative square becomes a pushout in the category of all strict Eq Σ -sketch arrows if E ι * ( C o n c P r e m ) = .
Mathematics 10 01085 i042
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 P C 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 Ct of contexts and a functor St : Ct Set assigning to each K Ct O b j a set St ( K ) of all statements in context K. An St -sketch K = ( K , S t K ) is given by a context K in Ct and a set S t K St ( K ) of statements in context K. For any statement s t St ( K ) , we will denote the image St ( φ ) ( s t ) St ( G ) also simply by φ ( s t ) .
Guided by Definition 23 (Closedness) and Proposition 3 (Validity ≅ Closedness), we focus on the category Sk s a of all strict St -sketch arrows according to Definition 20 (Sketch Arrow). Generalizing the constructions and results in [19], one can prove that Sk s a has pushouts and pullbacks as long as Ct does.
Proposition 5
(Pushouts). Let B μ C ϱ A be a span of strict St -sketch morphisms. If there exists a pushout B ϱ * D μ * A of the span B μ C ϱ A of morphisms in Ct , then the diagram, below on the left, is a pushout in Sk s a , where:
D : = ( D , μ * ( S t A ) ϱ * ( S t B ) )
Mathematics 10 01085 i043
Proposition 6
(Pullbacks). Let B μ C ϱ A be a cospan of strict St -sketch morphisms. If there exists a pullback B ϱ * D μ * A of the cospan B μ C ϱ A of morphisms in Ct , then the diagram, above on the right, is a pullback in Sk s a where:
D : = ( D , { s t St ( D ) μ * ( s t ) S t A , ϱ * ( s t ) S t B } )
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 Sk s a will be, in general, not adhesive, even if Ct is adhesive, since S t D in Proposition 5 is not constructed by a pushout in Set and in Proposition 6 not by a pullback in Set either.
To repair this deficiency, we can work with “multi sketches” where statements do have their own identity. Amulti St - sketch K = ( K , I K , s t K ) is given by a context K, a set I K of identifiers and a map s t K : I K St ( K ) . Astrict arrow ( φ , f ) : K G between two multi St -sketches K and G is given by a morphism φ : K G in Ct and a map f : I K I G such that φ ( s t K ( i ) ) = s t G ( f ( i ) ) for all i I K . Pushouts in the category mSk s a of multi St -sketches and strict arrows can always be constructed by componentwise pushouts of contexts in Ct and of sets of identifiers in Set , respectively. To ensure that componentwise pullbacks in Ct and Set , respectively, give us a pullback in mSk s a , we have to assume, however, that the functor St : Ct Set preserves pullbacks.
This is the case for the sentence functor Stm : Cxt Set in any Institution of Statements as well as the sentence functor Eq : Cxt E Q Set in any Institution of Equations.
If St preserves pullbacks, the monomorphisms in mSk s a are exactly the componentwise monomorphisms and mSk s a becomes adhesive if Ct is adhesive. Note that any topos is adhesive [44], thus especially the categories Cxt E Q = Set S 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 Ξ C T in Example 14 the feature symbols mon with arity x v 1 [ r ] x e x v 2 and fnl with arity x v . Correspondingly, we vary the sample Stm C T -sketch G = ( G , S t G ) in Example 39 by dropping the statement ( x v , f n l , ( x v 3 ) ) and replacing the statements ( x v 1 x e x v 2 , m o n , ( x e b ) ) , ( x v 1 x e x v 2 , m o n , ( x e g ) ) by corresponding atomic statements mon ( b ) and mon ( g ) , respectively.
Mathematics 10 01085 i044
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], Cxt is a category of directed, labeled multi graphs and Ref. [24] restricts Cxt 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 Cxt a category Graph T G of directed, labeled multi graphs typed over a graph T G .
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 T G , 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: Cxt is the subcategory of Set given by all subsets of a “countable universe of nodes Node ” and Var Cxt has a two-element set { x 1 , x 2 } Node as its only object. The footprint Ξ R is given by a “countable universe Rel ” of predicate symbols with α ( P ) = { x 1 , x 2 } for all P Rel . An atomic Ξ R -statement P ( β ) in context K Node is, in such a way, given by a P Rel and a binding β : { x 1 , x 2 } K (see Remark 14 (Atomic Statements)). Relying on the isomorphism between the Cartesian product K × K and the set K { x 1 , x 2 } of maps, it is easy to check that the category Graph in [22] is isomorphic to the non-adhesive (!) category of all Ξ R -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 T 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 Ct and a functor St : Ct Set , we define inductively and in parallel a family ST ( K ) of sets of first-order St - sketch conditions in context K, c ST ( K ) or K c in symbols, where K varies over all objects in Ct :
  • Statements: St ( K ) ST ( K ) for any context K.
  • True: K T for any context K.
  • False: K F for any context K.
  • Conjunction: K C for any set C ST ( K ) of conditions in K.
  • Disjunction: K C for any set C ST ( K ) of conditions in K.
  • Implication: K ( c 1 c 2 ) for any conditions K c 1 and K c 2 .
  • Negation: K ¬ c for any condition K c .
  • Quantification: K ( φ , M : c ) and K ( φ , M : c ) for any condition M c and any morphism φ : K M in Ct that is not an isomorphism.
Remark 35
(Sketch conditions: Syntax). Non-monic morphisms φ : K M 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 0 is an initial object in Ct , we call 0 c aclosed St - 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: K ( c 1 Q ( φ , M : c 2 ) ) for Q { , } , any quantifier free condition K c 1 , any condition M c 2 and any morphism φ : K M in Ct .
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 ( φ , M : c ) is used and ( φ , M : c ) is encoded by ¬ ( φ , M : ¬ c ) . 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:
{ ( φ i , M i : c i ) i I } , { ( φ i , M i : c i ) i I } ST ( K )
for any family { φ i : K M i i I } of context morphisms and any conditions c i ST ( M i ) , i I . T is encoded in [24] by the empty conjunction and F 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 ( τ : K G , G ) of contexts K in St -sketches G = ( G , S t G ) and define valid interpretations of St -sketch conditions in K.
Definition 28
(Sketch conditions: Satisfaction). We define inductively and in parallel a family K of satisfaction relations between interpretations ( τ , G ) of contexts K in St -sketches G = ( G , S t G ) and St -sketch conditions c ST ( K ) on K:
  • Statement: For all s t St ( K ) ST ( K ) : ( τ , G ) K s t iff St ( τ ) ( s t ) S t G .
  • True: ( τ , G ) K T
  • False: ( τ , G ) ¬ K F
  • Conjunction: ( τ , G ) K C iff ( τ , G ) K c for every c C .
  • Disjunction: ( τ , G ) K C iff ( τ , G ) K c for some c C .
  • Implication: ( τ , G ) K ( c 1 c 2 ) iff ( τ , G ) K c 1 implies ( τ , G ) K c 2
  • Negation: ( τ , G ) K ¬ c iff ( τ , G ) ¬ K c .
  • Existential quantification: ( τ , G ) K ( φ , M : c ) iff there exists a ϱ : Y G with φ ; ϱ = τ and ( ϱ , G ) M c
    Mathematics 10 01085 i045
    Universal quantification: ( τ , G ) K ( φ , M : c ) iff for all ϱ : Y G with φ ; ϱ = τ we have ( ϱ , G ) M c
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 ( τ , G ) K c can be interpreted as well as an assertion concerning the structure of G .
Definition 29
(Sketch constraints). An St - sketch K- constraint ( c , τ ) on context G is given by a context K, a sketch condition K c in context K and a context morphism τ : K G .
An St -sketch G = ( G , S t G ) satisfiesthe K-constraint ( c , τ ) , G K ( c , τ ) in symbols, if, and only if, ( τ , G ) K c .
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 U = ( U , Φ U ) , context K, morphism ι : K U and statement ( X , E x , γ ) in K we can define:
U K ( ( X , E x , γ ) , ι ) i f f ( ι , U ) K ( X , E x , γ )
and may call the pair ( ( X , E x , γ ) , ι ) a statement attached to U or a statement about U .
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), G K ( c , τ ) is just an assertion about the structure of the context G. In all other cases, G K ( c , τ ) tells us also something about the presence or non-presence of statements as well as the relations between the statements in G .
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 φ : K G constitutes a strict St -sketch arrow φ : K G between two St -sketches K = ( K , S t K ) and G = ( G , S t G ) if, and only if, G K ( S t K , φ ) .
Remark 38
(General constraints). A K-constraint ( c , τ ) is, in general, only a local constraint, in the sense that it constrains the structure of G “around the image” of K w.r.t. τ. Thus, in case K = G and τ = i d G , ( c , i d G ) is an assertion about the structure of G as such.
If Ct has an initial object 0 , any closed condition 0 c gives rise to a sketch constraint ( c , ! G ) with ! G : 0 G the initial morphism into G. ( c , ! G ) is a general constraint, in the sense that the statement G 0 ( c , ! G ) can be seen as a characterization of the overall structure of G . 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 IS = ( Cxt , Stm , Int , ) with Carr Cxt , XE ( Ξ ) = FE ( Ξ ) and thus At ( K ) Stm ( K ) for all contexts K in Cxt , i.e., Stm ( K ) contains all atomic statements in K.
We consider the instances of Definition 27 and Definition 28, respectively, for the category Cxt of contexts and the functor At : Cxt Set assigning to each context K the set At ( K ) 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 At -sketch conditions on K. This is indeed possible! However, to be able to translate quantifications, we have to assume that Cxt has pushouts (compare Appendix A).
Definition 30
(From Statements to Sketch conditions). We assume that Cxt has pushouts. For an arbitrary but fixed choice of pushouts in Cxt we construct inductively and in parallel a family of maps t r K : Stm ( K ) AT ( K ) , where K varies over all objects in Ct : For arbitry variable declarations X and arbitrary binding morphism γ : X K , we define
  • Atomic expr.: t r K ( X , F ( β ) , γ ) : = F ( β ; γ ) = ( α F , F ( i d α F ) , β ; γ ) At ( K ) AT ( K )
  • Everything: t r K ( X , , γ ) : = T AT ( K )
  • Void: t r K ( X , , γ ) : = F AT ( K )
  • Conjunction: t r K ( X , ( E x 1 E x 2 ) , γ ) : = { t r K ( X , E x 1 , γ ) , t r K ( X , E x 2 , γ ) } AT ( K )
  • Disjunction: t r K ( X , ( E x 1 E x 2 ) , γ ) : = { t r K ( X , E x 1 , γ ) , t r K ( X , E x 2 , γ ) } AT ( K )
  • Implication: t r K ( X , ( E x 1 E x 2 ) , γ ) : = ( t r K ( X , E x 1 , γ ) t r K ( X , E x 2 , γ ) ) AT ( K )
  • Negation: t r K ( X , ¬ E x , γ ) : = ¬ t r K ( X , E x , γ ) AT ( K )
  • Quantification: t r K ( X , Q ( φ , Y : E x ) , γ ) : = Q ( φ * , K γ φ : t r K γ φ ( E x ) ) AT ( K )
    for Q { , } where K φ * K γ φ γ * Y is the chosen pushout of K γ X φ Y .
Remark 39
(Translation of Feature Expressions). Every feature expression X E x reappears as the statement ( X , E x , i d X ) , thus we can consider X t r X ( X , E x , i d X ) as the translation of the feature expression X E x into a At -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 t r K : Stm ( K ) AT ( K ) establishes an equivalence between first-order statements and first-order At -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 U = ( U , Φ U ) , context K, morphism ι : K U and statement ( X , E x , γ ) in K we have:
( ι , U ) K ( X , E x , γ ) i f f S Φ U K ( t r K ( X , E x , γ ) , ι ) ,
where S Φ U = ( U , S t Φ U ) is the atomic sketch encoding of structure U 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 U = ( U , Φ U ) and any statement ( X , E x , γ ) in U we have:
( i d U , U ) U ( X , E x , γ ) i f f S Φ U K ( t r K ( X , E x , γ ) , i d U ) ,
where S Φ U = ( U , S t Φ U ) is the atomic sketch encoding of structure U as defined by (12).
The case X = 0 , and thus γ = ! U , 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 U , by inspecting the atomic sketch encoding S Φ U .
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 Ξ C T -expressions in Example 29 into corresponding sketch conditions. Concerning the visual representation, there is no essential difference between a Ξ C T -expression and the corresponding sketch condition: We replace ▹ by ▸ and by T . We rewrite ( _ _ ) to { _ , _ } and so on.
The Ξ C T -expressions l e c in Example 29 is transformed into the sketch condition
Mathematics 10 01085 i046
and the Ξ C T -expressions g e c , representing the property composition is always defined, is transformed into the sketch condition:
Mathematics 10 01085 i047
For the sample sketch G = ( G , S t G ) in Example 49, we do have G ( l e c ¯ , τ 1 ) , with τ 1 given by the assignments x e 1 a , x e 2 b , but G ¬ ( l e c ¯ , τ 2 ) , with τ 2 given by x e 1 b , x e 2 c , thus G ¬ ( g e c ¯ , ! G ) . General constraints imposing uniqueness of composition, independent of the existence of composition, can be formulated by the closed condition g u c ¯ :
Mathematics 10 01085 i048
φ simply maps x e 3 and x e 4 to x e . G does not satisfy the constraint ( g u c ¯ , ! G ) 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 Ξ C T –or to put it the other way around: We can formulate requirements that any intended semantics of the feature symbols in Ξ C T has to comply with. For example, we can require that, for a final object, all outgoing morphisms are monic:
c t 1 : = 0 ( x v : ( x v fnl ( x v x e x v 1 : x v [ r ] mon e x v 1 ) ) )
We can require that monomorphisms are closed under composition:
Mathematics 10 01085 i049
Note that we use { } because the single triangle between the curly brackets visualizes, actually, three atomic Ξ C T -statements! We can also express our knowledge concerning the decomposition of monomorphisms:
Mathematics 10 01085 i050
G ( c t 2 , ! G ) simply because there is no match in G of the triangular context in c t 2 satisfying the premise of the implication in c t 2 . In contrast, G ¬ ( c t 3 , ! G ) with the only counterexample given by the assignments x e 1 c , x e 2 d , x e 3 g .
To be prepared for discussions, later in this section, we consider also the sketch condition m o n ¯ defining the concept monomorphism and obtained by transforming the Ξ C T -expressions m o n in Example 29:
Mathematics 10 01085 i051
where φ maps x e 1 and x e 2 to x e 4 .

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 φ : L R 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 G satisfies the “universal constraint” φ : L R if, and only if, for any strict sketch arrow τ : L G there is a strict sketch arrow ϱ : R G 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 φ : L R in a sketch G can be equivalently expressed by the assertion that G satisfies the general constraint ( u c , ! G ) with (compare Corollary 3):
g c : = 0 ( L : ( S t L ( φ , R : S t R ) ) ) .
Be aware that the identifier φ in g c does not refer to the sketch arrow φ : L R but to the underlying context morphism φ : L R . Note further that we can replace S t R by ( S t R φ ( S t L ) ) without losing the equivalence!
Furthermore, we say that a sketch G satisfies the "negative universal constraint" φ : L R if, and only if, for any strict sketch arrow τ : L G , there does not exist a strict sketch arrow ϱ : R G such that φ ; ϱ = τ . This requirement is equivalent to the statement that G satisfies the general constraint ( n g c , ! G ) with:
n g c : = 0 ( L : ( S t L ¬ ( φ , R : S t R ) ) )
What can we do if a sketch G does not satisfy a general constraint ( c , ! G ) for a simple condition of the form c = 0 ( L : ( S t 1 ( φ , R : S t 2 ) ) ) where S t 1 is a set of statements in L and S t 2 a set of statements in R, respectively?
We can repair this flaw by applying the sketch arrow φ : ( L , S t 1 ) ( R , S t 2 φ ( S t 1 ) ) as a transformation rule for all sketch morphisms τ : ( L , S t 1 ) G not satisfying the conclusion in condition c. In other words, a match of the transformation rule is given by a context morphism τ : L G such that G ( S t 1 , τ ) and G ( ¬ ( φ , R : S t 2 ) , τ ) . Note that the negative application condition G ( ¬ ( φ , R : S t 2 ) , τ ) ensures that we do not apply the rule twice for the same match τ : ( L , S t 1 ) G . Applying the rule φ via the match τ means nothing but to construct a pushout in the category Sk s a of sketches and strict sketch arrows (compare Remark 32).
Mathematics 10 01085 i052
Depending on the properties of the context morphism φ : L R the pushout construction may have different effects. The context G can be extended and/or factorized and, if S t 2 , we will add new statements to the statements originating from G .
In terms of sketch constraints, we can describe the crucial effect of the rule application as follows: H satisfies the constraint ( S t 2 , τ * ) in addition to the constraint ( S t 1 , τ ; φ * ) inherited from G .
Example 52
(Repairing Stm C T -sketches). As discussed in Example 51, there is one violation of the general constraints ( g u c ¯ , ! G ) uniqueness of composition by the Stm C T -sketch G = ( G , S t G ) in Example 49 and one violation of ( c t 3 , ! G ) decomposition of monomorphisms. Repairing these two violations by pushout constructions, as described above, will result in a Stm C T -sketch H like the one visualized below.
Mathematics 10 01085 i053
G also does not satisfy the general constraint ( g e c ¯ , ! G ) 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 Stm C T -sketch satisfies these two general constraints since we do not intend to use Stm C T -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 G together with a set C G of sketch constraints on G. If C G contains a general constraint ( c , ! G ) with c = 0 ( L : ( S t 1 ( φ , R : S t 2 ) ) ) , we can deduce a local sketch constraint ( ( S t 1 ( φ , R : S t 2 ) ) , τ ) on G for any context morphism τ : L G . 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 X c 1 , X ( c 1 c 2 ) and all context morphisms μ : X Y , the sketch constraints ( c 1 , μ ) and ( ( c 1 c 2 ) , μ ) imply the sketch constraint ( c 2 , μ ) .
If there is a constraint ( S t 1 , τ ) C G , we can apply this modus ponens rule and deduce the sketch constraint ( ( φ , R : S t 2 ) , τ ) on G. Keep in mind that L ( φ , R : S t 2 ) ! The pushout construction generates, finally, the constraint ( S t 2 , τ * : R H ) 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 Ξ C T -statements, as introduced and discussed in the Examples 39 and 49: We included now the feature symbols mon and fnl in our sample footprint Ξ C T 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 Stm C T -sketch G = ( G , S t G ) , the sketch condition m o n ¯ , defining the concept monomorphism, may help us to deduce from the cmp -statements, present in S t G that two parallel edges in G have to be identified. We need just a rule which generates for each atomic Ξ C T -statement ( α ( mon ) , mon ( i d α ( mon ) ) , β : α ( mon ) G ) in S t G a corresponding sketch constraint ( m o n ¯ , β ) on G . This works so easy, since we designed our examples in such a way that the context of m o n ¯ is just α ( mon ) . In general, any atomic Ξ -statement ( α ( mon ) , mon ( i d α ( mon ) ) , β ) ( α ( P ) , P ( i d α ( P ) ) , β : α ( P ) G ) and any condition K c may generate a sketch constraint ( c , γ ; β ) for any context morphism γ : K α ( P ) . Since β binds all “free variables” in m o n ¯ , 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 Ξ C T as small as possible, we have not included in Ξ C T feature symbols for other limits and colimits like equ , pb , po , prod , 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 Ξ C T -expressions e x i s t s I and u n i q u e I .
Analogous to “anonymous functions” in programming, we can use the sketch condition C I { t r C I ( e x i s t s I ) , t r C I ( u n i q u e I ) } 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 G , but constraints, like ( { t r C I ( e x i s t s I ) , t r C I ( u n i q u e I ) } , β : C I G ) on the sketch G .
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 G = ( G , S t G ) and a set C G of sketch constraints on G as an appropriate formalization of software models. We call those pairs ( ( G , S t G ) , C G )  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 Cxt and a footprint Ξ where the corresponding diagrams/models can be described as Stm -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 Cxt and a certain footprint Ξ but also by an additional set of Stm -sketch conditions.
We should, however, distinguish between two kinds of Stm -sketch conditions: The first kind of conditions is used to formulate those constraints on Stm -sketches G that can be legally used as elements in C G . For a constrained Stm -sketch ( G , C G ) , the occurrence of a constraint ( c , τ ) in C G will certify that G ( c , τ ) . 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 C G 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 S t G and C G , respectively, and to repair violations of the constraints in C G .

Conceptual Hierarchy

Introducing constrained sketches teleports us “back to start” but on a higher conceptual level: We do have a category Sk s a of sketches. To any sketch G = ( G , S t G ) , we can assign the set Cstr ( G ) of all sketch constraints ( c , τ : K G ) on context G with c a first-order sketch condition in SC ( K ) according to Definition 27. Analogously to the translation of statements in Institutions of Statements, we can define for any sketch morphism φ : G H a map Cstr ( φ ) : Cstr ( G ) Cstr ( H ) by simple post-composition with the underlying context morphism φ : G H : Cstr ( φ ) ( c , τ ) : = ( c , τ ; φ ) for all ( c , τ ) Cstr ( G ) . This gives us trivially a functor Cstr : Sk s a Set at hand.
This situation is, however, just an instance of the abstract pattern we started with in this section: The category Sk s a can be taken as an instance of Ct and the functor Cstr : Sk s a Set as an instance of St : Ct Set , 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
(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 Base = Var = Cxt = [ C Set ] . Note that topoi are adhesive [44]! As an example, we consider the presheaf topos:
Mathematics 10 01085 i054
Then, he describes an instance of a general construction in Category Theory: For any footprint Ξ = ( Φ , α ) , α : Φ [ C Set ] O b j , there is a category Φ α C such that the category mSk s a of multi At -sketches (see Remark 34) is isomorphic to the presheaf topos [ Φ α C Set ] .
Φ α C can be constructed as follows: We take the disjoint union of Φ (as a discrete category) and C . For any feature symbol P Φ , any object C in C , and any c α ( P ) ( C ) , we add an arrow ( P , c , C ) : P C . Finally, we define the composition for the new pairs of composable arrows: ( P , c , C ) ; f : = ( P , α ( P ) ( f ) ( c ) , C ) for all f : C C in C .
As an example, we take Φ = { mon , fnl } with arities as in Example 49. The category Φ α Graph is visualized below. Composition in Φ α Graph is defined by the equations x e ; s = x v 1 , x e ; t = x v 2 and these equations encode the arity x v 1 x e x v 2 of mon ! The isomorphism transforms any multi At -sketch K = ( K , I K , s t K ) into a corresponding functor K : Φ α Graph Set .
Mathematics 10 01085 i055
Mathematics 10 01085 i056represents the graph K. The set K ( mon ) holds all the identifiers i I K with s t K ( i ) = ( α ( mon ) , mon ( i d α ( mon ) ) , β ) while the maps K ( x e ) , K ( x v 1 ) , K ( x v 2 ) encode all the corresponding bindings β : α ( mon ) K . Morphisms in [ Φ α C Set ] , i.e., natural transformations, encode strict At -sketch arrows between multi At -sketches K = ( K , I K , s t K ) .
After transforming mSk s a into [ Φ α C Set ] , we can define another footprint Ξ = ( Φ , α ) , α : Φ [ Φ α C Set ] O b j 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 At -sketch K = ( K , I K , s t K ) corresponds to the At -sketch condition K { s t K ( i ) i I K } and any strict At -sketch arrow φ : L R corresponds to a At -sketch condition of the form 0 ( L : ( S t L ( φ , R : S t R ) ) ) . As we have seen, sketch conditions of this special form, and thus strict At -sketch arrows, allow us to axiomatize arbitrary limits or colimits, respectively.
In such a way, all the arities α ( P ) in the footprint Ξ correspond to very simple At -sketch conditions that are just conjunctions of At -statements and atomic At -statements are simply conjunctions of those conjunctions of At -statements, which are introduced by the arities α ( P ) and obtained the “label” P’.
As an example, we consider the footprint Ξ = ( Φ , α ) , α : Φ Graph O b j with Φ = { cmp , id } and arities as in Example 14. For the footprint Ξ = ( Φ , α ) , α : Φ [ Φ α Graph Set ] O b j , we assume that, for any P Φ , the arity α ( P ) corresponds to an At -sketch that represents one of the commutative (co)cones described in Remark 10. In such a way, an atomic At ’-sketch represents a graph with a set of commutative (co)cones labelled by feature symbols from Φ’. Strict atomic At ’-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 Ξ R = ( Rel , α ) in Example 50, we can consider α as a map α : Rel [ 1 Set ] O b j with V the only object in 1 and α ( P ) ( V ) = { x 1 , x 2 } for all P Rel . Φ α 1 contains then for each P Rel :
Mathematics 10 01085 i057
an “edge sort” P and [ Φ α 1 Set ] is the category of graphs with an Rel -indexed family of edges. This category is adhesive in contrast to the category of Rel -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 Var we denote by FE ( Ξ , X ) 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 Var is given by a map η assigning to each feature symbol F Φ a feature Ξ -expression η ( F ) FE ( Ξ , α ( F ) ) . η is called simple if η ( F ) = F ( i d α ( F ) ) , with F Φ and α ( F ) = α ( F ) , for all F Φ .
Any footprint morphism η : Ξ Ξ induces an Var O b j -indexed family of maps η X : FE ( Ξ , X ) FE ( Ξ , X ) . 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 Var has pushouts, and we fix a choice of pushouts in Var .
Definition A1
( Translation maps). We define inductively and in parallel a family oftranslation maps ψ Ξ : FE ( Ξ , X ) FE ( Ξ , Z ) with ψ ranging over all variable translations ψ : X Z :
  • Atomic: ψ Ξ ( X F ( β ) ) : = Z F ( β ; ψ ) .
  • Everything: ψ Ξ ( X ) : = Z .
  • Void: ψ Ξ ( X ) : = Z .
  • Conjunction: ψ Ξ ( X ( E x 1 E x 2 ) ) : = Z ( ψ Ξ ( E x 1 ) ψ Ξ ( E x 2 ) ) .
  • Disjunction: ψ Ξ ( X ( E x 1 E x 2 ) ) : = Z ( ψ Ξ ( E x 1 ) ψ Ξ ( E x 2 ) ) .
  • Implication: ψ Ξ ( X ( E x 1 E x 2 ) ) : = Z ( ψ Ξ ( E x 1 ) ψ Ξ ( E x 2 ) )
  • Negation: ψ Ξ ( X ¬ E x ) : = Z ¬ ψ Ξ ( E x ) .
  • Quantification: ψ Ξ ( X Q ( φ , Y : E x ) ) : = Z Q ( φ * , Y ψ φ : ψ Ξ * ( E x ) )
    for Q { , } where Z φ * Y ψ φ ψ * Y is the chosen pushout of Z ψ X φ Y :
Note that the pushout construction formalizes and generalizes the “introduction of fresh variables” in traditional FOL! If we choose the cospan Z ψ 1 ; φ Y i d Y Y , whenever ψ is an isomorphism, we ensure, especially, that ( i d X ) Ξ becomes the identity map on FE ( Ξ , X ) . Since the composition of chosen pushouts does not result, in general, in a chosen pushout, the assignments ψ ψ Ξ constitute only a pseudo functor from Var into Set . This may be a hint to develop future deduction calculi for Institutions of Statements rather in a fibred setting (compare [45])?
The translation ψ Ξ C T ( m o n ) of the universal property m o n of monomorphisms in Example 29 along the unique graph morphism Mathematics 10 01085 i058 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  η X : FE ( Ξ , X ) FE ( Ξ , X ) where the only non-trivial case is the base case:
1.
Atomic: η X ( F ( β ) ) : = β Ξ ( η ( F ) ) for any F Φ and β : α F X in Var .
If η is simple, this base case degenerates, according to Definition A1, to a simple replacement of feature symbols:
1’.
Atomic’: η X ( F ( β ) ) : = β Ξ ( F ( i d α ( F ) ) ) = F ( i d α ( F ) ; β ) = F ( β ) .
Thus, we do not need to employ translation maps to define substitution maps in case of simple footprint morphisms!

References

  1. 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]
  2. Diaconescu, R. Institution-Independent Model Theory; Studies in Universal Logic: Basel, Switzerland, 2008. [Google Scholar] [CrossRef]
  3. 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]
  4. Kaphengst, H.; Reichel, H. Algebraische Algorithmentheorie; WIB 1; VEB Robotron, Zentrum für Forschung und Technik: Dresden, Germany, 1971. [Google Scholar]
  5. 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]
  6. Reichel, H. Initial Computability, Algebraic Specifications, and Partial Algebras; Oxford University Press: Oxford, UK, 1987. [Google Scholar]
  7. Wolter, U. An Algebraic Approach to Deduction in Equational Partial Horn Theories. J. Inf. Process. Cybern. 1990, 27, 85–128. [Google Scholar]
  8. Lawvere, F.W. Functorial Semantics of Algebraic Theories. Proc. Natl. Acad. Sci. USA 1963, 50, 869–872. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  9. 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]
  10. Barr, M.; Wells, C. Category Theory for Computing Science; Series in Computer Science; Prentice Hall International: London, UK, 1990. [Google Scholar]
  11. Johnson, M.; Rosebrugh, R.; Wood, R. Entity-relationship-attribute designs and sketches. Theory Appl. Categ. 2002, 10, 94–112. [Google Scholar]
  12. Wells, C. Sketches: Outline with References; Addendum 2009; Department of Mathematics, Case Western Reserve University: Cleveland, UH, USA, 1993. [Google Scholar]
  13. 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] [Green Version]
  14. 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]
  15. Makkai, M. Generalized Sketches as a Framework for Completeness Theorems. J. Pure Appl. Algebra 1997, 115, 49274. [Google Scholar] [CrossRef] [Green Version]
  16. 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]
  17. Diskin, Z. Towards algebraic graph-based model theory for computer science. Bull. Symb. Log. 1997, 3, 144–145. [Google Scholar]
  18. Rutle, A. Diagram Predicate Framework: A Formal Approach to MDE. Ph.D. Thesis, Department of Informatics, University of Bergen, Bergen, Norway, 2010. [Google Scholar]
  19. 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]
  20. König, H.; Wolter, U. Van Kampen Colimits and Path Uniqueness. Log. Methods Comput. Sci. 2018, 14, 1–27. [Google Scholar] [CrossRef]
  21. 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] [Green Version]
  22. 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]
  23. 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] [Green Version]
  24. 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]
  25. 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]
  26. 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).
  27. 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]
  28. Freyd, P.J.; Scedrov, A. Categories, Allegories; North-Holland Mathematical Library; North-Holland: Amsterdam, The Netherlands, 1990; Volume 39. [Google Scholar]
  29. 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]
  30. 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]
  31. Goguen, J.A.; Burstall, R.M. Institutions: Abstract Model Theory for Specification and Programming. J. ACM 1992, 39, 95–146. [Google Scholar] [CrossRef]
  32. 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]
  33. 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]
  34. 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]
  35. McLarty, C. Elementary Categories, Elementary Toposes; Oxford Logic Guides (Book 21); Clarendon Press: Oxford, UK, 1991. [Google Scholar]
  36. Baader, F.; Horrocks, I.; Sattler, U. Chapter 3. Description logics. In Handbook of Knowledge Representation; Elsevier: Amsterdam, The Netherland, 2007. [Google Scholar]
  37. 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] [Green Version]
  38. 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]
  39. Chang, C.C.; Keisler, H.J. Model Theory; Studies in Logic and the Foundations of Mathematics; Elsevier: Amsterdam, The Netherland, 1990. [Google Scholar]
  40. Lloyd, J.W. Foundations of Logic Programming, 2nd ed.; Springer: Cham, Switzerland, 1987. [Google Scholar]
  41. Wechler, W. Universal Algebra for Computer Scientists; EATCS Monographs on Theoretical Computer Science; Springer: Berlin, Germany, 1992; Volume 25. [Google Scholar]
  42. 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]
  43. Wolter, U. Indexed vs. fibred structures—A field report. Rom. J. Pure Appl. Math. 2020, 66, 813–830. [Google Scholar]
  44. 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]
  45. 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]
Figure 1. Stepwise construction of an Institution of Statements (IoS).
Figure 1. Stepwise construction of an Institution of Statements (IoS).
Mathematics 10 01085 g001
Table 1. CT Footprint.
Table 1. CT Footprint.
FArity αCT (F)FArity αCT (F)
cmp Mathematics 10 01085 i059id Mathematics 10 01085 i060
Table 2. Materials and Methods
Table 2. Materials and Methods
FArity αCT (F)
tb(n) Mathematics 10 01085 i061
fk Mathematics 10 01085 i062
pk Mathematics 10 01085 i063
inj Mathematics 10 01085 i063
tot Mathematics 10 01085 i063
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Wolter, U. Logics of Statements in Context-Category Independent Basics. Mathematics 2022, 10, 1085. https://doi.org/10.3390/math10071085

AMA Style

Wolter U. Logics of Statements in Context-Category Independent Basics. Mathematics. 2022; 10(7):1085. https://doi.org/10.3390/math10071085

Chicago/Turabian Style

Wolter, Uwe. 2022. "Logics of Statements in Context-Category Independent Basics" Mathematics 10, no. 7: 1085. https://doi.org/10.3390/math10071085

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop