# Some Examples of Sign Systems

We can illustrate the parts of the definition of sign system with some simple examples, starting with the very simple time of day. For computer scientists it may help to think of this as an abstract data type having just one sort, namely time, and just two constructors, one a constant time 0 (for midnight), and the other a successor operation s, where for a time t, s(t) is the next minute. There are no subsorts, data sorts, levels, or priorities. But there is an important axiom,

`             s^1440 (M) = M `
where s^1440 indicates 1440 applications of s, or more prosaically,
`             s^1440 (0) = 0 .`
These axioms capture the cyclic nature of time over days. Any reasonable representation for time of day must respect this axiom. Let's denote this sign system S1.

Another example is a 24 x 80 display for a simple line-oriented text editor. The main sorts of interest here are: char (for character), line, and screen. The sort char has two important subsorts: alphnum (alphanumeric) and spec (special); and alphanum has subsorts alpha and num. This gives the following graph for the subsort relation,

```              char
/    \
/      \
alphanum   spec
/   \
/     \
alpha   num
```
where of course alpha and num are also subsorts of char. These sorts also have levels in a natural way: screen is the most important and therefore has level 1, line has level 2, char has level 3, alphanum and spec have level 4, and alpha and num have level 5 (or we could give all subsorts of char level 4, or even 3 - this is a bit arbitrary until we have a clear application in mind). In addition, there are data sorts for data types that do not change but are needed to describe signs: these include at least the natural numbers, and possibly colors, fonts, etc., depending on the capability we want to give this system.

The constructors for this sign system let a line be any concatenation of up to 80 characters, and let a screen be any concatenation of up to 24 lines. (Priority is not an issue because there is just one constructor for each level.) We can define a length function on each sort having level above the characters, and then express the constraints "up to 24" and "up to 80" with axioms. Let us denote this sign system S2.

If we want to display texts on this screen, we also need to define a sign system for texts. The sorts here would be char, word, sentence, and text, in addition to data sorts and the subsorts of char as in S2 above. Text will be level 1, sentence level 2, word level 3, and character level 4. There are different choices for the constructors, but one simple one is to allow any concatenation of alphanum characters to be a word, any concatenation of words to be a sentence, and any concatenation of sentences to be a text. Let us denote this sign system S3. Clearly there will be many different ways to display texts on a screen; each will be a different semiotic morphism; we will come back to this later.

A somewhat different example of a sign system is given by simple parsed sentences, i.e. sentences with their "part of speech" explicitly given. The most familiar way to describe these is probably with a context free grammar, where we would have rules like

```     S  -> NP VP
NP -> N
NP -> Det N
VP -> V
VP -> V PP
PP -> P NP
.....
```
The "parts of speech" S, NP, VP, etc. are the sorts of this sign system, and the rules are its constructors. For example, the first rule says that a S can be constructed from a NP and a VP. There should also be some constants of the various sorts, such as
```     N -> time
N -> arrow
V -> flies
Det -> an
Det -> the
P -> like
......
```
Viewed as operations, we get the following:
```     NP VP -> S
N     -> NP
N Det -> N
V     -> VP
V PP  -> VP
P NP  -> PP
.....
time  -> N
.....
```
which "construct" something from its parts. Notice that it would really be a better use of the machinery that we have available to regard N as a subsort of NP and V as a subsort of VP, than to have these monadic operations N -> NP and V -> VP. Let's call this sign system S4. It is quite abstract, giving what computer scientists call "abstract syntax" for sentences, without saying how they are to be represented.

Nevertheless, we can get sentences, such as "time flies like an arrow". However, this linear way of representating a sentence fails to show its "syntactic structure". This is traditionally done with trees, as in

```               S
/ \
NP   VP
/    /  \
N    V    PP
/     |    / \
time flies  P   NP
/   /  \
like an  arrow
```
So called "bracket notation" can also be used to show the syntactic structure of sentences, as illustrated in the paper [8a] and in Section 3.1 with the following:

[[[[the]Det [light]N]NP [[on]Prep [[the]Det [left]N]NP]PP]NP [[comes]V [on]Part]VP]Sent