Skip to content

Substance

The Substance program tells Penrose what objects and relations to draw. In the set-theory example, for example, we can have the following Substance program:

substance
Set A, B, C

Subset (A, C)
Subset (B, C)
Disjoint (A, B)

AutoLabel All

The first line declares the objects that are to be drawn, the last line tells Penrose to automatically label the objects based on their names. All other lines invoke the predicates defined in the Domain schema to declare relations between objects.

Notably, like the Domain schema, the Substance program does not contain any instructions about how, say, a Set must be rendered, or how the relation Subset should be reflected in the diagram. The Substance program only declares the existence of these objects and relations, whereas the Style program shows how these objects and relations can be drawn.

A Substance program may contain two types of statements: single statements or indexed statements.

Comments

Comments are ignored by the Penrose engine. In the Substance program, comments are declared using double dashes:

substance
-- this is a comment

Released under the MIT License.