@prefix : <http://example/scenario#>.
@prefix dex: <http://www.daml.org/2001/03/daml+oil-ex#>.
@prefix r: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix u: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix l: <http://www.w3.org/2000/10/swap/log.n3#>.

<> <#rcsid> "$Id: rdfg4.n3,v 1.1 2001/05/05 02:56:08 connolly Exp $".

:bill dex:hasFather :bob.
dex:hasFather u:domain dex:Animal;
	u:range dex:Male.

dex:Male u:subClassOf dex:Man.

@prefix g: <http://www.w3.org/2001/02pd/gv#>.

<> g:digraph [
  g:hasNode :bill, :bob,
	dex:Animal, dex:Male, dex:hasFather
  ].

dex:hasFather a g:EdgeProperty; a r:Property; u:label "hasFather".

# Color W3C terms blue
r:type u:isDefinedBy <http://www.w3.org/1999/02/22-rdf-syntax-ns>.
<http://www.w3.org/1999/02/22-rdf-syntax-ns> a :W3CSpec.
u:subClassOf u:isDefinedBy <http://www.w3.org/2000/01/rdf-schema>.
<http://www.w3.org/2000/01/rdf-schema> a :W3CSpec.
{{ :p u:isDefinedBy :d.
  :d a :W3CSpec. }
  l:implies { :p g:color "blue" }} a l:Truth; l:forAll :p, :d.

:itype u:subPropertyOf r:type.
:itype a g:EdgeProperty; g:label "type"; g:color "blue".

:bill g:label "Bill".
:bob g:label "Bob".
dex:Man a u:Class; u:label "Man".
dex:Woman a u:Class; u:label "Woman".
dex:Person a u:Class; u:label "Person".
dex:Animal a u:Class; u:label "Animal".
dex:Male a u:Class; u:label "Male".

u:Class a u:Class; u:label "Class";
  u:isDefinedBy <http://www.w3.org/2000/01/rdf-schema>.
u:domain a g:EdgeProperty; g:label "domain";
  u:isDefinedBy <http://www.w3.org/2000/01/rdf-schema>.
u:range a g:EdgeProperty; g:label "range";
  u:isDefinedBy <http://www.w3.org/2000/01/rdf-schema>.

# make classes bold with their labels inside
{{ :C a u:Class; u:label :str. }
  l:implies { :C g:style "bold"; g:label :str }} a l:Truth; l:forAll :C, :str.

# make properties bold&diamond with their labels inside
{{ :p a r:Property; u:label :str. }
  l:implies { :p g:shape "diamond"; g:label :str }} a l:Truth; l:forAll :p, :str.

{{ :t1 :p :t2.
   :p u:domain :C }
     l:implies { :t1 :itype :C. } } a l:Truth; l:forAll :t1, :t2, :p, :C.

{{ :t1 :p :t2.
   :p u:range :C }
     l:implies { :t2 :itype :C. } } a l:Truth; l:forAll :t1, :t2, :p, :C.

