Never understood why natural numbers (or some set of N) is not in the search space: fib(X,X):- X fib(X,Y1+Y2):- fib(X-1,Y1),fib(X-2,Y2). I tried to get answer to this kwestion in reddit, but all I got was personal insults.
You can do this in SWI Prolog using the between/3 predicate for the inequality, and the is/2 predicate for the arithmetic.
arcsin(X,Y) :- sin(Y,X).
However, MetaPost can do that for linear expressions. You can say (in Prolog syntax) midpoint(X,Y,Z) :- Z == (X+Y)/2.
two(X) :- midpoint(0,X,1).
And the MetaPost interpreter will find the solution two(2).Does anyone know of Prolog extensions that can solve linear algebra problems like that?