もしも
a+b+c=1
a^2+b^2+c^2=2
a^3+b^3+c^3=3
それから
a^4+b^4+c^4=?
結果が25/6であることは知っていましたが、プロローグで計算する方法は?
私はこれを試しましたが失敗しました:
[1] 5 ?- A+B+C=:=1,A**2+B**2+C**2=:=2,A**3+B**3+C**3=:=3.
ERROR: Unhandled exception: =:=/2: Arguments are not sufficiently instantiated