(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) CutEliminatorProof (SOUND transformation)

Eliminated all cuts by simply ignoring them[PROLOG].

(2) 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, [])) :- true.
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).

(3) UndefinedPredicateHandlerProof (SOUND transformation)

Added facts for all undefined predicates [PROLOG].

(4) 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, [])) :- true.
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).
true.

Queries:

goal(g,a,a).

(5) PrologToPiTRSProof (SOUND transformation)

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

goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2l_in_ga(A, D))
s2l_in_ga(0, L) → U12_ga(L, eq_in_ag(L, []))
eq_in_ag(X, X) → eq_out_ag(X, X)
U12_ga(L, eq_out_ag(L, [])) → s2l_out_ga(0, L)
s2l_in_ga(X, .(X1, Xs)) → U13_ga(X, X1, Xs, p_in_ga(X, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U13_ga(X, X1, Xs, p_out_ga(X, P)) → U14_ga(X, X1, Xs, s2l_in_ga(P, Xs))
U14_ga(X, X1, Xs, s2l_out_ga(P, Xs)) → s2l_out_ga(X, .(X1, Xs))
U1_gaa(A, B, C, s2l_out_ga(A, D)) → U2_gaa(A, B, C, applast_in_gaa(D, B, C))
applast_in_gaa(L, X, Last) → U3_gaa(L, X, Last, app_in_gga(L, .(X, []), LX))
app_in_gga([], Y, Z) → U8_gga(Y, Z, eq_in_ga(Y, Z))
eq_in_ga(X, X) → eq_out_ga(X, X)
U8_gga(Y, Z, eq_out_ga(Y, Z)) → app_out_gga([], Y, Z)
app_in_gga(X, Y, .(H, Z)) → U9_gga(X, Y, H, Z, head_in_ga(X, H))
head_in_ga([], X2) → head_out_ga([], X2)
head_in_ga(.(X, X3), X) → head_out_ga(.(X, X3), X)
U9_gga(X, Y, H, Z, head_out_ga(X, H)) → U10_gga(X, Y, H, Z, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)
U10_gga(X, Y, H, Z, tail_out_ga(X, T)) → U11_gga(X, Y, H, Z, app_in_gga(T, Y, Z))
U11_gga(X, Y, H, Z, app_out_gga(T, Y, Z)) → app_out_gga(X, Y, .(H, Z))
U3_gaa(L, X, Last, app_out_gga(L, .(X, []), LX)) → U4_gaa(L, X, Last, last_in_ag(Last, LX))
last_in_ag(X, .(X, [])) → U5_ag(X, true_in_)
true_in_true_out_
U5_ag(X, true_out_) → last_out_ag(X, .(X, []))
last_in_ag(X, Y) → U6_ag(X, Y, tail_in_ga(Y, T))
U6_ag(X, Y, tail_out_ga(Y, T)) → U7_ag(X, Y, last_in_ag(X, T))
U7_ag(X, Y, last_out_ag(X, T)) → last_out_ag(X, Y)
U4_gaa(L, X, Last, last_out_ag(Last, LX)) → applast_out_gaa(L, X, Last)
U2_gaa(A, B, C, applast_out_gaa(D, B, C)) → goal_out_gaa(A, B, C)

The argument filtering Pi contains the following mapping:
goal_in_gaa(x1, x2, x3)  =  goal_in_gaa(x1)
U1_gaa(x1, x2, x3, x4)  =  U1_gaa(x1, x4)
s2l_in_ga(x1, x2)  =  s2l_in_ga(x1)
0  =  0
U12_ga(x1, x2)  =  U12_ga(x2)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1, x2)
[]  =  []
s2l_out_ga(x1, x2)  =  s2l_out_ga(x1, x2)
U13_ga(x1, x2, x3, x4)  =  U13_ga(x1, x4)
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x1, x2)
s(x1)  =  s(x1)
U14_ga(x1, x2, x3, x4)  =  U14_ga(x1, x4)
.(x1, x2)  =  .(x2)
U2_gaa(x1, x2, x3, x4)  =  U2_gaa(x1, x4)
applast_in_gaa(x1, x2, x3)  =  applast_in_gaa(x1)
U3_gaa(x1, x2, x3, x4)  =  U3_gaa(x1, x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
U8_gga(x1, x2, x3)  =  U8_gga(x1, x3)
eq_in_ga(x1, x2)  =  eq_in_ga(x1)
eq_out_ga(x1, x2)  =  eq_out_ga(x1, x2)
app_out_gga(x1, x2, x3)  =  app_out_gga(x1, x2, x3)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x5)
head_in_ga(x1, x2)  =  head_in_ga(x1)
head_out_ga(x1, x2)  =  head_out_ga(x1)
U10_gga(x1, x2, x3, x4, x5)  =  U10_gga(x1, x2, x5)
tail_in_ga(x1, x2)  =  tail_in_ga(x1)
tail_out_ga(x1, x2)  =  tail_out_ga(x1, x2)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x1, x2, x5)
U4_gaa(x1, x2, x3, x4)  =  U4_gaa(x1, x4)
last_in_ag(x1, x2)  =  last_in_ag(x2)
U5_ag(x1, x2)  =  U5_ag(x2)
true_in_  =  true_in_
true_out_  =  true_out_
last_out_ag(x1, x2)  =  last_out_ag(x2)
U6_ag(x1, x2, x3)  =  U6_ag(x2, x3)
U7_ag(x1, x2, x3)  =  U7_ag(x2, x3)
applast_out_gaa(x1, x2, x3)  =  applast_out_gaa(x1)
goal_out_gaa(x1, x2, x3)  =  goal_out_gaa(x1)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(6) Obligation:

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

goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2l_in_ga(A, D))
s2l_in_ga(0, L) → U12_ga(L, eq_in_ag(L, []))
eq_in_ag(X, X) → eq_out_ag(X, X)
U12_ga(L, eq_out_ag(L, [])) → s2l_out_ga(0, L)
s2l_in_ga(X, .(X1, Xs)) → U13_ga(X, X1, Xs, p_in_ga(X, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U13_ga(X, X1, Xs, p_out_ga(X, P)) → U14_ga(X, X1, Xs, s2l_in_ga(P, Xs))
U14_ga(X, X1, Xs, s2l_out_ga(P, Xs)) → s2l_out_ga(X, .(X1, Xs))
U1_gaa(A, B, C, s2l_out_ga(A, D)) → U2_gaa(A, B, C, applast_in_gaa(D, B, C))
applast_in_gaa(L, X, Last) → U3_gaa(L, X, Last, app_in_gga(L, .(X, []), LX))
app_in_gga([], Y, Z) → U8_gga(Y, Z, eq_in_ga(Y, Z))
eq_in_ga(X, X) → eq_out_ga(X, X)
U8_gga(Y, Z, eq_out_ga(Y, Z)) → app_out_gga([], Y, Z)
app_in_gga(X, Y, .(H, Z)) → U9_gga(X, Y, H, Z, head_in_ga(X, H))
head_in_ga([], X2) → head_out_ga([], X2)
head_in_ga(.(X, X3), X) → head_out_ga(.(X, X3), X)
U9_gga(X, Y, H, Z, head_out_ga(X, H)) → U10_gga(X, Y, H, Z, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)
U10_gga(X, Y, H, Z, tail_out_ga(X, T)) → U11_gga(X, Y, H, Z, app_in_gga(T, Y, Z))
U11_gga(X, Y, H, Z, app_out_gga(T, Y, Z)) → app_out_gga(X, Y, .(H, Z))
U3_gaa(L, X, Last, app_out_gga(L, .(X, []), LX)) → U4_gaa(L, X, Last, last_in_ag(Last, LX))
last_in_ag(X, .(X, [])) → U5_ag(X, true_in_)
true_in_true_out_
U5_ag(X, true_out_) → last_out_ag(X, .(X, []))
last_in_ag(X, Y) → U6_ag(X, Y, tail_in_ga(Y, T))
U6_ag(X, Y, tail_out_ga(Y, T)) → U7_ag(X, Y, last_in_ag(X, T))
U7_ag(X, Y, last_out_ag(X, T)) → last_out_ag(X, Y)
U4_gaa(L, X, Last, last_out_ag(Last, LX)) → applast_out_gaa(L, X, Last)
U2_gaa(A, B, C, applast_out_gaa(D, B, C)) → goal_out_gaa(A, B, C)

The argument filtering Pi contains the following mapping:
goal_in_gaa(x1, x2, x3)  =  goal_in_gaa(x1)
U1_gaa(x1, x2, x3, x4)  =  U1_gaa(x1, x4)
s2l_in_ga(x1, x2)  =  s2l_in_ga(x1)
0  =  0
U12_ga(x1, x2)  =  U12_ga(x2)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1, x2)
[]  =  []
s2l_out_ga(x1, x2)  =  s2l_out_ga(x1, x2)
U13_ga(x1, x2, x3, x4)  =  U13_ga(x1, x4)
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x1, x2)
s(x1)  =  s(x1)
U14_ga(x1, x2, x3, x4)  =  U14_ga(x1, x4)
.(x1, x2)  =  .(x2)
U2_gaa(x1, x2, x3, x4)  =  U2_gaa(x1, x4)
applast_in_gaa(x1, x2, x3)  =  applast_in_gaa(x1)
U3_gaa(x1, x2, x3, x4)  =  U3_gaa(x1, x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
U8_gga(x1, x2, x3)  =  U8_gga(x1, x3)
eq_in_ga(x1, x2)  =  eq_in_ga(x1)
eq_out_ga(x1, x2)  =  eq_out_ga(x1, x2)
app_out_gga(x1, x2, x3)  =  app_out_gga(x1, x2, x3)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x5)
head_in_ga(x1, x2)  =  head_in_ga(x1)
head_out_ga(x1, x2)  =  head_out_ga(x1)
U10_gga(x1, x2, x3, x4, x5)  =  U10_gga(x1, x2, x5)
tail_in_ga(x1, x2)  =  tail_in_ga(x1)
tail_out_ga(x1, x2)  =  tail_out_ga(x1, x2)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x1, x2, x5)
U4_gaa(x1, x2, x3, x4)  =  U4_gaa(x1, x4)
last_in_ag(x1, x2)  =  last_in_ag(x2)
U5_ag(x1, x2)  =  U5_ag(x2)
true_in_  =  true_in_
true_out_  =  true_out_
last_out_ag(x1, x2)  =  last_out_ag(x2)
U6_ag(x1, x2, x3)  =  U6_ag(x2, x3)
U7_ag(x1, x2, x3)  =  U7_ag(x2, x3)
applast_out_gaa(x1, x2, x3)  =  applast_out_gaa(x1)
goal_out_gaa(x1, x2, x3)  =  goal_out_gaa(x1)

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

GOAL_IN_GAA(A, B, C) → U1_GAA(A, B, C, s2l_in_ga(A, D))
GOAL_IN_GAA(A, B, C) → S2L_IN_GA(A, D)
S2L_IN_GA(0, L) → U12_GA(L, eq_in_ag(L, []))
S2L_IN_GA(0, L) → EQ_IN_AG(L, [])
S2L_IN_GA(X, .(X1, Xs)) → U13_GA(X, X1, Xs, p_in_ga(X, P))
S2L_IN_GA(X, .(X1, Xs)) → P_IN_GA(X, P)
U13_GA(X, X1, Xs, p_out_ga(X, P)) → U14_GA(X, X1, Xs, s2l_in_ga(P, Xs))
U13_GA(X, X1, Xs, p_out_ga(X, P)) → S2L_IN_GA(P, Xs)
U1_GAA(A, B, C, s2l_out_ga(A, D)) → U2_GAA(A, B, C, applast_in_gaa(D, B, C))
U1_GAA(A, B, C, s2l_out_ga(A, D)) → APPLAST_IN_GAA(D, B, C)
APPLAST_IN_GAA(L, X, Last) → U3_GAA(L, X, Last, app_in_gga(L, .(X, []), LX))
APPLAST_IN_GAA(L, X, Last) → APP_IN_GGA(L, .(X, []), LX)
APP_IN_GGA([], Y, Z) → U8_GGA(Y, Z, eq_in_ga(Y, Z))
APP_IN_GGA([], Y, Z) → EQ_IN_GA(Y, Z)
APP_IN_GGA(X, Y, .(H, Z)) → U9_GGA(X, Y, H, Z, head_in_ga(X, H))
APP_IN_GGA(X, Y, .(H, Z)) → HEAD_IN_GA(X, H)
U9_GGA(X, Y, H, Z, head_out_ga(X, H)) → U10_GGA(X, Y, H, Z, tail_in_ga(X, T))
U9_GGA(X, Y, H, Z, head_out_ga(X, H)) → TAIL_IN_GA(X, T)
U10_GGA(X, Y, H, Z, tail_out_ga(X, T)) → U11_GGA(X, Y, H, Z, app_in_gga(T, Y, Z))
U10_GGA(X, Y, H, Z, tail_out_ga(X, T)) → APP_IN_GGA(T, Y, Z)
U3_GAA(L, X, Last, app_out_gga(L, .(X, []), LX)) → U4_GAA(L, X, Last, last_in_ag(Last, LX))
U3_GAA(L, X, Last, app_out_gga(L, .(X, []), LX)) → LAST_IN_AG(Last, LX)
LAST_IN_AG(X, .(X, [])) → U5_AG(X, true_in_)
LAST_IN_AG(X, .(X, [])) → TRUE_IN_
LAST_IN_AG(X, Y) → U6_AG(X, Y, tail_in_ga(Y, T))
LAST_IN_AG(X, Y) → TAIL_IN_GA(Y, T)
U6_AG(X, Y, tail_out_ga(Y, T)) → U7_AG(X, Y, last_in_ag(X, T))
U6_AG(X, Y, tail_out_ga(Y, T)) → LAST_IN_AG(X, T)

The TRS R consists of the following rules:

goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2l_in_ga(A, D))
s2l_in_ga(0, L) → U12_ga(L, eq_in_ag(L, []))
eq_in_ag(X, X) → eq_out_ag(X, X)
U12_ga(L, eq_out_ag(L, [])) → s2l_out_ga(0, L)
s2l_in_ga(X, .(X1, Xs)) → U13_ga(X, X1, Xs, p_in_ga(X, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U13_ga(X, X1, Xs, p_out_ga(X, P)) → U14_ga(X, X1, Xs, s2l_in_ga(P, Xs))
U14_ga(X, X1, Xs, s2l_out_ga(P, Xs)) → s2l_out_ga(X, .(X1, Xs))
U1_gaa(A, B, C, s2l_out_ga(A, D)) → U2_gaa(A, B, C, applast_in_gaa(D, B, C))
applast_in_gaa(L, X, Last) → U3_gaa(L, X, Last, app_in_gga(L, .(X, []), LX))
app_in_gga([], Y, Z) → U8_gga(Y, Z, eq_in_ga(Y, Z))
eq_in_ga(X, X) → eq_out_ga(X, X)
U8_gga(Y, Z, eq_out_ga(Y, Z)) → app_out_gga([], Y, Z)
app_in_gga(X, Y, .(H, Z)) → U9_gga(X, Y, H, Z, head_in_ga(X, H))
head_in_ga([], X2) → head_out_ga([], X2)
head_in_ga(.(X, X3), X) → head_out_ga(.(X, X3), X)
U9_gga(X, Y, H, Z, head_out_ga(X, H)) → U10_gga(X, Y, H, Z, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)
U10_gga(X, Y, H, Z, tail_out_ga(X, T)) → U11_gga(X, Y, H, Z, app_in_gga(T, Y, Z))
U11_gga(X, Y, H, Z, app_out_gga(T, Y, Z)) → app_out_gga(X, Y, .(H, Z))
U3_gaa(L, X, Last, app_out_gga(L, .(X, []), LX)) → U4_gaa(L, X, Last, last_in_ag(Last, LX))
last_in_ag(X, .(X, [])) → U5_ag(X, true_in_)
true_in_true_out_
U5_ag(X, true_out_) → last_out_ag(X, .(X, []))
last_in_ag(X, Y) → U6_ag(X, Y, tail_in_ga(Y, T))
U6_ag(X, Y, tail_out_ga(Y, T)) → U7_ag(X, Y, last_in_ag(X, T))
U7_ag(X, Y, last_out_ag(X, T)) → last_out_ag(X, Y)
U4_gaa(L, X, Last, last_out_ag(Last, LX)) → applast_out_gaa(L, X, Last)
U2_gaa(A, B, C, applast_out_gaa(D, B, C)) → goal_out_gaa(A, B, C)

The argument filtering Pi contains the following mapping:
goal_in_gaa(x1, x2, x3)  =  goal_in_gaa(x1)
U1_gaa(x1, x2, x3, x4)  =  U1_gaa(x1, x4)
s2l_in_ga(x1, x2)  =  s2l_in_ga(x1)
0  =  0
U12_ga(x1, x2)  =  U12_ga(x2)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1, x2)
[]  =  []
s2l_out_ga(x1, x2)  =  s2l_out_ga(x1, x2)
U13_ga(x1, x2, x3, x4)  =  U13_ga(x1, x4)
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x1, x2)
s(x1)  =  s(x1)
U14_ga(x1, x2, x3, x4)  =  U14_ga(x1, x4)
.(x1, x2)  =  .(x2)
U2_gaa(x1, x2, x3, x4)  =  U2_gaa(x1, x4)
applast_in_gaa(x1, x2, x3)  =  applast_in_gaa(x1)
U3_gaa(x1, x2, x3, x4)  =  U3_gaa(x1, x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
U8_gga(x1, x2, x3)  =  U8_gga(x1, x3)
eq_in_ga(x1, x2)  =  eq_in_ga(x1)
eq_out_ga(x1, x2)  =  eq_out_ga(x1, x2)
app_out_gga(x1, x2, x3)  =  app_out_gga(x1, x2, x3)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x5)
head_in_ga(x1, x2)  =  head_in_ga(x1)
head_out_ga(x1, x2)  =  head_out_ga(x1)
U10_gga(x1, x2, x3, x4, x5)  =  U10_gga(x1, x2, x5)
tail_in_ga(x1, x2)  =  tail_in_ga(x1)
tail_out_ga(x1, x2)  =  tail_out_ga(x1, x2)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x1, x2, x5)
U4_gaa(x1, x2, x3, x4)  =  U4_gaa(x1, x4)
last_in_ag(x1, x2)  =  last_in_ag(x2)
U5_ag(x1, x2)  =  U5_ag(x2)
true_in_  =  true_in_
true_out_  =  true_out_
last_out_ag(x1, x2)  =  last_out_ag(x2)
U6_ag(x1, x2, x3)  =  U6_ag(x2, x3)
U7_ag(x1, x2, x3)  =  U7_ag(x2, x3)
applast_out_gaa(x1, x2, x3)  =  applast_out_gaa(x1)
goal_out_gaa(x1, x2, x3)  =  goal_out_gaa(x1)
GOAL_IN_GAA(x1, x2, x3)  =  GOAL_IN_GAA(x1)
U1_GAA(x1, x2, x3, x4)  =  U1_GAA(x1, x4)
S2L_IN_GA(x1, x2)  =  S2L_IN_GA(x1)
U12_GA(x1, x2)  =  U12_GA(x2)
EQ_IN_AG(x1, x2)  =  EQ_IN_AG(x2)
U13_GA(x1, x2, x3, x4)  =  U13_GA(x1, x4)
P_IN_GA(x1, x2)  =  P_IN_GA(x1)
U14_GA(x1, x2, x3, x4)  =  U14_GA(x1, x4)
U2_GAA(x1, x2, x3, x4)  =  U2_GAA(x1, x4)
APPLAST_IN_GAA(x1, x2, x3)  =  APPLAST_IN_GAA(x1)
U3_GAA(x1, x2, x3, x4)  =  U3_GAA(x1, x4)
APP_IN_GGA(x1, x2, x3)  =  APP_IN_GGA(x1, x2)
U8_GGA(x1, x2, x3)  =  U8_GGA(x1, x3)
EQ_IN_GA(x1, x2)  =  EQ_IN_GA(x1)
U9_GGA(x1, x2, x3, x4, x5)  =  U9_GGA(x1, x2, x5)
HEAD_IN_GA(x1, x2)  =  HEAD_IN_GA(x1)
U10_GGA(x1, x2, x3, x4, x5)  =  U10_GGA(x1, x2, x5)
TAIL_IN_GA(x1, x2)  =  TAIL_IN_GA(x1)
U11_GGA(x1, x2, x3, x4, x5)  =  U11_GGA(x1, x2, x5)
U4_GAA(x1, x2, x3, x4)  =  U4_GAA(x1, x4)
LAST_IN_AG(x1, x2)  =  LAST_IN_AG(x2)
U5_AG(x1, x2)  =  U5_AG(x2)
TRUE_IN_  =  TRUE_IN_
U6_AG(x1, x2, x3)  =  U6_AG(x2, x3)
U7_AG(x1, x2, x3)  =  U7_AG(x2, x3)

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

(8) Obligation:

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

GOAL_IN_GAA(A, B, C) → U1_GAA(A, B, C, s2l_in_ga(A, D))
GOAL_IN_GAA(A, B, C) → S2L_IN_GA(A, D)
S2L_IN_GA(0, L) → U12_GA(L, eq_in_ag(L, []))
S2L_IN_GA(0, L) → EQ_IN_AG(L, [])
S2L_IN_GA(X, .(X1, Xs)) → U13_GA(X, X1, Xs, p_in_ga(X, P))
S2L_IN_GA(X, .(X1, Xs)) → P_IN_GA(X, P)
U13_GA(X, X1, Xs, p_out_ga(X, P)) → U14_GA(X, X1, Xs, s2l_in_ga(P, Xs))
U13_GA(X, X1, Xs, p_out_ga(X, P)) → S2L_IN_GA(P, Xs)
U1_GAA(A, B, C, s2l_out_ga(A, D)) → U2_GAA(A, B, C, applast_in_gaa(D, B, C))
U1_GAA(A, B, C, s2l_out_ga(A, D)) → APPLAST_IN_GAA(D, B, C)
APPLAST_IN_GAA(L, X, Last) → U3_GAA(L, X, Last, app_in_gga(L, .(X, []), LX))
APPLAST_IN_GAA(L, X, Last) → APP_IN_GGA(L, .(X, []), LX)
APP_IN_GGA([], Y, Z) → U8_GGA(Y, Z, eq_in_ga(Y, Z))
APP_IN_GGA([], Y, Z) → EQ_IN_GA(Y, Z)
APP_IN_GGA(X, Y, .(H, Z)) → U9_GGA(X, Y, H, Z, head_in_ga(X, H))
APP_IN_GGA(X, Y, .(H, Z)) → HEAD_IN_GA(X, H)
U9_GGA(X, Y, H, Z, head_out_ga(X, H)) → U10_GGA(X, Y, H, Z, tail_in_ga(X, T))
U9_GGA(X, Y, H, Z, head_out_ga(X, H)) → TAIL_IN_GA(X, T)
U10_GGA(X, Y, H, Z, tail_out_ga(X, T)) → U11_GGA(X, Y, H, Z, app_in_gga(T, Y, Z))
U10_GGA(X, Y, H, Z, tail_out_ga(X, T)) → APP_IN_GGA(T, Y, Z)
U3_GAA(L, X, Last, app_out_gga(L, .(X, []), LX)) → U4_GAA(L, X, Last, last_in_ag(Last, LX))
U3_GAA(L, X, Last, app_out_gga(L, .(X, []), LX)) → LAST_IN_AG(Last, LX)
LAST_IN_AG(X, .(X, [])) → U5_AG(X, true_in_)
LAST_IN_AG(X, .(X, [])) → TRUE_IN_
LAST_IN_AG(X, Y) → U6_AG(X, Y, tail_in_ga(Y, T))
LAST_IN_AG(X, Y) → TAIL_IN_GA(Y, T)
U6_AG(X, Y, tail_out_ga(Y, T)) → U7_AG(X, Y, last_in_ag(X, T))
U6_AG(X, Y, tail_out_ga(Y, T)) → LAST_IN_AG(X, T)

The TRS R consists of the following rules:

goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2l_in_ga(A, D))
s2l_in_ga(0, L) → U12_ga(L, eq_in_ag(L, []))
eq_in_ag(X, X) → eq_out_ag(X, X)
U12_ga(L, eq_out_ag(L, [])) → s2l_out_ga(0, L)
s2l_in_ga(X, .(X1, Xs)) → U13_ga(X, X1, Xs, p_in_ga(X, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U13_ga(X, X1, Xs, p_out_ga(X, P)) → U14_ga(X, X1, Xs, s2l_in_ga(P, Xs))
U14_ga(X, X1, Xs, s2l_out_ga(P, Xs)) → s2l_out_ga(X, .(X1, Xs))
U1_gaa(A, B, C, s2l_out_ga(A, D)) → U2_gaa(A, B, C, applast_in_gaa(D, B, C))
applast_in_gaa(L, X, Last) → U3_gaa(L, X, Last, app_in_gga(L, .(X, []), LX))
app_in_gga([], Y, Z) → U8_gga(Y, Z, eq_in_ga(Y, Z))
eq_in_ga(X, X) → eq_out_ga(X, X)
U8_gga(Y, Z, eq_out_ga(Y, Z)) → app_out_gga([], Y, Z)
app_in_gga(X, Y, .(H, Z)) → U9_gga(X, Y, H, Z, head_in_ga(X, H))
head_in_ga([], X2) → head_out_ga([], X2)
head_in_ga(.(X, X3), X) → head_out_ga(.(X, X3), X)
U9_gga(X, Y, H, Z, head_out_ga(X, H)) → U10_gga(X, Y, H, Z, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)
U10_gga(X, Y, H, Z, tail_out_ga(X, T)) → U11_gga(X, Y, H, Z, app_in_gga(T, Y, Z))
U11_gga(X, Y, H, Z, app_out_gga(T, Y, Z)) → app_out_gga(X, Y, .(H, Z))
U3_gaa(L, X, Last, app_out_gga(L, .(X, []), LX)) → U4_gaa(L, X, Last, last_in_ag(Last, LX))
last_in_ag(X, .(X, [])) → U5_ag(X, true_in_)
true_in_true_out_
U5_ag(X, true_out_) → last_out_ag(X, .(X, []))
last_in_ag(X, Y) → U6_ag(X, Y, tail_in_ga(Y, T))
U6_ag(X, Y, tail_out_ga(Y, T)) → U7_ag(X, Y, last_in_ag(X, T))
U7_ag(X, Y, last_out_ag(X, T)) → last_out_ag(X, Y)
U4_gaa(L, X, Last, last_out_ag(Last, LX)) → applast_out_gaa(L, X, Last)
U2_gaa(A, B, C, applast_out_gaa(D, B, C)) → goal_out_gaa(A, B, C)

The argument filtering Pi contains the following mapping:
goal_in_gaa(x1, x2, x3)  =  goal_in_gaa(x1)
U1_gaa(x1, x2, x3, x4)  =  U1_gaa(x1, x4)
s2l_in_ga(x1, x2)  =  s2l_in_ga(x1)
0  =  0
U12_ga(x1, x2)  =  U12_ga(x2)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1, x2)
[]  =  []
s2l_out_ga(x1, x2)  =  s2l_out_ga(x1, x2)
U13_ga(x1, x2, x3, x4)  =  U13_ga(x1, x4)
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x1, x2)
s(x1)  =  s(x1)
U14_ga(x1, x2, x3, x4)  =  U14_ga(x1, x4)
.(x1, x2)  =  .(x2)
U2_gaa(x1, x2, x3, x4)  =  U2_gaa(x1, x4)
applast_in_gaa(x1, x2, x3)  =  applast_in_gaa(x1)
U3_gaa(x1, x2, x3, x4)  =  U3_gaa(x1, x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
U8_gga(x1, x2, x3)  =  U8_gga(x1, x3)
eq_in_ga(x1, x2)  =  eq_in_ga(x1)
eq_out_ga(x1, x2)  =  eq_out_ga(x1, x2)
app_out_gga(x1, x2, x3)  =  app_out_gga(x1, x2, x3)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x5)
head_in_ga(x1, x2)  =  head_in_ga(x1)
head_out_ga(x1, x2)  =  head_out_ga(x1)
U10_gga(x1, x2, x3, x4, x5)  =  U10_gga(x1, x2, x5)
tail_in_ga(x1, x2)  =  tail_in_ga(x1)
tail_out_ga(x1, x2)  =  tail_out_ga(x1, x2)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x1, x2, x5)
U4_gaa(x1, x2, x3, x4)  =  U4_gaa(x1, x4)
last_in_ag(x1, x2)  =  last_in_ag(x2)
U5_ag(x1, x2)  =  U5_ag(x2)
true_in_  =  true_in_
true_out_  =  true_out_
last_out_ag(x1, x2)  =  last_out_ag(x2)
U6_ag(x1, x2, x3)  =  U6_ag(x2, x3)
U7_ag(x1, x2, x3)  =  U7_ag(x2, x3)
applast_out_gaa(x1, x2, x3)  =  applast_out_gaa(x1)
goal_out_gaa(x1, x2, x3)  =  goal_out_gaa(x1)
GOAL_IN_GAA(x1, x2, x3)  =  GOAL_IN_GAA(x1)
U1_GAA(x1, x2, x3, x4)  =  U1_GAA(x1, x4)
S2L_IN_GA(x1, x2)  =  S2L_IN_GA(x1)
U12_GA(x1, x2)  =  U12_GA(x2)
EQ_IN_AG(x1, x2)  =  EQ_IN_AG(x2)
U13_GA(x1, x2, x3, x4)  =  U13_GA(x1, x4)
P_IN_GA(x1, x2)  =  P_IN_GA(x1)
U14_GA(x1, x2, x3, x4)  =  U14_GA(x1, x4)
U2_GAA(x1, x2, x3, x4)  =  U2_GAA(x1, x4)
APPLAST_IN_GAA(x1, x2, x3)  =  APPLAST_IN_GAA(x1)
U3_GAA(x1, x2, x3, x4)  =  U3_GAA(x1, x4)
APP_IN_GGA(x1, x2, x3)  =  APP_IN_GGA(x1, x2)
U8_GGA(x1, x2, x3)  =  U8_GGA(x1, x3)
EQ_IN_GA(x1, x2)  =  EQ_IN_GA(x1)
U9_GGA(x1, x2, x3, x4, x5)  =  U9_GGA(x1, x2, x5)
HEAD_IN_GA(x1, x2)  =  HEAD_IN_GA(x1)
U10_GGA(x1, x2, x3, x4, x5)  =  U10_GGA(x1, x2, x5)
TAIL_IN_GA(x1, x2)  =  TAIL_IN_GA(x1)
U11_GGA(x1, x2, x3, x4, x5)  =  U11_GGA(x1, x2, x5)
U4_GAA(x1, x2, x3, x4)  =  U4_GAA(x1, x4)
LAST_IN_AG(x1, x2)  =  LAST_IN_AG(x2)
U5_AG(x1, x2)  =  U5_AG(x2)
TRUE_IN_  =  TRUE_IN_
U6_AG(x1, x2, x3)  =  U6_AG(x2, x3)
U7_AG(x1, x2, x3)  =  U7_AG(x2, x3)

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

(9) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 3 SCCs with 21 less nodes.

(10) Complex Obligation (AND)

(11) Obligation:

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

LAST_IN_AG(X, Y) → U6_AG(X, Y, tail_in_ga(Y, T))
U6_AG(X, Y, tail_out_ga(Y, T)) → LAST_IN_AG(X, T)

The TRS R consists of the following rules:

goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2l_in_ga(A, D))
s2l_in_ga(0, L) → U12_ga(L, eq_in_ag(L, []))
eq_in_ag(X, X) → eq_out_ag(X, X)
U12_ga(L, eq_out_ag(L, [])) → s2l_out_ga(0, L)
s2l_in_ga(X, .(X1, Xs)) → U13_ga(X, X1, Xs, p_in_ga(X, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U13_ga(X, X1, Xs, p_out_ga(X, P)) → U14_ga(X, X1, Xs, s2l_in_ga(P, Xs))
U14_ga(X, X1, Xs, s2l_out_ga(P, Xs)) → s2l_out_ga(X, .(X1, Xs))
U1_gaa(A, B, C, s2l_out_ga(A, D)) → U2_gaa(A, B, C, applast_in_gaa(D, B, C))
applast_in_gaa(L, X, Last) → U3_gaa(L, X, Last, app_in_gga(L, .(X, []), LX))
app_in_gga([], Y, Z) → U8_gga(Y, Z, eq_in_ga(Y, Z))
eq_in_ga(X, X) → eq_out_ga(X, X)
U8_gga(Y, Z, eq_out_ga(Y, Z)) → app_out_gga([], Y, Z)
app_in_gga(X, Y, .(H, Z)) → U9_gga(X, Y, H, Z, head_in_ga(X, H))
head_in_ga([], X2) → head_out_ga([], X2)
head_in_ga(.(X, X3), X) → head_out_ga(.(X, X3), X)
U9_gga(X, Y, H, Z, head_out_ga(X, H)) → U10_gga(X, Y, H, Z, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)
U10_gga(X, Y, H, Z, tail_out_ga(X, T)) → U11_gga(X, Y, H, Z, app_in_gga(T, Y, Z))
U11_gga(X, Y, H, Z, app_out_gga(T, Y, Z)) → app_out_gga(X, Y, .(H, Z))
U3_gaa(L, X, Last, app_out_gga(L, .(X, []), LX)) → U4_gaa(L, X, Last, last_in_ag(Last, LX))
last_in_ag(X, .(X, [])) → U5_ag(X, true_in_)
true_in_true_out_
U5_ag(X, true_out_) → last_out_ag(X, .(X, []))
last_in_ag(X, Y) → U6_ag(X, Y, tail_in_ga(Y, T))
U6_ag(X, Y, tail_out_ga(Y, T)) → U7_ag(X, Y, last_in_ag(X, T))
U7_ag(X, Y, last_out_ag(X, T)) → last_out_ag(X, Y)
U4_gaa(L, X, Last, last_out_ag(Last, LX)) → applast_out_gaa(L, X, Last)
U2_gaa(A, B, C, applast_out_gaa(D, B, C)) → goal_out_gaa(A, B, C)

The argument filtering Pi contains the following mapping:
goal_in_gaa(x1, x2, x3)  =  goal_in_gaa(x1)
U1_gaa(x1, x2, x3, x4)  =  U1_gaa(x1, x4)
s2l_in_ga(x1, x2)  =  s2l_in_ga(x1)
0  =  0
U12_ga(x1, x2)  =  U12_ga(x2)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1, x2)
[]  =  []
s2l_out_ga(x1, x2)  =  s2l_out_ga(x1, x2)
U13_ga(x1, x2, x3, x4)  =  U13_ga(x1, x4)
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x1, x2)
s(x1)  =  s(x1)
U14_ga(x1, x2, x3, x4)  =  U14_ga(x1, x4)
.(x1, x2)  =  .(x2)
U2_gaa(x1, x2, x3, x4)  =  U2_gaa(x1, x4)
applast_in_gaa(x1, x2, x3)  =  applast_in_gaa(x1)
U3_gaa(x1, x2, x3, x4)  =  U3_gaa(x1, x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
U8_gga(x1, x2, x3)  =  U8_gga(x1, x3)
eq_in_ga(x1, x2)  =  eq_in_ga(x1)
eq_out_ga(x1, x2)  =  eq_out_ga(x1, x2)
app_out_gga(x1, x2, x3)  =  app_out_gga(x1, x2, x3)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x5)
head_in_ga(x1, x2)  =  head_in_ga(x1)
head_out_ga(x1, x2)  =  head_out_ga(x1)
U10_gga(x1, x2, x3, x4, x5)  =  U10_gga(x1, x2, x5)
tail_in_ga(x1, x2)  =  tail_in_ga(x1)
tail_out_ga(x1, x2)  =  tail_out_ga(x1, x2)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x1, x2, x5)
U4_gaa(x1, x2, x3, x4)  =  U4_gaa(x1, x4)
last_in_ag(x1, x2)  =  last_in_ag(x2)
U5_ag(x1, x2)  =  U5_ag(x2)
true_in_  =  true_in_
true_out_  =  true_out_
last_out_ag(x1, x2)  =  last_out_ag(x2)
U6_ag(x1, x2, x3)  =  U6_ag(x2, x3)
U7_ag(x1, x2, x3)  =  U7_ag(x2, x3)
applast_out_gaa(x1, x2, x3)  =  applast_out_gaa(x1)
goal_out_gaa(x1, x2, x3)  =  goal_out_gaa(x1)
LAST_IN_AG(x1, x2)  =  LAST_IN_AG(x2)
U6_AG(x1, x2, x3)  =  U6_AG(x2, x3)

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

(12) UsableRulesProof (EQUIVALENT transformation)

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

(13) Obligation:

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

LAST_IN_AG(X, Y) → U6_AG(X, Y, tail_in_ga(Y, T))
U6_AG(X, Y, tail_out_ga(Y, T)) → LAST_IN_AG(X, T)

The TRS R consists of the following rules:

tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)

The argument filtering Pi contains the following mapping:
[]  =  []
.(x1, x2)  =  .(x2)
tail_in_ga(x1, x2)  =  tail_in_ga(x1)
tail_out_ga(x1, x2)  =  tail_out_ga(x1, x2)
LAST_IN_AG(x1, x2)  =  LAST_IN_AG(x2)
U6_AG(x1, x2, x3)  =  U6_AG(x2, x3)

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

(14) PiDPToQDPProof (SOUND transformation)

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

(15) Obligation:

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

LAST_IN_AG(Y) → U6_AG(Y, tail_in_ga(Y))
U6_AG(Y, tail_out_ga(Y, T)) → LAST_IN_AG(T)

The TRS R consists of the following rules:

tail_in_ga([]) → tail_out_ga([], [])
tail_in_ga(.(Xs)) → tail_out_ga(.(Xs), Xs)

The set Q consists of the following terms:

tail_in_ga(x0)

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

(16) Narrowing (SOUND transformation)

By narrowing [LPAR04] the rule LAST_IN_AG(Y) → U6_AG(Y, tail_in_ga(Y)) at position [1] we obtained the following new rules [LPAR04]:

LAST_IN_AG([]) → U6_AG([], tail_out_ga([], []))
LAST_IN_AG(.(x0)) → U6_AG(.(x0), tail_out_ga(.(x0), x0))

(17) Obligation:

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

U6_AG(Y, tail_out_ga(Y, T)) → LAST_IN_AG(T)
LAST_IN_AG([]) → U6_AG([], tail_out_ga([], []))
LAST_IN_AG(.(x0)) → U6_AG(.(x0), tail_out_ga(.(x0), x0))

The TRS R consists of the following rules:

tail_in_ga([]) → tail_out_ga([], [])
tail_in_ga(.(Xs)) → tail_out_ga(.(Xs), Xs)

The set Q consists of the following terms:

tail_in_ga(x0)

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

(18) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(19) Obligation:

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

U6_AG(Y, tail_out_ga(Y, T)) → LAST_IN_AG(T)
LAST_IN_AG([]) → U6_AG([], tail_out_ga([], []))
LAST_IN_AG(.(x0)) → U6_AG(.(x0), tail_out_ga(.(x0), x0))

R is empty.
The set Q consists of the following terms:

tail_in_ga(x0)

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

(20) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

tail_in_ga(x0)

(21) Obligation:

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

U6_AG(Y, tail_out_ga(Y, T)) → LAST_IN_AG(T)
LAST_IN_AG([]) → U6_AG([], tail_out_ga([], []))
LAST_IN_AG(.(x0)) → U6_AG(.(x0), tail_out_ga(.(x0), x0))

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

(22) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule U6_AG(Y, tail_out_ga(Y, T)) → LAST_IN_AG(T) we obtained the following new rules [LPAR04]:

U6_AG([], tail_out_ga([], [])) → LAST_IN_AG([])
U6_AG(.(z0), tail_out_ga(.(z0), z0)) → LAST_IN_AG(z0)

(23) Obligation:

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

LAST_IN_AG([]) → U6_AG([], tail_out_ga([], []))
LAST_IN_AG(.(x0)) → U6_AG(.(x0), tail_out_ga(.(x0), x0))
U6_AG([], tail_out_ga([], [])) → LAST_IN_AG([])
U6_AG(.(z0), tail_out_ga(.(z0), z0)) → LAST_IN_AG(z0)

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

(24) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 2 SCCs.

(25) Complex Obligation (AND)

(26) Obligation:

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

U6_AG([], tail_out_ga([], [])) → LAST_IN_AG([])
LAST_IN_AG([]) → U6_AG([], tail_out_ga([], []))

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

(27) NonTerminationProof (EQUIVALENT transformation)

We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

s = LAST_IN_AG([]) evaluates to t =LAST_IN_AG([])

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




Rewriting sequence

LAST_IN_AG([])U6_AG([], tail_out_ga([], []))
with rule LAST_IN_AG([]) → U6_AG([], tail_out_ga([], [])) at position [] and matcher [ ]

U6_AG([], tail_out_ga([], []))LAST_IN_AG([])
with rule U6_AG([], tail_out_ga([], [])) → LAST_IN_AG([])

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.



(28) FALSE

(29) Obligation:

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

LAST_IN_AG(.(x0)) → U6_AG(.(x0), tail_out_ga(.(x0), x0))
U6_AG(.(z0), tail_out_ga(.(z0), z0)) → LAST_IN_AG(z0)

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

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

  • U6_AG(.(z0), tail_out_ga(.(z0), z0)) → LAST_IN_AG(z0)
    The graph contains the following edges 1 > 1, 2 > 1

  • LAST_IN_AG(.(x0)) → U6_AG(.(x0), tail_out_ga(.(x0), x0))
    The graph contains the following edges 1 >= 1

(31) TRUE

(32) Obligation:

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

APP_IN_GGA(X, Y, .(H, Z)) → U9_GGA(X, Y, H, Z, head_in_ga(X, H))
U9_GGA(X, Y, H, Z, head_out_ga(X, H)) → U10_GGA(X, Y, H, Z, tail_in_ga(X, T))
U10_GGA(X, Y, H, Z, tail_out_ga(X, T)) → APP_IN_GGA(T, Y, Z)

The TRS R consists of the following rules:

goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2l_in_ga(A, D))
s2l_in_ga(0, L) → U12_ga(L, eq_in_ag(L, []))
eq_in_ag(X, X) → eq_out_ag(X, X)
U12_ga(L, eq_out_ag(L, [])) → s2l_out_ga(0, L)
s2l_in_ga(X, .(X1, Xs)) → U13_ga(X, X1, Xs, p_in_ga(X, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U13_ga(X, X1, Xs, p_out_ga(X, P)) → U14_ga(X, X1, Xs, s2l_in_ga(P, Xs))
U14_ga(X, X1, Xs, s2l_out_ga(P, Xs)) → s2l_out_ga(X, .(X1, Xs))
U1_gaa(A, B, C, s2l_out_ga(A, D)) → U2_gaa(A, B, C, applast_in_gaa(D, B, C))
applast_in_gaa(L, X, Last) → U3_gaa(L, X, Last, app_in_gga(L, .(X, []), LX))
app_in_gga([], Y, Z) → U8_gga(Y, Z, eq_in_ga(Y, Z))
eq_in_ga(X, X) → eq_out_ga(X, X)
U8_gga(Y, Z, eq_out_ga(Y, Z)) → app_out_gga([], Y, Z)
app_in_gga(X, Y, .(H, Z)) → U9_gga(X, Y, H, Z, head_in_ga(X, H))
head_in_ga([], X2) → head_out_ga([], X2)
head_in_ga(.(X, X3), X) → head_out_ga(.(X, X3), X)
U9_gga(X, Y, H, Z, head_out_ga(X, H)) → U10_gga(X, Y, H, Z, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)
U10_gga(X, Y, H, Z, tail_out_ga(X, T)) → U11_gga(X, Y, H, Z, app_in_gga(T, Y, Z))
U11_gga(X, Y, H, Z, app_out_gga(T, Y, Z)) → app_out_gga(X, Y, .(H, Z))
U3_gaa(L, X, Last, app_out_gga(L, .(X, []), LX)) → U4_gaa(L, X, Last, last_in_ag(Last, LX))
last_in_ag(X, .(X, [])) → U5_ag(X, true_in_)
true_in_true_out_
U5_ag(X, true_out_) → last_out_ag(X, .(X, []))
last_in_ag(X, Y) → U6_ag(X, Y, tail_in_ga(Y, T))
U6_ag(X, Y, tail_out_ga(Y, T)) → U7_ag(X, Y, last_in_ag(X, T))
U7_ag(X, Y, last_out_ag(X, T)) → last_out_ag(X, Y)
U4_gaa(L, X, Last, last_out_ag(Last, LX)) → applast_out_gaa(L, X, Last)
U2_gaa(A, B, C, applast_out_gaa(D, B, C)) → goal_out_gaa(A, B, C)

The argument filtering Pi contains the following mapping:
goal_in_gaa(x1, x2, x3)  =  goal_in_gaa(x1)
U1_gaa(x1, x2, x3, x4)  =  U1_gaa(x1, x4)
s2l_in_ga(x1, x2)  =  s2l_in_ga(x1)
0  =  0
U12_ga(x1, x2)  =  U12_ga(x2)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1, x2)
[]  =  []
s2l_out_ga(x1, x2)  =  s2l_out_ga(x1, x2)
U13_ga(x1, x2, x3, x4)  =  U13_ga(x1, x4)
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x1, x2)
s(x1)  =  s(x1)
U14_ga(x1, x2, x3, x4)  =  U14_ga(x1, x4)
.(x1, x2)  =  .(x2)
U2_gaa(x1, x2, x3, x4)  =  U2_gaa(x1, x4)
applast_in_gaa(x1, x2, x3)  =  applast_in_gaa(x1)
U3_gaa(x1, x2, x3, x4)  =  U3_gaa(x1, x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
U8_gga(x1, x2, x3)  =  U8_gga(x1, x3)
eq_in_ga(x1, x2)  =  eq_in_ga(x1)
eq_out_ga(x1, x2)  =  eq_out_ga(x1, x2)
app_out_gga(x1, x2, x3)  =  app_out_gga(x1, x2, x3)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x5)
head_in_ga(x1, x2)  =  head_in_ga(x1)
head_out_ga(x1, x2)  =  head_out_ga(x1)
U10_gga(x1, x2, x3, x4, x5)  =  U10_gga(x1, x2, x5)
tail_in_ga(x1, x2)  =  tail_in_ga(x1)
tail_out_ga(x1, x2)  =  tail_out_ga(x1, x2)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x1, x2, x5)
U4_gaa(x1, x2, x3, x4)  =  U4_gaa(x1, x4)
last_in_ag(x1, x2)  =  last_in_ag(x2)
U5_ag(x1, x2)  =  U5_ag(x2)
true_in_  =  true_in_
true_out_  =  true_out_
last_out_ag(x1, x2)  =  last_out_ag(x2)
U6_ag(x1, x2, x3)  =  U6_ag(x2, x3)
U7_ag(x1, x2, x3)  =  U7_ag(x2, x3)
applast_out_gaa(x1, x2, x3)  =  applast_out_gaa(x1)
goal_out_gaa(x1, x2, x3)  =  goal_out_gaa(x1)
APP_IN_GGA(x1, x2, x3)  =  APP_IN_GGA(x1, x2)
U9_GGA(x1, x2, x3, x4, x5)  =  U9_GGA(x1, x2, x5)
U10_GGA(x1, x2, x3, x4, x5)  =  U10_GGA(x1, x2, x5)

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

(33) UsableRulesProof (EQUIVALENT transformation)

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

(34) Obligation:

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

APP_IN_GGA(X, Y, .(H, Z)) → U9_GGA(X, Y, H, Z, head_in_ga(X, H))
U9_GGA(X, Y, H, Z, head_out_ga(X, H)) → U10_GGA(X, Y, H, Z, tail_in_ga(X, T))
U10_GGA(X, Y, H, Z, tail_out_ga(X, T)) → APP_IN_GGA(T, Y, Z)

The TRS R consists of the following rules:

head_in_ga([], X2) → head_out_ga([], X2)
head_in_ga(.(X, X3), X) → head_out_ga(.(X, X3), X)
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)

The argument filtering Pi contains the following mapping:
[]  =  []
.(x1, x2)  =  .(x2)
head_in_ga(x1, x2)  =  head_in_ga(x1)
head_out_ga(x1, x2)  =  head_out_ga(x1)
tail_in_ga(x1, x2)  =  tail_in_ga(x1)
tail_out_ga(x1, x2)  =  tail_out_ga(x1, x2)
APP_IN_GGA(x1, x2, x3)  =  APP_IN_GGA(x1, x2)
U9_GGA(x1, x2, x3, x4, x5)  =  U9_GGA(x1, x2, x5)
U10_GGA(x1, x2, x3, x4, x5)  =  U10_GGA(x1, x2, x5)

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

(35) PiDPToQDPProof (SOUND transformation)

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

(36) Obligation:

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

APP_IN_GGA(X, Y) → U9_GGA(X, Y, head_in_ga(X))
U9_GGA(X, Y, head_out_ga(X)) → U10_GGA(X, Y, tail_in_ga(X))
U10_GGA(X, Y, tail_out_ga(X, T)) → APP_IN_GGA(T, Y)

The TRS R consists of the following rules:

head_in_ga([]) → head_out_ga([])
head_in_ga(.(X3)) → head_out_ga(.(X3))
tail_in_ga([]) → tail_out_ga([], [])
tail_in_ga(.(Xs)) → tail_out_ga(.(Xs), Xs)

The set Q consists of the following terms:

head_in_ga(x0)
tail_in_ga(x0)

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

(37) Narrowing (SOUND transformation)

By narrowing [LPAR04] the rule APP_IN_GGA(X, Y) → U9_GGA(X, Y, head_in_ga(X)) at position [2] we obtained the following new rules [LPAR04]:

APP_IN_GGA([], y1) → U9_GGA([], y1, head_out_ga([]))
APP_IN_GGA(.(x0), y1) → U9_GGA(.(x0), y1, head_out_ga(.(x0)))

(38) Obligation:

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

U9_GGA(X, Y, head_out_ga(X)) → U10_GGA(X, Y, tail_in_ga(X))
U10_GGA(X, Y, tail_out_ga(X, T)) → APP_IN_GGA(T, Y)
APP_IN_GGA([], y1) → U9_GGA([], y1, head_out_ga([]))
APP_IN_GGA(.(x0), y1) → U9_GGA(.(x0), y1, head_out_ga(.(x0)))

The TRS R consists of the following rules:

head_in_ga([]) → head_out_ga([])
head_in_ga(.(X3)) → head_out_ga(.(X3))
tail_in_ga([]) → tail_out_ga([], [])
tail_in_ga(.(Xs)) → tail_out_ga(.(Xs), Xs)

The set Q consists of the following terms:

head_in_ga(x0)
tail_in_ga(x0)

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

(39) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(40) Obligation:

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

U9_GGA(X, Y, head_out_ga(X)) → U10_GGA(X, Y, tail_in_ga(X))
U10_GGA(X, Y, tail_out_ga(X, T)) → APP_IN_GGA(T, Y)
APP_IN_GGA([], y1) → U9_GGA([], y1, head_out_ga([]))
APP_IN_GGA(.(x0), y1) → U9_GGA(.(x0), y1, head_out_ga(.(x0)))

The TRS R consists of the following rules:

tail_in_ga([]) → tail_out_ga([], [])
tail_in_ga(.(Xs)) → tail_out_ga(.(Xs), Xs)

The set Q consists of the following terms:

head_in_ga(x0)
tail_in_ga(x0)

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

(41) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

head_in_ga(x0)

(42) Obligation:

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

U9_GGA(X, Y, head_out_ga(X)) → U10_GGA(X, Y, tail_in_ga(X))
U10_GGA(X, Y, tail_out_ga(X, T)) → APP_IN_GGA(T, Y)
APP_IN_GGA([], y1) → U9_GGA([], y1, head_out_ga([]))
APP_IN_GGA(.(x0), y1) → U9_GGA(.(x0), y1, head_out_ga(.(x0)))

The TRS R consists of the following rules:

tail_in_ga([]) → tail_out_ga([], [])
tail_in_ga(.(Xs)) → tail_out_ga(.(Xs), Xs)

The set Q consists of the following terms:

tail_in_ga(x0)

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

(43) Narrowing (SOUND transformation)

By narrowing [LPAR04] the rule U9_GGA(X, Y, head_out_ga(X)) → U10_GGA(X, Y, tail_in_ga(X)) at position [2] we obtained the following new rules [LPAR04]:

U9_GGA([], y1, head_out_ga([])) → U10_GGA([], y1, tail_out_ga([], []))
U9_GGA(.(x0), y1, head_out_ga(.(x0))) → U10_GGA(.(x0), y1, tail_out_ga(.(x0), x0))

(44) Obligation:

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

U10_GGA(X, Y, tail_out_ga(X, T)) → APP_IN_GGA(T, Y)
APP_IN_GGA([], y1) → U9_GGA([], y1, head_out_ga([]))
APP_IN_GGA(.(x0), y1) → U9_GGA(.(x0), y1, head_out_ga(.(x0)))
U9_GGA([], y1, head_out_ga([])) → U10_GGA([], y1, tail_out_ga([], []))
U9_GGA(.(x0), y1, head_out_ga(.(x0))) → U10_GGA(.(x0), y1, tail_out_ga(.(x0), x0))

The TRS R consists of the following rules:

tail_in_ga([]) → tail_out_ga([], [])
tail_in_ga(.(Xs)) → tail_out_ga(.(Xs), Xs)

The set Q consists of the following terms:

tail_in_ga(x0)

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

(45) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(46) Obligation:

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

U10_GGA(X, Y, tail_out_ga(X, T)) → APP_IN_GGA(T, Y)
APP_IN_GGA([], y1) → U9_GGA([], y1, head_out_ga([]))
APP_IN_GGA(.(x0), y1) → U9_GGA(.(x0), y1, head_out_ga(.(x0)))
U9_GGA([], y1, head_out_ga([])) → U10_GGA([], y1, tail_out_ga([], []))
U9_GGA(.(x0), y1, head_out_ga(.(x0))) → U10_GGA(.(x0), y1, tail_out_ga(.(x0), x0))

R is empty.
The set Q consists of the following terms:

tail_in_ga(x0)

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

(47) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

tail_in_ga(x0)

(48) Obligation:

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

U10_GGA(X, Y, tail_out_ga(X, T)) → APP_IN_GGA(T, Y)
APP_IN_GGA([], y1) → U9_GGA([], y1, head_out_ga([]))
APP_IN_GGA(.(x0), y1) → U9_GGA(.(x0), y1, head_out_ga(.(x0)))
U9_GGA([], y1, head_out_ga([])) → U10_GGA([], y1, tail_out_ga([], []))
U9_GGA(.(x0), y1, head_out_ga(.(x0))) → U10_GGA(.(x0), y1, tail_out_ga(.(x0), x0))

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

(49) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule U10_GGA(X, Y, tail_out_ga(X, T)) → APP_IN_GGA(T, Y) we obtained the following new rules [LPAR04]:

U10_GGA([], z0, tail_out_ga([], [])) → APP_IN_GGA([], z0)
U10_GGA(.(z0), z1, tail_out_ga(.(z0), z0)) → APP_IN_GGA(z0, z1)

(50) Obligation:

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

APP_IN_GGA([], y1) → U9_GGA([], y1, head_out_ga([]))
APP_IN_GGA(.(x0), y1) → U9_GGA(.(x0), y1, head_out_ga(.(x0)))
U9_GGA([], y1, head_out_ga([])) → U10_GGA([], y1, tail_out_ga([], []))
U9_GGA(.(x0), y1, head_out_ga(.(x0))) → U10_GGA(.(x0), y1, tail_out_ga(.(x0), x0))
U10_GGA([], z0, tail_out_ga([], [])) → APP_IN_GGA([], z0)
U10_GGA(.(z0), z1, tail_out_ga(.(z0), z0)) → APP_IN_GGA(z0, z1)

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

(51) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 2 SCCs.

(52) Complex Obligation (AND)

(53) Obligation:

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

U9_GGA([], y1, head_out_ga([])) → U10_GGA([], y1, tail_out_ga([], []))
U10_GGA([], z0, tail_out_ga([], [])) → APP_IN_GGA([], z0)
APP_IN_GGA([], y1) → U9_GGA([], y1, head_out_ga([]))

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

(54) NonTerminationProof (EQUIVALENT transformation)

We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

s = U10_GGA([], z0, tail_out_ga([], [])) evaluates to t =U10_GGA([], z0, tail_out_ga([], []))

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




Rewriting sequence

U10_GGA([], z0, tail_out_ga([], []))APP_IN_GGA([], z0)
with rule U10_GGA([], z0', tail_out_ga([], [])) → APP_IN_GGA([], z0') at position [] and matcher [z0' / z0]

APP_IN_GGA([], z0)U9_GGA([], z0, head_out_ga([]))
with rule APP_IN_GGA([], y1') → U9_GGA([], y1', head_out_ga([])) at position [] and matcher [y1' / z0]

U9_GGA([], z0, head_out_ga([]))U10_GGA([], z0, tail_out_ga([], []))
with rule U9_GGA([], y1, head_out_ga([])) → U10_GGA([], y1, tail_out_ga([], []))

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.



(55) FALSE

(56) Obligation:

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

APP_IN_GGA(.(x0), y1) → U9_GGA(.(x0), y1, head_out_ga(.(x0)))
U9_GGA(.(x0), y1, head_out_ga(.(x0))) → U10_GGA(.(x0), y1, tail_out_ga(.(x0), x0))
U10_GGA(.(z0), z1, tail_out_ga(.(z0), z0)) → APP_IN_GGA(z0, z1)

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

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

  • U9_GGA(.(x0), y1, head_out_ga(.(x0))) → U10_GGA(.(x0), y1, tail_out_ga(.(x0), x0))
    The graph contains the following edges 1 >= 1, 3 > 1, 2 >= 2

  • U10_GGA(.(z0), z1, tail_out_ga(.(z0), z0)) → APP_IN_GGA(z0, z1)
    The graph contains the following edges 1 > 1, 3 > 1, 2 >= 2

  • APP_IN_GGA(.(x0), y1) → U9_GGA(.(x0), y1, head_out_ga(.(x0)))
    The graph contains the following edges 1 >= 1, 2 >= 2

(58) TRUE

(59) Obligation:

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

S2L_IN_GA(X, .(X1, Xs)) → U13_GA(X, X1, Xs, p_in_ga(X, P))
U13_GA(X, X1, Xs, p_out_ga(X, P)) → S2L_IN_GA(P, Xs)

The TRS R consists of the following rules:

goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2l_in_ga(A, D))
s2l_in_ga(0, L) → U12_ga(L, eq_in_ag(L, []))
eq_in_ag(X, X) → eq_out_ag(X, X)
U12_ga(L, eq_out_ag(L, [])) → s2l_out_ga(0, L)
s2l_in_ga(X, .(X1, Xs)) → U13_ga(X, X1, Xs, p_in_ga(X, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U13_ga(X, X1, Xs, p_out_ga(X, P)) → U14_ga(X, X1, Xs, s2l_in_ga(P, Xs))
U14_ga(X, X1, Xs, s2l_out_ga(P, Xs)) → s2l_out_ga(X, .(X1, Xs))
U1_gaa(A, B, C, s2l_out_ga(A, D)) → U2_gaa(A, B, C, applast_in_gaa(D, B, C))
applast_in_gaa(L, X, Last) → U3_gaa(L, X, Last, app_in_gga(L, .(X, []), LX))
app_in_gga([], Y, Z) → U8_gga(Y, Z, eq_in_ga(Y, Z))
eq_in_ga(X, X) → eq_out_ga(X, X)
U8_gga(Y, Z, eq_out_ga(Y, Z)) → app_out_gga([], Y, Z)
app_in_gga(X, Y, .(H, Z)) → U9_gga(X, Y, H, Z, head_in_ga(X, H))
head_in_ga([], X2) → head_out_ga([], X2)
head_in_ga(.(X, X3), X) → head_out_ga(.(X, X3), X)
U9_gga(X, Y, H, Z, head_out_ga(X, H)) → U10_gga(X, Y, H, Z, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)
U10_gga(X, Y, H, Z, tail_out_ga(X, T)) → U11_gga(X, Y, H, Z, app_in_gga(T, Y, Z))
U11_gga(X, Y, H, Z, app_out_gga(T, Y, Z)) → app_out_gga(X, Y, .(H, Z))
U3_gaa(L, X, Last, app_out_gga(L, .(X, []), LX)) → U4_gaa(L, X, Last, last_in_ag(Last, LX))
last_in_ag(X, .(X, [])) → U5_ag(X, true_in_)
true_in_true_out_
U5_ag(X, true_out_) → last_out_ag(X, .(X, []))
last_in_ag(X, Y) → U6_ag(X, Y, tail_in_ga(Y, T))
U6_ag(X, Y, tail_out_ga(Y, T)) → U7_ag(X, Y, last_in_ag(X, T))
U7_ag(X, Y, last_out_ag(X, T)) → last_out_ag(X, Y)
U4_gaa(L, X, Last, last_out_ag(Last, LX)) → applast_out_gaa(L, X, Last)
U2_gaa(A, B, C, applast_out_gaa(D, B, C)) → goal_out_gaa(A, B, C)

The argument filtering Pi contains the following mapping:
goal_in_gaa(x1, x2, x3)  =  goal_in_gaa(x1)
U1_gaa(x1, x2, x3, x4)  =  U1_gaa(x1, x4)
s2l_in_ga(x1, x2)  =  s2l_in_ga(x1)
0  =  0
U12_ga(x1, x2)  =  U12_ga(x2)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1, x2)
[]  =  []
s2l_out_ga(x1, x2)  =  s2l_out_ga(x1, x2)
U13_ga(x1, x2, x3, x4)  =  U13_ga(x1, x4)
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x1, x2)
s(x1)  =  s(x1)
U14_ga(x1, x2, x3, x4)  =  U14_ga(x1, x4)
.(x1, x2)  =  .(x2)
U2_gaa(x1, x2, x3, x4)  =  U2_gaa(x1, x4)
applast_in_gaa(x1, x2, x3)  =  applast_in_gaa(x1)
U3_gaa(x1, x2, x3, x4)  =  U3_gaa(x1, x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
U8_gga(x1, x2, x3)  =  U8_gga(x1, x3)
eq_in_ga(x1, x2)  =  eq_in_ga(x1)
eq_out_ga(x1, x2)  =  eq_out_ga(x1, x2)
app_out_gga(x1, x2, x3)  =  app_out_gga(x1, x2, x3)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x5)
head_in_ga(x1, x2)  =  head_in_ga(x1)
head_out_ga(x1, x2)  =  head_out_ga(x1)
U10_gga(x1, x2, x3, x4, x5)  =  U10_gga(x1, x2, x5)
tail_in_ga(x1, x2)  =  tail_in_ga(x1)
tail_out_ga(x1, x2)  =  tail_out_ga(x1, x2)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x1, x2, x5)
U4_gaa(x1, x2, x3, x4)  =  U4_gaa(x1, x4)
last_in_ag(x1, x2)  =  last_in_ag(x2)
U5_ag(x1, x2)  =  U5_ag(x2)
true_in_  =  true_in_
true_out_  =  true_out_
last_out_ag(x1, x2)  =  last_out_ag(x2)
U6_ag(x1, x2, x3)  =  U6_ag(x2, x3)
U7_ag(x1, x2, x3)  =  U7_ag(x2, x3)
applast_out_gaa(x1, x2, x3)  =  applast_out_gaa(x1)
goal_out_gaa(x1, x2, x3)  =  goal_out_gaa(x1)
S2L_IN_GA(x1, x2)  =  S2L_IN_GA(x1)
U13_GA(x1, x2, x3, x4)  =  U13_GA(x1, x4)

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

(60) UsableRulesProof (EQUIVALENT transformation)

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

(61) Obligation:

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

S2L_IN_GA(X, .(X1, Xs)) → U13_GA(X, X1, Xs, p_in_ga(X, P))
U13_GA(X, X1, Xs, p_out_ga(X, P)) → S2L_IN_GA(P, Xs)

The TRS R consists of the following rules:

p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)

The argument filtering Pi contains the following mapping:
0  =  0
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x1, x2)
s(x1)  =  s(x1)
.(x1, x2)  =  .(x2)
S2L_IN_GA(x1, x2)  =  S2L_IN_GA(x1)
U13_GA(x1, x2, x3, x4)  =  U13_GA(x1, x4)

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

(62) PiDPToQDPProof (SOUND transformation)

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

(63) Obligation:

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

S2L_IN_GA(X) → U13_GA(X, p_in_ga(X))
U13_GA(X, p_out_ga(X, P)) → S2L_IN_GA(P)

The TRS R consists of the following rules:

p_in_ga(0) → p_out_ga(0, 0)
p_in_ga(s(X)) → p_out_ga(s(X), X)

The set Q consists of the following terms:

p_in_ga(x0)

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

(64) Narrowing (SOUND transformation)

By narrowing [LPAR04] the rule S2L_IN_GA(X) → U13_GA(X, p_in_ga(X)) at position [1] we obtained the following new rules [LPAR04]:

S2L_IN_GA(0) → U13_GA(0, p_out_ga(0, 0))
S2L_IN_GA(s(x0)) → U13_GA(s(x0), p_out_ga(s(x0), x0))

(65) Obligation:

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

U13_GA(X, p_out_ga(X, P)) → S2L_IN_GA(P)
S2L_IN_GA(0) → U13_GA(0, p_out_ga(0, 0))
S2L_IN_GA(s(x0)) → U13_GA(s(x0), p_out_ga(s(x0), x0))

The TRS R consists of the following rules:

p_in_ga(0) → p_out_ga(0, 0)
p_in_ga(s(X)) → p_out_ga(s(X), X)

The set Q consists of the following terms:

p_in_ga(x0)

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

(66) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(67) Obligation:

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

U13_GA(X, p_out_ga(X, P)) → S2L_IN_GA(P)
S2L_IN_GA(0) → U13_GA(0, p_out_ga(0, 0))
S2L_IN_GA(s(x0)) → U13_GA(s(x0), p_out_ga(s(x0), x0))

R is empty.
The set Q consists of the following terms:

p_in_ga(x0)

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

(68) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

p_in_ga(x0)

(69) Obligation:

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

U13_GA(X, p_out_ga(X, P)) → S2L_IN_GA(P)
S2L_IN_GA(0) → U13_GA(0, p_out_ga(0, 0))
S2L_IN_GA(s(x0)) → U13_GA(s(x0), p_out_ga(s(x0), x0))

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

(70) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule U13_GA(X, p_out_ga(X, P)) → S2L_IN_GA(P) we obtained the following new rules [LPAR04]:

U13_GA(0, p_out_ga(0, 0)) → S2L_IN_GA(0)
U13_GA(s(z0), p_out_ga(s(z0), z0)) → S2L_IN_GA(z0)

(71) Obligation:

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

S2L_IN_GA(0) → U13_GA(0, p_out_ga(0, 0))
S2L_IN_GA(s(x0)) → U13_GA(s(x0), p_out_ga(s(x0), x0))
U13_GA(0, p_out_ga(0, 0)) → S2L_IN_GA(0)
U13_GA(s(z0), p_out_ga(s(z0), z0)) → S2L_IN_GA(z0)

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

(72) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 2 SCCs.

(73) Complex Obligation (AND)

(74) Obligation:

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

U13_GA(0, p_out_ga(0, 0)) → S2L_IN_GA(0)
S2L_IN_GA(0) → U13_GA(0, p_out_ga(0, 0))

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

(75) NonTerminationProof (EQUIVALENT transformation)

We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

s = S2L_IN_GA(0) evaluates to t =S2L_IN_GA(0)

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




Rewriting sequence

S2L_IN_GA(0)U13_GA(0, p_out_ga(0, 0))
with rule S2L_IN_GA(0) → U13_GA(0, p_out_ga(0, 0)) at position [] and matcher [ ]

U13_GA(0, p_out_ga(0, 0))S2L_IN_GA(0)
with rule U13_GA(0, p_out_ga(0, 0)) → S2L_IN_GA(0)

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.



(76) FALSE

(77) Obligation:

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

S2L_IN_GA(s(x0)) → U13_GA(s(x0), p_out_ga(s(x0), x0))
U13_GA(s(z0), p_out_ga(s(z0), z0)) → S2L_IN_GA(z0)

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

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

  • U13_GA(s(z0), p_out_ga(s(z0), z0)) → S2L_IN_GA(z0)
    The graph contains the following edges 1 > 1, 2 > 1

  • S2L_IN_GA(s(x0)) → U13_GA(s(x0), p_out_ga(s(x0), x0))
    The graph contains the following edges 1 >= 1

(79) TRUE

(80) PrologToPiTRSProof (SOUND transformation)

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

goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2l_in_ga(A, D))
s2l_in_ga(0, L) → U12_ga(L, eq_in_ag(L, []))
eq_in_ag(X, X) → eq_out_ag(X, X)
U12_ga(L, eq_out_ag(L, [])) → s2l_out_ga(0, L)
s2l_in_ga(X, .(X1, Xs)) → U13_ga(X, X1, Xs, p_in_ga(X, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U13_ga(X, X1, Xs, p_out_ga(X, P)) → U14_ga(X, X1, Xs, s2l_in_ga(P, Xs))
U14_ga(X, X1, Xs, s2l_out_ga(P, Xs)) → s2l_out_ga(X, .(X1, Xs))
U1_gaa(A, B, C, s2l_out_ga(A, D)) → U2_gaa(A, B, C, applast_in_gaa(D, B, C))
applast_in_gaa(L, X, Last) → U3_gaa(L, X, Last, app_in_gga(L, .(X, []), LX))
app_in_gga([], Y, Z) → U8_gga(Y, Z, eq_in_ga(Y, Z))
eq_in_ga(X, X) → eq_out_ga(X, X)
U8_gga(Y, Z, eq_out_ga(Y, Z)) → app_out_gga([], Y, Z)
app_in_gga(X, Y, .(H, Z)) → U9_gga(X, Y, H, Z, head_in_ga(X, H))
head_in_ga([], X2) → head_out_ga([], X2)
head_in_ga(.(X, X3), X) → head_out_ga(.(X, X3), X)
U9_gga(X, Y, H, Z, head_out_ga(X, H)) → U10_gga(X, Y, H, Z, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)
U10_gga(X, Y, H, Z, tail_out_ga(X, T)) → U11_gga(X, Y, H, Z, app_in_gga(T, Y, Z))
U11_gga(X, Y, H, Z, app_out_gga(T, Y, Z)) → app_out_gga(X, Y, .(H, Z))
U3_gaa(L, X, Last, app_out_gga(L, .(X, []), LX)) → U4_gaa(L, X, Last, last_in_ag(Last, LX))
last_in_ag(X, .(X, [])) → U5_ag(X, true_in_)
true_in_true_out_
U5_ag(X, true_out_) → last_out_ag(X, .(X, []))
last_in_ag(X, Y) → U6_ag(X, Y, tail_in_ga(Y, T))
U6_ag(X, Y, tail_out_ga(Y, T)) → U7_ag(X, Y, last_in_ag(X, T))
U7_ag(X, Y, last_out_ag(X, T)) → last_out_ag(X, Y)
U4_gaa(L, X, Last, last_out_ag(Last, LX)) → applast_out_gaa(L, X, Last)
U2_gaa(A, B, C, applast_out_gaa(D, B, C)) → goal_out_gaa(A, B, C)

The argument filtering Pi contains the following mapping:
goal_in_gaa(x1, x2, x3)  =  goal_in_gaa(x1)
U1_gaa(x1, x2, x3, x4)  =  U1_gaa(x4)
s2l_in_ga(x1, x2)  =  s2l_in_ga(x1)
0  =  0
U12_ga(x1, x2)  =  U12_ga(x2)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1)
[]  =  []
s2l_out_ga(x1, x2)  =  s2l_out_ga(x2)
U13_ga(x1, x2, x3, x4)  =  U13_ga(x4)
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x2)
s(x1)  =  s(x1)
U14_ga(x1, x2, x3, x4)  =  U14_ga(x4)
.(x1, x2)  =  .(x2)
U2_gaa(x1, x2, x3, x4)  =  U2_gaa(x4)
applast_in_gaa(x1, x2, x3)  =  applast_in_gaa(x1)
U3_gaa(x1, x2, x3, x4)  =  U3_gaa(x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
U8_gga(x1, x2, x3)  =  U8_gga(x3)
eq_in_ga(x1, x2)  =  eq_in_ga(x1)
eq_out_ga(x1, x2)  =  eq_out_ga(x2)
app_out_gga(x1, x2, x3)  =  app_out_gga(x3)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x5)
head_in_ga(x1, x2)  =  head_in_ga(x1)
head_out_ga(x1, x2)  =  head_out_ga
U10_gga(x1, x2, x3, x4, x5)  =  U10_gga(x2, x5)
tail_in_ga(x1, x2)  =  tail_in_ga(x1)
tail_out_ga(x1, x2)  =  tail_out_ga(x2)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x5)
U4_gaa(x1, x2, x3, x4)  =  U4_gaa(x4)
last_in_ag(x1, x2)  =  last_in_ag(x2)
U5_ag(x1, x2)  =  U5_ag(x2)
true_in_  =  true_in_
true_out_  =  true_out_
last_out_ag(x1, x2)  =  last_out_ag
U6_ag(x1, x2, x3)  =  U6_ag(x3)
U7_ag(x1, x2, x3)  =  U7_ag(x3)
applast_out_gaa(x1, x2, x3)  =  applast_out_gaa
goal_out_gaa(x1, x2, x3)  =  goal_out_gaa

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(81) Obligation:

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

goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2l_in_ga(A, D))
s2l_in_ga(0, L) → U12_ga(L, eq_in_ag(L, []))
eq_in_ag(X, X) → eq_out_ag(X, X)
U12_ga(L, eq_out_ag(L, [])) → s2l_out_ga(0, L)
s2l_in_ga(X, .(X1, Xs)) → U13_ga(X, X1, Xs, p_in_ga(X, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U13_ga(X, X1, Xs, p_out_ga(X, P)) → U14_ga(X, X1, Xs, s2l_in_ga(P, Xs))
U14_ga(X, X1, Xs, s2l_out_ga(P, Xs)) → s2l_out_ga(X, .(X1, Xs))
U1_gaa(A, B, C, s2l_out_ga(A, D)) → U2_gaa(A, B, C, applast_in_gaa(D, B, C))
applast_in_gaa(L, X, Last) → U3_gaa(L, X, Last, app_in_gga(L, .(X, []), LX))
app_in_gga([], Y, Z) → U8_gga(Y, Z, eq_in_ga(Y, Z))
eq_in_ga(X, X) → eq_out_ga(X, X)
U8_gga(Y, Z, eq_out_ga(Y, Z)) → app_out_gga([], Y, Z)
app_in_gga(X, Y, .(H, Z)) → U9_gga(X, Y, H, Z, head_in_ga(X, H))
head_in_ga([], X2) → head_out_ga([], X2)
head_in_ga(.(X, X3), X) → head_out_ga(.(X, X3), X)
U9_gga(X, Y, H, Z, head_out_ga(X, H)) → U10_gga(X, Y, H, Z, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)
U10_gga(X, Y, H, Z, tail_out_ga(X, T)) → U11_gga(X, Y, H, Z, app_in_gga(T, Y, Z))
U11_gga(X, Y, H, Z, app_out_gga(T, Y, Z)) → app_out_gga(X, Y, .(H, Z))
U3_gaa(L, X, Last, app_out_gga(L, .(X, []), LX)) → U4_gaa(L, X, Last, last_in_ag(Last, LX))
last_in_ag(X, .(X, [])) → U5_ag(X, true_in_)
true_in_true_out_
U5_ag(X, true_out_) → last_out_ag(X, .(X, []))
last_in_ag(X, Y) → U6_ag(X, Y, tail_in_ga(Y, T))
U6_ag(X, Y, tail_out_ga(Y, T)) → U7_ag(X, Y, last_in_ag(X, T))
U7_ag(X, Y, last_out_ag(X, T)) → last_out_ag(X, Y)
U4_gaa(L, X, Last, last_out_ag(Last, LX)) → applast_out_gaa(L, X, Last)
U2_gaa(A, B, C, applast_out_gaa(D, B, C)) → goal_out_gaa(A, B, C)

The argument filtering Pi contains the following mapping:
goal_in_gaa(x1, x2, x3)  =  goal_in_gaa(x1)
U1_gaa(x1, x2, x3, x4)  =  U1_gaa(x4)
s2l_in_ga(x1, x2)  =  s2l_in_ga(x1)
0  =  0
U12_ga(x1, x2)  =  U12_ga(x2)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1)
[]  =  []
s2l_out_ga(x1, x2)  =  s2l_out_ga(x2)
U13_ga(x1, x2, x3, x4)  =  U13_ga(x4)
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x2)
s(x1)  =  s(x1)
U14_ga(x1, x2, x3, x4)  =  U14_ga(x4)
.(x1, x2)  =  .(x2)
U2_gaa(x1, x2, x3, x4)  =  U2_gaa(x4)
applast_in_gaa(x1, x2, x3)  =  applast_in_gaa(x1)
U3_gaa(x1, x2, x3, x4)  =  U3_gaa(x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
U8_gga(x1, x2, x3)  =  U8_gga(x3)
eq_in_ga(x1, x2)  =  eq_in_ga(x1)
eq_out_ga(x1, x2)  =  eq_out_ga(x2)
app_out_gga(x1, x2, x3)  =  app_out_gga(x3)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x5)
head_in_ga(x1, x2)  =  head_in_ga(x1)
head_out_ga(x1, x2)  =  head_out_ga
U10_gga(x1, x2, x3, x4, x5)  =  U10_gga(x2, x5)
tail_in_ga(x1, x2)  =  tail_in_ga(x1)
tail_out_ga(x1, x2)  =  tail_out_ga(x2)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x5)
U4_gaa(x1, x2, x3, x4)  =  U4_gaa(x4)
last_in_ag(x1, x2)  =  last_in_ag(x2)
U5_ag(x1, x2)  =  U5_ag(x2)
true_in_  =  true_in_
true_out_  =  true_out_
last_out_ag(x1, x2)  =  last_out_ag
U6_ag(x1, x2, x3)  =  U6_ag(x3)
U7_ag(x1, x2, x3)  =  U7_ag(x3)
applast_out_gaa(x1, x2, x3)  =  applast_out_gaa
goal_out_gaa(x1, x2, x3)  =  goal_out_gaa

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

GOAL_IN_GAA(A, B, C) → U1_GAA(A, B, C, s2l_in_ga(A, D))
GOAL_IN_GAA(A, B, C) → S2L_IN_GA(A, D)
S2L_IN_GA(0, L) → U12_GA(L, eq_in_ag(L, []))
S2L_IN_GA(0, L) → EQ_IN_AG(L, [])
S2L_IN_GA(X, .(X1, Xs)) → U13_GA(X, X1, Xs, p_in_ga(X, P))
S2L_IN_GA(X, .(X1, Xs)) → P_IN_GA(X, P)
U13_GA(X, X1, Xs, p_out_ga(X, P)) → U14_GA(X, X1, Xs, s2l_in_ga(P, Xs))
U13_GA(X, X1, Xs, p_out_ga(X, P)) → S2L_IN_GA(P, Xs)
U1_GAA(A, B, C, s2l_out_ga(A, D)) → U2_GAA(A, B, C, applast_in_gaa(D, B, C))
U1_GAA(A, B, C, s2l_out_ga(A, D)) → APPLAST_IN_GAA(D, B, C)
APPLAST_IN_GAA(L, X, Last) → U3_GAA(L, X, Last, app_in_gga(L, .(X, []), LX))
APPLAST_IN_GAA(L, X, Last) → APP_IN_GGA(L, .(X, []), LX)
APP_IN_GGA([], Y, Z) → U8_GGA(Y, Z, eq_in_ga(Y, Z))
APP_IN_GGA([], Y, Z) → EQ_IN_GA(Y, Z)
APP_IN_GGA(X, Y, .(H, Z)) → U9_GGA(X, Y, H, Z, head_in_ga(X, H))
APP_IN_GGA(X, Y, .(H, Z)) → HEAD_IN_GA(X, H)
U9_GGA(X, Y, H, Z, head_out_ga(X, H)) → U10_GGA(X, Y, H, Z, tail_in_ga(X, T))
U9_GGA(X, Y, H, Z, head_out_ga(X, H)) → TAIL_IN_GA(X, T)
U10_GGA(X, Y, H, Z, tail_out_ga(X, T)) → U11_GGA(X, Y, H, Z, app_in_gga(T, Y, Z))
U10_GGA(X, Y, H, Z, tail_out_ga(X, T)) → APP_IN_GGA(T, Y, Z)
U3_GAA(L, X, Last, app_out_gga(L, .(X, []), LX)) → U4_GAA(L, X, Last, last_in_ag(Last, LX))
U3_GAA(L, X, Last, app_out_gga(L, .(X, []), LX)) → LAST_IN_AG(Last, LX)
LAST_IN_AG(X, .(X, [])) → U5_AG(X, true_in_)
LAST_IN_AG(X, .(X, [])) → TRUE_IN_
LAST_IN_AG(X, Y) → U6_AG(X, Y, tail_in_ga(Y, T))
LAST_IN_AG(X, Y) → TAIL_IN_GA(Y, T)
U6_AG(X, Y, tail_out_ga(Y, T)) → U7_AG(X, Y, last_in_ag(X, T))
U6_AG(X, Y, tail_out_ga(Y, T)) → LAST_IN_AG(X, T)

The TRS R consists of the following rules:

goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2l_in_ga(A, D))
s2l_in_ga(0, L) → U12_ga(L, eq_in_ag(L, []))
eq_in_ag(X, X) → eq_out_ag(X, X)
U12_ga(L, eq_out_ag(L, [])) → s2l_out_ga(0, L)
s2l_in_ga(X, .(X1, Xs)) → U13_ga(X, X1, Xs, p_in_ga(X, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U13_ga(X, X1, Xs, p_out_ga(X, P)) → U14_ga(X, X1, Xs, s2l_in_ga(P, Xs))
U14_ga(X, X1, Xs, s2l_out_ga(P, Xs)) → s2l_out_ga(X, .(X1, Xs))
U1_gaa(A, B, C, s2l_out_ga(A, D)) → U2_gaa(A, B, C, applast_in_gaa(D, B, C))
applast_in_gaa(L, X, Last) → U3_gaa(L, X, Last, app_in_gga(L, .(X, []), LX))
app_in_gga([], Y, Z) → U8_gga(Y, Z, eq_in_ga(Y, Z))
eq_in_ga(X, X) → eq_out_ga(X, X)
U8_gga(Y, Z, eq_out_ga(Y, Z)) → app_out_gga([], Y, Z)
app_in_gga(X, Y, .(H, Z)) → U9_gga(X, Y, H, Z, head_in_ga(X, H))
head_in_ga([], X2) → head_out_ga([], X2)
head_in_ga(.(X, X3), X) → head_out_ga(.(X, X3), X)
U9_gga(X, Y, H, Z, head_out_ga(X, H)) → U10_gga(X, Y, H, Z, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)
U10_gga(X, Y, H, Z, tail_out_ga(X, T)) → U11_gga(X, Y, H, Z, app_in_gga(T, Y, Z))
U11_gga(X, Y, H, Z, app_out_gga(T, Y, Z)) → app_out_gga(X, Y, .(H, Z))
U3_gaa(L, X, Last, app_out_gga(L, .(X, []), LX)) → U4_gaa(L, X, Last, last_in_ag(Last, LX))
last_in_ag(X, .(X, [])) → U5_ag(X, true_in_)
true_in_true_out_
U5_ag(X, true_out_) → last_out_ag(X, .(X, []))
last_in_ag(X, Y) → U6_ag(X, Y, tail_in_ga(Y, T))
U6_ag(X, Y, tail_out_ga(Y, T)) → U7_ag(X, Y, last_in_ag(X, T))
U7_ag(X, Y, last_out_ag(X, T)) → last_out_ag(X, Y)
U4_gaa(L, X, Last, last_out_ag(Last, LX)) → applast_out_gaa(L, X, Last)
U2_gaa(A, B, C, applast_out_gaa(D, B, C)) → goal_out_gaa(A, B, C)

The argument filtering Pi contains the following mapping:
goal_in_gaa(x1, x2, x3)  =  goal_in_gaa(x1)
U1_gaa(x1, x2, x3, x4)  =  U1_gaa(x4)
s2l_in_ga(x1, x2)  =  s2l_in_ga(x1)
0  =  0
U12_ga(x1, x2)  =  U12_ga(x2)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1)
[]  =  []
s2l_out_ga(x1, x2)  =  s2l_out_ga(x2)
U13_ga(x1, x2, x3, x4)  =  U13_ga(x4)
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x2)
s(x1)  =  s(x1)
U14_ga(x1, x2, x3, x4)  =  U14_ga(x4)
.(x1, x2)  =  .(x2)
U2_gaa(x1, x2, x3, x4)  =  U2_gaa(x4)
applast_in_gaa(x1, x2, x3)  =  applast_in_gaa(x1)
U3_gaa(x1, x2, x3, x4)  =  U3_gaa(x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
U8_gga(x1, x2, x3)  =  U8_gga(x3)
eq_in_ga(x1, x2)  =  eq_in_ga(x1)
eq_out_ga(x1, x2)  =  eq_out_ga(x2)
app_out_gga(x1, x2, x3)  =  app_out_gga(x3)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x5)
head_in_ga(x1, x2)  =  head_in_ga(x1)
head_out_ga(x1, x2)  =  head_out_ga
U10_gga(x1, x2, x3, x4, x5)  =  U10_gga(x2, x5)
tail_in_ga(x1, x2)  =  tail_in_ga(x1)
tail_out_ga(x1, x2)  =  tail_out_ga(x2)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x5)
U4_gaa(x1, x2, x3, x4)  =  U4_gaa(x4)
last_in_ag(x1, x2)  =  last_in_ag(x2)
U5_ag(x1, x2)  =  U5_ag(x2)
true_in_  =  true_in_
true_out_  =  true_out_
last_out_ag(x1, x2)  =  last_out_ag
U6_ag(x1, x2, x3)  =  U6_ag(x3)
U7_ag(x1, x2, x3)  =  U7_ag(x3)
applast_out_gaa(x1, x2, x3)  =  applast_out_gaa
goal_out_gaa(x1, x2, x3)  =  goal_out_gaa
GOAL_IN_GAA(x1, x2, x3)  =  GOAL_IN_GAA(x1)
U1_GAA(x1, x2, x3, x4)  =  U1_GAA(x4)
S2L_IN_GA(x1, x2)  =  S2L_IN_GA(x1)
U12_GA(x1, x2)  =  U12_GA(x2)
EQ_IN_AG(x1, x2)  =  EQ_IN_AG(x2)
U13_GA(x1, x2, x3, x4)  =  U13_GA(x4)
P_IN_GA(x1, x2)  =  P_IN_GA(x1)
U14_GA(x1, x2, x3, x4)  =  U14_GA(x4)
U2_GAA(x1, x2, x3, x4)  =  U2_GAA(x4)
APPLAST_IN_GAA(x1, x2, x3)  =  APPLAST_IN_GAA(x1)
U3_GAA(x1, x2, x3, x4)  =  U3_GAA(x4)
APP_IN_GGA(x1, x2, x3)  =  APP_IN_GGA(x1, x2)
U8_GGA(x1, x2, x3)  =  U8_GGA(x3)
EQ_IN_GA(x1, x2)  =  EQ_IN_GA(x1)
U9_GGA(x1, x2, x3, x4, x5)  =  U9_GGA(x1, x2, x5)
HEAD_IN_GA(x1, x2)  =  HEAD_IN_GA(x1)
U10_GGA(x1, x2, x3, x4, x5)  =  U10_GGA(x2, x5)
TAIL_IN_GA(x1, x2)  =  TAIL_IN_GA(x1)
U11_GGA(x1, x2, x3, x4, x5)  =  U11_GGA(x5)
U4_GAA(x1, x2, x3, x4)  =  U4_GAA(x4)
LAST_IN_AG(x1, x2)  =  LAST_IN_AG(x2)
U5_AG(x1, x2)  =  U5_AG(x2)
TRUE_IN_  =  TRUE_IN_
U6_AG(x1, x2, x3)  =  U6_AG(x3)
U7_AG(x1, x2, x3)  =  U7_AG(x3)

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

(83) Obligation:

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

GOAL_IN_GAA(A, B, C) → U1_GAA(A, B, C, s2l_in_ga(A, D))
GOAL_IN_GAA(A, B, C) → S2L_IN_GA(A, D)
S2L_IN_GA(0, L) → U12_GA(L, eq_in_ag(L, []))
S2L_IN_GA(0, L) → EQ_IN_AG(L, [])
S2L_IN_GA(X, .(X1, Xs)) → U13_GA(X, X1, Xs, p_in_ga(X, P))
S2L_IN_GA(X, .(X1, Xs)) → P_IN_GA(X, P)
U13_GA(X, X1, Xs, p_out_ga(X, P)) → U14_GA(X, X1, Xs, s2l_in_ga(P, Xs))
U13_GA(X, X1, Xs, p_out_ga(X, P)) → S2L_IN_GA(P, Xs)
U1_GAA(A, B, C, s2l_out_ga(A, D)) → U2_GAA(A, B, C, applast_in_gaa(D, B, C))
U1_GAA(A, B, C, s2l_out_ga(A, D)) → APPLAST_IN_GAA(D, B, C)
APPLAST_IN_GAA(L, X, Last) → U3_GAA(L, X, Last, app_in_gga(L, .(X, []), LX))
APPLAST_IN_GAA(L, X, Last) → APP_IN_GGA(L, .(X, []), LX)
APP_IN_GGA([], Y, Z) → U8_GGA(Y, Z, eq_in_ga(Y, Z))
APP_IN_GGA([], Y, Z) → EQ_IN_GA(Y, Z)
APP_IN_GGA(X, Y, .(H, Z)) → U9_GGA(X, Y, H, Z, head_in_ga(X, H))
APP_IN_GGA(X, Y, .(H, Z)) → HEAD_IN_GA(X, H)
U9_GGA(X, Y, H, Z, head_out_ga(X, H)) → U10_GGA(X, Y, H, Z, tail_in_ga(X, T))
U9_GGA(X, Y, H, Z, head_out_ga(X, H)) → TAIL_IN_GA(X, T)
U10_GGA(X, Y, H, Z, tail_out_ga(X, T)) → U11_GGA(X, Y, H, Z, app_in_gga(T, Y, Z))
U10_GGA(X, Y, H, Z, tail_out_ga(X, T)) → APP_IN_GGA(T, Y, Z)
U3_GAA(L, X, Last, app_out_gga(L, .(X, []), LX)) → U4_GAA(L, X, Last, last_in_ag(Last, LX))
U3_GAA(L, X, Last, app_out_gga(L, .(X, []), LX)) → LAST_IN_AG(Last, LX)
LAST_IN_AG(X, .(X, [])) → U5_AG(X, true_in_)
LAST_IN_AG(X, .(X, [])) → TRUE_IN_
LAST_IN_AG(X, Y) → U6_AG(X, Y, tail_in_ga(Y, T))
LAST_IN_AG(X, Y) → TAIL_IN_GA(Y, T)
U6_AG(X, Y, tail_out_ga(Y, T)) → U7_AG(X, Y, last_in_ag(X, T))
U6_AG(X, Y, tail_out_ga(Y, T)) → LAST_IN_AG(X, T)

The TRS R consists of the following rules:

goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2l_in_ga(A, D))
s2l_in_ga(0, L) → U12_ga(L, eq_in_ag(L, []))
eq_in_ag(X, X) → eq_out_ag(X, X)
U12_ga(L, eq_out_ag(L, [])) → s2l_out_ga(0, L)
s2l_in_ga(X, .(X1, Xs)) → U13_ga(X, X1, Xs, p_in_ga(X, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U13_ga(X, X1, Xs, p_out_ga(X, P)) → U14_ga(X, X1, Xs, s2l_in_ga(P, Xs))
U14_ga(X, X1, Xs, s2l_out_ga(P, Xs)) → s2l_out_ga(X, .(X1, Xs))
U1_gaa(A, B, C, s2l_out_ga(A, D)) → U2_gaa(A, B, C, applast_in_gaa(D, B, C))
applast_in_gaa(L, X, Last) → U3_gaa(L, X, Last, app_in_gga(L, .(X, []), LX))
app_in_gga([], Y, Z) → U8_gga(Y, Z, eq_in_ga(Y, Z))
eq_in_ga(X, X) → eq_out_ga(X, X)
U8_gga(Y, Z, eq_out_ga(Y, Z)) → app_out_gga([], Y, Z)
app_in_gga(X, Y, .(H, Z)) → U9_gga(X, Y, H, Z, head_in_ga(X, H))
head_in_ga([], X2) → head_out_ga([], X2)
head_in_ga(.(X, X3), X) → head_out_ga(.(X, X3), X)
U9_gga(X, Y, H, Z, head_out_ga(X, H)) → U10_gga(X, Y, H, Z, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)
U10_gga(X, Y, H, Z, tail_out_ga(X, T)) → U11_gga(X, Y, H, Z, app_in_gga(T, Y, Z))
U11_gga(X, Y, H, Z, app_out_gga(T, Y, Z)) → app_out_gga(X, Y, .(H, Z))
U3_gaa(L, X, Last, app_out_gga(L, .(X, []), LX)) → U4_gaa(L, X, Last, last_in_ag(Last, LX))
last_in_ag(X, .(X, [])) → U5_ag(X, true_in_)
true_in_true_out_
U5_ag(X, true_out_) → last_out_ag(X, .(X, []))
last_in_ag(X, Y) → U6_ag(X, Y, tail_in_ga(Y, T))
U6_ag(X, Y, tail_out_ga(Y, T)) → U7_ag(X, Y, last_in_ag(X, T))
U7_ag(X, Y, last_out_ag(X, T)) → last_out_ag(X, Y)
U4_gaa(L, X, Last, last_out_ag(Last, LX)) → applast_out_gaa(L, X, Last)
U2_gaa(A, B, C, applast_out_gaa(D, B, C)) → goal_out_gaa(A, B, C)

The argument filtering Pi contains the following mapping:
goal_in_gaa(x1, x2, x3)  =  goal_in_gaa(x1)
U1_gaa(x1, x2, x3, x4)  =  U1_gaa(x4)
s2l_in_ga(x1, x2)  =  s2l_in_ga(x1)
0  =  0
U12_ga(x1, x2)  =  U12_ga(x2)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1)
[]  =  []
s2l_out_ga(x1, x2)  =  s2l_out_ga(x2)
U13_ga(x1, x2, x3, x4)  =  U13_ga(x4)
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x2)
s(x1)  =  s(x1)
U14_ga(x1, x2, x3, x4)  =  U14_ga(x4)
.(x1, x2)  =  .(x2)
U2_gaa(x1, x2, x3, x4)  =  U2_gaa(x4)
applast_in_gaa(x1, x2, x3)  =  applast_in_gaa(x1)
U3_gaa(x1, x2, x3, x4)  =  U3_gaa(x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
U8_gga(x1, x2, x3)  =  U8_gga(x3)
eq_in_ga(x1, x2)  =  eq_in_ga(x1)
eq_out_ga(x1, x2)  =  eq_out_ga(x2)
app_out_gga(x1, x2, x3)  =  app_out_gga(x3)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x5)
head_in_ga(x1, x2)  =  head_in_ga(x1)
head_out_ga(x1, x2)  =  head_out_ga
U10_gga(x1, x2, x3, x4, x5)  =  U10_gga(x2, x5)
tail_in_ga(x1, x2)  =  tail_in_ga(x1)
tail_out_ga(x1, x2)  =  tail_out_ga(x2)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x5)
U4_gaa(x1, x2, x3, x4)  =  U4_gaa(x4)
last_in_ag(x1, x2)  =  last_in_ag(x2)
U5_ag(x1, x2)  =  U5_ag(x2)
true_in_  =  true_in_
true_out_  =  true_out_
last_out_ag(x1, x2)  =  last_out_ag
U6_ag(x1, x2, x3)  =  U6_ag(x3)
U7_ag(x1, x2, x3)  =  U7_ag(x3)
applast_out_gaa(x1, x2, x3)  =  applast_out_gaa
goal_out_gaa(x1, x2, x3)  =  goal_out_gaa
GOAL_IN_GAA(x1, x2, x3)  =  GOAL_IN_GAA(x1)
U1_GAA(x1, x2, x3, x4)  =  U1_GAA(x4)
S2L_IN_GA(x1, x2)  =  S2L_IN_GA(x1)
U12_GA(x1, x2)  =  U12_GA(x2)
EQ_IN_AG(x1, x2)  =  EQ_IN_AG(x2)
U13_GA(x1, x2, x3, x4)  =  U13_GA(x4)
P_IN_GA(x1, x2)  =  P_IN_GA(x1)
U14_GA(x1, x2, x3, x4)  =  U14_GA(x4)
U2_GAA(x1, x2, x3, x4)  =  U2_GAA(x4)
APPLAST_IN_GAA(x1, x2, x3)  =  APPLAST_IN_GAA(x1)
U3_GAA(x1, x2, x3, x4)  =  U3_GAA(x4)
APP_IN_GGA(x1, x2, x3)  =  APP_IN_GGA(x1, x2)
U8_GGA(x1, x2, x3)  =  U8_GGA(x3)
EQ_IN_GA(x1, x2)  =  EQ_IN_GA(x1)
U9_GGA(x1, x2, x3, x4, x5)  =  U9_GGA(x1, x2, x5)
HEAD_IN_GA(x1, x2)  =  HEAD_IN_GA(x1)
U10_GGA(x1, x2, x3, x4, x5)  =  U10_GGA(x2, x5)
TAIL_IN_GA(x1, x2)  =  TAIL_IN_GA(x1)
U11_GGA(x1, x2, x3, x4, x5)  =  U11_GGA(x5)
U4_GAA(x1, x2, x3, x4)  =  U4_GAA(x4)
LAST_IN_AG(x1, x2)  =  LAST_IN_AG(x2)
U5_AG(x1, x2)  =  U5_AG(x2)
TRUE_IN_  =  TRUE_IN_
U6_AG(x1, x2, x3)  =  U6_AG(x3)
U7_AG(x1, x2, x3)  =  U7_AG(x3)

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

(84) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 3 SCCs with 21 less nodes.

(85) Complex Obligation (AND)

(86) Obligation:

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

LAST_IN_AG(X, Y) → U6_AG(X, Y, tail_in_ga(Y, T))
U6_AG(X, Y, tail_out_ga(Y, T)) → LAST_IN_AG(X, T)

The TRS R consists of the following rules:

goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2l_in_ga(A, D))
s2l_in_ga(0, L) → U12_ga(L, eq_in_ag(L, []))
eq_in_ag(X, X) → eq_out_ag(X, X)
U12_ga(L, eq_out_ag(L, [])) → s2l_out_ga(0, L)
s2l_in_ga(X, .(X1, Xs)) → U13_ga(X, X1, Xs, p_in_ga(X, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U13_ga(X, X1, Xs, p_out_ga(X, P)) → U14_ga(X, X1, Xs, s2l_in_ga(P, Xs))
U14_ga(X, X1, Xs, s2l_out_ga(P, Xs)) → s2l_out_ga(X, .(X1, Xs))
U1_gaa(A, B, C, s2l_out_ga(A, D)) → U2_gaa(A, B, C, applast_in_gaa(D, B, C))
applast_in_gaa(L, X, Last) → U3_gaa(L, X, Last, app_in_gga(L, .(X, []), LX))
app_in_gga([], Y, Z) → U8_gga(Y, Z, eq_in_ga(Y, Z))
eq_in_ga(X, X) → eq_out_ga(X, X)
U8_gga(Y, Z, eq_out_ga(Y, Z)) → app_out_gga([], Y, Z)
app_in_gga(X, Y, .(H, Z)) → U9_gga(X, Y, H, Z, head_in_ga(X, H))
head_in_ga([], X2) → head_out_ga([], X2)
head_in_ga(.(X, X3), X) → head_out_ga(.(X, X3), X)
U9_gga(X, Y, H, Z, head_out_ga(X, H)) → U10_gga(X, Y, H, Z, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)
U10_gga(X, Y, H, Z, tail_out_ga(X, T)) → U11_gga(X, Y, H, Z, app_in_gga(T, Y, Z))
U11_gga(X, Y, H, Z, app_out_gga(T, Y, Z)) → app_out_gga(X, Y, .(H, Z))
U3_gaa(L, X, Last, app_out_gga(L, .(X, []), LX)) → U4_gaa(L, X, Last, last_in_ag(Last, LX))
last_in_ag(X, .(X, [])) → U5_ag(X, true_in_)
true_in_true_out_
U5_ag(X, true_out_) → last_out_ag(X, .(X, []))
last_in_ag(X, Y) → U6_ag(X, Y, tail_in_ga(Y, T))
U6_ag(X, Y, tail_out_ga(Y, T)) → U7_ag(X, Y, last_in_ag(X, T))
U7_ag(X, Y, last_out_ag(X, T)) → last_out_ag(X, Y)
U4_gaa(L, X, Last, last_out_ag(Last, LX)) → applast_out_gaa(L, X, Last)
U2_gaa(A, B, C, applast_out_gaa(D, B, C)) → goal_out_gaa(A, B, C)

The argument filtering Pi contains the following mapping:
goal_in_gaa(x1, x2, x3)  =  goal_in_gaa(x1)
U1_gaa(x1, x2, x3, x4)  =  U1_gaa(x4)
s2l_in_ga(x1, x2)  =  s2l_in_ga(x1)
0  =  0
U12_ga(x1, x2)  =  U12_ga(x2)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1)
[]  =  []
s2l_out_ga(x1, x2)  =  s2l_out_ga(x2)
U13_ga(x1, x2, x3, x4)  =  U13_ga(x4)
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x2)
s(x1)  =  s(x1)
U14_ga(x1, x2, x3, x4)  =  U14_ga(x4)
.(x1, x2)  =  .(x2)
U2_gaa(x1, x2, x3, x4)  =  U2_gaa(x4)
applast_in_gaa(x1, x2, x3)  =  applast_in_gaa(x1)
U3_gaa(x1, x2, x3, x4)  =  U3_gaa(x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
U8_gga(x1, x2, x3)  =  U8_gga(x3)
eq_in_ga(x1, x2)  =  eq_in_ga(x1)
eq_out_ga(x1, x2)  =  eq_out_ga(x2)
app_out_gga(x1, x2, x3)  =  app_out_gga(x3)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x5)
head_in_ga(x1, x2)  =  head_in_ga(x1)
head_out_ga(x1, x2)  =  head_out_ga
U10_gga(x1, x2, x3, x4, x5)  =  U10_gga(x2, x5)
tail_in_ga(x1, x2)  =  tail_in_ga(x1)
tail_out_ga(x1, x2)  =  tail_out_ga(x2)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x5)
U4_gaa(x1, x2, x3, x4)  =  U4_gaa(x4)
last_in_ag(x1, x2)  =  last_in_ag(x2)
U5_ag(x1, x2)  =  U5_ag(x2)
true_in_  =  true_in_
true_out_  =  true_out_
last_out_ag(x1, x2)  =  last_out_ag
U6_ag(x1, x2, x3)  =  U6_ag(x3)
U7_ag(x1, x2, x3)  =  U7_ag(x3)
applast_out_gaa(x1, x2, x3)  =  applast_out_gaa
goal_out_gaa(x1, x2, x3)  =  goal_out_gaa
LAST_IN_AG(x1, x2)  =  LAST_IN_AG(x2)
U6_AG(x1, x2, x3)  =  U6_AG(x3)

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

(87) UsableRulesProof (EQUIVALENT transformation)

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

(88) Obligation:

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

LAST_IN_AG(X, Y) → U6_AG(X, Y, tail_in_ga(Y, T))
U6_AG(X, Y, tail_out_ga(Y, T)) → LAST_IN_AG(X, T)

The TRS R consists of the following rules:

tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)

The argument filtering Pi contains the following mapping:
[]  =  []
.(x1, x2)  =  .(x2)
tail_in_ga(x1, x2)  =  tail_in_ga(x1)
tail_out_ga(x1, x2)  =  tail_out_ga(x2)
LAST_IN_AG(x1, x2)  =  LAST_IN_AG(x2)
U6_AG(x1, x2, x3)  =  U6_AG(x3)

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

(89) PiDPToQDPProof (SOUND transformation)

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

(90) Obligation:

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

LAST_IN_AG(Y) → U6_AG(tail_in_ga(Y))
U6_AG(tail_out_ga(T)) → LAST_IN_AG(T)

The TRS R consists of the following rules:

tail_in_ga([]) → tail_out_ga([])
tail_in_ga(.(Xs)) → tail_out_ga(Xs)

The set Q consists of the following terms:

tail_in_ga(x0)

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

(91) UsableRulesReductionPairsProof (EQUIVALENT transformation)

By using the usable rules with reduction pair processor [LPAR04] with a polynomial ordering [POLO], all dependency pairs and the corresponding usable rules [FROCOS05] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

No dependency pairs are removed.

The following rules are removed from R:

tail_in_ga(.(Xs)) → tail_out_ga(Xs)
Used ordering: POLO with Polynomial interpretation [POLO]:

POL(.(x1)) = 2·x1   
POL(LAST_IN_AG(x1)) = x1   
POL(U6_AG(x1)) = x1   
POL([]) = 0   
POL(tail_in_ga(x1)) = x1   
POL(tail_out_ga(x1)) = 2·x1   

(92) Obligation:

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

LAST_IN_AG(Y) → U6_AG(tail_in_ga(Y))
U6_AG(tail_out_ga(T)) → LAST_IN_AG(T)

The TRS R consists of the following rules:

tail_in_ga([]) → tail_out_ga([])

The set Q consists of the following terms:

tail_in_ga(x0)

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

(93) Narrowing (SOUND transformation)

By narrowing [LPAR04] the rule LAST_IN_AG(Y) → U6_AG(tail_in_ga(Y)) at position [0] we obtained the following new rules [LPAR04]:

LAST_IN_AG([]) → U6_AG(tail_out_ga([]))

(94) Obligation:

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

U6_AG(tail_out_ga(T)) → LAST_IN_AG(T)
LAST_IN_AG([]) → U6_AG(tail_out_ga([]))

The TRS R consists of the following rules:

tail_in_ga([]) → tail_out_ga([])

The set Q consists of the following terms:

tail_in_ga(x0)

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

(95) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(96) Obligation:

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

U6_AG(tail_out_ga(T)) → LAST_IN_AG(T)
LAST_IN_AG([]) → U6_AG(tail_out_ga([]))

R is empty.
The set Q consists of the following terms:

tail_in_ga(x0)

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

(97) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

tail_in_ga(x0)

(98) Obligation:

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

U6_AG(tail_out_ga(T)) → LAST_IN_AG(T)
LAST_IN_AG([]) → U6_AG(tail_out_ga([]))

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

(99) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule U6_AG(tail_out_ga(T)) → LAST_IN_AG(T) we obtained the following new rules [LPAR04]:

U6_AG(tail_out_ga([])) → LAST_IN_AG([])

(100) Obligation:

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

LAST_IN_AG([]) → U6_AG(tail_out_ga([]))
U6_AG(tail_out_ga([])) → LAST_IN_AG([])

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

(101) NonTerminationProof (EQUIVALENT transformation)

We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

s = U6_AG(tail_out_ga([])) evaluates to t =U6_AG(tail_out_ga([]))

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




Rewriting sequence

U6_AG(tail_out_ga([]))LAST_IN_AG([])
with rule U6_AG(tail_out_ga([])) → LAST_IN_AG([]) at position [] and matcher [ ]

LAST_IN_AG([])U6_AG(tail_out_ga([]))
with rule LAST_IN_AG([]) → U6_AG(tail_out_ga([]))

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.



(102) FALSE

(103) Obligation:

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

APP_IN_GGA(X, Y, .(H, Z)) → U9_GGA(X, Y, H, Z, head_in_ga(X, H))
U9_GGA(X, Y, H, Z, head_out_ga(X, H)) → U10_GGA(X, Y, H, Z, tail_in_ga(X, T))
U10_GGA(X, Y, H, Z, tail_out_ga(X, T)) → APP_IN_GGA(T, Y, Z)

The TRS R consists of the following rules:

goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2l_in_ga(A, D))
s2l_in_ga(0, L) → U12_ga(L, eq_in_ag(L, []))
eq_in_ag(X, X) → eq_out_ag(X, X)
U12_ga(L, eq_out_ag(L, [])) → s2l_out_ga(0, L)
s2l_in_ga(X, .(X1, Xs)) → U13_ga(X, X1, Xs, p_in_ga(X, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U13_ga(X, X1, Xs, p_out_ga(X, P)) → U14_ga(X, X1, Xs, s2l_in_ga(P, Xs))
U14_ga(X, X1, Xs, s2l_out_ga(P, Xs)) → s2l_out_ga(X, .(X1, Xs))
U1_gaa(A, B, C, s2l_out_ga(A, D)) → U2_gaa(A, B, C, applast_in_gaa(D, B, C))
applast_in_gaa(L, X, Last) → U3_gaa(L, X, Last, app_in_gga(L, .(X, []), LX))
app_in_gga([], Y, Z) → U8_gga(Y, Z, eq_in_ga(Y, Z))
eq_in_ga(X, X) → eq_out_ga(X, X)
U8_gga(Y, Z, eq_out_ga(Y, Z)) → app_out_gga([], Y, Z)
app_in_gga(X, Y, .(H, Z)) → U9_gga(X, Y, H, Z, head_in_ga(X, H))
head_in_ga([], X2) → head_out_ga([], X2)
head_in_ga(.(X, X3), X) → head_out_ga(.(X, X3), X)
U9_gga(X, Y, H, Z, head_out_ga(X, H)) → U10_gga(X, Y, H, Z, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)
U10_gga(X, Y, H, Z, tail_out_ga(X, T)) → U11_gga(X, Y, H, Z, app_in_gga(T, Y, Z))
U11_gga(X, Y, H, Z, app_out_gga(T, Y, Z)) → app_out_gga(X, Y, .(H, Z))
U3_gaa(L, X, Last, app_out_gga(L, .(X, []), LX)) → U4_gaa(L, X, Last, last_in_ag(Last, LX))
last_in_ag(X, .(X, [])) → U5_ag(X, true_in_)
true_in_true_out_
U5_ag(X, true_out_) → last_out_ag(X, .(X, []))
last_in_ag(X, Y) → U6_ag(X, Y, tail_in_ga(Y, T))
U6_ag(X, Y, tail_out_ga(Y, T)) → U7_ag(X, Y, last_in_ag(X, T))
U7_ag(X, Y, last_out_ag(X, T)) → last_out_ag(X, Y)
U4_gaa(L, X, Last, last_out_ag(Last, LX)) → applast_out_gaa(L, X, Last)
U2_gaa(A, B, C, applast_out_gaa(D, B, C)) → goal_out_gaa(A, B, C)

The argument filtering Pi contains the following mapping:
goal_in_gaa(x1, x2, x3)  =  goal_in_gaa(x1)
U1_gaa(x1, x2, x3, x4)  =  U1_gaa(x4)
s2l_in_ga(x1, x2)  =  s2l_in_ga(x1)
0  =  0
U12_ga(x1, x2)  =  U12_ga(x2)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1)
[]  =  []
s2l_out_ga(x1, x2)  =  s2l_out_ga(x2)
U13_ga(x1, x2, x3, x4)  =  U13_ga(x4)
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x2)
s(x1)  =  s(x1)
U14_ga(x1, x2, x3, x4)  =  U14_ga(x4)
.(x1, x2)  =  .(x2)
U2_gaa(x1, x2, x3, x4)  =  U2_gaa(x4)
applast_in_gaa(x1, x2, x3)  =  applast_in_gaa(x1)
U3_gaa(x1, x2, x3, x4)  =  U3_gaa(x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
U8_gga(x1, x2, x3)  =  U8_gga(x3)
eq_in_ga(x1, x2)  =  eq_in_ga(x1)
eq_out_ga(x1, x2)  =  eq_out_ga(x2)
app_out_gga(x1, x2, x3)  =  app_out_gga(x3)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x5)
head_in_ga(x1, x2)  =  head_in_ga(x1)
head_out_ga(x1, x2)  =  head_out_ga
U10_gga(x1, x2, x3, x4, x5)  =  U10_gga(x2, x5)
tail_in_ga(x1, x2)  =  tail_in_ga(x1)
tail_out_ga(x1, x2)  =  tail_out_ga(x2)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x5)
U4_gaa(x1, x2, x3, x4)  =  U4_gaa(x4)
last_in_ag(x1, x2)  =  last_in_ag(x2)
U5_ag(x1, x2)  =  U5_ag(x2)
true_in_  =  true_in_
true_out_  =  true_out_
last_out_ag(x1, x2)  =  last_out_ag
U6_ag(x1, x2, x3)  =  U6_ag(x3)
U7_ag(x1, x2, x3)  =  U7_ag(x3)
applast_out_gaa(x1, x2, x3)  =  applast_out_gaa
goal_out_gaa(x1, x2, x3)  =  goal_out_gaa
APP_IN_GGA(x1, x2, x3)  =  APP_IN_GGA(x1, x2)
U9_GGA(x1, x2, x3, x4, x5)  =  U9_GGA(x1, x2, x5)
U10_GGA(x1, x2, x3, x4, x5)  =  U10_GGA(x2, x5)

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

(104) UsableRulesProof (EQUIVALENT transformation)

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

(105) Obligation:

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

APP_IN_GGA(X, Y, .(H, Z)) → U9_GGA(X, Y, H, Z, head_in_ga(X, H))
U9_GGA(X, Y, H, Z, head_out_ga(X, H)) → U10_GGA(X, Y, H, Z, tail_in_ga(X, T))
U10_GGA(X, Y, H, Z, tail_out_ga(X, T)) → APP_IN_GGA(T, Y, Z)

The TRS R consists of the following rules:

head_in_ga([], X2) → head_out_ga([], X2)
head_in_ga(.(X, X3), X) → head_out_ga(.(X, X3), X)
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)

The argument filtering Pi contains the following mapping:
[]  =  []
.(x1, x2)  =  .(x2)
head_in_ga(x1, x2)  =  head_in_ga(x1)
head_out_ga(x1, x2)  =  head_out_ga
tail_in_ga(x1, x2)  =  tail_in_ga(x1)
tail_out_ga(x1, x2)  =  tail_out_ga(x2)
APP_IN_GGA(x1, x2, x3)  =  APP_IN_GGA(x1, x2)
U9_GGA(x1, x2, x3, x4, x5)  =  U9_GGA(x1, x2, x5)
U10_GGA(x1, x2, x3, x4, x5)  =  U10_GGA(x2, x5)

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

(106) PiDPToQDPProof (SOUND transformation)

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

(107) Obligation:

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

APP_IN_GGA(X, Y) → U9_GGA(X, Y, head_in_ga(X))
U9_GGA(X, Y, head_out_ga) → U10_GGA(Y, tail_in_ga(X))
U10_GGA(Y, tail_out_ga(T)) → APP_IN_GGA(T, Y)

The TRS R consists of the following rules:

head_in_ga([]) → head_out_ga
head_in_ga(.(X3)) → head_out_ga
tail_in_ga([]) → tail_out_ga([])
tail_in_ga(.(Xs)) → tail_out_ga(Xs)

The set Q consists of the following terms:

head_in_ga(x0)
tail_in_ga(x0)

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

(108) UsableRulesReductionPairsProof (EQUIVALENT transformation)

By using the usable rules with reduction pair processor [LPAR04] with a polynomial ordering [POLO], all dependency pairs and the corresponding usable rules [FROCOS05] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

No dependency pairs are removed.

The following rules are removed from R:

tail_in_ga(.(Xs)) → tail_out_ga(Xs)
head_in_ga(.(X3)) → head_out_ga
Used ordering: POLO with Polynomial interpretation [POLO]:

POL(.(x1)) = 2·x1   
POL(APP_IN_GGA(x1, x2)) = 2·x1 + x2   
POL(U10_GGA(x1, x2)) = x1 + x2   
POL(U9_GGA(x1, x2, x3)) = x1 + x2 + x3   
POL([]) = 0   
POL(head_in_ga(x1)) = x1   
POL(head_out_ga) = 0   
POL(tail_in_ga(x1)) = x1   
POL(tail_out_ga(x1)) = 2·x1   

(109) Obligation:

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

APP_IN_GGA(X, Y) → U9_GGA(X, Y, head_in_ga(X))
U9_GGA(X, Y, head_out_ga) → U10_GGA(Y, tail_in_ga(X))
U10_GGA(Y, tail_out_ga(T)) → APP_IN_GGA(T, Y)

The TRS R consists of the following rules:

tail_in_ga([]) → tail_out_ga([])
head_in_ga([]) → head_out_ga

The set Q consists of the following terms:

head_in_ga(x0)
tail_in_ga(x0)

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

(110) Narrowing (SOUND transformation)

By narrowing [LPAR04] the rule APP_IN_GGA(X, Y) → U9_GGA(X, Y, head_in_ga(X)) at position [2] we obtained the following new rules [LPAR04]:

APP_IN_GGA([], y1) → U9_GGA([], y1, head_out_ga)

(111) Obligation:

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

U9_GGA(X, Y, head_out_ga) → U10_GGA(Y, tail_in_ga(X))
U10_GGA(Y, tail_out_ga(T)) → APP_IN_GGA(T, Y)
APP_IN_GGA([], y1) → U9_GGA([], y1, head_out_ga)

The TRS R consists of the following rules:

tail_in_ga([]) → tail_out_ga([])
head_in_ga([]) → head_out_ga

The set Q consists of the following terms:

head_in_ga(x0)
tail_in_ga(x0)

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

(112) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(113) Obligation:

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

U9_GGA(X, Y, head_out_ga) → U10_GGA(Y, tail_in_ga(X))
U10_GGA(Y, tail_out_ga(T)) → APP_IN_GGA(T, Y)
APP_IN_GGA([], y1) → U9_GGA([], y1, head_out_ga)

The TRS R consists of the following rules:

tail_in_ga([]) → tail_out_ga([])

The set Q consists of the following terms:

head_in_ga(x0)
tail_in_ga(x0)

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

(114) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

head_in_ga(x0)

(115) Obligation:

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

U9_GGA(X, Y, head_out_ga) → U10_GGA(Y, tail_in_ga(X))
U10_GGA(Y, tail_out_ga(T)) → APP_IN_GGA(T, Y)
APP_IN_GGA([], y1) → U9_GGA([], y1, head_out_ga)

The TRS R consists of the following rules:

tail_in_ga([]) → tail_out_ga([])

The set Q consists of the following terms:

tail_in_ga(x0)

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

(116) Narrowing (SOUND transformation)

By narrowing [LPAR04] the rule U9_GGA(X, Y, head_out_ga) → U10_GGA(Y, tail_in_ga(X)) at position [1] we obtained the following new rules [LPAR04]:

U9_GGA([], y1, head_out_ga) → U10_GGA(y1, tail_out_ga([]))

(117) Obligation:

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

U10_GGA(Y, tail_out_ga(T)) → APP_IN_GGA(T, Y)
APP_IN_GGA([], y1) → U9_GGA([], y1, head_out_ga)
U9_GGA([], y1, head_out_ga) → U10_GGA(y1, tail_out_ga([]))

The TRS R consists of the following rules:

tail_in_ga([]) → tail_out_ga([])

The set Q consists of the following terms:

tail_in_ga(x0)

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

(118) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(119) Obligation:

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

U10_GGA(Y, tail_out_ga(T)) → APP_IN_GGA(T, Y)
APP_IN_GGA([], y1) → U9_GGA([], y1, head_out_ga)
U9_GGA([], y1, head_out_ga) → U10_GGA(y1, tail_out_ga([]))

R is empty.
The set Q consists of the following terms:

tail_in_ga(x0)

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

(120) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

tail_in_ga(x0)

(121) Obligation:

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

U10_GGA(Y, tail_out_ga(T)) → APP_IN_GGA(T, Y)
APP_IN_GGA([], y1) → U9_GGA([], y1, head_out_ga)
U9_GGA([], y1, head_out_ga) → U10_GGA(y1, tail_out_ga([]))

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

(122) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule U10_GGA(Y, tail_out_ga(T)) → APP_IN_GGA(T, Y) we obtained the following new rules [LPAR04]:

U10_GGA(z0, tail_out_ga([])) → APP_IN_GGA([], z0)

(123) Obligation:

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

APP_IN_GGA([], y1) → U9_GGA([], y1, head_out_ga)
U9_GGA([], y1, head_out_ga) → U10_GGA(y1, tail_out_ga([]))
U10_GGA(z0, tail_out_ga([])) → APP_IN_GGA([], z0)

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

(124) NonTerminationProof (EQUIVALENT transformation)

We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

s = U9_GGA([], y1, head_out_ga) evaluates to t =U9_GGA([], y1, head_out_ga)

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




Rewriting sequence

U9_GGA([], y1, head_out_ga)U10_GGA(y1, tail_out_ga([]))
with rule U9_GGA([], y1', head_out_ga) → U10_GGA(y1', tail_out_ga([])) at position [] and matcher [y1' / y1]

U10_GGA(y1, tail_out_ga([]))APP_IN_GGA([], y1)
with rule U10_GGA(z0, tail_out_ga([])) → APP_IN_GGA([], z0) at position [] and matcher [z0 / y1]

APP_IN_GGA([], y1)U9_GGA([], y1, head_out_ga)
with rule APP_IN_GGA([], y1) → U9_GGA([], y1, head_out_ga)

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.



(125) FALSE

(126) Obligation:

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

S2L_IN_GA(X, .(X1, Xs)) → U13_GA(X, X1, Xs, p_in_ga(X, P))
U13_GA(X, X1, Xs, p_out_ga(X, P)) → S2L_IN_GA(P, Xs)

The TRS R consists of the following rules:

goal_in_gaa(A, B, C) → U1_gaa(A, B, C, s2l_in_ga(A, D))
s2l_in_ga(0, L) → U12_ga(L, eq_in_ag(L, []))
eq_in_ag(X, X) → eq_out_ag(X, X)
U12_ga(L, eq_out_ag(L, [])) → s2l_out_ga(0, L)
s2l_in_ga(X, .(X1, Xs)) → U13_ga(X, X1, Xs, p_in_ga(X, P))
p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)
U13_ga(X, X1, Xs, p_out_ga(X, P)) → U14_ga(X, X1, Xs, s2l_in_ga(P, Xs))
U14_ga(X, X1, Xs, s2l_out_ga(P, Xs)) → s2l_out_ga(X, .(X1, Xs))
U1_gaa(A, B, C, s2l_out_ga(A, D)) → U2_gaa(A, B, C, applast_in_gaa(D, B, C))
applast_in_gaa(L, X, Last) → U3_gaa(L, X, Last, app_in_gga(L, .(X, []), LX))
app_in_gga([], Y, Z) → U8_gga(Y, Z, eq_in_ga(Y, Z))
eq_in_ga(X, X) → eq_out_ga(X, X)
U8_gga(Y, Z, eq_out_ga(Y, Z)) → app_out_gga([], Y, Z)
app_in_gga(X, Y, .(H, Z)) → U9_gga(X, Y, H, Z, head_in_ga(X, H))
head_in_ga([], X2) → head_out_ga([], X2)
head_in_ga(.(X, X3), X) → head_out_ga(.(X, X3), X)
U9_gga(X, Y, H, Z, head_out_ga(X, H)) → U10_gga(X, Y, H, Z, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)
U10_gga(X, Y, H, Z, tail_out_ga(X, T)) → U11_gga(X, Y, H, Z, app_in_gga(T, Y, Z))
U11_gga(X, Y, H, Z, app_out_gga(T, Y, Z)) → app_out_gga(X, Y, .(H, Z))
U3_gaa(L, X, Last, app_out_gga(L, .(X, []), LX)) → U4_gaa(L, X, Last, last_in_ag(Last, LX))
last_in_ag(X, .(X, [])) → U5_ag(X, true_in_)
true_in_true_out_
U5_ag(X, true_out_) → last_out_ag(X, .(X, []))
last_in_ag(X, Y) → U6_ag(X, Y, tail_in_ga(Y, T))
U6_ag(X, Y, tail_out_ga(Y, T)) → U7_ag(X, Y, last_in_ag(X, T))
U7_ag(X, Y, last_out_ag(X, T)) → last_out_ag(X, Y)
U4_gaa(L, X, Last, last_out_ag(Last, LX)) → applast_out_gaa(L, X, Last)
U2_gaa(A, B, C, applast_out_gaa(D, B, C)) → goal_out_gaa(A, B, C)

The argument filtering Pi contains the following mapping:
goal_in_gaa(x1, x2, x3)  =  goal_in_gaa(x1)
U1_gaa(x1, x2, x3, x4)  =  U1_gaa(x4)
s2l_in_ga(x1, x2)  =  s2l_in_ga(x1)
0  =  0
U12_ga(x1, x2)  =  U12_ga(x2)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1)
[]  =  []
s2l_out_ga(x1, x2)  =  s2l_out_ga(x2)
U13_ga(x1, x2, x3, x4)  =  U13_ga(x4)
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x2)
s(x1)  =  s(x1)
U14_ga(x1, x2, x3, x4)  =  U14_ga(x4)
.(x1, x2)  =  .(x2)
U2_gaa(x1, x2, x3, x4)  =  U2_gaa(x4)
applast_in_gaa(x1, x2, x3)  =  applast_in_gaa(x1)
U3_gaa(x1, x2, x3, x4)  =  U3_gaa(x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
U8_gga(x1, x2, x3)  =  U8_gga(x3)
eq_in_ga(x1, x2)  =  eq_in_ga(x1)
eq_out_ga(x1, x2)  =  eq_out_ga(x2)
app_out_gga(x1, x2, x3)  =  app_out_gga(x3)
U9_gga(x1, x2, x3, x4, x5)  =  U9_gga(x1, x2, x5)
head_in_ga(x1, x2)  =  head_in_ga(x1)
head_out_ga(x1, x2)  =  head_out_ga
U10_gga(x1, x2, x3, x4, x5)  =  U10_gga(x2, x5)
tail_in_ga(x1, x2)  =  tail_in_ga(x1)
tail_out_ga(x1, x2)  =  tail_out_ga(x2)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x5)
U4_gaa(x1, x2, x3, x4)  =  U4_gaa(x4)
last_in_ag(x1, x2)  =  last_in_ag(x2)
U5_ag(x1, x2)  =  U5_ag(x2)
true_in_  =  true_in_
true_out_  =  true_out_
last_out_ag(x1, x2)  =  last_out_ag
U6_ag(x1, x2, x3)  =  U6_ag(x3)
U7_ag(x1, x2, x3)  =  U7_ag(x3)
applast_out_gaa(x1, x2, x3)  =  applast_out_gaa
goal_out_gaa(x1, x2, x3)  =  goal_out_gaa
S2L_IN_GA(x1, x2)  =  S2L_IN_GA(x1)
U13_GA(x1, x2, x3, x4)  =  U13_GA(x4)

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

(127) UsableRulesProof (EQUIVALENT transformation)

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

(128) Obligation:

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

S2L_IN_GA(X, .(X1, Xs)) → U13_GA(X, X1, Xs, p_in_ga(X, P))
U13_GA(X, X1, Xs, p_out_ga(X, P)) → S2L_IN_GA(P, Xs)

The TRS R consists of the following rules:

p_in_ga(0, 0) → p_out_ga(0, 0)
p_in_ga(s(X), X) → p_out_ga(s(X), X)

The argument filtering Pi contains the following mapping:
0  =  0
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x2)
s(x1)  =  s(x1)
.(x1, x2)  =  .(x2)
S2L_IN_GA(x1, x2)  =  S2L_IN_GA(x1)
U13_GA(x1, x2, x3, x4)  =  U13_GA(x4)

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

(129) PiDPToQDPProof (SOUND transformation)

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

(130) Obligation:

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

S2L_IN_GA(X) → U13_GA(p_in_ga(X))
U13_GA(p_out_ga(P)) → S2L_IN_GA(P)

The TRS R consists of the following rules:

p_in_ga(0) → p_out_ga(0)
p_in_ga(s(X)) → p_out_ga(X)

The set Q consists of the following terms:

p_in_ga(x0)

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

(131) UsableRulesReductionPairsProof (EQUIVALENT transformation)

By using the usable rules with reduction pair processor [LPAR04] with a polynomial ordering [POLO], all dependency pairs and the corresponding usable rules [FROCOS05] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

No dependency pairs are removed.

The following rules are removed from R:

p_in_ga(s(X)) → p_out_ga(X)
Used ordering: POLO with Polynomial interpretation [POLO]:

POL(0) = 0   
POL(S2L_IN_GA(x1)) = x1   
POL(U13_GA(x1)) = x1   
POL(p_in_ga(x1)) = x1   
POL(p_out_ga(x1)) = 2·x1   
POL(s(x1)) = 2·x1   

(132) Obligation:

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

S2L_IN_GA(X) → U13_GA(p_in_ga(X))
U13_GA(p_out_ga(P)) → S2L_IN_GA(P)

The TRS R consists of the following rules:

p_in_ga(0) → p_out_ga(0)

The set Q consists of the following terms:

p_in_ga(x0)

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

(133) Narrowing (SOUND transformation)

By narrowing [LPAR04] the rule S2L_IN_GA(X) → U13_GA(p_in_ga(X)) at position [0] we obtained the following new rules [LPAR04]:

S2L_IN_GA(0) → U13_GA(p_out_ga(0))

(134) Obligation:

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

U13_GA(p_out_ga(P)) → S2L_IN_GA(P)
S2L_IN_GA(0) → U13_GA(p_out_ga(0))

The TRS R consists of the following rules:

p_in_ga(0) → p_out_ga(0)

The set Q consists of the following terms:

p_in_ga(x0)

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

(135) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(136) Obligation:

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

U13_GA(p_out_ga(P)) → S2L_IN_GA(P)
S2L_IN_GA(0) → U13_GA(p_out_ga(0))

R is empty.
The set Q consists of the following terms:

p_in_ga(x0)

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

(137) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

p_in_ga(x0)

(138) Obligation:

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

U13_GA(p_out_ga(P)) → S2L_IN_GA(P)
S2L_IN_GA(0) → U13_GA(p_out_ga(0))

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

(139) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule U13_GA(p_out_ga(P)) → S2L_IN_GA(P) we obtained the following new rules [LPAR04]:

U13_GA(p_out_ga(0)) → S2L_IN_GA(0)

(140) Obligation:

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

S2L_IN_GA(0) → U13_GA(p_out_ga(0))
U13_GA(p_out_ga(0)) → S2L_IN_GA(0)

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

(141) NonTerminationProof (EQUIVALENT transformation)

We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

s = U13_GA(p_out_ga(0)) evaluates to t =U13_GA(p_out_ga(0))

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




Rewriting sequence

U13_GA(p_out_ga(0))S2L_IN_GA(0)
with rule U13_GA(p_out_ga(0)) → S2L_IN_GA(0) at position [] and matcher [ ]

S2L_IN_GA(0)U13_GA(p_out_ga(0))
with rule S2L_IN_GA(0) → U13_GA(p_out_ga(0))

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.



(142) FALSE