Relations are the verbs of the knowledge system. They connect subjects to objects and determine how vectors are combined during encoding. This page explains how relations work geometrically, lists the built-in relation types, and describes how to define custom verbs.
Encoding a fact: The object vector is permuted according to the relation, then added to the subject vector with saturating arithmetic. Different relations use different permutations, keeping the dimensionality fixed while encoding role information.
Each relation has a unique permutation table that reorders vector dimensions. When encoding "Dog IS_A Animal", the system:
This produces a single point that represents the fact. See RelationPermuter for implementation details.
Many relations have inverses. If A CAUSES B, then B CAUSED_BY A. Inverse relations use inverse permutations, so the encoding is consistent in both directions.
Some relations are symmetric: SIMILAR_TO is the same in both directions. Symmetric relations reuse the same permutation for both subject and object roles.
Relations like IS_A support transitivity: if Dog IS_A Mammal and Mammal IS_A Animal, then Dog IS_A Animal. The Reasoner handles transitivity through chain checking.
| Relation | Inverse | Meaning | Example |
|---|---|---|---|
IS_A |
HAS_INSTANCE |
Type/class membership | Dog IS_A Animal |
PART_OF |
HAS_PART |
Mereological containment | Wheel PART_OF Car |
SUBCLASS_OF |
SUPERCLASS_OF |
Class hierarchy | Mammal SUBCLASS_OF Animal |
| Relation | Inverse | Meaning | Example |
|---|---|---|---|
CAUSES |
CAUSED_BY |
Direct causation | Fire CAUSES Smoke |
ENABLES |
ENABLED_BY |
Precondition | Key ENABLES Door_Opening |
PREVENTS |
PREVENTED_BY |
Inhibition | Vaccine PREVENTS Disease |
| Relation | Inverse | Meaning | Example |
|---|---|---|---|
LOCATED_IN |
CONTAINS |
Spatial containment | Paris LOCATED_IN France |
NEAR |
NEAR |
Proximity (symmetric) | Library NEAR School |
ABOVE |
BELOW |
Vertical position | Sky ABOVE Ground |
| Relation | Inverse | Meaning | Example |
|---|---|---|---|
BEFORE |
AFTER |
Temporal ordering | Monday BEFORE Tuesday |
DURING |
CONTAINS_TEMPORALLY |
Temporal containment | Meeting DURING Morning |
OVERLAPS |
OVERLAPS |
Partial overlap (symmetric) | Event1 OVERLAPS Event2 |
| Relation | Inverse | Meaning | Example |
|---|---|---|---|
PERMITS |
PERMITTED_BY |
Permission | License PERMITS Driving |
PROHIBITS |
PROHIBITED_BY |
Prohibition | Law PROHIBITS Theft |
OBLIGATES |
OBLIGATED_BY |
Obligation | Contract OBLIGATES Payment |
REQUIRES |
REQUIRED_BY |
Requirement | Driving REQUIRES License |
| Relation | Meaning | Example |
|---|---|---|
HAS_PROPERTY |
Attribute assignment | Water HAS_PROPERTY liquid |
HAS_VALUE |
Numeric value | Water HAS_VALUE temp=100 |
HAS_ATTRIBUTE |
Named attribute | Car HAS_ATTRIBUTE color=red |
| Relation | Symmetric | Meaning | Example |
|---|---|---|---|
SIMILAR_TO |
Yes | General similarity | Dog SIMILAR_TO Wolf |
DIFFERENT_FROM |
Yes | Explicit distinction | Cat DIFFERENT_FROM Dog |
AGISystem2 supports defining custom relations beyond the built-in set. Custom verbs enable domain-specific knowledge representation.
# In Sys2DSL DEFINE_RELATION TREATS inverse=TREATED_BY transitive=false # Usage ASSERT Aspirin TREATS Headache ASK "What TREATS Headache?"
| Property | Description | Default |
|---|---|---|
inverse |
Name of inverse relation | None (unidirectional) |
symmetric |
Same in both directions | false |
transitive |
Chains apply (A→B→C means A→C) | false |
permutation_seed |
Seed for deterministic permutation | Hash of name |
# Medical domain DEFINE_RELATION TREATS inverse=TREATED_BY DEFINE_RELATION CONTRAINDICATED_WITH symmetric=true DEFINE_RELATION METABOLIZED_BY inverse=METABOLIZES ASSERT Aspirin TREATS Pain ASSERT Aspirin CONTRAINDICATED_WITH Warfarin ASSERT Aspirin METABOLIZED_BY Liver # Legal domain DEFINE_RELATION GOVERNS inverse=GOVERNED_BY DEFINE_RELATION SUPERSEDES inverse=SUPERSEDED_BY transitive=true ASSERT GDPR GOVERNS DataProcessing ASSERT Regulation_2023 SUPERSEDES Regulation_2020
The Chat Interface maps natural language phrases to relations:
| Natural Language | Relation |
|---|---|
| "is a", "are", "is a type of" | IS_A |
| "has", "contains", "includes" | HAS_PART |
| "causes", "leads to", "results in" | CAUSES |
| "is caused by", "comes from" | CAUSED_BY |
| "is in", "located in" | LOCATED_IN |
| "requires", "needs" | REQUIRES |
| "allows", "permits" | PERMITS |
| "prohibits", "forbids" | PROHIBITS |
| "is before", "precedes" | BEFORE |
| "is similar to", "is like" | SIMILAR_TO |
Different relations create different geometric patterns. IS_A creates nested regions (subsets). CAUSES creates directional links between separate regions. SIMILAR_TO implies proximity in the space.