Preprint
Article

This version is not peer-reviewed.

Logics of Statements in Context – First-Order Logic Files

A peer-reviewed article of this preprint also exists.

Submitted:

10 February 2025

Posted:

11 February 2025

You are already at the latest version

Abstract
Logics of Statements in Context have been proposed as a general framework to describe and relate, in a uniform and unifying way, a broad spectrum of logics and specification formalisms which also comprise “open formulas”. Especially, it has been shown that we can define arbitrary first-order “open formulas” in arbitrary categories. At present, there are two deficiencies. In the general case only signatures with predicate symbols are considered and institutions of statements in context are only defined for single signatures. In this paper we elaborate the special case of traditional many-sorted First-Order Logic. We show that any many-sorted first-order signature Σ with predicate and (!) operation symbols gives rise to an institution FLΣ of Σ-statements in context, and that any signature morphism results in a comorphism between the corresponding institutions. We prove that we obtain a functor FL:Sig→coIns from the category of signatures into the category of institutions and comorphisms. We construct a corresponding Grothendieck institution FL♯ and prove that FL♯ is indeed an extension of the traditional institution of First-Order Logic which only comprises “closed formulas”. We also investigate substitutions in detail and discuss (elementary) diagrams in the sense of traditional First-Order Logic.
Keywords: 
;  ;  ;  ;  ;  ;  ;  ;  ;  

1. Introduction

Logics of Statements in Contexts have been introduced in [1] as a general framework enabling us to describe, analyze, relate and unify a variety of diverse concepts, results and constructions from a broad spectrum of logics and other formalisms including First-Order Logic [2,3,4], Universal Algebra [5], Algebraic Specifications [6,7], Ehresmann Sketches [8], Generalized Sketches [9,10,11], Description Logic [12] and Graph Transformations [13], for example.
From the more focused perspective of logic, Logics of Statements in Contexts propose a uniform way to define logics also comprising "open formulas". Especially, it has been shown that we can define arbitrary first-order "open formulas" in arbitrary categories.
At present, there are two main deficiencies. In the general case we do not consider operations since it is quite unclear for us how to generalize the traditional concept of operation for the category Set of sets and total maps to arbitrary categories. Some results have been achieved for graph operations, i.e., for operations in structures with directed multi graphs as carriers instead of sets [14,15]. We are convinced that these results can be extended to arbitrary categorical presheaves instead of the presheaf Graph . However, even in case of Graph we have not been able yet to come up with a reasonable substitution calculus. We adapted in [1] the concept of institution [16,17] as an adequate pattern to present the basic constituents of a logic. That we constructed in [1] only institutions of statements in context for single signatures, is the second main deficiency.
In this paper we turn back to the roots. We elaborate the paradigmatic special case of traditional many-sorted First-Order Logic where predicates and operations are combined. We show that any first-order signature Σ with predicate and (!) operation symbols gives rise to an institution FL Σ of Σ -statements in context, and that any signature morphism transforms into a comorphism between the corresponding institutions. We prove that we obtain a functor FL : Sig c o I n s from the category of signatures into the category of institutions and comorphisms. We construct a corresponding Grothendieck institution FL [17,18] and prove that FL is indeed an extension of the traditional institution of first-order logic FOL , as presented in [16,17] for example, which only comprises “closed formulas”. In addition, it turns out that FL is not only opfibred over Sig (since it is a Grothendieck institution) but even over FOL in a certain sense.
It is well-known that empty sorts potentially cause the problem that deduction rules for one-sorted first-order logic are, in general, not sound for many-sorted deduction [17,19]. We demonstrate that contexts are an appropriate tool to localize and handle this problem in the spirit of [19].
Another objective, leading us to the framework of Logics of Statements in Context, was the longing for a way of describing logics in a uniform abstract manner that is close to the way it is often done in traditional logic. We want to be allowed to restrict ourselves to finite signatures and to describe the language of a logic in an enumerable manner. We prefer a clear distinction between constant symbols and variables.
In addition, we intend to do (abstract) model theory even in case of finite signatures. From the perspective of model theory contexts serve as a bridge between syntax (constant symbols, variables) and semantics (elements of carrier sets), and can be utilized to define different kinds of sketches in analogy to the different kinds of diagrams in traditional First-Order Logic. In such a way, contexts also establish a "technological space" where deduction can take place. Deduction in Logics of Statements in Contexts is a big topic of its own and can not be covered in this paper.
To facilitate the reading and understanding of the paper, we recapitulate some methodological principles which guided the design of Logics of Statements in Context:
  • "Open formulas" should be treated as first-class citizens.
  • All syntactic entities and not only the basic ones, like predicate and operation symbols, should have a semantics in a given structure.
  • The semantics of a term in a given structure is a "derived operation" assembled from the "basic operations", i.e., the semantics of operation symbols in the given structure. So, terms give us a syntactic representation of "derived operations" at hand.
  • To obtain, in the many-sorted case, a sound and complete deduction calculus it is not enough to take into account only the set of all free variables syntactically appearing in a formula. The set of free variables needs to be bound, in principle, to a bigger context.
  • "Open formulas" without such a binding are called expressions. We do not consider expressions as formulas but, in analogy to terms, as syntactic representations of "derived predicates" assembled from the "basic predicates", i.e., the semantics of predicate symbols in the given structure.
  • Expressions bound to a context are called statements in context.
  • In such a way, we can also encapsulate the relatively intricate construction of first-order expressions, in the sense, that the translation of statements along context morphisms can be simply defined by composing bindings with context morphisms. We adapted this "encapsulation trick" from [16] where it is used for initial and free constraints.
The paper is organized as follows. Section 2 recapitulates some basic concepts and corresponding notational conventions. Section 3 gives a rigorous and novel description of basic concepts in many-sorted first-order logic and their semantics – signatures, terms and expressions.
Section 4 is devoted to signature morphisms. We start with a detailed analysis of the functors induced by maps between finite sets of sort symbols and elucidate, especially, the special role of disjoint sorted sets. This enables us to describe the translation of terms and expressions along signature morphisms by means of natural transformations. On the semantic side, we define reducts of structures, homomorphisms, derived operations and derived predicates in the opposite direction. This gives us, finally, a satisfaction condition for expressions and assignments at hand. The traditional institution of first-order logic FOL is reconstructed by restraining the natural transformations and the satisfaction condition to closed expressions.
In Section 5 we finally present the institutions FL Σ of Σ -statements in context, the functor FL : Sig c o I n s and the Grothendieck institution FL . In Section 6 we investigate substitutions in detail and develop corresponding extensions of constructions and results in Section 3 and Section 4. Section 7 recalls the concepts sketch and sketch implication. We adapt the proposal in [1] to formalize diagrams, in the sense of traditional First-Order Logic [2,3], as sketches. We conclude the paper with Section 8.

2. Notations and Preliminaries

Categories and Functors  | C | 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 . If the category C is clear from the context, we will often use the more compact notation B A instead of C ( A , B ) . We use the diagrammatic notation f ; g : A C for the composition of morphisms f : A B and g : B C in C .
An object 0 in a category C is called initial if there exist for any object A in C a unique morphism from 0 into A often denoted by ! A : 0 A and called initial morphism for A.
C D states that category C is a subcategory of category D . The corresponding inclusion functor is denoted by In C , D : C D .
A category C is small if the collection C M o r , and thus also the collection | C | , is a set. Cat is the category of all small categories. Set denotes the category of all sets and all (total) maps. Cat and Set are not small! A category C is locally small if C ( A , B ) is a set for all objects A and B in C . Cat and Set are locally small! CAT is the category with all small categories and categories like Cat and Set as objects.
To lighten notation, we often use, in case F ( C ) D , the same identifier F : C D for the restriction of a functor F : C D to subcatgories C C , D D .
For a category C we denote by g r ( C ) the underlying reflexive graph, i.e., in g r ( C ) we simply forget that there is a composition operation in C . Obviously, each functor F : C D comprises a corresponding reflexive graph homomorphism F : g r ( C ) g r ( D ) between the underlying reflexive graphs (compare the concept of a "model of a graph in a category" in [8]). Be aware, however, that not every reflexive graph homomorphism G : g r ( C ) g r ( D ) establishes also a functor G : C D because a reflexive graph homomorphism G : g r ( C ) g r ( D ) is not required to be compatible with composition.
Natural Transformations and Functor Categories: If α : F G : A B and β : G H : A B are natural transformations, the vertical composition of α and β is denoted α ; β : F H : A B such that for each A | A | , ( α ; β ) A : = α A ; β A .
Also, if F : A B , G , G : B C , H : C D are functors and α : G G : B C is a natural transfomation, the horizontal compositions of F with α , and α with H are represented as F α : F ; G F ; G : A C and α H : G ; H G ; H : B D such that for each C | C | , A | A | , ( F α ) C : = α F ( C ) whereas ( α H ) A : = H ( α A ) .
Preprints 148907 i001
Moreover, we have for functors F : A B , G : B C , H , H , H : C D , I : D E and natural transformations α : H H , β : H H the following laws Preprints 148907 i002
( G . α ) . I = G . ( α . I ) and ( α ; β ) . I = ( α . I ) ; ( β . I )
( F ; G ) . α = F . ( G . α ) and G . ( α ; β ) = ( G . α ) ; ( G . β )
For categories C and D we denote by [ C D ] or D C the corresponding functor category with objects all functors from C into D , morphisms all natural transformations between those functors and vertical composition of natural transformations.
The traditional definition of natural transformations α : F G : A B between functors can be reused to define natural transformations α : F G : g r ( A ) g r ( B ) for all (!) reflexive graph homomorphisms between the underlying reflexive graphs of categories. The equations in (1) and (2) remain valid for those reflexive graph homomorphisms and natural transformations between them.
S-sorted Sets: We can consider any set S as a discrete category. The corresponding functor category Set S has S-indexed families A = ( A s s S ) of sets as objects, called S-sorted sets or S-sets for short, and as morphisms f : A B S-indexed families ( f s : A s B s s S ) of maps, called S-maps. The empty S-set  0 S : = ( s S ) is the initial object in Set S . A = ( A s s S ) is called a singleton S-set if there is only one s S with A s and if A s is a singleton for this s S . Set d S denotes the full subcategory of Set S given by all disjoint S-sets A = ( A s s S ) , i.e., we have A s 1 A s 2 = for all s 1 , s 2 S with s 1 s 2 .
Inclusions: For any inclusion A B of sets there is a corresponding inclusion map  i n A , B : A B with i n A , B ( a ) = a for all a A . There is an S-inclusion A B between S-sets A = ( A s s S ) and B = ( B s s S ) if A s B s for all s S . The corresponding inclusion S-map is i n A , B : = ( i n A s , B s s S ) : A B . Intersections, unions and complements of S-sets are also defined component wise.
S-typed Sets: For any set S the slice category Set / S has as objects S-typed sets, i.e., pairs ( C , t ) of a set C and a typing map  t : C S . A morphism f : ( C , t ) ( D , r ) is given by a map f : C D such that f ; r = t .
The assignments ( C , t ) ( t 1 ( s ) s S ) extend to a functor I S : Set / S Set S which restricts to an isomorphism I S : Set / S Set d S where Set d S is the full subcategory of Set S given by all disjoint S-sets. The inverse functor S S : Set d S Set / S is given by union of component sets and assigns to each S-set A = ( A s s S ) the S-typed set ( A , t A ) with t A ( a ) = s if a A s . S S : Set d S Set / S can be extended to a functor S S : Set S Set / S by utilizing disjoint union (sum) instead of union for all non-disjoint S-sets. This establishes an equivalence S S I S : Set S Set / S of categories with I S ; S S = i d Set / S .

3. Basic Concepts and Constructions in First-Order Logic

Name spaces: It is under-communicated that the definition a morphism between concrete institutions often relies on the implicit assumption that the syntactic entities of both institutions are build upon the same stocks of symbol identifiers. We restrict ourselves in this paper to finitary syntactic entities. Therefore, we assume that all considered first-order institutions are build upon a certain choice of four enumerable and disjoint name spaces:
  • A set N f u n of names for operation symbols.
  • A set N p r e d of names for predicate symbols.
  • A set N s o r t of names for sort symbols which is equipped with a fixed total order.
  • A set N v a r of names for variables which is equipped with a fixed total order.
In this paper we choose N s o r t to be a subset of words with at least two letters over the Latin alphabet with lexicographic order, and for N v a r we choose the totally ordered set { x , x 1 , x 2 , , y , y 1 , y 2 , , z , z 1 , z 2 , } .

3.1. Signatures and Structures

In this paper about first-order logic we use the traditional term "signature" instead of the neologism "footprint" coined for the general setting in [1]. Since we will neither misuse constant symbols to encode variables nor to encode elements of carriers of first-order structures, we can restrict ourselves to finite signatures only.
To define a many-sorted signature Σ , we first have to choose a finite set S N s o r t of sort symbols. In [1] we require that the arities of predicate and operation symbols are defined by means of "variable declarations". For a chosen set S the corresponding "variable declarations", in the sense of [1], are given by the set V a r S of all finite and disjoint (!) S-sets X = ( X s s S ) with X s N v a r for all s S . We will simply call them "S-sets of variables" instead of "variable declarations".
Definition 1
(Signature). A(many-sorted) signature  Σ = ( S , P , F , a r , i n , o u t ) is given by
  • a finite set S N s o r t of sort symbols,
  • a finite set P N p r e d of predicate (relation) symbols,
  • a finite set F N f u n of operation (function) symbols, and
  • arity functions a r : P V a r S , i n : F V a r S , o u t : F V a r S where o u t ( op ) is a singleton S-set for all op F . By s r t ( op ) we denote the only s S with o u t ( op ) s . We also assume that i n ( op ) and o u t ( op ) are disjoint for all op F (compare [15]).
Remark 1
(Representation and Syntactification of S-sets of Variables). Since N s o r t is by assumption equipped with a total order, any finite set S N s o r t inherits from N s o r t a total order thus we can represent, especially in examples, any S-set as an m-tuple of sets where m = | S | is thecardinalityof S.
Moreover, for any S-set X = ( X s s S ) of variables the union X of its components sets inherits a total order from N v a r . This allows us to represent X by encoding the equivalent S-typed set S S ( X ) = ( X , t X ) as an n-tuple ( v 1 X : s 1 , , v n X : s n ) ofvariable declarationswith n = | X | , v i X denoting the i-th variable in the totally ordered set X and s i : = t X ( v i X ) for all 1 i n .
In such a way, we can also syntactically encode the S-set X of variables by the string of symbols syn ( X ) : = [ v 1 X : s 1 , , v n X : s n ] .
Example 1
(Signature). We chose S = { d a t e < n a t < p r s } with sort symbols " p r s " for person and " n a t " for natural number. The sample signature Σ = ( S , P , F , a r , i n , o u t ) is then defined by
  • P = { fem , par , bef } with predicate symbols par for "parent", fem for "female" and bef for "before", and the following arities: a r ( fem ) = ( , , { x 1 } ) represented by ( x 1 : p r s ) , a r ( par ) = ( , , { x 1 , x 2 , x 3 } ) represented by ( x 1 : p r s , x 2 : p r s , x 3 : p r s ) and a r ( bef ) = ( { x 1 , x 2 } , , ) represented by ( x 1 : d a t e , x 2 : d a t e ) ; and
  • F = { sp , one , born , pl } with operation symbols sp for "sp(ecial day)", pl for "pl(us that many days)" and the following arities: i n ( sp ) = i n ( one ) = 0 S = ( , , ) represented by ( ) , i n ( born ) = ( , , { x 1 } ) represented by ( x 1 : p r s ) , i n ( pl ) = ( { x 1 } , { x 2 } , ) represented by ( x 1 : d a t e , x 2 : n a t ) and o u t ( sp ) = ( { y 1 } , , ) represented by ( y 1 : d a t e ) , o u t ( one ) = ( , { y 1 } , ) represented by ( y 1 : n a t ) , o u t ( born ) = o u t ( pl ) = ( { y 1 } , , ) represented by ( y 1 : d a t e ) .
Now, we are going to define the category of structures for a given signature Σ .
Definition 2
(Structure). For a signature Σ = ( S , P , F , a r , i n , o u t ) a  Σ -Structure A = ( A , P A , F A ) is given by
  • an S-set A, called the carrier of A ,
  • a family P A = { p A p P } of sets p A A a r ( p ) of valid assignments for the predicate symbol p in A , and
  • a family F A = { op A op F } of operations (functions) op A : A i n ( op ) A o u t ( op ) in A .
Remark 2
(Representation of Variable Assignments). We consider an S-set X = ( X s s S ) in V a r S with n = | X | . For a given S-set A, S-maps a : X A will be also called(variable) assignments of X in A.
Relying on Remark 1, we can establish a bijection between the set A X of all assignments of X in A and the Cartesian product A s 1 × × A s n with s i = t X ( v i X ) for all 1 i n where v i X denotes the i-th variable in the totally ordered set X . That is, anyassignment a : X A can equivalently be represented as an n-tuple ( a 1 , , a n ) A s 1 × × A s n with a i = a s i ( v i X ) for all 1 i n . We will utilize both notations a : X A and a = ( a 1 , , a n ) synonymously.
Note, that in case of the empty S-set X = 0 S the only element ! A : 0 S A in A 0 S is represented by the empty tuple ( ) .
Example 2
(Structure). For the sample signature Σ in Example 1 we describe a sample Σ-structure A = ( A , P A , F A ) thereby relying on the conventions in Remark 1 and 2:
  • For the carrier A = ( A d a t e , A n a t , A p r s ) we choose A d a t e to be the set of all dates from 01.01.1700 on. A n a t is the set N + of all positive natural numbers and A p r s is the set of all persons born in Europe from 01.01.1900 on.
  • For the family P A = { par A , fem A , bef A } the predicate par A A a r ( par ) is given by all triples ( p 1 , p 2 , p 3 ) of persons in A p r s such that p 2 is the father and p 3 is the mother of p 1 . Note, that there is no information in par A about the parents of a person, if one of the parents is born before 01.01.1900 or outside Europe. fem A is the subset of all female persons in A p r s and bef A is given by the usual irreflexive before-relation between dates.
  • For the family F A = { sp A , one A , born A , pl A } the operation born A : A ( x 1 : p r s ) A d a t e provides for each person p in A p r s the date of its day of birth. Note, that we have chosen A p r s and A d a t e in such way that born A is ensured to be a total operation! For any date d A d a t e and any natural number n A n a t pl A ( d , n ) is the date of the n-th day after d. one A ( ) is the natural number 1 and sp A ( ) the special date 19.10 . 1958 .
Homomorphisms preserve as well "truth" as "operation behavior".
Definition 3
(Homomorphism). A  Σ -homomorphism  ς : A B between two Σ-structures A and B is given by an S-map ς : A B such that
  • a p A implies a ; ς p B for all p P and all assignments a : a r ( p ) A , i.e., the map ( _ ; ς ) : A a r ( p ) B a r ( p ) restricts to a map ( _ ; ς ) : p A p B .
Preprints 148907 i003
2.
op A ( a ) ; ς = op B ( a ; ς ) for all op F and all input assignments a : i n ( op ) A , i.e., op A ; ( _ ; ς ) = ( _ ; ς ) ; op B .
Preprints 148907 i004
Str ( Σ ) denotes the category of all Σ -structures and all Σ -homomorphisms.

3.2. Terms and First-Order Expressions: Syntax

We consider terms and first-order expressions as syntactic entities and define them as finite strings of symbols. To distinguish terms from meta-level expressions, such as op A ( a 1 , , a n ) , we will use angle bracket symbols " " , " " , instead of parenthesis " ( " , " ) " , to build terms. Moreover, we will use delimiter signs ⌈⌉ to indicate that the expression between the delimiters is a string. So, the delimiter signs are not constituents of terms and we may just drop them if convenient.
To be prepared for later and future developments we introduce terms not only for S-sets of variables but for arbitrary disjoint (!) S-sets. The following is a traditional inductive definition of terms similar to [5,6] and relies on the conventions in Remark 2:
Definition 4
(Terms: Syntax). The S-set T Σ ( A ) of all Σ -termsover a disjoint S-set A is the smallest S-set of strings of symbols such that
  • Variables:  a T Σ ( A ) s for all a A s , s S ;
  • Constants:  c T Σ ( A ) s r t ( c ) for all c F with i n ( c ) = 0 S , i.e., | i n ( op ) | = ;
  • Operations:  op t 1 , , t n T Σ ( A ) s r t ( op ) for all op F with n = | i n ( op ) | 1 and all assignments t = ( t 1 , , t n ) in T Σ ( A ) i n ( op ) .
Note that the assignments a a , assigning to each element in A the string constituted exactly by this single symbol, define an injective S-map η A : A T Σ ( A ) .
Note further, that each operation symbol op F with n = | i n ( op ) | 1 is reborn as the Σ -term op v 1 i n ( op ) , , v n i n ( op ) T Σ ( i n ( op ) ) s r t ( op ) with the v i i n ( op ) as in Remark 2.
Remark 3
(Terms: Disjointness and Inclusions). The S-set T Σ ( A ) is disjoint since A is disjoint and since our concept of signature avoids the so-called "overloading of operation symbols"!
In such a way, the inductive definition of T Σ ( A ) can be equivalently seen as the inductive definition of a set T Σ ( A ) of strings together with a typing map t T Σ ( A ) : T Σ ( A ) S !
We do have T Σ ( A ) T Σ ( B ) whenever A B . For a disjoint S-set B not every Σ-term in T Σ ( B ) "syntactically contains" all the elements in B. The S-set of all the elements in B, "syntactically appearing" in a Σ-term t T Σ ( B ) s , is the smallest S-subset A B such that t T Σ ( A ) s .
Example 3
(Terms: Syntax). There is no recursion in the sample signature Σ in Example 1 thus we have "up to renaming of variables" only five Σ-terms, all of sort d a t e , in addition to the four "reborn operation symbols" sp , one , born x 1 and pl x 1 , x 2 . The five Σ-terms are pl sp , one over 0 S , pl x 1 , one over ( x 1 : d a t e ) , pl sp , x 1 over ( x 1 : n a t ) , pl born x 1 , one over ( x 1 : p r s ) and pl born x 1 , x 2 over ( x 1 : p r s , x 2 : n a t ) .
Remark 4
(Syntactification of Substitutions). Variable assignments of the form t : X T Σ ( Y ) will be also called Σ -substitutions. Due to Remark 2, we can uniquely represent any Σ-substitution t : X T Σ ( Y ) by an n-tuple ( t 1 , , t n ) of terms where n = | X | .
What we implicitly did in Definition 4, was to introduce the corresponding syntactic encoding syn ( t ) : = t 1 , , t n of the substitution t : X T Σ ( Y ) as a string of symbols. For the injective S-map η X : X T Σ ( X ) we get syn ( η X ) : = v 1 X , , v n X with variables v i X due to Remark 1. In case of the empty S-set X = 0 S the only element in T Σ ( Y ) 0 S is represented by theempty tuple ( ) thus we have syn ( ( ) ) = .
First-order expressions are strings of symbols. For convenience we drop, however, the delimiter signs in the following definition.
Definition 5
(Expressions: Syntax). For a signature Σ = ( S , P , F , a r , i n , o u t ) , we define inductively and in parallel a family F E Σ of sets F E Σ ( X ) of(first-order) Σ -expressions E x on X, X E x in symbols, where X varies over all S-sets of variables, i.e., all elements in V a r S :
  • Atomic expressions:
    (a)
    Equation: X ( t 1 = t 2 ) for any s S and any t 1 , t 2 T Σ ( X ) s .
    (b)
    Relational Atom: X p syn ( t ) for any p P and any S-map t : a r ( p ) T Σ ( X ) .
  • Everything: X for any S-set X of variables.
  • Void: X for any S-set X of variables.
  • 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 ( syn ( Y X ) : E x ) and X ( syn ( Y X ) : E x ) for any expression Y E x and any proper S-inclusion X Y .
Remark 5
(Syntax of expressions). There are three changes compared to the general Definition 8 in [1]. First, we do not use arbitrary S-maps between S-sets of variables but only proper inclusion S-maps i n X , Y : X Y in quantifications. Second, these inclusion S-maps are not considered to be morphisms in the category Var of "variable declarations" for the institutions of statements defined in Section 5.1. Third, we adapt the traditional notation for quantification, i.e., we represent the proper inclusion S-maps i n X , Y : X Y by the complements Y X in Set S .
Attention, we do not keep track of the "free variables" that actually appear in an expression (compare Remark 3). X E x ensures, however, that all "free variables" in E x are contained in X. So, in case of quantification, it may happen that none of the variables in Y X appears as a "free variable" in E x !
Our design decision, to explicitly declare first all the variables X , which are available, before actually constructing expressions using only the variables in X, together with our requirement X Y for quantification has a subtle but important consequence. If X E x then none of the variables in X appears as a "bound variable" in E x . Other variables than the ones in X can appear, however, multiple times as "bound variables" in E x but only in non-overlapping "sub-expressions". Lately, we learned that these syntactic restrictions correspond toBarendregt’s variable conventionfor the λ-calculus (see [20], p. 26):
  • bound variables are distinct from free variables, and
  • all binders bind variables not already in scope.
Every predicate symbol p P is reborn as the Σ-expression a r ( p ) p syn ( η a r ( p ) ) with η a r ( p ) : a r ( p ) T Σ ( a r ( p ) ) . Keep in mind, that syn ( η a r ( p ) ) = v 1 a r ( p ) , , v n a r ( p ) with n = | a r ( p ) | according to Remark 4.
Remark 6
(Everything and Void). We consider ⊤ and ⊥ not aslogical constantsbut asbuilt-in nullary predicate symbols, i.e., a r ( ) = a r ( ) = 0 S . Therefore, we are not using symbols likeTorF, for example. Built-in, means, especially, that ⊤ and ⊥ do have a fixed semantics for any Σ-structure A = ( A , P A , F A ) , namely A = and A = A 0 S = { ! A : 0 S A } . Be aware, that the string in X and X encodes the initial morphism ! T Σ ( X ) : 0 S T Σ ( X ) .
Analogously, the equation symbol "=" can be seen to represent an S-indexed family of binary built-in predicate symbols = s with a fixed semantics in any Σ-structure. Finally, built-in means that none of the symbols = , , appears in any of the sets N s o r t , N p r e d , N f u n or N v a r .
Remark 7
(Closed expressions: Syntax). Σ-expressions of the form 0 S E x will be calledclosed Σ -expressions. They represent nullary derived predicates that can be either valid or not valid in a given Σ-structure (compare Remark 6, Remark 9 and SubSection 4.2.5).
Example 4
(Expressions: Syntax). We continue Example 3 and discuss some Σ-expressions for the sample signature in Example 1. For convenience, we will drop some parentheses and simplify the notations for encodings of S-sets of variables introduced in Remark 1.
The following closed Σ-expression, which we identify by the auxiliary name bfact ,
0 S ( [ x 1 , x 2 , x 3 : p r s ] : par x 1 , x 2 , x 3 bef born x 2 , born x 1 bef born x 3 , born x 1 )
claims that biological parents are always born before their children.
Our main methodological point is, however, to consider expressions as syntactic representations ofderived predicatesenabling us to denote properties in an anonymous way. We may say, for example, that the sample signature in Example 1 is redundant in the sense that the property, denoted by the basic predicate bef , could be also represented by the following Σ-expression
nbf : = ( x 1 , x 2 : d a t e ) ( [ y 1 : n a t ] : plus x 1 , y 1 = x 2 )
which we consider as a derived predicate with arity ( x 1 , x 2 : d a t e ) and auxiliary name nbf . The following atomic Σ-expression gives us the property "born before" for two persons at hand
( x 1 , x 2 : p r s ) bef born x 1 , born x 2 .
The next Σ-expression represents the property "being sibling of someone" thereby hiding the witnesses for a corresponding statement about a certain person
sbl : = ( x 1 : p r s ) ( [ y 1 , y 2 , y 3 : p r s ] : ¬ ( x 1 = y 1 ) par x 1 , y 2 , y 3 par y 1 , y 2 , y 3 ) .
Our last sample Σ-expression, with auxiliary name hst , represents the bit more intrinsic property "being half-sister of someone"
( x 1 : p r s ) fem ( x 1 ) ( [ y 1 , y 2 , y 3 , y 4 : p r s ] : ¬ ( x 1 = y 1 ) par x 1 , y 2 , y 3 ( ( ¬ ( y 3 = y 4 ) par y 1 , y 2 , y 4 ) ( ¬ ( y 2 = y 4 ) par y 1 , y 4 , y 3 ) ) ) .

3.3. Terms and First-Order Expressions: Semantics

As mentioned in Section 1, the semantics of a Σ -term in a given Σ -structure should be a derived operation. To define those operations, we consider the evaluation of Σ -terms in Σ -structures: Let a Σ -structure A = ( A , P A , F A ) be given. Based on Definition 4 and employing the fixed semantics op A of all operation symbols in F, we can inductively extend any assignment a : X A of an S-set X of variables in the carrier A to an S-map a : T Σ ( X ) A such that
Preprints 148907 i005
This allows us to define the semantics t A of a Σ -term  t T Σ ( X ) s , s S in a Σ -structure A as the map t A : A X A s defined by t A ( a ) : = a s ( t ) for all a : X A . We call t A the derived operation in A represented by t. Each variable x T Σ ( X ) s represents a projection  x A : A X A s (compare Remark 2).
We can go even further: Any Σ -substitution t : Y T Σ ( X ) defines a derived operation  t A : A X A Y in A (in the opposite direction!) with
t A ( a ) : = t ; a , i . e . , ( t A ( a ) ) s ( y ) = ( t s ( y ) ) A ( a ) for   all a A X , s S , y Y s .
Since A 0 S is a singleton, the S-inclusion ! T Σ ( X ) : 0 S T Σ ( X ) represents a constant operation ! T Σ ( X ) A : A X A 0 S . Moreover, the canonical injective S-map η X : X T Σ ( X ) represents the identity S-map on A X :
η X A = i d A X : A X A X since η X = i d T Σ ( X ) .
Example 5
(Terms: Semantics). We discuss the semantics of the five non-trivial Σ-terms from Example 3 in the Σ-structure A defined in Example 2.
For the "derived constant" pl sp , one A : A 0 S A d a t e we have pl sp , one A ( ) = 20.10 . 1958 . pl x 1 , one A : A ( x 1 : d a t e ) A d a t e computes for each date d A d a t e the date of the next day. pl sp , x 1 A : A ( x 1 : n a t ) A d a t e provides for each natural number n A n a t the date of the n-th day after 19.10.1958, while pl born x 1 , x 2 A : A ( x 1 : p r s , x 2 : n a t ) A d a t e computes for each person p A p r s and each natural number n A n a t the date of the n-th day after the day of birth of person p and pl born x 1 , one A : A ( x 1 : p r s ) A d a t e provides the date of the next day after the day of birth of person p.
Our idea is, to consider first-order Σ -expressions as derived predicates with a fixed semantics in any Σ -structure A = ( A , P A , F A ) . To define the semantics of a Σ -expression X E x in A , we first have to define the semantics [ [ X ] ] A of the S-set X of variables in A . This is simply the set [ [ X ] ] A : = A X of all assignments of X in A. A Σ -expression E x is built upon Σ -terms, predicate symbols and substitutions. The semantics of Σ -terms and substitutions in A we do have already at hand, thus it remains to define the semantics [ [ E x ] ] X A of Σ -expressions X E x in A employing the fixed semantics p A of all predicate symbols in P. Relying on Definition 5, we will inductively define the family of sets [ [ E x ] ] X A [ [ X ] ] A of valid assignments (solutions) of X E x in A . For convenience, the interested reader may use instead of a [ [ E x ] ] X A , the more traditional notation a A Σ X E x to follow the definitions.
Given an S-inclusion X Y , we say that an assignment b : Y A is an expansion of an assignment a : X A to Y if, and only if, i n X , Y ; b = a .
Preprints 148907 i006
Definition 6
(Expressions: Semantics). The semantics of Σ-expressions in an arbitrary, but fixed, Σ-structure A = ( A , P A , F A ) is defined inductively:
  • Atomic expressions:
    (a)
    Equation: a [ [ t 1 = t 2 ] ] X A iff t 1 A ( a ) = t 2 A ( a ) .
    (b)
    Relational Atom: a [ [ p syn ( t ) ] ] X A iff t A ( a ) p A .
  • Everything: [ [ ] ] X A : = [ [ X ] ] A = A X
  • Void: [ [ ] ] X A : =
  • Conjunction: [ [ ( E x 1 E x 2 ) ] ] X A : = [ [ E x 1 ] ] X A [ [ E x 2 ] ] X A
  • Disjunction: [ [ ( E x 1 E x 2 ) ] ] X A : = [ [ E x 1 ] ] X A [ [ E x 2 ] ] X A
  • Implication: a [ [ E x 1 E x 2 ] ] X A iff a [ [ E x 2 ] ] X A whenever a [ [ E x 1 ] ] X A
  • Negation: [ [ ¬ E x ] ] X A : = A X [ [ E x ] ] X A
  • Existential quantification: a [ [ ( syn ( Y X ) : E x ) ] ] X A iff there exists an expansion b : Y A of a : X A to Y such that b [ [ E x ] ] Y A .
    Universal quantification: a [ [ ( syn ( Y X ) : E x ) ] ] X A iff for all expansions b : Y A of a : X A to Y we have b [ [ E x ] ] Y A .
Remark 8
(Expressions: Semantics). As mentioned in Remark 5, every predicate symbol p P is reborn as the Σ-expression a r ( p ) p syn ( η a r ( p ) ) with η a r ( p ) : a r ( p ) T Σ ( a r ( p ) ) . Definition 6 and Equation (5) ensure that also their semantics coincides [ [ p syn ( η a r ( p ) ) ] ] a r ( p ) A = p A .
The universal quantification ( syn ( Y X ) : E x ) is trivially valid for a if there is no expansion of a to Y at all, while the existential quantification ( syn ( Y X ) : E x ) is not valid, in this case.
Two expressions X E x 1 and X E x 2 aresemantical equivalent, X E x 1 E x 2 in symbols, if, and only if, [ [ E x 2 ] ] X A = [ [ E x 2 ] ] X A for all Σ-structures A . Definition 6 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 it already at some places in Example 4.
Remark 9
(Closed expressions: Semantics). We consider a closed expression 0 S E x (see Remark 7). [ [ 0 S ] ] A = A 0 S is a singleton with the initial morphism ! A : 0 S A as the only element. In such a way, we have either [ [ E x ] ] 0 S A = [ [ ] ] 0 S A = { ! A } , i.e., ! A A Σ 0 S E x , or [ [ E x ] ] 0 S A = [ [ ] ] 0 S A = , i.e., ! A Σ A 0 S E x .
Example 6
(Expressions: Semantics). We consider the sample Σ-structure A in Example 2 and the derived predicates in Example 4.
For the closed Σ-expression bfact we do have [ [ bfact ] ] 0 S A = { ! A } , i.e., ! A A Σ 0 S bfact . Note, that this is only the case since par A A a r ( par ) is defined in such a way that ( p 1 , p 2 , p 3 ) par A means that p 1 is the child of p 2 and p 3 .
The semantics [ [ nbf ] ] ( x 1 , x 2 : d a t e ) A of the derived predicate nbf in A coincides indeed with the semantics bef A of the basic predicate bef in A . [ [ sbl ] ] ( x 1 : p r s ) A gives us all the knowledge about "being a sibling of someone", that can be extracted from the information in A , and [ [ hst ] ] ( x 1 : p r s ) A the corresponding knowledge about "being a half-brother of someone". Remember, that there is no information in par A about the parents of a person, if one of the parents is born before 01.01.1900 or outside Europe.

4. Change of Base

In the last section we introduced and discussed basic concepts, structures and constructions connected to a single many-sorted first-order signature. In this section, we investigate how these concepts, structures and constructions are related across different signatures.

4.1. Maps Between Sets of Sort Symbols

By Sort we denote the full subcategory of Set with objects all finite subsets of N s o r t and morphisms all maps between those finite sets of sort symbols.
According to Section 2, we do have for every S | Sort | the category Set S of S-sets, its subcategory Set d S of disjoint S-sets and the category Set / S of S-typed sets at hand.
For any map φ : S S we obtain a (reduct) functor R φ : Set S Set S defined by R φ ( B ) : = ( B φ ( s ) s S ) for all S -sets B = ( B s s S ) and R φ ( f ) : = ( f φ ( s ) s S ) for all S -maps f = ( f s : A s B s s S ) : A B . We can consider the sets S, S as discrete categories, thus R φ is simply defined by precomposing the functors A , B : S Set and the natural transformation f : A B with the functor φ . In such a way, the functoriality of R φ is ensured by the right equation in (2). In addition, the left equation in (1) entails that the assignments φ R φ establish a functor R : Sort o p CAT .
Any fixed choice of finite sums in Set allows us to define a functor S φ : Set S Set S with S φ ( A ) : = { { A s φ ( s ) = s } s S } for all S-sets A and
S φ ( f ) : = { f s φ ( s ) = s } : { A s φ ( s ) = s } { B s φ ( s ) = s } s S
for all S-maps f = ( f s : A s B s s S ) : A B . S φ becomes left adjoint to R φ .
The crucial technical trick is, that we can choose the sums in Set to be the union for finite families of disjoint sets, thus we have S φ ( A ) s : = { A s φ ( s ) = s } for all disjoint S-sets A and all s S . Keep in mind that S φ ( A ) s = if there is no s S with φ ( s ) = s , i.e., if s S φ ( S ) . This "union trick" ensures two essential technical prerequisites:
  • The functor S φ : Set S Set S restricts to a functor S φ d : Set d S Set d S (mimicking the functor ( _ ; φ ) : Set / S Set / S ).
  • For families of non-disjoint sets the chosen finite sums will be, in general, not associative on the nose, thus the assignments S Set S and φ S φ do not define a functor but only a pseudo functor from Sort into CAT .
  • Union of sets is, however, associative on the nose, thus the assignments S Set d S and φ S φ d define a functor S d : Sort CAT .
Note, R φ : Set S Set S is a "proper reduct functor" only for injective φ and restricts then also to a functor from Set d S to Set d S . For non-injective φ : S S the functor R φ produces, however, identical copies of some component sets and component maps, respectively, and restricts therefore not to a functor from Set d S to Set d S .
The functors R φ : Set S Set S are later utilized to translate structures while the functors S φ d : Set d S Set d S will enable us to translate syntactic entities, like terms and expressions, in the opposite direction. The adjunctions S φ R φ : Set S Set S pave the way for proving satisfaction conditions. To facilitate these proofs, we use Lawvere’s characterization of adjunctions by means of comma categories [21,22].
S φ : Set S Set S left adjoint to R φ : Set S Set S means nothing but that there exists an isomorphism b φ : ( S φ Set S ) ( Set S R φ ) between comma categories such that the following triangle of functors commutes.
Preprints 148907 i007
More precisely, we will need a one-to-one correspondence between S-sorted variable assignments and S -sorted variable assigments. Families of sets of variables are disjoint while carriers of structures are not. Therefore, we will later need the following restriction of b φ to subcategories of ( S φ Set S ) and ( Set S R φ ) , constructed by means of the inclusion functors E S : Set d S Set S and E S : Set d S Set S .
Preprints 148907 i008
The objects in ( S φ d ; E S Set S ) are all triples ( X , a , A ) of a disjoint S-set X, an S -set A and an S -map a : S φ d ( X ) A . The morphisms ( μ , f ) : ( X , a , A ) ( Y , b , B ) in ( S φ d ; E S Set S ) are given by an S-map μ : X Y and an S -map f : A B such that a ; f = S φ d ( μ ) ; b (see the left diagram below). Π L is the obvious projection.
Preprints 148907 i009
The objects in ( E S R φ ) are all triples ( X , a , A ) of a disjoint S-set X, an S -set A and an S-map a : X R φ ( A ) . The morphisms ( μ , f ) : ( X , a , A ) ( Y , b , B ) in ( E S R φ ) are given by an S-map μ : X Y and an S -map f : A B such that a ; R φ ( f ) = μ ; b (see the right diagram above). Π R is the obvious projection.
The commutativity of the triangle of functors in (6) ensures that the isomorphism b φ restricts to a bijective map
b φ : A S φ d ( X ) R φ ( A ) X for   all   disjoint   S - sets   X and   all S - sets A .
These canonical bijections appear, at least implicitly, in all proofs of the satisfaction condition for (fragments of) first-order logic (see [17], for example) and are called "corresponding assignments" in [23]. Moreover, we get
b φ ; ( _ ; R φ ( f ) ) = ( _ ; f ) ; b φ for   all   disjoint   S - set   X and   any S map f : A B .
Preprints 148907 i010
This follows immediately from the commutativity in (6) and the functoriality of S φ d :
Preprints 148907 i011
Since the b φ are isomorphisms, we also do have the equivalent statement:
( _ ; R φ ( f ) ) ; b φ 1 = b φ 1 ; ( _ ; f ) f o r a n y d i s j o i n t S s e t X a n d a n y S m a p f : A B .
Symmetrically, it follows from the commutativity in (6) and the functoriality of R φ :
b φ ; ( μ ; _ ) = ( S φ d ( μ ) ; _ ) ; b φ f o r a n y d i s j o i n t S m a p μ : X Y a n d a n y S s e t A .
Preprints 148907 i012
Remark 10
(Pseudo Functors). The original concept ofinstitution[16,17] is based on the optimistic prerequisite that as well the reduction of models as the translation of syntax is functorial on the nose. As indicated in this section, we are able to meet this prerequisite, in case of first-order logic, if we work with S-indexed sets.
It is maybe worth to mention that we could not meet this prerequisite if we utilize S-typed sets instead. A functorial translation of syntax we would get for free by simple post-composition, i.e., by the functors ( _ ; φ ) : Set / S Set / S . And, for any fixed choice of pullbacks in Set we would get, for all φ, a functor from Set / S to Set / S right adjoint to ( _ ; φ ) . However, for any fixed choice of pullbacks in Set the composition of chosen pullbacks will be not functorial on the nose thus reduction of models would as well not be functorial but only pseudo-functorial!
We have been facing this problem in [24] and guess that there are many situations where we are able to ensure functoriality on the nose for either "reduction of models" or "translation of syntax" while the other mechanism becomes pseudo-functorial only.
While indexed functors correspond to split (op)fibrations, indexed pseudo functors are just equivalent to (op)fibrations. It is maybe worth, to develop and explore, one day, a fibred counterpart of institutions simply based on (op)fibrations, to handle the obstacle of pseudo functors? One could, for example, relax the concept ofsplit fibred framesin [25] to a concept offibred frames. For such a project we have to bear in mind that there are actually four possibilities to transform an indexed category into a split (op)fibration not only the standard Grothendieck construction usually presented in the literature [8].

4.2. Signature Morphisms

In this subsection we introduce signature morphisms and define as well the reduction of structures as the translation of syntactic entities induced by signature morphisms.
Definition 7
(Signature Morphisms). Asignature morphism  φ = ( φ s t , φ r l , φ f n ) : Σ Σ between signatures Σ = ( S , P , F , a r , i n , o u t ) and Σ = ( S , P , F , a r , i n , o u t ) consists of
  • a map φ s t : S S ,
  • a map φ r l : P P such that a r ( φ r l ( p ) ) = S φ s t d ( a r ( p ) ) for all p P , and
  • a map φ f n : F F such that i n ( φ f n ( op ) ) = S φ s t d ( i n ( op ) ) and o u t ( φ f n ( op ) ) = S φ s t d ( o u t ( op ) ) for all op F .
The composition φ ; ψ : Σ Σ of signature morphisms φ : Σ Σ and ψ : Σ Σ is defined component-wise:
( φ ; ψ ) s t : = φ s t ; ψ s t , ( φ ; ψ ) r l : = φ r l ; ψ r l a n d ( φ ; ψ ) f n : = φ f n ; ψ f n .
The functoriality of the assignments φ s t S φ s t d ensures that φ ; ψ becomes indeed a signature morphism φ ; ψ : Σ Σ .
Sig denotes the category of all many-sorted signatures and signature morphisms. By construction, we do have the obvious projection functor Π s t : Sig Sort which is a split opfibration.

4.2.1. Reducts

Signature morphisms are defined in a way that we can construct corresponding reducts of structures by means of the reduct functors R φ : Set S Set S in Section 4.1 and the bijections in (7).
Definition 8
(Structure Reduct). Given a signature morphism φ : Σ Σ the φ -reductof a Σ -structure A = ( A , P A , F A ) is a Σ-structure A φ = ( A φ , P A φ , F A φ ) with
  • carrier A φ : = R φ s t ( A ) = ( A φ s t ( s ) s S ) ,
  • p A φ : = b φ s t ( φ r l ( p ) A ) R φ s t ( A ) a r ( p ) for all predicate symbols p P , andPreprints 148907 i013
  • op A φ : = b φ s t 1 ; φ f n ( op ) A ; b φ s t for all operation symbols op F .Preprints 148907 i014
For later we should keep in mind that b φ s t : φ r l ( p ) A p A φ is a bijection by construction and that b φ s t ; op A φ = φ f n ( op ) A ; b φ s t by definition of op A φ .
Reducts of homomorphisms are also given by the functors R φ s t : Set S Set S in Section 4.1, i.e., by reducts of S -maps, while the homomorphism property of the reducts is ensured by the equations in (8) and (9).
Definition 9
(Homomorphism Reduct). Given a signature morphism φ : Σ Σ the φ -reductof a Σ -homomorphism ς : A B between two Σ -structures A ’ and B ’ is the Σ-homomorphism ς φ : A φ B φ given by the S-map ς φ : = R φ s t ( ς ) = ( ς φ s t ( s ) s S ) .
Notation: As one can see, the subscript notations φ s t , φ r l and φ f n can become quite heavy. When there is no danger of ambiguity, we may just drop the subscripts from now on.
For any signature morphism φ : Σ Σ the functoriality of R φ : Set S Set S entails that the assignments A A φ and ( ς : A B ) ( ς φ : A φ B φ ) define a functor Str ( φ ) = ( _ φ ) : Str ( Σ ) Str ( Σ ) .
On the global level the functoriality of R : Sort o p CAT entails for any signature morphisms φ : Σ Σ and ψ : Σ Σ that ( A ψ ) φ = A φ ; ψ for all Σ -structures A and ( ς ψ ) φ = ς φ ; ψ for all Σ -homomorphisms ς : A B . The fact that adjunctions compose ensures, in such a way, that the functor R : Sort o p CAT lifts up to a functor Str : Sig o p CAT given by the assignments Σ Str ( Σ ) and φ Str ( φ ) .

4.2.2. Translation of Terms

For each signature Σ = ( S , P , F , a r , i n , o u t ) the assignments X T Σ ( X ) define a map from V a r S into | Set d S | . For convenience we can consider V a r S as a discrete subcategory of Set d S and use the functor notation T Σ : V a r S Set d S for this map.
For any signature morphism φ : Σ Σ the corresponding translation of terms is given by a natural transformation φ ¯ : T Σ ; S φ d S φ d ; T Σ : V a r S Set d S .
Preprints 148907 i015
For each S-set X of variables in V a r S the S -map φ ¯ X : S φ d ( T Σ ( X ) ) T Σ ( S φ d ( X ) ) , is simply the inclusion map of the empty set S φ d ( T Σ ( X ) ) s = into T Σ ( S φ d ( X ) ) s for all s S φ ( S ) . Relying on the inductive definition of T Σ ( X ) in Definition 4 and the definition of S φ d by union, the family of maps φ ¯ X , s : S φ d ( T Σ ( X ) ) s T Σ ( S φ d ( X ) ) s for all s φ ( S ) is inductively defined as follows:
Variables: 
φ ¯ X , φ ( s ) ( x ) : = x if x T Σ ( X ) s S φ d ( T Σ ( X ) ) φ ( s ) , s S ;
Constants: 
φ ¯ X , φ ( s r t ( c ) ) ( c ) : = φ ( c ) if c T Σ ( X ) s r t ( c )   S φ d ( T Σ ( X ) ) φ ( s r t ( c ) ) , c F , i n ( c ) = 0 S ;
Operations: 
φ ¯ X , φ ( s r t ( op ) ) ( op t 1 , , t n ) : = φ ( op ) φ ¯ X , φ ( s 1 ) ( t 1 ) , , φ ¯ X , φ ( s n ) ( t n ) if op t 1 , , t n T Σ ( X ) s r t ( op ) S φ d ( T Σ ( X ) ) φ ( s r t ( op ) ) , op F , n = | i n ( op ) | 1 .
The conditions for signature morphisms ensure that the left-hand sides in the three defining equations above are indeed Σ -terms over the S -set S φ d ( X ) of variables. Note further, that φ ¯ X , φ ( s 1 ) ( t 1 ) , , φ ¯ X , φ ( s n ) ( t n ) = syn ( S φ d ( t ) ; φ ¯ X ) for the assignment t = ( t 1 , , t n ) in T Σ ( X ) i n ( op ) (see Remark 4).
Remark 11
(Induction). Be aware, that we are not defining φ ¯ X : S φ d ( T Σ ( X ) ) T Σ ( S φ d ( X ) ) by induction over T Σ ( X ) but by induction over S φ d ( T Σ ( X ) ) ! This is justified by the observation that the disjointedness of T Σ ( X ) ensures that the meta-level (!) inductive generation process of T Σ ( X ) as a set T Σ ( X ) of strings of symbols is still the same for S φ d ( T Σ ( X ) ) since S φ d ( T Σ ( X ) ) = T Σ ( X ) . Only the "typing" of the strings is changed (see Remark 3)!
Due to the inductive definition of terms and the corresponding inductive definition of term translation, one can inductively prove the following lemma relying on the facts that S d : Sort CAT is a functor and that composition of signature morphisms is defined componentwise.
Lemma 1
(Composition of Term Translations). For any signature morphisms φ : Σ Σ , ψ : Σ Σ and the corresponding translations of terms φ ¯ : T Σ ; S φ d S φ d ; T Σ : V a r S Set d S , ψ ¯ : T Σ ; S ψ d S ψ d ; T Σ : V a r S Set d S we do have:
φ ; ψ ¯ = ( φ ¯ S ψ d ) ; ( S φ d ψ ¯ ) : T Σ ; S φ ; ψ d S φ ; ψ d ; T Σ : V a r S Set d S .
Preprints 148907 i016
Remark 12
(Typing of Terms). This remark is triggered by a discussion at Bergen Language Design Laboratory (BLDL) in 2023. According to Definition 4, there is no "type information" encoded in terms. That is, the type (sort) of a term and its subterms has to be deduced from the types (sorts) of the variables and the input and output arities of the involved operation symbols declared in the corresponding signature Σ. Note, that expressions involving quantification carry, in contrast, type information due to Definition 5 and Remark 1.
Let us consider signature morphisms only relaxing the type restrictions for predicate and operation symbols, i.e., signature morphisms φ = ( φ s t , i d P , i d F ) : Σ Σ between signatures Σ = ( S , P , F , a r , i n , o u t ) and Σ = ( S , P , F , a r , i n , o u t ) with φ s t : S S a non-injective but surjective map. In this case, the natural transformation φ ¯ : T Σ ; S φ d S φ d ; T Σ : V a r S Set d S is not a real translation of terms but simply a family of inclusion S -maps φ ¯ X : S φ d ( T Σ ( X ) ) T Σ ( S φ d ( X ) ) with X an S-set of variables.
In other words, for a given Σ -term t there may be different signatures Σ and signature morphisms φ = ( φ s t , i d P , i d F ) : Σ Σ such that t is also a Σ-term!

4.2.3. Translation of Expressions

For each signature Σ = ( S , P , F , a r , i n , o u t ) we inductively defined in Definition 5 a map from V a r S into | Set | . For convenience we can consider V a r S as a discrete subcategory of Set d S and use the functor notation F E Σ : V a r S Set for this map.
Relying on the translation of terms, defined in Section 4.2.2, the translation of expressions for a signature morphism φ : Σ Σ is given by a natural transformation φ ¯ : F E Σ S φ d ; F E Σ : V a r S Set . Be aware, that we use for both kinds of translation the same notation.
Preprints 148907 i017
The family of maps φ ¯ X : F E Σ ( X ) F E Σ ( S φ d ( X ) ) with X in V a r S is defined inductively and in parallel by the following assignments:
  • Atomic expressions:
    (a)
    Equation: X ( t 1 = t 2 ) S φ d ( X ) ( φ ¯ X , φ ( s ) ( t 1 ) = φ ¯ X , φ ( s ) ( t 2 ) ) for any s S and any t 1 , t 2 T Σ ( X ) s .
    (b)
    Relational Atom: X p syn ( t ) S φ d ( X ) φ ( p ) syn ( S φ d ( t ) ; φ ¯ X ) for any p P and any S-map t : a r ( p ) T Σ ( X ) .
  • Everything: X S φ d ( X )
  • Void: X S φ d ( X )
  • Conjunction: X ( E x 1 E x 2 ) S φ d ( X ) ( φ ¯ X ( E x 1 ) φ ¯ X ( E x 2 ) )
  • Disjunction: X ( E x 1 E x 2 ) S φ d ( X ) ( φ ¯ X ( E x 1 ) φ ¯ X ( E x 2 ) )
  • Implication: X ( E x 1 E x 2 ) S φ d ( X ) ( φ ¯ X ( E x 1 ) φ ¯ X ( E x 2 ) )
  • Negation: X ¬ E x S φ d ( X ) ¬ φ ¯ X ( E x )
  • Quantification: X ( syn ( Y X ) : E x ) S φ d ( X ) ( syn ( S φ d ( Y ) S φ d ( X ) ) : φ ¯ Y ( E x ) ) and X ( syn ( Y X ) : E x ) S φ d ( X ) ( syn ( S φ d ( Y ) S φ d ( X ) ) : φ ¯ Y ( E x ) ) for any expression Y E x and any proper S-inclusion X Y .
For the case Quantification we have to bear in mind that X Y implies S φ d ( X ) S φ d ( Y ) and S φ d ( Y X ) = S φ d ( Y ) S φ d ( X ) . By means of Lemma 1 one can inductively prove the following lemma relying on the facts that S d : Sort CAT is a functor and that composition of signature morphisms is defined componentwise.
Lemma 2
(Composition of Expression Translations). For any signature morphisms φ : Σ Σ , ψ : Σ Σ and the corresponding translations of expressions φ ¯ : F E Σ S φ d ; F E Σ : V a r S Set and ψ ¯ : F E Σ S ψ d ; F E Σ : V a r S Set we do have:
φ ; ψ ¯ = φ ¯ ; ( S φ d ψ ¯ ) : F E Σ S φ ; ψ d ; F E Σ : V a r S Set .
Preprints 148907 i018

4.2.4. Translation of Syntax vs. Reduct of Structures

For any signature morphism φ : Σ Σ we do have now, on the semantic side, a corresponding reduct functor Str ( φ ) = ( _ φ ) : Str ( Σ ) Str ( Σ ) and, on the syntactic side, a corresponding translation φ ¯ : T Σ ; S φ d S φ d ; T Σ : V a r S Set d S of terms as well as a corresponding translation φ ¯ : F E Σ S φ d ; F E Σ : V a r S Set of expressions in the opposite direction.
The inductive definitions of terms and expressions and their syntactic translations ensure that the compatibility between the semantics of the basic syntactic entities operation symbol, predicate symbol and their syntactic translations, as described in Definition 8, lifts up to the derived syntactic entities term and expression.
For a given Σ -structure A = ( A , P A , F A ) we consider its φ -reduct, i.e., the Σ -structure A φ = ( R φ ( A ) , P A φ , F A φ ) as defined in Definition 8. First, we discuss the compatibility between the semantics of terms and their syntactic translation. According to (4), any Σ -substitution declaration t : Y T Σ ( X ) defines a derived operation t A φ : R φ ( A ) X R φ ( A ) Y in A φ . By means of φ ¯ : T Σ ; S φ d S φ d ; T Σ we can translate the Σ -substitution declaration t : Y T Σ ( X ) into a Σ -substitution declaration S φ d ( t ) ; φ ¯ X : S φ d ( Y ) T Σ ( S φ d ( X ) ) and obtain a corresponding derived operation ( S φ d ( t ) ; φ ¯ X ) A : A S φ d ( X ) A S φ d ( Y ) in A . The bijections in (7) establish a correspondence between the two derived operations assuring that t A φ can be considered as the φ -reduct of ( S φ d ( t ) ; φ ¯ X ) A .
Proposition 1
(Derived Operation Reduct). For any signature morphism φ : Σ Σ , any Σ -structure A = ( A , P A , F A ) and any Σ-substitution declaration t : Y T Σ ( X ) we have
b φ ; t A φ = ( S φ d ( t ) ; φ ¯ X ) A ; b φ .
Preprints 148907 i019
Second, we discuss the compatibility between the semantics of expressions and their syntactic translation. For any Σ -expression E x on an S-set X of variables its semantics in the reduct A φ is given by the derived predicate [ [ E x ] ] X A φ R φ ( A ) X . By means of φ ¯ : F E Σ S φ d ; F E Σ we can translate E x into a Σ -expression φ ¯ X ( E x ) on the S -set S φ d ( X ) of variables and obtain a corresponding derived predicate [ [ φ ¯ X ( E x ) ] ] S φ d ( X ) A A S φ d ( X ) in A . The bijections in (7) establish a correspondence between the two derived predicates assuring that [ [ E x ] ] X A φ can be considered as the φ -reduct of [ [ φ ¯ X ( E x ) ] ] S φ d ( X ) A .
Proposition 2
(Derived Predicate Reduct). For any signature morphism φ : Σ Σ , any Σ -structure A = ( A , P A , F A ) and any Σ-expression E x on an S-set X of variables the bijection b φ : A S φ d ( X ) R φ ( A ) X restricts to a bijection b φ : [ [ φ ¯ X ( E x ) ] ] S φ d ( X ) A [ [ E x ] ] X A φ .Preprints 148907 i020
If we use the more traditional notation a A Σ X E x to indicate that a [ [ E x ] ] X A for an assignment a : X A in a Σ -structure A , we get the following equivalent formulation of the statement in Proposition 2: For any signature morphism φ : Σ Σ , any Σ -structure A = ( A , P A , F A ) , any Σ -expression E x on an S-set X of variables and any assignment a : S φ d ( X ) A and thus b φ ( a ) : X R φ ( A ) it holds that
b φ ( a ) A φ Σ X E x i f f a A Σ S φ d ( X ) φ ¯ X ( E x ) .
Following the tradition in abstract model theory, we may call this the satisfaction condition for expressions and assignments.

4.2.5. Traditional Institution of First-Order Logic

We obtain the traditional institution FOL of first-order logic, as presented in [16,17] for example, if we restrain our results to empty sets of variables only.
We start with the category Sig of all many-sorted signatures and signature morphisms. The "model functor", in the sense of institutions, is the functor Str : Sig o p CAT given by the assignments Σ Str ( Σ ) and φ Str ( φ ) = ( _ φ ) .
For each signature Σ = ( S , P , F , a r , i n , o u t ) we consider only the empty S-set 0 S of variables. The Σ -sentences are exactly all closed Σ -expressions 0 S E x (see Remark 7). For any signature morphism φ : Σ Σ the corresponding translation of sentences is given by the map φ ¯ 0 S : F E Σ ( 0 S ) F E Σ ( 0 S ) . Keep in mind that S φ d ( 0 S ) = 0 S . Lemma 2 ensures that the assignments Σ F E Σ ( 0 S ) and ( φ : Σ Σ ) ( φ ¯ 0 S : F E Σ ( 0 S ) F E Σ ( 0 S ) ) define a sentence functor cFE : Sig Set in the sense of institutions.
We say that a closed Σ -expression 0 S E x is satisfied in a Σ -structure A , A Σ 0 S E x in symbols if, and only if, ! A A Σ 0 S E x , i.e., [ [ E x ] ] 0 S A = { ! A } (compare Remark 9).
For any signature morphism φ : Σ Σ and any Σ -structure A = ( A , P A , F A ) we do have S φ d ( 0 S ) = 0 S and b φ ( ! A ) = ! A φ = ! R φ ( A ) : 0 S R φ ( A ) thus (12) specializes for X = 0 S to the statement
! A φ A φ Σ 0 S E x i f f ! A A Σ 0 S φ ¯ 0 S ( E x ) .
This means, that the satisfaction condition holds indeed in FOL = ( Sig , cFE , Str , ) .
A crucial fact is that closed expressions, their translations and their semantics are constructed via a long detour through the realm of "open formulas" thus the proof of the satisfaction condition in (13), for example, requires to prove (at least implicitly) general statements like in (12). One motivation to develop Logics of Statements in Context was to establish a "conceptual and technological space" where all the general results concerning "open formulas" and variable assignments can be formalized, developed and presented in their full extent and beauty. The anticipated "conceptual and technological space" is also meant to become the home for deduction since deduction of first-order formulas takes essentially place in the realm of "open formulas".
It is well-known that empty sorts potentially cause the problem that deduction rules for one-sorted first-order logic are, in general, not sound for many-sorted deduction [17,19]. As a matter of fact, the simple concept of expression turns out to be not sophisticated enough to describe, formalize and analyze first-order deduction and the problems concerning many-sorted first-order deduction. In Logics of Statements in Context we introduce therefore a new conceptual layer of contexts, between the layer of sets of variables and the layer of carrier sets, and we are lifting up the concept of expression to the more flexible concept of "statement in context".

5. First-Order Logics of Statements in Context

5.1. Institutions of Statements

In this subsection we construct for each signature Σ = ( S , P , F , a r , i n , o u t ) an institution of statements FL Σ = ( Cxt S , Stm Σ , Int Σ , Σ ) combining the constructions of Institutions of Statements and of Institutions of Equations in [1]. Compared to the general case in [1], we consider only the variant with the full spectrum F E Σ of first-order expressions and with the whole category Str ( Σ ) of Σ -structures as semantics Sem ( Σ ) . Therefore, we only need a simplified version of the construction of institution of statements as visualized in Figure 1.
The "base category" and the "category of (potential) carriers" are simply the category of S-sets: Base S = Carr S : = Set S . At this stage, we do not consider the translation of expressions along substitutions t : X T Σ ( Y ) and thus not along inclusions X Y either. Those translations are discussed in Section 6. Therefore, we choose as category Var S of "variable declarations" simply the set V a r S considered as a discrete category. Str ( Σ ) is the category of all Σ -structures, as defined in Section 3.1, and F E Σ : V a r S Set is the V a r S -indexed family of sets of first-order Σ -expressions, as defined in Definition 5.
It remains to define the "category of contexts" Cxt S . In traditional First-Order Logic contexts are not considered at all thus we could choose a cautious step and define Cxt S as the extension of V a r S by all inclusions between S-sets of variables. Those inclusions are, at least, implicitly present in traditional First-Order Logic! We drop this step for three reasons. First, we would just blow up the paper by "copying and paste" without providing new theoretical substance. Second, it would be too annoying always to underline and discuss why the same S-set X of variables plays, methodological seen, two different roles depending on if we consider X as an object in Var S or as an object in Cxt S , respectively. The methodological distinction between these two roles becomes more naturally evident if we consider arbitrary contexts. Third, it is convenient to consider arbitrary contexts from the very beginning to be prepared for the discussion of "diagrams" [2,3,17] in Section 7.
In Section 4 we learned that the translation of syntactic entities along signature morphisms becomes only functorial if the definition of syntactic entities is based on disjoint S- sets. Therefore, we define the category of contexts to be the category of disjoint S-sets: Cxt S : = Set d S . Contexts are the abstract signatures in an institution of statements. Keep in mind that Var S Cxt S Base S by definition.
Since the interplay of predicates and equations is encapsulated in the construction of F E Σ , the general construction of Institutions of Statements in [1] can easily be adapted for first-order logic with predicates and operations. To make the paper sufficiently self-contained and accessible, we give a concise presentation of the adapted definitions, constructions and results.

5.1.1. Institutions of Statements: Sentence and Model Functor

Statements in context are the sentences in an institutions of statements.
Definition 10
(Statement). A Σ -statement ( X , E x , γ ) in a context K | Cxt S | is given by a Σ-expression E x in F E Σ ( X ) and abinding S-map γ : X K . ( X , E x , γ ) is calledatomicif E x is an atomic expression, i.e., an Equation or a Relational Atom.
By S t m Σ ( K ) , we denote the set of all Σ-statements in K and by Υ K : S t m Σ ( K ) V a r S the obvious projection map.
Remark 13
(General statements and closed formulas). For any closed Σ-expression 0 S E x (see Remarks 7 and 9) there is a unique initial morphism γ = ! K : 0 S K ; thus, we have ( 0 S , E x , ! K ) S t m Σ ( K ) for any context K and all closed Σ-expressions 0 S E x in F E Σ ( 0 S ) . We call ( 0 S , E x , ! K ) ageneral statement in K.
From all the general statements ( 0 S , E x , ! K ) sharing the same closed expression 0 S E x , only the general statement ( 0 S , E x , i d 0 S ) in the empty context 0 S is the proper formal counterpart of traditional closed formulas in institutions of statements in context!
Example 7
(Context and Statement). For the sample signature Σ in Example 1, we define a context K: K p r s : = { A n n a , M i c h a e l , S t i n a , D o r a , H e i n z , G a b i , U w e } is chosen to be a finite set ofsymbolic literalsin the sense of PROLOG. We distinguish clearly between sets of variables, carriers of structures and contexts, but allow that the same entity can play different roles (see also Section 7.2). In this spirit, we choose K d a t a to be the set of all dates from 01.01.2000 to 31.12.2020 and K n a t : = { n n N , 1 n 600 } .
In examples we adapt the encoding of assignments from Remark 2 and use for statements ( X , E x , γ ) the shorthand notation E x ( γ 1 , , γ n ) accepting the possible loss that we can not reconstruct from E x ( γ 1 , , γ n ) the whole S-set X of variables. Instead of expressions E x , we will also use auxiliary names for expressions as introduced in Example 4, for example. If E x is a "reborn predicate symbol" (see Remark 5) we will use the traditional notation p ( γ 1 , , γ n ) instead of p v 1 a r ( p ) , , v n a r ( p ) ( γ 1 , , γ n ) .
( born x 1 = x 2 ) ( U w e , 19.10 . 1958 ) is not a legal Σ-statement in context K simply because 19.10 . 1958 is not contained in K d a t e . ( born x 1 = sp ) ( U w e ) , however, is an atomic legal Σ-statement in K. Attention, we are not using a notation like ( born U w e = sp ) , instead of ( born x 1 = sp ) ( U w e ) , since U w e is neither a variable nor a constant symbol, i.e., ( born U w e = sp ) is not a Σ-expression. To say it differently: In ( born U w e = sp ) syntax (predicate symbols, expressions, auxiliary names) and semantics (assignments) are not separated.
par ( U w e , H e i n z , D o r a ) , par ( A n n a , U w e , G a b i ) , par ( M i c h a e l , U w e , G a b i ) are atomic Σ-statements in K and from the last two Σ-statements we could deduce sbl ( A n n a ) and sbl ( M i c h a e l ) .
sbl ( G a b i ) , hst ( S t i n a ) , sbl ( U w e ) , ( born x 1 = pl born x 2 , x 3 ) ( M i c h a e l , A n n a , 600 ) and ( born x 1 = x 2 ) ( A n n a , 14.03 . 2009 ) are other Σ-statements in context K.
Any morphism μ : K G in Cxt S induces a map Stm Σ ( μ ) : S t m Σ ( K ) S t m Σ ( G ) defined by simple post-composition for all statements ( X , E x , γ ) in K:
Preprints 148907 i021
It is easy to show that the assignments K S t m Σ ( K ) and μ Stm Σ ( μ ) provide a functor Stm Σ : Cxt S Set . This is the sentence functor of the institution FL Σ .
Interpretations of contexts are the models in an institution of statements.
Definition 11
(Context interpretations). A Σ -interpretation ( ι , A ) of a context  K | Cxt S | is given by a Σ-structure A = ( A , P A , F A ) in Str ( Σ ) and an S-map ι : K A .
A morphism ς : ( ι , A ) ( ϑ , B ) between Σ-interpretations of K is given by a Σ-homomorphism ς : A B such that ι ; ς = ϑ for the underlying S-map ς : A B .Preprints 148907 i022
For any context K in Cxt S , we denote by Int Σ ( K ) the category of all Σ-interpretations of K and all morphisms between them and by Π K : Int Σ ( K ) Str ( Σ ) the obvious projection functor.
Remark 14
(Split Opfibration). It is easy to see that the functor Π K : Int Σ ( K ) Str ( Σ ) is a split opfibration with the opcartesian arrow ς : ( ι , A ) ( ι ; ς , B ) for a Σ-homomorphism ς : A B and an interpretation ( ι , A ) of context K in the Σ-structure A [8]. Be aware that all morphisms in Int Σ ( K ) are opcartesion arrows, that is, for any Σ-structure A , the correspondingfiber over  A , i.e., the subcategory of Int Σ ( K ) given by all interpretations of K in A and all context morphisms i d A : ( ι , A ) ( ι , A ) , is a discrete category representing the hom-set Set S ( K , A ) .
Note finally, that Π 0 S : Int Σ ( 0 S ) Str ( Σ ) is an isomorphism.
Any morphism μ : K G in Cxt S induces a functor Int Σ ( μ ) : Int Σ ( G ) Int Σ ( K ) defined by simple pre-composition for all Σ -interpretations ( ϑ , B ) of G:
Int Σ ( μ ) ( ϑ , B ) : = ( μ ; ϑ , B ) .
Preprints 148907 i023
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, thus we have
Int Σ ( μ ) ; Π K = Π G : Int Σ ( G ) Str ( Σ ) ( s e e t h e d i a g r a m a b o v e o n t h e r i g h t ) .
One can easily validate that the assignments K Int Σ ( K ) and μ Int Σ ( μ ) define a functor Int Σ : Cxt S o p CAT . This is the model functor of the institution FL Σ .

5.1.2. Institutions of Statements: Satisfaction Relation and Satisfaction Condition

The last two steps, in establishing an institution, are the definition of a satisfaction relations and the proof of the so-called satisfaction condition. The satisfaction relations are simply provided by the semantics of expressions, as described in Definition 6.
Definition 12
(Satisfaction Relation). For any context K | Cxt S | , any Σ-statement ( X , E x , γ ) in K and any Σ-interpretation ( ι , A ) of context K we define:
( ι , A ) K Σ ( X , E x , γ ) i f f γ ; ι A Σ X E x ( i . e . γ ; ι [ [ E x ] ] X A )
Preprints 148907 i024
Remark 15
(Validity of Closed Formulas). If X = K = 0 S , we do have for any Σ-structure A = ( A , P A , F A ) in Str ( Σ ) exactly one interpretation ( ! A , A ) thus for any closed formula ( 0 S , E x , i d 0 S ) (see Remark 13) ( ! A , A ) 0 S Σ ( 0 S , E x , i d 0 S ) means nothing but that the closed formula ( 0 S , E x , i d 0 S ) isvalid in A in the traditional sense.
Moreover, the validity of closed formulas is "semantically context independent" in the following sense: For any context K, any Σ-structure A , any Σ-interpretation ( ι , A ) of K in A and any closed expressions 0 S E x , we have due to the uniqueness if intitial morphisms:
( ι , A ) K Σ ( 0 S , E x , ! K ) i f f ! K ; ι = ! A = i d 0 S ; ! A [ [ E x ] ] 0 S A i f f ( ! A , A ) 0 S Σ ( 0 S , E x , i d 0 S )
Example 8
(Interpretation and Satisfaction). For the sample context K in Example 7 and the sample Σ-structure A in Example 2, we consider the "author intended interpretation" ( ι , A ) of K in A with the S-map ι : K A defined as follows: ι d a t e is the inclusion map from K d a t e into A d a t e , ι n a t the inclusion map from K n a t into A n a t = N + while ι p r s : K p r s A p r s assigns to each symbolic literal in K p r s the corresponding "real person" in A p r s from the family of the author. We discuss the satisfaction of the sample Σ-statements from Example 7 by ( ι , A ) .
( born x 1 = sp ) ( U w e ) is satisfied by ( ι , A ) since born A ( ι p r s ( U w e ) ) = 19.10 . 1958 and sp A ( ) = 19.10 . 1958 . The atomic Σ-statements par ( U w e , H e i n z , D o r a ) , par ( A n n a , U w e , G a b i ) and par ( M i c h a e l , U w e , G a b i ) are satisfied by ( ι , A ) since they reflect, due to the definition of par A , the "real life" family situation of the author. In such a way, the definition of Σ-expressions and their semantics, ensures that also the two Σ-statements sbl ( A n n a ) and sbl ( M i c h a e l ) are satisfied by ( ι , A ) , i.e., ι p r s ( A n n a ) , ι p r s ( M i c h a e l ) [ [ sbl ] ] ( x 1 : p r s ) A .
sbl ( G a b i ) is not satisfied by ( ι , A ) since the "real person" ι p r s ( G a b i ) is an only child. hst ( S t i n a ) is true in "real life", however, not satisfied by ( ι , A ) since the mother of the "real person" ι p r s ( S t i n a ) is born in Venezuela. sbl ( U w e ) is satisfied by ( ι , A ) even if the only sibling of the author is not represented by a symbolic literal in K p r s . ( born x 1 = x 2 ) ( A n n a , 14.03 . 2009 ) and ( born x 1 = pl born x 2 , x 3 ) ( M i c h a e l , A n n a , 600 ) are, finally, satisfied by ( ι , A ) since born A ( ι p r s ( A n n a ) ) = 14.03 . 2009 and born A ( ι p r s ( M i c h a e l ) ) = 04.11 . 2010 .
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 S , any Σ-statement ( X , E x , γ ) in context K and any interpretation ( ϑ , A ) of context G in a Σ-structure B , we have:
Int Σ ( μ ) ( ϑ , A ) K Σ ( X , E x , γ ) i f f ( ϑ , A ) G Σ Stm Σ ( μ ) ( X , E x , γ ) .
Preprints 148907 i025
Proof. 
Due to the definition of the functors Int Σ : Cxt S o p CAT and Stm Σ : Cxt S Set , we obtain the commutative diagram, above on the right, thus the satisfaction condition follows immediately from Definition 12 (Satisfaction Relation). □
Summarizing all definitions and results, we obtain for each signature Σ the Institution of Σ -Statements in Context  FL Σ = ( Cxt S , Stm Σ , Int Σ , Σ ) .
Remark 16
(Empty Sorts). The fact that the rules for unsorted first-order logic are not sound for many-sorted first-order logic is caused by the freedom that some (or even all) components A s of the carrier S-set A of a Σ-structure A can, in principle, be empty. This freedom is essential for applications of formal specifications as discussed, for example, in [26].
By introducing the conceptual level of contexts we are able to address and potentially deal with this issue. As said in the introduction, we will not present in this paper a comprehensive exposition of deduction but only discuss some aspects of deduction.
Deduction in Logics of Statements in Context means, in the first place, to deduce new statements in contexts from given statements in contexts by means of rules. The problem, caused by potentially empty sorts, can be identified by the observation that the equivalence in Remark 15 vanishes if there is no Σ-interpretation ( ι , A ) of the context K in the Σ-structure A at all.
A rule, stating that we can deduce from the validity of ( 0 S , E x , i d 0 S ) in the empty context 0 S the validity of ( 0 S , E x , ! K ) in any context K, will be always sound since ( 0 S , E x , ! K ) is simply the translation of ( 0 S , E x , i d 0 S ) along the context morphism ! K : 0 S K (see rule "Abstraction" in [19]). However, a rule stating that we can deduce from the validity of ( 0 S , E x , ! K ) in a certain context K the validity of ( 0 S , E x , i d 0 S ) in the empty context 0 S will be only sound if there is, at least, one interpretation ( ι : K A , A ) of context K in all Σ-structure A ! This requirement can be only fulfilled if T Σ ( 0 S ) s whenever K s for all s S (see rule "Concretion" in [19]).

5.2. The Indexed First-Order Logic of Statements in Context

5.2.1. Institution Comorphisms

For any signature morphism φ : Σ Σ between signatures Σ = ( S , P , F , a r , i n , o u t ) and Σ = ( S , P , F , a r , i n , o u t ) , as defined in Definition 7, we consider the institutions FL Σ = ( Cxt S , Stm Σ , Int Σ , Σ ) and FL Σ = ( Cxt S , Stm Σ , Int Σ , Σ ) as described in the last subsection. We will construct an institution comorphism  ( Φ φ , α φ , β φ ) : FL Σ FL Σ consisting of (see [17] or [27] for a general definition of institution comorphisms) Preprints 148907 i026
  • a functor Φ φ : Cxt S Cxt S ,
  • a natural transformation α φ : Stm Σ Φ φ ; Stm Σ , and
  • a natural transformation β φ : Φ φ o p ; Int Σ Int Σ
such that the following satisfaction condition for comorphisms holds:
β K φ ( ι , A ) K Σ ( X , E x , γ ) i f , a n d o n l y i f , ( ι , A ) Φ φ ( K ) Σ α K φ ( X , E x , γ )
for any context K | Cxt S | , any Σ -interpretation ( ι , A ) of Φ φ ( K ) | Cxt S | and any Σ -statement ( X , E x , γ ) in context K.
By definition we have Cxt S = Set d S and Cxt S = Set d S thus we can simply set
Φ φ : = S φ d : Set d S Set d S .
Note, that there is no right adjoint for Φ φ thus we can not equivalently describe the institution comorphism ( Φ φ , α φ , β φ ) : FL Σ FL Σ by means of an institution morphism!

Translation of Statements along Signature Morphisms

For any context K in Cxt S = Set d S we define the map α K φ : S t m Σ ( K ) S t m Σ ( S φ d ( K ) ) by means of the translation of expressions defined in Section 4.2.3:
α K φ ( X , E x , γ ) : = ( S φ d ( X ) , φ ¯ X ( E x ) , S φ d ( γ ) ) f o r a n y ( X , E x , γ ) S t m Σ ( K ) .
The assignments K α K φ constitute a natural transformation α φ : Stm Σ Φ φ ; Stm Σ since we defined the translation of statements along context morphisms by simple post-composition and since Φ φ = S φ d : Set d S Set d S is a functor. Preprints 148907 i027

Translation of Interpretations along Signature Morphisms

For any context K in Cxt S = Set d S we define the functor β K φ : Int Σ ( S φ d ( K ) ) Int Σ ( K ) by means of the bijections in (7) and the reduct of structures defined in Section 4.2.1:
β K φ ( ι , A ) : = ( b φ ( ι ) , A φ ) f o r a n y Σ i n t e r p r e t a t i o n ( ι , A ) Int Σ ( S φ d ( K ) ) .
The assignments K β K φ constitute a natural transformation β φ : Φ φ o p ; Int Σ Int Σ since we defined the translation of interpretations along context morphisms in (15) by simple pre-composition and due to (10) (see the diagram below on the left).
Preprints 148907 i028
Supplementing (16), we observe that β K φ is defined in (22) in such a way that
β K φ ; Π K = Π S φ d ( K ) ; Str ( φ ) ( s e e t h e d i a g r a m a b o v e o n t h e r i g h t ) .

Satisfaction Condition for Comorphisms

Let be given a context K | Cxt S | , a Σ -interpretation ( ι , A ) of Φ φ ( K ) | Cxt S | and a Σ -statement ( X , E x , γ ) in context K.
Preprints 148907 i029
First, due to the definition of β K φ in (22), the statement β K φ ( ι , A ) K Σ ( X , E x , γ ) is equivalent to the statement ( b φ ( ι ) , A φ ) K Σ ( X , E x , γ ) while this statement is equivalent to b φ ( S φ d ( γ ) ; ι ) = γ ; b φ ( ι ) A φ Σ X E x according to (10) and Definition 12.
Second, due to the definition of Φ φ in (20) and the definition of α K φ in (21) the statement ( ι , A ) Φ φ ( K ) Σ α K φ ( X , E x , γ ) is equivalent to ( ι , A ) S φ d ( K ) Σ ( S φ d ( X ) , φ ¯ X ( E x ) , S φ d ( γ ) ) while this statement is equivalent to S φ d ( γ ) ; ι A Σ S φ d ( X ) φ ¯ X ( E x ) by Definition 12.
In such a way, the required satisfaction condition for comorphisms in (19) exactly reflects the general satisfaction condition for expressions and assignments in (12)!

5.2.2. Composition of Comorphisms

For any signature morphisms φ : Σ Σ , ψ : Σ Σ the composition of the institution comorphisms ( Φ φ , α φ , β φ ) : FL Σ FL Σ and ( Φ ψ , α ψ , β ψ ) : FL Σ FL Σ gives rise to an institution comorphism ( Φ φ , α φ , β φ ) ; ( Φ ψ , α ψ , β ψ ) : FL Σ FL Σ given by (compare [17]) Preprints 148907 i030
  • the functor Φ φ ; Φ ψ : Cxt S Cxt S ,
  • the natural transformation α φ ; ( Φ φ α ψ ) : Stm Σ ( Φ φ ; Φ ψ ) ; Stm Σ , and
  • the natural transformation ( Φ φ o p β ψ ) ; β φ : ( Φ φ ; Φ ψ ) o p ; Int Σ Int Σ .
The definition of the institution comorphisms ( Φ φ , α φ , β φ ) : FL Σ FL Σ in Section 5.2.1 ensures that their composition can be represented by means of the composition of the underlying signature morphisms.
Lemma 3
(Composition of Institution Comorphisms).
For any signature morphisms φ : Σ Σ and ψ : Σ Σ we have
( Φ φ ; ψ , α φ ; ψ , β φ ; ψ ) = ( Φ φ ; Φ ψ , α φ ; ( Φ φ α ψ ) , ( Φ φ o p β ψ ) ; β φ ) = ( Φ φ , α φ , β φ ) ; ( Φ ψ , α ψ , β ψ ) .
Proof. 
Since S d : Sort CAT is a functor, we trivially have Φ φ ; ψ = Φ φ ; Φ ψ due to (20). Since S d : Sort CAT is a functor, α φ ; ψ = α φ ; ( Φ φ α ψ ) is an immediate consequence of Lemma 2 due to the definitions in (20) and (21). Since S d : Sort CAT and Str : Sig o p CAT are functors, the fact that adjunctions compose, finally ensures β φ ; ψ = ( Φ φ o p β ψ ) ; β φ due to the definitions in (20) and (22). □
That the assignments Σ FL Σ = ( Cxt S , Stm Σ , Int Σ , Σ ) and ( φ : Σ Σ ) ( ( Φ φ , α φ , β φ ) : FL Σ FL Σ ) define a functor (also called an indexed comorphism-based institution [17])
FL : Sig c o I n s
from the category Sig of many-sorted signatures into the category c o I n s of institutions and comorphisms, is an immediate consequence of Lemma 3. We call FL : Sig c o I n s the Indexed First-Order Logic of Statements in Context.

5.3. The Fibred First-Order Logic of Statements in Context

5.3.1. A Grothendieck Institution

In contrast to [17,18], we ended up with a covariant functor FL : Sig c o I n s and not a contra-variant functor as an indexed comorphism-based institution [17]. As mentioned already in Remark 10, there are actually four possibilities to transform an indexed category into a split (op)fibration not only the standard Grothendieck construction usually presented in the literature [8]. Correspondingly, there are, at least, four possibilities to transform an indexed institution into a Grothendieck institution. We will not present the general construction of Grothendieck institutions for covariant indexed comorphism-based institutions, but define directly a Grothendieck institution for FL : Sig c o I n s .
The Grothendieck institution FL = ( Sig , Stm , Int , ) for FL : Sig c o I n s is constructed as follows:
  • The category FL has as
    • objects pairs ( Σ , K ) with Σ = ( S , P , F , a r , i n , o u t ) | Sig | and K | Cxt S | , and as
    • morphisms pairs ( φ , μ ) : ( Σ , K ) ( Σ , G ) of a signature morphism φ : Σ Σ and a context morphism μ : S φ d ( K ) G where Φ φ = S φ d : Set d S Set d S .
    • The composition of ( φ , μ ) : ( Σ , K ) ( Σ , G ) and ( ψ , μ ) : ( Σ , G ) ( Σ , H ) is the morphism ( φ ; ψ , S ψ d ( μ ) ; μ ) : ( Σ , K ) ( Σ , H ) .
  • The sentence functor Stm : Sig Set is given by
    • Stm ( Σ , K ) : = S t m Σ ( K ) for each object ( Σ , K ) in Sig , and
    • Stm ( φ , μ ) : = α K φ ; Stm Σ ( μ ) for each morphism ( φ , μ ) : ( Σ , K ) ( Σ , G ) , i.e., for all ( X , E x , γ ) Stm ( Σ , K ) = S t m Σ ( K ) we have Stm ( φ , μ ) ( X , E x , γ ) = ( S φ d ( X ) , φ ¯ X ( E x ) , S φ d ( γ ) ; μ ) Stm ( Σ , G ) = S t m Σ ( G ) .
  • The model functor Int : ( Sig ) o p CAT is given by
    • Int ( Σ , K ) : = Int Σ ( K ) for each object ( Σ , K ) in Sig , and
    • Int ( φ , μ ) : = Int Σ ( μ ) ; β K φ for each morphism ( φ , μ ) : ( Σ , K ) ( Σ , G ) , i.e., for all ( ι , A ) Int ( Σ , G ) = Int Σ ( G ) we have Int ( φ , μ ) ( ι , A ) = ( b φ ( μ ; ι ) , A φ ) Int ( Σ , K ) = Int Σ ( K ) .
  • The satisfaction relation is defined by ( ι , A ) ( Σ , K ) ( X , E x , γ ) if, and only if, ( ι , A ) K Σ ( X , E x , γ ) for each Σ | Sig | , K | Cxt S | , ( ι , A ) Int ( Σ , K ) = Int Σ ( K ) and ( X , E x , γ ) Stm ( Σ , K ) = S t m Σ ( K ) .
By routine calculations, we can check that the definition of FL transforms the satisfaction condition for comorphisms in (19) to the satisfaction condition for FL :
Int ( φ , μ ) ( ι , A ) ( Σ , K ) ( X , E x , γ ) i f f ( ι , A ) ( Σ , G ) Stm ( φ , μ ) ( X , E x , γ )
for any morphism ( φ , μ ) : ( Σ , K ) ( Σ , G ) in Sig , any statement ( X , E x , γ ) Stm ( Σ , K ) = S t m Σ ( K ) and any interpretation ( ι , A ) | Int ( Σ , G ) | = | Int Σ ( G ) | .

5.3.2. FL as an Extension of FOL

We validate that we indeed achieved our objective to construct an institution extending the traditional institution FOL = ( Sig , cFE , Str , ) of first-order logic, as described in Section 4.2.5, by arbitrary first-order "open formulas". We show that FOL can be fully embedded into FL = ( Sig , Stm , Int , ) . Varying the terminology in [17], we may say that FOL is a "full sub-institution of FL up to renaming".
First, we observe that the assignments Σ ( Σ , 0 S ) and ( φ : Σ Σ ) ( ( φ , i d 0 S ) : ( Σ , 0 S ) ( Σ , 0 S ) ) define a full embedding Em : Sig Sig . Keep in mind S φ d ( 0 S ) = 0 S .
Preprints 148907 i031
Second, there is a natural isomorphism ν s n : cFE Em ; Stm with maps
ν Σ s n : F E Σ ( 0 S ) Stm ( Σ , 0 S ) = Stm Σ ( 0 S ) f o r a l l Σ | Sig |
defined by ν Σ s n ( E x ) : = ( 0 S , E x , i d 0 S ) for all E x F E Σ ( 0 S ) . The map ν Σ s n is bijective since i d 0 S is the only S-map with codomain 0 S ! The naturality of ν s n immediately follows from the definition of Stm in Section 5.3.1 and the definition of α φ in (21).
Third, there is a natural isomorphism ν m d : Str Em o p ; Int with isomorphisms
ν Σ m d : = Π 0 S 1 : Str ( Σ ) Int ( Σ , 0 S ) = Int Σ ( 0 S ) f o r a l l Σ | Sig |
according to Remark 14. The naturality of ν m d immediately follows from the definition of Int in Section 5.3.1 and (23).
Fourth, the statement ( ! A , A ) ( Σ , i d 0 S ) ( 0 S , E x , i d 0 S ) for any signature Σ and any Σ -structure A is equivalent to the statement ( ! A , A ) 0 S Σ ( 0 S , E x , i d 0 S ) , due to the definition of in Section 5.3.1, and Definition 12 entails that this statement is, in turn, equivalent to the statement i d 0 S ; ! A = ! A A Σ 0 S E x . This is, however, exactly how we defined the satisfaction relation A Σ 0 S E x for FOL in Section 4.2.5. In other words, the satisfaction condition in FOL is a restriction of the satisfaction condition in FL !

5.3.3. A Fibred Institution

In addition of FOL being a full sub-institution of FL , the construction of FL also entails that FL is fibred over FOL . The concept of fibred institutions in [17] is based on fibrations while we meet here opfibrations instead. Moreover, the concept of fibred institution in [17] only relies on a fibration for the category of signatures. We will not coin a general concept of an institution fibred over another institution, but simply describe the strong relationship between FL and FOL in terms of opfibrations.
The assignments ( Σ , K ) Σ and ( φ , μ ) φ define a functor P : Sig Sig right-adjoint to the full embedding Em : Sig Sig with Em ; P = i d Sig . Moreover, P : Sig Sig is a split opfibration with the opcartesian arrow ( φ , i d S φ d ( K ) ) : ( Σ , K ) ( Σ , S φ d ( K ) ) for a signature morphisms φ : Σ Σ and an object ( Σ , K ) in Sig .
As discussed in Remark 14, the projection functors Π K : Int Σ ( K ) Str ( Σ ) are split opfibrations. The definition of Int : ( Sig ) o p CAT in Section 5.3.1 and the equations (16), (23) ensure that the family of the obfibrations Π K : Int Σ ( K ) Str ( Σ ) establishes a natural transformation Π : Int P o p ; Str .
Preprints 148907 i032
On the syntactic side, we do have another functor V : Sig Set given by the assignments Σ = ( S , P , F , a r , i n , o u t ) V a r S and φ = ( φ s t , φ r l , φ f n ) ( S φ s t d : V a r S V a r S ) .
For any object ( Σ , K ) in Sig there is a map Υ K : S t m Σ ( K ) V a r S given by the assignments ( X , E x , γ ) X . The definition of Stm : Sig Set in Section 5.3.1 and the definitions in (14), (21) ensure that the family of the maps Υ K : S t m Σ ( K ) V a r S establishes a natural transformation Υ : Stm P ; V .
We call FL = ( Sig , Stm , Int , ) together with the opfibration P : Sig Sig and the natural transformations Π : Int P o p ; Str , Υ : Stm P ; V the Fibred First-Order Logic of Statements in Context.
Remark 17
(Applications). Fortunately, we do have now two equivalent ways at our disposal to deal with fully-fleshed first-order "open formulas". It is, however, nearly impossible to state a priori which way will be most appropriate in applications. We guess that it will be, at the end, most convenient in many applications to utilize both ways in a well-defined interplay (compare [28], for example).

6. Substitutions

Substitutions are not relevant for utilizing a logic as a specification formalism. As also mentioned in [17], substitutions are, however, an important logical device for deduction. In this section we investigate substitutions and develop corresponding extensions of constructions and results in Section 3 and Section 4 necessary and sufficient for deduction.

6.1. Categories of Substitutions

The simple, natural idea is to extend the sets V a r S of S-sets of variables by substitutions. For any signature Σ = ( S , P , F , a r , i n , o u t ) the small category Var Σ is defined as follows:
Objects: 
are all S-sets X of variables, i.e., | Var Σ | : = V a r S ;
Morphisms: 
t : X Y in Var Σ are given by Σ -substitutions t : X T Σ ( Y ) ;
Identities: 
on S-sets X are given by the canonical S-maps η X : X T Σ ( X ) ; and the
Composition: 
t ; Σ r : X Z of two morphisms t : X Y , r : Y Z in Var Σ is given by the Σ -substitution t ; r * : X T Σ ( Z ) where r * : T Σ ( Y ) T Σ ( Z ) is the inductive extension of r : Y T Σ ( Z ) such that
r = η Y ; r * . Y [ r ] ( . 4 ) η Y [ d r ] r T Σ ( Y ) [ d ] r * T Σ ( Z )
Preprints 148907 i033
Note, that r * : T Σ ( Y ) T Σ ( Z ) describes nothing but the application of the Σ -substitution r : Y T Σ ( Z ) to all Σ -terms over Y! We can inductively prove that
η X * = i d T Σ ( X ) a n d ( t ; r * ) * = t * ; r *
thus the composition of substitutions is associative, and we get indeed a category.
Remark 18
(Lawvere Theories). The tentative reader may have realized that the categories Var Σ are nothing but so-calledsyntactic Lawvere theories[21,22,29]. We will, however, not walk further into the realm of "Categorical Algebra" and "Functorial Semantics". We will neither utilize the fact that the categories Var Σ are finite product categories nor reconstruct Str (Σ) as a subcategory of the functor category [ Var Σ Set ] in case of signatures Σ without predicate symbols!
Remark 19
(Kleisli Morphisms). It is a common practice to describe substitutions as morphisms of the Kleisli category of a "term algebra adjunction". In such a way, we would get the extension of assignments in (3) and the application of substitutions in (26) as well as their compatibility "for free". See the discussion of "internalization of terms" and substitution calculi in [15].
To stay closer to traditional presentations of logics, we rely instead in this paper on explicit inductive definitions (located on the meta-level). Another reason is, that some of the necessary constructions and results, as the translation of terms and Lemma 1 for example, can not be obtained by means of term algebra adjunctions (see Remark 11)!
For a signature morphism φ : Σ Σ we can extend the map S φ d : V a r S V a r S in Section 4.2.2 to a functor L φ : Var Σ Var Σ defined by L φ ( t ) : = S φ d ( t ) ; φ ¯ Y for all substitutions t : X T Σ ( Y ) where φ ¯ : T Σ ; S φ d S φ d ; T Σ : V a r S Set d S is the natural transformation defined in Section 4.2.2 and describing the translation of Σ -terms into Σ -terms.
Preprints 148907 i034
Lemma 1 ensures L φ ; ψ = L φ ; L ψ for any signature morphisms φ : Σ Σ , ψ : Σ Σ thus the assignments Σ Var Σ and φ L φ define a functor L : Sig Cat .

6.2. Translation of Terms and Substitution Application

We can also extend the maps T Σ : V a r S Set d S to functors T Σ : Var Σ Set d S with T Σ ( X ) : = T Σ ( X ) for all S-sets X of variables and T Σ ( t ) : = t * , due to (26), for all Σ -substitutions t : X T Σ ( Y ) . Functoriality is ensured by (27).
To show that the family of S -maps φ ¯ X : S φ d ( T Σ ( X ) ) T Σ ( S φ d ( X ) ) also constitutes a natural transformation φ ¯ : T Σ ; S φ d L φ ; T Σ : Var Σ Set d S , we have to prove that for any Σ -substitution t : X T Σ ( Y ) the square of S -maps on the right commutes.
Preprints 148907 i035
Here we have another situation, as mentioned in Remark 19, where term algebra adjunctions are of no help. Since the S -maps φ ¯ X : S φ d ( T Σ ( X ) ) T Σ ( S φ d ( X ) ) are defined by induction over S φ d ( T Σ ( X ) ) , also the commutativity of the square has to be and can be shown by induction over S φ d ( T Σ ( X ) ) (compare Remark 11).
Since the functors L φ : Var Σ Var Σ and T Σ : Var Σ Set d S are simply defined be extending the maps between objects S φ d : V a r S V a r S and T Σ : V a r S Set d S to morphisms, the validity of Lemma 1 is preserved.
Corollary 2
(Composition of Term Translations). For any signature morphisms φ : Σ Σ , ψ : Σ Σ and the corresponding translations of terms φ ¯ : T Σ ; S φ d L φ ; T Σ : Var Σ Set d S , ψ ¯ : T Σ ; S ψ d L ψ ; T Σ : Var Σ Set d S we do have:
φ ; ψ ¯ = ( φ ¯ S ψ d ) ; ( L φ ψ ¯ ) : T Σ ; S φ ; ψ d L φ ; ψ ; T Σ : Var Σ Set d S .
Preprints 148907 i036

6.3. Translation of Expressions and Substitution Application

Analogously to terms, we would also like to extend the map F E Σ : V a r S Set to a functor FE Σ : Var Σ Set . For all Σ -substitutions r : X T Σ ( Z ) we can indeed define a map r ¯ : F E Σ ( X ) F E Σ ( Z ) describing the application of the substitution to Σ -expressions on X. Due to the presence of quantification, the assignments r r ¯ will be, however, not functorial "on the nose" as we will discuss below.
There seems to be no way out! As long as we do not utilize something like the de Bruijn index [30] to avoid named bound variables, we have to deal, in one or another way, with the problem that substitution application may cause an unintended interaction between free and bound variables. One approach to avoid such an unintended interaction is to inductively define a binary meta-level predicate stating when a substitution is "legal" for a certain expression as it is done, for example, in [4]. From the perspective of deduction, this is viable. We will, however, not adapt this approach, since we would end up with partial substitution maps .
Another approach is to use α-conversion, i.e., renaming of bound variables, in such a way, that we obtain total substitution maps. We will define the application of a substitution to expressions, according to the inductive definition of expressions in Definition 5, thereby establishing a stepwise inductive variant of α -conversion.
To meet the "proper inclusion condition" for Quantification in Definition 5, we must use non-symmetric sums when defining substitution application in case of Quantification. That is, for any two S-sets X 1 , X 2 V a r S of variables we must choose a sum X 1 + S X 2 in Set d S such that the left injection κ 1 : X 1 X 1 + S X 2 is an S-inclusion X 1 X 1 + S X 2 . If X 1 and X 2 are disjoint, we simply choose X 1 + S X 2 : = X 1 X 2 .
Definition 13
(Substitution Application for Expressions). For any signature Σ the family of maps r ¯ : F E Σ ( X ) F E Σ ( Z ) with r : X T Σ ( Z ) a Σ-substitution is defined inductively and in parallel by the following assignments:
  • Atomic expressions:
    (a)
    Equation: X ( t 1 = t 2 ) Z ( r s * ( t 1 ) = r s * ( t 2 ) ) for any s S and any t 1 , t 2 T Σ ( X ) s with r * : T Σ ( X ) T Σ ( Z ) given by (26).
    (b)
    Relational Atom: X p syn ( t ) Z p syn ( t ; r * ) for any p P and any S-map t : a r ( p ) T Σ ( X ) with r * : T Σ ( X ) T Σ ( Z ) given by (26).
  • Everything: X Z
  • Void: X Z
  • Conjunction: X ( E x 1 E x 2 ) Z ( r ¯ ( E x 1 ) r ¯ ( E x 2 ) )
  • Disjunction: X ( E x 1 E x 2 ) Z ( r ¯ ( E x 1 ) r ¯ ( E x 2 ) )
  • Implication: X ( E x 1 E x 2 ) Z ( r ¯ ( E x 1 ) r ¯ ( E x 2 ) )
  • Negation: X ¬ E x Z ¬ r ¯ ( E x )
  • Quantification: X ( syn ( Y X ) : E x ) Z ( syn ( W Z ) : [ r ; , κ 2 ; η W ] ¯ ( E x ) ) and X ( syn ( Y X ) : E x ) Z ( syn ( W Z ) : [ r ; , κ 2 ; η W ] ¯ ( E x ) ) for any expression Y E x and any proper S-inclusion X Y where W : = Z + S ( Y X ) and thus Z W . The extended substitution [ r ; , κ 2 ; η W ] : Y T Σ ( W ) is constructed as a cotuple. Keep in mind Remark 3 and that Y is the sum of X and Y X in Set d S since X Y .
Preprints 148907 i037
It looks like there is no choice of non-symmetric sums in V a r S such that the assignments X F E Σ ( X ) and r r ¯ define a functor from Var Σ into Set since for any Σ -substitutions r 1 : X 1 T Σ ( X 2 ) , r 2 : X 2 T Σ ( X 3 ) the maps r 1 ¯ ; r 2 ¯ : F E Σ ( X 1 ) F E Σ ( X 3 ) and r 1 ; r 2 * ¯ : F E Σ ( X 1 ) F E Σ ( X 3 ) coincide, in general, only for Σ -expressions without quantifications. For a Σ -expression E x on X 1 containing quantifications, the two Σ -expressions r 1 ¯ ; r 2 ¯ ( E x ) and r 1 ; r 2 * ¯ ( E x ) may be different. They will be, however, the "same up to α -conversion". Especially, it can be shown that they are semantically equivalent.
Lemma 4
(Semantic Equivalence). For Σ-substitutions r 1 : X 1 T Σ ( X 2 ) , r 2 : X 2 T Σ ( X 3 ) the maps r 1 ¯ ; r 2 ¯ : F E Σ ( X 1 ) F E Σ ( X 3 ) and r 1 ; r 2 * ¯ : F E Σ ( X 1 ) F E Σ ( X 3 ) are semantically equivalent in the sense that
[ [ r 1 ¯ ; r 2 ¯ ( E x ) ] ] X 3 A = [ [ r 1 ; r 2 * ¯ ( E x ) ] ] X 3 A f o r a l l E x F E Σ ( X 1 ) a n d a l l Σ s t r u c t u r e s A .
Remark 20
( α -conversion). The best we can hope for, if we intend to formalize the observation that the Σ-expressions r 1 ¯ ; r 2 ¯ ( E x ) and r 1 ; r 2 * ¯ ( E x ) are the "same up to α-conversion", is some kind of "pseudo functor" (maybe in the sense of [31]?). For such a formalization, we should probably upgrade the sets F E Σ (X) to small categories FE Σ ( X ) with morphisms encoding the information that two Σ-expressions are the "same up to α-conversion". The assignments X FE Σ ( X ) and r r ¯ hopefully define then a "pseudo functor" from Var Σ into Cat in the sense that for any Σ-substitutions r 1 : X 1 T Σ ( X 2 ) , r 2 : X 2 T Σ ( X 3 ) there is a natural isomorphism between the functors r 1 ¯ ; r 2 ¯ : FE Σ ( X 1 ) FE Σ ( X 3 ) and r 1 ; r 2 * ¯ : FE Σ ( X 1 ) FE Σ ( X 3 ) .
In light of deduction, there is no need for a formalization of α -conversion! It should be quite enough to formally grasp what we have at hand besides Lemma 4.
Due to (27), we obviously have η X ¯ = i d F E Σ ( X ) : F E Σ ( X ) F E Σ ( X ) for the canonical substitutions η X : X T Σ ( X ) , thus the assignments X F E Σ ( X ) and r r ¯ define a reflexive graph homomorphism FE Σ : g r ( Var Σ ) g r ( Set ) (see Section 2).
We consider an arbitrary signature morphism φ : Σ Σ . To show that the family of maps φ ¯ X : F E Σ ( X ) F E Σ ( S φ d ( X ) ) with X in | Var Σ | = V a r S , defined in Section 4.2.3, also establishes a natural transformation φ ¯ : FE Σ L φ ; FE Σ : g r ( Var Σ ) g r ( Set ) between reflexive graph homomorphisms, we have to prove that for any Σ -substitution r : X T Σ ( Z ) the square of maps on the right below commutes.
Preprints 148907 i038
The commutativity of the right square can be inductively shown according to the inductive definition of expressions in Definition 5 and the corresponding inductive definition of the maps φ ¯ X : F E Σ ( X ) F E Σ ( S φ d ( X ) ) in Section 4.2.3 and of the translation maps r ¯ : F E Σ ( X ) F E Σ ( Z ) in Definition 13. The basic case 1.(a) Equation follows from the fact in Section 6.2 that the family of S -maps φ ¯ X : S φ d ( T Σ ( X ) ) T Σ ( S φ d ( X ) ) constitutes a natural transformation φ ¯ : T Σ ; S φ d L φ ; T Σ : Var Σ Set d S . This fact also ensures the second basic case 1.(b) Relational Atom due to the definition of L φ : Var Σ Var Σ and the functoriality of S φ d . The cases 2. Everything to 7. Negation can be straightforwardly proven.
The critical case 8. Quantification can only be shown under the additional assumption that for all signature morphisms φ : Σ Σ and all disjoint S-sets X, Y of variables the equation S φ d ( X + S Y ) = S φ d ( X ) + S S φ d ( Y ) holds. Such a coordination of choices of non-symmetric sums can be achieved if we define the choices for all sets V a r S in a uniform way by means of one and the same choice of non-symmetric sums in Set for the set f i n ( N v a r ) of all finite subsets of the set N v a r of names for variables: For any disjoint S-sets X, Y in V a r S , we consider the corresponding S-typed sets ( X , t X ) , ( Y , t Y ) . We take the chosen non-symmetric sum X + Y of the sets X and Y in f i n ( N v a r ) and construct its typing morphism as the cotuple [ t X , t Y ] : X + Y S . The S-typed set ( X + Y , [ t X , t Y ] ) is a non-symmetric sum of ( X , t X ) and ( Y , t Y ) in Set / S . The desired non-symmetric sum of X and Y in V a r S can be obtained via the isomorphism I S : Set / S Set d S :
X + S Y : = I S ( X + Y , [ t X , t Y ] ) = { [ t X , t Y ] 1 ( s ) s S } .
Case 8. Quantification is then entailed by the definition of L φ and its functoriality as well as the fact that S φ d , as a left-adjoint functor, preserves sums.
Analogously to Lemma 1, the validity of Lemma 2 is preserved since the functors L φ : Var Σ Var Σ and the reflexive graph homomorphisms FE Σ : g r ( Var Σ ) g r ( Set ) are defined as extensions of maps between between objects to morphisms.
Corollary 3
(Composition of Expression Translations). For any signature morphisms φ : Σ Σ , ψ : Σ Σ and the corresponding translations of expressions φ ¯ : FE Σ L φ ; FE Σ : g r ( Var Σ ) g r ( Set ) and ψ ¯ : FE Σ L ψ ; FE Σ : g r ( Var Σ ) g r ( Set ) we do have:Preprints 148907 i039

6.4. Translation of Expressions vs Derived Operations

According to (4), any Σ -substitution t : X T Σ ( Y ) represents for any Σ -structure A a derived operation t A : A Y A X in the opposite direction with t A ( a ) : = t ; a for all assignments a : Y A . For any Σ -substitution r : Y T Σ ( Z ) and any assignment b : Z A it can also inductively shown that
( r ; b ) = r * ; b : T Σ ( Y ) A .
This entails
( t ; Σ r ) A = ( t ; r * ) A = r A ; t A : A Z A X .
That is, composition in Var Σ syntactically represents the composition of derived operations! (29) and (5) ensure that for any Σ -structure A the assignments X A X and t t A define a contra-variant functor Op Σ A : Var Σ o p Set the semantic counterpart of the reflexive graph homomorphisms FE Σ : g r ( Var Σ ) g r ( Set ) .
Op Σ A and FE Σ are not really matching the "original institution pattern". Nevertheless, we do have a corresponding satisfaction condition: For any Σ -substitution t : X T Σ ( Y ) , any Σ -expression X E x , any Σ -structure A and any assignment a A Y it holds that
t A ( a ) A Σ X E x ( i . e . t A ( a ) [ [ E x ] ] X A ) i f f a A Σ Y t ¯ ( E x ) ( i . e . a [ [ t ¯ ( E x ) ] ] Y A ) .
This is our reconstruction of the statement in Proposition 5.6 in [17].

6.5. Statements in Context and Substitutions

As we have seen, Σ -substitutions t : X T Σ ( Y ) establish directed relationships between Σ -expressions X E x and Y t ¯ ( E x ) . An obvious idea could be to extend now the sets S t m Σ ( K ) of all Σ -statements in contexts K in Definition 10 by morphisms of the form t : ( X , E x , ? ? ) ( Y , t ¯ ( E x ) , γ ) with γ : X K . What should "??" be in this case? A natural proposal would be to choose the S-map t ; ( γ ; η K ) * : X T Σ ( K ) .
Preprints 148907 i040
That is, if we want to introduce morphisms between statements induced by substitutions, we probably must upgrade the concept of "binding" to S-maps of the form X T Σ ( K ) . In such a way, we would get morphisms like t : ( X , E x , t ; ρ * ) ( Y , t ¯ ( E x ) , ρ ) with t : X T Σ ( Y ) , ρ : Y T Σ ( K ) and thus t ; ρ * : X T Σ ( K ) .
As seen in Section 6.3, the composition of substitutions will, however, not establish a category since composition will only be associative "up to α -conversions". At the moment, we do not have the capacity and/or the technical skills to find out if we would get something like a "pseudo category", in the sense of [31], a "quasi category" [32] or something else.
On the other side, we already said, that a formalization of α -conversion does not seem to be relevant for deduction, thus we could be more pragmatic and lift up the set S t m Σ ( K ) to a reflexive graph Stm Σ ( K ) with substitutions as arrows and with a composition operation satisfying the identity law but satisfying the associativity law only "up to semantic equivalence".
At present stage we can not overlook if such a promotion of S t m Σ ( K ) to Stm Σ ( K ) is feasible and/or necessary. First, we should study and investigate, in detail, first-order deduction in view of Logics of Statements in Context, in a prospective follower paper, to find this out! It may be also beneficial to add morphisms of the form K T Σ ( G ) to the category Cxt S of contexts, once we decide to utilize bindings of the form X T Σ ( K ) ?
For now, we only observe that the satisfaction condition in (30) ensures that the statements ( X , E x , t ; ρ * ) and ( Y , t ¯ ( E x ) , ρ ) are semantically equivalent. For any Σ -interpretation ( ι , A ) of a context K in a Σ -structure A we have ( ι , A ) K Σ ( X , E x , t ; ρ * ) if, and only if, ( ι , A ) K Σ ( Y , t ¯ ( E x ) , ρ ) due to Definition 12, (28) and (27).
This semantic equivalence also indicates that there is no need for bindings of the form ϱ : X T Σ ( K ) if we are only concerned about specifications and not about deduction. For any such binding there is an S-set Y, a Σ -substitution t : X T Σ ( Y ) and a simple injective binding γ : Y K such that ϱ = t ; ( γ ; η K ) * . That is, for any Σ -statement ( X , E x , ϱ ) with a more advanced binding ϱ : X T Σ ( K ) there is a semantically equivalent Σ -statement ( Y , t ¯ ( E x ) , γ ) with a simple binding γ : Y K .
To construct such a factorization of ϱ : X T Σ ( K ) we consider the minimal S-subset K K such that ϱ ( X ) T Σ ( K ) T Σ ( K ) (see Remark 3). In such a way, we factorize ϱ : X T Σ ( K ) into an S-map ϱ : X T Σ ( K ) and the inclusion T Σ ( K ) T Σ ( K ) . Since K is finite, we can choose an S-set Y of variables with a bijective S-map i Y : Y K and thus a bijective S-map j Y : T Σ ( K ) T Σ ( Y ) . We set t : = ϱ ; j Y and obtain γ : Y K as the composition of i Y : Y K and the inclusion K K .

7. Sketches and Diagrams

7.1. Sketches and Sketch Implications

We start with an informal discussion. Definition 12 declares the validity of a single Σ -statement in context K for single interpretations of context K in any Σ -structure A . This allows us, in analogy to Σ -expressions, to define for a Σ -statement its semantics in a certain Σ -structure A as the set of all valid interpretations of K in A . This does not give us, however, a concept of validity of the Σ -statement in A at hand!
To come up with a reasonable concept of validity of a Σ -statement in a Σ -structure, let us have a look back at the paradigmatic difference between an equation t = r and a conditional equation ( X : t = r ) with an empty premise [7,33]. Our main methodological point is to consider a conditional equation ( X : t 1 = r 1 , , t n = r n t = r ) not as a lazy notation for the closed expression ( X : t 1 = r 1 t n = r n t = r ) but as an "arrow" between sets of equations established by an identity context morphism: i d X : ( X : { t 1 = r 1 , , t n = r n } ) ( X : { t = r } ) . A conditional equation is valid in a Σ -structure A if, and only if, each solution of the premise ( X : { t 1 = r 1 , , t n = r n } ) is also a solution of the conclusion ( X : { t = r } ) . This viewpoint obviously scales up to infinite sets X and infinite sets of equations! Since any interpretation of X in A is a solution of the empty premise, the validity of i d X : ( X : ) ( X : { t = r } ) in A means nothing but that any interpretation of X in A is a solution of t = r in A .
As already mentioned at the end of Section 4 and discussed in Remark 16, it is well-known that "empty sorts" potentially cause the problem that deduction rules for one-sorted first-order logic are, in general, not sound for many-sorted deduction [17,19]. The proposal in [19], to solve this problem for many-sorted equational logic, is subsumed in our proposal of Logics of Statements in Contexts: Explicit declaration of variables with their sorts and considering equations as corresponding conditional equations with empty premises.
A similar situation we meet in traditional first-order logic, where the "provable formulas" are exactly the "admissible rules" with an empty premise [4].
In [1] we borrowed the term "sketch" from [9,10,34] to denote a context together with an arbitrary set of statements in this context. This and other definitions can easily be adapted and extended to our First-Order Logics of Statements in Context.
For any signature Σ = ( S , P , F , a r , i n , o u t ) a Σ - sketch  K = ( K , S t K ) is given by a context K | Cxt S | = | Set d S | and a set S t K S t m Σ ( K ) of Σ -statements in context K. K = ( K , S t K ) is called atomic if all the Σ -statements ( X , E x , γ ) in S t K are atomic meaning that E x is an atomic expression, i.e., an equation or a relational atom according to Def. 5.
An interpretation ι : K A of context K in a Σ -structure A is a valid interpretation of the sketch K = ( K , S t K ) in A , ( ι , A ) K Σ S t K in symbols, if, and only if, ( ι , A ) K Σ ( X , E x , γ ) , i.e., γ ; ι [ [ E x ] ] X A due to (17), for all Σ -statements ( X , E x , γ ) in S t K . Be aware that the Σ -statements in S t K may have different S-sets X of variables!
A Σ -sketch implication  P μ C is given by two Σ -sketches P = ( P , S t P ) , C = ( C , S t C ) and a context morphism μ : P C . Sk ( Σ ) denotes the category of all Σ -sketches and all Σ -sketch implications. If P = C and μ = i d P , we simply write P C instead of P i d P C .
A Σ -sketch implication P μ C is valid in a Σ -structure A , A Σ P μ C in symbols, if, and only if, for all interpretations ( ι , A ) of P in A it holds that ( ι , A ) P Σ S t P implies the existence of an interpretation ( ϑ , A ) of context C in A with μ ; ϑ = ι such that ( ϑ , A ) C Σ S t C .
Preprints 148907 i041
Obviously, we trivially have A Σ P μ C if there is no interpretation of context P in A at all. As discussed before, this may be the case in many-sorted logics due to the potential presence of empty sorts.
In case P = C and μ = i d P , we have A Σ P C if, and only if, each valid interpretation of the premise P is also a valid interpretation of the conclusion C . In analogy to (conditional) equations, we could now define that a Σ -sketch C is valid in a Σ -structure A if, and only if, A Σ ( C , ) C , i.e., if all interpretations ( ι , A ) of the context C in A are valid interpretations of the sketch C = ( C , S t C ) in A .

7.2. Diagrams

We became familiar with diagrams not via Model Theory [2,3,17] but as a technique used in the construction of free algebras [6,7,33]. From this perspective diagrams arise as syntactic representations of structures. To obtain such a representation, we need, first, a mechanism to syntactically represent the elements of a given structure.
A widely used mechanism is to add for a given Σ -structure A "copies" of all the elements in the carrier A of A as new "auxiliary" constant symbols to the signature Σ (thus blowing up Σ to an infinite entity in most cases) [2,6,17]. In contrast, Logics of Statements in Context generalize the approach in [7,33] which adapts the idea of "generators" and "defining relations" from Group Theory.
The elements of contexts are for us, in principal, neither constant symbols nor variables nor elements of carrier sets. Or, to put it the other way around: Of course we can use one and the same entity in different roles, but we should always be aware of the different roles and changes of roles! Contexts establish a bridge between syntax (constant symbols, variables) and semantics (elements of carrier sets), and we use them to define diagrams.
We require contexts to be disjoint S-sets in order to be able to translate Σ -sketches along signature morphisms. This is one of the crucial technical mechanisms to describe the construction of free structures! In contrast, carriers of Σ -structures are not required to be disjoint! So, the first step in transforming a Σ -structure A into a Σ -sketch will be to transform the carrier A of A into a disjoint S-set. Note, that the potential necessity of such an initial step has not been observed in [1].
For this first step we define a functor D S : Set S Set d S with D S ( A ) : = A for all disjoint S-sets A and D S ( A ) : = ( { ( a , s ) a A s } s S ) for all non-disjoint S-sets A. The assignments ( a , s ) a define an isomorphism ε A : D S ( A ) A in Set S for any non-disjoint S-set A. For disjoint S-sets A we simply set ε A : = i d A : A A thus the assignments A ε A establish, in turn, a natural isomorphism ε : D S ; E S i d Set S for the inclusion functor E S : Set d S Set S . Moreover, we have E S ; D S = i d Set d S thus we actually obtain an equivalence between the categories Set S and Set d S .
In the literature we essentially find two variants of diagrams - an atomic variant [3,17] and a full variant [2]. Obviously, we can define two corresponding variants of sketch encodings of a Σ -structure A . The atomic variant is given by the Σ -sketch S a t A : = ( D S ( A ) , S t a t A ) with context D S ( A ) and S t a t A the set of all atomic (!) Σ -statements ( X , E x , γ ) such that ( ε A , A ) D S ( A ) Σ ( X , E x , γ ) for the canonical interpretation ( ε A , A ) . The full variant S A = ( D S ( A ) , S t A ) of the Σ -sketch encoding of A is simply obtained by droping the restriction "atomic". The interest reader may have a look in [1] for more concepts and results around sketch encodings of structures. Especially, we discuss there a "universal property" of the canonical interpretation ( ε A , A ) which is strongly related to Proposition 4.10 in [17].
To make this section round, we draw the reader’s attention to minimal sketch encodings. The minimal Σ -sketch encoding S m i n A = ( D S ( A ) , S t m i n A ) of a Σ -structure A is given by a proper subset S t m i n A S t a t A that only and directly encodes the semantics p A A a r ( p ) of all predicate symbols p P in A and the semantics op A : A i n ( op ) A o u t ( op ) of all operation symbols op F in A : For any predicate symbol p P we assume w.l.o.g. that a r ( p ) = { x 1 , , x m } thus we have syn ( η a r ( p ) ) = x 1 , . . . , x m for the S-map η a r ( p ) : a r ( p ) T Σ ( a r ( p ) ) (see Remarks 2, 4 and 8). We add to S t m i n A all Σ -statements
( a r ( p ) , p x 1 , . . . , x m , γ : a r ( p ) D S ( A ) ) w i t h γ ; ε A p A .
For any operation symbol op F we assume w.l.o.g. that i n ( op ) = { x 1 , , x n } and o u t ( op ) = { y } (see Remark 2 and the "reborn remark" after Definition 4). We consider the Σ -equation i n ( op ) o u t ( op ) ( op x 1 , , x n = y ) with op x 1 , , x n , y T Σ ( i n ( op ) o u t ( op ) ) and add to S t m i n A all Σ -statements
( i n ( op ) o u t ( op ) , ( op x 1 , , x n = y ) , γ : i n ( op ) o u t ( op ) D S ( A ) )
with γ ( y ) = ε A 1 ( op A ( ε A ( γ ( x 1 ) ) , , ε A ( γ ( x n ) ) ) ) . i n ( op ) o u t ( op ) is the sum of i n ( op ) and o u t ( op ) in Set S thus we can utilize the cotuple notation and more abstractly formulate: For any S-map γ i n : i n ( op ) D S ( A ) add to S t m i n A the Σ -statement
( i n ( op ) o u t ( op ) , ( op x 1 , , x n = y ) , [ γ i n , op A ( γ i n ; ε A ) ; ε A 1 ] )
We experienced that in some very special cases only the minimal encoding enables us to construct free structures.

8. Conclusions and Further Work

We accomplished one of our objectives anticipated in [1]. We constructed a conservative extension of the traditional institution of many-sorted first-order logic to a First-Order Logic of Statements in Context, comprising not only "closed" but also "open formulas".
This new logic was presented in two versions. First, we constructed a comorphism based indexed institution which was then transformed into a fibred institution by means of an appropriate Grothendieck construction.
In the special case of traditional first-order logic, which is based on the category Set , we do have also operations in contrast to the version of Logics of Statements in Context, presented in [1] for arbitrary (!) categories, where we only considered predicates. So, it was the first time that we had to investigate and formalize the interplay of predicates and operations within the framework of Logics of Statements in Context.
Logics of Statements in Context distinguish, in a consistent and clean way, between syntactic entities, like constant symbols, variables and terms, on one side, and semantic entities, like constants, elements of carrier sets and operations, on the other side. One of the roles for the new entity context is to establish the necessary bridge between syntax and semantics.
This kind of inherent "separation of concerns" enabled us to develop the new logics in a very systematic and well-structured way including a relatively extensive investigation of substitutions and substitution applications. We revealed some intrinsic structures and relations between them. Especially, we elucidated the crucial role of the requirement that many-sorted sets of variables as well as many-sorted sets of terms should be disjoint.
Besides the incorporation of operations, some other changes, variations and/or adaptions of the first outline of Logics of Statements in Context in [1] turned out to be useful or even necessary:
  • If we incorporate substitutions as morphisms, Var is no longer a subcategory of Base , but an extension of a subcategory of Base .
  • For quantifications we may use only a certain class of morphisms in Var , or we may use morphisms between objects in Var that are not morphisms in Var at all.
  • The same may happen with Cxt in some cases. We may allow substitutions as binding morphisms but do not consider substitutions between contexts. An open question is then in what categories all the different kinds of substitutions live and how the interaction between assignments, evaluations, substitutions and substitution applications is organized. Maybe we need some comma categories to describe this interaction?
  • In [1] we assumed Carr Cxt to define diagrams. In first-order logic we met, however, the situation Carr Cxt . We repaired this by constructing a functor D : Carr Cxt establishing, together with the inclusion Cxt Carr , an equivalence of the categories Carr and Cxt .
  • We discussed in Section 6.5 that substitutions allow us to upgrade the sets S t m Σ ( K ) of statements in contexts, according to [1], to structures Stm Σ ( K ) which nearly are categories. "Nearly", in the sense, that composition is only associative "up to semantic equivalence" of statements. If we want to take advantage of this observation, we must leave the big and safe building based upon the original definition of institutions, since we will have sentence functors with other codomains than simply Set .
To extend, consolidate and further develop the open framework of Logics of Statements in Context, we envisage two projects as successors of the present paper:
First-Order Deduction 
As a vital complement, we should finally analyze and describe deduction in traditional first-order logic in view of Logics of Statements in Context. Especially, we are longing to comprehend the relationship between traditional deduction rules, on one side, and contexts and sketch implications, on the other side.
Horn Logics 
As indicated in Section 7.1, we do not perceive conditional equations (and analogously Horn clauses) as "first-order formulas" but as implications between atomic sketches. The present paper will hopefully enable us to analyze these two special cases of Horn Logics in detail, and to lift up the insights of the analysis to a more abstract account of Horn Logics in general.

Funding

This research was funded by L. Meltzer Høyskolefond 2024 grant number 1201-32425.

Conflicts of Interest

The author declares no conflicts of interest.

References

  1. Wolter, U. Logics of Statements in Context - Category Independent Basics. Mathematics 2022, 10. [Google Scholar] [CrossRef]
  2. Chang, C.C.; Keisler, H.J. Model Theory; Studies in Logic and the Foundations of Mathematics, Elsevier Science, 1990.
  3. van Dalen, D. Logic and Structure, 5 ed.; Universitext, Springer, 2013. [CrossRef]
  4. Walicki, M. Introduction to Mathematical Logic; World Scientific, 2012.
  5. Wolfgang Wechler. Universal Algebra for Computer Scientists. In Proceedings of the Monographs in Theoretical Computer Science. An EATCS Series. Springer-Verlag, Berlin Heidelberg, 1992, Vol. 25, p. 339. [CrossRef]
  6. Ehrig, H.; Mahr, B. Fundamentals of Algebraic Specification 1: Equations and Initial Semantics; EATCS Monographs on Theoretical Computer Science 6, Springer, 1985.
  7. Reichel, H. Initial Computability, Algebraic Specifications, and Partial Algebras; Oxford University Press, 1987.
  8. Barr, M.; Wells, C. Category Theory for Computing Science; Series in Computer Science; Prentice Hall International: London, 1990. [Google Scholar]
  9. Makkai, M. Generalized Sketches as a Framework for Completeness Theorems. Journal of Pure and Applied Algebra 1997, 115, 49–79. [Google Scholar] [CrossRef]
  10. Cadish, B.; Diskin, Z. Heterogeneous View Integration via Sketches and Equations. In Proceedings of the ISMIS, Springer, Heidelberg, 1996; Vol. 1079; pp. 603–612. [Google Scholar]
  11. Diskin, Z. Databases as Diagram Algebras: Specifying Queries and Views Via the Graph-Based Logic of Sketches. Technical Report 9602, Latvia, 1996. [Google Scholar]
  12. Baader, F.; Horrocks, I.; Sattler, U. , Handbook of Knowledge Representation; Elsevier, 2007; chapter 3 Description Logics.
  13. Ehrig, H.; Ehrig, K.; Prange, U.; Taentzer, G. Fundamentals of Algebraic Graph Transformation; Monographs in Theoretical Computer Science. An EATCS Series, Springer, 2006.
  14. Wolter, U.; Diskin, Z.; König, H. Graph Operations and Free Graph Algebras. In Proceedings of the Graph Transformation, Specifications, and Nets - In Memory of Hartmut Ehrig. Springer, LNCS 1 0800, 2018, pp. 313–331. [Google Scholar] [CrossRef]
  15. Wolter, U.; Truong, T.T. Graph Algebras and Derived Graph Operations. Logics 2023, 1, 182–239. [Google Scholar] [CrossRef]
  16. Goguen, J.A.; Burstall, R.M. Institutions: Abstract Model Theory for Specification and Programming. Journals of the ACM 1992, 39, 95–146. [Google Scholar] [CrossRef]
  17. Diaconescu, R. Institution-Independent Model Theory, 1st ed.; Birkhäuser Basel, 2008.
  18. Diaconescu, R. Grothendieck Institutions. Applied Categorical Structures 2002, 10, 383–402. [Google Scholar] [CrossRef]
  19. Goguen, J.A.; Meseguer, J. Completeness of Many-Sorted Equational Logic. Houston Journal of Mathematics 1985, 11, 307–334. [Google Scholar]
  20. Barendregt, H.P. The Lambda Calculus: Its Syntax and Semantics; North Holland, 1984.
  21. Lawvere, F.W. Functorial Semantics of Algebraic Theories. In Proceedings of the Proc. National Academy of Science, U.S.A., 1963, 50. Columbia University; pp. 869–872.
  22. Lawvere, F.W. Functorial Semantics of Algebraic Theories and Some Algebraic Problems in the context of Functorial Semantics of Algebraic Theories. Reprints in Theory and Applications of Categories 2004, 5, 1–121. [Google Scholar]
  23. 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, 1994.
  24. Diskin, Z.; Wolter, U. A Diagrammatic Logic for Object-Oriented Visual Modeling. ENTCS 2008, 203/6, 19–41. [Google Scholar] [CrossRef]
  25. Martini, A.; Wolter, U.; Haeusler, E.H. Fibred and Indexed Categories for Abstract Model Theory. Logic Journal of the IGPL. [CrossRef]
  26. Goguen, J.A.; Meseguer, J. Remarks on Remarks on Many-Sorted Equational Logic. Bulletin of the EATCS 1986. [Google Scholar] [CrossRef]
  27. Goguen, J.A.; Roşu, G. Institutions Morphisms. Formal Aspects of Computing 2002, 12, 274–307. [Google Scholar] [CrossRef]
  28. Wolter, U.; Martini, A.; Häusler, E. Indexed and fibered structures for partial and total correctness assertions. Mathematical Structures in Computer Science. [CrossRef]
  29. Poigné, A. Algebra categorically. In Category Theory and Computer Programming: Tutorial and Workshop, Guildford, UK, 16–20 September 1985 Proceedings; Pitt, D., Abramsky, S., Poigné, A., Rydeheard, D., Eds.; Springer Berlin Heidelberg: Berlin/Heidelberg, Germany, 1986; pp. 76–102. [Google Scholar] [CrossRef]
  30. de Bruijn, N.G. Lambda Calculus Notation with Nameless Dummies: A Tool for Automatic Formula Manipulation, with Application to the Church-Rosser Theorem. Indagationes Mathematicae 1972, 34, 381–392. [Google Scholar] [CrossRef]
  31. Ferreira, N.M. 2006; arXiv:math.CT/math/0604549].
  32. Riehl, E. Categorical Homotopy Theory; New Mathematical Monographs, Cambridge University Press, 2014. [CrossRef]
  33. Wolter, U. An Algebraic Approach to Deduction in Equational Partial Horn Theories. J. Inf. Process. Cybern. EIK 1990, 27, 85–128. [Google Scholar]
  34. Diskin, Z.; Kadish, B. A Graphical Yet Formalized Framework for Specifying View Systems. In Proceedings of the First East-European Symposium on Advances in Databases and Information Systems. Nevsky Dialect; 1997; pp. 123–132. [Google Scholar]
Figure 1. Stepwise construction of an Institution of First-Order Statements.
Figure 1. Stepwise construction of an Institution of First-Order Statements.
Preprints 148907 g001
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings

© 2025 MDPI (Basel, Switzerland) unless otherwise stated