@prefix v: <http://www.w3.org/2001/09/01-borges/variables#>.
@prefix dot: <http://www.w3.org/2001/02pd/gv#>.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix ont:  <http://www.daml.org/2001/03/daml+oil#> .
@prefix contact: <http://www.w3.org/2000/10/swap/pim/contact#>.
@prefix u: <http://www.w3.org/2000/01/rdf-schema#> .

# simple vanilla rules to associate color based on properties of a
# directed labeled graph

<> dot:digraph v:theGraph;
   dot:label "$Id: ".

this log:forAll v:s, v:p, v:o, v:c, v:l. 

{ v:s [ u:subPropertyOf v:p ] v:o 
} log:implies { 
  v:s v:p v:o 
}.

u:label u:subPropertyOf dot:label.

{ v:theGraph dot:hasNode v:s.
  v:s v:p v:o.
  v:p a dot:EdgeProperty.
} log:implies { 
  v:theGraph dot:hasNode v:o.
}.

{ v:theGraph dot:hasNode v:o.
  v:s v:p v:o.
  v:p a dot:EdgeProperty.
} log:implies { 
  v:theGraph dot:hasNode v:s.
#@@  v:s dot:label "".
  v:s dot:style "filled".
  v:s dot:color "grey".
#  v:s dot:shape "circle".
}.

{ v:p a v:TextProperty; 
    dot:color v:c; 
    dot:label v:l.
  v:s v:p v:o 
} log:implies {
  v:s [ a dot:EdgeProperty;
       dot:label v:l;
       dot:color v:c;
       dot:fontcolor v:c ]
  [ ]
}.

# assert some additional characteristics for all dot:EdgeProperties

{ v:p a dot:EdgeProperty; 
    dot:color v:c; 
    dot:label v:l.
  v:s v:p v:o 
} log:implies {
  v:p a dot:EdgeProperty;
    dot:label v:l;
    dot:color v:c;
    dot:fontcolor v:c
}.


# make assertion to smoosh resources that have identical mailboxs

contact:mailbox a ont:UnambiguousProperty.


