:- ensure_loaded(qtest_header).
:- ensure_loaded(qtest).
:- ensure_loaded(vrdf).    % use_module ?

go :-
	load_surnia,
	run_qtests.

qtest(sameAs_identity) :-
	vrdf(x, owl:sameAs, x, Proof),
	print_message(informational, format('Proof: ~q', [Proof])).

qtest(sameAs_commute) :-
	rdf_reset_db,
	rdf_assert(x, owl:sameAs, y, given),
	vrdf(y, owl:sameAs, x, Proof),
	print_message(informational, format('Proof: ~q', [Proof])).

qtest(sameAs_trans) :-
	rdf_reset_db,
	rdf_assert(x, owl:sameAs, y, given),
	rdf_assert(y, owl:sameAs, z, given),
	vrdf(x, owl:sameAs, z, Proof),
	print_message(informational, format('Proof: ~q', [Proof])).

qtest(sameAs_trans_commute) :-
	rdf_reset_db,
	rdf_assert(x, owl:sameAs, y, given),
	rdf_assert(y, owl:sameAs, z, given),
	vrdf(z, owl:sameAs, x, Proof),
	print_message(informational, format('Proof: ~q', [Proof])).

qtest(inverse_of_IFP_is_FP) :-
	rdf_reset_db,
	rdf_assert(a, rdf:type, owl:'InverseFunctionalProperty', given),
	rdf_assert(a, owl:inverseOf, b, given),
	vrdf(b, rdf:type, owl:'FunctionalProperty', Proof).

qtest(use_of_IFP) :-
	rdf_reset_db,
	rdf_assert(a, rdf:type, owl:'InverseFunctionalProperty', given),
	rdf_assert(b, a, x, given),
	rdf_assert(c, a, x, given),
	vrdf(c, owl:sameAs, b, Proof).



/*

   vrdf_provide_by_predicate('http://www.w3.org/1999/02/22-rdf-syntax-ns#type', b, 'http://www.w3.org/2002/07/owl#FunctionalProperty', Proof).

  */

