@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix c: <http://www.w3.org/2000/10/swap/pim/contact#>.
@prefix tr: <http://www.w3.org/2001/02pd/rec54#>.
@prefix doc: <http://www.w3.org/2000/10/swap/pim/doc#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

<>
  dc:description """a transcription of the RDF Schema
	closure rules from the RDF model theory spec.""",
        "$Id: rdfs-rules.n3,v 1.6 2009/02/26 17:01:42 timbl Exp $";
  dc:source [ = <http://www.w3.org/TR/2002/WD-rdf-mt-20020214/>;
    a tr:WD;
    dc:date "2002-02-14";
    dc:title "RDF Model Theory";
    doc:versionOf <http://www.w3.org/TR/rdf-mt/>;
    tr:editor [ c:fullName "Patrick Hayes" ]
  ];
  doc:obsoletes <../../../../2001/05ve/rdfs.n3>;
  rdfs:seeAlso <http://www.agfa.com/w3c/euler/rdfs-rules.n3>.


rdfs:Resource rdf:type rdfs:Class.
rdfs:Literal rdf:type rdfs:Class.
rdfs:Class rdf:type rdfs:Class.
rdf:Property rdf:type rdfs:Class.

rdf:type rdf:type rdf:Property.
rdf:type rdfs:domain rdfs:Resource.
rdf:type rdfs:range rdfs:Class.


rdfs:domain rdf:type rdf:Property.
rdfs:domain rdfs:domain rdf:Property.
rdfs:domain rdfs:range rdfs:Class.


rdfs:range rdf:type rdf:Property.
rdfs:range rdfs:domain rdf:Property.
rdfs:range rdfs:range rdfs:Class.


rdfs:subPropertyOf rdf:type rdf:Property.
rdfs:subPropertyOf rdfs:domain rdf:Property.
rdfs:subPropertyOf rdfs:range rdf:Property.


rdfs:subClassOf rdf:type rdf:Property.
rdfs:subClassOf rdfs:domain rdfs:Class.
rdfs:subClassOf rdfs:range rdfs:Class.

# Apply the following rules recursively to generate all legal RDF triples (i.e. until none of the rules apply or the graph is unchanged.) Here, xxx, yyy and zzz stand for any uriref, bNode or literal, aaa for any uriref, and uuu for any uriref or bNode (but not a literal).

@prefix : <rdfs-rules#>.
@prefix rr: <rdfs-rules#>. # hint

@prefix log:  <http://www.w3.org/2000/10/swap/log#> .
@forAll :xxx, :yyy, :zzz, :aaa, :uuu.
@forAll :bbb, :ccc. #@@not delcared in prose.

#rdf1

{ :xxx :aaa :yyy } log:implies { :aaa rdf:type rdf:Property }.

#rdfs2

{ :xxx :aaa :yyy.
  :aaa rdfs:domain :zzz } log:implies { :xxx rdf:type :zzz }.

#rdfs3

{ :xxx :aaa :uuu.
  :aaa rdfs:range :zzz. } log:implies { :uuu rdf:type :zzz }.

#rdfs4a

{ :xxx :aaa :yyy} log:implies { :xxx rdf:type rdfs:Resource }. #@@hmm...

#rdfs4b
{ :xxx :aaa :uuu} log:implies { :uuu rdf:type rdfs:Resource }.

#rdfs5 @@hmm... why is this here?

{ :aaa rdfs:subPropertyOf :bbb.
  :bbb rdfs:subPropertyOf :ccc. } log:implies { :aaa rdfs:subPropertyOf :ccc }.

#rdfs6

{ :xxx :aaa :yyy.
  :aaa rdfs:subPropertyOf :bbb } log:implies { :xxx :bbb :yyy }.

#rdfs7 @@hmm... these rdfs:Resource rules seem superfluous

{ :xxx rdf:type rdfs:Class } log:implies { :xxx rdfs:subClassOf rdfs:Resource }.

#rdfs8

{ :xxx rdfs:subClassOf :yyy.
  :yyy rdfs:subClassOf :zzz. } log:implies { :xxx rdfs:subClassOf :zzz }.

#rdfs9

{ :xxx rdfs:subClassOf :yyy.
  :aaa rdf:type :xxx } log:implies { :aaa rdf:type :yyy }.


<> dc:description """
$Log: rdfs-rules.n3,v $
Revision 1.6  2009/02/26 17:01:42  timbl
fix old this syntax

Revision 1.5  2002/07/18 05:09:33  connolly
published RDF version of sniffSchema, with properties declared

Revision 1.4  2002/04/11 19:43:27  connolly
copy of v1.1; timbl clobbered it

Revision 1.1  2002/03/15 17:42:37  connolly
per spec

""".
