@prefix math: <http://www.w3.org/2000/10/swap/math#>.
@prefix e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>.
@prefix : <tak#>.

{(?X ?Y ?Z) :tak ?Z} <= {
	("=<" ?X ?Y) e:derive true.
	("!") e:derive true.
}.

{(?X ?Y ?Z) :tak ?A} <= {
	("_X-1" ?X) e:calculate ?X1.
	(?X1 ?Y ?Z) :tak ?A1.
	("_Y-1" ?Y) e:calculate ?Y1.
	(?Y1 ?Z ?X) :tak ?A2.
	("_Z-1" ?Z) e:calculate ?Z1.
	(?Z1 ?X ?Y) :tak ?A3.
	(?A1 ?A2 ?A3) :tak ?A.
}.
