(0) Obligation:

Clauses:

factorial1(N, F) :- ','(>(N, 0), ','(is(N1, -(N, 1)), ','(factorial1(N1, F1), is(F, *(N, F1))))).
factorial1(0, 1).
factorial2(N, F) :- factorial2(0, N, 1, F).
factorial2(I, N, T, F) :- ','(<(I, N), ','(is(I1, +(I, 1)), ','(is(T1, *(T, I1)), factorial2(I1, N, T1, F)))).
factorial2(N, N, F, F).
factorial3(N, F) :- factorial3(N, 1, F).
factorial3(N, T, F) :- ','(>(N, 0), ','(is(T1, *(T, N)), ','(is(N1, -(N, 1)), factorial3(N1, T1, F)))).
factorial3(0, F, F).

Query: factorial(g,a)

(1) UndefinedPredicateHandlerProof (SOUND transformation)

Added facts for all undefined predicates [PROLOG].

(2) Obligation:

Clauses:

factorial1(N, F) :- ','(>(N, 0), ','(is(N1, -(N, 1)), ','(factorial1(N1, F1), is(F, *(N, F1))))).
factorial1(0, 1).
factorial2(N, F) :- factorial2(0, N, 1, F).
factorial2(I, N, T, F) :- ','(<(I, N), ','(is(I1, +(I, 1)), ','(is(T1, *(T, I1)), factorial2(I1, N, T1, F)))).
factorial2(N, N, F, F).
factorial3(N, F) :- factorial3(N, 1, F).
factorial3(N, T, F) :- ','(>(N, 0), ','(is(T1, *(T, N)), ','(is(N1, -(N, 1)), factorial3(N1, T1, F)))).
factorial3(0, F, F).
>(X0, X1).
is(X0, X1).
<(X0, X1).

Query: factorial(g,a)

(3) PrologToPiTRSProof (SOUND transformation)

We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes:
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
R is empty.
Pi is empty.

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(4) Obligation:

Pi-finite rewrite system:
R is empty.
Pi is empty.

(5) RisEmptyProof (EQUIVALENT transformation)

The TRS R is empty. Hence, termination is trivially proven.

(6) YES