Inverse Functional Property

One account, one owner: two names that share it belong to one person.

owl-inverse-functional-property.n3 · output · proof · check · try it in the playground


The question

Some values identify their owner: an e-mail address, a passport number, an account. In OWL such a property is an owl:InverseFunctionalProperty: one value can belong to at most one subject.

Both :alice and :aliceAlias have the account :shared.

What does that tell us about the two names?


What we tell Eyeron

:account a owl:InverseFunctionalProperty .
:alice :account :shared .
:aliceAlias :account :shared .

The rule: two subjects with the same value of an inverse functional property are the same thing.

{
    ?P a owl:InverseFunctionalProperty .
    ?X ?P ?O .
    ?Y ?P ?O
} => {
    ?X owl:sameAs ?Y
} .

A second rule ends in false: an inference fuse that stops the run if two such subjects were also stated to be owl:differentFrom each other.


What Eyeron concludes

:alice owl:sameAs :aliceAlias .
:aliceAlias owl:sameAs :alice .
:alice owl:sameAs :alice .
:aliceAlias owl:sameAs :aliceAlias .

The first two answer the question. The last two appear because ?X and ?Y may match the same subject: the rule never asks them to differ.


The proof, step by step

Even the self-identity has a proof, with Alice’s one fact used twice:

{ :alice owl:sameAs :alice . }
  pe:rule 1;
  pe:binding
    [ pe:var "O"; pe:value :shared ],
    [ pe:var "P"; pe:value :account ],
    [ pe:var "X"; pe:value :alice ],
    [ pe:var "Y"; pe:value :alice ];
  pe:uses
    { :account a owl:InverseFunctionalProperty . },
    { :alice :account :shared . },
    { :alice :account :shared . }.

The step for :alice owl:sameAs :aliceAlias has the same shape, with :aliceAlias :account :shared as its third premise. The proof has 7 steps: 4 rule steps and 3 given facts.


Checked: what the report says

# checked: 7 steps, 7 verified, 0 trusted
pe:verdict pe:checked;
pe:condition [ pe:id "C6"; pe:name "boundary consistency"; pe:checked 1; pe:failed 0 ];

The verdict is checked, with nothing taken on trust.


Try it

eyeron examples/owl-inverse-functional-property.n3      # the conclusions
eyeron -p examples/owl-inverse-functional-property.n3   # with the proof
eyeron -c examples/owl-inverse-functional-property.n3   # the proof, checked

Add :alice owl:differentFrom :aliceAlias .: the fuse fires, Eyeron reports the contradiction and exits with code 65.


Takeaway

An identifying value merges the names that carry it, and a fuse guards against data that says they must stay apart.