# 8.4 Relation types

## What is a relation hierarchy

A relation hierarchy is a type hierarchy as defined above, with a number of restrictions, given below.

## Two kinds of relation labels

The elements of a relation hierarchy R are called relation labels. Each relation label is either:

• primitive or
• defined.

## Valence

For every relation label in R, there is a positive integer n (greater than or equal to 1) called its valence. A relation label of valence n is said to be n-adic. Again, we give the names "monadic", "dyadic" and "triadic" to 1-adic, 2-adic, and 3-adic relation labels.

For example, "In" is a dyadic relation label:

```   [Person: Romeo]->(In)->[City: Manchua]
"Romeo is in Manchua"
```

The valence of a relation label is the number of arrows going to and from the relation.

## Signature

A relation label has a signature, which is an ordered list

```  <t1,t2,...,tn>
```

Each type in the signature corresponds to the concept type of a concept connected to the relation. The last arc, as you may recall, points away from the relation, and corresponds to the last type in the signature. All the other arcs point towards the relation.

For example, the signature of the Agnt (Agent) relation is

`<Act,Animate>`

This means that the arc going from the relation (corresponding to the last type, "Animate") must point to a concept whose type is either Animate or a subtype of Animate.

Likewise, the arc pointing towards the relation (corresponding to the type "Act") must point to a concept whose type is either Act or a subtype of Act.

This can be seen in the following graph:

```  [Sing]->(Agnt)->[Person: MarilynMonroe]
"Sing has an agent, which is a person, who is Marilyn Monroe"
"Marilyn Monroe sings"
```

Here, Person is a subtype of Animate, and Sing is a subtype of Act. Note how this matches the signature, and how the directions of the arcs are as they are because of the signature.

## Primitive relation labels

A primitive relation label is a relation label that has no definition, but has been placed in the relation hierarchy by means of the "≤" subtype relation. However, a primitive relation label still has a signature, which must be specified as part of the definition of the primitive type label.

Thus a primitive type label is both defined and not defined. Its signature, and therefore its valence, must be defined, but its content or meaning need not be defined. Also, its position in the type hierarchy is fixed by means of the subtype-relation.

## Defined relation labels

An n-adic defined relation label is the combination of:

1. its name, and
2. an n-adic lambda expression called its definition.

A defined relation label and its definition are interchangeable: Where one could be used, the other could be substituted.

For example, the relation "GoingTo" could be defined like this:

```   relation GoingTo(*x,*y) is
[Person: ?x]<-(Agnt)<-[Go]->(Dest)->[City: ?y]
```

and could be used like this:

```   [Person: John]->(GoingTo)->[City: Aalborg]
```

## Relations need not be relation labels

A relation need not be a relation label. It can also be a lambda expression with the same valence as the relation itself.

For example, instead of using the monadic relation label "IsBlue", we can use a lambda expression:

```  [Person: John]<-([Object: ?x]->(Attr)->[Blue])
```

## Relation labels with different valences are not subtypes of each other (optional)

This section is advanced material and is optional. Feel free to skip it.

The last constraint on a relation hierarchy R is the following: If:

1. a is an n-adic relation label in R,
2. b is an m-adic relation label in R, and
3. n is not equal to m,

Then none of the following is true:

• a < b
• a > b
• a = b

What this says is that only an n-adic relation label a can only be a subtype of an n-adic relation label b. That is, for a relation label a to be a subtype of relation label b, both must have the same valence.

Prev: 8.3 Quiz: Concept types
Up: 8 Ontology in conceptual graphs
Next: 8.5 Quiz: Relation types