Я делаю домашнее задание ИИ по доказательству теории групп в алгебре.
Теорема может быть представлена следующим образом:
A1. i(e,X) = X (identity)
A2. i(X, e) = X (identity)
A3. i(comp(X),X) = e (complement)
A4. i(X, comp(X)) = e (complement)
A5. i(X, i(Y,Z)) = i(i(X,Y),Z) (associativity)
THEOREM: If G is a group such that for every X,
A6. i(X,X) = e,
then G is commutative, i.e., for every X; Y ,
i(X,Y) = i(Y,X):
and the commutative part can be represented as
A7. i(a, b, c) clause derived from negated conclusion
A8. -i(b, a, c) clause derived from negated conclusion
И я преобразовал их в формат Пролога следующим образом:
% A7
i(a, b, c).
% A1
i(e, X, X) .
%A2
i(X, e, X).
% A3
i(comp(X), X, e).
% A4
i(X, comp(X), e).
% A51
i(U, Z, W) :- i(X, Y, U), i(Y, Z, V), i(X, V, W).
% A52
i(X, V, W) :- i(X, Y, U), i(Y, Z, V), i(U, Z, W).
% A6
i(X, X, e).
Затем я хотел доказать теорему, поэтому я набрал «i (b, a, c)» в консоли Prolog и получил следующее сообщение об ошибке:
?- i(b,a,c).
ERROR: Out of global-stack.
ERROR: No room for exception term. Aborting.
ERROR: Out of global-stack.
ERROR: No room for exception term. Aborting.
ERROR: Out of global-stack.
ERROR: No room for exception term. Aborting.
% Execution Aborted
Пожалуйста, помогите мне, большое спасибо!