This note concerns formal notation for conceptual spaces, conceptual
morphisms, and conceptual blending, in the sense developed in *An Introduction to Algebraic Semiotics, with
Applications to User Interface Design* (hereafter, we may refer to
this as "the paper"). But instead of the notation developed there, we will
use the notation of the OBJ algebraic
specification language; this notation is actually executable, though we do
not use that capability except for checking the syntax of our theories and
morphisms, i.e., we use the OBJ3 implementation as a type checker for
algebraic semiotics. For much more detail on OBJ3, see its manual, which is
called *Introducing OBJ*.
If you want to try OBJ3 yourself, it is available for UCSD Unix machines at
`/net/cat/disk1/goguen/obj`; alternatively, you could try a newer
version of OBJ, called BOBJ, which is
available on UCSD Unix machines at `/net/cat/disk1/bobj/bobj`; the code
given here runs under both these versions of OBJ.

Readers of this document should refer to the paper, especially the large
diagram on page 20, and they will also need some of the definitions given in
the paper, especially those on pages 18 to 22. We will refer to a diagram
having the shape of the one on page 19 as a **diamond diagram**, and in
such a diagram, refer to the composition of the two morphisms on its left as
its **left morphism**, to the composition of the two morphism on its right
as its **right morphism**, to the middle upward morphism as its **center
morphism**, to the triangle on its left as its **left triangle**, and to
the triangle on its right as its **right triangle**. The extent to which
these two triangles commute will be an important part of our analysis.

Before we go further, please note that the names used in our formal
descriptions are arbitrary, in the sense that changing them does not in any
way change the formal meaning of the descriptions. This is because these
descriptions only concern formal structure, and do not even try to capture
*meaning* in any deep human sense. However, we do try to choose names
that will help the reader's intuition.

It always helps to consider a concrete example, so let's look at how to
blend the two words "boat" and "house", as in the paper. We first specify the
builtin data types that are used in the example. These are the Booleans
(which are imported via the phrase `pr BOOL`) and a so-called
"enumerated type" for what we shall call "media," which in this example can be
either land or water:

Next, we give theories for the three given conceptual spaces of our
example, beginning with the generic space; all of these import the
`DATA` theory, as indicated by "`pr DATA`". Note that this
generic space not only has sorts for the two kinds of thing in the example
other than media, but it also has a "generic element" for each sort, where the
generic element has the same name as its sort, but without the initial
capitalization. (Of course, this is an arbitrary convention, chosen to be
helpful to human readers, as are the names chosen for the sorts, elements,
relations, and the space itself.)

We now give the theory and three morphisms (three because the center morphism must be included, since we consider the generic theory to be auxiliary) for our first blend of our given two spaces and three morphisms:

In the above `HOUSEBOAT` blend, the two triangles commute for all
three sorts in the generic space (noting that the data sort `Medium` is
required to be preserved in any case), and similarly for the two generic
constants `object` and `person` (but not for `medium`,
which is why we have left it out of the second `GENERIC` space - if it
were still there, then commutativity would be impossible - see the discussion
in Section 3 of the Appendix below), because each one of them maps to the same
element of the blend space via the three different paths. Similarly, each of
the two relations (which appear as Boolean valued operations) in the generic
space map to the same relation in the blend via the three different paths.
Moreover, for each pair of elements in the generic space for which a relation
holds, the corresponding elements in the blend space satisfy the corresponding
relation, which means that all three paths preserve these two axioms in the
same way. Thus we have commutativity in the strong sense for this blend. But
note that because the `GENERIC` theory is auxiliary in this example,
strong commutativity is not required; in fact, although strong commutativity
holds for this blend with the new generic space, it does not hold with the
original generic space. Hence this blend has commutativity for everything
except the constant `medium`, but weak commutativity altogether.

Now let's consider a second blend. Here are its space and three morphisms:

In this case, even with the second (smaller) generic space, neither
triangle commutes in the strong sense, because the boat ends up in the house,
as reflected by the generic element `object` being mapped to
`boat` in the blend by the right morphism (which is the composition of
morphisms `M2` and `M4`), but being mapped to `boathouse`
by the left morphism (the composition of `M1` with `M3`); as a
result, the central morphism cannot preserve the element `object`,
because there is no consistent place to map it. Similarly, since `M4`
preserves `psngr`, the central morphism cannot preserve the generic
element `person`, and the some goes for the generic `use`
operation. On the other hand, the generic relation `on` goes to the
same place under all three maps, although its generic axiom is not preserved.
It is interesting to notice that in order for the relation `live-in` to
type check in the `BOATHOUSE` theory, the subsort declaration that
appears there is needed; the same holds even more dramatically for the map of
`resident` to `boat` under the morphism `M3`. Thus we
should define a different, even more restricted subtheory of the original
`GENERIC` space, on which everything commutes in the strong sense, and
therefore weakly commutes on the older generic space. (This discussion differs
from that in the paper, which gave a space that did not include all possible
material from `BOAT`, e.g., the constant `psngr` and the
relation `ride` which holds of the passenger; but otherwise this blend
is the same.)

There is a third blend which is similar to (in fact, symetrical with) the
above `BOATHOUSE` blend, in which the house ends up riding in the boat.
(As noted in the paper, there are real world examples of this blend, where a
boat is used to transport prefabricated houses across some body of water,
e.g., for a new housing development on a nearby island; some people have told
me that they have actually seen this, though I have not seen it myself.) This
blend has similar (in fact, symmetrical) commutativity properties to those of
the `BOATHOUSE` blend discussed above. It is left as an interesting
exercise for the reader to write OBJ code for this blend.

There is also a fourth blend, the meaning of which is less familiar than
the first three, but the preservation and commutativity properties of which
are very good, corresponding to the fact that this concept is a very pure
blend of its input spaces, even though its physical existence is dubious.
This concept is that of an amphibious RV (recreational vehicle): a vehicle
that you can live in, and that you can ride in on land and on water. Here all
aspects of `HOUSE` and `BOAT` are realized, without any
surprising transpositions, like a house riding a boat. It is left as an
interesting exercise for the reader to write OBJ code for this blend. (The3
paper says that this blend has worse preservation and commutativity properties
than the previous three, but this is an error.)

All of the OBJ code on this webpage has been successfully run in OBJ3, though it did not always run the first time, because OBJ3 caught some bugs in the initial versions; it has also been run in BOBJ, after fixing some bugs in that system. It is interesting to notice that, depending on how we choose to handle truth values in OBJ, we can implement either the assumption that relations not declared true are false by default, or the assumption that it is not known whether they are true or false. (Of course, we can in any case write an equation that explicitly declares a relation to be false on some arguments.)

It seems exciting that our intuitive sense of the relative purity of these four blends corresponds precisely to the extent to which their triangles commute, since this is the criterion given for measuring the quality of blends that is suggested in the paper.

In order to analyze "real" examples like those described above (though of course they are not really real, but are only idealized models of some key aspects that are especially relevant to the blends in questions), within the rigorous mathematical framework of algebraic semiotics (and OBJ), it is necessary to apply some `tricks' in writing the conceptual spaces and their morphisms. The purpose of this appendix is to explain in some detail some of the tricks that were used in the preceeding discussion.

**1. Functions vs. Relations**

A first challenge in writing formal definitions of conceptual spaces is how
to represent relations and facts that a certain relation holds, or does not
hold, on certain arguments. If one is using OBJ, as we are here, relations
are not directly available, and so one must somehow represent them with
functions. The most obvious way to do this is by represent a relation as a
Boolean values function. It is then natural to use an equation to assert that
a relation is true of certain arguments, and also to assert that it is false
certain arguments; by using variables, such assertions can be made for large
(even infinite) classes of arguments. Moreover, it is easy to treat unknown
cases as either true of false, using OBJ's builtin function `==`. In
the first case, one uses tests of the form

**2. Partial Preservation**

A second challenge is to use a notation that was intended for total preservation to represent partial preservation; we showed above how to do this using an OBJ view from subtheory of the source, instead of the original theory. The idea here is that every partial morphism from the original theory corresponds to a total morphism from a subtheory of the source theory.

**3. Strong and Weak Commutativity**

We can apply the trick of Section 2 above to reduce any instance of weak commutativity to a corresponding instance of strong commutativity over a subtheory of the source theory, and in fact, this is what we did in the main discussion above, by replacing the generic space by a subtheory.

However, because we are trying to model "real" phenomena of blending, we
should give some further justification of our choice to make `M1`,
`M2` and `C` partial. Let us consider the second blend. Here
one can argue that `C` really should map the generic constant
`object` to the main object of `BOATHOUSE`, which is
`boathouse`. Actually, this argument is right for our conventional
boathouse concept, and `C` can perfectly well do this, but its
restriction to the subtheory will still be the morphism that we have given
above, so there is no problem here. (But it should be noted that there is an
alternative conceptualization where the focus of attention is on the boat
instead of the house, so this choice is somewhat arbitrary.) Of course, the
situation here is that the composition of `M1` with `M3` maps
`object` to `boathouse`, whereas the composition of `M2`
with `M4` maps `object` to `boat`, so that commutativity
would fail for the right triangle if all the morphisms were defined on
`object`, even though the left triangle would commute (or vice versa if
we took the other choice for `C`).

**4. Conjunctive Elements**

Our final trick appears in our first blend, the `HOUSEBOAT` blend.
Here we combined the two relations `live-in` and `ride` into a
single relation, `live&ride`, which plays the role of the generic
`use` relation. Although this example does not require it, it would be
possible to provide a "fine structure," showing that the `live&ride`
relation implies each of the `live-in` and `ride` relations. It
would then also be possible to map `live-in` and `ride` in the
input theories to the corresponding relations in the blend theory, although
this would result in less preservation and commutativity. For this reason,
the way we have set things up seems preferable.

I thank Lisa Tolentino, with whom discussing these ideas has helped me to clarify some of them (though they may still not be in their final form). Thanks also to Kai Lin for fixing BOBJ so that it could run this code.

To OBJ source code for this webpage.

To OBJ output for that source code.

To CSE 271 homepage

Maintained by Joseph Goguen

Last modified: Sun Jul 22 13:56:30 PDT 2001