# $Id: gedcom-relations.n3,v 1.17 2003/08/10 23:17:50 jderoo Exp $

# Original http://www.daml.org/2001/01/gedcom/gedcom-relations.xml by Mike Dean (BBN Technologies / Verizon)
# Rewritten in N3 (Jos De Roo AGFA)
# state that the rules are true (made by Tim Berners-Lee W3C)
# see also http://www.w3.org/2000/10/swap/Examples.html

@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix gc: <http://www.daml.org/2001/01/gedcom/gedcom#>.
@prefix : <gedcom#>.

gc:parent owl:inverseOf gc:child.
gc:grandparent owl:inverseOf gc:grandchild.
gc:ancestor owl:inverseOf gc:descendent.
gc:sibling a owl:SymmetricProperty.
gc:spouse a owl:SymmetricProperty.
gc:ancestor a owl:TransitiveProperty.
gc:parent rdfs:subPropertyOf gc:ancestor.

{:gc1. ?C gc:childIn ?F. ?P gc:spouseIn ?F} => {?C gc:parent ?P}.
{:gc2. ?C gc:parent ?P. ?P gc:sex :M} => {?C gc:father ?P}.
{:gc3. ?C gc:parent ?P. ?P gc:sex :F} => {?C gc:mother ?P}.
{:gc4. ?C gc:parent ?P. ?C gc:sex :M} => {?P gc:son ?C}.
{:gc5. ?C gc:parent ?P. ?C gc:sex :F} => {?P gc:daughter ?C}.

{:gc6. ?C gc:parent ?P. ?P gc:parent ?GP} => {?C gc:grandparent ?GP}.
{:gc7. ?C gc:grandparent ?GP. ?GP gc:sex :M} => {?C gc:grandfather ?GP}.
{:gc8. ?C gc:grandparent ?GP. ?GP gc:sex :F} => {?C gc:grandmother ?GP}.
{:gc9. ?C gc:grandparent ?GP. ?C gc:sex :M} => {?GP gc:grandson ?C}.
{:gc10. ?C gc:grandparent ?GP. ?C gc:sex :F} => {?GP gc:granddaughter ?C}.

{:gc11. ?C gc:childIn ?F. ?C2 gc:childIn ?F. ?C owl:differentFrom ?C2} => {?C gc:sibling ?C2}.
{:gc12. ?C gc:sibling ?S. ?S gc:sex :M} => {?C gc:brother ?S}.
{:gc13. ?C gc:sibling ?S. ?S gc:sex :F} => {?C gc:sister ?S}.

{:gc14. ?SP gc:spouseIn ?F. ?SP2 gc:spouseIn ?F. ?SP owl:differentFrom ?SP2} => {?SP gc:spouse ?SP2}.
{:gc15. ?SP gc:spouse ?H. ?H gc:sex :M} => {?SP gc:husband ?H}.
{:gc16. ?SP gc:spouse ?W. ?W gc:sex :F} => {?SP gc:wife ?W}.

{:gc17a. ?C gc:parent ?P. ?P gc:brother ?U} => {?C gc:uncle ?U}.
{:gc17b. ?C gc:parent ?P. ?P gc:sister ?A. ?A gc:spouse ?U} => {?C gc:uncle ?U}.
{:gc18a. ?C gc:parent ?P. ?P gc:sister ?A} => {?C gc:aunt ?A}.
{:gc18b. ?C gc:parent ?P. ?P gc:brother ?U. ?U gc:spouse ?A} => {?C gc:aunt ?A}.

{:gc19. ?P gc:daughter ?C. ?P gc:sibling ?S} => {?S gc:niece ?C}.
{:gc20. ?P gc:son ?C. ?P gc:sibling ?S} => {?S gc:nephew ?C}.
{:gc21. ?C gc:parent ?S. ?C2 gc:parent ?S2. ?S gc:sibling ?S2} => {?C gc:firstcousin ?C2}.
{:gc22. ?S gc:sibling ?S2. ?S gc:descendent ?D. ?S2 gc:descendent ?D2} => {?D gc:cousin ?D2}.

