Equivalence Relations in Grakn


I am interested in building out a schema that contains many equivalence relations, as this schema would link several ontologies together. What would be the most advised way of implementing something like a ‘sameAs’ relation in the Grakn schema?



This is a feature that could potentially be added to the define query. Would you please issue a feature request for it? :slight_smile:

In the meanwhile, there is a way to achieve this using a rule.

say we have,

  a sub entity;
  b sub entity;

to have b as an alias of a, we would have:

  b_is_alias_a sub rule,
    when {
      $x isa a;
    }, then {
      $x isa b;


Why and how does that rule work? If isa checks if $x is an instance of a particular type, how can it be both a and b? There would be no way to define x to be both a and b outside of inheritance, right?
Is this a case of the rule/inference semantics being more “free” than the definition semantics? Or are my assumptions wrong?