@prefix rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix daml: <http://www.daml.org/2000/10/daml-ont#>.
@prefix nph:  <http://www.w3.org/2001/04/18/noun-phrase-names#>.
@prefix set:  <http://www.w3.org/2001/04/18/set#>.
@prefix tmpl: <http://www.w3.org/2001/04/18/template#>.
@prefix rule: <http://www.w3.org/2001/04/18/rule#>.
@prefix horn: <http://www.w3.org/2001/04/19/horn#>.
@prefix :     <local:>.

:r2 horn:conclusion 
      [ 
           horn:subject   [ horn:nameAsConstant :a ];
	   horn:predicate [ horn:nameAsConstant :b ];
	   horn:object    [ horn:nameAsVariable :x ]
      ];
    horn:premise 
      [ set:enumeration (
         [ 
           horn:subject   [ horn:nameAsVariable :x ];
	   horn:predicate [ horn:nameAsConstant :b ];
	   horn:object    [ horn:nameAsConstant :c ]
         ]
         [ 
           horn:subject   [ horn:nameAsVariable :x ];
	   horn:predicate [ horn:nameAsConstant :b ];
	   horn:object    [ horn:nameAsVariable :y ]
         ]
      ) ].

:foo :b :c.
:foo :b :bar.
:foo :b :baz.
:second :b :c.
:second :b :whatever.

# assert_n3('ht2.n3').
# clause(property(A,B,C), X), X\=true.
# A = local:a
# B = local:b
# C = _h112
# X = (property(_h112,local:b,local:c)  ','  property(_h112,local:b,_h197));
# 
# no
# | ?- property('local:a', X,Y). 
# 
# no
# | ?- assert(property(foo,'local:b', 'local:c')).
# 
# yes
# | ?- assert(property(foo, 'local:b', bar)).
# 
# yes
# | ?- property('local:a', X,Y). 
# 
# X = local:b
# Y = foo
# yes
# |
