# Domain

A Domain schema describes the types of objects, as well as relations between these objects, that Penrose diagrams work with. For example, say we want to use Penrose to draw a Venn diagram that represents the relationship between mathematical sets. We can declare the following domain schema:

```
type Set
predicate NotIntersecting(Set s1, Set s2)
predicate Intersecting (Set s1, Set s2)
predicate IsSubset (Set s1, Set s2)
```

This schema tells Penrose that the diagrams works with and illustrates *Set* objects and relations such as *NotIntersecting*, *Intersecting* and *IsSubset*.

Notably, the Domain schema are not *instructions* of how to draw the *Set* objects and relations between them. Such instructions of the specific diagram elements are provided by the Style schema, not the Domain schema. This allows multiple visual representations to be applied to objects from the same domain.

There are four types of statements that can appear in the Domain schema: Type, Predicate, Function, and Constructor declarations.

## Comments

*Comments* are lines in the schema that are ignored by the Penrose parser. They are for documentation purposes, and are not involved in the generation of the diagrams. In the Domain schema, they start with two dashes:

`-- this is a comment`