Primitive terms

Relations

When a relation is used in a term, it stands for all pairs it contains at the moment it is evaluated. Those pairs (also referred to as the contents or population of the relation) can change over time as users add or delete pairs from it.

When a relation is used in a term, we can just use its name if that is unambiguous. For instance the name owner refers to RELATION owner[Person*Building] if that is the only relation the ampersand-compiler can link it to. In some cases, however the name alone is ambiguous. For example if there are two relations with the same name and different signatures. In such cases Ampersand will try to infer the type from the context. That however does not always succeed. In such cases, Ampersand generates an error message that asks you to remove the ambiguity by adding the correct type.

If a pair (a,b)(a,b) is an element of a relation rr, we write a r ba\ r\ b. Alternatively we may write (a,b)r(a,b)\in r , since we know that rr is a set.

Identity

For every concept CC, the term I[C]I_{[C]} exists. It refers to the identity relation. It means that for every aCa\in C and bCb\in C we have:

a=b  a I[C] ba = b\ \Leftrightarrow\ a\ I_{[C]}\ b

The type of I[C]I_{[C]} is [CC][C*C]. In Ampersand code you write I[C].

Complete relation

For every pair of concepts AA and BB the term V[AB]V_{[A*B]} refers to the complete relation. For every aAa\in A and bBb\in B we have:

a V[AB] ba\ V_{[A*B]}\ b

The type of V[AB]V_{[A*B]} is [AB][A*B]. In Ampersand code you write V[A*B].

Other explanation

Would you like a different explanation of the primitive terms? This page explains the primitive terms in terms of set theory. Click here for the explanation of primitive terms in natural language.

Last updated