Truth is a simple but powerful format for representing data and structure. It does so by establishing what things are, and what they have. And through these declarations of existence, an ontology is formed, which becomes a true-to-life, machine-readable representation of some body of knowledge. Furthermore, there is a natural way to attach Agents, which are plugin-like packages that interpret the Truth, and produce some asset, such as a graph, a block of code, or potentially many other things.
Truth is so simple, yet so profound.
In the beginning, Truth is formless and empty. There exists absolutely nothing–no strings, no numbers, no built-in framework. It is up to the human to establish what exists. This is simply a matter of writing it out:
Tree
The colon, or joint operator is used to establish an is a relationship:
Plant Tree : Plant
In English, this translates to: “There exists what we call Plant and Tree, and Tree is a kind of Plant”. A type can be a derivation of many bases:
Plant Natural Resource Tree : Plant, Natural Resource
And from these simple expressions, we have encoded our simple understanding of the existence of a tree. This can be visualized with the Grapher agent inside the Truth editor:
Containment, meaning "an X has a Y", is expressed with indentation. The indentation pattern is infinitely recursive, allowing statements to be nested as many levels as necessary.
Plant Natural Resource Measurement Tree : Plant, Natural Resource Height : Measurement Trunk Circumference : Measurement
And so it has been established that a Tree has a Trunk, and that a Trunk has a Height and a Circumference, which are both a Measurement. However, it has not been established what a Measurement actually is, only that it exists. In order to create a closer-to-reality statement of existence, patterns can be used:
Plant Natural Resource Measurement /\d+ cm : Measurement Tree : Plant, Natural Resource Height : Measurement Trunk Circumference : Measurement
Patterns start with the forward slash, and the content that follows is a regular expression. In this case, the expression states: “Digits, followed by 1 space, followed by cm are a Measurement”. This will be demonstrated shortly, but first, another concept must be introduced.
In Truth, there exists the phenomena known as Wide Inheritance. When a complex type T is introduced, and a type U is introduced that is a kind of T, the logic follows that the entire structure of T, including all of it's direct and indirect relationships, must exist within the structure of U. Suppose the following example, where the type U implicitly has a Box, and that Box also has a Size:
T Box Size U : T
Any is-a relationships established on Size manifest within U. Furthermore, the inherited types of U may be re-declared for the purpose of expressing refinement:
Number Measurement : Number T Box Size : Number U : T Box Size : Measurement
While refinement of types is permissable, refinements must not contradict what has been previously established. In such a case, we would have not Truth, but a non-sensical arrangement of words:
Number Vegetable T Box Size : Number U : T Box Size :Vegetable
Moving back to the original example, it is now possible to demonstrate Aliases, which are types that resolve through a Pattern, and finally to a named type.
Plant Natural Resource Measurement /\d+ cm : Measurement Tree : Plant, Natural Resource Height : Measurement Trunk Circumference : Measurement Comfort Maple : Tree Height : 24500 cm Trunk Circumference : 600 cm
And so it has been established that the Comfort Maple is a Tree. It has a Height which is 24500 cm, and this is a Measurement. And this is correct, because it was previously established that anything that is a Tree has a Height, which must be some type of Measurement.