(0) Obligation:

Clauses:

app([], L, L) :- !.
app(X, Y, .(H, Z)) :- ','(head(X, H), ','(tail(X, T), app(T, Y, Z))).
head([], X1).
head(.(X, X2), X).
tail([], []).
tail(.(X3, Xs), Xs).

Queries:

app(g,a,a).

(1) PrologToDTProblemTransformerProof (SOUND transformation)

Built DT problem from termination graph.

(2) Obligation:

Triples:

app17(T55, .(T54, T56)) :- app17(T55, T56).
app1([], T22, .(T21, T23)) :- app17(T22, T23).
app1(.(T75, T76), T67, .(T75, T68)) :- app1(T76, T67, T68).

Clauses:

appc17(T30, T30).
appc17(T55, .(T54, T56)) :- appc17(T55, T56).
appc1([], T5, T5).
appc1([], T22, .(T21, T23)) :- appc17(T22, T23).
appc1(.(T75, T76), T67, .(T75, T68)) :- appc1(T76, T67, T68).

Afs:

app1(x1, x2, x3)  =  app1(x1)

(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:
app1_in: (b,f,f)
app17_in: (f,f)
Transforming TRIPLES into the following Term Rewriting System:
Pi DP problem:
The TRS P consists of the following rules:

APP1_IN_GAA([], T22, .(T21, T23)) → U2_GAA(T22, T21, T23, app17_in_aa(T22, T23))
APP1_IN_GAA([], T22, .(T21, T23)) → APP17_IN_AA(T22, T23)
APP17_IN_AA(T55, .(T54, T56)) → U1_AA(T55, T54, T56, app17_in_aa(T55, T56))
APP17_IN_AA(T55, .(T54, T56)) → APP17_IN_AA(T55, T56)
APP1_IN_GAA(.(T75, T76), T67, .(T75, T68)) → U3_GAA(T75, T76, T67, T68, app1_in_gaa(T76, T67, T68))
APP1_IN_GAA(.(T75, T76), T67, .(T75, T68)) → APP1_IN_GAA(T76, T67, T68)

R is empty.
The argument filtering Pi contains the following mapping:
app1_in_gaa(x1, x2, x3)  =  app1_in_gaa(x1)
[]  =  []
app17_in_aa(x1, x2)  =  app17_in_aa
.(x1, x2)  =  .(x2)
APP1_IN_GAA(x1, x2, x3)  =  APP1_IN_GAA(x1)
U2_GAA(x1, x2, x3, x4)  =  U2_GAA(x4)
APP17_IN_AA(x1, x2)  =  APP17_IN_AA
U1_AA(x1, x2, x3, x4)  =  U1_AA(x4)
U3_GAA(x1, x2, x3, x4, x5)  =  U3_GAA(x2, x5)

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:

APP1_IN_GAA([], T22, .(T21, T23)) → U2_GAA(T22, T21, T23, app17_in_aa(T22, T23))
APP1_IN_GAA([], T22, .(T21, T23)) → APP17_IN_AA(T22, T23)
APP17_IN_AA(T55, .(T54, T56)) → U1_AA(T55, T54, T56, app17_in_aa(T55, T56))
APP17_IN_AA(T55, .(T54, T56)) → APP17_IN_AA(T55, T56)
APP1_IN_GAA(.(T75, T76), T67, .(T75, T68)) → U3_GAA(T75, T76, T67, T68, app1_in_gaa(T76, T67, T68))
APP1_IN_GAA(.(T75, T76), T67, .(T75, T68)) → APP1_IN_GAA(T76, T67, T68)

R is empty.
The argument filtering Pi contains the following mapping:
app1_in_gaa(x1, x2, x3)  =  app1_in_gaa(x1)
[]  =  []
app17_in_aa(x1, x2)  =  app17_in_aa
.(x1, x2)  =  .(x2)
APP1_IN_GAA(x1, x2, x3)  =  APP1_IN_GAA(x1)
U2_GAA(x1, x2, x3, x4)  =  U2_GAA(x4)
APP17_IN_AA(x1, x2)  =  APP17_IN_AA
U1_AA(x1, x2, x3, x4)  =  U1_AA(x4)
U3_GAA(x1, x2, x3, x4, x5)  =  U3_GAA(x2, x5)

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

(5) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 2 SCCs with 4 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

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

APP17_IN_AA(T55, .(T54, T56)) → APP17_IN_AA(T55, T56)

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

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

(8) PiDPToQDPProof (SOUND transformation)

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

(9) Obligation:

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

APP17_IN_AAAPP17_IN_AA

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

(10) 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 = APP17_IN_AA evaluates to t =APP17_IN_AA

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:
  • Semiunifier: [ ]
  • Matcher: [ ]




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from APP17_IN_AA to APP17_IN_AA.



(11) NO

(12) Obligation:

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

APP1_IN_GAA(.(T75, T76), T67, .(T75, T68)) → APP1_IN_GAA(T76, T67, T68)

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

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

(13) PiDPToQDPProof (SOUND transformation)

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

(14) Obligation:

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

APP1_IN_GAA(.(T76)) → APP1_IN_GAA(T76)

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

(15) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • APP1_IN_GAA(.(T76)) → APP1_IN_GAA(T76)
    The graph contains the following edges 1 > 1

(16) YES