<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">:- op(800,xfx,=&gt;).
:- op(800,xfx,==&gt;).
:- op(800,xfx,==&gt;*).

A+(B+C) =&gt; (A+B)+C.

A ==&gt; B :-
    A =&gt; B.
A+C ==&gt; B+C :-
    A ==&gt; B.
A+B ==&gt; A+C :-
    B ==&gt; C.

A ==&gt;* C :-
    A ==&gt; B,
    B ==&gt;* C.
A ==&gt;* A.

% ?- a+(b+c+a)+(c+d)+(a+(b+c)) ==&gt;* X.
</pre></body></html>