(0) Obligation:

Clauses:

goal(A, B, C) :- ','(s2l(A, D), applast(D, B, C)).
applast(L, X, Last) :- ','(app(L, .(X, []), LX), last(Last, LX)).
last(X, .(X, [])) :- !.
last(X, Y) :- ','(tail(Y, T), last(X, T)).
app([], Y, Z) :- ','(!, eq(Y, Z)).
app(X, Y, .(H, Z)) :- ','(head(X, H), ','(tail(X, T), app(T, Y, Z))).
s2l(0, L) :- ','(!, eq(L, [])).
s2l(X, .(X1, Xs)) :- ','(p(X, P), s2l(P, Xs)).
head([], X2).
head(.(X, X3), X).
tail([], []).
tail(.(X4, Xs), Xs).
p(0, 0).
p(s(X), X).
eq(X, X).

Queries:

goal(g,a,a).

(1) PrologToPrologProblemTransformerProof (SOUND transformation)

Built Prolog problem from termination graph.

(2) Obligation:

Clauses:

s2l4(0, []).
s2l4(s(T11), .(X25, X26)) :- s2l4(T11, X26).
app20([], T22, .(T22, [])).
app20([], T30, .(X56, .(T30, []))).
app20(.(T36, T38), T39, .(T36, X53)) :- app20(T38, T39, X53).
app20(.(T45, T47), T48, .(T45, X53)) :- app20(T47, T48, X53).
last63(T56) :- last63(T56).
last21(T49, .(T49, [])).
last21(T56, []) :- last63(T56).
last21(T59, .(T57, T60)) :- last21(T59, T60).
last21(T63, .(T61, T64)) :- last21(T63, T64).
goal1(T4, T7, T8) :- s2l4(T4, X11).
goal1(T4, T16, T17) :- ','(s2l4(T4, T15), app20(T15, T16, X35)).
goal1(T4, T16, T49) :- ','(s2l4(T4, T15), app20(T15, T16, .(T49, []))).
goal1(T4, T16, T56) :- ','(s2l4(T4, T15), ','(app20(T15, T16, []), last63(T56))).
goal1(T4, T16, T59) :- ','(s2l4(T4, T15), ','(app20(T15, T16, .(T57, T60)), last21(T59, T60))).
goal1(T4, T16, T63) :- ','(s2l4(T4, T15), ','(app20(T15, T16, .(T61, T64)), last21(T63, T64))).

Queries:

goal1(g,a,a).

(3) PrologToPiTRSProof (SOUND transformation)

We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
goal1_in: (b,f,f)
s2l4_in: (b,f)
app20_in: (b,f,f) (b,f,b)
last63_in: (f)
last21_in: (f,b)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

goal1_in_gaa(T4, T7, T8) → U8_gaa(T4, T7, T8, s2l4_in_ga(T4, X11))
s2l4_in_ga(0, []) → s2l4_out_ga(0, [])
s2l4_in_ga(s(T11), .(X25, X26)) → U1_ga(T11, X25, X26, s2l4_in_ga(T11, X26))
U1_ga(T11, X25, X26, s2l4_out_ga(T11, X26)) → s2l4_out_ga(s(T11), .(X25, X26))
U8_gaa(T4, T7, T8, s2l4_out_ga(T4, X11)) → goal1_out_gaa(T4, T7, T8)
goal1_in_gaa(T4, T16, T17) → U9_gaa(T4, T16, T17, s2l4_in_ga(T4, T15))
U9_gaa(T4, T16, T17, s2l4_out_ga(T4, T15)) → U10_gaa(T4, T16, T17, app20_in_gaa(T15, T16, X35))
app20_in_gaa([], T22, .(T22, [])) → app20_out_gaa([], T22, .(T22, []))
app20_in_gaa([], T30, .(X56, .(T30, []))) → app20_out_gaa([], T30, .(X56, .(T30, [])))
app20_in_gaa(.(T36, T38), T39, .(T36, X53)) → U2_gaa(T36, T38, T39, X53, app20_in_gaa(T38, T39, X53))
app20_in_gaa(.(T45, T47), T48, .(T45, X53)) → U3_gaa(T45, T47, T48, X53, app20_in_gaa(T47, T48, X53))
U3_gaa(T45, T47, T48, X53, app20_out_gaa(T47, T48, X53)) → app20_out_gaa(.(T45, T47), T48, .(T45, X53))
U2_gaa(T36, T38, T39, X53, app20_out_gaa(T38, T39, X53)) → app20_out_gaa(.(T36, T38), T39, .(T36, X53))
U10_gaa(T4, T16, T17, app20_out_gaa(T15, T16, X35)) → goal1_out_gaa(T4, T16, T17)
goal1_in_gaa(T4, T16, T49) → U11_gaa(T4, T16, T49, s2l4_in_ga(T4, T15))
U11_gaa(T4, T16, T49, s2l4_out_ga(T4, T15)) → U12_gaa(T4, T16, T49, app20_in_gag(T15, T16, .(T49, [])))
app20_in_gag([], T22, .(T22, [])) → app20_out_gag([], T22, .(T22, []))
app20_in_gag([], T30, .(X56, .(T30, []))) → app20_out_gag([], T30, .(X56, .(T30, [])))
app20_in_gag(.(T36, T38), T39, .(T36, X53)) → U2_gag(T36, T38, T39, X53, app20_in_gag(T38, T39, X53))
app20_in_gag(.(T45, T47), T48, .(T45, X53)) → U3_gag(T45, T47, T48, X53, app20_in_gag(T47, T48, X53))
U3_gag(T45, T47, T48, X53, app20_out_gag(T47, T48, X53)) → app20_out_gag(.(T45, T47), T48, .(T45, X53))
U2_gag(T36, T38, T39, X53, app20_out_gag(T38, T39, X53)) → app20_out_gag(.(T36, T38), T39, .(T36, X53))
U12_gaa(T4, T16, T49, app20_out_gag(T15, T16, .(T49, []))) → goal1_out_gaa(T4, T16, T49)
goal1_in_gaa(T4, T16, T56) → U13_gaa(T4, T16, T56, s2l4_in_ga(T4, T15))
U13_gaa(T4, T16, T56, s2l4_out_ga(T4, T15)) → U14_gaa(T4, T16, T56, app20_in_gag(T15, T16, []))
U14_gaa(T4, T16, T56, app20_out_gag(T15, T16, [])) → U15_gaa(T4, T16, T56, last63_in_a(T56))
last63_in_a(T56) → U4_a(T56, last63_in_a(T56))
U4_a(T56, last63_out_a(T56)) → last63_out_a(T56)
U15_gaa(T4, T16, T56, last63_out_a(T56)) → goal1_out_gaa(T4, T16, T56)
goal1_in_gaa(T4, T16, T59) → U16_gaa(T4, T16, T59, s2l4_in_ga(T4, T15))
U16_gaa(T4, T16, T59, s2l4_out_ga(T4, T15)) → U17_gaa(T4, T16, T59, app20_in_gaa(T15, T16, .(T57, T60)))
U17_gaa(T4, T16, T59, app20_out_gaa(T15, T16, .(T57, T60))) → U18_gaa(T4, T16, T59, last21_in_ag(T59, T60))
last21_in_ag(T49, .(T49, [])) → last21_out_ag(T49, .(T49, []))
last21_in_ag(T56, []) → U5_ag(T56, last63_in_a(T56))
U5_ag(T56, last63_out_a(T56)) → last21_out_ag(T56, [])
last21_in_ag(T59, .(T57, T60)) → U6_ag(T59, T57, T60, last21_in_ag(T59, T60))
last21_in_ag(T63, .(T61, T64)) → U7_ag(T63, T61, T64, last21_in_ag(T63, T64))
U7_ag(T63, T61, T64, last21_out_ag(T63, T64)) → last21_out_ag(T63, .(T61, T64))
U6_ag(T59, T57, T60, last21_out_ag(T59, T60)) → last21_out_ag(T59, .(T57, T60))
U18_gaa(T4, T16, T59, last21_out_ag(T59, T60)) → goal1_out_gaa(T4, T16, T59)
goal1_in_gaa(T4, T16, T63) → U19_gaa(T4, T16, T63, s2l4_in_ga(T4, T15))
U19_gaa(T4, T16, T63, s2l4_out_ga(T4, T15)) → U20_gaa(T4, T16, T63, app20_in_gaa(T15, T16, .(T61, T64)))
U20_gaa(T4, T16, T63, app20_out_gaa(T15, T16, .(T61, T64))) → U21_gaa(T4, T16, T63, last21_in_ag(T63, T64))
U21_gaa(T4, T16, T63, last21_out_ag(T63, T64)) → goal1_out_gaa(T4, T16, T63)

The argument filtering Pi contains the following mapping:
goal1_in_gaa(x1, x2, x3)  =  goal1_in_gaa(x1)
U8_gaa(x1, x2, x3, x4)  =  U8_gaa(x1, x4)
s2l4_in_ga(x1, x2)  =  s2l4_in_ga(x1)
0  =  0
s2l4_out_ga(x1, x2)  =  s2l4_out_ga(x1, x2)
s(x1)  =  s(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
.(x1, x2)  =  .(x2)
goal1_out_gaa(x1, x2, x3)  =  goal1_out_gaa(x1)
U9_gaa(x1, x2, x3, x4)  =  U9_gaa(x1, x4)
U10_gaa(x1, x2, x3, x4)  =  U10_gaa(x1, x4)
app20_in_gaa(x1, x2, x3)  =  app20_in_gaa(x1)
[]  =  []
app20_out_gaa(x1, x2, x3)  =  app20_out_gaa(x1, x3)
U2_gaa(x1, x2, x3, x4, x5)  =  U2_gaa(x2, x5)
U3_gaa(x1, x2, x3, x4, x5)  =  U3_gaa(x2, x5)
U11_gaa(x1, x2, x3, x4)  =  U11_gaa(x1, x4)
U12_gaa(x1, x2, x3, x4)  =  U12_gaa(x1, x4)
app20_in_gag(x1, x2, x3)  =  app20_in_gag(x1, x3)
app20_out_gag(x1, x2, x3)  =  app20_out_gag(x1, x3)
U2_gag(x1, x2, x3, x4, x5)  =  U2_gag(x2, x4, x5)
U3_gag(x1, x2, x3, x4, x5)  =  U3_gag(x2, x4, x5)
U13_gaa(x1, x2, x3, x4)  =  U13_gaa(x1, x4)
U14_gaa(x1, x2, x3, x4)  =  U14_gaa(x1, x4)
U15_gaa(x1, x2, x3, x4)  =  U15_gaa(x1, x4)
last63_in_a(x1)  =  last63_in_a
U4_a(x1, x2)  =  U4_a(x2)
last63_out_a(x1)  =  last63_out_a(x1)
U16_gaa(x1, x2, x3, x4)  =  U16_gaa(x1, x4)
U17_gaa(x1, x2, x3, x4)  =  U17_gaa(x1, x4)
U18_gaa(x1, x2, x3, x4)  =  U18_gaa(x1, x4)
last21_in_ag(x1, x2)  =  last21_in_ag(x2)
last21_out_ag(x1, x2)  =  last21_out_ag(x2)
U5_ag(x1, x2)  =  U5_ag(x2)
U6_ag(x1, x2, x3, x4)  =  U6_ag(x3, x4)
U7_ag(x1, x2, x3, x4)  =  U7_ag(x3, x4)
U19_gaa(x1, x2, x3, x4)  =  U19_gaa(x1, x4)
U20_gaa(x1, x2, x3, x4)  =  U20_gaa(x1, x4)
U21_gaa(x1, x2, x3, x4)  =  U21_gaa(x1, x4)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(4) Obligation:

Pi-finite rewrite system:
The TRS R consists of the following rules:

goal1_in_gaa(T4, T7, T8) → U8_gaa(T4, T7, T8, s2l4_in_ga(T4, X11))
s2l4_in_ga(0, []) → s2l4_out_ga(0, [])
s2l4_in_ga(s(T11), .(X25, X26)) → U1_ga(T11, X25, X26, s2l4_in_ga(T11, X26))
U1_ga(T11, X25, X26, s2l4_out_ga(T11, X26)) → s2l4_out_ga(s(T11), .(X25, X26))
U8_gaa(T4, T7, T8, s2l4_out_ga(T4, X11)) → goal1_out_gaa(T4, T7, T8)
goal1_in_gaa(T4, T16, T17) → U9_gaa(T4, T16, T17, s2l4_in_ga(T4, T15))
U9_gaa(T4, T16, T17, s2l4_out_ga(T4, T15)) → U10_gaa(T4, T16, T17, app20_in_gaa(T15, T16, X35))
app20_in_gaa([], T22, .(T22, [])) → app20_out_gaa([], T22, .(T22, []))
app20_in_gaa([], T30, .(X56, .(T30, []))) → app20_out_gaa([], T30, .(X56, .(T30, [])))
app20_in_gaa(.(T36, T38), T39, .(T36, X53)) → U2_gaa(T36, T38, T39, X53, app20_in_gaa(T38, T39, X53))
app20_in_gaa(.(T45, T47), T48, .(T45, X53)) → U3_gaa(T45, T47, T48, X53, app20_in_gaa(T47, T48, X53))
U3_gaa(T45, T47, T48, X53, app20_out_gaa(T47, T48, X53)) → app20_out_gaa(.(T45, T47), T48, .(T45, X53))
U2_gaa(T36, T38, T39, X53, app20_out_gaa(T38, T39, X53)) → app20_out_gaa(.(T36, T38), T39, .(T36, X53))
U10_gaa(T4, T16, T17, app20_out_gaa(T15, T16, X35)) → goal1_out_gaa(T4, T16, T17)
goal1_in_gaa(T4, T16, T49) → U11_gaa(T4, T16, T49, s2l4_in_ga(T4, T15))
U11_gaa(T4, T16, T49, s2l4_out_ga(T4, T15)) → U12_gaa(T4, T16, T49, app20_in_gag(T15, T16, .(T49, [])))
app20_in_gag([], T22, .(T22, [])) → app20_out_gag([], T22, .(T22, []))
app20_in_gag([], T30, .(X56, .(T30, []))) → app20_out_gag([], T30, .(X56, .(T30, [])))
app20_in_gag(.(T36, T38), T39, .(T36, X53)) → U2_gag(T36, T38, T39, X53, app20_in_gag(T38, T39, X53))
app20_in_gag(.(T45, T47), T48, .(T45, X53)) → U3_gag(T45, T47, T48, X53, app20_in_gag(T47, T48, X53))
U3_gag(T45, T47, T48, X53, app20_out_gag(T47, T48, X53)) → app20_out_gag(.(T45, T47), T48, .(T45, X53))
U2_gag(T36, T38, T39, X53, app20_out_gag(T38, T39, X53)) → app20_out_gag(.(T36, T38), T39, .(T36, X53))
U12_gaa(T4, T16, T49, app20_out_gag(T15, T16, .(T49, []))) → goal1_out_gaa(T4, T16, T49)
goal1_in_gaa(T4, T16, T56) → U13_gaa(T4, T16, T56, s2l4_in_ga(T4, T15))
U13_gaa(T4, T16, T56, s2l4_out_ga(T4, T15)) → U14_gaa(T4, T16, T56, app20_in_gag(T15, T16, []))
U14_gaa(T4, T16, T56, app20_out_gag(T15, T16, [])) → U15_gaa(T4, T16, T56, last63_in_a(T56))
last63_in_a(T56) → U4_a(T56, last63_in_a(T56))
U4_a(T56, last63_out_a(T56)) → last63_out_a(T56)
U15_gaa(T4, T16, T56, last63_out_a(T56)) → goal1_out_gaa(T4, T16, T56)
goal1_in_gaa(T4, T16, T59) → U16_gaa(T4, T16, T59, s2l4_in_ga(T4, T15))
U16_gaa(T4, T16, T59, s2l4_out_ga(T4, T15)) → U17_gaa(T4, T16, T59, app20_in_gaa(T15, T16, .(T57, T60)))
U17_gaa(T4, T16, T59, app20_out_gaa(T15, T16, .(T57, T60))) → U18_gaa(T4, T16, T59, last21_in_ag(T59, T60))
last21_in_ag(T49, .(T49, [])) → last21_out_ag(T49, .(T49, []))
last21_in_ag(T56, []) → U5_ag(T56, last63_in_a(T56))
U5_ag(T56, last63_out_a(T56)) → last21_out_ag(T56, [])
last21_in_ag(T59, .(T57, T60)) → U6_ag(T59, T57, T60, last21_in_ag(T59, T60))
last21_in_ag(T63, .(T61, T64)) → U7_ag(T63, T61, T64, last21_in_ag(T63, T64))
U7_ag(T63, T61, T64, last21_out_ag(T63, T64)) → last21_out_ag(T63, .(T61, T64))
U6_ag(T59, T57, T60, last21_out_ag(T59, T60)) → last21_out_ag(T59, .(T57, T60))
U18_gaa(T4, T16, T59, last21_out_ag(T59, T60)) → goal1_out_gaa(T4, T16, T59)
goal1_in_gaa(T4, T16, T63) → U19_gaa(T4, T16, T63, s2l4_in_ga(T4, T15))
U19_gaa(T4, T16, T63, s2l4_out_ga(T4, T15)) → U20_gaa(T4, T16, T63, app20_in_gaa(T15, T16, .(T61, T64)))
U20_gaa(T4, T16, T63, app20_out_gaa(T15, T16, .(T61, T64))) → U21_gaa(T4, T16, T63, last21_in_ag(T63, T64))
U21_gaa(T4, T16, T63, last21_out_ag(T63, T64)) → goal1_out_gaa(T4, T16, T63)

The argument filtering Pi contains the following mapping:
goal1_in_gaa(x1, x2, x3)  =  goal1_in_gaa(x1)
U8_gaa(x1, x2, x3, x4)  =  U8_gaa(x1, x4)
s2l4_in_ga(x1, x2)  =  s2l4_in_ga(x1)
0  =  0
s2l4_out_ga(x1, x2)  =  s2l4_out_ga(x1, x2)
s(x1)  =  s(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
.(x1, x2)  =  .(x2)
goal1_out_gaa(x1, x2, x3)  =  goal1_out_gaa(x1)
U9_gaa(x1, x2, x3, x4)  =  U9_gaa(x1, x4)
U10_gaa(x1, x2, x3, x4)  =  U10_gaa(x1, x4)
app20_in_gaa(x1, x2, x3)  =  app20_in_gaa(x1)
[]  =  []
app20_out_gaa(x1, x2, x3)  =  app20_out_gaa(x1, x3)
U2_gaa(x1, x2, x3, x4, x5)  =  U2_gaa(x2, x5)
U3_gaa(x1, x2, x3, x4, x5)  =  U3_gaa(x2, x5)
U11_gaa(x1, x2, x3, x4)  =  U11_gaa(x1, x4)
U12_gaa(x1, x2, x3, x4)  =  U12_gaa(x1, x4)
app20_in_gag(x1, x2, x3)  =  app20_in_gag(x1, x3)
app20_out_gag(x1, x2, x3)  =  app20_out_gag(x1, x3)
U2_gag(x1, x2, x3, x4, x5)  =  U2_gag(x2, x4, x5)
U3_gag(x1, x2, x3, x4, x5)  =  U3_gag(x2, x4, x5)
U13_gaa(x1, x2, x3, x4)  =  U13_gaa(x1, x4)
U14_gaa(x1, x2, x3, x4)  =  U14_gaa(x1, x4)
U15_gaa(x1, x2, x3, x4)  =  U15_gaa(x1, x4)
last63_in_a(x1)  =  last63_in_a
U4_a(x1, x2)  =  U4_a(x2)
last63_out_a(x1)  =  last63_out_a(x1)
U16_gaa(x1, x2, x3, x4)  =  U16_gaa(x1, x4)
U17_gaa(x1, x2, x3, x4)  =  U17_gaa(x1, x4)
U18_gaa(x1, x2, x3, x4)  =  U18_gaa(x1, x4)
last21_in_ag(x1, x2)  =  last21_in_ag(x2)
last21_out_ag(x1, x2)  =  last21_out_ag(x2)
U5_ag(x1, x2)  =  U5_ag(x2)
U6_ag(x1, x2, x3, x4)  =  U6_ag(x3, x4)
U7_ag(x1, x2, x3, x4)  =  U7_ag(x3, x4)
U19_gaa(x1, x2, x3, x4)  =  U19_gaa(x1, x4)
U20_gaa(x1, x2, x3, x4)  =  U20_gaa(x1, x4)
U21_gaa(x1, x2, x3, x4)  =  U21_gaa(x1, x4)

(5) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

GOAL1_IN_GAA(T4, T7, T8) → U8_GAA(T4, T7, T8, s2l4_in_ga(T4, X11))
GOAL1_IN_GAA(T4, T7, T8) → S2L4_IN_GA(T4, X11)
S2L4_IN_GA(s(T11), .(X25, X26)) → U1_GA(T11, X25, X26, s2l4_in_ga(T11, X26))
S2L4_IN_GA(s(T11), .(X25, X26)) → S2L4_IN_GA(T11, X26)
GOAL1_IN_GAA(T4, T16, T17) → U9_GAA(T4, T16, T17, s2l4_in_ga(T4, T15))
U9_GAA(T4, T16, T17, s2l4_out_ga(T4, T15)) → U10_GAA(T4, T16, T17, app20_in_gaa(T15, T16, X35))
U9_GAA(T4, T16, T17, s2l4_out_ga(T4, T15)) → APP20_IN_GAA(T15, T16, X35)
APP20_IN_GAA(.(T36, T38), T39, .(T36, X53)) → U2_GAA(T36, T38, T39, X53, app20_in_gaa(T38, T39, X53))
APP20_IN_GAA(.(T36, T38), T39, .(T36, X53)) → APP20_IN_GAA(T38, T39, X53)
APP20_IN_GAA(.(T45, T47), T48, .(T45, X53)) → U3_GAA(T45, T47, T48, X53, app20_in_gaa(T47, T48, X53))
GOAL1_IN_GAA(T4, T16, T49) → U11_GAA(T4, T16, T49, s2l4_in_ga(T4, T15))
U11_GAA(T4, T16, T49, s2l4_out_ga(T4, T15)) → U12_GAA(T4, T16, T49, app20_in_gag(T15, T16, .(T49, [])))
U11_GAA(T4, T16, T49, s2l4_out_ga(T4, T15)) → APP20_IN_GAG(T15, T16, .(T49, []))
APP20_IN_GAG(.(T36, T38), T39, .(T36, X53)) → U2_GAG(T36, T38, T39, X53, app20_in_gag(T38, T39, X53))
APP20_IN_GAG(.(T36, T38), T39, .(T36, X53)) → APP20_IN_GAG(T38, T39, X53)
APP20_IN_GAG(.(T45, T47), T48, .(T45, X53)) → U3_GAG(T45, T47, T48, X53, app20_in_gag(T47, T48, X53))
GOAL1_IN_GAA(T4, T16, T56) → U13_GAA(T4, T16, T56, s2l4_in_ga(T4, T15))
U13_GAA(T4, T16, T56, s2l4_out_ga(T4, T15)) → U14_GAA(T4, T16, T56, app20_in_gag(T15, T16, []))
U13_GAA(T4, T16, T56, s2l4_out_ga(T4, T15)) → APP20_IN_GAG(T15, T16, [])
U14_GAA(T4, T16, T56, app20_out_gag(T15, T16, [])) → U15_GAA(T4, T16, T56, last63_in_a(T56))
U14_GAA(T4, T16, T56, app20_out_gag(T15, T16, [])) → LAST63_IN_A(T56)
LAST63_IN_A(T56) → U4_A(T56, last63_in_a(T56))
LAST63_IN_A(T56) → LAST63_IN_A(T56)
GOAL1_IN_GAA(T4, T16, T59) → U16_GAA(T4, T16, T59, s2l4_in_ga(T4, T15))
U16_GAA(T4, T16, T59, s2l4_out_ga(T4, T15)) → U17_GAA(T4, T16, T59, app20_in_gaa(T15, T16, .(T57, T60)))
U16_GAA(T4, T16, T59, s2l4_out_ga(T4, T15)) → APP20_IN_GAA(T15, T16, .(T57, T60))
U17_GAA(T4, T16, T59, app20_out_gaa(T15, T16, .(T57, T60))) → U18_GAA(T4, T16, T59, last21_in_ag(T59, T60))
U17_GAA(T4, T16, T59, app20_out_gaa(T15, T16, .(T57, T60))) → LAST21_IN_AG(T59, T60)
LAST21_IN_AG(T56, []) → U5_AG(T56, last63_in_a(T56))
LAST21_IN_AG(T56, []) → LAST63_IN_A(T56)
LAST21_IN_AG(T59, .(T57, T60)) → U6_AG(T59, T57, T60, last21_in_ag(T59, T60))
LAST21_IN_AG(T59, .(T57, T60)) → LAST21_IN_AG(T59, T60)
LAST21_IN_AG(T63, .(T61, T64)) → U7_AG(T63, T61, T64, last21_in_ag(T63, T64))
GOAL1_IN_GAA(T4, T16, T63) → U19_GAA(T4, T16, T63, s2l4_in_ga(T4, T15))
U19_GAA(T4, T16, T63, s2l4_out_ga(T4, T15)) → U20_GAA(T4, T16, T63, app20_in_gaa(T15, T16, .(T61, T64)))
U19_GAA(T4, T16, T63, s2l4_out_ga(T4, T15)) → APP20_IN_GAA(T15, T16, .(T61, T64))
U20_GAA(T4, T16, T63, app20_out_gaa(T15, T16, .(T61, T64))) → U21_GAA(T4, T16, T63, last21_in_ag(T63, T64))
U20_GAA(T4, T16, T63, app20_out_gaa(T15, T16, .(T61, T64))) → LAST21_IN_AG(T63, T64)

The TRS R consists of the following rules:

goal1_in_gaa(T4, T7, T8) → U8_gaa(T4, T7, T8, s2l4_in_ga(T4, X11))
s2l4_in_ga(0, []) → s2l4_out_ga(0, [])
s2l4_in_ga(s(T11), .(X25, X26)) → U1_ga(T11, X25, X26, s2l4_in_ga(T11, X26))
U1_ga(T11, X25, X26, s2l4_out_ga(T11, X26)) → s2l4_out_ga(s(T11), .(X25, X26))
U8_gaa(T4, T7, T8, s2l4_out_ga(T4, X11)) → goal1_out_gaa(T4, T7, T8)
goal1_in_gaa(T4, T16, T17) → U9_gaa(T4, T16, T17, s2l4_in_ga(T4, T15))
U9_gaa(T4, T16, T17, s2l4_out_ga(T4, T15)) → U10_gaa(T4, T16, T17, app20_in_gaa(T15, T16, X35))
app20_in_gaa([], T22, .(T22, [])) → app20_out_gaa([], T22, .(T22, []))
app20_in_gaa([], T30, .(X56, .(T30, []))) → app20_out_gaa([], T30, .(X56, .(T30, [])))
app20_in_gaa(.(T36, T38), T39, .(T36, X53)) → U2_gaa(T36, T38, T39, X53, app20_in_gaa(T38, T39, X53))
app20_in_gaa(.(T45, T47), T48, .(T45, X53)) → U3_gaa(T45, T47, T48, X53, app20_in_gaa(T47, T48, X53))
U3_gaa(T45, T47, T48, X53, app20_out_gaa(T47, T48, X53)) → app20_out_gaa(.(T45, T47), T48, .(T45, X53))
U2_gaa(T36, T38, T39, X53, app20_out_gaa(T38, T39, X53)) → app20_out_gaa(.(T36, T38), T39, .(T36, X53))
U10_gaa(T4, T16, T17, app20_out_gaa(T15, T16, X35)) → goal1_out_gaa(T4, T16, T17)
goal1_in_gaa(T4, T16, T49) → U11_gaa(T4, T16, T49, s2l4_in_ga(T4, T15))
U11_gaa(T4, T16, T49, s2l4_out_ga(T4, T15)) → U12_gaa(T4, T16, T49, app20_in_gag(T15, T16, .(T49, [])))
app20_in_gag([], T22, .(T22, [])) → app20_out_gag([], T22, .(T22, []))
app20_in_gag([], T30, .(X56, .(T30, []))) → app20_out_gag([], T30, .(X56, .(T30, [])))
app20_in_gag(.(T36, T38), T39, .(T36, X53)) → U2_gag(T36, T38, T39, X53, app20_in_gag(T38, T39, X53))
app20_in_gag(.(T45, T47), T48, .(T45, X53)) → U3_gag(T45, T47, T48, X53, app20_in_gag(T47, T48, X53))
U3_gag(T45, T47, T48, X53, app20_out_gag(T47, T48, X53)) → app20_out_gag(.(T45, T47), T48, .(T45, X53))
U2_gag(T36, T38, T39, X53, app20_out_gag(T38, T39, X53)) → app20_out_gag(.(T36, T38), T39, .(T36, X53))
U12_gaa(T4, T16, T49, app20_out_gag(T15, T16, .(T49, []))) → goal1_out_gaa(T4, T16, T49)
goal1_in_gaa(T4, T16, T56) → U13_gaa(T4, T16, T56, s2l4_in_ga(T4, T15))
U13_gaa(T4, T16, T56, s2l4_out_ga(T4, T15)) → U14_gaa(T4, T16, T56, app20_in_gag(T15, T16, []))
U14_gaa(T4, T16, T56, app20_out_gag(T15, T16, [])) → U15_gaa(T4, T16, T56, last63_in_a(T56))
last63_in_a(T56) → U4_a(T56, last63_in_a(T56))
U4_a(T56, last63_out_a(T56)) → last63_out_a(T56)
U15_gaa(T4, T16, T56, last63_out_a(T56)) → goal1_out_gaa(T4, T16, T56)
goal1_in_gaa(T4, T16, T59) → U16_gaa(T4, T16, T59, s2l4_in_ga(T4, T15))
U16_gaa(T4, T16, T59, s2l4_out_ga(T4, T15)) → U17_gaa(T4, T16, T59, app20_in_gaa(T15, T16, .(T57, T60)))
U17_gaa(T4, T16, T59, app20_out_gaa(T15, T16, .(T57, T60))) → U18_gaa(T4, T16, T59, last21_in_ag(T59, T60))
last21_in_ag(T49, .(T49, [])) → last21_out_ag(T49, .(T49, []))
last21_in_ag(T56, []) → U5_ag(T56, last63_in_a(T56))
U5_ag(T56, last63_out_a(T56)) → last21_out_ag(T56, [])
last21_in_ag(T59, .(T57, T60)) → U6_ag(T59, T57, T60, last21_in_ag(T59, T60))
last21_in_ag(T63, .(T61, T64)) → U7_ag(T63, T61, T64, last21_in_ag(T63, T64))
U7_ag(T63, T61, T64, last21_out_ag(T63, T64)) → last21_out_ag(T63, .(T61, T64))
U6_ag(T59, T57, T60, last21_out_ag(T59, T60)) → last21_out_ag(T59, .(T57, T60))
U18_gaa(T4, T16, T59, last21_out_ag(T59, T60)) → goal1_out_gaa(T4, T16, T59)
goal1_in_gaa(T4, T16, T63) → U19_gaa(T4, T16, T63, s2l4_in_ga(T4, T15))
U19_gaa(T4, T16, T63, s2l4_out_ga(T4, T15)) → U20_gaa(T4, T16, T63, app20_in_gaa(T15, T16, .(T61, T64)))
U20_gaa(T4, T16, T63, app20_out_gaa(T15, T16, .(T61, T64))) → U21_gaa(T4, T16, T63, last21_in_ag(T63, T64))
U21_gaa(T4, T16, T63, last21_out_ag(T63, T64)) → goal1_out_gaa(T4, T16, T63)

The argument filtering Pi contains the following mapping:
goal1_in_gaa(x1, x2, x3)  =  goal1_in_gaa(x1)
U8_gaa(x1, x2, x3, x4)  =  U8_gaa(x1, x4)
s2l4_in_ga(x1, x2)  =  s2l4_in_ga(x1)
0  =  0
s2l4_out_ga(x1, x2)  =  s2l4_out_ga(x1, x2)
s(x1)  =  s(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
.(x1, x2)  =  .(x2)
goal1_out_gaa(x1, x2, x3)  =  goal1_out_gaa(x1)
U9_gaa(x1, x2, x3, x4)  =  U9_gaa(x1, x4)
U10_gaa(x1, x2, x3, x4)  =  U10_gaa(x1, x4)
app20_in_gaa(x1, x2, x3)  =  app20_in_gaa(x1)
[]  =  []
app20_out_gaa(x1, x2, x3)  =  app20_out_gaa(x1, x3)
U2_gaa(x1, x2, x3, x4, x5)  =  U2_gaa(x2, x5)
U3_gaa(x1, x2, x3, x4, x5)  =  U3_gaa(x2, x5)
U11_gaa(x1, x2, x3, x4)  =  U11_gaa(x1, x4)
U12_gaa(x1, x2, x3, x4)  =  U12_gaa(x1, x4)
app20_in_gag(x1, x2, x3)  =  app20_in_gag(x1, x3)
app20_out_gag(x1, x2, x3)  =  app20_out_gag(x1, x3)
U2_gag(x1, x2, x3, x4, x5)  =  U2_gag(x2, x4, x5)
U3_gag(x1, x2, x3, x4, x5)  =  U3_gag(x2, x4, x5)
U13_gaa(x1, x2, x3, x4)  =  U13_gaa(x1, x4)
U14_gaa(x1, x2, x3, x4)  =  U14_gaa(x1, x4)
U15_gaa(x1, x2, x3, x4)  =  U15_gaa(x1, x4)
last63_in_a(x1)  =  last63_in_a
U4_a(x1, x2)  =  U4_a(x2)
last63_out_a(x1)  =  last63_out_a(x1)
U16_gaa(x1, x2, x3, x4)  =  U16_gaa(x1, x4)
U17_gaa(x1, x2, x3, x4)  =  U17_gaa(x1, x4)
U18_gaa(x1, x2, x3, x4)  =  U18_gaa(x1, x4)
last21_in_ag(x1, x2)  =  last21_in_ag(x2)
last21_out_ag(x1, x2)  =  last21_out_ag(x2)
U5_ag(x1, x2)  =  U5_ag(x2)
U6_ag(x1, x2, x3, x4)  =  U6_ag(x3, x4)
U7_ag(x1, x2, x3, x4)  =  U7_ag(x3, x4)
U19_gaa(x1, x2, x3, x4)  =  U19_gaa(x1, x4)
U20_gaa(x1, x2, x3, x4)  =  U20_gaa(x1, x4)
U21_gaa(x1, x2, x3, x4)  =  U21_gaa(x1, x4)
GOAL1_IN_GAA(x1, x2, x3)  =  GOAL1_IN_GAA(x1)
U8_GAA(x1, x2, x3, x4)  =  U8_GAA(x1, x4)
S2L4_IN_GA(x1, x2)  =  S2L4_IN_GA(x1)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x1, x4)
U9_GAA(x1, x2, x3, x4)  =  U9_GAA(x1, x4)
U10_GAA(x1, x2, x3, x4)  =  U10_GAA(x1, x4)
APP20_IN_GAA(x1, x2, x3)  =  APP20_IN_GAA(x1)
U2_GAA(x1, x2, x3, x4, x5)  =  U2_GAA(x2, x5)
U3_GAA(x1, x2, x3, x4, x5)  =  U3_GAA(x2, x5)
U11_GAA(x1, x2, x3, x4)  =  U11_GAA(x1, x4)
U12_GAA(x1, x2, x3, x4)  =  U12_GAA(x1, x4)
APP20_IN_GAG(x1, x2, x3)  =  APP20_IN_GAG(x1, x3)
U2_GAG(x1, x2, x3, x4, x5)  =  U2_GAG(x2, x4, x5)
U3_GAG(x1, x2, x3, x4, x5)  =  U3_GAG(x2, x4, x5)
U13_GAA(x1, x2, x3, x4)  =  U13_GAA(x1, x4)
U14_GAA(x1, x2, x3, x4)  =  U14_GAA(x1, x4)
U15_GAA(x1, x2, x3, x4)  =  U15_GAA(x1, x4)
LAST63_IN_A(x1)  =  LAST63_IN_A
U4_A(x1, x2)  =  U4_A(x2)
U16_GAA(x1, x2, x3, x4)  =  U16_GAA(x1, x4)
U17_GAA(x1, x2, x3, x4)  =  U17_GAA(x1, x4)
U18_GAA(x1, x2, x3, x4)  =  U18_GAA(x1, x4)
LAST21_IN_AG(x1, x2)  =  LAST21_IN_AG(x2)
U5_AG(x1, x2)  =  U5_AG(x2)
U6_AG(x1, x2, x3, x4)  =  U6_AG(x3, x4)
U7_AG(x1, x2, x3, x4)  =  U7_AG(x3, x4)
U19_GAA(x1, x2, x3, x4)  =  U19_GAA(x1, x4)
U20_GAA(x1, x2, x3, x4)  =  U20_GAA(x1, x4)
U21_GAA(x1, x2, x3, x4)  =  U21_GAA(x1, x4)

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

(6) Obligation:

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

GOAL1_IN_GAA(T4, T7, T8) → U8_GAA(T4, T7, T8, s2l4_in_ga(T4, X11))
GOAL1_IN_GAA(T4, T7, T8) → S2L4_IN_GA(T4, X11)
S2L4_IN_GA(s(T11), .(X25, X26)) → U1_GA(T11, X25, X26, s2l4_in_ga(T11, X26))
S2L4_IN_GA(s(T11), .(X25, X26)) → S2L4_IN_GA(T11, X26)
GOAL1_IN_GAA(T4, T16, T17) → U9_GAA(T4, T16, T17, s2l4_in_ga(T4, T15))
U9_GAA(T4, T16, T17, s2l4_out_ga(T4, T15)) → U10_GAA(T4, T16, T17, app20_in_gaa(T15, T16, X35))
U9_GAA(T4, T16, T17, s2l4_out_ga(T4, T15)) → APP20_IN_GAA(T15, T16, X35)
APP20_IN_GAA(.(T36, T38), T39, .(T36, X53)) → U2_GAA(T36, T38, T39, X53, app20_in_gaa(T38, T39, X53))
APP20_IN_GAA(.(T36, T38), T39, .(T36, X53)) → APP20_IN_GAA(T38, T39, X53)
APP20_IN_GAA(.(T45, T47), T48, .(T45, X53)) → U3_GAA(T45, T47, T48, X53, app20_in_gaa(T47, T48, X53))
GOAL1_IN_GAA(T4, T16, T49) → U11_GAA(T4, T16, T49, s2l4_in_ga(T4, T15))
U11_GAA(T4, T16, T49, s2l4_out_ga(T4, T15)) → U12_GAA(T4, T16, T49, app20_in_gag(T15, T16, .(T49, [])))
U11_GAA(T4, T16, T49, s2l4_out_ga(T4, T15)) → APP20_IN_GAG(T15, T16, .(T49, []))
APP20_IN_GAG(.(T36, T38), T39, .(T36, X53)) → U2_GAG(T36, T38, T39, X53, app20_in_gag(T38, T39, X53))
APP20_IN_GAG(.(T36, T38), T39, .(T36, X53)) → APP20_IN_GAG(T38, T39, X53)
APP20_IN_GAG(.(T45, T47), T48, .(T45, X53)) → U3_GAG(T45, T47, T48, X53, app20_in_gag(T47, T48, X53))
GOAL1_IN_GAA(T4, T16, T56) → U13_GAA(T4, T16, T56, s2l4_in_ga(T4, T15))
U13_GAA(T4, T16, T56, s2l4_out_ga(T4, T15)) → U14_GAA(T4, T16, T56, app20_in_gag(T15, T16, []))
U13_GAA(T4, T16, T56, s2l4_out_ga(T4, T15)) → APP20_IN_GAG(T15, T16, [])
U14_GAA(T4, T16, T56, app20_out_gag(T15, T16, [])) → U15_GAA(T4, T16, T56, last63_in_a(T56))
U14_GAA(T4, T16, T56, app20_out_gag(T15, T16, [])) → LAST63_IN_A(T56)
LAST63_IN_A(T56) → U4_A(T56, last63_in_a(T56))
LAST63_IN_A(T56) → LAST63_IN_A(T56)
GOAL1_IN_GAA(T4, T16, T59) → U16_GAA(T4, T16, T59, s2l4_in_ga(T4, T15))
U16_GAA(T4, T16, T59, s2l4_out_ga(T4, T15)) → U17_GAA(T4, T16, T59, app20_in_gaa(T15, T16, .(T57, T60)))
U16_GAA(T4, T16, T59, s2l4_out_ga(T4, T15)) → APP20_IN_GAA(T15, T16, .(T57, T60))
U17_GAA(T4, T16, T59, app20_out_gaa(T15, T16, .(T57, T60))) → U18_GAA(T4, T16, T59, last21_in_ag(T59, T60))
U17_GAA(T4, T16, T59, app20_out_gaa(T15, T16, .(T57, T60))) → LAST21_IN_AG(T59, T60)
LAST21_IN_AG(T56, []) → U5_AG(T56, last63_in_a(T56))
LAST21_IN_AG(T56, []) → LAST63_IN_A(T56)
LAST21_IN_AG(T59, .(T57, T60)) → U6_AG(T59, T57, T60, last21_in_ag(T59, T60))
LAST21_IN_AG(T59, .(T57, T60)) → LAST21_IN_AG(T59, T60)
LAST21_IN_AG(T63, .(T61, T64)) → U7_AG(T63, T61, T64, last21_in_ag(T63, T64))
GOAL1_IN_GAA(T4, T16, T63) → U19_GAA(T4, T16, T63, s2l4_in_ga(T4, T15))
U19_GAA(T4, T16, T63, s2l4_out_ga(T4, T15)) → U20_GAA(T4, T16, T63, app20_in_gaa(T15, T16, .(T61, T64)))
U19_GAA(T4, T16, T63, s2l4_out_ga(T4, T15)) → APP20_IN_GAA(T15, T16, .(T61, T64))
U20_GAA(T4, T16, T63, app20_out_gaa(T15, T16, .(T61, T64))) → U21_GAA(T4, T16, T63, last21_in_ag(T63, T64))
U20_GAA(T4, T16, T63, app20_out_gaa(T15, T16, .(T61, T64))) → LAST21_IN_AG(T63, T64)

The TRS R consists of the following rules:

goal1_in_gaa(T4, T7, T8) → U8_gaa(T4, T7, T8, s2l4_in_ga(T4, X11))
s2l4_in_ga(0, []) → s2l4_out_ga(0, [])
s2l4_in_ga(s(T11), .(X25, X26)) → U1_ga(T11, X25, X26, s2l4_in_ga(T11, X26))
U1_ga(T11, X25, X26, s2l4_out_ga(T11, X26)) → s2l4_out_ga(s(T11), .(X25, X26))
U8_gaa(T4, T7, T8, s2l4_out_ga(T4, X11)) → goal1_out_gaa(T4, T7, T8)
goal1_in_gaa(T4, T16, T17) → U9_gaa(T4, T16, T17, s2l4_in_ga(T4, T15))
U9_gaa(T4, T16, T17, s2l4_out_ga(T4, T15)) → U10_gaa(T4, T16, T17, app20_in_gaa(T15, T16, X35))
app20_in_gaa([], T22, .(T22, [])) → app20_out_gaa([], T22, .(T22, []))
app20_in_gaa([], T30, .(X56, .(T30, []))) → app20_out_gaa([], T30, .(X56, .(T30, [])))
app20_in_gaa(.(T36, T38), T39, .(T36, X53)) → U2_gaa(T36, T38, T39, X53, app20_in_gaa(T38, T39, X53))
app20_in_gaa(.(T45, T47), T48, .(T45, X53)) → U3_gaa(T45, T47, T48, X53, app20_in_gaa(T47, T48, X53))
U3_gaa(T45, T47, T48, X53, app20_out_gaa(T47, T48, X53)) → app20_out_gaa(.(T45, T47), T48, .(T45, X53))
U2_gaa(T36, T38, T39, X53, app20_out_gaa(T38, T39, X53)) → app20_out_gaa(.(T36, T38), T39, .(T36, X53))
U10_gaa(T4, T16, T17, app20_out_gaa(T15, T16, X35)) → goal1_out_gaa(T4, T16, T17)
goal1_in_gaa(T4, T16, T49) → U11_gaa(T4, T16, T49, s2l4_in_ga(T4, T15))
U11_gaa(T4, T16, T49, s2l4_out_ga(T4, T15)) → U12_gaa(T4, T16, T49, app20_in_gag(T15, T16, .(T49, [])))
app20_in_gag([], T22, .(T22, [])) → app20_out_gag([], T22, .(T22, []))
app20_in_gag([], T30, .(X56, .(T30, []))) → app20_out_gag([], T30, .(X56, .(T30, [])))
app20_in_gag(.(T36, T38), T39, .(T36, X53)) → U2_gag(T36, T38, T39, X53, app20_in_gag(T38, T39, X53))
app20_in_gag(.(T45, T47), T48, .(T45, X53)) → U3_gag(T45, T47, T48, X53, app20_in_gag(T47, T48, X53))
U3_gag(T45, T47, T48, X53, app20_out_gag(T47, T48, X53)) → app20_out_gag(.(T45, T47), T48, .(T45, X53))
U2_gag(T36, T38, T39, X53, app20_out_gag(T38, T39, X53)) → app20_out_gag(.(T36, T38), T39, .(T36, X53))
U12_gaa(T4, T16, T49, app20_out_gag(T15, T16, .(T49, []))) → goal1_out_gaa(T4, T16, T49)
goal1_in_gaa(T4, T16, T56) → U13_gaa(T4, T16, T56, s2l4_in_ga(T4, T15))
U13_gaa(T4, T16, T56, s2l4_out_ga(T4, T15)) → U14_gaa(T4, T16, T56, app20_in_gag(T15, T16, []))
U14_gaa(T4, T16, T56, app20_out_gag(T15, T16, [])) → U15_gaa(T4, T16, T56, last63_in_a(T56))
last63_in_a(T56) → U4_a(T56, last63_in_a(T56))
U4_a(T56, last63_out_a(T56)) → last63_out_a(T56)
U15_gaa(T4, T16, T56, last63_out_a(T56)) → goal1_out_gaa(T4, T16, T56)
goal1_in_gaa(T4, T16, T59) → U16_gaa(T4, T16, T59, s2l4_in_ga(T4, T15))
U16_gaa(T4, T16, T59, s2l4_out_ga(T4, T15)) → U17_gaa(T4, T16, T59, app20_in_gaa(T15, T16, .(T57, T60)))
U17_gaa(T4, T16, T59, app20_out_gaa(T15, T16, .(T57, T60))) → U18_gaa(T4, T16, T59, last21_in_ag(T59, T60))
last21_in_ag(T49, .(T49, [])) → last21_out_ag(T49, .(T49, []))
last21_in_ag(T56, []) → U5_ag(T56, last63_in_a(T56))
U5_ag(T56, last63_out_a(T56)) → last21_out_ag(T56, [])
last21_in_ag(T59, .(T57, T60)) → U6_ag(T59, T57, T60, last21_in_ag(T59, T60))
last21_in_ag(T63, .(T61, T64)) → U7_ag(T63, T61, T64, last21_in_ag(T63, T64))
U7_ag(T63, T61, T64, last21_out_ag(T63, T64)) → last21_out_ag(T63, .(T61, T64))
U6_ag(T59, T57, T60, last21_out_ag(T59, T60)) → last21_out_ag(T59, .(T57, T60))
U18_gaa(T4, T16, T59, last21_out_ag(T59, T60)) → goal1_out_gaa(T4, T16, T59)
goal1_in_gaa(T4, T16, T63) → U19_gaa(T4, T16, T63, s2l4_in_ga(T4, T15))
U19_gaa(T4, T16, T63, s2l4_out_ga(T4, T15)) → U20_gaa(T4, T16, T63, app20_in_gaa(T15, T16, .(T61, T64)))
U20_gaa(T4, T16, T63, app20_out_gaa(T15, T16, .(T61, T64))) → U21_gaa(T4, T16, T63, last21_in_ag(T63, T64))
U21_gaa(T4, T16, T63, last21_out_ag(T63, T64)) → goal1_out_gaa(T4, T16, T63)

The argument filtering Pi contains the following mapping:
goal1_in_gaa(x1, x2, x3)  =  goal1_in_gaa(x1)
U8_gaa(x1, x2, x3, x4)  =  U8_gaa(x1, x4)
s2l4_in_ga(x1, x2)  =  s2l4_in_ga(x1)
0  =  0
s2l4_out_ga(x1, x2)  =  s2l4_out_ga(x1, x2)
s(x1)  =  s(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
.(x1, x2)  =  .(x2)
goal1_out_gaa(x1, x2, x3)  =  goal1_out_gaa(x1)
U9_gaa(x1, x2, x3, x4)  =  U9_gaa(x1, x4)
U10_gaa(x1, x2, x3, x4)  =  U10_gaa(x1, x4)
app20_in_gaa(x1, x2, x3)  =  app20_in_gaa(x1)
[]  =  []
app20_out_gaa(x1, x2, x3)  =  app20_out_gaa(x1, x3)
U2_gaa(x1, x2, x3, x4, x5)  =  U2_gaa(x2, x5)
U3_gaa(x1, x2, x3, x4, x5)  =  U3_gaa(x2, x5)
U11_gaa(x1, x2, x3, x4)  =  U11_gaa(x1, x4)
U12_gaa(x1, x2, x3, x4)  =  U12_gaa(x1, x4)
app20_in_gag(x1, x2, x3)  =  app20_in_gag(x1, x3)
app20_out_gag(x1, x2, x3)  =  app20_out_gag(x1, x3)
U2_gag(x1, x2, x3, x4, x5)  =  U2_gag(x2, x4, x5)
U3_gag(x1, x2, x3, x4, x5)  =  U3_gag(x2, x4, x5)
U13_gaa(x1, x2, x3, x4)  =  U13_gaa(x1, x4)
U14_gaa(x1, x2, x3, x4)  =  U14_gaa(x1, x4)
U15_gaa(x1, x2, x3, x4)  =  U15_gaa(x1, x4)
last63_in_a(x1)  =  last63_in_a
U4_a(x1, x2)  =  U4_a(x2)
last63_out_a(x1)  =  last63_out_a(x1)
U16_gaa(x1, x2, x3, x4)  =  U16_gaa(x1, x4)
U17_gaa(x1, x2, x3, x4)  =  U17_gaa(x1, x4)
U18_gaa(x1, x2, x3, x4)  =  U18_gaa(x1, x4)
last21_in_ag(x1, x2)  =  last21_in_ag(x2)
last21_out_ag(x1, x2)  =  last21_out_ag(x2)
U5_ag(x1, x2)  =  U5_ag(x2)
U6_ag(x1, x2, x3, x4)  =  U6_ag(x3, x4)
U7_ag(x1, x2, x3, x4)  =  U7_ag(x3, x4)
U19_gaa(x1, x2, x3, x4)  =  U19_gaa(x1, x4)
U20_gaa(x1, x2, x3, x4)  =  U20_gaa(x1, x4)
U21_gaa(x1, x2, x3, x4)  =  U21_gaa(x1, x4)
GOAL1_IN_GAA(x1, x2, x3)  =  GOAL1_IN_GAA(x1)
U8_GAA(x1, x2, x3, x4)  =  U8_GAA(x1, x4)
S2L4_IN_GA(x1, x2)  =  S2L4_IN_GA(x1)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x1, x4)
U9_GAA(x1, x2, x3, x4)  =  U9_GAA(x1, x4)
U10_GAA(x1, x2, x3, x4)  =  U10_GAA(x1, x4)
APP20_IN_GAA(x1, x2, x3)  =  APP20_IN_GAA(x1)
U2_GAA(x1, x2, x3, x4, x5)  =  U2_GAA(x2, x5)
U3_GAA(x1, x2, x3, x4, x5)  =  U3_GAA(x2, x5)
U11_GAA(x1, x2, x3, x4)  =  U11_GAA(x1, x4)
U12_GAA(x1, x2, x3, x4)  =  U12_GAA(x1, x4)
APP20_IN_GAG(x1, x2, x3)  =  APP20_IN_GAG(x1, x3)
U2_GAG(x1, x2, x3, x4, x5)  =  U2_GAG(x2, x4, x5)
U3_GAG(x1, x2, x3, x4, x5)  =  U3_GAG(x2, x4, x5)
U13_GAA(x1, x2, x3, x4)  =  U13_GAA(x1, x4)
U14_GAA(x1, x2, x3, x4)  =  U14_GAA(x1, x4)
U15_GAA(x1, x2, x3, x4)  =  U15_GAA(x1, x4)
LAST63_IN_A(x1)  =  LAST63_IN_A
U4_A(x1, x2)  =  U4_A(x2)
U16_GAA(x1, x2, x3, x4)  =  U16_GAA(x1, x4)
U17_GAA(x1, x2, x3, x4)  =  U17_GAA(x1, x4)
U18_GAA(x1, x2, x3, x4)  =  U18_GAA(x1, x4)
LAST21_IN_AG(x1, x2)  =  LAST21_IN_AG(x2)
U5_AG(x1, x2)  =  U5_AG(x2)
U6_AG(x1, x2, x3, x4)  =  U6_AG(x3, x4)
U7_AG(x1, x2, x3, x4)  =  U7_AG(x3, x4)
U19_GAA(x1, x2, x3, x4)  =  U19_GAA(x1, x4)
U20_GAA(x1, x2, x3, x4)  =  U20_GAA(x1, x4)
U21_GAA(x1, x2, x3, x4)  =  U21_GAA(x1, x4)

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

(7) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 5 SCCs with 33 less nodes.

(8) Complex Obligation (AND)

(9) Obligation:

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

LAST63_IN_A(T56) → LAST63_IN_A(T56)

The TRS R consists of the following rules:

goal1_in_gaa(T4, T7, T8) → U8_gaa(T4, T7, T8, s2l4_in_ga(T4, X11))
s2l4_in_ga(0, []) → s2l4_out_ga(0, [])
s2l4_in_ga(s(T11), .(X25, X26)) → U1_ga(T11, X25, X26, s2l4_in_ga(T11, X26))
U1_ga(T11, X25, X26, s2l4_out_ga(T11, X26)) → s2l4_out_ga(s(T11), .(X25, X26))
U8_gaa(T4, T7, T8, s2l4_out_ga(T4, X11)) → goal1_out_gaa(T4, T7, T8)
goal1_in_gaa(T4, T16, T17) → U9_gaa(T4, T16, T17, s2l4_in_ga(T4, T15))
U9_gaa(T4, T16, T17, s2l4_out_ga(T4, T15)) → U10_gaa(T4, T16, T17, app20_in_gaa(T15, T16, X35))
app20_in_gaa([], T22, .(T22, [])) → app20_out_gaa([], T22, .(T22, []))
app20_in_gaa([], T30, .(X56, .(T30, []))) → app20_out_gaa([], T30, .(X56, .(T30, [])))
app20_in_gaa(.(T36, T38), T39, .(T36, X53)) → U2_gaa(T36, T38, T39, X53, app20_in_gaa(T38, T39, X53))
app20_in_gaa(.(T45, T47), T48, .(T45, X53)) → U3_gaa(T45, T47, T48, X53, app20_in_gaa(T47, T48, X53))
U3_gaa(T45, T47, T48, X53, app20_out_gaa(T47, T48, X53)) → app20_out_gaa(.(T45, T47), T48, .(T45, X53))
U2_gaa(T36, T38, T39, X53, app20_out_gaa(T38, T39, X53)) → app20_out_gaa(.(T36, T38), T39, .(T36, X53))
U10_gaa(T4, T16, T17, app20_out_gaa(T15, T16, X35)) → goal1_out_gaa(T4, T16, T17)
goal1_in_gaa(T4, T16, T49) → U11_gaa(T4, T16, T49, s2l4_in_ga(T4, T15))
U11_gaa(T4, T16, T49, s2l4_out_ga(T4, T15)) → U12_gaa(T4, T16, T49, app20_in_gag(T15, T16, .(T49, [])))
app20_in_gag([], T22, .(T22, [])) → app20_out_gag([], T22, .(T22, []))
app20_in_gag([], T30, .(X56, .(T30, []))) → app20_out_gag([], T30, .(X56, .(T30, [])))
app20_in_gag(.(T36, T38), T39, .(T36, X53)) → U2_gag(T36, T38, T39, X53, app20_in_gag(T38, T39, X53))
app20_in_gag(.(T45, T47), T48, .(T45, X53)) → U3_gag(T45, T47, T48, X53, app20_in_gag(T47, T48, X53))
U3_gag(T45, T47, T48, X53, app20_out_gag(T47, T48, X53)) → app20_out_gag(.(T45, T47), T48, .(T45, X53))
U2_gag(T36, T38, T39, X53, app20_out_gag(T38, T39, X53)) → app20_out_gag(.(T36, T38), T39, .(T36, X53))
U12_gaa(T4, T16, T49, app20_out_gag(T15, T16, .(T49, []))) → goal1_out_gaa(T4, T16, T49)
goal1_in_gaa(T4, T16, T56) → U13_gaa(T4, T16, T56, s2l4_in_ga(T4, T15))
U13_gaa(T4, T16, T56, s2l4_out_ga(T4, T15)) → U14_gaa(T4, T16, T56, app20_in_gag(T15, T16, []))
U14_gaa(T4, T16, T56, app20_out_gag(T15, T16, [])) → U15_gaa(T4, T16, T56, last63_in_a(T56))
last63_in_a(T56) → U4_a(T56, last63_in_a(T56))
U4_a(T56, last63_out_a(T56)) → last63_out_a(T56)
U15_gaa(T4, T16, T56, last63_out_a(T56)) → goal1_out_gaa(T4, T16, T56)
goal1_in_gaa(T4, T16, T59) → U16_gaa(T4, T16, T59, s2l4_in_ga(T4, T15))
U16_gaa(T4, T16, T59, s2l4_out_ga(T4, T15)) → U17_gaa(T4, T16, T59, app20_in_gaa(T15, T16, .(T57, T60)))
U17_gaa(T4, T16, T59, app20_out_gaa(T15, T16, .(T57, T60))) → U18_gaa(T4, T16, T59, last21_in_ag(T59, T60))
last21_in_ag(T49, .(T49, [])) → last21_out_ag(T49, .(T49, []))
last21_in_ag(T56, []) → U5_ag(T56, last63_in_a(T56))
U5_ag(T56, last63_out_a(T56)) → last21_out_ag(T56, [])
last21_in_ag(T59, .(T57, T60)) → U6_ag(T59, T57, T60, last21_in_ag(T59, T60))
last21_in_ag(T63, .(T61, T64)) → U7_ag(T63, T61, T64, last21_in_ag(T63, T64))
U7_ag(T63, T61, T64, last21_out_ag(T63, T64)) → last21_out_ag(T63, .(T61, T64))
U6_ag(T59, T57, T60, last21_out_ag(T59, T60)) → last21_out_ag(T59, .(T57, T60))
U18_gaa(T4, T16, T59, last21_out_ag(T59, T60)) → goal1_out_gaa(T4, T16, T59)
goal1_in_gaa(T4, T16, T63) → U19_gaa(T4, T16, T63, s2l4_in_ga(T4, T15))
U19_gaa(T4, T16, T63, s2l4_out_ga(T4, T15)) → U20_gaa(T4, T16, T63, app20_in_gaa(T15, T16, .(T61, T64)))
U20_gaa(T4, T16, T63, app20_out_gaa(T15, T16, .(T61, T64))) → U21_gaa(T4, T16, T63, last21_in_ag(T63, T64))
U21_gaa(T4, T16, T63, last21_out_ag(T63, T64)) → goal1_out_gaa(T4, T16, T63)

The argument filtering Pi contains the following mapping:
goal1_in_gaa(x1, x2, x3)  =  goal1_in_gaa(x1)
U8_gaa(x1, x2, x3, x4)  =  U8_gaa(x1, x4)
s2l4_in_ga(x1, x2)  =  s2l4_in_ga(x1)
0  =  0
s2l4_out_ga(x1, x2)  =  s2l4_out_ga(x1, x2)
s(x1)  =  s(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
.(x1, x2)  =  .(x2)
goal1_out_gaa(x1, x2, x3)  =  goal1_out_gaa(x1)
U9_gaa(x1, x2, x3, x4)  =  U9_gaa(x1, x4)
U10_gaa(x1, x2, x3, x4)  =  U10_gaa(x1, x4)
app20_in_gaa(x1, x2, x3)  =  app20_in_gaa(x1)
[]  =  []
app20_out_gaa(x1, x2, x3)  =  app20_out_gaa(x1, x3)
U2_gaa(x1, x2, x3, x4, x5)  =  U2_gaa(x2, x5)
U3_gaa(x1, x2, x3, x4, x5)  =  U3_gaa(x2, x5)
U11_gaa(x1, x2, x3, x4)  =  U11_gaa(x1, x4)
U12_gaa(x1, x2, x3, x4)  =  U12_gaa(x1, x4)
app20_in_gag(x1, x2, x3)  =  app20_in_gag(x1, x3)
app20_out_gag(x1, x2, x3)  =  app20_out_gag(x1, x3)
U2_gag(x1, x2, x3, x4, x5)  =  U2_gag(x2, x4, x5)
U3_gag(x1, x2, x3, x4, x5)  =  U3_gag(x2, x4, x5)
U13_gaa(x1, x2, x3, x4)  =  U13_gaa(x1, x4)
U14_gaa(x1, x2, x3, x4)  =  U14_gaa(x1, x4)
U15_gaa(x1, x2, x3, x4)  =  U15_gaa(x1, x4)
last63_in_a(x1)  =  last63_in_a
U4_a(x1, x2)  =  U4_a(x2)
last63_out_a(x1)  =  last63_out_a(x1)
U16_gaa(x1, x2, x3, x4)  =  U16_gaa(x1, x4)
U17_gaa(x1, x2, x3, x4)  =  U17_gaa(x1, x4)
U18_gaa(x1, x2, x3, x4)  =  U18_gaa(x1, x4)
last21_in_ag(x1, x2)  =  last21_in_ag(x2)
last21_out_ag(x1, x2)  =  last21_out_ag(x2)
U5_ag(x1, x2)  =  U5_ag(x2)
U6_ag(x1, x2, x3, x4)  =  U6_ag(x3, x4)
U7_ag(x1, x2, x3, x4)  =  U7_ag(x3, x4)
U19_gaa(x1, x2, x3, x4)  =  U19_gaa(x1, x4)
U20_gaa(x1, x2, x3, x4)  =  U20_gaa(x1, x4)
U21_gaa(x1, x2, x3, x4)  =  U21_gaa(x1, x4)
LAST63_IN_A(x1)  =  LAST63_IN_A

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

(10) UsableRulesProof (EQUIVALENT transformation)

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

(11) Obligation:

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

LAST63_IN_A(T56) → LAST63_IN_A(T56)

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

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

(12) PiDPToQDPProof (SOUND transformation)

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

(13) Obligation:

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

LAST63_IN_ALAST63_IN_A

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

(14) 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 = LAST63_IN_A evaluates to t =LAST63_IN_A

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 LAST63_IN_A to LAST63_IN_A.



(15) FALSE

(16) Obligation:

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

LAST21_IN_AG(T59, .(T57, T60)) → LAST21_IN_AG(T59, T60)

The TRS R consists of the following rules:

goal1_in_gaa(T4, T7, T8) → U8_gaa(T4, T7, T8, s2l4_in_ga(T4, X11))
s2l4_in_ga(0, []) → s2l4_out_ga(0, [])
s2l4_in_ga(s(T11), .(X25, X26)) → U1_ga(T11, X25, X26, s2l4_in_ga(T11, X26))
U1_ga(T11, X25, X26, s2l4_out_ga(T11, X26)) → s2l4_out_ga(s(T11), .(X25, X26))
U8_gaa(T4, T7, T8, s2l4_out_ga(T4, X11)) → goal1_out_gaa(T4, T7, T8)
goal1_in_gaa(T4, T16, T17) → U9_gaa(T4, T16, T17, s2l4_in_ga(T4, T15))
U9_gaa(T4, T16, T17, s2l4_out_ga(T4, T15)) → U10_gaa(T4, T16, T17, app20_in_gaa(T15, T16, X35))
app20_in_gaa([], T22, .(T22, [])) → app20_out_gaa([], T22, .(T22, []))
app20_in_gaa([], T30, .(X56, .(T30, []))) → app20_out_gaa([], T30, .(X56, .(T30, [])))
app20_in_gaa(.(T36, T38), T39, .(T36, X53)) → U2_gaa(T36, T38, T39, X53, app20_in_gaa(T38, T39, X53))
app20_in_gaa(.(T45, T47), T48, .(T45, X53)) → U3_gaa(T45, T47, T48, X53, app20_in_gaa(T47, T48, X53))
U3_gaa(T45, T47, T48, X53, app20_out_gaa(T47, T48, X53)) → app20_out_gaa(.(T45, T47), T48, .(T45, X53))
U2_gaa(T36, T38, T39, X53, app20_out_gaa(T38, T39, X53)) → app20_out_gaa(.(T36, T38), T39, .(T36, X53))
U10_gaa(T4, T16, T17, app20_out_gaa(T15, T16, X35)) → goal1_out_gaa(T4, T16, T17)
goal1_in_gaa(T4, T16, T49) → U11_gaa(T4, T16, T49, s2l4_in_ga(T4, T15))
U11_gaa(T4, T16, T49, s2l4_out_ga(T4, T15)) → U12_gaa(T4, T16, T49, app20_in_gag(T15, T16, .(T49, [])))
app20_in_gag([], T22, .(T22, [])) → app20_out_gag([], T22, .(T22, []))
app20_in_gag([], T30, .(X56, .(T30, []))) → app20_out_gag([], T30, .(X56, .(T30, [])))
app20_in_gag(.(T36, T38), T39, .(T36, X53)) → U2_gag(T36, T38, T39, X53, app20_in_gag(T38, T39, X53))
app20_in_gag(.(T45, T47), T48, .(T45, X53)) → U3_gag(T45, T47, T48, X53, app20_in_gag(T47, T48, X53))
U3_gag(T45, T47, T48, X53, app20_out_gag(T47, T48, X53)) → app20_out_gag(.(T45, T47), T48, .(T45, X53))
U2_gag(T36, T38, T39, X53, app20_out_gag(T38, T39, X53)) → app20_out_gag(.(T36, T38), T39, .(T36, X53))
U12_gaa(T4, T16, T49, app20_out_gag(T15, T16, .(T49, []))) → goal1_out_gaa(T4, T16, T49)
goal1_in_gaa(T4, T16, T56) → U13_gaa(T4, T16, T56, s2l4_in_ga(T4, T15))
U13_gaa(T4, T16, T56, s2l4_out_ga(T4, T15)) → U14_gaa(T4, T16, T56, app20_in_gag(T15, T16, []))
U14_gaa(T4, T16, T56, app20_out_gag(T15, T16, [])) → U15_gaa(T4, T16, T56, last63_in_a(T56))
last63_in_a(T56) → U4_a(T56, last63_in_a(T56))
U4_a(T56, last63_out_a(T56)) → last63_out_a(T56)
U15_gaa(T4, T16, T56, last63_out_a(T56)) → goal1_out_gaa(T4, T16, T56)
goal1_in_gaa(T4, T16, T59) → U16_gaa(T4, T16, T59, s2l4_in_ga(T4, T15))
U16_gaa(T4, T16, T59, s2l4_out_ga(T4, T15)) → U17_gaa(T4, T16, T59, app20_in_gaa(T15, T16, .(T57, T60)))
U17_gaa(T4, T16, T59, app20_out_gaa(T15, T16, .(T57, T60))) → U18_gaa(T4, T16, T59, last21_in_ag(T59, T60))
last21_in_ag(T49, .(T49, [])) → last21_out_ag(T49, .(T49, []))
last21_in_ag(T56, []) → U5_ag(T56, last63_in_a(T56))
U5_ag(T56, last63_out_a(T56)) → last21_out_ag(T56, [])
last21_in_ag(T59, .(T57, T60)) → U6_ag(T59, T57, T60, last21_in_ag(T59, T60))
last21_in_ag(T63, .(T61, T64)) → U7_ag(T63, T61, T64, last21_in_ag(T63, T64))
U7_ag(T63, T61, T64, last21_out_ag(T63, T64)) → last21_out_ag(T63, .(T61, T64))
U6_ag(T59, T57, T60, last21_out_ag(T59, T60)) → last21_out_ag(T59, .(T57, T60))
U18_gaa(T4, T16, T59, last21_out_ag(T59, T60)) → goal1_out_gaa(T4, T16, T59)
goal1_in_gaa(T4, T16, T63) → U19_gaa(T4, T16, T63, s2l4_in_ga(T4, T15))
U19_gaa(T4, T16, T63, s2l4_out_ga(T4, T15)) → U20_gaa(T4, T16, T63, app20_in_gaa(T15, T16, .(T61, T64)))
U20_gaa(T4, T16, T63, app20_out_gaa(T15, T16, .(T61, T64))) → U21_gaa(T4, T16, T63, last21_in_ag(T63, T64))
U21_gaa(T4, T16, T63, last21_out_ag(T63, T64)) → goal1_out_gaa(T4, T16, T63)

The argument filtering Pi contains the following mapping:
goal1_in_gaa(x1, x2, x3)  =  goal1_in_gaa(x1)
U8_gaa(x1, x2, x3, x4)  =  U8_gaa(x1, x4)
s2l4_in_ga(x1, x2)  =  s2l4_in_ga(x1)
0  =  0
s2l4_out_ga(x1, x2)  =  s2l4_out_ga(x1, x2)
s(x1)  =  s(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
.(x1, x2)  =  .(x2)
goal1_out_gaa(x1, x2, x3)  =  goal1_out_gaa(x1)
U9_gaa(x1, x2, x3, x4)  =  U9_gaa(x1, x4)
U10_gaa(x1, x2, x3, x4)  =  U10_gaa(x1, x4)
app20_in_gaa(x1, x2, x3)  =  app20_in_gaa(x1)
[]  =  []
app20_out_gaa(x1, x2, x3)  =  app20_out_gaa(x1, x3)
U2_gaa(x1, x2, x3, x4, x5)  =  U2_gaa(x2, x5)
U3_gaa(x1, x2, x3, x4, x5)  =  U3_gaa(x2, x5)
U11_gaa(x1, x2, x3, x4)  =  U11_gaa(x1, x4)
U12_gaa(x1, x2, x3, x4)  =  U12_gaa(x1, x4)
app20_in_gag(x1, x2, x3)  =  app20_in_gag(x1, x3)
app20_out_gag(x1, x2, x3)  =  app20_out_gag(x1, x3)
U2_gag(x1, x2, x3, x4, x5)  =  U2_gag(x2, x4, x5)
U3_gag(x1, x2, x3, x4, x5)  =  U3_gag(x2, x4, x5)
U13_gaa(x1, x2, x3, x4)  =  U13_gaa(x1, x4)
U14_gaa(x1, x2, x3, x4)  =  U14_gaa(x1, x4)
U15_gaa(x1, x2, x3, x4)  =  U15_gaa(x1, x4)
last63_in_a(x1)  =  last63_in_a
U4_a(x1, x2)  =  U4_a(x2)
last63_out_a(x1)  =  last63_out_a(x1)
U16_gaa(x1, x2, x3, x4)  =  U16_gaa(x1, x4)
U17_gaa(x1, x2, x3, x4)  =  U17_gaa(x1, x4)
U18_gaa(x1, x2, x3, x4)  =  U18_gaa(x1, x4)
last21_in_ag(x1, x2)  =  last21_in_ag(x2)
last21_out_ag(x1, x2)  =  last21_out_ag(x2)
U5_ag(x1, x2)  =  U5_ag(x2)
U6_ag(x1, x2, x3, x4)  =  U6_ag(x3, x4)
U7_ag(x1, x2, x3, x4)  =  U7_ag(x3, x4)
U19_gaa(x1, x2, x3, x4)  =  U19_gaa(x1, x4)
U20_gaa(x1, x2, x3, x4)  =  U20_gaa(x1, x4)
U21_gaa(x1, x2, x3, x4)  =  U21_gaa(x1, x4)
LAST21_IN_AG(x1, x2)  =  LAST21_IN_AG(x2)

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

(17) UsableRulesProof (EQUIVALENT transformation)

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

(18) Obligation:

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

LAST21_IN_AG(T59, .(T57, T60)) → LAST21_IN_AG(T59, T60)

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

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

(19) PiDPToQDPProof (SOUND transformation)

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

(20) Obligation:

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

LAST21_IN_AG(.(T60)) → LAST21_IN_AG(T60)

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

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

  • LAST21_IN_AG(.(T60)) → LAST21_IN_AG(T60)
    The graph contains the following edges 1 > 1

(22) TRUE

(23) Obligation:

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

APP20_IN_GAG(.(T36, T38), T39, .(T36, X53)) → APP20_IN_GAG(T38, T39, X53)

The TRS R consists of the following rules:

goal1_in_gaa(T4, T7, T8) → U8_gaa(T4, T7, T8, s2l4_in_ga(T4, X11))
s2l4_in_ga(0, []) → s2l4_out_ga(0, [])
s2l4_in_ga(s(T11), .(X25, X26)) → U1_ga(T11, X25, X26, s2l4_in_ga(T11, X26))
U1_ga(T11, X25, X26, s2l4_out_ga(T11, X26)) → s2l4_out_ga(s(T11), .(X25, X26))
U8_gaa(T4, T7, T8, s2l4_out_ga(T4, X11)) → goal1_out_gaa(T4, T7, T8)
goal1_in_gaa(T4, T16, T17) → U9_gaa(T4, T16, T17, s2l4_in_ga(T4, T15))
U9_gaa(T4, T16, T17, s2l4_out_ga(T4, T15)) → U10_gaa(T4, T16, T17, app20_in_gaa(T15, T16, X35))
app20_in_gaa([], T22, .(T22, [])) → app20_out_gaa([], T22, .(T22, []))
app20_in_gaa([], T30, .(X56, .(T30, []))) → app20_out_gaa([], T30, .(X56, .(T30, [])))
app20_in_gaa(.(T36, T38), T39, .(T36, X53)) → U2_gaa(T36, T38, T39, X53, app20_in_gaa(T38, T39, X53))
app20_in_gaa(.(T45, T47), T48, .(T45, X53)) → U3_gaa(T45, T47, T48, X53, app20_in_gaa(T47, T48, X53))
U3_gaa(T45, T47, T48, X53, app20_out_gaa(T47, T48, X53)) → app20_out_gaa(.(T45, T47), T48, .(T45, X53))
U2_gaa(T36, T38, T39, X53, app20_out_gaa(T38, T39, X53)) → app20_out_gaa(.(T36, T38), T39, .(T36, X53))
U10_gaa(T4, T16, T17, app20_out_gaa(T15, T16, X35)) → goal1_out_gaa(T4, T16, T17)
goal1_in_gaa(T4, T16, T49) → U11_gaa(T4, T16, T49, s2l4_in_ga(T4, T15))
U11_gaa(T4, T16, T49, s2l4_out_ga(T4, T15)) → U12_gaa(T4, T16, T49, app20_in_gag(T15, T16, .(T49, [])))
app20_in_gag([], T22, .(T22, [])) → app20_out_gag([], T22, .(T22, []))
app20_in_gag([], T30, .(X56, .(T30, []))) → app20_out_gag([], T30, .(X56, .(T30, [])))
app20_in_gag(.(T36, T38), T39, .(T36, X53)) → U2_gag(T36, T38, T39, X53, app20_in_gag(T38, T39, X53))
app20_in_gag(.(T45, T47), T48, .(T45, X53)) → U3_gag(T45, T47, T48, X53, app20_in_gag(T47, T48, X53))
U3_gag(T45, T47, T48, X53, app20_out_gag(T47, T48, X53)) → app20_out_gag(.(T45, T47), T48, .(T45, X53))
U2_gag(T36, T38, T39, X53, app20_out_gag(T38, T39, X53)) → app20_out_gag(.(T36, T38), T39, .(T36, X53))
U12_gaa(T4, T16, T49, app20_out_gag(T15, T16, .(T49, []))) → goal1_out_gaa(T4, T16, T49)
goal1_in_gaa(T4, T16, T56) → U13_gaa(T4, T16, T56, s2l4_in_ga(T4, T15))
U13_gaa(T4, T16, T56, s2l4_out_ga(T4, T15)) → U14_gaa(T4, T16, T56, app20_in_gag(T15, T16, []))
U14_gaa(T4, T16, T56, app20_out_gag(T15, T16, [])) → U15_gaa(T4, T16, T56, last63_in_a(T56))
last63_in_a(T56) → U4_a(T56, last63_in_a(T56))
U4_a(T56, last63_out_a(T56)) → last63_out_a(T56)
U15_gaa(T4, T16, T56, last63_out_a(T56)) → goal1_out_gaa(T4, T16, T56)
goal1_in_gaa(T4, T16, T59) → U16_gaa(T4, T16, T59, s2l4_in_ga(T4, T15))
U16_gaa(T4, T16, T59, s2l4_out_ga(T4, T15)) → U17_gaa(T4, T16, T59, app20_in_gaa(T15, T16, .(T57, T60)))
U17_gaa(T4, T16, T59, app20_out_gaa(T15, T16, .(T57, T60))) → U18_gaa(T4, T16, T59, last21_in_ag(T59, T60))
last21_in_ag(T49, .(T49, [])) → last21_out_ag(T49, .(T49, []))
last21_in_ag(T56, []) → U5_ag(T56, last63_in_a(T56))
U5_ag(T56, last63_out_a(T56)) → last21_out_ag(T56, [])
last21_in_ag(T59, .(T57, T60)) → U6_ag(T59, T57, T60, last21_in_ag(T59, T60))
last21_in_ag(T63, .(T61, T64)) → U7_ag(T63, T61, T64, last21_in_ag(T63, T64))
U7_ag(T63, T61, T64, last21_out_ag(T63, T64)) → last21_out_ag(T63, .(T61, T64))
U6_ag(T59, T57, T60, last21_out_ag(T59, T60)) → last21_out_ag(T59, .(T57, T60))
U18_gaa(T4, T16, T59, last21_out_ag(T59, T60)) → goal1_out_gaa(T4, T16, T59)
goal1_in_gaa(T4, T16, T63) → U19_gaa(T4, T16, T63, s2l4_in_ga(T4, T15))
U19_gaa(T4, T16, T63, s2l4_out_ga(T4, T15)) → U20_gaa(T4, T16, T63, app20_in_gaa(T15, T16, .(T61, T64)))
U20_gaa(T4, T16, T63, app20_out_gaa(T15, T16, .(T61, T64))) → U21_gaa(T4, T16, T63, last21_in_ag(T63, T64))
U21_gaa(T4, T16, T63, last21_out_ag(T63, T64)) → goal1_out_gaa(T4, T16, T63)

The argument filtering Pi contains the following mapping:
goal1_in_gaa(x1, x2, x3)  =  goal1_in_gaa(x1)
U8_gaa(x1, x2, x3, x4)  =  U8_gaa(x1, x4)
s2l4_in_ga(x1, x2)  =  s2l4_in_ga(x1)
0  =  0
s2l4_out_ga(x1, x2)  =  s2l4_out_ga(x1, x2)
s(x1)  =  s(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
.(x1, x2)  =  .(x2)
goal1_out_gaa(x1, x2, x3)  =  goal1_out_gaa(x1)
U9_gaa(x1, x2, x3, x4)  =  U9_gaa(x1, x4)
U10_gaa(x1, x2, x3, x4)  =  U10_gaa(x1, x4)
app20_in_gaa(x1, x2, x3)  =  app20_in_gaa(x1)
[]  =  []
app20_out_gaa(x1, x2, x3)  =  app20_out_gaa(x1, x3)
U2_gaa(x1, x2, x3, x4, x5)  =  U2_gaa(x2, x5)
U3_gaa(x1, x2, x3, x4, x5)  =  U3_gaa(x2, x5)
U11_gaa(x1, x2, x3, x4)  =  U11_gaa(x1, x4)
U12_gaa(x1, x2, x3, x4)  =  U12_gaa(x1, x4)
app20_in_gag(x1, x2, x3)  =  app20_in_gag(x1, x3)
app20_out_gag(x1, x2, x3)  =  app20_out_gag(x1, x3)
U2_gag(x1, x2, x3, x4, x5)  =  U2_gag(x2, x4, x5)
U3_gag(x1, x2, x3, x4, x5)  =  U3_gag(x2, x4, x5)
U13_gaa(x1, x2, x3, x4)  =  U13_gaa(x1, x4)
U14_gaa(x1, x2, x3, x4)  =  U14_gaa(x1, x4)
U15_gaa(x1, x2, x3, x4)  =  U15_gaa(x1, x4)
last63_in_a(x1)  =  last63_in_a
U4_a(x1, x2)  =  U4_a(x2)
last63_out_a(x1)  =  last63_out_a(x1)
U16_gaa(x1, x2, x3, x4)  =  U16_gaa(x1, x4)
U17_gaa(x1, x2, x3, x4)  =  U17_gaa(x1, x4)
U18_gaa(x1, x2, x3, x4)  =  U18_gaa(x1, x4)
last21_in_ag(x1, x2)  =  last21_in_ag(x2)
last21_out_ag(x1, x2)  =  last21_out_ag(x2)
U5_ag(x1, x2)  =  U5_ag(x2)
U6_ag(x1, x2, x3, x4)  =  U6_ag(x3, x4)
U7_ag(x1, x2, x3, x4)  =  U7_ag(x3, x4)
U19_gaa(x1, x2, x3, x4)  =  U19_gaa(x1, x4)
U20_gaa(x1, x2, x3, x4)  =  U20_gaa(x1, x4)
U21_gaa(x1, x2, x3, x4)  =  U21_gaa(x1, x4)
APP20_IN_GAG(x1, x2, x3)  =  APP20_IN_GAG(x1, x3)

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

(24) UsableRulesProof (EQUIVALENT transformation)

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

(25) Obligation:

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

APP20_IN_GAG(.(T36, T38), T39, .(T36, X53)) → APP20_IN_GAG(T38, T39, X53)

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

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

(26) PiDPToQDPProof (SOUND transformation)

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

(27) Obligation:

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

APP20_IN_GAG(.(T38), .(X53)) → APP20_IN_GAG(T38, X53)

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

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

  • APP20_IN_GAG(.(T38), .(X53)) → APP20_IN_GAG(T38, X53)
    The graph contains the following edges 1 > 1, 2 > 2

(29) TRUE

(30) Obligation:

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

APP20_IN_GAA(.(T36, T38), T39, .(T36, X53)) → APP20_IN_GAA(T38, T39, X53)

The TRS R consists of the following rules:

goal1_in_gaa(T4, T7, T8) → U8_gaa(T4, T7, T8, s2l4_in_ga(T4, X11))
s2l4_in_ga(0, []) → s2l4_out_ga(0, [])
s2l4_in_ga(s(T11), .(X25, X26)) → U1_ga(T11, X25, X26, s2l4_in_ga(T11, X26))
U1_ga(T11, X25, X26, s2l4_out_ga(T11, X26)) → s2l4_out_ga(s(T11), .(X25, X26))
U8_gaa(T4, T7, T8, s2l4_out_ga(T4, X11)) → goal1_out_gaa(T4, T7, T8)
goal1_in_gaa(T4, T16, T17) → U9_gaa(T4, T16, T17, s2l4_in_ga(T4, T15))
U9_gaa(T4, T16, T17, s2l4_out_ga(T4, T15)) → U10_gaa(T4, T16, T17, app20_in_gaa(T15, T16, X35))
app20_in_gaa([], T22, .(T22, [])) → app20_out_gaa([], T22, .(T22, []))
app20_in_gaa([], T30, .(X56, .(T30, []))) → app20_out_gaa([], T30, .(X56, .(T30, [])))
app20_in_gaa(.(T36, T38), T39, .(T36, X53)) → U2_gaa(T36, T38, T39, X53, app20_in_gaa(T38, T39, X53))
app20_in_gaa(.(T45, T47), T48, .(T45, X53)) → U3_gaa(T45, T47, T48, X53, app20_in_gaa(T47, T48, X53))
U3_gaa(T45, T47, T48, X53, app20_out_gaa(T47, T48, X53)) → app20_out_gaa(.(T45, T47), T48, .(T45, X53))
U2_gaa(T36, T38, T39, X53, app20_out_gaa(T38, T39, X53)) → app20_out_gaa(.(T36, T38), T39, .(T36, X53))
U10_gaa(T4, T16, T17, app20_out_gaa(T15, T16, X35)) → goal1_out_gaa(T4, T16, T17)
goal1_in_gaa(T4, T16, T49) → U11_gaa(T4, T16, T49, s2l4_in_ga(T4, T15))
U11_gaa(T4, T16, T49, s2l4_out_ga(T4, T15)) → U12_gaa(T4, T16, T49, app20_in_gag(T15, T16, .(T49, [])))
app20_in_gag([], T22, .(T22, [])) → app20_out_gag([], T22, .(T22, []))
app20_in_gag([], T30, .(X56, .(T30, []))) → app20_out_gag([], T30, .(X56, .(T30, [])))
app20_in_gag(.(T36, T38), T39, .(T36, X53)) → U2_gag(T36, T38, T39, X53, app20_in_gag(T38, T39, X53))
app20_in_gag(.(T45, T47), T48, .(T45, X53)) → U3_gag(T45, T47, T48, X53, app20_in_gag(T47, T48, X53))
U3_gag(T45, T47, T48, X53, app20_out_gag(T47, T48, X53)) → app20_out_gag(.(T45, T47), T48, .(T45, X53))
U2_gag(T36, T38, T39, X53, app20_out_gag(T38, T39, X53)) → app20_out_gag(.(T36, T38), T39, .(T36, X53))
U12_gaa(T4, T16, T49, app20_out_gag(T15, T16, .(T49, []))) → goal1_out_gaa(T4, T16, T49)
goal1_in_gaa(T4, T16, T56) → U13_gaa(T4, T16, T56, s2l4_in_ga(T4, T15))
U13_gaa(T4, T16, T56, s2l4_out_ga(T4, T15)) → U14_gaa(T4, T16, T56, app20_in_gag(T15, T16, []))
U14_gaa(T4, T16, T56, app20_out_gag(T15, T16, [])) → U15_gaa(T4, T16, T56, last63_in_a(T56))
last63_in_a(T56) → U4_a(T56, last63_in_a(T56))
U4_a(T56, last63_out_a(T56)) → last63_out_a(T56)
U15_gaa(T4, T16, T56, last63_out_a(T56)) → goal1_out_gaa(T4, T16, T56)
goal1_in_gaa(T4, T16, T59) → U16_gaa(T4, T16, T59, s2l4_in_ga(T4, T15))
U16_gaa(T4, T16, T59, s2l4_out_ga(T4, T15)) → U17_gaa(T4, T16, T59, app20_in_gaa(T15, T16, .(T57, T60)))
U17_gaa(T4, T16, T59, app20_out_gaa(T15, T16, .(T57, T60))) → U18_gaa(T4, T16, T59, last21_in_ag(T59, T60))
last21_in_ag(T49, .(T49, [])) → last21_out_ag(T49, .(T49, []))
last21_in_ag(T56, []) → U5_ag(T56, last63_in_a(T56))
U5_ag(T56, last63_out_a(T56)) → last21_out_ag(T56, [])
last21_in_ag(T59, .(T57, T60)) → U6_ag(T59, T57, T60, last21_in_ag(T59, T60))
last21_in_ag(T63, .(T61, T64)) → U7_ag(T63, T61, T64, last21_in_ag(T63, T64))
U7_ag(T63, T61, T64, last21_out_ag(T63, T64)) → last21_out_ag(T63, .(T61, T64))
U6_ag(T59, T57, T60, last21_out_ag(T59, T60)) → last21_out_ag(T59, .(T57, T60))
U18_gaa(T4, T16, T59, last21_out_ag(T59, T60)) → goal1_out_gaa(T4, T16, T59)
goal1_in_gaa(T4, T16, T63) → U19_gaa(T4, T16, T63, s2l4_in_ga(T4, T15))
U19_gaa(T4, T16, T63, s2l4_out_ga(T4, T15)) → U20_gaa(T4, T16, T63, app20_in_gaa(T15, T16, .(T61, T64)))
U20_gaa(T4, T16, T63, app20_out_gaa(T15, T16, .(T61, T64))) → U21_gaa(T4, T16, T63, last21_in_ag(T63, T64))
U21_gaa(T4, T16, T63, last21_out_ag(T63, T64)) → goal1_out_gaa(T4, T16, T63)

The argument filtering Pi contains the following mapping:
goal1_in_gaa(x1, x2, x3)  =  goal1_in_gaa(x1)
U8_gaa(x1, x2, x3, x4)  =  U8_gaa(x1, x4)
s2l4_in_ga(x1, x2)  =  s2l4_in_ga(x1)
0  =  0
s2l4_out_ga(x1, x2)  =  s2l4_out_ga(x1, x2)
s(x1)  =  s(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
.(x1, x2)  =  .(x2)
goal1_out_gaa(x1, x2, x3)  =  goal1_out_gaa(x1)
U9_gaa(x1, x2, x3, x4)  =  U9_gaa(x1, x4)
U10_gaa(x1, x2, x3, x4)  =  U10_gaa(x1, x4)
app20_in_gaa(x1, x2, x3)  =  app20_in_gaa(x1)
[]  =  []
app20_out_gaa(x1, x2, x3)  =  app20_out_gaa(x1, x3)
U2_gaa(x1, x2, x3, x4, x5)  =  U2_gaa(x2, x5)
U3_gaa(x1, x2, x3, x4, x5)  =  U3_gaa(x2, x5)
U11_gaa(x1, x2, x3, x4)  =  U11_gaa(x1, x4)
U12_gaa(x1, x2, x3, x4)  =  U12_gaa(x1, x4)
app20_in_gag(x1, x2, x3)  =  app20_in_gag(x1, x3)
app20_out_gag(x1, x2, x3)  =  app20_out_gag(x1, x3)
U2_gag(x1, x2, x3, x4, x5)  =  U2_gag(x2, x4, x5)
U3_gag(x1, x2, x3, x4, x5)  =  U3_gag(x2, x4, x5)
U13_gaa(x1, x2, x3, x4)  =  U13_gaa(x1, x4)
U14_gaa(x1, x2, x3, x4)  =  U14_gaa(x1, x4)
U15_gaa(x1, x2, x3, x4)  =  U15_gaa(x1, x4)
last63_in_a(x1)  =  last63_in_a
U4_a(x1, x2)  =  U4_a(x2)
last63_out_a(x1)  =  last63_out_a(x1)
U16_gaa(x1, x2, x3, x4)  =  U16_gaa(x1, x4)
U17_gaa(x1, x2, x3, x4)  =  U17_gaa(x1, x4)
U18_gaa(x1, x2, x3, x4)  =  U18_gaa(x1, x4)
last21_in_ag(x1, x2)  =  last21_in_ag(x2)
last21_out_ag(x1, x2)  =  last21_out_ag(x2)
U5_ag(x1, x2)  =  U5_ag(x2)
U6_ag(x1, x2, x3, x4)  =  U6_ag(x3, x4)
U7_ag(x1, x2, x3, x4)  =  U7_ag(x3, x4)
U19_gaa(x1, x2, x3, x4)  =  U19_gaa(x1, x4)
U20_gaa(x1, x2, x3, x4)  =  U20_gaa(x1, x4)
U21_gaa(x1, x2, x3, x4)  =  U21_gaa(x1, x4)
APP20_IN_GAA(x1, x2, x3)  =  APP20_IN_GAA(x1)

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

(31) UsableRulesProof (EQUIVALENT transformation)

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

(32) Obligation:

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

APP20_IN_GAA(.(T36, T38), T39, .(T36, X53)) → APP20_IN_GAA(T38, T39, X53)

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

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

(33) PiDPToQDPProof (SOUND transformation)

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

(34) Obligation:

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

APP20_IN_GAA(.(T38)) → APP20_IN_GAA(T38)

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

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

  • APP20_IN_GAA(.(T38)) → APP20_IN_GAA(T38)
    The graph contains the following edges 1 > 1

(36) TRUE

(37) Obligation:

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

S2L4_IN_GA(s(T11), .(X25, X26)) → S2L4_IN_GA(T11, X26)

The TRS R consists of the following rules:

goal1_in_gaa(T4, T7, T8) → U8_gaa(T4, T7, T8, s2l4_in_ga(T4, X11))
s2l4_in_ga(0, []) → s2l4_out_ga(0, [])
s2l4_in_ga(s(T11), .(X25, X26)) → U1_ga(T11, X25, X26, s2l4_in_ga(T11, X26))
U1_ga(T11, X25, X26, s2l4_out_ga(T11, X26)) → s2l4_out_ga(s(T11), .(X25, X26))
U8_gaa(T4, T7, T8, s2l4_out_ga(T4, X11)) → goal1_out_gaa(T4, T7, T8)
goal1_in_gaa(T4, T16, T17) → U9_gaa(T4, T16, T17, s2l4_in_ga(T4, T15))
U9_gaa(T4, T16, T17, s2l4_out_ga(T4, T15)) → U10_gaa(T4, T16, T17, app20_in_gaa(T15, T16, X35))
app20_in_gaa([], T22, .(T22, [])) → app20_out_gaa([], T22, .(T22, []))
app20_in_gaa([], T30, .(X56, .(T30, []))) → app20_out_gaa([], T30, .(X56, .(T30, [])))
app20_in_gaa(.(T36, T38), T39, .(T36, X53)) → U2_gaa(T36, T38, T39, X53, app20_in_gaa(T38, T39, X53))
app20_in_gaa(.(T45, T47), T48, .(T45, X53)) → U3_gaa(T45, T47, T48, X53, app20_in_gaa(T47, T48, X53))
U3_gaa(T45, T47, T48, X53, app20_out_gaa(T47, T48, X53)) → app20_out_gaa(.(T45, T47), T48, .(T45, X53))
U2_gaa(T36, T38, T39, X53, app20_out_gaa(T38, T39, X53)) → app20_out_gaa(.(T36, T38), T39, .(T36, X53))
U10_gaa(T4, T16, T17, app20_out_gaa(T15, T16, X35)) → goal1_out_gaa(T4, T16, T17)
goal1_in_gaa(T4, T16, T49) → U11_gaa(T4, T16, T49, s2l4_in_ga(T4, T15))
U11_gaa(T4, T16, T49, s2l4_out_ga(T4, T15)) → U12_gaa(T4, T16, T49, app20_in_gag(T15, T16, .(T49, [])))
app20_in_gag([], T22, .(T22, [])) → app20_out_gag([], T22, .(T22, []))
app20_in_gag([], T30, .(X56, .(T30, []))) → app20_out_gag([], T30, .(X56, .(T30, [])))
app20_in_gag(.(T36, T38), T39, .(T36, X53)) → U2_gag(T36, T38, T39, X53, app20_in_gag(T38, T39, X53))
app20_in_gag(.(T45, T47), T48, .(T45, X53)) → U3_gag(T45, T47, T48, X53, app20_in_gag(T47, T48, X53))
U3_gag(T45, T47, T48, X53, app20_out_gag(T47, T48, X53)) → app20_out_gag(.(T45, T47), T48, .(T45, X53))
U2_gag(T36, T38, T39, X53, app20_out_gag(T38, T39, X53)) → app20_out_gag(.(T36, T38), T39, .(T36, X53))
U12_gaa(T4, T16, T49, app20_out_gag(T15, T16, .(T49, []))) → goal1_out_gaa(T4, T16, T49)
goal1_in_gaa(T4, T16, T56) → U13_gaa(T4, T16, T56, s2l4_in_ga(T4, T15))
U13_gaa(T4, T16, T56, s2l4_out_ga(T4, T15)) → U14_gaa(T4, T16, T56, app20_in_gag(T15, T16, []))
U14_gaa(T4, T16, T56, app20_out_gag(T15, T16, [])) → U15_gaa(T4, T16, T56, last63_in_a(T56))
last63_in_a(T56) → U4_a(T56, last63_in_a(T56))
U4_a(T56, last63_out_a(T56)) → last63_out_a(T56)
U15_gaa(T4, T16, T56, last63_out_a(T56)) → goal1_out_gaa(T4, T16, T56)
goal1_in_gaa(T4, T16, T59) → U16_gaa(T4, T16, T59, s2l4_in_ga(T4, T15))
U16_gaa(T4, T16, T59, s2l4_out_ga(T4, T15)) → U17_gaa(T4, T16, T59, app20_in_gaa(T15, T16, .(T57, T60)))
U17_gaa(T4, T16, T59, app20_out_gaa(T15, T16, .(T57, T60))) → U18_gaa(T4, T16, T59, last21_in_ag(T59, T60))
last21_in_ag(T49, .(T49, [])) → last21_out_ag(T49, .(T49, []))
last21_in_ag(T56, []) → U5_ag(T56, last63_in_a(T56))
U5_ag(T56, last63_out_a(T56)) → last21_out_ag(T56, [])
last21_in_ag(T59, .(T57, T60)) → U6_ag(T59, T57, T60, last21_in_ag(T59, T60))
last21_in_ag(T63, .(T61, T64)) → U7_ag(T63, T61, T64, last21_in_ag(T63, T64))
U7_ag(T63, T61, T64, last21_out_ag(T63, T64)) → last21_out_ag(T63, .(T61, T64))
U6_ag(T59, T57, T60, last21_out_ag(T59, T60)) → last21_out_ag(T59, .(T57, T60))
U18_gaa(T4, T16, T59, last21_out_ag(T59, T60)) → goal1_out_gaa(T4, T16, T59)
goal1_in_gaa(T4, T16, T63) → U19_gaa(T4, T16, T63, s2l4_in_ga(T4, T15))
U19_gaa(T4, T16, T63, s2l4_out_ga(T4, T15)) → U20_gaa(T4, T16, T63, app20_in_gaa(T15, T16, .(T61, T64)))
U20_gaa(T4, T16, T63, app20_out_gaa(T15, T16, .(T61, T64))) → U21_gaa(T4, T16, T63, last21_in_ag(T63, T64))
U21_gaa(T4, T16, T63, last21_out_ag(T63, T64)) → goal1_out_gaa(T4, T16, T63)

The argument filtering Pi contains the following mapping:
goal1_in_gaa(x1, x2, x3)  =  goal1_in_gaa(x1)
U8_gaa(x1, x2, x3, x4)  =  U8_gaa(x1, x4)
s2l4_in_ga(x1, x2)  =  s2l4_in_ga(x1)
0  =  0
s2l4_out_ga(x1, x2)  =  s2l4_out_ga(x1, x2)
s(x1)  =  s(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
.(x1, x2)  =  .(x2)
goal1_out_gaa(x1, x2, x3)  =  goal1_out_gaa(x1)
U9_gaa(x1, x2, x3, x4)  =  U9_gaa(x1, x4)
U10_gaa(x1, x2, x3, x4)  =  U10_gaa(x1, x4)
app20_in_gaa(x1, x2, x3)  =  app20_in_gaa(x1)
[]  =  []
app20_out_gaa(x1, x2, x3)  =  app20_out_gaa(x1, x3)
U2_gaa(x1, x2, x3, x4, x5)  =  U2_gaa(x2, x5)
U3_gaa(x1, x2, x3, x4, x5)  =  U3_gaa(x2, x5)
U11_gaa(x1, x2, x3, x4)  =  U11_gaa(x1, x4)
U12_gaa(x1, x2, x3, x4)  =  U12_gaa(x1, x4)
app20_in_gag(x1, x2, x3)  =  app20_in_gag(x1, x3)
app20_out_gag(x1, x2, x3)  =  app20_out_gag(x1, x3)
U2_gag(x1, x2, x3, x4, x5)  =  U2_gag(x2, x4, x5)
U3_gag(x1, x2, x3, x4, x5)  =  U3_gag(x2, x4, x5)
U13_gaa(x1, x2, x3, x4)  =  U13_gaa(x1, x4)
U14_gaa(x1, x2, x3, x4)  =  U14_gaa(x1, x4)
U15_gaa(x1, x2, x3, x4)  =  U15_gaa(x1, x4)
last63_in_a(x1)  =  last63_in_a
U4_a(x1, x2)  =  U4_a(x2)
last63_out_a(x1)  =  last63_out_a(x1)
U16_gaa(x1, x2, x3, x4)  =  U16_gaa(x1, x4)
U17_gaa(x1, x2, x3, x4)  =  U17_gaa(x1, x4)
U18_gaa(x1, x2, x3, x4)  =  U18_gaa(x1, x4)
last21_in_ag(x1, x2)  =  last21_in_ag(x2)
last21_out_ag(x1, x2)  =  last21_out_ag(x2)
U5_ag(x1, x2)  =  U5_ag(x2)
U6_ag(x1, x2, x3, x4)  =  U6_ag(x3, x4)
U7_ag(x1, x2, x3, x4)  =  U7_ag(x3, x4)
U19_gaa(x1, x2, x3, x4)  =  U19_gaa(x1, x4)
U20_gaa(x1, x2, x3, x4)  =  U20_gaa(x1, x4)
U21_gaa(x1, x2, x3, x4)  =  U21_gaa(x1, x4)
S2L4_IN_GA(x1, x2)  =  S2L4_IN_GA(x1)

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

(38) UsableRulesProof (EQUIVALENT transformation)

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

(39) Obligation:

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

S2L4_IN_GA(s(T11), .(X25, X26)) → S2L4_IN_GA(T11, X26)

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

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

(40) PiDPToQDPProof (SOUND transformation)

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

(41) Obligation:

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

S2L4_IN_GA(s(T11)) → S2L4_IN_GA(T11)

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

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

  • S2L4_IN_GA(s(T11)) → S2L4_IN_GA(T11)
    The graph contains the following edges 1 > 1

(43) TRUE

(44) PrologToPiTRSProof (SOUND transformation)

We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
goal1_in: (b,f,f)
s2l4_in: (b,f)
app20_in: (b,f,f) (b,f,b)
last63_in: (f)
last21_in: (f,b)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

goal1_in_gaa(T4, T7, T8) → U8_gaa(T4, T7, T8, s2l4_in_ga(T4, X11))
s2l4_in_ga(0, []) → s2l4_out_ga(0, [])
s2l4_in_ga(s(T11), .(X25, X26)) → U1_ga(T11, X25, X26, s2l4_in_ga(T11, X26))
U1_ga(T11, X25, X26, s2l4_out_ga(T11, X26)) → s2l4_out_ga(s(T11), .(X25, X26))
U8_gaa(T4, T7, T8, s2l4_out_ga(T4, X11)) → goal1_out_gaa(T4, T7, T8)
goal1_in_gaa(T4, T16, T17) → U9_gaa(T4, T16, T17, s2l4_in_ga(T4, T15))
U9_gaa(T4, T16, T17, s2l4_out_ga(T4, T15)) → U10_gaa(T4, T16, T17, app20_in_gaa(T15, T16, X35))
app20_in_gaa([], T22, .(T22, [])) → app20_out_gaa([], T22, .(T22, []))
app20_in_gaa([], T30, .(X56, .(T30, []))) → app20_out_gaa([], T30, .(X56, .(T30, [])))
app20_in_gaa(.(T36, T38), T39, .(T36, X53)) → U2_gaa(T36, T38, T39, X53, app20_in_gaa(T38, T39, X53))
app20_in_gaa(.(T45, T47), T48, .(T45, X53)) → U3_gaa(T45, T47, T48, X53, app20_in_gaa(T47, T48, X53))
U3_gaa(T45, T47, T48, X53, app20_out_gaa(T47, T48, X53)) → app20_out_gaa(.(T45, T47), T48, .(T45, X53))
U2_gaa(T36, T38, T39, X53, app20_out_gaa(T38, T39, X53)) → app20_out_gaa(.(T36, T38), T39, .(T36, X53))
U10_gaa(T4, T16, T17, app20_out_gaa(T15, T16, X35)) → goal1_out_gaa(T4, T16, T17)
goal1_in_gaa(T4, T16, T49) → U11_gaa(T4, T16, T49, s2l4_in_ga(T4, T15))
U11_gaa(T4, T16, T49, s2l4_out_ga(T4, T15)) → U12_gaa(T4, T16, T49, app20_in_gag(T15, T16, .(T49, [])))
app20_in_gag([], T22, .(T22, [])) → app20_out_gag([], T22, .(T22, []))
app20_in_gag([], T30, .(X56, .(T30, []))) → app20_out_gag([], T30, .(X56, .(T30, [])))
app20_in_gag(.(T36, T38), T39, .(T36, X53)) → U2_gag(T36, T38, T39, X53, app20_in_gag(T38, T39, X53))
app20_in_gag(.(T45, T47), T48, .(T45, X53)) → U3_gag(T45, T47, T48, X53, app20_in_gag(T47, T48, X53))
U3_gag(T45, T47, T48, X53, app20_out_gag(T47, T48, X53)) → app20_out_gag(.(T45, T47), T48, .(T45, X53))
U2_gag(T36, T38, T39, X53, app20_out_gag(T38, T39, X53)) → app20_out_gag(.(T36, T38), T39, .(T36, X53))
U12_gaa(T4, T16, T49, app20_out_gag(T15, T16, .(T49, []))) → goal1_out_gaa(T4, T16, T49)
goal1_in_gaa(T4, T16, T56) → U13_gaa(T4, T16, T56, s2l4_in_ga(T4, T15))
U13_gaa(T4, T16, T56, s2l4_out_ga(T4, T15)) → U14_gaa(T4, T16, T56, app20_in_gag(T15, T16, []))
U14_gaa(T4, T16, T56, app20_out_gag(T15, T16, [])) → U15_gaa(T4, T16, T56, last63_in_a(T56))
last63_in_a(T56) → U4_a(T56, last63_in_a(T56))
U4_a(T56, last63_out_a(T56)) → last63_out_a(T56)
U15_gaa(T4, T16, T56, last63_out_a(T56)) → goal1_out_gaa(T4, T16, T56)
goal1_in_gaa(T4, T16, T59) → U16_gaa(T4, T16, T59, s2l4_in_ga(T4, T15))
U16_gaa(T4, T16, T59, s2l4_out_ga(T4, T15)) → U17_gaa(T4, T16, T59, app20_in_gaa(T15, T16, .(T57, T60)))
U17_gaa(T4, T16, T59, app20_out_gaa(T15, T16, .(T57, T60))) → U18_gaa(T4, T16, T59, last21_in_ag(T59, T60))
last21_in_ag(T49, .(T49, [])) → last21_out_ag(T49, .(T49, []))
last21_in_ag(T56, []) → U5_ag(T56, last63_in_a(T56))
U5_ag(T56, last63_out_a(T56)) → last21_out_ag(T56, [])
last21_in_ag(T59, .(T57, T60)) → U6_ag(T59, T57, T60, last21_in_ag(T59, T60))
last21_in_ag(T63, .(T61, T64)) → U7_ag(T63, T61, T64, last21_in_ag(T63, T64))
U7_ag(T63, T61, T64, last21_out_ag(T63, T64)) → last21_out_ag(T63, .(T61, T64))
U6_ag(T59, T57, T60, last21_out_ag(T59, T60)) → last21_out_ag(T59, .(T57, T60))
U18_gaa(T4, T16, T59, last21_out_ag(T59, T60)) → goal1_out_gaa(T4, T16, T59)
goal1_in_gaa(T4, T16, T63) → U19_gaa(T4, T16, T63, s2l4_in_ga(T4, T15))
U19_gaa(T4, T16, T63, s2l4_out_ga(T4, T15)) → U20_gaa(T4, T16, T63, app20_in_gaa(T15, T16, .(T61, T64)))
U20_gaa(T4, T16, T63, app20_out_gaa(T15, T16, .(T61, T64))) → U21_gaa(T4, T16, T63, last21_in_ag(T63, T64))
U21_gaa(T4, T16, T63, last21_out_ag(T63, T64)) → goal1_out_gaa(T4, T16, T63)

The argument filtering Pi contains the following mapping:
goal1_in_gaa(x1, x2, x3)  =  goal1_in_gaa(x1)
U8_gaa(x1, x2, x3, x4)  =  U8_gaa(x4)
s2l4_in_ga(x1, x2)  =  s2l4_in_ga(x1)
0  =  0
s2l4_out_ga(x1, x2)  =  s2l4_out_ga(x2)
s(x1)  =  s(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
.(x1, x2)  =  .(x2)
goal1_out_gaa(x1, x2, x3)  =  goal1_out_gaa
U9_gaa(x1, x2, x3, x4)  =  U9_gaa(x4)
U10_gaa(x1, x2, x3, x4)  =  U10_gaa(x4)
app20_in_gaa(x1, x2, x3)  =  app20_in_gaa(x1)
[]  =  []
app20_out_gaa(x1, x2, x3)  =  app20_out_gaa(x3)
U2_gaa(x1, x2, x3, x4, x5)  =  U2_gaa(x5)
U3_gaa(x1, x2, x3, x4, x5)  =  U3_gaa(x5)
U11_gaa(x1, x2, x3, x4)  =  U11_gaa(x4)
U12_gaa(x1, x2, x3, x4)  =  U12_gaa(x4)
app20_in_gag(x1, x2, x3)  =  app20_in_gag(x1, x3)
app20_out_gag(x1, x2, x3)  =  app20_out_gag
U2_gag(x1, x2, x3, x4, x5)  =  U2_gag(x5)
U3_gag(x1, x2, x3, x4, x5)  =  U3_gag(x5)
U13_gaa(x1, x2, x3, x4)  =  U13_gaa(x4)
U14_gaa(x1, x2, x3, x4)  =  U14_gaa(x4)
U15_gaa(x1, x2, x3, x4)  =  U15_gaa(x4)
last63_in_a(x1)  =  last63_in_a
U4_a(x1, x2)  =  U4_a(x2)
last63_out_a(x1)  =  last63_out_a(x1)
U16_gaa(x1, x2, x3, x4)  =  U16_gaa(x4)
U17_gaa(x1, x2, x3, x4)  =  U17_gaa(x4)
U18_gaa(x1, x2, x3, x4)  =  U18_gaa(x4)
last21_in_ag(x1, x2)  =  last21_in_ag(x2)
last21_out_ag(x1, x2)  =  last21_out_ag
U5_ag(x1, x2)  =  U5_ag(x2)
U6_ag(x1, x2, x3, x4)  =  U6_ag(x4)
U7_ag(x1, x2, x3, x4)  =  U7_ag(x4)
U19_gaa(x1, x2, x3, x4)  =  U19_gaa(x4)
U20_gaa(x1, x2, x3, x4)  =  U20_gaa(x4)
U21_gaa(x1, x2, x3, x4)  =  U21_gaa(x4)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(45) Obligation:

Pi-finite rewrite system:
The TRS R consists of the following rules:

goal1_in_gaa(T4, T7, T8) → U8_gaa(T4, T7, T8, s2l4_in_ga(T4, X11))
s2l4_in_ga(0, []) → s2l4_out_ga(0, [])
s2l4_in_ga(s(T11), .(X25, X26)) → U1_ga(T11, X25, X26, s2l4_in_ga(T11, X26))
U1_ga(T11, X25, X26, s2l4_out_ga(T11, X26)) → s2l4_out_ga(s(T11), .(X25, X26))
U8_gaa(T4, T7, T8, s2l4_out_ga(T4, X11)) → goal1_out_gaa(T4, T7, T8)
goal1_in_gaa(T4, T16, T17) → U9_gaa(T4, T16, T17, s2l4_in_ga(T4, T15))
U9_gaa(T4, T16, T17, s2l4_out_ga(T4, T15)) → U10_gaa(T4, T16, T17, app20_in_gaa(T15, T16, X35))
app20_in_gaa([], T22, .(T22, [])) → app20_out_gaa([], T22, .(T22, []))
app20_in_gaa([], T30, .(X56, .(T30, []))) → app20_out_gaa([], T30, .(X56, .(T30, [])))
app20_in_gaa(.(T36, T38), T39, .(T36, X53)) → U2_gaa(T36, T38, T39, X53, app20_in_gaa(T38, T39, X53))
app20_in_gaa(.(T45, T47), T48, .(T45, X53)) → U3_gaa(T45, T47, T48, X53, app20_in_gaa(T47, T48, X53))
U3_gaa(T45, T47, T48, X53, app20_out_gaa(T47, T48, X53)) → app20_out_gaa(.(T45, T47), T48, .(T45, X53))
U2_gaa(T36, T38, T39, X53, app20_out_gaa(T38, T39, X53)) → app20_out_gaa(.(T36, T38), T39, .(T36, X53))
U10_gaa(T4, T16, T17, app20_out_gaa(T15, T16, X35)) → goal1_out_gaa(T4, T16, T17)
goal1_in_gaa(T4, T16, T49) → U11_gaa(T4, T16, T49, s2l4_in_ga(T4, T15))
U11_gaa(T4, T16, T49, s2l4_out_ga(T4, T15)) → U12_gaa(T4, T16, T49, app20_in_gag(T15, T16, .(T49, [])))
app20_in_gag([], T22, .(T22, [])) → app20_out_gag([], T22, .(T22, []))
app20_in_gag([], T30, .(X56, .(T30, []))) → app20_out_gag([], T30, .(X56, .(T30, [])))
app20_in_gag(.(T36, T38), T39, .(T36, X53)) → U2_gag(T36, T38, T39, X53, app20_in_gag(T38, T39, X53))
app20_in_gag(.(T45, T47), T48, .(T45, X53)) → U3_gag(T45, T47, T48, X53, app20_in_gag(T47, T48, X53))
U3_gag(T45, T47, T48, X53, app20_out_gag(T47, T48, X53)) → app20_out_gag(.(T45, T47), T48, .(T45, X53))
U2_gag(T36, T38, T39, X53, app20_out_gag(T38, T39, X53)) → app20_out_gag(.(T36, T38), T39, .(T36, X53))
U12_gaa(T4, T16, T49, app20_out_gag(T15, T16, .(T49, []))) → goal1_out_gaa(T4, T16, T49)
goal1_in_gaa(T4, T16, T56) → U13_gaa(T4, T16, T56, s2l4_in_ga(T4, T15))
U13_gaa(T4, T16, T56, s2l4_out_ga(T4, T15)) → U14_gaa(T4, T16, T56, app20_in_gag(T15, T16, []))
U14_gaa(T4, T16, T56, app20_out_gag(T15, T16, [])) → U15_gaa(T4, T16, T56, last63_in_a(T56))
last63_in_a(T56) → U4_a(T56, last63_in_a(T56))
U4_a(T56, last63_out_a(T56)) → last63_out_a(T56)
U15_gaa(T4, T16, T56, last63_out_a(T56)) → goal1_out_gaa(T4, T16, T56)
goal1_in_gaa(T4, T16, T59) → U16_gaa(T4, T16, T59, s2l4_in_ga(T4, T15))
U16_gaa(T4, T16, T59, s2l4_out_ga(T4, T15)) → U17_gaa(T4, T16, T59, app20_in_gaa(T15, T16, .(T57, T60)))
U17_gaa(T4, T16, T59, app20_out_gaa(T15, T16, .(T57, T60))) → U18_gaa(T4, T16, T59, last21_in_ag(T59, T60))
last21_in_ag(T49, .(T49, [])) → last21_out_ag(T49, .(T49, []))
last21_in_ag(T56, []) → U5_ag(T56, last63_in_a(T56))
U5_ag(T56, last63_out_a(T56)) → last21_out_ag(T56, [])
last21_in_ag(T59, .(T57, T60)) → U6_ag(T59, T57, T60, last21_in_ag(T59, T60))
last21_in_ag(T63, .(T61, T64)) → U7_ag(T63, T61, T64, last21_in_ag(T63, T64))
U7_ag(T63, T61, T64, last21_out_ag(T63, T64)) → last21_out_ag(T63, .(T61, T64))
U6_ag(T59, T57, T60, last21_out_ag(T59, T60)) → last21_out_ag(T59, .(T57, T60))
U18_gaa(T4, T16, T59, last21_out_ag(T59, T60)) → goal1_out_gaa(T4, T16, T59)
goal1_in_gaa(T4, T16, T63) → U19_gaa(T4, T16, T63, s2l4_in_ga(T4, T15))
U19_gaa(T4, T16, T63, s2l4_out_ga(T4, T15)) → U20_gaa(T4, T16, T63, app20_in_gaa(T15, T16, .(T61, T64)))
U20_gaa(T4, T16, T63, app20_out_gaa(T15, T16, .(T61, T64))) → U21_gaa(T4, T16, T63, last21_in_ag(T63, T64))
U21_gaa(T4, T16, T63, last21_out_ag(T63, T64)) → goal1_out_gaa(T4, T16, T63)

The argument filtering Pi contains the following mapping:
goal1_in_gaa(x1, x2, x3)  =  goal1_in_gaa(x1)
U8_gaa(x1, x2, x3, x4)  =  U8_gaa(x4)
s2l4_in_ga(x1, x2)  =  s2l4_in_ga(x1)
0  =  0
s2l4_out_ga(x1, x2)  =  s2l4_out_ga(x2)
s(x1)  =  s(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
.(x1, x2)  =  .(x2)
goal1_out_gaa(x1, x2, x3)  =  goal1_out_gaa
U9_gaa(x1, x2, x3, x4)  =  U9_gaa(x4)
U10_gaa(x1, x2, x3, x4)  =  U10_gaa(x4)
app20_in_gaa(x1, x2, x3)  =  app20_in_gaa(x1)
[]  =  []
app20_out_gaa(x1, x2, x3)  =  app20_out_gaa(x3)
U2_gaa(x1, x2, x3, x4, x5)  =  U2_gaa(x5)
U3_gaa(x1, x2, x3, x4, x5)  =  U3_gaa(x5)
U11_gaa(x1, x2, x3, x4)  =  U11_gaa(x4)
U12_gaa(x1, x2, x3, x4)  =  U12_gaa(x4)
app20_in_gag(x1, x2, x3)  =  app20_in_gag(x1, x3)
app20_out_gag(x1, x2, x3)  =  app20_out_gag
U2_gag(x1, x2, x3, x4, x5)  =  U2_gag(x5)
U3_gag(x1, x2, x3, x4, x5)  =  U3_gag(x5)
U13_gaa(x1, x2, x3, x4)  =  U13_gaa(x4)
U14_gaa(x1, x2, x3, x4)  =  U14_gaa(x4)
U15_gaa(x1, x2, x3, x4)  =  U15_gaa(x4)
last63_in_a(x1)  =  last63_in_a
U4_a(x1, x2)  =  U4_a(x2)
last63_out_a(x1)  =  last63_out_a(x1)
U16_gaa(x1, x2, x3, x4)  =  U16_gaa(x4)
U17_gaa(x1, x2, x3, x4)  =  U17_gaa(x4)
U18_gaa(x1, x2, x3, x4)  =  U18_gaa(x4)
last21_in_ag(x1, x2)  =  last21_in_ag(x2)
last21_out_ag(x1, x2)  =  last21_out_ag
U5_ag(x1, x2)  =  U5_ag(x2)
U6_ag(x1, x2, x3, x4)  =  U6_ag(x4)
U7_ag(x1, x2, x3, x4)  =  U7_ag(x4)
U19_gaa(x1, x2, x3, x4)  =  U19_gaa(x4)
U20_gaa(x1, x2, x3, x4)  =  U20_gaa(x4)
U21_gaa(x1, x2, x3, x4)  =  U21_gaa(x4)

(46) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

GOAL1_IN_GAA(T4, T7, T8) → U8_GAA(T4, T7, T8, s2l4_in_ga(T4, X11))
GOAL1_IN_GAA(T4, T7, T8) → S2L4_IN_GA(T4, X11)
S2L4_IN_GA(s(T11), .(X25, X26)) → U1_GA(T11, X25, X26, s2l4_in_ga(T11, X26))
S2L4_IN_GA(s(T11), .(X25, X26)) → S2L4_IN_GA(T11, X26)
GOAL1_IN_GAA(T4, T16, T17) → U9_GAA(T4, T16, T17, s2l4_in_ga(T4, T15))
U9_GAA(T4, T16, T17, s2l4_out_ga(T4, T15)) → U10_GAA(T4, T16, T17, app20_in_gaa(T15, T16, X35))
U9_GAA(T4, T16, T17, s2l4_out_ga(T4, T15)) → APP20_IN_GAA(T15, T16, X35)
APP20_IN_GAA(.(T36, T38), T39, .(T36, X53)) → U2_GAA(T36, T38, T39, X53, app20_in_gaa(T38, T39, X53))
APP20_IN_GAA(.(T36, T38), T39, .(T36, X53)) → APP20_IN_GAA(T38, T39, X53)
APP20_IN_GAA(.(T45, T47), T48, .(T45, X53)) → U3_GAA(T45, T47, T48, X53, app20_in_gaa(T47, T48, X53))
GOAL1_IN_GAA(T4, T16, T49) → U11_GAA(T4, T16, T49, s2l4_in_ga(T4, T15))
U11_GAA(T4, T16, T49, s2l4_out_ga(T4, T15)) → U12_GAA(T4, T16, T49, app20_in_gag(T15, T16, .(T49, [])))
U11_GAA(T4, T16, T49, s2l4_out_ga(T4, T15)) → APP20_IN_GAG(T15, T16, .(T49, []))
APP20_IN_GAG(.(T36, T38), T39, .(T36, X53)) → U2_GAG(T36, T38, T39, X53, app20_in_gag(T38, T39, X53))
APP20_IN_GAG(.(T36, T38), T39, .(T36, X53)) → APP20_IN_GAG(T38, T39, X53)
APP20_IN_GAG(.(T45, T47), T48, .(T45, X53)) → U3_GAG(T45, T47, T48, X53, app20_in_gag(T47, T48, X53))
GOAL1_IN_GAA(T4, T16, T56) → U13_GAA(T4, T16, T56, s2l4_in_ga(T4, T15))
U13_GAA(T4, T16, T56, s2l4_out_ga(T4, T15)) → U14_GAA(T4, T16, T56, app20_in_gag(T15, T16, []))
U13_GAA(T4, T16, T56, s2l4_out_ga(T4, T15)) → APP20_IN_GAG(T15, T16, [])
U14_GAA(T4, T16, T56, app20_out_gag(T15, T16, [])) → U15_GAA(T4, T16, T56, last63_in_a(T56))
U14_GAA(T4, T16, T56, app20_out_gag(T15, T16, [])) → LAST63_IN_A(T56)
LAST63_IN_A(T56) → U4_A(T56, last63_in_a(T56))
LAST63_IN_A(T56) → LAST63_IN_A(T56)
GOAL1_IN_GAA(T4, T16, T59) → U16_GAA(T4, T16, T59, s2l4_in_ga(T4, T15))
U16_GAA(T4, T16, T59, s2l4_out_ga(T4, T15)) → U17_GAA(T4, T16, T59, app20_in_gaa(T15, T16, .(T57, T60)))
U16_GAA(T4, T16, T59, s2l4_out_ga(T4, T15)) → APP20_IN_GAA(T15, T16, .(T57, T60))
U17_GAA(T4, T16, T59, app20_out_gaa(T15, T16, .(T57, T60))) → U18_GAA(T4, T16, T59, last21_in_ag(T59, T60))
U17_GAA(T4, T16, T59, app20_out_gaa(T15, T16, .(T57, T60))) → LAST21_IN_AG(T59, T60)
LAST21_IN_AG(T56, []) → U5_AG(T56, last63_in_a(T56))
LAST21_IN_AG(T56, []) → LAST63_IN_A(T56)
LAST21_IN_AG(T59, .(T57, T60)) → U6_AG(T59, T57, T60, last21_in_ag(T59, T60))
LAST21_IN_AG(T59, .(T57, T60)) → LAST21_IN_AG(T59, T60)
LAST21_IN_AG(T63, .(T61, T64)) → U7_AG(T63, T61, T64, last21_in_ag(T63, T64))
GOAL1_IN_GAA(T4, T16, T63) → U19_GAA(T4, T16, T63, s2l4_in_ga(T4, T15))
U19_GAA(T4, T16, T63, s2l4_out_ga(T4, T15)) → U20_GAA(T4, T16, T63, app20_in_gaa(T15, T16, .(T61, T64)))
U19_GAA(T4, T16, T63, s2l4_out_ga(T4, T15)) → APP20_IN_GAA(T15, T16, .(T61, T64))
U20_GAA(T4, T16, T63, app20_out_gaa(T15, T16, .(T61, T64))) → U21_GAA(T4, T16, T63, last21_in_ag(T63, T64))
U20_GAA(T4, T16, T63, app20_out_gaa(T15, T16, .(T61, T64))) → LAST21_IN_AG(T63, T64)

The TRS R consists of the following rules:

goal1_in_gaa(T4, T7, T8) → U8_gaa(T4, T7, T8, s2l4_in_ga(T4, X11))
s2l4_in_ga(0, []) → s2l4_out_ga(0, [])
s2l4_in_ga(s(T11), .(X25, X26)) → U1_ga(T11, X25, X26, s2l4_in_ga(T11, X26))
U1_ga(T11, X25, X26, s2l4_out_ga(T11, X26)) → s2l4_out_ga(s(T11), .(X25, X26))
U8_gaa(T4, T7, T8, s2l4_out_ga(T4, X11)) → goal1_out_gaa(T4, T7, T8)
goal1_in_gaa(T4, T16, T17) → U9_gaa(T4, T16, T17, s2l4_in_ga(T4, T15))
U9_gaa(T4, T16, T17, s2l4_out_ga(T4, T15)) → U10_gaa(T4, T16, T17, app20_in_gaa(T15, T16, X35))
app20_in_gaa([], T22, .(T22, [])) → app20_out_gaa([], T22, .(T22, []))
app20_in_gaa([], T30, .(X56, .(T30, []))) → app20_out_gaa([], T30, .(X56, .(T30, [])))
app20_in_gaa(.(T36, T38), T39, .(T36, X53)) → U2_gaa(T36, T38, T39, X53, app20_in_gaa(T38, T39, X53))
app20_in_gaa(.(T45, T47), T48, .(T45, X53)) → U3_gaa(T45, T47, T48, X53, app20_in_gaa(T47, T48, X53))
U3_gaa(T45, T47, T48, X53, app20_out_gaa(T47, T48, X53)) → app20_out_gaa(.(T45, T47), T48, .(T45, X53))
U2_gaa(T36, T38, T39, X53, app20_out_gaa(T38, T39, X53)) → app20_out_gaa(.(T36, T38), T39, .(T36, X53))
U10_gaa(T4, T16, T17, app20_out_gaa(T15, T16, X35)) → goal1_out_gaa(T4, T16, T17)
goal1_in_gaa(T4, T16, T49) → U11_gaa(T4, T16, T49, s2l4_in_ga(T4, T15))
U11_gaa(T4, T16, T49, s2l4_out_ga(T4, T15)) → U12_gaa(T4, T16, T49, app20_in_gag(T15, T16, .(T49, [])))
app20_in_gag([], T22, .(T22, [])) → app20_out_gag([], T22, .(T22, []))
app20_in_gag([], T30, .(X56, .(T30, []))) → app20_out_gag([], T30, .(X56, .(T30, [])))
app20_in_gag(.(T36, T38), T39, .(T36, X53)) → U2_gag(T36, T38, T39, X53, app20_in_gag(T38, T39, X53))
app20_in_gag(.(T45, T47), T48, .(T45, X53)) → U3_gag(T45, T47, T48, X53, app20_in_gag(T47, T48, X53))
U3_gag(T45, T47, T48, X53, app20_out_gag(T47, T48, X53)) → app20_out_gag(.(T45, T47), T48, .(T45, X53))
U2_gag(T36, T38, T39, X53, app20_out_gag(T38, T39, X53)) → app20_out_gag(.(T36, T38), T39, .(T36, X53))
U12_gaa(T4, T16, T49, app20_out_gag(T15, T16, .(T49, []))) → goal1_out_gaa(T4, T16, T49)
goal1_in_gaa(T4, T16, T56) → U13_gaa(T4, T16, T56, s2l4_in_ga(T4, T15))
U13_gaa(T4, T16, T56, s2l4_out_ga(T4, T15)) → U14_gaa(T4, T16, T56, app20_in_gag(T15, T16, []))
U14_gaa(T4, T16, T56, app20_out_gag(T15, T16, [])) → U15_gaa(T4, T16, T56, last63_in_a(T56))
last63_in_a(T56) → U4_a(T56, last63_in_a(T56))
U4_a(T56, last63_out_a(T56)) → last63_out_a(T56)
U15_gaa(T4, T16, T56, last63_out_a(T56)) → goal1_out_gaa(T4, T16, T56)
goal1_in_gaa(T4, T16, T59) → U16_gaa(T4, T16, T59, s2l4_in_ga(T4, T15))
U16_gaa(T4, T16, T59, s2l4_out_ga(T4, T15)) → U17_gaa(T4, T16, T59, app20_in_gaa(T15, T16, .(T57, T60)))
U17_gaa(T4, T16, T59, app20_out_gaa(T15, T16, .(T57, T60))) → U18_gaa(T4, T16, T59, last21_in_ag(T59, T60))
last21_in_ag(T49, .(T49, [])) → last21_out_ag(T49, .(T49, []))
last21_in_ag(T56, []) → U5_ag(T56, last63_in_a(T56))
U5_ag(T56, last63_out_a(T56)) → last21_out_ag(T56, [])
last21_in_ag(T59, .(T57, T60)) → U6_ag(T59, T57, T60, last21_in_ag(T59, T60))
last21_in_ag(T63, .(T61, T64)) → U7_ag(T63, T61, T64, last21_in_ag(T63, T64))
U7_ag(T63, T61, T64, last21_out_ag(T63, T64)) → last21_out_ag(T63, .(T61, T64))
U6_ag(T59, T57, T60, last21_out_ag(T59, T60)) → last21_out_ag(T59, .(T57, T60))
U18_gaa(T4, T16, T59, last21_out_ag(T59, T60)) → goal1_out_gaa(T4, T16, T59)
goal1_in_gaa(T4, T16, T63) → U19_gaa(T4, T16, T63, s2l4_in_ga(T4, T15))
U19_gaa(T4, T16, T63, s2l4_out_ga(T4, T15)) → U20_gaa(T4, T16, T63, app20_in_gaa(T15, T16, .(T61, T64)))
U20_gaa(T4, T16, T63, app20_out_gaa(T15, T16, .(T61, T64))) → U21_gaa(T4, T16, T63, last21_in_ag(T63, T64))
U21_gaa(T4, T16, T63, last21_out_ag(T63, T64)) → goal1_out_gaa(T4, T16, T63)

The argument filtering Pi contains the following mapping:
goal1_in_gaa(x1, x2, x3)  =  goal1_in_gaa(x1)
U8_gaa(x1, x2, x3, x4)  =  U8_gaa(x4)
s2l4_in_ga(x1, x2)  =  s2l4_in_ga(x1)
0  =  0
s2l4_out_ga(x1, x2)  =  s2l4_out_ga(x2)
s(x1)  =  s(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
.(x1, x2)  =  .(x2)
goal1_out_gaa(x1, x2, x3)  =  goal1_out_gaa
U9_gaa(x1, x2, x3, x4)  =  U9_gaa(x4)
U10_gaa(x1, x2, x3, x4)  =  U10_gaa(x4)
app20_in_gaa(x1, x2, x3)  =  app20_in_gaa(x1)
[]  =  []
app20_out_gaa(x1, x2, x3)  =  app20_out_gaa(x3)
U2_gaa(x1, x2, x3, x4, x5)  =  U2_gaa(x5)
U3_gaa(x1, x2, x3, x4, x5)  =  U3_gaa(x5)
U11_gaa(x1, x2, x3, x4)  =  U11_gaa(x4)
U12_gaa(x1, x2, x3, x4)  =  U12_gaa(x4)
app20_in_gag(x1, x2, x3)  =  app20_in_gag(x1, x3)
app20_out_gag(x1, x2, x3)  =  app20_out_gag
U2_gag(x1, x2, x3, x4, x5)  =  U2_gag(x5)
U3_gag(x1, x2, x3, x4, x5)  =  U3_gag(x5)
U13_gaa(x1, x2, x3, x4)  =  U13_gaa(x4)
U14_gaa(x1, x2, x3, x4)  =  U14_gaa(x4)
U15_gaa(x1, x2, x3, x4)  =  U15_gaa(x4)
last63_in_a(x1)  =  last63_in_a
U4_a(x1, x2)  =  U4_a(x2)
last63_out_a(x1)  =  last63_out_a(x1)
U16_gaa(x1, x2, x3, x4)  =  U16_gaa(x4)
U17_gaa(x1, x2, x3, x4)  =  U17_gaa(x4)
U18_gaa(x1, x2, x3, x4)  =  U18_gaa(x4)
last21_in_ag(x1, x2)  =  last21_in_ag(x2)
last21_out_ag(x1, x2)  =  last21_out_ag
U5_ag(x1, x2)  =  U5_ag(x2)
U6_ag(x1, x2, x3, x4)  =  U6_ag(x4)
U7_ag(x1, x2, x3, x4)  =  U7_ag(x4)
U19_gaa(x1, x2, x3, x4)  =  U19_gaa(x4)
U20_gaa(x1, x2, x3, x4)  =  U20_gaa(x4)
U21_gaa(x1, x2, x3, x4)  =  U21_gaa(x4)
GOAL1_IN_GAA(x1, x2, x3)  =  GOAL1_IN_GAA(x1)
U8_GAA(x1, x2, x3, x4)  =  U8_GAA(x4)
S2L4_IN_GA(x1, x2)  =  S2L4_IN_GA(x1)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x4)
U9_GAA(x1, x2, x3, x4)  =  U9_GAA(x4)
U10_GAA(x1, x2, x3, x4)  =  U10_GAA(x4)
APP20_IN_GAA(x1, x2, x3)  =  APP20_IN_GAA(x1)
U2_GAA(x1, x2, x3, x4, x5)  =  U2_GAA(x5)
U3_GAA(x1, x2, x3, x4, x5)  =  U3_GAA(x5)
U11_GAA(x1, x2, x3, x4)  =  U11_GAA(x4)
U12_GAA(x1, x2, x3, x4)  =  U12_GAA(x4)
APP20_IN_GAG(x1, x2, x3)  =  APP20_IN_GAG(x1, x3)
U2_GAG(x1, x2, x3, x4, x5)  =  U2_GAG(x5)
U3_GAG(x1, x2, x3, x4, x5)  =  U3_GAG(x5)
U13_GAA(x1, x2, x3, x4)  =  U13_GAA(x4)
U14_GAA(x1, x2, x3, x4)  =  U14_GAA(x4)
U15_GAA(x1, x2, x3, x4)  =  U15_GAA(x4)
LAST63_IN_A(x1)  =  LAST63_IN_A
U4_A(x1, x2)  =  U4_A(x2)
U16_GAA(x1, x2, x3, x4)  =  U16_GAA(x4)
U17_GAA(x1, x2, x3, x4)  =  U17_GAA(x4)
U18_GAA(x1, x2, x3, x4)  =  U18_GAA(x4)
LAST21_IN_AG(x1, x2)  =  LAST21_IN_AG(x2)
U5_AG(x1, x2)  =  U5_AG(x2)
U6_AG(x1, x2, x3, x4)  =  U6_AG(x4)
U7_AG(x1, x2, x3, x4)  =  U7_AG(x4)
U19_GAA(x1, x2, x3, x4)  =  U19_GAA(x4)
U20_GAA(x1, x2, x3, x4)  =  U20_GAA(x4)
U21_GAA(x1, x2, x3, x4)  =  U21_GAA(x4)

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

(47) Obligation:

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

GOAL1_IN_GAA(T4, T7, T8) → U8_GAA(T4, T7, T8, s2l4_in_ga(T4, X11))
GOAL1_IN_GAA(T4, T7, T8) → S2L4_IN_GA(T4, X11)
S2L4_IN_GA(s(T11), .(X25, X26)) → U1_GA(T11, X25, X26, s2l4_in_ga(T11, X26))
S2L4_IN_GA(s(T11), .(X25, X26)) → S2L4_IN_GA(T11, X26)
GOAL1_IN_GAA(T4, T16, T17) → U9_GAA(T4, T16, T17, s2l4_in_ga(T4, T15))
U9_GAA(T4, T16, T17, s2l4_out_ga(T4, T15)) → U10_GAA(T4, T16, T17, app20_in_gaa(T15, T16, X35))
U9_GAA(T4, T16, T17, s2l4_out_ga(T4, T15)) → APP20_IN_GAA(T15, T16, X35)
APP20_IN_GAA(.(T36, T38), T39, .(T36, X53)) → U2_GAA(T36, T38, T39, X53, app20_in_gaa(T38, T39, X53))
APP20_IN_GAA(.(T36, T38), T39, .(T36, X53)) → APP20_IN_GAA(T38, T39, X53)
APP20_IN_GAA(.(T45, T47), T48, .(T45, X53)) → U3_GAA(T45, T47, T48, X53, app20_in_gaa(T47, T48, X53))
GOAL1_IN_GAA(T4, T16, T49) → U11_GAA(T4, T16, T49, s2l4_in_ga(T4, T15))
U11_GAA(T4, T16, T49, s2l4_out_ga(T4, T15)) → U12_GAA(T4, T16, T49, app20_in_gag(T15, T16, .(T49, [])))
U11_GAA(T4, T16, T49, s2l4_out_ga(T4, T15)) → APP20_IN_GAG(T15, T16, .(T49, []))
APP20_IN_GAG(.(T36, T38), T39, .(T36, X53)) → U2_GAG(T36, T38, T39, X53, app20_in_gag(T38, T39, X53))
APP20_IN_GAG(.(T36, T38), T39, .(T36, X53)) → APP20_IN_GAG(T38, T39, X53)
APP20_IN_GAG(.(T45, T47), T48, .(T45, X53)) → U3_GAG(T45, T47, T48, X53, app20_in_gag(T47, T48, X53))
GOAL1_IN_GAA(T4, T16, T56) → U13_GAA(T4, T16, T56, s2l4_in_ga(T4, T15))
U13_GAA(T4, T16, T56, s2l4_out_ga(T4, T15)) → U14_GAA(T4, T16, T56, app20_in_gag(T15, T16, []))
U13_GAA(T4, T16, T56, s2l4_out_ga(T4, T15)) → APP20_IN_GAG(T15, T16, [])
U14_GAA(T4, T16, T56, app20_out_gag(T15, T16, [])) → U15_GAA(T4, T16, T56, last63_in_a(T56))
U14_GAA(T4, T16, T56, app20_out_gag(T15, T16, [])) → LAST63_IN_A(T56)
LAST63_IN_A(T56) → U4_A(T56, last63_in_a(T56))
LAST63_IN_A(T56) → LAST63_IN_A(T56)
GOAL1_IN_GAA(T4, T16, T59) → U16_GAA(T4, T16, T59, s2l4_in_ga(T4, T15))
U16_GAA(T4, T16, T59, s2l4_out_ga(T4, T15)) → U17_GAA(T4, T16, T59, app20_in_gaa(T15, T16, .(T57, T60)))
U16_GAA(T4, T16, T59, s2l4_out_ga(T4, T15)) → APP20_IN_GAA(T15, T16, .(T57, T60))
U17_GAA(T4, T16, T59, app20_out_gaa(T15, T16, .(T57, T60))) → U18_GAA(T4, T16, T59, last21_in_ag(T59, T60))
U17_GAA(T4, T16, T59, app20_out_gaa(T15, T16, .(T57, T60))) → LAST21_IN_AG(T59, T60)
LAST21_IN_AG(T56, []) → U5_AG(T56, last63_in_a(T56))
LAST21_IN_AG(T56, []) → LAST63_IN_A(T56)
LAST21_IN_AG(T59, .(T57, T60)) → U6_AG(T59, T57, T60, last21_in_ag(T59, T60))
LAST21_IN_AG(T59, .(T57, T60)) → LAST21_IN_AG(T59, T60)
LAST21_IN_AG(T63, .(T61, T64)) → U7_AG(T63, T61, T64, last21_in_ag(T63, T64))
GOAL1_IN_GAA(T4, T16, T63) → U19_GAA(T4, T16, T63, s2l4_in_ga(T4, T15))
U19_GAA(T4, T16, T63, s2l4_out_ga(T4, T15)) → U20_GAA(T4, T16, T63, app20_in_gaa(T15, T16, .(T61, T64)))
U19_GAA(T4, T16, T63, s2l4_out_ga(T4, T15)) → APP20_IN_GAA(T15, T16, .(T61, T64))
U20_GAA(T4, T16, T63, app20_out_gaa(T15, T16, .(T61, T64))) → U21_GAA(T4, T16, T63, last21_in_ag(T63, T64))
U20_GAA(T4, T16, T63, app20_out_gaa(T15, T16, .(T61, T64))) → LAST21_IN_AG(T63, T64)

The TRS R consists of the following rules:

goal1_in_gaa(T4, T7, T8) → U8_gaa(T4, T7, T8, s2l4_in_ga(T4, X11))
s2l4_in_ga(0, []) → s2l4_out_ga(0, [])
s2l4_in_ga(s(T11), .(X25, X26)) → U1_ga(T11, X25, X26, s2l4_in_ga(T11, X26))
U1_ga(T11, X25, X26, s2l4_out_ga(T11, X26)) → s2l4_out_ga(s(T11), .(X25, X26))
U8_gaa(T4, T7, T8, s2l4_out_ga(T4, X11)) → goal1_out_gaa(T4, T7, T8)
goal1_in_gaa(T4, T16, T17) → U9_gaa(T4, T16, T17, s2l4_in_ga(T4, T15))
U9_gaa(T4, T16, T17, s2l4_out_ga(T4, T15)) → U10_gaa(T4, T16, T17, app20_in_gaa(T15, T16, X35))
app20_in_gaa([], T22, .(T22, [])) → app20_out_gaa([], T22, .(T22, []))
app20_in_gaa([], T30, .(X56, .(T30, []))) → app20_out_gaa([], T30, .(X56, .(T30, [])))
app20_in_gaa(.(T36, T38), T39, .(T36, X53)) → U2_gaa(T36, T38, T39, X53, app20_in_gaa(T38, T39, X53))
app20_in_gaa(.(T45, T47), T48, .(T45, X53)) → U3_gaa(T45, T47, T48, X53, app20_in_gaa(T47, T48, X53))
U3_gaa(T45, T47, T48, X53, app20_out_gaa(T47, T48, X53)) → app20_out_gaa(.(T45, T47), T48, .(T45, X53))
U2_gaa(T36, T38, T39, X53, app20_out_gaa(T38, T39, X53)) → app20_out_gaa(.(T36, T38), T39, .(T36, X53))
U10_gaa(T4, T16, T17, app20_out_gaa(T15, T16, X35)) → goal1_out_gaa(T4, T16, T17)
goal1_in_gaa(T4, T16, T49) → U11_gaa(T4, T16, T49, s2l4_in_ga(T4, T15))
U11_gaa(T4, T16, T49, s2l4_out_ga(T4, T15)) → U12_gaa(T4, T16, T49, app20_in_gag(T15, T16, .(T49, [])))
app20_in_gag([], T22, .(T22, [])) → app20_out_gag([], T22, .(T22, []))
app20_in_gag([], T30, .(X56, .(T30, []))) → app20_out_gag([], T30, .(X56, .(T30, [])))
app20_in_gag(.(T36, T38), T39, .(T36, X53)) → U2_gag(T36, T38, T39, X53, app20_in_gag(T38, T39, X53))
app20_in_gag(.(T45, T47), T48, .(T45, X53)) → U3_gag(T45, T47, T48, X53, app20_in_gag(T47, T48, X53))
U3_gag(T45, T47, T48, X53, app20_out_gag(T47, T48, X53)) → app20_out_gag(.(T45, T47), T48, .(T45, X53))
U2_gag(T36, T38, T39, X53, app20_out_gag(T38, T39, X53)) → app20_out_gag(.(T36, T38), T39, .(T36, X53))
U12_gaa(T4, T16, T49, app20_out_gag(T15, T16, .(T49, []))) → goal1_out_gaa(T4, T16, T49)
goal1_in_gaa(T4, T16, T56) → U13_gaa(T4, T16, T56, s2l4_in_ga(T4, T15))
U13_gaa(T4, T16, T56, s2l4_out_ga(T4, T15)) → U14_gaa(T4, T16, T56, app20_in_gag(T15, T16, []))
U14_gaa(T4, T16, T56, app20_out_gag(T15, T16, [])) → U15_gaa(T4, T16, T56, last63_in_a(T56))
last63_in_a(T56) → U4_a(T56, last63_in_a(T56))
U4_a(T56, last63_out_a(T56)) → last63_out_a(T56)
U15_gaa(T4, T16, T56, last63_out_a(T56)) → goal1_out_gaa(T4, T16, T56)
goal1_in_gaa(T4, T16, T59) → U16_gaa(T4, T16, T59, s2l4_in_ga(T4, T15))
U16_gaa(T4, T16, T59, s2l4_out_ga(T4, T15)) → U17_gaa(T4, T16, T59, app20_in_gaa(T15, T16, .(T57, T60)))
U17_gaa(T4, T16, T59, app20_out_gaa(T15, T16, .(T57, T60))) → U18_gaa(T4, T16, T59, last21_in_ag(T59, T60))
last21_in_ag(T49, .(T49, [])) → last21_out_ag(T49, .(T49, []))
last21_in_ag(T56, []) → U5_ag(T56, last63_in_a(T56))
U5_ag(T56, last63_out_a(T56)) → last21_out_ag(T56, [])
last21_in_ag(T59, .(T57, T60)) → U6_ag(T59, T57, T60, last21_in_ag(T59, T60))
last21_in_ag(T63, .(T61, T64)) → U7_ag(T63, T61, T64, last21_in_ag(T63, T64))
U7_ag(T63, T61, T64, last21_out_ag(T63, T64)) → last21_out_ag(T63, .(T61, T64))
U6_ag(T59, T57, T60, last21_out_ag(T59, T60)) → last21_out_ag(T59, .(T57, T60))
U18_gaa(T4, T16, T59, last21_out_ag(T59, T60)) → goal1_out_gaa(T4, T16, T59)
goal1_in_gaa(T4, T16, T63) → U19_gaa(T4, T16, T63, s2l4_in_ga(T4, T15))
U19_gaa(T4, T16, T63, s2l4_out_ga(T4, T15)) → U20_gaa(T4, T16, T63, app20_in_gaa(T15, T16, .(T61, T64)))
U20_gaa(T4, T16, T63, app20_out_gaa(T15, T16, .(T61, T64))) → U21_gaa(T4, T16, T63, last21_in_ag(T63, T64))
U21_gaa(T4, T16, T63, last21_out_ag(T63, T64)) → goal1_out_gaa(T4, T16, T63)

The argument filtering Pi contains the following mapping:
goal1_in_gaa(x1, x2, x3)  =  goal1_in_gaa(x1)
U8_gaa(x1, x2, x3, x4)  =  U8_gaa(x4)
s2l4_in_ga(x1, x2)  =  s2l4_in_ga(x1)
0  =  0
s2l4_out_ga(x1, x2)  =  s2l4_out_ga(x2)
s(x1)  =  s(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
.(x1, x2)  =  .(x2)
goal1_out_gaa(x1, x2, x3)  =  goal1_out_gaa
U9_gaa(x1, x2, x3, x4)  =  U9_gaa(x4)
U10_gaa(x1, x2, x3, x4)  =  U10_gaa(x4)
app20_in_gaa(x1, x2, x3)  =  app20_in_gaa(x1)
[]  =  []
app20_out_gaa(x1, x2, x3)  =  app20_out_gaa(x3)
U2_gaa(x1, x2, x3, x4, x5)  =  U2_gaa(x5)
U3_gaa(x1, x2, x3, x4, x5)  =  U3_gaa(x5)
U11_gaa(x1, x2, x3, x4)  =  U11_gaa(x4)
U12_gaa(x1, x2, x3, x4)  =  U12_gaa(x4)
app20_in_gag(x1, x2, x3)  =  app20_in_gag(x1, x3)
app20_out_gag(x1, x2, x3)  =  app20_out_gag
U2_gag(x1, x2, x3, x4, x5)  =  U2_gag(x5)
U3_gag(x1, x2, x3, x4, x5)  =  U3_gag(x5)
U13_gaa(x1, x2, x3, x4)  =  U13_gaa(x4)
U14_gaa(x1, x2, x3, x4)  =  U14_gaa(x4)
U15_gaa(x1, x2, x3, x4)  =  U15_gaa(x4)
last63_in_a(x1)  =  last63_in_a
U4_a(x1, x2)  =  U4_a(x2)
last63_out_a(x1)  =  last63_out_a(x1)
U16_gaa(x1, x2, x3, x4)  =  U16_gaa(x4)
U17_gaa(x1, x2, x3, x4)  =  U17_gaa(x4)
U18_gaa(x1, x2, x3, x4)  =  U18_gaa(x4)
last21_in_ag(x1, x2)  =  last21_in_ag(x2)
last21_out_ag(x1, x2)  =  last21_out_ag
U5_ag(x1, x2)  =  U5_ag(x2)
U6_ag(x1, x2, x3, x4)  =  U6_ag(x4)
U7_ag(x1, x2, x3, x4)  =  U7_ag(x4)
U19_gaa(x1, x2, x3, x4)  =  U19_gaa(x4)
U20_gaa(x1, x2, x3, x4)  =  U20_gaa(x4)
U21_gaa(x1, x2, x3, x4)  =  U21_gaa(x4)
GOAL1_IN_GAA(x1, x2, x3)  =  GOAL1_IN_GAA(x1)
U8_GAA(x1, x2, x3, x4)  =  U8_GAA(x4)
S2L4_IN_GA(x1, x2)  =  S2L4_IN_GA(x1)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x4)
U9_GAA(x1, x2, x3, x4)  =  U9_GAA(x4)
U10_GAA(x1, x2, x3, x4)  =  U10_GAA(x4)
APP20_IN_GAA(x1, x2, x3)  =  APP20_IN_GAA(x1)
U2_GAA(x1, x2, x3, x4, x5)  =  U2_GAA(x5)
U3_GAA(x1, x2, x3, x4, x5)  =  U3_GAA(x5)
U11_GAA(x1, x2, x3, x4)  =  U11_GAA(x4)
U12_GAA(x1, x2, x3, x4)  =  U12_GAA(x4)
APP20_IN_GAG(x1, x2, x3)  =  APP20_IN_GAG(x1, x3)
U2_GAG(x1, x2, x3, x4, x5)  =  U2_GAG(x5)
U3_GAG(x1, x2, x3, x4, x5)  =  U3_GAG(x5)
U13_GAA(x1, x2, x3, x4)  =  U13_GAA(x4)
U14_GAA(x1, x2, x3, x4)  =  U14_GAA(x4)
U15_GAA(x1, x2, x3, x4)  =  U15_GAA(x4)
LAST63_IN_A(x1)  =  LAST63_IN_A
U4_A(x1, x2)  =  U4_A(x2)
U16_GAA(x1, x2, x3, x4)  =  U16_GAA(x4)
U17_GAA(x1, x2, x3, x4)  =  U17_GAA(x4)
U18_GAA(x1, x2, x3, x4)  =  U18_GAA(x4)
LAST21_IN_AG(x1, x2)  =  LAST21_IN_AG(x2)
U5_AG(x1, x2)  =  U5_AG(x2)
U6_AG(x1, x2, x3, x4)  =  U6_AG(x4)
U7_AG(x1, x2, x3, x4)  =  U7_AG(x4)
U19_GAA(x1, x2, x3, x4)  =  U19_GAA(x4)
U20_GAA(x1, x2, x3, x4)  =  U20_GAA(x4)
U21_GAA(x1, x2, x3, x4)  =  U21_GAA(x4)

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

(48) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 5 SCCs with 33 less nodes.

(49) Complex Obligation (AND)

(50) Obligation:

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

LAST63_IN_A(T56) → LAST63_IN_A(T56)

The TRS R consists of the following rules:

goal1_in_gaa(T4, T7, T8) → U8_gaa(T4, T7, T8, s2l4_in_ga(T4, X11))
s2l4_in_ga(0, []) → s2l4_out_ga(0, [])
s2l4_in_ga(s(T11), .(X25, X26)) → U1_ga(T11, X25, X26, s2l4_in_ga(T11, X26))
U1_ga(T11, X25, X26, s2l4_out_ga(T11, X26)) → s2l4_out_ga(s(T11), .(X25, X26))
U8_gaa(T4, T7, T8, s2l4_out_ga(T4, X11)) → goal1_out_gaa(T4, T7, T8)
goal1_in_gaa(T4, T16, T17) → U9_gaa(T4, T16, T17, s2l4_in_ga(T4, T15))
U9_gaa(T4, T16, T17, s2l4_out_ga(T4, T15)) → U10_gaa(T4, T16, T17, app20_in_gaa(T15, T16, X35))
app20_in_gaa([], T22, .(T22, [])) → app20_out_gaa([], T22, .(T22, []))
app20_in_gaa([], T30, .(X56, .(T30, []))) → app20_out_gaa([], T30, .(X56, .(T30, [])))
app20_in_gaa(.(T36, T38), T39, .(T36, X53)) → U2_gaa(T36, T38, T39, X53, app20_in_gaa(T38, T39, X53))
app20_in_gaa(.(T45, T47), T48, .(T45, X53)) → U3_gaa(T45, T47, T48, X53, app20_in_gaa(T47, T48, X53))
U3_gaa(T45, T47, T48, X53, app20_out_gaa(T47, T48, X53)) → app20_out_gaa(.(T45, T47), T48, .(T45, X53))
U2_gaa(T36, T38, T39, X53, app20_out_gaa(T38, T39, X53)) → app20_out_gaa(.(T36, T38), T39, .(T36, X53))
U10_gaa(T4, T16, T17, app20_out_gaa(T15, T16, X35)) → goal1_out_gaa(T4, T16, T17)
goal1_in_gaa(T4, T16, T49) → U11_gaa(T4, T16, T49, s2l4_in_ga(T4, T15))
U11_gaa(T4, T16, T49, s2l4_out_ga(T4, T15)) → U12_gaa(T4, T16, T49, app20_in_gag(T15, T16, .(T49, [])))
app20_in_gag([], T22, .(T22, [])) → app20_out_gag([], T22, .(T22, []))
app20_in_gag([], T30, .(X56, .(T30, []))) → app20_out_gag([], T30, .(X56, .(T30, [])))
app20_in_gag(.(T36, T38), T39, .(T36, X53)) → U2_gag(T36, T38, T39, X53, app20_in_gag(T38, T39, X53))
app20_in_gag(.(T45, T47), T48, .(T45, X53)) → U3_gag(T45, T47, T48, X53, app20_in_gag(T47, T48, X53))
U3_gag(T45, T47, T48, X53, app20_out_gag(T47, T48, X53)) → app20_out_gag(.(T45, T47), T48, .(T45, X53))
U2_gag(T36, T38, T39, X53, app20_out_gag(T38, T39, X53)) → app20_out_gag(.(T36, T38), T39, .(T36, X53))
U12_gaa(T4, T16, T49, app20_out_gag(T15, T16, .(T49, []))) → goal1_out_gaa(T4, T16, T49)
goal1_in_gaa(T4, T16, T56) → U13_gaa(T4, T16, T56, s2l4_in_ga(T4, T15))
U13_gaa(T4, T16, T56, s2l4_out_ga(T4, T15)) → U14_gaa(T4, T16, T56, app20_in_gag(T15, T16, []))
U14_gaa(T4, T16, T56, app20_out_gag(T15, T16, [])) → U15_gaa(T4, T16, T56, last63_in_a(T56))
last63_in_a(T56) → U4_a(T56, last63_in_a(T56))
U4_a(T56, last63_out_a(T56)) → last63_out_a(T56)
U15_gaa(T4, T16, T56, last63_out_a(T56)) → goal1_out_gaa(T4, T16, T56)
goal1_in_gaa(T4, T16, T59) → U16_gaa(T4, T16, T59, s2l4_in_ga(T4, T15))
U16_gaa(T4, T16, T59, s2l4_out_ga(T4, T15)) → U17_gaa(T4, T16, T59, app20_in_gaa(T15, T16, .(T57, T60)))
U17_gaa(T4, T16, T59, app20_out_gaa(T15, T16, .(T57, T60))) → U18_gaa(T4, T16, T59, last21_in_ag(T59, T60))
last21_in_ag(T49, .(T49, [])) → last21_out_ag(T49, .(T49, []))
last21_in_ag(T56, []) → U5_ag(T56, last63_in_a(T56))
U5_ag(T56, last63_out_a(T56)) → last21_out_ag(T56, [])
last21_in_ag(T59, .(T57, T60)) → U6_ag(T59, T57, T60, last21_in_ag(T59, T60))
last21_in_ag(T63, .(T61, T64)) → U7_ag(T63, T61, T64, last21_in_ag(T63, T64))
U7_ag(T63, T61, T64, last21_out_ag(T63, T64)) → last21_out_ag(T63, .(T61, T64))
U6_ag(T59, T57, T60, last21_out_ag(T59, T60)) → last21_out_ag(T59, .(T57, T60))
U18_gaa(T4, T16, T59, last21_out_ag(T59, T60)) → goal1_out_gaa(T4, T16, T59)
goal1_in_gaa(T4, T16, T63) → U19_gaa(T4, T16, T63, s2l4_in_ga(T4, T15))
U19_gaa(T4, T16, T63, s2l4_out_ga(T4, T15)) → U20_gaa(T4, T16, T63, app20_in_gaa(T15, T16, .(T61, T64)))
U20_gaa(T4, T16, T63, app20_out_gaa(T15, T16, .(T61, T64))) → U21_gaa(T4, T16, T63, last21_in_ag(T63, T64))
U21_gaa(T4, T16, T63, last21_out_ag(T63, T64)) → goal1_out_gaa(T4, T16, T63)

The argument filtering Pi contains the following mapping:
goal1_in_gaa(x1, x2, x3)  =  goal1_in_gaa(x1)
U8_gaa(x1, x2, x3, x4)  =  U8_gaa(x4)
s2l4_in_ga(x1, x2)  =  s2l4_in_ga(x1)
0  =  0
s2l4_out_ga(x1, x2)  =  s2l4_out_ga(x2)
s(x1)  =  s(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
.(x1, x2)  =  .(x2)
goal1_out_gaa(x1, x2, x3)  =  goal1_out_gaa
U9_gaa(x1, x2, x3, x4)  =  U9_gaa(x4)
U10_gaa(x1, x2, x3, x4)  =  U10_gaa(x4)
app20_in_gaa(x1, x2, x3)  =  app20_in_gaa(x1)
[]  =  []
app20_out_gaa(x1, x2, x3)  =  app20_out_gaa(x3)
U2_gaa(x1, x2, x3, x4, x5)  =  U2_gaa(x5)
U3_gaa(x1, x2, x3, x4, x5)  =  U3_gaa(x5)
U11_gaa(x1, x2, x3, x4)  =  U11_gaa(x4)
U12_gaa(x1, x2, x3, x4)  =  U12_gaa(x4)
app20_in_gag(x1, x2, x3)  =  app20_in_gag(x1, x3)
app20_out_gag(x1, x2, x3)  =  app20_out_gag
U2_gag(x1, x2, x3, x4, x5)  =  U2_gag(x5)
U3_gag(x1, x2, x3, x4, x5)  =  U3_gag(x5)
U13_gaa(x1, x2, x3, x4)  =  U13_gaa(x4)
U14_gaa(x1, x2, x3, x4)  =  U14_gaa(x4)
U15_gaa(x1, x2, x3, x4)  =  U15_gaa(x4)
last63_in_a(x1)  =  last63_in_a
U4_a(x1, x2)  =  U4_a(x2)
last63_out_a(x1)  =  last63_out_a(x1)
U16_gaa(x1, x2, x3, x4)  =  U16_gaa(x4)
U17_gaa(x1, x2, x3, x4)  =  U17_gaa(x4)
U18_gaa(x1, x2, x3, x4)  =  U18_gaa(x4)
last21_in_ag(x1, x2)  =  last21_in_ag(x2)
last21_out_ag(x1, x2)  =  last21_out_ag
U5_ag(x1, x2)  =  U5_ag(x2)
U6_ag(x1, x2, x3, x4)  =  U6_ag(x4)
U7_ag(x1, x2, x3, x4)  =  U7_ag(x4)
U19_gaa(x1, x2, x3, x4)  =  U19_gaa(x4)
U20_gaa(x1, x2, x3, x4)  =  U20_gaa(x4)
U21_gaa(x1, x2, x3, x4)  =  U21_gaa(x4)
LAST63_IN_A(x1)  =  LAST63_IN_A

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

(51) UsableRulesProof (EQUIVALENT transformation)

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

(52) Obligation:

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

LAST63_IN_A(T56) → LAST63_IN_A(T56)

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

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

(53) PiDPToQDPProof (SOUND transformation)

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

(54) Obligation:

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

LAST63_IN_ALAST63_IN_A

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

(55) 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 = LAST63_IN_A evaluates to t =LAST63_IN_A

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 LAST63_IN_A to LAST63_IN_A.



(56) FALSE

(57) Obligation:

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

LAST21_IN_AG(T59, .(T57, T60)) → LAST21_IN_AG(T59, T60)

The TRS R consists of the following rules:

goal1_in_gaa(T4, T7, T8) → U8_gaa(T4, T7, T8, s2l4_in_ga(T4, X11))
s2l4_in_ga(0, []) → s2l4_out_ga(0, [])
s2l4_in_ga(s(T11), .(X25, X26)) → U1_ga(T11, X25, X26, s2l4_in_ga(T11, X26))
U1_ga(T11, X25, X26, s2l4_out_ga(T11, X26)) → s2l4_out_ga(s(T11), .(X25, X26))
U8_gaa(T4, T7, T8, s2l4_out_ga(T4, X11)) → goal1_out_gaa(T4, T7, T8)
goal1_in_gaa(T4, T16, T17) → U9_gaa(T4, T16, T17, s2l4_in_ga(T4, T15))
U9_gaa(T4, T16, T17, s2l4_out_ga(T4, T15)) → U10_gaa(T4, T16, T17, app20_in_gaa(T15, T16, X35))
app20_in_gaa([], T22, .(T22, [])) → app20_out_gaa([], T22, .(T22, []))
app20_in_gaa([], T30, .(X56, .(T30, []))) → app20_out_gaa([], T30, .(X56, .(T30, [])))
app20_in_gaa(.(T36, T38), T39, .(T36, X53)) → U2_gaa(T36, T38, T39, X53, app20_in_gaa(T38, T39, X53))
app20_in_gaa(.(T45, T47), T48, .(T45, X53)) → U3_gaa(T45, T47, T48, X53, app20_in_gaa(T47, T48, X53))
U3_gaa(T45, T47, T48, X53, app20_out_gaa(T47, T48, X53)) → app20_out_gaa(.(T45, T47), T48, .(T45, X53))
U2_gaa(T36, T38, T39, X53, app20_out_gaa(T38, T39, X53)) → app20_out_gaa(.(T36, T38), T39, .(T36, X53))
U10_gaa(T4, T16, T17, app20_out_gaa(T15, T16, X35)) → goal1_out_gaa(T4, T16, T17)
goal1_in_gaa(T4, T16, T49) → U11_gaa(T4, T16, T49, s2l4_in_ga(T4, T15))
U11_gaa(T4, T16, T49, s2l4_out_ga(T4, T15)) → U12_gaa(T4, T16, T49, app20_in_gag(T15, T16, .(T49, [])))
app20_in_gag([], T22, .(T22, [])) → app20_out_gag([], T22, .(T22, []))
app20_in_gag([], T30, .(X56, .(T30, []))) → app20_out_gag([], T30, .(X56, .(T30, [])))
app20_in_gag(.(T36, T38), T39, .(T36, X53)) → U2_gag(T36, T38, T39, X53, app20_in_gag(T38, T39, X53))
app20_in_gag(.(T45, T47), T48, .(T45, X53)) → U3_gag(T45, T47, T48, X53, app20_in_gag(T47, T48, X53))
U3_gag(T45, T47, T48, X53, app20_out_gag(T47, T48, X53)) → app20_out_gag(.(T45, T47), T48, .(T45, X53))
U2_gag(T36, T38, T39, X53, app20_out_gag(T38, T39, X53)) → app20_out_gag(.(T36, T38), T39, .(T36, X53))
U12_gaa(T4, T16, T49, app20_out_gag(T15, T16, .(T49, []))) → goal1_out_gaa(T4, T16, T49)
goal1_in_gaa(T4, T16, T56) → U13_gaa(T4, T16, T56, s2l4_in_ga(T4, T15))
U13_gaa(T4, T16, T56, s2l4_out_ga(T4, T15)) → U14_gaa(T4, T16, T56, app20_in_gag(T15, T16, []))
U14_gaa(T4, T16, T56, app20_out_gag(T15, T16, [])) → U15_gaa(T4, T16, T56, last63_in_a(T56))
last63_in_a(T56) → U4_a(T56, last63_in_a(T56))
U4_a(T56, last63_out_a(T56)) → last63_out_a(T56)
U15_gaa(T4, T16, T56, last63_out_a(T56)) → goal1_out_gaa(T4, T16, T56)
goal1_in_gaa(T4, T16, T59) → U16_gaa(T4, T16, T59, s2l4_in_ga(T4, T15))
U16_gaa(T4, T16, T59, s2l4_out_ga(T4, T15)) → U17_gaa(T4, T16, T59, app20_in_gaa(T15, T16, .(T57, T60)))
U17_gaa(T4, T16, T59, app20_out_gaa(T15, T16, .(T57, T60))) → U18_gaa(T4, T16, T59, last21_in_ag(T59, T60))
last21_in_ag(T49, .(T49, [])) → last21_out_ag(T49, .(T49, []))
last21_in_ag(T56, []) → U5_ag(T56, last63_in_a(T56))
U5_ag(T56, last63_out_a(T56)) → last21_out_ag(T56, [])
last21_in_ag(T59, .(T57, T60)) → U6_ag(T59, T57, T60, last21_in_ag(T59, T60))
last21_in_ag(T63, .(T61, T64)) → U7_ag(T63, T61, T64, last21_in_ag(T63, T64))
U7_ag(T63, T61, T64, last21_out_ag(T63, T64)) → last21_out_ag(T63, .(T61, T64))
U6_ag(T59, T57, T60, last21_out_ag(T59, T60)) → last21_out_ag(T59, .(T57, T60))
U18_gaa(T4, T16, T59, last21_out_ag(T59, T60)) → goal1_out_gaa(T4, T16, T59)
goal1_in_gaa(T4, T16, T63) → U19_gaa(T4, T16, T63, s2l4_in_ga(T4, T15))
U19_gaa(T4, T16, T63, s2l4_out_ga(T4, T15)) → U20_gaa(T4, T16, T63, app20_in_gaa(T15, T16, .(T61, T64)))
U20_gaa(T4, T16, T63, app20_out_gaa(T15, T16, .(T61, T64))) → U21_gaa(T4, T16, T63, last21_in_ag(T63, T64))
U21_gaa(T4, T16, T63, last21_out_ag(T63, T64)) → goal1_out_gaa(T4, T16, T63)

The argument filtering Pi contains the following mapping:
goal1_in_gaa(x1, x2, x3)  =  goal1_in_gaa(x1)
U8_gaa(x1, x2, x3, x4)  =  U8_gaa(x4)
s2l4_in_ga(x1, x2)  =  s2l4_in_ga(x1)
0  =  0
s2l4_out_ga(x1, x2)  =  s2l4_out_ga(x2)
s(x1)  =  s(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
.(x1, x2)  =  .(x2)
goal1_out_gaa(x1, x2, x3)  =  goal1_out_gaa
U9_gaa(x1, x2, x3, x4)  =  U9_gaa(x4)
U10_gaa(x1, x2, x3, x4)  =  U10_gaa(x4)
app20_in_gaa(x1, x2, x3)  =  app20_in_gaa(x1)
[]  =  []
app20_out_gaa(x1, x2, x3)  =  app20_out_gaa(x3)
U2_gaa(x1, x2, x3, x4, x5)  =  U2_gaa(x5)
U3_gaa(x1, x2, x3, x4, x5)  =  U3_gaa(x5)
U11_gaa(x1, x2, x3, x4)  =  U11_gaa(x4)
U12_gaa(x1, x2, x3, x4)  =  U12_gaa(x4)
app20_in_gag(x1, x2, x3)  =  app20_in_gag(x1, x3)
app20_out_gag(x1, x2, x3)  =  app20_out_gag
U2_gag(x1, x2, x3, x4, x5)  =  U2_gag(x5)
U3_gag(x1, x2, x3, x4, x5)  =  U3_gag(x5)
U13_gaa(x1, x2, x3, x4)  =  U13_gaa(x4)
U14_gaa(x1, x2, x3, x4)  =  U14_gaa(x4)
U15_gaa(x1, x2, x3, x4)  =  U15_gaa(x4)
last63_in_a(x1)  =  last63_in_a
U4_a(x1, x2)  =  U4_a(x2)
last63_out_a(x1)  =  last63_out_a(x1)
U16_gaa(x1, x2, x3, x4)  =  U16_gaa(x4)
U17_gaa(x1, x2, x3, x4)  =  U17_gaa(x4)
U18_gaa(x1, x2, x3, x4)  =  U18_gaa(x4)
last21_in_ag(x1, x2)  =  last21_in_ag(x2)
last21_out_ag(x1, x2)  =  last21_out_ag
U5_ag(x1, x2)  =  U5_ag(x2)
U6_ag(x1, x2, x3, x4)  =  U6_ag(x4)
U7_ag(x1, x2, x3, x4)  =  U7_ag(x4)
U19_gaa(x1, x2, x3, x4)  =  U19_gaa(x4)
U20_gaa(x1, x2, x3, x4)  =  U20_gaa(x4)
U21_gaa(x1, x2, x3, x4)  =  U21_gaa(x4)
LAST21_IN_AG(x1, x2)  =  LAST21_IN_AG(x2)

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

(58) UsableRulesProof (EQUIVALENT transformation)

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

(59) Obligation:

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

LAST21_IN_AG(T59, .(T57, T60)) → LAST21_IN_AG(T59, T60)

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

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

(60) PiDPToQDPProof (SOUND transformation)

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

(61) Obligation:

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

LAST21_IN_AG(.(T60)) → LAST21_IN_AG(T60)

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

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

  • LAST21_IN_AG(.(T60)) → LAST21_IN_AG(T60)
    The graph contains the following edges 1 > 1

(63) TRUE

(64) Obligation:

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

APP20_IN_GAG(.(T36, T38), T39, .(T36, X53)) → APP20_IN_GAG(T38, T39, X53)

The TRS R consists of the following rules:

goal1_in_gaa(T4, T7, T8) → U8_gaa(T4, T7, T8, s2l4_in_ga(T4, X11))
s2l4_in_ga(0, []) → s2l4_out_ga(0, [])
s2l4_in_ga(s(T11), .(X25, X26)) → U1_ga(T11, X25, X26, s2l4_in_ga(T11, X26))
U1_ga(T11, X25, X26, s2l4_out_ga(T11, X26)) → s2l4_out_ga(s(T11), .(X25, X26))
U8_gaa(T4, T7, T8, s2l4_out_ga(T4, X11)) → goal1_out_gaa(T4, T7, T8)
goal1_in_gaa(T4, T16, T17) → U9_gaa(T4, T16, T17, s2l4_in_ga(T4, T15))
U9_gaa(T4, T16, T17, s2l4_out_ga(T4, T15)) → U10_gaa(T4, T16, T17, app20_in_gaa(T15, T16, X35))
app20_in_gaa([], T22, .(T22, [])) → app20_out_gaa([], T22, .(T22, []))
app20_in_gaa([], T30, .(X56, .(T30, []))) → app20_out_gaa([], T30, .(X56, .(T30, [])))
app20_in_gaa(.(T36, T38), T39, .(T36, X53)) → U2_gaa(T36, T38, T39, X53, app20_in_gaa(T38, T39, X53))
app20_in_gaa(.(T45, T47), T48, .(T45, X53)) → U3_gaa(T45, T47, T48, X53, app20_in_gaa(T47, T48, X53))
U3_gaa(T45, T47, T48, X53, app20_out_gaa(T47, T48, X53)) → app20_out_gaa(.(T45, T47), T48, .(T45, X53))
U2_gaa(T36, T38, T39, X53, app20_out_gaa(T38, T39, X53)) → app20_out_gaa(.(T36, T38), T39, .(T36, X53))
U10_gaa(T4, T16, T17, app20_out_gaa(T15, T16, X35)) → goal1_out_gaa(T4, T16, T17)
goal1_in_gaa(T4, T16, T49) → U11_gaa(T4, T16, T49, s2l4_in_ga(T4, T15))
U11_gaa(T4, T16, T49, s2l4_out_ga(T4, T15)) → U12_gaa(T4, T16, T49, app20_in_gag(T15, T16, .(T49, [])))
app20_in_gag([], T22, .(T22, [])) → app20_out_gag([], T22, .(T22, []))
app20_in_gag([], T30, .(X56, .(T30, []))) → app20_out_gag([], T30, .(X56, .(T30, [])))
app20_in_gag(.(T36, T38), T39, .(T36, X53)) → U2_gag(T36, T38, T39, X53, app20_in_gag(T38, T39, X53))
app20_in_gag(.(T45, T47), T48, .(T45, X53)) → U3_gag(T45, T47, T48, X53, app20_in_gag(T47, T48, X53))
U3_gag(T45, T47, T48, X53, app20_out_gag(T47, T48, X53)) → app20_out_gag(.(T45, T47), T48, .(T45, X53))
U2_gag(T36, T38, T39, X53, app20_out_gag(T38, T39, X53)) → app20_out_gag(.(T36, T38), T39, .(T36, X53))
U12_gaa(T4, T16, T49, app20_out_gag(T15, T16, .(T49, []))) → goal1_out_gaa(T4, T16, T49)
goal1_in_gaa(T4, T16, T56) → U13_gaa(T4, T16, T56, s2l4_in_ga(T4, T15))
U13_gaa(T4, T16, T56, s2l4_out_ga(T4, T15)) → U14_gaa(T4, T16, T56, app20_in_gag(T15, T16, []))
U14_gaa(T4, T16, T56, app20_out_gag(T15, T16, [])) → U15_gaa(T4, T16, T56, last63_in_a(T56))
last63_in_a(T56) → U4_a(T56, last63_in_a(T56))
U4_a(T56, last63_out_a(T56)) → last63_out_a(T56)
U15_gaa(T4, T16, T56, last63_out_a(T56)) → goal1_out_gaa(T4, T16, T56)
goal1_in_gaa(T4, T16, T59) → U16_gaa(T4, T16, T59, s2l4_in_ga(T4, T15))
U16_gaa(T4, T16, T59, s2l4_out_ga(T4, T15)) → U17_gaa(T4, T16, T59, app20_in_gaa(T15, T16, .(T57, T60)))
U17_gaa(T4, T16, T59, app20_out_gaa(T15, T16, .(T57, T60))) → U18_gaa(T4, T16, T59, last21_in_ag(T59, T60))
last21_in_ag(T49, .(T49, [])) → last21_out_ag(T49, .(T49, []))
last21_in_ag(T56, []) → U5_ag(T56, last63_in_a(T56))
U5_ag(T56, last63_out_a(T56)) → last21_out_ag(T56, [])
last21_in_ag(T59, .(T57, T60)) → U6_ag(T59, T57, T60, last21_in_ag(T59, T60))
last21_in_ag(T63, .(T61, T64)) → U7_ag(T63, T61, T64, last21_in_ag(T63, T64))
U7_ag(T63, T61, T64, last21_out_ag(T63, T64)) → last21_out_ag(T63, .(T61, T64))
U6_ag(T59, T57, T60, last21_out_ag(T59, T60)) → last21_out_ag(T59, .(T57, T60))
U18_gaa(T4, T16, T59, last21_out_ag(T59, T60)) → goal1_out_gaa(T4, T16, T59)
goal1_in_gaa(T4, T16, T63) → U19_gaa(T4, T16, T63, s2l4_in_ga(T4, T15))
U19_gaa(T4, T16, T63, s2l4_out_ga(T4, T15)) → U20_gaa(T4, T16, T63, app20_in_gaa(T15, T16, .(T61, T64)))
U20_gaa(T4, T16, T63, app20_out_gaa(T15, T16, .(T61, T64))) → U21_gaa(T4, T16, T63, last21_in_ag(T63, T64))
U21_gaa(T4, T16, T63, last21_out_ag(T63, T64)) → goal1_out_gaa(T4, T16, T63)

The argument filtering Pi contains the following mapping:
goal1_in_gaa(x1, x2, x3)  =  goal1_in_gaa(x1)
U8_gaa(x1, x2, x3, x4)  =  U8_gaa(x4)
s2l4_in_ga(x1, x2)  =  s2l4_in_ga(x1)
0  =  0
s2l4_out_ga(x1, x2)  =  s2l4_out_ga(x2)
s(x1)  =  s(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
.(x1, x2)  =  .(x2)
goal1_out_gaa(x1, x2, x3)  =  goal1_out_gaa
U9_gaa(x1, x2, x3, x4)  =  U9_gaa(x4)
U10_gaa(x1, x2, x3, x4)  =  U10_gaa(x4)
app20_in_gaa(x1, x2, x3)  =  app20_in_gaa(x1)
[]  =  []
app20_out_gaa(x1, x2, x3)  =  app20_out_gaa(x3)
U2_gaa(x1, x2, x3, x4, x5)  =  U2_gaa(x5)
U3_gaa(x1, x2, x3, x4, x5)  =  U3_gaa(x5)
U11_gaa(x1, x2, x3, x4)  =  U11_gaa(x4)
U12_gaa(x1, x2, x3, x4)  =  U12_gaa(x4)
app20_in_gag(x1, x2, x3)  =  app20_in_gag(x1, x3)
app20_out_gag(x1, x2, x3)  =  app20_out_gag
U2_gag(x1, x2, x3, x4, x5)  =  U2_gag(x5)
U3_gag(x1, x2, x3, x4, x5)  =  U3_gag(x5)
U13_gaa(x1, x2, x3, x4)  =  U13_gaa(x4)
U14_gaa(x1, x2, x3, x4)  =  U14_gaa(x4)
U15_gaa(x1, x2, x3, x4)  =  U15_gaa(x4)
last63_in_a(x1)  =  last63_in_a
U4_a(x1, x2)  =  U4_a(x2)
last63_out_a(x1)  =  last63_out_a(x1)
U16_gaa(x1, x2, x3, x4)  =  U16_gaa(x4)
U17_gaa(x1, x2, x3, x4)  =  U17_gaa(x4)
U18_gaa(x1, x2, x3, x4)  =  U18_gaa(x4)
last21_in_ag(x1, x2)  =  last21_in_ag(x2)
last21_out_ag(x1, x2)  =  last21_out_ag
U5_ag(x1, x2)  =  U5_ag(x2)
U6_ag(x1, x2, x3, x4)  =  U6_ag(x4)
U7_ag(x1, x2, x3, x4)  =  U7_ag(x4)
U19_gaa(x1, x2, x3, x4)  =  U19_gaa(x4)
U20_gaa(x1, x2, x3, x4)  =  U20_gaa(x4)
U21_gaa(x1, x2, x3, x4)  =  U21_gaa(x4)
APP20_IN_GAG(x1, x2, x3)  =  APP20_IN_GAG(x1, x3)

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

(65) UsableRulesProof (EQUIVALENT transformation)

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

(66) Obligation:

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

APP20_IN_GAG(.(T36, T38), T39, .(T36, X53)) → APP20_IN_GAG(T38, T39, X53)

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

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

(67) PiDPToQDPProof (SOUND transformation)

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

(68) Obligation:

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

APP20_IN_GAG(.(T38), .(X53)) → APP20_IN_GAG(T38, X53)

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

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

  • APP20_IN_GAG(.(T38), .(X53)) → APP20_IN_GAG(T38, X53)
    The graph contains the following edges 1 > 1, 2 > 2

(70) TRUE

(71) Obligation:

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

APP20_IN_GAA(.(T36, T38), T39, .(T36, X53)) → APP20_IN_GAA(T38, T39, X53)

The TRS R consists of the following rules:

goal1_in_gaa(T4, T7, T8) → U8_gaa(T4, T7, T8, s2l4_in_ga(T4, X11))
s2l4_in_ga(0, []) → s2l4_out_ga(0, [])
s2l4_in_ga(s(T11), .(X25, X26)) → U1_ga(T11, X25, X26, s2l4_in_ga(T11, X26))
U1_ga(T11, X25, X26, s2l4_out_ga(T11, X26)) → s2l4_out_ga(s(T11), .(X25, X26))
U8_gaa(T4, T7, T8, s2l4_out_ga(T4, X11)) → goal1_out_gaa(T4, T7, T8)
goal1_in_gaa(T4, T16, T17) → U9_gaa(T4, T16, T17, s2l4_in_ga(T4, T15))
U9_gaa(T4, T16, T17, s2l4_out_ga(T4, T15)) → U10_gaa(T4, T16, T17, app20_in_gaa(T15, T16, X35))
app20_in_gaa([], T22, .(T22, [])) → app20_out_gaa([], T22, .(T22, []))
app20_in_gaa([], T30, .(X56, .(T30, []))) → app20_out_gaa([], T30, .(X56, .(T30, [])))
app20_in_gaa(.(T36, T38), T39, .(T36, X53)) → U2_gaa(T36, T38, T39, X53, app20_in_gaa(T38, T39, X53))
app20_in_gaa(.(T45, T47), T48, .(T45, X53)) → U3_gaa(T45, T47, T48, X53, app20_in_gaa(T47, T48, X53))
U3_gaa(T45, T47, T48, X53, app20_out_gaa(T47, T48, X53)) → app20_out_gaa(.(T45, T47), T48, .(T45, X53))
U2_gaa(T36, T38, T39, X53, app20_out_gaa(T38, T39, X53)) → app20_out_gaa(.(T36, T38), T39, .(T36, X53))
U10_gaa(T4, T16, T17, app20_out_gaa(T15, T16, X35)) → goal1_out_gaa(T4, T16, T17)
goal1_in_gaa(T4, T16, T49) → U11_gaa(T4, T16, T49, s2l4_in_ga(T4, T15))
U11_gaa(T4, T16, T49, s2l4_out_ga(T4, T15)) → U12_gaa(T4, T16, T49, app20_in_gag(T15, T16, .(T49, [])))
app20_in_gag([], T22, .(T22, [])) → app20_out_gag([], T22, .(T22, []))
app20_in_gag([], T30, .(X56, .(T30, []))) → app20_out_gag([], T30, .(X56, .(T30, [])))
app20_in_gag(.(T36, T38), T39, .(T36, X53)) → U2_gag(T36, T38, T39, X53, app20_in_gag(T38, T39, X53))
app20_in_gag(.(T45, T47), T48, .(T45, X53)) → U3_gag(T45, T47, T48, X53, app20_in_gag(T47, T48, X53))
U3_gag(T45, T47, T48, X53, app20_out_gag(T47, T48, X53)) → app20_out_gag(.(T45, T47), T48, .(T45, X53))
U2_gag(T36, T38, T39, X53, app20_out_gag(T38, T39, X53)) → app20_out_gag(.(T36, T38), T39, .(T36, X53))
U12_gaa(T4, T16, T49, app20_out_gag(T15, T16, .(T49, []))) → goal1_out_gaa(T4, T16, T49)
goal1_in_gaa(T4, T16, T56) → U13_gaa(T4, T16, T56, s2l4_in_ga(T4, T15))
U13_gaa(T4, T16, T56, s2l4_out_ga(T4, T15)) → U14_gaa(T4, T16, T56, app20_in_gag(T15, T16, []))
U14_gaa(T4, T16, T56, app20_out_gag(T15, T16, [])) → U15_gaa(T4, T16, T56, last63_in_a(T56))
last63_in_a(T56) → U4_a(T56, last63_in_a(T56))
U4_a(T56, last63_out_a(T56)) → last63_out_a(T56)
U15_gaa(T4, T16, T56, last63_out_a(T56)) → goal1_out_gaa(T4, T16, T56)
goal1_in_gaa(T4, T16, T59) → U16_gaa(T4, T16, T59, s2l4_in_ga(T4, T15))
U16_gaa(T4, T16, T59, s2l4_out_ga(T4, T15)) → U17_gaa(T4, T16, T59, app20_in_gaa(T15, T16, .(T57, T60)))
U17_gaa(T4, T16, T59, app20_out_gaa(T15, T16, .(T57, T60))) → U18_gaa(T4, T16, T59, last21_in_ag(T59, T60))
last21_in_ag(T49, .(T49, [])) → last21_out_ag(T49, .(T49, []))
last21_in_ag(T56, []) → U5_ag(T56, last63_in_a(T56))
U5_ag(T56, last63_out_a(T56)) → last21_out_ag(T56, [])
last21_in_ag(T59, .(T57, T60)) → U6_ag(T59, T57, T60, last21_in_ag(T59, T60))
last21_in_ag(T63, .(T61, T64)) → U7_ag(T63, T61, T64, last21_in_ag(T63, T64))
U7_ag(T63, T61, T64, last21_out_ag(T63, T64)) → last21_out_ag(T63, .(T61, T64))
U6_ag(T59, T57, T60, last21_out_ag(T59, T60)) → last21_out_ag(T59, .(T57, T60))
U18_gaa(T4, T16, T59, last21_out_ag(T59, T60)) → goal1_out_gaa(T4, T16, T59)
goal1_in_gaa(T4, T16, T63) → U19_gaa(T4, T16, T63, s2l4_in_ga(T4, T15))
U19_gaa(T4, T16, T63, s2l4_out_ga(T4, T15)) → U20_gaa(T4, T16, T63, app20_in_gaa(T15, T16, .(T61, T64)))
U20_gaa(T4, T16, T63, app20_out_gaa(T15, T16, .(T61, T64))) → U21_gaa(T4, T16, T63, last21_in_ag(T63, T64))
U21_gaa(T4, T16, T63, last21_out_ag(T63, T64)) → goal1_out_gaa(T4, T16, T63)

The argument filtering Pi contains the following mapping:
goal1_in_gaa(x1, x2, x3)  =  goal1_in_gaa(x1)
U8_gaa(x1, x2, x3, x4)  =  U8_gaa(x4)
s2l4_in_ga(x1, x2)  =  s2l4_in_ga(x1)
0  =  0
s2l4_out_ga(x1, x2)  =  s2l4_out_ga(x2)
s(x1)  =  s(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
.(x1, x2)  =  .(x2)
goal1_out_gaa(x1, x2, x3)  =  goal1_out_gaa
U9_gaa(x1, x2, x3, x4)  =  U9_gaa(x4)
U10_gaa(x1, x2, x3, x4)  =  U10_gaa(x4)
app20_in_gaa(x1, x2, x3)  =  app20_in_gaa(x1)
[]  =  []
app20_out_gaa(x1, x2, x3)  =  app20_out_gaa(x3)
U2_gaa(x1, x2, x3, x4, x5)  =  U2_gaa(x5)
U3_gaa(x1, x2, x3, x4, x5)  =  U3_gaa(x5)
U11_gaa(x1, x2, x3, x4)  =  U11_gaa(x4)
U12_gaa(x1, x2, x3, x4)  =  U12_gaa(x4)
app20_in_gag(x1, x2, x3)  =  app20_in_gag(x1, x3)
app20_out_gag(x1, x2, x3)  =  app20_out_gag
U2_gag(x1, x2, x3, x4, x5)  =  U2_gag(x5)
U3_gag(x1, x2, x3, x4, x5)  =  U3_gag(x5)
U13_gaa(x1, x2, x3, x4)  =  U13_gaa(x4)
U14_gaa(x1, x2, x3, x4)  =  U14_gaa(x4)
U15_gaa(x1, x2, x3, x4)  =  U15_gaa(x4)
last63_in_a(x1)  =  last63_in_a
U4_a(x1, x2)  =  U4_a(x2)
last63_out_a(x1)  =  last63_out_a(x1)
U16_gaa(x1, x2, x3, x4)  =  U16_gaa(x4)
U17_gaa(x1, x2, x3, x4)  =  U17_gaa(x4)
U18_gaa(x1, x2, x3, x4)  =  U18_gaa(x4)
last21_in_ag(x1, x2)  =  last21_in_ag(x2)
last21_out_ag(x1, x2)  =  last21_out_ag
U5_ag(x1, x2)  =  U5_ag(x2)
U6_ag(x1, x2, x3, x4)  =  U6_ag(x4)
U7_ag(x1, x2, x3, x4)  =  U7_ag(x4)
U19_gaa(x1, x2, x3, x4)  =  U19_gaa(x4)
U20_gaa(x1, x2, x3, x4)  =  U20_gaa(x4)
U21_gaa(x1, x2, x3, x4)  =  U21_gaa(x4)
APP20_IN_GAA(x1, x2, x3)  =  APP20_IN_GAA(x1)

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

(72) UsableRulesProof (EQUIVALENT transformation)

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

(73) Obligation:

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

APP20_IN_GAA(.(T36, T38), T39, .(T36, X53)) → APP20_IN_GAA(T38, T39, X53)

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

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

(74) PiDPToQDPProof (SOUND transformation)

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

(75) Obligation:

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

APP20_IN_GAA(.(T38)) → APP20_IN_GAA(T38)

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

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

  • APP20_IN_GAA(.(T38)) → APP20_IN_GAA(T38)
    The graph contains the following edges 1 > 1

(77) TRUE

(78) Obligation:

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

S2L4_IN_GA(s(T11), .(X25, X26)) → S2L4_IN_GA(T11, X26)

The TRS R consists of the following rules:

goal1_in_gaa(T4, T7, T8) → U8_gaa(T4, T7, T8, s2l4_in_ga(T4, X11))
s2l4_in_ga(0, []) → s2l4_out_ga(0, [])
s2l4_in_ga(s(T11), .(X25, X26)) → U1_ga(T11, X25, X26, s2l4_in_ga(T11, X26))
U1_ga(T11, X25, X26, s2l4_out_ga(T11, X26)) → s2l4_out_ga(s(T11), .(X25, X26))
U8_gaa(T4, T7, T8, s2l4_out_ga(T4, X11)) → goal1_out_gaa(T4, T7, T8)
goal1_in_gaa(T4, T16, T17) → U9_gaa(T4, T16, T17, s2l4_in_ga(T4, T15))
U9_gaa(T4, T16, T17, s2l4_out_ga(T4, T15)) → U10_gaa(T4, T16, T17, app20_in_gaa(T15, T16, X35))
app20_in_gaa([], T22, .(T22, [])) → app20_out_gaa([], T22, .(T22, []))
app20_in_gaa([], T30, .(X56, .(T30, []))) → app20_out_gaa([], T30, .(X56, .(T30, [])))
app20_in_gaa(.(T36, T38), T39, .(T36, X53)) → U2_gaa(T36, T38, T39, X53, app20_in_gaa(T38, T39, X53))
app20_in_gaa(.(T45, T47), T48, .(T45, X53)) → U3_gaa(T45, T47, T48, X53, app20_in_gaa(T47, T48, X53))
U3_gaa(T45, T47, T48, X53, app20_out_gaa(T47, T48, X53)) → app20_out_gaa(.(T45, T47), T48, .(T45, X53))
U2_gaa(T36, T38, T39, X53, app20_out_gaa(T38, T39, X53)) → app20_out_gaa(.(T36, T38), T39, .(T36, X53))
U10_gaa(T4, T16, T17, app20_out_gaa(T15, T16, X35)) → goal1_out_gaa(T4, T16, T17)
goal1_in_gaa(T4, T16, T49) → U11_gaa(T4, T16, T49, s2l4_in_ga(T4, T15))
U11_gaa(T4, T16, T49, s2l4_out_ga(T4, T15)) → U12_gaa(T4, T16, T49, app20_in_gag(T15, T16, .(T49, [])))
app20_in_gag([], T22, .(T22, [])) → app20_out_gag([], T22, .(T22, []))
app20_in_gag([], T30, .(X56, .(T30, []))) → app20_out_gag([], T30, .(X56, .(T30, [])))
app20_in_gag(.(T36, T38), T39, .(T36, X53)) → U2_gag(T36, T38, T39, X53, app20_in_gag(T38, T39, X53))
app20_in_gag(.(T45, T47), T48, .(T45, X53)) → U3_gag(T45, T47, T48, X53, app20_in_gag(T47, T48, X53))
U3_gag(T45, T47, T48, X53, app20_out_gag(T47, T48, X53)) → app20_out_gag(.(T45, T47), T48, .(T45, X53))
U2_gag(T36, T38, T39, X53, app20_out_gag(T38, T39, X53)) → app20_out_gag(.(T36, T38), T39, .(T36, X53))
U12_gaa(T4, T16, T49, app20_out_gag(T15, T16, .(T49, []))) → goal1_out_gaa(T4, T16, T49)
goal1_in_gaa(T4, T16, T56) → U13_gaa(T4, T16, T56, s2l4_in_ga(T4, T15))
U13_gaa(T4, T16, T56, s2l4_out_ga(T4, T15)) → U14_gaa(T4, T16, T56, app20_in_gag(T15, T16, []))
U14_gaa(T4, T16, T56, app20_out_gag(T15, T16, [])) → U15_gaa(T4, T16, T56, last63_in_a(T56))
last63_in_a(T56) → U4_a(T56, last63_in_a(T56))
U4_a(T56, last63_out_a(T56)) → last63_out_a(T56)
U15_gaa(T4, T16, T56, last63_out_a(T56)) → goal1_out_gaa(T4, T16, T56)
goal1_in_gaa(T4, T16, T59) → U16_gaa(T4, T16, T59, s2l4_in_ga(T4, T15))
U16_gaa(T4, T16, T59, s2l4_out_ga(T4, T15)) → U17_gaa(T4, T16, T59, app20_in_gaa(T15, T16, .(T57, T60)))
U17_gaa(T4, T16, T59, app20_out_gaa(T15, T16, .(T57, T60))) → U18_gaa(T4, T16, T59, last21_in_ag(T59, T60))
last21_in_ag(T49, .(T49, [])) → last21_out_ag(T49, .(T49, []))
last21_in_ag(T56, []) → U5_ag(T56, last63_in_a(T56))
U5_ag(T56, last63_out_a(T56)) → last21_out_ag(T56, [])
last21_in_ag(T59, .(T57, T60)) → U6_ag(T59, T57, T60, last21_in_ag(T59, T60))
last21_in_ag(T63, .(T61, T64)) → U7_ag(T63, T61, T64, last21_in_ag(T63, T64))
U7_ag(T63, T61, T64, last21_out_ag(T63, T64)) → last21_out_ag(T63, .(T61, T64))
U6_ag(T59, T57, T60, last21_out_ag(T59, T60)) → last21_out_ag(T59, .(T57, T60))
U18_gaa(T4, T16, T59, last21_out_ag(T59, T60)) → goal1_out_gaa(T4, T16, T59)
goal1_in_gaa(T4, T16, T63) → U19_gaa(T4, T16, T63, s2l4_in_ga(T4, T15))
U19_gaa(T4, T16, T63, s2l4_out_ga(T4, T15)) → U20_gaa(T4, T16, T63, app20_in_gaa(T15, T16, .(T61, T64)))
U20_gaa(T4, T16, T63, app20_out_gaa(T15, T16, .(T61, T64))) → U21_gaa(T4, T16, T63, last21_in_ag(T63, T64))
U21_gaa(T4, T16, T63, last21_out_ag(T63, T64)) → goal1_out_gaa(T4, T16, T63)

The argument filtering Pi contains the following mapping:
goal1_in_gaa(x1, x2, x3)  =  goal1_in_gaa(x1)
U8_gaa(x1, x2, x3, x4)  =  U8_gaa(x4)
s2l4_in_ga(x1, x2)  =  s2l4_in_ga(x1)
0  =  0
s2l4_out_ga(x1, x2)  =  s2l4_out_ga(x2)
s(x1)  =  s(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
.(x1, x2)  =  .(x2)
goal1_out_gaa(x1, x2, x3)  =  goal1_out_gaa
U9_gaa(x1, x2, x3, x4)  =  U9_gaa(x4)
U10_gaa(x1, x2, x3, x4)  =  U10_gaa(x4)
app20_in_gaa(x1, x2, x3)  =  app20_in_gaa(x1)
[]  =  []
app20_out_gaa(x1, x2, x3)  =  app20_out_gaa(x3)
U2_gaa(x1, x2, x3, x4, x5)  =  U2_gaa(x5)
U3_gaa(x1, x2, x3, x4, x5)  =  U3_gaa(x5)
U11_gaa(x1, x2, x3, x4)  =  U11_gaa(x4)
U12_gaa(x1, x2, x3, x4)  =  U12_gaa(x4)
app20_in_gag(x1, x2, x3)  =  app20_in_gag(x1, x3)
app20_out_gag(x1, x2, x3)  =  app20_out_gag
U2_gag(x1, x2, x3, x4, x5)  =  U2_gag(x5)
U3_gag(x1, x2, x3, x4, x5)  =  U3_gag(x5)
U13_gaa(x1, x2, x3, x4)  =  U13_gaa(x4)
U14_gaa(x1, x2, x3, x4)  =  U14_gaa(x4)
U15_gaa(x1, x2, x3, x4)  =  U15_gaa(x4)
last63_in_a(x1)  =  last63_in_a
U4_a(x1, x2)  =  U4_a(x2)
last63_out_a(x1)  =  last63_out_a(x1)
U16_gaa(x1, x2, x3, x4)  =  U16_gaa(x4)
U17_gaa(x1, x2, x3, x4)  =  U17_gaa(x4)
U18_gaa(x1, x2, x3, x4)  =  U18_gaa(x4)
last21_in_ag(x1, x2)  =  last21_in_ag(x2)
last21_out_ag(x1, x2)  =  last21_out_ag
U5_ag(x1, x2)  =  U5_ag(x2)
U6_ag(x1, x2, x3, x4)  =  U6_ag(x4)
U7_ag(x1, x2, x3, x4)  =  U7_ag(x4)
U19_gaa(x1, x2, x3, x4)  =  U19_gaa(x4)
U20_gaa(x1, x2, x3, x4)  =  U20_gaa(x4)
U21_gaa(x1, x2, x3, x4)  =  U21_gaa(x4)
S2L4_IN_GA(x1, x2)  =  S2L4_IN_GA(x1)

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

(79) UsableRulesProof (EQUIVALENT transformation)

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

(80) Obligation:

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

S2L4_IN_GA(s(T11), .(X25, X26)) → S2L4_IN_GA(T11, X26)

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

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

(81) PiDPToQDPProof (SOUND transformation)

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

(82) Obligation:

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

S2L4_IN_GA(s(T11)) → S2L4_IN_GA(T11)

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

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

  • S2L4_IN_GA(s(T11)) → S2L4_IN_GA(T11)
    The graph contains the following edges 1 > 1

(84) TRUE