A structure homomorphism from a structure to a structure
for a common language
is a function that preserves
the interpretations of the constants, relations,
and functions in
. In logic, this use of the term
"homomorphism" is similar to but somewhat
different from its use in abstract algebra. It
is a special case of a "morphism" from category theory.
Let ,
and
be structures for a common language
, and let
. Then
is a homomorphism from
to
provided that it satisfies the following:
1. For each constant ,
.
2. For each predicate symbol of arity
, whenever
, one has
.
3. For each function symbol (or operation) , if the arity of
is
, then for any
,
For example, let and
be directed graphs,
where
and
are their sets of vertices, and
and
are their sets of directed edges.
A homomorphism from
to
is a function
such that whenever
, one has
.
Another example is available in the theory of ordered groups. Let and
be ordered groups. (We are using
the symbol
to denote the multiplicative inversion operation. We will drop the superscripts
and
,
and for any
(or
),
we denote
by
.)
Formal application of our definition of a homomorphism in this setting indicates
that
is a homomorphism iff it satisfies the following:
1. .
2. For ,
.
3. For any ,
.
4. For any ,
if
,
then
.
The first and third conditions follow from the second for groups, so group homomorphisms are often defined only by preservation of multiplication. The fourth condition records preservation of the order relation.
The homomorphisms of universal algebra are special cases of structure homomorphisms, and the notion of a structure homomorphism also extends the corresponding morphism notions in categories of ordered sets and various relational/algebraic structures.