@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix math: <http://www.w3.org/2000/10/swap/math#>.
@prefix : <https://eyereasoner.github.io/eye/reasoning#>.

{(?X ?Y ?Z) :tak ?Z} <= {
    {?X math:notGreaterThan ?Y} log:callWithCut true.
}.

{(?X ?Y ?Z) :tak ?A} <= {
    (?X 1) math:difference ?X1.
    (?X1 ?Y ?Z) :tak ?A1.
    (?Y 1) math:difference ?Y1.
    (?Y1 ?Z ?X) :tak ?A2.
    (?Z 1) math:difference ?Z1.
    (?Z1 ?X ?Y) :tak ?A3.
    (?A1 ?A2 ?A3) :tak ?A.
}.
