I have a questioin about how to define two different idividuals in SWRQL. Here is an example. If B isSonOf A; If C isSonOf A; Then B and C are brothers. Here is the SWRL rule: isSunOf(?BB, ?AA) ^ isSunOf(?CC, ?AA) -> isBrotherOf(?BB, ?CC)
I found in the reasoned results, B is isBrotherOf B himself. How to avoid this problem?
Thank you! Best regards, Yang
Use differentFrom(?a, ?b)
i.e.:
isSonOf(?a, ?c) ^ isSonOf(?b, ?c) ^ differentFrom(?a, ?b) -> isBrotherOf(?a, ?b)