triska / clpz

Constraint Logic Programming over Integers
https://www.metalevel.at/prolog/clpz
184 stars 15 forks source link

Documentation: unnecessary functional notation. #19

Closed UWN closed 2 years ago

UWN commented 2 years ago

The documentation reads:

?- assertz(clpz:monotonic).
true.

?- #(X) #= #(Y) + #(Z).
#(Y)+ #(Z)#= #(X).    % inaccurate answer, given the operator definition for `(#)/1`

Yet, the functional notation is superfluous and the example is a bit irritating. E.g. in Scryer:

?- assertz(clpz:monotonic).
   true.
?- #(X) #= #(Y) + #(Z).
   clpz:(#Y+ #Z#= #X).
?- #X + #Y #= #Z.
   clpz:(#X+ #Y#= #Z).       % this example is preferable as the answer is not reformulated