(0) Obligation:

Clauses:

app3_a(Xs, Ys, Zs, Us) :- ','(app(Xs, Ys, Vs), app(Vs, Zs, Us)).
app3_b(Xs, Ys, Zs, Us) :- ','(app(Ys, Zs, Vs), app(Xs, Vs, Us)).
app([], Ys, Ys).
app(.(X, Xs), Ys, .(X, Zs)) :- app(Xs, Ys, Zs).

Queries:

app3_a(g,g,g,a).

(1) PrologToDTProblemTransformerProof (SOUND transformation)

Built DT problem from termination graph.

(2) Obligation:

Triples:

app7(.(T34, T35), T36, .(T34, T38)) :- app7(T35, T36, T38).
app19(.(T66, T67), T68, .(T66, X85)) :- app19(T67, T68, X85).
app3_a1([], T18, T11, T13) :- app7(T18, T11, T13).
app3_a1(.(T47, T48), T49, T11, T13) :- app19(T48, T49, X56).
app3_a1(.(T47, T48), T49, T11, T13) :- ','(appc19(T48, T49, T52), app7(.(T47, T52), T11, T13)).

Clauses:

appc7([], T25, T25).
appc7(.(T34, T35), T36, .(T34, T38)) :- appc7(T35, T36, T38).
appc19([], T59, T59).
appc19(.(T66, T67), T68, .(T66, X85)) :- appc19(T67, T68, X85).

Afs:

app3_a1(x1, x2, x3, x4)  =  app3_a1(x1, x2, x3)

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

APP3_A1_IN_GGGA([], T18, T11, T13) → U3_GGGA(T18, T11, T13, app7_in_gga(T18, T11, T13))
APP3_A1_IN_GGGA([], T18, T11, T13) → APP7_IN_GGA(T18, T11, T13)
APP7_IN_GGA(.(T34, T35), T36, .(T34, T38)) → U1_GGA(T34, T35, T36, T38, app7_in_gga(T35, T36, T38))
APP7_IN_GGA(.(T34, T35), T36, .(T34, T38)) → APP7_IN_GGA(T35, T36, T38)
APP3_A1_IN_GGGA(.(T47, T48), T49, T11, T13) → U4_GGGA(T47, T48, T49, T11, T13, app19_in_gga(T48, T49, X56))
APP3_A1_IN_GGGA(.(T47, T48), T49, T11, T13) → APP19_IN_GGA(T48, T49, X56)
APP19_IN_GGA(.(T66, T67), T68, .(T66, X85)) → U2_GGA(T66, T67, T68, X85, app19_in_gga(T67, T68, X85))
APP19_IN_GGA(.(T66, T67), T68, .(T66, X85)) → APP19_IN_GGA(T67, T68, X85)
APP3_A1_IN_GGGA(.(T47, T48), T49, T11, T13) → U5_GGGA(T47, T48, T49, T11, T13, appc19_in_gga(T48, T49, T52))
U5_GGGA(T47, T48, T49, T11, T13, appc19_out_gga(T48, T49, T52)) → U6_GGGA(T47, T48, T49, T11, T13, app7_in_gga(.(T47, T52), T11, T13))
U5_GGGA(T47, T48, T49, T11, T13, appc19_out_gga(T48, T49, T52)) → APP7_IN_GGA(.(T47, T52), T11, T13)

The TRS R consists of the following rules:

appc19_in_gga([], T59, T59) → appc19_out_gga([], T59, T59)
appc19_in_gga(.(T66, T67), T68, .(T66, X85)) → U9_gga(T66, T67, T68, X85, appc19_in_gga(T67, T68, X85))
U9_gga(T66, T67, T68, X85, appc19_out_gga(T67, T68, X85)) → appc19_out_gga(.(T66, T67), T68, .(T66, X85))

The argument filtering Pi contains the following mapping:
[]  =  []
app7_in_gga(x1, x2, x3)  =  app7_in_gga(x1, x2)
.(x1, x2)  =  .(x1, x2)
app19_in_gga(x1, x2, x3)  =  app19_in_gga(x1, x2)
appc19_in_gga(x1, x2, x3)  =  appc19_in_gga(x1, x2)
appc19_out_gga(x1, x2, x3)  =  appc19_out_gga(x1, x2, x3)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x3, x5)
APP3_A1_IN_GGGA(x1, x2, x3, x4)  =  APP3_A1_IN_GGGA(x1, x2, x3)
U3_GGGA(x1, x2, x3, x4)  =  U3_GGGA(x1, x2, x4)
APP7_IN_GGA(x1, x2, x3)  =  APP7_IN_GGA(x1, x2)
U1_GGA(x1, x2, x3, x4, x5)  =  U1_GGA(x1, x2, x3, x5)
U4_GGGA(x1, x2, x3, x4, x5, x6)  =  U4_GGGA(x1, x2, x3, x4, x6)
APP19_IN_GGA(x1, x2, x3)  =  APP19_IN_GGA(x1, x2)
U2_GGA(x1, x2, x3, x4, x5)  =  U2_GGA(x1, x2, x3, x5)
U5_GGGA(x1, x2, x3, x4, x5, x6)  =  U5_GGGA(x1, x2, x3, x4, x6)
U6_GGGA(x1, x2, x3, x4, x5, x6)  =  U6_GGGA(x1, x2, x3, x4, 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:

APP3_A1_IN_GGGA([], T18, T11, T13) → U3_GGGA(T18, T11, T13, app7_in_gga(T18, T11, T13))
APP3_A1_IN_GGGA([], T18, T11, T13) → APP7_IN_GGA(T18, T11, T13)
APP7_IN_GGA(.(T34, T35), T36, .(T34, T38)) → U1_GGA(T34, T35, T36, T38, app7_in_gga(T35, T36, T38))
APP7_IN_GGA(.(T34, T35), T36, .(T34, T38)) → APP7_IN_GGA(T35, T36, T38)
APP3_A1_IN_GGGA(.(T47, T48), T49, T11, T13) → U4_GGGA(T47, T48, T49, T11, T13, app19_in_gga(T48, T49, X56))
APP3_A1_IN_GGGA(.(T47, T48), T49, T11, T13) → APP19_IN_GGA(T48, T49, X56)
APP19_IN_GGA(.(T66, T67), T68, .(T66, X85)) → U2_GGA(T66, T67, T68, X85, app19_in_gga(T67, T68, X85))
APP19_IN_GGA(.(T66, T67), T68, .(T66, X85)) → APP19_IN_GGA(T67, T68, X85)
APP3_A1_IN_GGGA(.(T47, T48), T49, T11, T13) → U5_GGGA(T47, T48, T49, T11, T13, appc19_in_gga(T48, T49, T52))
U5_GGGA(T47, T48, T49, T11, T13, appc19_out_gga(T48, T49, T52)) → U6_GGGA(T47, T48, T49, T11, T13, app7_in_gga(.(T47, T52), T11, T13))
U5_GGGA(T47, T48, T49, T11, T13, appc19_out_gga(T48, T49, T52)) → APP7_IN_GGA(.(T47, T52), T11, T13)

The TRS R consists of the following rules:

appc19_in_gga([], T59, T59) → appc19_out_gga([], T59, T59)
appc19_in_gga(.(T66, T67), T68, .(T66, X85)) → U9_gga(T66, T67, T68, X85, appc19_in_gga(T67, T68, X85))
U9_gga(T66, T67, T68, X85, appc19_out_gga(T67, T68, X85)) → appc19_out_gga(.(T66, T67), T68, .(T66, X85))

The argument filtering Pi contains the following mapping:
[]  =  []
app7_in_gga(x1, x2, x3)  =  app7_in_gga(x1, x2)
.(x1, x2)  =  .(x1, x2)
app19_in_gga(x1, x2, x3)  =  app19_in_gga(x1, x2)
appc19_in_gga(x1, x2, x3)  =  appc19_in_gga(x1, x2)
appc19_out_gga(x1, x2, x3)  =  appc19_out_gga(x1, x2, x3)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x3, x5)
APP3_A1_IN_GGGA(x1, x2, x3, x4)  =  APP3_A1_IN_GGGA(x1, x2, x3)
U3_GGGA(x1, x2, x3, x4)  =  U3_GGGA(x1, x2, x4)
APP7_IN_GGA(x1, x2, x3)  =  APP7_IN_GGA(x1, x2)
U1_GGA(x1, x2, x3, x4, x5)  =  U1_GGA(x1, x2, x3, x5)
U4_GGGA(x1, x2, x3, x4, x5, x6)  =  U4_GGGA(x1, x2, x3, x4, x6)
APP19_IN_GGA(x1, x2, x3)  =  APP19_IN_GGA(x1, x2)
U2_GGA(x1, x2, x3, x4, x5)  =  U2_GGA(x1, x2, x3, x5)
U5_GGGA(x1, x2, x3, x4, x5, x6)  =  U5_GGGA(x1, x2, x3, x4, x6)
U6_GGGA(x1, x2, x3, x4, x5, x6)  =  U6_GGGA(x1, x2, x3, x4, x6)

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

(5) DependencyGraphProof (EQUIVALENT transformation)

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

(6) Complex Obligation (AND)

(7) Obligation:

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

APP19_IN_GGA(.(T66, T67), T68, .(T66, X85)) → APP19_IN_GGA(T67, T68, X85)

The TRS R consists of the following rules:

appc19_in_gga([], T59, T59) → appc19_out_gga([], T59, T59)
appc19_in_gga(.(T66, T67), T68, .(T66, X85)) → U9_gga(T66, T67, T68, X85, appc19_in_gga(T67, T68, X85))
U9_gga(T66, T67, T68, X85, appc19_out_gga(T67, T68, X85)) → appc19_out_gga(.(T66, T67), T68, .(T66, X85))

The argument filtering Pi contains the following mapping:
[]  =  []
.(x1, x2)  =  .(x1, x2)
appc19_in_gga(x1, x2, x3)  =  appc19_in_gga(x1, x2)
appc19_out_gga(x1, x2, x3)  =  appc19_out_gga(x1, x2, x3)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x3, x5)
APP19_IN_GGA(x1, x2, x3)  =  APP19_IN_GGA(x1, x2)

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

(8) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(9) Obligation:

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

APP19_IN_GGA(.(T66, T67), T68, .(T66, X85)) → APP19_IN_GGA(T67, T68, X85)

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

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

(10) PiDPToQDPProof (SOUND transformation)

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

(11) Obligation:

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

APP19_IN_GGA(.(T66, T67), T68) → APP19_IN_GGA(T67, T68)

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

(12) 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:

  • APP19_IN_GGA(.(T66, T67), T68) → APP19_IN_GGA(T67, T68)
    The graph contains the following edges 1 > 1, 2 >= 2

(13) YES

(14) Obligation:

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

APP7_IN_GGA(.(T34, T35), T36, .(T34, T38)) → APP7_IN_GGA(T35, T36, T38)

The TRS R consists of the following rules:

appc19_in_gga([], T59, T59) → appc19_out_gga([], T59, T59)
appc19_in_gga(.(T66, T67), T68, .(T66, X85)) → U9_gga(T66, T67, T68, X85, appc19_in_gga(T67, T68, X85))
U9_gga(T66, T67, T68, X85, appc19_out_gga(T67, T68, X85)) → appc19_out_gga(.(T66, T67), T68, .(T66, X85))

The argument filtering Pi contains the following mapping:
[]  =  []
.(x1, x2)  =  .(x1, x2)
appc19_in_gga(x1, x2, x3)  =  appc19_in_gga(x1, x2)
appc19_out_gga(x1, x2, x3)  =  appc19_out_gga(x1, x2, x3)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x3, x5)
APP7_IN_GGA(x1, x2, x3)  =  APP7_IN_GGA(x1, x2)

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

(15) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(16) Obligation:

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

APP7_IN_GGA(.(T34, T35), T36, .(T34, T38)) → APP7_IN_GGA(T35, T36, T38)

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

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

(17) PiDPToQDPProof (SOUND transformation)

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

(18) Obligation:

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

APP7_IN_GGA(.(T34, T35), T36) → APP7_IN_GGA(T35, T36)

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

(19) 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:

  • APP7_IN_GGA(.(T34, T35), T36) → APP7_IN_GGA(T35, T36)
    The graph contains the following edges 1 > 1, 2 >= 2

(20) YES