Traditional expositions of Universal Algebra are based on finite Cartesian products. As a first step of a smooth transition from traditional algebras to graph algebras, we reformulate in this section some very basic concepts and results of Universal Algebra utilizing sets of maps instead of finite Cartesian products .
In parallel, we try to lift the traditional set-theoretic definitions, constructions and proofs in Universal Algebra to a more general and abstract level utilizing category-theoretic concepts and constructions. The objective is to pave the way from traditional operations and algebras via graph operations and graph algebras to operations and algebras in topoi.
3.1. Signatures, Algebras and Homomorphisms
To declare the arities of operation symbols we use canonical finite indexing sets
For all
we assume
to be equipped with a fixed total order
thus we can reuse the tuple notation to represent maps
as discussed in
Section 2.
Definition 1 (Signature). A signature is given by
a set ofoperation symbols,
a map assigning to each operation symbol as its arity a pair of finite sets with for some , and .
We say that is ann-ary operation symbol if . If for , we say also that is aconstant symbol.
Remark 1 (Sets as Arities). There can be arbitrary many finite separeted inputs for an algebraic operation. We decide to work with explicit sets of names for the “input positions”. In contrast to possibly multiple inputs, it is usually assumed that an algebraic operation has exactly one single output. For conformity reasons we introduce also a name for the single output position. This brings us closer to graph algebras where the single-output paradigm will be given up. As well the input as the output arity of a graph operation can be an arbitrary finite graph (see Definition 15).
Definition 2 (Algebra). Let Σ be a signature. A Σ-algebra given by
a set A, called the carrier of , and
a family of maps called .
We say that is ann-ary operation if . If , we say also that is a constant operation, or simply aconstant.
In the case where the signature has no constant symbols, the empty set constitutes a -algebra, called the empty Σ-algebra.
Now we reformulate the traditional concept of homomorphism.
Definition 3 (Homomorphism).
Let Σ be a signature. A -homomorphism
between two Σ-algebras and is a map satisfying the following homomorphism condition
For any sets
A,
B,
I each map
induces a map
thus we can, more abstractly but equivalently, express the homomorphism condition
(HC) by the requirement that the above right square of maps commutes. Note, that in case of constant symbols
,
the homomorphism condition turns into the equation
if we apply our conventions in
Section 2 concerning the tuple notation.
Given any -algebra , the identity map on the carrier set induces an identity -homomorphism . Similarly, given any -homomorphisms , , the composition of the underlying maps induces a -homomorphism . This defines the category with all -algebras as objects and all -homomorphisms as morphisms.
Proposition 1 (Forgetful Functor).
The assignments and define a faithful forgetful functor
Characteristic for any incarnation of the concept
algebra is that the corresponding categories of algebras inherit all limits from the respective
underlying category. For the abstract concept of
-algebra for an arbitrary functor
, for example, the category of all
-algebras inherits all limits from the category
[
11].
It is well-known that the category inherits all limits from the category . Following our methodological intention to lift things up to a more categorical element-free level, we demonstrate that the decision to work with sets of maps instead of Cartesian products enables us to give a pure categorical concise proof of this classical result. Since we want to do all later constructions and argumentations within , we restrict ourselves to small limits.
Theorem 1 (Limits). inherits any small limit from the category , i.e., the functor reflects small limits. has therefore all small limits since does.
Proof. Let be a small graph and be a diagram in where for all vertices v in . We have to show that any limit cone over the translated diagram induces a limit cone over in such that is a -algebra with L as its carrier.
To define the operations in
, we note that for any operation symbol
in
and any map
we get a commutative cone
in
with
for all
v in
. Applying the respective operations
to the maps
gives us a new cone
in
with
for all vertices
v in
. Now, for any edge
in
, we have that
is a
-homomorphism from
to
and thus, by the homomorphism condition and commutativity of
we have
which encapsulates that the cone
is commutative. By the universal property of
, there is a unique map
which satisfies
for all
v in
. By defining
, we ensure that each map
induces a
-homomorphism
for all
v in
. Thus, we get indeed a commutative cone
in
.
It remains to show that
is a limit cone, i.e. for any other commutative cone
in
, we have to show that there is a
-homomorphism
such that
for all
v in
. Note that
p induces a commutative cone
in
with
for all
v in
. As
is a limit cone over
, there exists a unique map
such that
for all
v in
. We claim that
extends to the desired
-homomorphism, by showing that
for any
in
and
. By definition,
is the unique map such that
holds for all
v in
. Indeed, the map
also satisfies this equality for all
v in
as
By uniqueness of mediating morphisms we get (
5), which shows that
is indeed a
-homomorphism from
. Moreover, it is the unique homomorphism such that
and thus,
is a limit cone. □
Remark 2 (Hom-sets).
The proof of Theorem 1 is based on the convention in Section 2 that we consider as a shorthand notation for the collection (hom-set) of all morphisms in from I to A. is a set since is locally small.
is isomorphic to a corresponding exponential object
in , but this isomorphism does not play any role in the paper.
3.2. Subalgebras
As in the traditional approach, we can define subalgebras by means of set inclusions.
Definition 4 (Subalgebras). Let be a signature. A Σ-algebra is a -subalgebra of a Σ-algebra , in symbols, if and for all and the following diagram commutes:
Here is the corresponding inclusion map from A into B.
A comparison of Definition 3 and Definition 4 makes, however, obvious that we can also simply describe -subalgebras as special kinds of -homomorphisms.
Corollary 1 (Subalgebras as Inclusion Homomorphisms). For Σ-algebras and such that we have that is a Σ-subalgebra of if, and only if, the inclusion map establishes a Σ-homomorphism .
Since one of our objectives is to lift the traditional set-theoretic exposition of Universal Algebra to a more category-theoretic one, we will use, from now on, the concepts “-subalgebra” and “inclusion -homomorphism” interchangeably.
We know that the monomorphisms (epimorphisms) in are exactly the injective (surjective) maps, respectively. Any faithful functor reflects monomorphisms and epimorphisms. The forgetful functor is faithful thus we obtain
Corollary 2 (Injective and surjective Homomorphisms). If the underlying map of a Σ-homomorphism is injective (surjective) then is a monomorphism (epimorphism) in .
In the traditional set-theoretic approach to Universal Algebra, a preferred tool to describe, construct and reason about subalgebras are subsets of the carrier which are closed w.r.t. to applications of the operations in the algebra.
Definition 5 (Closedness). Let be a Σ-algebra. We say a subset isclosed in if for all and the result of applying the operation in to the input factors through the inclusion map , i.e., there exists a map such that the following diagram commutes:
If is a -subalgebra of then the carrier A of is obviously closed w.r.t. all the operations in . On the other side, the inclusion map is a monomorphism in . Therefore the map in Definition 5 is unique if it exists. In such a way, the assignments define a total operation from to if A is closed, and we obtain the following result.
Proposition 2 (Subalgebra ≅ Closed Subset). There is a one-to-one correspondence between Σ-subalgebras of and closed subsets of .
Proposition 2 suggests that there may be actually no need for the auxiliary concept closed subset in a more category-theoretic approach. This conjecture is supported by the observation that we can reconstruct the standard result that closed subsets are closed w.r.t. intersection, reformulated in terms of inclusion homomorphisms, as a special case of Theorem 1. To see this, we have to realize that the intersection of subsets can be described as a special limit construction, namely multiple pullbacks, in .
Remark 3 (Multiple Pullbacks). Let I be a set and M be an I-indexed family of subsets of a set B. We can describe this situation by a diagram with a small graph given by , , and δ defined by for all , and inclusion maps for all .
It is well-known and straightforward to prove that the intersection together with the inclusion maps , and is a limit cone of the diagram in .
Limits of this shape are also calledmultiple pullbacks and they reflect monomorphisms: For any category , any diagram and any limit cone all the morphisms , are monomorphisms in as as long as all the morphisms , are.
Due to Remark 3 we can now replace and enhance the traditional statement
“If M is a family of closed subsets in , then its intersection is closed as well”
by the following corollary of Theorem 1.
Corollary 3 (Intersection of Subalgebras). For any set I, any Σ-algebra , and any diagram of Σ-subalgebras , of there is a unique Σ-subalgebra of with that is a Σ-subalgebra of for all .
Moreover, the inclusion Σ-homomorphisms , and constitute a multiple pullback, i.e., a limit cone of the diagram in .
We call also the intersection of the I-indexed family of Σ-subalgebras of and may use the notations , or, simply, to denote .
Traditionally, the
-subalgebra
of a
-algebra
generated by a subset can be defined as the
-subalgebra with the carrier
constructed as the intersection of the following family of closed sets in
:
Since, the collection of all subsets of a set B is a set as well, this definition matches the pattern of Corollary 3. We only have to choose for I the set itself or any isomorphic set.
Using this sleight of hand, we can take full advantage of the universal property of the intersection of subalgebras in , as stated in Corollary 3, and lift up the concept “generated by a subset” to the concept “accessible via a map”.
Definition 6 (Subalgebra accessible via a Map). For any Σ-algebra and any map let be the set of all Σ-subalgebras of such that f factors through the inclusion map , i.e., there exists a map such that .
We denote by the intersection of , according to Corollary 3. Especially, the carrier of is the intersection of sets. We call the-subalgebra of accessible (reachable) via for thehomomorphic image of A w.r.t. f.
In case of inclusion maps we also use the traditional notation instead of and also call the-subalgebra of generated by A.
Note, that the map in Definition 6 is unique, if it exists, since the inclusion map is a monomorphism in .
Corollary 4 (Homomorphic image includes Image). For any Σ-algebra and any map we have for the(set-theoretic) image of A w.r.t. the map f.
Proof. Follows immediately from the observation that for the set of all subsets Y of B such that f factors through the inclusion map and that due to the definition of and in Definition 6 and the definition of . □
Remark 4 (Well-powered). In category theory the adjective well-powered is used for categories where for all objects A in the collection of all subobjects of A is a set.
Of course, we do have the traditional concept of generated algebra and corresponding results available.
Definition 7 (Accessible and Generated Algebras). Let be a Σ-algebra.
isaccessible via a map if.
If is accessible via an inclusion map , i.e., if, we say also that isgenerated by A.
is said to be generated if it is generated by the empty set, i.e., accessible via the unique map from the initial object ∅ in to B.
Corollary 5.
A Σ-algebra is generated if, and only if, there are no proper Σ-subalgebras of .
Corollary 6. If a signature Σ has no constant symbols, then the empty Σ-algebra is the only generated Σ-algebra.
The concept accessible via a map can be utilized to find a characterization of epimorphisms in . First, we observe that “accessible via a map” implies “epic”.
Lemma 1 (Accessible implies Epic). A Σ-homomorphism is an epimorphism in if is accessible via the underlying map , i.e., if .
Proof. We consider arbitrary Σ-homomorphisms such that .
We know that the set together with the inclusion map is an equalizer of the maps in . According to 1, there is a unique Σ-algebra such that becomes an inclusion Σ-homomorphism which is, moreover, the equalizer of the Σ-homomorphisms . Assumption ensures that there exists a unique map with . Due to the construction of in Definition 6, we have an inclusion Σ-homomorphism . Accessibility of means thus we get, finally, . This means, however, that the equalizer of g and h is the identity on B thus we have as required. □
To show that, on the other side, epic implies accessible we can take advantage of the following result.
Proposition 3 (Subalgebras are Regular Monos). For any Σ-subalgebra of a Σ-algebra there exists a Σ-algebra and parallel Σ-homomorphisms such that is the equalizer of g and h.
Proof. We construct the pushout of the span
of inclusion maps (see the left diagram below). We set
,
, and
. Since
is injective both maps
are injective too and, moreover, the pushout square is as well a pullback square. This ensures, especially, that
is the equalizer of the maps
in
. The pushout property of the square provides a unique map
such that
Operations on C: We extend now C to a Σ-algebra by defining for each in a corresponding operation . For any in we do have four possible cases.
-
Case 1
-
factors through : There exists a map such that (see the right diagram above). is unique since is a monomorphism. We simply set
-
Case 2
factors through : Analogously to Case 1.
-
Case 3
Overlapping of Case 1 and 2: There exist maps such that . Due to the pullback property of the square there exists a unique such that . The homomorphism property of ensures thus we get, finally, . That is, in the event of an overlapping, Case 1 and Case 2 define the same output . Note, that there will always be an overlapping for constant symbols!
-
Case 4
-
factors neither through
nor through
: This can only happen if
with
. Utilizing the operations in
to a maximal extent, Cases 1 and 2 define a partial map from
to
. However, since we restrict ourselves to total operations, we have to find an ad hoc totalization trick
to turn into a total operation. Employing (7), we may decide to utilize the operations in to produce outputs in the left copy of B in . We set
The operations in
are defined by (
8) exactly in a way that the maps
and
become Σ-homomorphisms
. Note, that
Case 4 has no relevance for the homomorphism property of
and
! Theorem 1 ensures, finally, that the inclusion Σ-homomorphism
is the equalizer of the Σ-homomorphisms
. □
Regularity of entails that the concepts accessible and epic are equivalent.
Proposition 4 (Accessible ≅ Epic). For any Σ-homomorphism it holds that is accessible via the underlying map , i.e., in other words is equal to the homomorphic image of w.r.t. f, if, and only if, is an epimorphism in .
Proof. “Accessible implies epic” has been shown in Lemma 1. We show now “epic implies accessible”: We consider an arbitrary Σ-subalgebra of such that there exists a map with . Due to Proposition 3 there exist Σ-homomorphisms such that is the equalizer of g and h. Due to the assumption , we get and thus since f is epic. This means, however, and, finally, due to the construction of in Definition 6. □
The axiom of choice is equivalent to the statement that all epimorphisms in the category are split, i.e., there exists a map such that . As a consequence each homomorphism between -algebras maps closed subsets to closed subsets. Especially, we have
Lemma 2 (Closed Images). For any Σ-homomorphism the (set-theoretic) image of the carrier A of is closed in . We denote by the unique Σ-subalgebra of with carrier and call it the(set-theoretic) image of w.r.t. the -homomorphism f.
Lemma 2 is the last brick we need to conclude that the epic -homomorphisms are exactly the surjective one.
Corollary 7 (Epic ≅ Surjective). For any Σ-homomorphism we have thus is an epimorphism in if, and only if, the map is surjective.
Proof. By Corollary 4 we have . Lemma 2 gives us the Σ-subalgebra of at hand and ensures due to the construction of in Definition 6. This gives us since two Σ-subalgebras of a Σ-algebra are equal if, and only if, they do have the same carrier. By Proposition 4 we get epic if, and only if, . , however, means that f is surjective. □
Remark 5 (Stepwise Generation of Closed Subsets).
There is another, more constructive, way to construct the closed sets . We start with A and add all the elements from B that we can reach by applying successively the operations in to elements that have already been reached. A categorical analysis, formalization, and generalization of this stepwise iterative construction can be found in [12], for example.
3.3. Terms and Term Algebras
We define terms as strings of symbols. To distinguish terms from metalevel expressions, such as
, 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. The following is a traditional inductive definition of terms similar to [
13,
14]:
Definition 8 (Terms). The set of all -terms over a set X of variables is the smallest set of strings of symbols such that
-
Variables:
, for all ;
-
Constants:
, for all with ;
-
Operations:
, for all with , and all maps in .
Note that the assignments , assigning to each variable the string consisting only of a single symbol denoting this variable, define an injective map : . Note, moreover, that in case each operation symbol is reborn as the -term .
A term can be seen as a “tree-like computation scheme” and if we assign to variables certain values in an algebra we can compute a value in this algebra following this computation scheme. Terms are constructed inductively thus we can define this kind of evaluation of terms also inductively.
Definition 9 (Evaluation of terms). For any set X of variables, any Σ-algebra and any map (called a variable assignment ) we can define inductively a map :
-
Variables:
, for all ;
-
Constants:
, for all ;
-
Operations:
, for all .
All three cases in Definition 9 are disjoint and terms are only equal if, and only if, they are equal as strings thus is uniquely defined.
There is no indication in Definition 8 and Definition 9, respectively, where the sets of -terms live and where the evaluation of -terms takes place. A very common and powerful practice in Universal Algebra is to internalize -terms as elements of carriers of -algebras and to encode term evaluation by -homomorphisms: First, we observe that the stepwise construction of terms in Definition 8 can be reflected by defining for each operation symbol in a corresponding (constructor) operation on :
Definition 10 (Term algebra). For a set X of variables we define the term -algebra over X by
-
Constants:
, for all with , and
-
Operations:
, for all with , and all maps in .
Note that the term -algebra is generated by . This is implicitly ensured by the statement of being the smallest set satisfying the conditions in Definition 8. We say that the elements in are the generators of .
Second, we observe that the introduction of term -algebras allows us to encode the defining equations for the cases Constants and Operations in Definition 9 by the requirement that the map should establish a -homomorphism :
-
Constants:
, for all ;
-
Operations:
, for all where is the map in defined by .
The third case Variables in Definition 9 simply requires that the map is an extension of the map thus the statement “Definition 9 defines uniquely” is transformed into the statement that the term -algebra is a -algebra freely generated by X.
Proposition 5 (Term Algebras as Free Construction). Given a set X of variables, the Σ-term algebra has the following universal property: For any Σ-algebra and any map there exists a unique Σ-homomorphism such that .
The universal property in Proposition 5 characterizes uniquely up to isomorphism and the case gives us initial -algebras at hand.
Corollary 8. is initial in the category .
It is a standard result for free constructions that the assignments
and
define a (free) functor
that is
left-adjoint to the forgetful functor
(see [
15]).
3.4. Substitutions
The very appealing advantage of internalizing terms as elements of carriers of algebras, encoding term evaluations as homomorphisms and thus having the adjunction at hand, is that we get a fully fledged, well-defined and well-behaved substitution calculus for free relying on general results in Category Theory. We insert an informal exposition what we mean by a substitution calculus and what the expected features of such a calculus could be. The advantages of the “internal view of terms” will be discussed afterwards.
3.4.1. Substitution Calculi
The concept substitution is a kind of conceptual descendant of the concept variable. A variable in an expression is a “free location” where we can put in expressions of a certain kind. The basic constituent of a substitution calculus is its specific way to describe a
- (1)
substitution (declaration), i.e., an assignment of expressions to variables.
In Universal Algebra, we can formalize substitutions as maps . For finite sets we may simply declare a substitution by listing the corresponding assignments .
The second constituent of a substitution calculus is the specific mechanism for
- (2)
substitution application, i.e., the replacement of occurrences of variables in a given expression by the expressions assigned to the variables by a substitution.
A common practice in Universal Algebra [
14] is to denote the resulting term in
of applying a finite substitution
to a term
t in
by
An obvious, but not always trivial, requirement for substitution application is
- (3)
preservation of well-formedness, i.e., replacing variables in a well-formed expression by well-formed expressions should result in a well-formed expression.
In case of terms, “well-formedness” simply means that we consider only those strings of symbols as terms which can be generated inductively by the three rules in Definition 8.
Lets assume we have three collections of expressions and two linkable substitutions. The first substitution replaces variables in expressions from the first collection by expressions from the second collection thus its application produces expressions in the second collection. Analogously, the second substitution replaces variables in expressions from the second collection by expressions from the third collection and its application results in expressions from the third collection. In this situation, we do have two possibilities to transform expressions from the first collection into expressions from the third collection. First, we can apply both substitutions successively. Second, we can compose both “small step” substitutions into a single “big step” substitution. That is, we apply the second substitution to all the expressions appearing in the definition of the first substitution and obtain a new substitution replacing variables in expressions from the first collection by expressions from the third collection. This puts another feature of substitution calculi on the agenda:
- (4)
composition of linkable substitutions.
The composition of the two linkable finite substitutions
from
to
and
from
to
results, for example, in the finite substitution
from
X to
.
Obviously, we would like that the application of the “big step” substitution produces always the same result as the successive application of the two linkable “small step” substitutions, i.e., for a substitution calculus we require that
- (5)
composition of substitutions is compatible with substitution application.
For the two linkable finite substitutions above this requirement can be expressed by the equation
Compatibility of composition of substitutions with substitution application ensures usually another useful property:
- (6)
composition of substitutions is associative.
These are the six syntactic features we would claim to be the essential characteristics of a substitution calculus as such. If a substitution calculus is, however, part of a bigger logic formalism where also semantic structures are considered, we will have some additional features concerning the interplay of syntax and semantics.
In analogy to substitutions, we have first to choose a way to describe
- (7)
variable assignments, i.e., assignments of semantic items to variables.
In Universal Algebra, we work exclusively with variables ranging over elements in sets thus variable assignments can be defined as maps from a set of variables into the carrier set of a -algebra , as we have done in Definition 9.
In analogy to the step from substitution (declaration) to substitution application, each variable assignment should induce a corresponding
- (8)
evaluation of expressions, computing for each expression a unique semantic item or truth value, respectively.
Definition 9 presents, for example, an inductive definition of the evaluation of -terms into elements in the carrier A of a -algebra induced by a variable assignment .
Since variable assignments establish a bridge from syntax to semantics, there is no composition of variable assignments in a substitution calculus. We should, however, have
- (9)
composition of substitutions with variable assignments as well as composition of variable assignments with homomorphisms.
For both new kinds of composition it is desirable to have
- (10)
compatibility w.r.t. substitution application and/or evaluation, respectively.
Finally, it would be reasonable to require
- (11)
associativity for the three new possible combinations of the four kinds of composition, i.e., substitution-substitution-assignment, substitution-assignment-homomorphism, and assignment-homomorphism-homomorphism, respectively.
3.4.2. Substitutions by Algebraic Extensions
We discuss now the specialties of the “internalization approach” in view of the informal concept of a substitution calculus outlined in the last subsection.
Features (7) & (8): Variable assignments are formalized as maps from a set of variables into the carrier set A of a -algebra and the corresponding unique term evaluations are inductively defined maps according to Definition 9.
Introducing term -algebras and realizing that the inductive definition of unique term evaluations can be described as unique algebraic extensions of variable assignments , as stated in Proposition 5, has three immediate consequences.
- Feature (1):
Substitutions become simply a special case of variable assignments and
- Feature (2):
Substitution applications appear as a special case of term evaluations namely as algebraic extensions
. Applying a substitution
to a
-term
means nothing but to compute the
-term
. As mentioned before, it is common to use instead of
also the more informative notation in (
10) in case of finite sets of variables.
- Feature (3):
Preservation of well-formedness is implicitly ensured by the fact that the structures, we define in Definition 10 (Term algebra), are indeed -algebras.
Feature (9): The composition of a substitution with a variable assignment , is the variable assignment while Feature (10), i.e., the compatibility of substitution application and evaluation, is ensured by the uniqueness of algebraic extensions: (see the left diagram below).
Feature (4)
composition of linkable substitutions becomes a special case of feature (9): The composition of a substitution
and a substitution
is the substitution
. In such a way, Feature (5)
composition of substitutions is compatible with substitution application becomes a special case of feature (10):
(see the right diagram above). Equation
12 is spelling out this equation for the finite case.
Also the remaining part of feature (9) and (10), respectively, is ensured by Proposition 5: The composition of a variable assignment with a -homomorphism , for example, is the variable assignment and the uniqueness of algebraic extensions ensures compatibility: .
Finally, all the compatibilities together with the associativity of composition of maps gives us also the three kinds of associativity required by feature (11). The proof of the associativity
substitution; (substitution; assignment) = (substitution; substitution); assignment,
for example, is simply given by compatibility of substitution application and evaluation as well as associativity of map composition: for arbitrary substitutions , and assigments .
Remark 6 (No Internalization). Of course there is no need to utilize internalization of terms and uniqueness of algebraic extensions to establish a fully-fledged substitution calculus for Universal Algebra! Instead, we could just work out separately each of the necessary definitions and proofs based on the inductive definition of terms analogously to Definition 9 (Evaluation of Terms). Internalization simply saves us a lot of work if it comes to substitutions!
On the other side, internalization is obviously not helpful in establishing substitution calculi for pure syntactic logic frameworks and/or for logic frameworks without operations. Also in logic frameworks, where some variables may range over logic formulas, internalization of terms will be of restricted help.
As an example of a definition that is independent of Proposition 5, we give an explicit inductive definition of substitution application.
Definition 11 (Substitution Application). For any sets X, Y of variables and any substitution we can define inductively a corresponding substitution application such that :
-
Variables:
, for all ;
-
Constants:
, for all ;
-
Operations:
, for all .
Remark 7 (Kleisli Category).
The composition of substitutions defined above, together with as the identity substitution for every set X gives us a category of substitutions. In more abstract categorical terms, this is exactly the Kleisli category
of the adjunction , which is equivalent to the full subcategory of of all term Σ-algebras (see, for example, [15]).
3.6. Terms and Derived Operations
For any set X and any -algebra the evaluation of -terms over X in is actually a map from into A. In Definition 9 we fix an arbitrary element and define a corresponding map by varying inductively over . That is, we describe the map from into A by an -indexed family of maps . This kind of splitting is the basis for the internalization trick.
We can, however, also proceed the other way around. We can represent the map from into A by a -indexed family of maps from into A or . is the singleton used in Definition 1 to declare the output arity of operation symbols.
Definition 12 (Derived Operations).
For any set X of variables, any Σ-algebra and any Σ-term we define a corresponding derived operation
, i.e., the map
We call the maps derived operations since they are built up from the basic operations in (compare Definition 14 below). Derived operations live on the same “external level” as the basic operations, i.e., outside of carrier sets of algebras. Terms represent those derived operations, thus it is opportune to also have a complementary external view on terms and consider them as syntactic entities living together with operation symbols on the same external level. Especially, we can consider terms as entities existing independent of and prior to algebras.
To support and validate the external view on terms, we should avoid the sleight of hand in Definition 12 and define derived operations, independent of Definition 9, simply by constructing new maps from given maps.
The only two constructions we need for this purpose are available in any category with finite products: Composition of maps (morphisms) and tupling of maps (morphisms). Since we use non-traditional finite products , instead of traditional Cartesian products , to define domains and codomains of operations, it is probably worth to spell out the corresponding version of tupling we will rely on.
Definition 13 (Tupling of Maps).
For any family of maps with we can construct a map , defined by
For an empty family of maps, denotes the constant map assigning to all the only element in represented by the empty tuple .
Now we are prepared to give an inductive definition of derived operations. The base cases are projection maps, represented by variables, and constant maps. The induction step is implicitly divided into two steps: first tupling and then composition with a basic operation.
Definition 14 (Construction of Derived Operations). For any set X and any Σ-algebra we define inductively for all Σ-terms a corresponding derived operation as follows
-
Variables:
for all the (projection) map is defined by for all ;
-
Constants:
, for all ;
-
Operations:
, for all , .