(0) Obligation:

Clauses:

reverse(X1s, X2s) :- reverse(X1s, [], X2s).
reverse([], Xs, Xs).
reverse(.(X, X1s), X2s, Ys) :- reverse(X1s, .(X, X2s), Ys).

Queries:

reverse(a,g).

(1) PrologToDTProblemTransformerProof (SOUND transformation)

Built DT problem from termination graph.

(2) Obligation:

Triples:

reverse68(.(T451, T450), T452, T453, T449) :- reverse68(T450, T451, .(T452, T453), T449).
reverse1(.(T403, .(T402, .(T401, .(T400, .(T399, .(T398, .(T397, .(T396, T395)))))))), T394) :- reverse68(T395, T396, .(T397, .(T398, .(T399, .(T400, .(T401, .(T402, .(T403, []))))))), T394).

Clauses:

reversec68([], T433, T434, .(T433, T434)).
reversec68(.(T451, T450), T452, T453, T449) :- reversec68(T450, T451, .(T452, T453), T449).

Afs:

reverse1(x1, x2)  =  reverse1(x2)

(3) TriplesToPiDPProof (SOUND transformation)

We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
reverse1_in: (f,b)
reverse68_in: (f,f,b,b)
Transforming TRIPLES into the following Term Rewriting System:
Pi DP problem:
The TRS P consists of the following rules:

REVERSE1_IN_AG(.(T403, .(T402, .(T401, .(T400, .(T399, .(T398, .(T397, .(T396, T395)))))))), T394) → U2_AG(T403, T402, T401, T400, T399, T398, T397, T396, T395, T394, reverse68_in_aagg(T395, T396, .(T397, .(T398, .(T399, .(T400, .(T401, .(T402, .(T403, []))))))), T394))
REVERSE1_IN_AG(.(T403, .(T402, .(T401, .(T400, .(T399, .(T398, .(T397, .(T396, T395)))))))), T394) → REVERSE68_IN_AAGG(T395, T396, .(T397, .(T398, .(T399, .(T400, .(T401, .(T402, .(T403, []))))))), T394)
REVERSE68_IN_AAGG(.(T451, T450), T452, T453, T449) → U1_AAGG(T451, T450, T452, T453, T449, reverse68_in_aagg(T450, T451, .(T452, T453), T449))
REVERSE68_IN_AAGG(.(T451, T450), T452, T453, T449) → REVERSE68_IN_AAGG(T450, T451, .(T452, T453), T449)

R is empty.
The argument filtering Pi contains the following mapping:
reverse68_in_aagg(x1, x2, x3, x4)  =  reverse68_in_aagg(x3, x4)
.(x1, x2)  =  .(x2)
[]  =  []
REVERSE1_IN_AG(x1, x2)  =  REVERSE1_IN_AG(x2)
U2_AG(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11)  =  U2_AG(x10, x11)
REVERSE68_IN_AAGG(x1, x2, x3, x4)  =  REVERSE68_IN_AAGG(x3, x4)
U1_AAGG(x1, x2, x3, x4, x5, x6)  =  U1_AAGG(x4, x5, x6)

We have to consider all (P,R,Pi)-chains

Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES

(4) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

REVERSE1_IN_AG(.(T403, .(T402, .(T401, .(T400, .(T399, .(T398, .(T397, .(T396, T395)))))))), T394) → U2_AG(T403, T402, T401, T400, T399, T398, T397, T396, T395, T394, reverse68_in_aagg(T395, T396, .(T397, .(T398, .(T399, .(T400, .(T401, .(T402, .(T403, []))))))), T394))
REVERSE1_IN_AG(.(T403, .(T402, .(T401, .(T400, .(T399, .(T398, .(T397, .(T396, T395)))))))), T394) → REVERSE68_IN_AAGG(T395, T396, .(T397, .(T398, .(T399, .(T400, .(T401, .(T402, .(T403, []))))))), T394)
REVERSE68_IN_AAGG(.(T451, T450), T452, T453, T449) → U1_AAGG(T451, T450, T452, T453, T449, reverse68_in_aagg(T450, T451, .(T452, T453), T449))
REVERSE68_IN_AAGG(.(T451, T450), T452, T453, T449) → REVERSE68_IN_AAGG(T450, T451, .(T452, T453), T449)

R is empty.
The argument filtering Pi contains the following mapping:
reverse68_in_aagg(x1, x2, x3, x4)  =  reverse68_in_aagg(x3, x4)
.(x1, x2)  =  .(x2)
[]  =  []
REVERSE1_IN_AG(x1, x2)  =  REVERSE1_IN_AG(x2)
U2_AG(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11)  =  U2_AG(x10, x11)
REVERSE68_IN_AAGG(x1, x2, x3, x4)  =  REVERSE68_IN_AAGG(x3, x4)
U1_AAGG(x1, x2, x3, x4, x5, x6)  =  U1_AAGG(x4, x5, x6)

We have to consider all (P,R,Pi)-chains

(5) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 3 less nodes.

(6) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

REVERSE68_IN_AAGG(.(T451, T450), T452, T453, T449) → REVERSE68_IN_AAGG(T450, T451, .(T452, T453), T449)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x2)
REVERSE68_IN_AAGG(x1, x2, x3, x4)  =  REVERSE68_IN_AAGG(x3, x4)

We have to consider all (P,R,Pi)-chains

(7) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(8) Obligation:

Q DP problem:
The TRS P consists of the following rules:

REVERSE68_IN_AAGG(T453, T449) → REVERSE68_IN_AAGG(.(T453), T449)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(9) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule REVERSE68_IN_AAGG(T453, T449) → REVERSE68_IN_AAGG(.(T453), T449) we obtained the following new rules [LPAR04]:

REVERSE68_IN_AAGG(.(z0), z1) → REVERSE68_IN_AAGG(.(.(z0)), z1)

(10) Obligation:

Q DP problem:
The TRS P consists of the following rules:

REVERSE68_IN_AAGG(.(z0), z1) → REVERSE68_IN_AAGG(.(.(z0)), z1)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(11) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule REVERSE68_IN_AAGG(.(z0), z1) → REVERSE68_IN_AAGG(.(.(z0)), z1) we obtained the following new rules [LPAR04]:

REVERSE68_IN_AAGG(.(.(z0)), z1) → REVERSE68_IN_AAGG(.(.(.(z0))), z1)

(12) Obligation:

Q DP problem:
The TRS P consists of the following rules:

REVERSE68_IN_AAGG(.(.(z0)), z1) → REVERSE68_IN_AAGG(.(.(.(z0))), z1)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(13) NonTerminationProof (EQUIVALENT transformation)

We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

s = REVERSE68_IN_AAGG(.(.(z0)), z1) evaluates to t =REVERSE68_IN_AAGG(.(.(.(z0))), z1)

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:
  • Matcher: [z0 / .(z0)]
  • Semiunifier: [ ]




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from REVERSE68_IN_AAGG(.(.(z0)), z1) to REVERSE68_IN_AAGG(.(.(.(z0))), z1).



(14) NO