<> <#rcsid> "$Id: rpo-rules.n3,v 1.1 2006/03/09 19:24:32 lkagal Exp $".

@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix math: <http://www.w3.org/2000/10/swap/math#>.
@prefix list: <http://www.w3.org/2000/10/swap/list#>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix : <http://eulersharp.sourceforge.net/2003/03swap/rpo-rules#>.

### RDF plus OWL rules

rdfs:subClassOf rdfs:domain rdfs:Class; rdfs:range rdfs:Class; a owl:TransitiveProperty.
rdfs:subPropertyOf rdfs:domain rdf:Property; rdfs:range rdf:Property; a owl:TransitiveProperty.
owl:inverseOf rdfs:domain owl:ObjectProperty; rdfs:range owl:ObjectProperty; a owl:SymmetricProperty.
owl:differentFrom rdfs:domain owl:Thing; rdfs:range owl:Thing; a owl:SymmetricProperty.
owl:distinctMembers rdfs:domain owl:AllDifferent; rdfs:range rdf:List.
rdf:first rdfs:domain rdf:List; rdfs:range rdfs:Resource; a owl:FunctionalProperty.
rdf:rest rdfs:domain rdf:List; rdfs:range rdf:List; a owl:FunctionalProperty.

{?P rdfs:domain ?C. ?S ?P ?O} => {?S a ?C}.
{?P rdfs:range ?C. ?S ?P ?O} => {?O a ?C}.
{?A rdfs:subClassOf ?B. ?S a ?A} => {?S a ?B}.
{?P rdfs:subPropertyOf ?R. ?S ?P ?O} => {?S ?R ?O}.
{?P owl:inverseOf ?Q. ?S ?P ?O} => {?O ?Q ?S}.
{?P a owl:SymmetricProperty. ?S ?P ?O} => {?O ?P ?S}.
{?P a owl:TransitiveProperty. ?X ?P ?O. ?S ?P ?X} => {?S ?P ?O}.
{?P a owl:FunctionalProperty. ?S ?P ?X. ?S ?P ?Y} => {?X = ?Y}.
{?P a owl:InverseFunctionalProperty. ?X ?P ?O. ?Y ?P ?O} => {?X = ?Y}.
{?A owl:distinctMembers ?D. ?D rdf:rest ?R} => {?A owl:distinctMembers ?R}.
{?A owl:distinctMembers ?D. ?L :subListOf ?D. ?L rdf:first ?X; rdf:rest ?R. ?Y list:in ?R} => {?X owl:differentFrom ?Y}.
{?C owl:oneOf ?L. ?X list:in ?L} => {?X a ?C}.

{?L rdf:first ?I; a rdf:List} => {?I list:in ?L}.
{?L rdf:rest ?R; a rdf:List. ?I list:in ?R} => {?I list:in ?L}.
{?L a rdf:List} => {?L :subListOf ?L}.
{?L rdf:rest ?R; a rdf:List. ?X :subListOf ?R} => {?X :subListOf ?L}.
{?C owl:intersectionOf (?A ?B). (?X ?A) :mu ?M. (?X ?B) :mu ?N. ?M math:lessThan ?N} => {(?X ?C) :mu ?M}.
{?C owl:intersectionOf (?A ?B). (?X ?A) :mu ?M. (?X ?B) :mu ?N. ?M math:notLessThan ?N} => {(?X ?C) :mu ?N}.
{?C owl:unionOf (?A ?B). (?X ?A) :mu ?M. (?X ?B) :mu ?N. ?M math:lessThan ?N} => {(?X ?C) :mu ?N}.
{?C owl:unionOf (?A ?B). (?X ?A) :mu ?M. (?X ?B) :mu ?N. ?M math:notLessThan ?N} => {(?X ?C) :mu ?M}.
{?C owl:complementOf ?A. (?X ?A) :mu ?M. (1.0 ?M) math:difference ?N} => {(?X ?C) :mu ?N}.



