@prefix : <http://www.w3.org/2001/Talks/05www10-swfig/ddr-fig#>.
@prefix df: <http://www.w3.org/2001/02pd/daml-fig#>.
@prefix dpo: <http://www.daml.org/2001/03/daml+oil#>.
@prefix dex: <http://www.daml.org/2001/03/daml+oil-ex#>.
@prefix exd: <http://www.daml.org/2001/03/daml+oil-ex-dt#>.
@prefix g: <http://www.w3.org/2001/02pd/gv#>.
@prefix l: <http://www.w3.org/2000/10/swap/log.n3#>.
@prefix u: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix xsd: <http://www.w3.org/2000/10/XMLSchema#>.

<> g:digraph :theGraph.

:theGraph
  g:hasNode dex:Senior,
	dex:Person,
	exd:over59,
	dex:age,
	dpo:nil,
	xsd:nonNegativeInteger.

exd:over59 u:subClassOf xsd:nonNegativeInteger.
xsd:nonNegativeInteger u:label "non-neg int".

dpo:intersectionOf a :PropertyOfInterest.
dpo:first a :PropertyOfInterest.
dpo:rest a :PropertyOfInterest.
dpo:onProperty a :PropertyOfInterest.
dpo:toClass a :PropertyOfInterest.
u:subClassOf a :PropertyOfInterest; a g:EdgeProperty.

<> l:forAll :g, :p, :str, :n1, :n2, :R, :C.

{ :p u:label :str } l:implies { :p g:label :str }. # too much?

{ :g g:hasNode :n1.
  :n1 :p :n2.
  :p a :PropertyOfInterest.
 }
   l:implies { :g g:hasNode :n2.  }.

{ :g g:hasNode :n1.
  :n1 dpo:rest :n2.
 }
   l:implies { :g g:hasNode :n2. }.

{ :g g:hasNode :n1.
  :n1 dpo:first :n2.
 }
   l:implies { :g g:hasNode :n2. }.

# e.g. age of senior is over59
#  turns into a red arc from senior to over59
{ :R dpo:onProperty :p; dpo:hasClass :C.
  :p u:label :str }
   l:implies { :R [ a g:EdgeProperty; g:label :str; g:color "red" ] :C }.

