(0) Obligation:

Clauses:

gopher(nil, L) :- ','(!, eq(L, nil)).
gopher(X, Y) :- ','(head(X, nil), ','(!, ','(tail(X, T), eq(Y, cons(nil, T))))).
gopher(X, Y) :- ','(head(X, H), ','(head(H, U), ','(tail(H, V), ','(tail(X, W), gopher(cons(U, cons(V, W)), Y))))).
head([], X1).
head(.(X, X2), X).
tail([], []).
tail(.(X3, X), X).
eq(X, X).

Queries:

gopher(g,a).

(1) CutEliminatorProof (SOUND transformation)

Eliminated all cuts by simply ignoring them[PROLOG].

(2) Obligation:

Clauses:

gopher(nil, L) :- eq(L, nil).
gopher(X, Y) :- ','(head(X, nil), ','(tail(X, T), eq(Y, cons(nil, T)))).
gopher(X, Y) :- ','(head(X, H), ','(head(H, U), ','(tail(H, V), ','(tail(X, W), gopher(cons(U, cons(V, W)), Y))))).
head([], X1).
head(.(X, X2), X).
tail([], []).
tail(.(X3, X), X).
eq(X, X).

Queries:

gopher(g,a).

(3) PrologToPiTRSProof (SOUND transformation)

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

gopher_in_ga(nil, L) → U1_ga(L, eq_in_ag(L, nil))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(L, eq_out_ag(L, nil)) → gopher_out_ga(nil, L)
gopher_in_ga(X, Y) → U2_ga(X, Y, head_in_gg(X, nil))
head_in_gg([], X1) → head_out_gg([], X1)
head_in_gg(.(X, X2), X) → head_out_gg(.(X, X2), X)
U2_ga(X, Y, head_out_gg(X, nil)) → U3_ga(X, Y, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, X), X) → tail_out_ga(.(X3, X), X)
U3_ga(X, Y, tail_out_ga(X, T)) → U4_ga(X, Y, eq_in_ag(Y, cons(nil, T)))
U4_ga(X, Y, eq_out_ag(Y, cons(nil, T))) → gopher_out_ga(X, Y)
gopher_in_ga(X, Y) → U5_ga(X, Y, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(X, X2), X) → head_out_ga(.(X, X2), X)
U5_ga(X, Y, head_out_ga(X, H)) → U6_ga(X, Y, H, head_in_aa(H, U))
head_in_aa([], X1) → head_out_aa([], X1)
head_in_aa(.(X, X2), X) → head_out_aa(.(X, X2), X)
U6_ga(X, Y, H, head_out_aa(H, U)) → U7_ga(X, Y, H, U, tail_in_aa(H, V))
tail_in_aa([], []) → tail_out_aa([], [])
tail_in_aa(.(X3, X), X) → tail_out_aa(.(X3, X), X)
U7_ga(X, Y, H, U, tail_out_aa(H, V)) → U8_ga(X, Y, H, U, V, tail_in_ga(X, W))
U8_ga(X, Y, H, U, V, tail_out_ga(X, W)) → U9_ga(X, Y, gopher_in_aa(cons(U, cons(V, W)), Y))
gopher_in_aa(nil, L) → U1_aa(L, eq_in_ag(L, nil))
U1_aa(L, eq_out_ag(L, nil)) → gopher_out_aa(nil, L)
gopher_in_aa(X, Y) → U2_aa(X, Y, head_in_ag(X, nil))
head_in_ag([], X1) → head_out_ag([], X1)
head_in_ag(.(X, X2), X) → head_out_ag(.(X, X2), X)
U2_aa(X, Y, head_out_ag(X, nil)) → U3_aa(X, Y, tail_in_aa(X, T))
U3_aa(X, Y, tail_out_aa(X, T)) → U4_aa(X, Y, eq_in_aa(Y, cons(nil, T)))
eq_in_aa(X, X) → eq_out_aa(X, X)
U4_aa(X, Y, eq_out_aa(Y, cons(nil, T))) → gopher_out_aa(X, Y)
gopher_in_aa(X, Y) → U5_aa(X, Y, head_in_aa(X, H))
U5_aa(X, Y, head_out_aa(X, H)) → U6_aa(X, Y, H, head_in_aa(H, U))
U6_aa(X, Y, H, head_out_aa(H, U)) → U7_aa(X, Y, H, U, tail_in_aa(H, V))
U7_aa(X, Y, H, U, tail_out_aa(H, V)) → U8_aa(X, Y, H, U, V, tail_in_aa(X, W))
U8_aa(X, Y, H, U, V, tail_out_aa(X, W)) → U9_aa(X, Y, gopher_in_aa(cons(U, cons(V, W)), Y))
U9_aa(X, Y, gopher_out_aa(cons(U, cons(V, W)), Y)) → gopher_out_aa(X, Y)
U9_ga(X, Y, gopher_out_aa(cons(U, cons(V, W)), Y)) → gopher_out_ga(X, Y)

The argument filtering Pi contains the following mapping:
gopher_in_ga(x1, x2)  =  gopher_in_ga(x1)
nil  =  nil
U1_ga(x1, x2)  =  U1_ga(x2)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1)
gopher_out_ga(x1, x2)  =  gopher_out_ga
U2_ga(x1, x2, x3)  =  U2_ga(x1, x3)
head_in_gg(x1, x2)  =  head_in_gg(x1, x2)
[]  =  []
head_out_gg(x1, x2)  =  head_out_gg
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3)  =  U3_ga(x3)
tail_in_ga(x1, x2)  =  tail_in_ga(x1)
tail_out_ga(x1, x2)  =  tail_out_ga(x2)
U4_ga(x1, x2, x3)  =  U4_ga(x3)
cons(x1, x2)  =  cons(x1, x2)
U5_ga(x1, x2, x3)  =  U5_ga(x1, x3)
head_in_ga(x1, x2)  =  head_in_ga(x1)
head_out_ga(x1, x2)  =  head_out_ga
U6_ga(x1, x2, x3, x4)  =  U6_ga(x1, x4)
head_in_aa(x1, x2)  =  head_in_aa
head_out_aa(x1, x2)  =  head_out_aa
U7_ga(x1, x2, x3, x4, x5)  =  U7_ga(x1, x5)
tail_in_aa(x1, x2)  =  tail_in_aa
tail_out_aa(x1, x2)  =  tail_out_aa
U8_ga(x1, x2, x3, x4, x5, x6)  =  U8_ga(x6)
U9_ga(x1, x2, x3)  =  U9_ga(x3)
gopher_in_aa(x1, x2)  =  gopher_in_aa
U1_aa(x1, x2)  =  U1_aa(x2)
gopher_out_aa(x1, x2)  =  gopher_out_aa
U2_aa(x1, x2, x3)  =  U2_aa(x3)
head_in_ag(x1, x2)  =  head_in_ag(x2)
head_out_ag(x1, x2)  =  head_out_ag
U3_aa(x1, x2, x3)  =  U3_aa(x3)
U4_aa(x1, x2, x3)  =  U4_aa(x3)
eq_in_aa(x1, x2)  =  eq_in_aa
eq_out_aa(x1, x2)  =  eq_out_aa
U5_aa(x1, x2, x3)  =  U5_aa(x3)
U6_aa(x1, x2, x3, x4)  =  U6_aa(x4)
U7_aa(x1, x2, x3, x4, x5)  =  U7_aa(x5)
U8_aa(x1, x2, x3, x4, x5, x6)  =  U8_aa(x6)
U9_aa(x1, x2, x3)  =  U9_aa(x3)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(4) Obligation:

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

gopher_in_ga(nil, L) → U1_ga(L, eq_in_ag(L, nil))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(L, eq_out_ag(L, nil)) → gopher_out_ga(nil, L)
gopher_in_ga(X, Y) → U2_ga(X, Y, head_in_gg(X, nil))
head_in_gg([], X1) → head_out_gg([], X1)
head_in_gg(.(X, X2), X) → head_out_gg(.(X, X2), X)
U2_ga(X, Y, head_out_gg(X, nil)) → U3_ga(X, Y, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, X), X) → tail_out_ga(.(X3, X), X)
U3_ga(X, Y, tail_out_ga(X, T)) → U4_ga(X, Y, eq_in_ag(Y, cons(nil, T)))
U4_ga(X, Y, eq_out_ag(Y, cons(nil, T))) → gopher_out_ga(X, Y)
gopher_in_ga(X, Y) → U5_ga(X, Y, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(X, X2), X) → head_out_ga(.(X, X2), X)
U5_ga(X, Y, head_out_ga(X, H)) → U6_ga(X, Y, H, head_in_aa(H, U))
head_in_aa([], X1) → head_out_aa([], X1)
head_in_aa(.(X, X2), X) → head_out_aa(.(X, X2), X)
U6_ga(X, Y, H, head_out_aa(H, U)) → U7_ga(X, Y, H, U, tail_in_aa(H, V))
tail_in_aa([], []) → tail_out_aa([], [])
tail_in_aa(.(X3, X), X) → tail_out_aa(.(X3, X), X)
U7_ga(X, Y, H, U, tail_out_aa(H, V)) → U8_ga(X, Y, H, U, V, tail_in_ga(X, W))
U8_ga(X, Y, H, U, V, tail_out_ga(X, W)) → U9_ga(X, Y, gopher_in_aa(cons(U, cons(V, W)), Y))
gopher_in_aa(nil, L) → U1_aa(L, eq_in_ag(L, nil))
U1_aa(L, eq_out_ag(L, nil)) → gopher_out_aa(nil, L)
gopher_in_aa(X, Y) → U2_aa(X, Y, head_in_ag(X, nil))
head_in_ag([], X1) → head_out_ag([], X1)
head_in_ag(.(X, X2), X) → head_out_ag(.(X, X2), X)
U2_aa(X, Y, head_out_ag(X, nil)) → U3_aa(X, Y, tail_in_aa(X, T))
U3_aa(X, Y, tail_out_aa(X, T)) → U4_aa(X, Y, eq_in_aa(Y, cons(nil, T)))
eq_in_aa(X, X) → eq_out_aa(X, X)
U4_aa(X, Y, eq_out_aa(Y, cons(nil, T))) → gopher_out_aa(X, Y)
gopher_in_aa(X, Y) → U5_aa(X, Y, head_in_aa(X, H))
U5_aa(X, Y, head_out_aa(X, H)) → U6_aa(X, Y, H, head_in_aa(H, U))
U6_aa(X, Y, H, head_out_aa(H, U)) → U7_aa(X, Y, H, U, tail_in_aa(H, V))
U7_aa(X, Y, H, U, tail_out_aa(H, V)) → U8_aa(X, Y, H, U, V, tail_in_aa(X, W))
U8_aa(X, Y, H, U, V, tail_out_aa(X, W)) → U9_aa(X, Y, gopher_in_aa(cons(U, cons(V, W)), Y))
U9_aa(X, Y, gopher_out_aa(cons(U, cons(V, W)), Y)) → gopher_out_aa(X, Y)
U9_ga(X, Y, gopher_out_aa(cons(U, cons(V, W)), Y)) → gopher_out_ga(X, Y)

The argument filtering Pi contains the following mapping:
gopher_in_ga(x1, x2)  =  gopher_in_ga(x1)
nil  =  nil
U1_ga(x1, x2)  =  U1_ga(x2)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1)
gopher_out_ga(x1, x2)  =  gopher_out_ga
U2_ga(x1, x2, x3)  =  U2_ga(x1, x3)
head_in_gg(x1, x2)  =  head_in_gg(x1, x2)
[]  =  []
head_out_gg(x1, x2)  =  head_out_gg
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3)  =  U3_ga(x3)
tail_in_ga(x1, x2)  =  tail_in_ga(x1)
tail_out_ga(x1, x2)  =  tail_out_ga(x2)
U4_ga(x1, x2, x3)  =  U4_ga(x3)
cons(x1, x2)  =  cons(x1, x2)
U5_ga(x1, x2, x3)  =  U5_ga(x1, x3)
head_in_ga(x1, x2)  =  head_in_ga(x1)
head_out_ga(x1, x2)  =  head_out_ga
U6_ga(x1, x2, x3, x4)  =  U6_ga(x1, x4)
head_in_aa(x1, x2)  =  head_in_aa
head_out_aa(x1, x2)  =  head_out_aa
U7_ga(x1, x2, x3, x4, x5)  =  U7_ga(x1, x5)
tail_in_aa(x1, x2)  =  tail_in_aa
tail_out_aa(x1, x2)  =  tail_out_aa
U8_ga(x1, x2, x3, x4, x5, x6)  =  U8_ga(x6)
U9_ga(x1, x2, x3)  =  U9_ga(x3)
gopher_in_aa(x1, x2)  =  gopher_in_aa
U1_aa(x1, x2)  =  U1_aa(x2)
gopher_out_aa(x1, x2)  =  gopher_out_aa
U2_aa(x1, x2, x3)  =  U2_aa(x3)
head_in_ag(x1, x2)  =  head_in_ag(x2)
head_out_ag(x1, x2)  =  head_out_ag
U3_aa(x1, x2, x3)  =  U3_aa(x3)
U4_aa(x1, x2, x3)  =  U4_aa(x3)
eq_in_aa(x1, x2)  =  eq_in_aa
eq_out_aa(x1, x2)  =  eq_out_aa
U5_aa(x1, x2, x3)  =  U5_aa(x3)
U6_aa(x1, x2, x3, x4)  =  U6_aa(x4)
U7_aa(x1, x2, x3, x4, x5)  =  U7_aa(x5)
U8_aa(x1, x2, x3, x4, x5, x6)  =  U8_aa(x6)
U9_aa(x1, x2, x3)  =  U9_aa(x3)

(5) DependencyPairsProof (EQUIVALENT transformation)

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

GOPHER_IN_GA(nil, L) → U1_GA(L, eq_in_ag(L, nil))
GOPHER_IN_GA(nil, L) → EQ_IN_AG(L, nil)
GOPHER_IN_GA(X, Y) → U2_GA(X, Y, head_in_gg(X, nil))
GOPHER_IN_GA(X, Y) → HEAD_IN_GG(X, nil)
U2_GA(X, Y, head_out_gg(X, nil)) → U3_GA(X, Y, tail_in_ga(X, T))
U2_GA(X, Y, head_out_gg(X, nil)) → TAIL_IN_GA(X, T)
U3_GA(X, Y, tail_out_ga(X, T)) → U4_GA(X, Y, eq_in_ag(Y, cons(nil, T)))
U3_GA(X, Y, tail_out_ga(X, T)) → EQ_IN_AG(Y, cons(nil, T))
GOPHER_IN_GA(X, Y) → U5_GA(X, Y, head_in_ga(X, H))
GOPHER_IN_GA(X, Y) → HEAD_IN_GA(X, H)
U5_GA(X, Y, head_out_ga(X, H)) → U6_GA(X, Y, H, head_in_aa(H, U))
U5_GA(X, Y, head_out_ga(X, H)) → HEAD_IN_AA(H, U)
U6_GA(X, Y, H, head_out_aa(H, U)) → U7_GA(X, Y, H, U, tail_in_aa(H, V))
U6_GA(X, Y, H, head_out_aa(H, U)) → TAIL_IN_AA(H, V)
U7_GA(X, Y, H, U, tail_out_aa(H, V)) → U8_GA(X, Y, H, U, V, tail_in_ga(X, W))
U7_GA(X, Y, H, U, tail_out_aa(H, V)) → TAIL_IN_GA(X, W)
U8_GA(X, Y, H, U, V, tail_out_ga(X, W)) → U9_GA(X, Y, gopher_in_aa(cons(U, cons(V, W)), Y))
U8_GA(X, Y, H, U, V, tail_out_ga(X, W)) → GOPHER_IN_AA(cons(U, cons(V, W)), Y)
GOPHER_IN_AA(nil, L) → U1_AA(L, eq_in_ag(L, nil))
GOPHER_IN_AA(nil, L) → EQ_IN_AG(L, nil)
GOPHER_IN_AA(X, Y) → U2_AA(X, Y, head_in_ag(X, nil))
GOPHER_IN_AA(X, Y) → HEAD_IN_AG(X, nil)
U2_AA(X, Y, head_out_ag(X, nil)) → U3_AA(X, Y, tail_in_aa(X, T))
U2_AA(X, Y, head_out_ag(X, nil)) → TAIL_IN_AA(X, T)
U3_AA(X, Y, tail_out_aa(X, T)) → U4_AA(X, Y, eq_in_aa(Y, cons(nil, T)))
U3_AA(X, Y, tail_out_aa(X, T)) → EQ_IN_AA(Y, cons(nil, T))
GOPHER_IN_AA(X, Y) → U5_AA(X, Y, head_in_aa(X, H))
GOPHER_IN_AA(X, Y) → HEAD_IN_AA(X, H)
U5_AA(X, Y, head_out_aa(X, H)) → U6_AA(X, Y, H, head_in_aa(H, U))
U5_AA(X, Y, head_out_aa(X, H)) → HEAD_IN_AA(H, U)
U6_AA(X, Y, H, head_out_aa(H, U)) → U7_AA(X, Y, H, U, tail_in_aa(H, V))
U6_AA(X, Y, H, head_out_aa(H, U)) → TAIL_IN_AA(H, V)
U7_AA(X, Y, H, U, tail_out_aa(H, V)) → U8_AA(X, Y, H, U, V, tail_in_aa(X, W))
U7_AA(X, Y, H, U, tail_out_aa(H, V)) → TAIL_IN_AA(X, W)
U8_AA(X, Y, H, U, V, tail_out_aa(X, W)) → U9_AA(X, Y, gopher_in_aa(cons(U, cons(V, W)), Y))
U8_AA(X, Y, H, U, V, tail_out_aa(X, W)) → GOPHER_IN_AA(cons(U, cons(V, W)), Y)

The TRS R consists of the following rules:

gopher_in_ga(nil, L) → U1_ga(L, eq_in_ag(L, nil))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(L, eq_out_ag(L, nil)) → gopher_out_ga(nil, L)
gopher_in_ga(X, Y) → U2_ga(X, Y, head_in_gg(X, nil))
head_in_gg([], X1) → head_out_gg([], X1)
head_in_gg(.(X, X2), X) → head_out_gg(.(X, X2), X)
U2_ga(X, Y, head_out_gg(X, nil)) → U3_ga(X, Y, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, X), X) → tail_out_ga(.(X3, X), X)
U3_ga(X, Y, tail_out_ga(X, T)) → U4_ga(X, Y, eq_in_ag(Y, cons(nil, T)))
U4_ga(X, Y, eq_out_ag(Y, cons(nil, T))) → gopher_out_ga(X, Y)
gopher_in_ga(X, Y) → U5_ga(X, Y, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(X, X2), X) → head_out_ga(.(X, X2), X)
U5_ga(X, Y, head_out_ga(X, H)) → U6_ga(X, Y, H, head_in_aa(H, U))
head_in_aa([], X1) → head_out_aa([], X1)
head_in_aa(.(X, X2), X) → head_out_aa(.(X, X2), X)
U6_ga(X, Y, H, head_out_aa(H, U)) → U7_ga(X, Y, H, U, tail_in_aa(H, V))
tail_in_aa([], []) → tail_out_aa([], [])
tail_in_aa(.(X3, X), X) → tail_out_aa(.(X3, X), X)
U7_ga(X, Y, H, U, tail_out_aa(H, V)) → U8_ga(X, Y, H, U, V, tail_in_ga(X, W))
U8_ga(X, Y, H, U, V, tail_out_ga(X, W)) → U9_ga(X, Y, gopher_in_aa(cons(U, cons(V, W)), Y))
gopher_in_aa(nil, L) → U1_aa(L, eq_in_ag(L, nil))
U1_aa(L, eq_out_ag(L, nil)) → gopher_out_aa(nil, L)
gopher_in_aa(X, Y) → U2_aa(X, Y, head_in_ag(X, nil))
head_in_ag([], X1) → head_out_ag([], X1)
head_in_ag(.(X, X2), X) → head_out_ag(.(X, X2), X)
U2_aa(X, Y, head_out_ag(X, nil)) → U3_aa(X, Y, tail_in_aa(X, T))
U3_aa(X, Y, tail_out_aa(X, T)) → U4_aa(X, Y, eq_in_aa(Y, cons(nil, T)))
eq_in_aa(X, X) → eq_out_aa(X, X)
U4_aa(X, Y, eq_out_aa(Y, cons(nil, T))) → gopher_out_aa(X, Y)
gopher_in_aa(X, Y) → U5_aa(X, Y, head_in_aa(X, H))
U5_aa(X, Y, head_out_aa(X, H)) → U6_aa(X, Y, H, head_in_aa(H, U))
U6_aa(X, Y, H, head_out_aa(H, U)) → U7_aa(X, Y, H, U, tail_in_aa(H, V))
U7_aa(X, Y, H, U, tail_out_aa(H, V)) → U8_aa(X, Y, H, U, V, tail_in_aa(X, W))
U8_aa(X, Y, H, U, V, tail_out_aa(X, W)) → U9_aa(X, Y, gopher_in_aa(cons(U, cons(V, W)), Y))
U9_aa(X, Y, gopher_out_aa(cons(U, cons(V, W)), Y)) → gopher_out_aa(X, Y)
U9_ga(X, Y, gopher_out_aa(cons(U, cons(V, W)), Y)) → gopher_out_ga(X, Y)

The argument filtering Pi contains the following mapping:
gopher_in_ga(x1, x2)  =  gopher_in_ga(x1)
nil  =  nil
U1_ga(x1, x2)  =  U1_ga(x2)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1)
gopher_out_ga(x1, x2)  =  gopher_out_ga
U2_ga(x1, x2, x3)  =  U2_ga(x1, x3)
head_in_gg(x1, x2)  =  head_in_gg(x1, x2)
[]  =  []
head_out_gg(x1, x2)  =  head_out_gg
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3)  =  U3_ga(x3)
tail_in_ga(x1, x2)  =  tail_in_ga(x1)
tail_out_ga(x1, x2)  =  tail_out_ga(x2)
U4_ga(x1, x2, x3)  =  U4_ga(x3)
cons(x1, x2)  =  cons(x1, x2)
U5_ga(x1, x2, x3)  =  U5_ga(x1, x3)
head_in_ga(x1, x2)  =  head_in_ga(x1)
head_out_ga(x1, x2)  =  head_out_ga
U6_ga(x1, x2, x3, x4)  =  U6_ga(x1, x4)
head_in_aa(x1, x2)  =  head_in_aa
head_out_aa(x1, x2)  =  head_out_aa
U7_ga(x1, x2, x3, x4, x5)  =  U7_ga(x1, x5)
tail_in_aa(x1, x2)  =  tail_in_aa
tail_out_aa(x1, x2)  =  tail_out_aa
U8_ga(x1, x2, x3, x4, x5, x6)  =  U8_ga(x6)
U9_ga(x1, x2, x3)  =  U9_ga(x3)
gopher_in_aa(x1, x2)  =  gopher_in_aa
U1_aa(x1, x2)  =  U1_aa(x2)
gopher_out_aa(x1, x2)  =  gopher_out_aa
U2_aa(x1, x2, x3)  =  U2_aa(x3)
head_in_ag(x1, x2)  =  head_in_ag(x2)
head_out_ag(x1, x2)  =  head_out_ag
U3_aa(x1, x2, x3)  =  U3_aa(x3)
U4_aa(x1, x2, x3)  =  U4_aa(x3)
eq_in_aa(x1, x2)  =  eq_in_aa
eq_out_aa(x1, x2)  =  eq_out_aa
U5_aa(x1, x2, x3)  =  U5_aa(x3)
U6_aa(x1, x2, x3, x4)  =  U6_aa(x4)
U7_aa(x1, x2, x3, x4, x5)  =  U7_aa(x5)
U8_aa(x1, x2, x3, x4, x5, x6)  =  U8_aa(x6)
U9_aa(x1, x2, x3)  =  U9_aa(x3)
GOPHER_IN_GA(x1, x2)  =  GOPHER_IN_GA(x1)
U1_GA(x1, x2)  =  U1_GA(x2)
EQ_IN_AG(x1, x2)  =  EQ_IN_AG(x2)
U2_GA(x1, x2, x3)  =  U2_GA(x1, x3)
HEAD_IN_GG(x1, x2)  =  HEAD_IN_GG(x1, x2)
U3_GA(x1, x2, x3)  =  U3_GA(x3)
TAIL_IN_GA(x1, x2)  =  TAIL_IN_GA(x1)
U4_GA(x1, x2, x3)  =  U4_GA(x3)
U5_GA(x1, x2, x3)  =  U5_GA(x1, x3)
HEAD_IN_GA(x1, x2)  =  HEAD_IN_GA(x1)
U6_GA(x1, x2, x3, x4)  =  U6_GA(x1, x4)
HEAD_IN_AA(x1, x2)  =  HEAD_IN_AA
U7_GA(x1, x2, x3, x4, x5)  =  U7_GA(x1, x5)
TAIL_IN_AA(x1, x2)  =  TAIL_IN_AA
U8_GA(x1, x2, x3, x4, x5, x6)  =  U8_GA(x6)
U9_GA(x1, x2, x3)  =  U9_GA(x3)
GOPHER_IN_AA(x1, x2)  =  GOPHER_IN_AA
U1_AA(x1, x2)  =  U1_AA(x2)
U2_AA(x1, x2, x3)  =  U2_AA(x3)
HEAD_IN_AG(x1, x2)  =  HEAD_IN_AG(x2)
U3_AA(x1, x2, x3)  =  U3_AA(x3)
U4_AA(x1, x2, x3)  =  U4_AA(x3)
EQ_IN_AA(x1, x2)  =  EQ_IN_AA
U5_AA(x1, x2, x3)  =  U5_AA(x3)
U6_AA(x1, x2, x3, x4)  =  U6_AA(x4)
U7_AA(x1, x2, x3, x4, x5)  =  U7_AA(x5)
U8_AA(x1, x2, x3, x4, x5, x6)  =  U8_AA(x6)
U9_AA(x1, x2, x3)  =  U9_AA(x3)

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

(6) Obligation:

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

GOPHER_IN_GA(nil, L) → U1_GA(L, eq_in_ag(L, nil))
GOPHER_IN_GA(nil, L) → EQ_IN_AG(L, nil)
GOPHER_IN_GA(X, Y) → U2_GA(X, Y, head_in_gg(X, nil))
GOPHER_IN_GA(X, Y) → HEAD_IN_GG(X, nil)
U2_GA(X, Y, head_out_gg(X, nil)) → U3_GA(X, Y, tail_in_ga(X, T))
U2_GA(X, Y, head_out_gg(X, nil)) → TAIL_IN_GA(X, T)
U3_GA(X, Y, tail_out_ga(X, T)) → U4_GA(X, Y, eq_in_ag(Y, cons(nil, T)))
U3_GA(X, Y, tail_out_ga(X, T)) → EQ_IN_AG(Y, cons(nil, T))
GOPHER_IN_GA(X, Y) → U5_GA(X, Y, head_in_ga(X, H))
GOPHER_IN_GA(X, Y) → HEAD_IN_GA(X, H)
U5_GA(X, Y, head_out_ga(X, H)) → U6_GA(X, Y, H, head_in_aa(H, U))
U5_GA(X, Y, head_out_ga(X, H)) → HEAD_IN_AA(H, U)
U6_GA(X, Y, H, head_out_aa(H, U)) → U7_GA(X, Y, H, U, tail_in_aa(H, V))
U6_GA(X, Y, H, head_out_aa(H, U)) → TAIL_IN_AA(H, V)
U7_GA(X, Y, H, U, tail_out_aa(H, V)) → U8_GA(X, Y, H, U, V, tail_in_ga(X, W))
U7_GA(X, Y, H, U, tail_out_aa(H, V)) → TAIL_IN_GA(X, W)
U8_GA(X, Y, H, U, V, tail_out_ga(X, W)) → U9_GA(X, Y, gopher_in_aa(cons(U, cons(V, W)), Y))
U8_GA(X, Y, H, U, V, tail_out_ga(X, W)) → GOPHER_IN_AA(cons(U, cons(V, W)), Y)
GOPHER_IN_AA(nil, L) → U1_AA(L, eq_in_ag(L, nil))
GOPHER_IN_AA(nil, L) → EQ_IN_AG(L, nil)
GOPHER_IN_AA(X, Y) → U2_AA(X, Y, head_in_ag(X, nil))
GOPHER_IN_AA(X, Y) → HEAD_IN_AG(X, nil)
U2_AA(X, Y, head_out_ag(X, nil)) → U3_AA(X, Y, tail_in_aa(X, T))
U2_AA(X, Y, head_out_ag(X, nil)) → TAIL_IN_AA(X, T)
U3_AA(X, Y, tail_out_aa(X, T)) → U4_AA(X, Y, eq_in_aa(Y, cons(nil, T)))
U3_AA(X, Y, tail_out_aa(X, T)) → EQ_IN_AA(Y, cons(nil, T))
GOPHER_IN_AA(X, Y) → U5_AA(X, Y, head_in_aa(X, H))
GOPHER_IN_AA(X, Y) → HEAD_IN_AA(X, H)
U5_AA(X, Y, head_out_aa(X, H)) → U6_AA(X, Y, H, head_in_aa(H, U))
U5_AA(X, Y, head_out_aa(X, H)) → HEAD_IN_AA(H, U)
U6_AA(X, Y, H, head_out_aa(H, U)) → U7_AA(X, Y, H, U, tail_in_aa(H, V))
U6_AA(X, Y, H, head_out_aa(H, U)) → TAIL_IN_AA(H, V)
U7_AA(X, Y, H, U, tail_out_aa(H, V)) → U8_AA(X, Y, H, U, V, tail_in_aa(X, W))
U7_AA(X, Y, H, U, tail_out_aa(H, V)) → TAIL_IN_AA(X, W)
U8_AA(X, Y, H, U, V, tail_out_aa(X, W)) → U9_AA(X, Y, gopher_in_aa(cons(U, cons(V, W)), Y))
U8_AA(X, Y, H, U, V, tail_out_aa(X, W)) → GOPHER_IN_AA(cons(U, cons(V, W)), Y)

The TRS R consists of the following rules:

gopher_in_ga(nil, L) → U1_ga(L, eq_in_ag(L, nil))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(L, eq_out_ag(L, nil)) → gopher_out_ga(nil, L)
gopher_in_ga(X, Y) → U2_ga(X, Y, head_in_gg(X, nil))
head_in_gg([], X1) → head_out_gg([], X1)
head_in_gg(.(X, X2), X) → head_out_gg(.(X, X2), X)
U2_ga(X, Y, head_out_gg(X, nil)) → U3_ga(X, Y, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, X), X) → tail_out_ga(.(X3, X), X)
U3_ga(X, Y, tail_out_ga(X, T)) → U4_ga(X, Y, eq_in_ag(Y, cons(nil, T)))
U4_ga(X, Y, eq_out_ag(Y, cons(nil, T))) → gopher_out_ga(X, Y)
gopher_in_ga(X, Y) → U5_ga(X, Y, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(X, X2), X) → head_out_ga(.(X, X2), X)
U5_ga(X, Y, head_out_ga(X, H)) → U6_ga(X, Y, H, head_in_aa(H, U))
head_in_aa([], X1) → head_out_aa([], X1)
head_in_aa(.(X, X2), X) → head_out_aa(.(X, X2), X)
U6_ga(X, Y, H, head_out_aa(H, U)) → U7_ga(X, Y, H, U, tail_in_aa(H, V))
tail_in_aa([], []) → tail_out_aa([], [])
tail_in_aa(.(X3, X), X) → tail_out_aa(.(X3, X), X)
U7_ga(X, Y, H, U, tail_out_aa(H, V)) → U8_ga(X, Y, H, U, V, tail_in_ga(X, W))
U8_ga(X, Y, H, U, V, tail_out_ga(X, W)) → U9_ga(X, Y, gopher_in_aa(cons(U, cons(V, W)), Y))
gopher_in_aa(nil, L) → U1_aa(L, eq_in_ag(L, nil))
U1_aa(L, eq_out_ag(L, nil)) → gopher_out_aa(nil, L)
gopher_in_aa(X, Y) → U2_aa(X, Y, head_in_ag(X, nil))
head_in_ag([], X1) → head_out_ag([], X1)
head_in_ag(.(X, X2), X) → head_out_ag(.(X, X2), X)
U2_aa(X, Y, head_out_ag(X, nil)) → U3_aa(X, Y, tail_in_aa(X, T))
U3_aa(X, Y, tail_out_aa(X, T)) → U4_aa(X, Y, eq_in_aa(Y, cons(nil, T)))
eq_in_aa(X, X) → eq_out_aa(X, X)
U4_aa(X, Y, eq_out_aa(Y, cons(nil, T))) → gopher_out_aa(X, Y)
gopher_in_aa(X, Y) → U5_aa(X, Y, head_in_aa(X, H))
U5_aa(X, Y, head_out_aa(X, H)) → U6_aa(X, Y, H, head_in_aa(H, U))
U6_aa(X, Y, H, head_out_aa(H, U)) → U7_aa(X, Y, H, U, tail_in_aa(H, V))
U7_aa(X, Y, H, U, tail_out_aa(H, V)) → U8_aa(X, Y, H, U, V, tail_in_aa(X, W))
U8_aa(X, Y, H, U, V, tail_out_aa(X, W)) → U9_aa(X, Y, gopher_in_aa(cons(U, cons(V, W)), Y))
U9_aa(X, Y, gopher_out_aa(cons(U, cons(V, W)), Y)) → gopher_out_aa(X, Y)
U9_ga(X, Y, gopher_out_aa(cons(U, cons(V, W)), Y)) → gopher_out_ga(X, Y)

The argument filtering Pi contains the following mapping:
gopher_in_ga(x1, x2)  =  gopher_in_ga(x1)
nil  =  nil
U1_ga(x1, x2)  =  U1_ga(x2)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1)
gopher_out_ga(x1, x2)  =  gopher_out_ga
U2_ga(x1, x2, x3)  =  U2_ga(x1, x3)
head_in_gg(x1, x2)  =  head_in_gg(x1, x2)
[]  =  []
head_out_gg(x1, x2)  =  head_out_gg
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3)  =  U3_ga(x3)
tail_in_ga(x1, x2)  =  tail_in_ga(x1)
tail_out_ga(x1, x2)  =  tail_out_ga(x2)
U4_ga(x1, x2, x3)  =  U4_ga(x3)
cons(x1, x2)  =  cons(x1, x2)
U5_ga(x1, x2, x3)  =  U5_ga(x1, x3)
head_in_ga(x1, x2)  =  head_in_ga(x1)
head_out_ga(x1, x2)  =  head_out_ga
U6_ga(x1, x2, x3, x4)  =  U6_ga(x1, x4)
head_in_aa(x1, x2)  =  head_in_aa
head_out_aa(x1, x2)  =  head_out_aa
U7_ga(x1, x2, x3, x4, x5)  =  U7_ga(x1, x5)
tail_in_aa(x1, x2)  =  tail_in_aa
tail_out_aa(x1, x2)  =  tail_out_aa
U8_ga(x1, x2, x3, x4, x5, x6)  =  U8_ga(x6)
U9_ga(x1, x2, x3)  =  U9_ga(x3)
gopher_in_aa(x1, x2)  =  gopher_in_aa
U1_aa(x1, x2)  =  U1_aa(x2)
gopher_out_aa(x1, x2)  =  gopher_out_aa
U2_aa(x1, x2, x3)  =  U2_aa(x3)
head_in_ag(x1, x2)  =  head_in_ag(x2)
head_out_ag(x1, x2)  =  head_out_ag
U3_aa(x1, x2, x3)  =  U3_aa(x3)
U4_aa(x1, x2, x3)  =  U4_aa(x3)
eq_in_aa(x1, x2)  =  eq_in_aa
eq_out_aa(x1, x2)  =  eq_out_aa
U5_aa(x1, x2, x3)  =  U5_aa(x3)
U6_aa(x1, x2, x3, x4)  =  U6_aa(x4)
U7_aa(x1, x2, x3, x4, x5)  =  U7_aa(x5)
U8_aa(x1, x2, x3, x4, x5, x6)  =  U8_aa(x6)
U9_aa(x1, x2, x3)  =  U9_aa(x3)
GOPHER_IN_GA(x1, x2)  =  GOPHER_IN_GA(x1)
U1_GA(x1, x2)  =  U1_GA(x2)
EQ_IN_AG(x1, x2)  =  EQ_IN_AG(x2)
U2_GA(x1, x2, x3)  =  U2_GA(x1, x3)
HEAD_IN_GG(x1, x2)  =  HEAD_IN_GG(x1, x2)
U3_GA(x1, x2, x3)  =  U3_GA(x3)
TAIL_IN_GA(x1, x2)  =  TAIL_IN_GA(x1)
U4_GA(x1, x2, x3)  =  U4_GA(x3)
U5_GA(x1, x2, x3)  =  U5_GA(x1, x3)
HEAD_IN_GA(x1, x2)  =  HEAD_IN_GA(x1)
U6_GA(x1, x2, x3, x4)  =  U6_GA(x1, x4)
HEAD_IN_AA(x1, x2)  =  HEAD_IN_AA
U7_GA(x1, x2, x3, x4, x5)  =  U7_GA(x1, x5)
TAIL_IN_AA(x1, x2)  =  TAIL_IN_AA
U8_GA(x1, x2, x3, x4, x5, x6)  =  U8_GA(x6)
U9_GA(x1, x2, x3)  =  U9_GA(x3)
GOPHER_IN_AA(x1, x2)  =  GOPHER_IN_AA
U1_AA(x1, x2)  =  U1_AA(x2)
U2_AA(x1, x2, x3)  =  U2_AA(x3)
HEAD_IN_AG(x1, x2)  =  HEAD_IN_AG(x2)
U3_AA(x1, x2, x3)  =  U3_AA(x3)
U4_AA(x1, x2, x3)  =  U4_AA(x3)
EQ_IN_AA(x1, x2)  =  EQ_IN_AA
U5_AA(x1, x2, x3)  =  U5_AA(x3)
U6_AA(x1, x2, x3, x4)  =  U6_AA(x4)
U7_AA(x1, x2, x3, x4, x5)  =  U7_AA(x5)
U8_AA(x1, x2, x3, x4, x5, x6)  =  U8_AA(x6)
U9_AA(x1, x2, x3)  =  U9_AA(x3)

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

(7) DependencyGraphProof (EQUIVALENT transformation)

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

(8) Obligation:

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

GOPHER_IN_AA(X, Y) → U5_AA(X, Y, head_in_aa(X, H))
U5_AA(X, Y, head_out_aa(X, H)) → U6_AA(X, Y, H, head_in_aa(H, U))
U6_AA(X, Y, H, head_out_aa(H, U)) → U7_AA(X, Y, H, U, tail_in_aa(H, V))
U7_AA(X, Y, H, U, tail_out_aa(H, V)) → U8_AA(X, Y, H, U, V, tail_in_aa(X, W))
U8_AA(X, Y, H, U, V, tail_out_aa(X, W)) → GOPHER_IN_AA(cons(U, cons(V, W)), Y)

The TRS R consists of the following rules:

gopher_in_ga(nil, L) → U1_ga(L, eq_in_ag(L, nil))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(L, eq_out_ag(L, nil)) → gopher_out_ga(nil, L)
gopher_in_ga(X, Y) → U2_ga(X, Y, head_in_gg(X, nil))
head_in_gg([], X1) → head_out_gg([], X1)
head_in_gg(.(X, X2), X) → head_out_gg(.(X, X2), X)
U2_ga(X, Y, head_out_gg(X, nil)) → U3_ga(X, Y, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, X), X) → tail_out_ga(.(X3, X), X)
U3_ga(X, Y, tail_out_ga(X, T)) → U4_ga(X, Y, eq_in_ag(Y, cons(nil, T)))
U4_ga(X, Y, eq_out_ag(Y, cons(nil, T))) → gopher_out_ga(X, Y)
gopher_in_ga(X, Y) → U5_ga(X, Y, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(X, X2), X) → head_out_ga(.(X, X2), X)
U5_ga(X, Y, head_out_ga(X, H)) → U6_ga(X, Y, H, head_in_aa(H, U))
head_in_aa([], X1) → head_out_aa([], X1)
head_in_aa(.(X, X2), X) → head_out_aa(.(X, X2), X)
U6_ga(X, Y, H, head_out_aa(H, U)) → U7_ga(X, Y, H, U, tail_in_aa(H, V))
tail_in_aa([], []) → tail_out_aa([], [])
tail_in_aa(.(X3, X), X) → tail_out_aa(.(X3, X), X)
U7_ga(X, Y, H, U, tail_out_aa(H, V)) → U8_ga(X, Y, H, U, V, tail_in_ga(X, W))
U8_ga(X, Y, H, U, V, tail_out_ga(X, W)) → U9_ga(X, Y, gopher_in_aa(cons(U, cons(V, W)), Y))
gopher_in_aa(nil, L) → U1_aa(L, eq_in_ag(L, nil))
U1_aa(L, eq_out_ag(L, nil)) → gopher_out_aa(nil, L)
gopher_in_aa(X, Y) → U2_aa(X, Y, head_in_ag(X, nil))
head_in_ag([], X1) → head_out_ag([], X1)
head_in_ag(.(X, X2), X) → head_out_ag(.(X, X2), X)
U2_aa(X, Y, head_out_ag(X, nil)) → U3_aa(X, Y, tail_in_aa(X, T))
U3_aa(X, Y, tail_out_aa(X, T)) → U4_aa(X, Y, eq_in_aa(Y, cons(nil, T)))
eq_in_aa(X, X) → eq_out_aa(X, X)
U4_aa(X, Y, eq_out_aa(Y, cons(nil, T))) → gopher_out_aa(X, Y)
gopher_in_aa(X, Y) → U5_aa(X, Y, head_in_aa(X, H))
U5_aa(X, Y, head_out_aa(X, H)) → U6_aa(X, Y, H, head_in_aa(H, U))
U6_aa(X, Y, H, head_out_aa(H, U)) → U7_aa(X, Y, H, U, tail_in_aa(H, V))
U7_aa(X, Y, H, U, tail_out_aa(H, V)) → U8_aa(X, Y, H, U, V, tail_in_aa(X, W))
U8_aa(X, Y, H, U, V, tail_out_aa(X, W)) → U9_aa(X, Y, gopher_in_aa(cons(U, cons(V, W)), Y))
U9_aa(X, Y, gopher_out_aa(cons(U, cons(V, W)), Y)) → gopher_out_aa(X, Y)
U9_ga(X, Y, gopher_out_aa(cons(U, cons(V, W)), Y)) → gopher_out_ga(X, Y)

The argument filtering Pi contains the following mapping:
gopher_in_ga(x1, x2)  =  gopher_in_ga(x1)
nil  =  nil
U1_ga(x1, x2)  =  U1_ga(x2)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1)
gopher_out_ga(x1, x2)  =  gopher_out_ga
U2_ga(x1, x2, x3)  =  U2_ga(x1, x3)
head_in_gg(x1, x2)  =  head_in_gg(x1, x2)
[]  =  []
head_out_gg(x1, x2)  =  head_out_gg
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3)  =  U3_ga(x3)
tail_in_ga(x1, x2)  =  tail_in_ga(x1)
tail_out_ga(x1, x2)  =  tail_out_ga(x2)
U4_ga(x1, x2, x3)  =  U4_ga(x3)
cons(x1, x2)  =  cons(x1, x2)
U5_ga(x1, x2, x3)  =  U5_ga(x1, x3)
head_in_ga(x1, x2)  =  head_in_ga(x1)
head_out_ga(x1, x2)  =  head_out_ga
U6_ga(x1, x2, x3, x4)  =  U6_ga(x1, x4)
head_in_aa(x1, x2)  =  head_in_aa
head_out_aa(x1, x2)  =  head_out_aa
U7_ga(x1, x2, x3, x4, x5)  =  U7_ga(x1, x5)
tail_in_aa(x1, x2)  =  tail_in_aa
tail_out_aa(x1, x2)  =  tail_out_aa
U8_ga(x1, x2, x3, x4, x5, x6)  =  U8_ga(x6)
U9_ga(x1, x2, x3)  =  U9_ga(x3)
gopher_in_aa(x1, x2)  =  gopher_in_aa
U1_aa(x1, x2)  =  U1_aa(x2)
gopher_out_aa(x1, x2)  =  gopher_out_aa
U2_aa(x1, x2, x3)  =  U2_aa(x3)
head_in_ag(x1, x2)  =  head_in_ag(x2)
head_out_ag(x1, x2)  =  head_out_ag
U3_aa(x1, x2, x3)  =  U3_aa(x3)
U4_aa(x1, x2, x3)  =  U4_aa(x3)
eq_in_aa(x1, x2)  =  eq_in_aa
eq_out_aa(x1, x2)  =  eq_out_aa
U5_aa(x1, x2, x3)  =  U5_aa(x3)
U6_aa(x1, x2, x3, x4)  =  U6_aa(x4)
U7_aa(x1, x2, x3, x4, x5)  =  U7_aa(x5)
U8_aa(x1, x2, x3, x4, x5, x6)  =  U8_aa(x6)
U9_aa(x1, x2, x3)  =  U9_aa(x3)
GOPHER_IN_AA(x1, x2)  =  GOPHER_IN_AA
U5_AA(x1, x2, x3)  =  U5_AA(x3)
U6_AA(x1, x2, x3, x4)  =  U6_AA(x4)
U7_AA(x1, x2, x3, x4, x5)  =  U7_AA(x5)
U8_AA(x1, x2, x3, x4, x5, x6)  =  U8_AA(x6)

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

(9) UsableRulesProof (EQUIVALENT transformation)

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

(10) Obligation:

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

GOPHER_IN_AA(X, Y) → U5_AA(X, Y, head_in_aa(X, H))
U5_AA(X, Y, head_out_aa(X, H)) → U6_AA(X, Y, H, head_in_aa(H, U))
U6_AA(X, Y, H, head_out_aa(H, U)) → U7_AA(X, Y, H, U, tail_in_aa(H, V))
U7_AA(X, Y, H, U, tail_out_aa(H, V)) → U8_AA(X, Y, H, U, V, tail_in_aa(X, W))
U8_AA(X, Y, H, U, V, tail_out_aa(X, W)) → GOPHER_IN_AA(cons(U, cons(V, W)), Y)

The TRS R consists of the following rules:

head_in_aa([], X1) → head_out_aa([], X1)
head_in_aa(.(X, X2), X) → head_out_aa(.(X, X2), X)
tail_in_aa([], []) → tail_out_aa([], [])
tail_in_aa(.(X3, X), X) → tail_out_aa(.(X3, X), X)

The argument filtering Pi contains the following mapping:
[]  =  []
.(x1, x2)  =  .(x1, x2)
cons(x1, x2)  =  cons(x1, x2)
head_in_aa(x1, x2)  =  head_in_aa
head_out_aa(x1, x2)  =  head_out_aa
tail_in_aa(x1, x2)  =  tail_in_aa
tail_out_aa(x1, x2)  =  tail_out_aa
GOPHER_IN_AA(x1, x2)  =  GOPHER_IN_AA
U5_AA(x1, x2, x3)  =  U5_AA(x3)
U6_AA(x1, x2, x3, x4)  =  U6_AA(x4)
U7_AA(x1, x2, x3, x4, x5)  =  U7_AA(x5)
U8_AA(x1, x2, x3, x4, x5, x6)  =  U8_AA(x6)

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

(11) PiDPToQDPProof (SOUND transformation)

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

(12) Obligation:

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

GOPHER_IN_AAU5_AA(head_in_aa)
U5_AA(head_out_aa) → U6_AA(head_in_aa)
U6_AA(head_out_aa) → U7_AA(tail_in_aa)
U7_AA(tail_out_aa) → U8_AA(tail_in_aa)
U8_AA(tail_out_aa) → GOPHER_IN_AA

The TRS R consists of the following rules:

head_in_aahead_out_aa
tail_in_aatail_out_aa

The set Q consists of the following terms:

head_in_aa
tail_in_aa

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

(13) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule GOPHER_IN_AAU5_AA(head_in_aa) at position [0] we obtained the following new rules [LPAR04]:

GOPHER_IN_AAU5_AA(head_out_aa)

(14) Obligation:

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

U5_AA(head_out_aa) → U6_AA(head_in_aa)
U6_AA(head_out_aa) → U7_AA(tail_in_aa)
U7_AA(tail_out_aa) → U8_AA(tail_in_aa)
U8_AA(tail_out_aa) → GOPHER_IN_AA
GOPHER_IN_AAU5_AA(head_out_aa)

The TRS R consists of the following rules:

head_in_aahead_out_aa
tail_in_aatail_out_aa

The set Q consists of the following terms:

head_in_aa
tail_in_aa

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

(15) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule U5_AA(head_out_aa) → U6_AA(head_in_aa) at position [0] we obtained the following new rules [LPAR04]:

U5_AA(head_out_aa) → U6_AA(head_out_aa)

(16) Obligation:

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

U6_AA(head_out_aa) → U7_AA(tail_in_aa)
U7_AA(tail_out_aa) → U8_AA(tail_in_aa)
U8_AA(tail_out_aa) → GOPHER_IN_AA
GOPHER_IN_AAU5_AA(head_out_aa)
U5_AA(head_out_aa) → U6_AA(head_out_aa)

The TRS R consists of the following rules:

head_in_aahead_out_aa
tail_in_aatail_out_aa

The set Q consists of the following terms:

head_in_aa
tail_in_aa

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

(17) 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.

(18) Obligation:

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

U6_AA(head_out_aa) → U7_AA(tail_in_aa)
U7_AA(tail_out_aa) → U8_AA(tail_in_aa)
U8_AA(tail_out_aa) → GOPHER_IN_AA
GOPHER_IN_AAU5_AA(head_out_aa)
U5_AA(head_out_aa) → U6_AA(head_out_aa)

The TRS R consists of the following rules:

tail_in_aatail_out_aa

The set Q consists of the following terms:

head_in_aa
tail_in_aa

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

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

(20) Obligation:

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

U6_AA(head_out_aa) → U7_AA(tail_in_aa)
U7_AA(tail_out_aa) → U8_AA(tail_in_aa)
U8_AA(tail_out_aa) → GOPHER_IN_AA
GOPHER_IN_AAU5_AA(head_out_aa)
U5_AA(head_out_aa) → U6_AA(head_out_aa)

The TRS R consists of the following rules:

tail_in_aatail_out_aa

The set Q consists of the following terms:

tail_in_aa

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

(21) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule U6_AA(head_out_aa) → U7_AA(tail_in_aa) at position [0] we obtained the following new rules [LPAR04]:

U6_AA(head_out_aa) → U7_AA(tail_out_aa)

(22) Obligation:

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

U7_AA(tail_out_aa) → U8_AA(tail_in_aa)
U8_AA(tail_out_aa) → GOPHER_IN_AA
GOPHER_IN_AAU5_AA(head_out_aa)
U5_AA(head_out_aa) → U6_AA(head_out_aa)
U6_AA(head_out_aa) → U7_AA(tail_out_aa)

The TRS R consists of the following rules:

tail_in_aatail_out_aa

The set Q consists of the following terms:

tail_in_aa

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

(23) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule U7_AA(tail_out_aa) → U8_AA(tail_in_aa) at position [0] we obtained the following new rules [LPAR04]:

U7_AA(tail_out_aa) → U8_AA(tail_out_aa)

(24) Obligation:

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

U8_AA(tail_out_aa) → GOPHER_IN_AA
GOPHER_IN_AAU5_AA(head_out_aa)
U5_AA(head_out_aa) → U6_AA(head_out_aa)
U6_AA(head_out_aa) → U7_AA(tail_out_aa)
U7_AA(tail_out_aa) → U8_AA(tail_out_aa)

The TRS R consists of the following rules:

tail_in_aatail_out_aa

The set Q consists of the following terms:

tail_in_aa

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

(25) 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.

(26) Obligation:

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

U8_AA(tail_out_aa) → GOPHER_IN_AA
GOPHER_IN_AAU5_AA(head_out_aa)
U5_AA(head_out_aa) → U6_AA(head_out_aa)
U6_AA(head_out_aa) → U7_AA(tail_out_aa)
U7_AA(tail_out_aa) → U8_AA(tail_out_aa)

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

tail_in_aa

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

(27) 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_aa

(28) Obligation:

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

U8_AA(tail_out_aa) → GOPHER_IN_AA
GOPHER_IN_AAU5_AA(head_out_aa)
U5_AA(head_out_aa) → U6_AA(head_out_aa)
U6_AA(head_out_aa) → U7_AA(tail_out_aa)
U7_AA(tail_out_aa) → U8_AA(tail_out_aa)

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

(29) 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 = GOPHER_IN_AA evaluates to t =GOPHER_IN_AA

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




Rewriting sequence

GOPHER_IN_AAU5_AA(head_out_aa)
with rule GOPHER_IN_AAU5_AA(head_out_aa) at position [] and matcher [ ]

U5_AA(head_out_aa)U6_AA(head_out_aa)
with rule U5_AA(head_out_aa) → U6_AA(head_out_aa) at position [] and matcher [ ]

U6_AA(head_out_aa)U7_AA(tail_out_aa)
with rule U6_AA(head_out_aa) → U7_AA(tail_out_aa) at position [] and matcher [ ]

U7_AA(tail_out_aa)U8_AA(tail_out_aa)
with rule U7_AA(tail_out_aa) → U8_AA(tail_out_aa) at position [] and matcher [ ]

U8_AA(tail_out_aa)GOPHER_IN_AA
with rule U8_AA(tail_out_aa) → GOPHER_IN_AA

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.



(30) FALSE

(31) PrologToPiTRSProof (SOUND transformation)

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

gopher_in_ga(nil, L) → U1_ga(L, eq_in_ag(L, nil))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(L, eq_out_ag(L, nil)) → gopher_out_ga(nil, L)
gopher_in_ga(X, Y) → U2_ga(X, Y, head_in_gg(X, nil))
head_in_gg([], X1) → head_out_gg([], X1)
head_in_gg(.(X, X2), X) → head_out_gg(.(X, X2), X)
U2_ga(X, Y, head_out_gg(X, nil)) → U3_ga(X, Y, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, X), X) → tail_out_ga(.(X3, X), X)
U3_ga(X, Y, tail_out_ga(X, T)) → U4_ga(X, Y, eq_in_ag(Y, cons(nil, T)))
U4_ga(X, Y, eq_out_ag(Y, cons(nil, T))) → gopher_out_ga(X, Y)
gopher_in_ga(X, Y) → U5_ga(X, Y, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(X, X2), X) → head_out_ga(.(X, X2), X)
U5_ga(X, Y, head_out_ga(X, H)) → U6_ga(X, Y, H, head_in_aa(H, U))
head_in_aa([], X1) → head_out_aa([], X1)
head_in_aa(.(X, X2), X) → head_out_aa(.(X, X2), X)
U6_ga(X, Y, H, head_out_aa(H, U)) → U7_ga(X, Y, H, U, tail_in_aa(H, V))
tail_in_aa([], []) → tail_out_aa([], [])
tail_in_aa(.(X3, X), X) → tail_out_aa(.(X3, X), X)
U7_ga(X, Y, H, U, tail_out_aa(H, V)) → U8_ga(X, Y, H, U, V, tail_in_ga(X, W))
U8_ga(X, Y, H, U, V, tail_out_ga(X, W)) → U9_ga(X, Y, gopher_in_aa(cons(U, cons(V, W)), Y))
gopher_in_aa(nil, L) → U1_aa(L, eq_in_ag(L, nil))
U1_aa(L, eq_out_ag(L, nil)) → gopher_out_aa(nil, L)
gopher_in_aa(X, Y) → U2_aa(X, Y, head_in_ag(X, nil))
head_in_ag([], X1) → head_out_ag([], X1)
head_in_ag(.(X, X2), X) → head_out_ag(.(X, X2), X)
U2_aa(X, Y, head_out_ag(X, nil)) → U3_aa(X, Y, tail_in_aa(X, T))
U3_aa(X, Y, tail_out_aa(X, T)) → U4_aa(X, Y, eq_in_aa(Y, cons(nil, T)))
eq_in_aa(X, X) → eq_out_aa(X, X)
U4_aa(X, Y, eq_out_aa(Y, cons(nil, T))) → gopher_out_aa(X, Y)
gopher_in_aa(X, Y) → U5_aa(X, Y, head_in_aa(X, H))
U5_aa(X, Y, head_out_aa(X, H)) → U6_aa(X, Y, H, head_in_aa(H, U))
U6_aa(X, Y, H, head_out_aa(H, U)) → U7_aa(X, Y, H, U, tail_in_aa(H, V))
U7_aa(X, Y, H, U, tail_out_aa(H, V)) → U8_aa(X, Y, H, U, V, tail_in_aa(X, W))
U8_aa(X, Y, H, U, V, tail_out_aa(X, W)) → U9_aa(X, Y, gopher_in_aa(cons(U, cons(V, W)), Y))
U9_aa(X, Y, gopher_out_aa(cons(U, cons(V, W)), Y)) → gopher_out_aa(X, Y)
U9_ga(X, Y, gopher_out_aa(cons(U, cons(V, W)), Y)) → gopher_out_ga(X, Y)

The argument filtering Pi contains the following mapping:
gopher_in_ga(x1, x2)  =  gopher_in_ga(x1)
nil  =  nil
U1_ga(x1, x2)  =  U1_ga(x2)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1, x2)
gopher_out_ga(x1, x2)  =  gopher_out_ga(x1)
U2_ga(x1, x2, x3)  =  U2_ga(x1, x3)
head_in_gg(x1, x2)  =  head_in_gg(x1, x2)
[]  =  []
head_out_gg(x1, x2)  =  head_out_gg(x1, x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3)  =  U3_ga(x1, x3)
tail_in_ga(x1, x2)  =  tail_in_ga(x1)
tail_out_ga(x1, x2)  =  tail_out_ga(x1, x2)
U4_ga(x1, x2, x3)  =  U4_ga(x1, x3)
cons(x1, x2)  =  cons(x1, x2)
U5_ga(x1, x2, x3)  =  U5_ga(x1, x3)
head_in_ga(x1, x2)  =  head_in_ga(x1)
head_out_ga(x1, x2)  =  head_out_ga(x1)
U6_ga(x1, x2, x3, x4)  =  U6_ga(x1, x4)
head_in_aa(x1, x2)  =  head_in_aa
head_out_aa(x1, x2)  =  head_out_aa
U7_ga(x1, x2, x3, x4, x5)  =  U7_ga(x1, x5)
tail_in_aa(x1, x2)  =  tail_in_aa
tail_out_aa(x1, x2)  =  tail_out_aa
U8_ga(x1, x2, x3, x4, x5, x6)  =  U8_ga(x1, x6)
U9_ga(x1, x2, x3)  =  U9_ga(x1, x3)
gopher_in_aa(x1, x2)  =  gopher_in_aa
U1_aa(x1, x2)  =  U1_aa(x2)
gopher_out_aa(x1, x2)  =  gopher_out_aa
U2_aa(x1, x2, x3)  =  U2_aa(x3)
head_in_ag(x1, x2)  =  head_in_ag(x2)
head_out_ag(x1, x2)  =  head_out_ag(x2)
U3_aa(x1, x2, x3)  =  U3_aa(x3)
U4_aa(x1, x2, x3)  =  U4_aa(x3)
eq_in_aa(x1, x2)  =  eq_in_aa
eq_out_aa(x1, x2)  =  eq_out_aa
U5_aa(x1, x2, x3)  =  U5_aa(x3)
U6_aa(x1, x2, x3, x4)  =  U6_aa(x4)
U7_aa(x1, x2, x3, x4, x5)  =  U7_aa(x5)
U8_aa(x1, x2, x3, x4, x5, x6)  =  U8_aa(x6)
U9_aa(x1, x2, x3)  =  U9_aa(x3)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(32) Obligation:

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

gopher_in_ga(nil, L) → U1_ga(L, eq_in_ag(L, nil))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(L, eq_out_ag(L, nil)) → gopher_out_ga(nil, L)
gopher_in_ga(X, Y) → U2_ga(X, Y, head_in_gg(X, nil))
head_in_gg([], X1) → head_out_gg([], X1)
head_in_gg(.(X, X2), X) → head_out_gg(.(X, X2), X)
U2_ga(X, Y, head_out_gg(X, nil)) → U3_ga(X, Y, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, X), X) → tail_out_ga(.(X3, X), X)
U3_ga(X, Y, tail_out_ga(X, T)) → U4_ga(X, Y, eq_in_ag(Y, cons(nil, T)))
U4_ga(X, Y, eq_out_ag(Y, cons(nil, T))) → gopher_out_ga(X, Y)
gopher_in_ga(X, Y) → U5_ga(X, Y, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(X, X2), X) → head_out_ga(.(X, X2), X)
U5_ga(X, Y, head_out_ga(X, H)) → U6_ga(X, Y, H, head_in_aa(H, U))
head_in_aa([], X1) → head_out_aa([], X1)
head_in_aa(.(X, X2), X) → head_out_aa(.(X, X2), X)
U6_ga(X, Y, H, head_out_aa(H, U)) → U7_ga(X, Y, H, U, tail_in_aa(H, V))
tail_in_aa([], []) → tail_out_aa([], [])
tail_in_aa(.(X3, X), X) → tail_out_aa(.(X3, X), X)
U7_ga(X, Y, H, U, tail_out_aa(H, V)) → U8_ga(X, Y, H, U, V, tail_in_ga(X, W))
U8_ga(X, Y, H, U, V, tail_out_ga(X, W)) → U9_ga(X, Y, gopher_in_aa(cons(U, cons(V, W)), Y))
gopher_in_aa(nil, L) → U1_aa(L, eq_in_ag(L, nil))
U1_aa(L, eq_out_ag(L, nil)) → gopher_out_aa(nil, L)
gopher_in_aa(X, Y) → U2_aa(X, Y, head_in_ag(X, nil))
head_in_ag([], X1) → head_out_ag([], X1)
head_in_ag(.(X, X2), X) → head_out_ag(.(X, X2), X)
U2_aa(X, Y, head_out_ag(X, nil)) → U3_aa(X, Y, tail_in_aa(X, T))
U3_aa(X, Y, tail_out_aa(X, T)) → U4_aa(X, Y, eq_in_aa(Y, cons(nil, T)))
eq_in_aa(X, X) → eq_out_aa(X, X)
U4_aa(X, Y, eq_out_aa(Y, cons(nil, T))) → gopher_out_aa(X, Y)
gopher_in_aa(X, Y) → U5_aa(X, Y, head_in_aa(X, H))
U5_aa(X, Y, head_out_aa(X, H)) → U6_aa(X, Y, H, head_in_aa(H, U))
U6_aa(X, Y, H, head_out_aa(H, U)) → U7_aa(X, Y, H, U, tail_in_aa(H, V))
U7_aa(X, Y, H, U, tail_out_aa(H, V)) → U8_aa(X, Y, H, U, V, tail_in_aa(X, W))
U8_aa(X, Y, H, U, V, tail_out_aa(X, W)) → U9_aa(X, Y, gopher_in_aa(cons(U, cons(V, W)), Y))
U9_aa(X, Y, gopher_out_aa(cons(U, cons(V, W)), Y)) → gopher_out_aa(X, Y)
U9_ga(X, Y, gopher_out_aa(cons(U, cons(V, W)), Y)) → gopher_out_ga(X, Y)

The argument filtering Pi contains the following mapping:
gopher_in_ga(x1, x2)  =  gopher_in_ga(x1)
nil  =  nil
U1_ga(x1, x2)  =  U1_ga(x2)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1, x2)
gopher_out_ga(x1, x2)  =  gopher_out_ga(x1)
U2_ga(x1, x2, x3)  =  U2_ga(x1, x3)
head_in_gg(x1, x2)  =  head_in_gg(x1, x2)
[]  =  []
head_out_gg(x1, x2)  =  head_out_gg(x1, x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3)  =  U3_ga(x1, x3)
tail_in_ga(x1, x2)  =  tail_in_ga(x1)
tail_out_ga(x1, x2)  =  tail_out_ga(x1, x2)
U4_ga(x1, x2, x3)  =  U4_ga(x1, x3)
cons(x1, x2)  =  cons(x1, x2)
U5_ga(x1, x2, x3)  =  U5_ga(x1, x3)
head_in_ga(x1, x2)  =  head_in_ga(x1)
head_out_ga(x1, x2)  =  head_out_ga(x1)
U6_ga(x1, x2, x3, x4)  =  U6_ga(x1, x4)
head_in_aa(x1, x2)  =  head_in_aa
head_out_aa(x1, x2)  =  head_out_aa
U7_ga(x1, x2, x3, x4, x5)  =  U7_ga(x1, x5)
tail_in_aa(x1, x2)  =  tail_in_aa
tail_out_aa(x1, x2)  =  tail_out_aa
U8_ga(x1, x2, x3, x4, x5, x6)  =  U8_ga(x1, x6)
U9_ga(x1, x2, x3)  =  U9_ga(x1, x3)
gopher_in_aa(x1, x2)  =  gopher_in_aa
U1_aa(x1, x2)  =  U1_aa(x2)
gopher_out_aa(x1, x2)  =  gopher_out_aa
U2_aa(x1, x2, x3)  =  U2_aa(x3)
head_in_ag(x1, x2)  =  head_in_ag(x2)
head_out_ag(x1, x2)  =  head_out_ag(x2)
U3_aa(x1, x2, x3)  =  U3_aa(x3)
U4_aa(x1, x2, x3)  =  U4_aa(x3)
eq_in_aa(x1, x2)  =  eq_in_aa
eq_out_aa(x1, x2)  =  eq_out_aa
U5_aa(x1, x2, x3)  =  U5_aa(x3)
U6_aa(x1, x2, x3, x4)  =  U6_aa(x4)
U7_aa(x1, x2, x3, x4, x5)  =  U7_aa(x5)
U8_aa(x1, x2, x3, x4, x5, x6)  =  U8_aa(x6)
U9_aa(x1, x2, x3)  =  U9_aa(x3)

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

GOPHER_IN_GA(nil, L) → U1_GA(L, eq_in_ag(L, nil))
GOPHER_IN_GA(nil, L) → EQ_IN_AG(L, nil)
GOPHER_IN_GA(X, Y) → U2_GA(X, Y, head_in_gg(X, nil))
GOPHER_IN_GA(X, Y) → HEAD_IN_GG(X, nil)
U2_GA(X, Y, head_out_gg(X, nil)) → U3_GA(X, Y, tail_in_ga(X, T))
U2_GA(X, Y, head_out_gg(X, nil)) → TAIL_IN_GA(X, T)
U3_GA(X, Y, tail_out_ga(X, T)) → U4_GA(X, Y, eq_in_ag(Y, cons(nil, T)))
U3_GA(X, Y, tail_out_ga(X, T)) → EQ_IN_AG(Y, cons(nil, T))
GOPHER_IN_GA(X, Y) → U5_GA(X, Y, head_in_ga(X, H))
GOPHER_IN_GA(X, Y) → HEAD_IN_GA(X, H)
U5_GA(X, Y, head_out_ga(X, H)) → U6_GA(X, Y, H, head_in_aa(H, U))
U5_GA(X, Y, head_out_ga(X, H)) → HEAD_IN_AA(H, U)
U6_GA(X, Y, H, head_out_aa(H, U)) → U7_GA(X, Y, H, U, tail_in_aa(H, V))
U6_GA(X, Y, H, head_out_aa(H, U)) → TAIL_IN_AA(H, V)
U7_GA(X, Y, H, U, tail_out_aa(H, V)) → U8_GA(X, Y, H, U, V, tail_in_ga(X, W))
U7_GA(X, Y, H, U, tail_out_aa(H, V)) → TAIL_IN_GA(X, W)
U8_GA(X, Y, H, U, V, tail_out_ga(X, W)) → U9_GA(X, Y, gopher_in_aa(cons(U, cons(V, W)), Y))
U8_GA(X, Y, H, U, V, tail_out_ga(X, W)) → GOPHER_IN_AA(cons(U, cons(V, W)), Y)
GOPHER_IN_AA(nil, L) → U1_AA(L, eq_in_ag(L, nil))
GOPHER_IN_AA(nil, L) → EQ_IN_AG(L, nil)
GOPHER_IN_AA(X, Y) → U2_AA(X, Y, head_in_ag(X, nil))
GOPHER_IN_AA(X, Y) → HEAD_IN_AG(X, nil)
U2_AA(X, Y, head_out_ag(X, nil)) → U3_AA(X, Y, tail_in_aa(X, T))
U2_AA(X, Y, head_out_ag(X, nil)) → TAIL_IN_AA(X, T)
U3_AA(X, Y, tail_out_aa(X, T)) → U4_AA(X, Y, eq_in_aa(Y, cons(nil, T)))
U3_AA(X, Y, tail_out_aa(X, T)) → EQ_IN_AA(Y, cons(nil, T))
GOPHER_IN_AA(X, Y) → U5_AA(X, Y, head_in_aa(X, H))
GOPHER_IN_AA(X, Y) → HEAD_IN_AA(X, H)
U5_AA(X, Y, head_out_aa(X, H)) → U6_AA(X, Y, H, head_in_aa(H, U))
U5_AA(X, Y, head_out_aa(X, H)) → HEAD_IN_AA(H, U)
U6_AA(X, Y, H, head_out_aa(H, U)) → U7_AA(X, Y, H, U, tail_in_aa(H, V))
U6_AA(X, Y, H, head_out_aa(H, U)) → TAIL_IN_AA(H, V)
U7_AA(X, Y, H, U, tail_out_aa(H, V)) → U8_AA(X, Y, H, U, V, tail_in_aa(X, W))
U7_AA(X, Y, H, U, tail_out_aa(H, V)) → TAIL_IN_AA(X, W)
U8_AA(X, Y, H, U, V, tail_out_aa(X, W)) → U9_AA(X, Y, gopher_in_aa(cons(U, cons(V, W)), Y))
U8_AA(X, Y, H, U, V, tail_out_aa(X, W)) → GOPHER_IN_AA(cons(U, cons(V, W)), Y)

The TRS R consists of the following rules:

gopher_in_ga(nil, L) → U1_ga(L, eq_in_ag(L, nil))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(L, eq_out_ag(L, nil)) → gopher_out_ga(nil, L)
gopher_in_ga(X, Y) → U2_ga(X, Y, head_in_gg(X, nil))
head_in_gg([], X1) → head_out_gg([], X1)
head_in_gg(.(X, X2), X) → head_out_gg(.(X, X2), X)
U2_ga(X, Y, head_out_gg(X, nil)) → U3_ga(X, Y, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, X), X) → tail_out_ga(.(X3, X), X)
U3_ga(X, Y, tail_out_ga(X, T)) → U4_ga(X, Y, eq_in_ag(Y, cons(nil, T)))
U4_ga(X, Y, eq_out_ag(Y, cons(nil, T))) → gopher_out_ga(X, Y)
gopher_in_ga(X, Y) → U5_ga(X, Y, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(X, X2), X) → head_out_ga(.(X, X2), X)
U5_ga(X, Y, head_out_ga(X, H)) → U6_ga(X, Y, H, head_in_aa(H, U))
head_in_aa([], X1) → head_out_aa([], X1)
head_in_aa(.(X, X2), X) → head_out_aa(.(X, X2), X)
U6_ga(X, Y, H, head_out_aa(H, U)) → U7_ga(X, Y, H, U, tail_in_aa(H, V))
tail_in_aa([], []) → tail_out_aa([], [])
tail_in_aa(.(X3, X), X) → tail_out_aa(.(X3, X), X)
U7_ga(X, Y, H, U, tail_out_aa(H, V)) → U8_ga(X, Y, H, U, V, tail_in_ga(X, W))
U8_ga(X, Y, H, U, V, tail_out_ga(X, W)) → U9_ga(X, Y, gopher_in_aa(cons(U, cons(V, W)), Y))
gopher_in_aa(nil, L) → U1_aa(L, eq_in_ag(L, nil))
U1_aa(L, eq_out_ag(L, nil)) → gopher_out_aa(nil, L)
gopher_in_aa(X, Y) → U2_aa(X, Y, head_in_ag(X, nil))
head_in_ag([], X1) → head_out_ag([], X1)
head_in_ag(.(X, X2), X) → head_out_ag(.(X, X2), X)
U2_aa(X, Y, head_out_ag(X, nil)) → U3_aa(X, Y, tail_in_aa(X, T))
U3_aa(X, Y, tail_out_aa(X, T)) → U4_aa(X, Y, eq_in_aa(Y, cons(nil, T)))
eq_in_aa(X, X) → eq_out_aa(X, X)
U4_aa(X, Y, eq_out_aa(Y, cons(nil, T))) → gopher_out_aa(X, Y)
gopher_in_aa(X, Y) → U5_aa(X, Y, head_in_aa(X, H))
U5_aa(X, Y, head_out_aa(X, H)) → U6_aa(X, Y, H, head_in_aa(H, U))
U6_aa(X, Y, H, head_out_aa(H, U)) → U7_aa(X, Y, H, U, tail_in_aa(H, V))
U7_aa(X, Y, H, U, tail_out_aa(H, V)) → U8_aa(X, Y, H, U, V, tail_in_aa(X, W))
U8_aa(X, Y, H, U, V, tail_out_aa(X, W)) → U9_aa(X, Y, gopher_in_aa(cons(U, cons(V, W)), Y))
U9_aa(X, Y, gopher_out_aa(cons(U, cons(V, W)), Y)) → gopher_out_aa(X, Y)
U9_ga(X, Y, gopher_out_aa(cons(U, cons(V, W)), Y)) → gopher_out_ga(X, Y)

The argument filtering Pi contains the following mapping:
gopher_in_ga(x1, x2)  =  gopher_in_ga(x1)
nil  =  nil
U1_ga(x1, x2)  =  U1_ga(x2)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1, x2)
gopher_out_ga(x1, x2)  =  gopher_out_ga(x1)
U2_ga(x1, x2, x3)  =  U2_ga(x1, x3)
head_in_gg(x1, x2)  =  head_in_gg(x1, x2)
[]  =  []
head_out_gg(x1, x2)  =  head_out_gg(x1, x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3)  =  U3_ga(x1, x3)
tail_in_ga(x1, x2)  =  tail_in_ga(x1)
tail_out_ga(x1, x2)  =  tail_out_ga(x1, x2)
U4_ga(x1, x2, x3)  =  U4_ga(x1, x3)
cons(x1, x2)  =  cons(x1, x2)
U5_ga(x1, x2, x3)  =  U5_ga(x1, x3)
head_in_ga(x1, x2)  =  head_in_ga(x1)
head_out_ga(x1, x2)  =  head_out_ga(x1)
U6_ga(x1, x2, x3, x4)  =  U6_ga(x1, x4)
head_in_aa(x1, x2)  =  head_in_aa
head_out_aa(x1, x2)  =  head_out_aa
U7_ga(x1, x2, x3, x4, x5)  =  U7_ga(x1, x5)
tail_in_aa(x1, x2)  =  tail_in_aa
tail_out_aa(x1, x2)  =  tail_out_aa
U8_ga(x1, x2, x3, x4, x5, x6)  =  U8_ga(x1, x6)
U9_ga(x1, x2, x3)  =  U9_ga(x1, x3)
gopher_in_aa(x1, x2)  =  gopher_in_aa
U1_aa(x1, x2)  =  U1_aa(x2)
gopher_out_aa(x1, x2)  =  gopher_out_aa
U2_aa(x1, x2, x3)  =  U2_aa(x3)
head_in_ag(x1, x2)  =  head_in_ag(x2)
head_out_ag(x1, x2)  =  head_out_ag(x2)
U3_aa(x1, x2, x3)  =  U3_aa(x3)
U4_aa(x1, x2, x3)  =  U4_aa(x3)
eq_in_aa(x1, x2)  =  eq_in_aa
eq_out_aa(x1, x2)  =  eq_out_aa
U5_aa(x1, x2, x3)  =  U5_aa(x3)
U6_aa(x1, x2, x3, x4)  =  U6_aa(x4)
U7_aa(x1, x2, x3, x4, x5)  =  U7_aa(x5)
U8_aa(x1, x2, x3, x4, x5, x6)  =  U8_aa(x6)
U9_aa(x1, x2, x3)  =  U9_aa(x3)
GOPHER_IN_GA(x1, x2)  =  GOPHER_IN_GA(x1)
U1_GA(x1, x2)  =  U1_GA(x2)
EQ_IN_AG(x1, x2)  =  EQ_IN_AG(x2)
U2_GA(x1, x2, x3)  =  U2_GA(x1, x3)
HEAD_IN_GG(x1, x2)  =  HEAD_IN_GG(x1, x2)
U3_GA(x1, x2, x3)  =  U3_GA(x1, x3)
TAIL_IN_GA(x1, x2)  =  TAIL_IN_GA(x1)
U4_GA(x1, x2, x3)  =  U4_GA(x1, x3)
U5_GA(x1, x2, x3)  =  U5_GA(x1, x3)
HEAD_IN_GA(x1, x2)  =  HEAD_IN_GA(x1)
U6_GA(x1, x2, x3, x4)  =  U6_GA(x1, x4)
HEAD_IN_AA(x1, x2)  =  HEAD_IN_AA
U7_GA(x1, x2, x3, x4, x5)  =  U7_GA(x1, x5)
TAIL_IN_AA(x1, x2)  =  TAIL_IN_AA
U8_GA(x1, x2, x3, x4, x5, x6)  =  U8_GA(x1, x6)
U9_GA(x1, x2, x3)  =  U9_GA(x1, x3)
GOPHER_IN_AA(x1, x2)  =  GOPHER_IN_AA
U1_AA(x1, x2)  =  U1_AA(x2)
U2_AA(x1, x2, x3)  =  U2_AA(x3)
HEAD_IN_AG(x1, x2)  =  HEAD_IN_AG(x2)
U3_AA(x1, x2, x3)  =  U3_AA(x3)
U4_AA(x1, x2, x3)  =  U4_AA(x3)
EQ_IN_AA(x1, x2)  =  EQ_IN_AA
U5_AA(x1, x2, x3)  =  U5_AA(x3)
U6_AA(x1, x2, x3, x4)  =  U6_AA(x4)
U7_AA(x1, x2, x3, x4, x5)  =  U7_AA(x5)
U8_AA(x1, x2, x3, x4, x5, x6)  =  U8_AA(x6)
U9_AA(x1, x2, x3)  =  U9_AA(x3)

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

(34) Obligation:

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

GOPHER_IN_GA(nil, L) → U1_GA(L, eq_in_ag(L, nil))
GOPHER_IN_GA(nil, L) → EQ_IN_AG(L, nil)
GOPHER_IN_GA(X, Y) → U2_GA(X, Y, head_in_gg(X, nil))
GOPHER_IN_GA(X, Y) → HEAD_IN_GG(X, nil)
U2_GA(X, Y, head_out_gg(X, nil)) → U3_GA(X, Y, tail_in_ga(X, T))
U2_GA(X, Y, head_out_gg(X, nil)) → TAIL_IN_GA(X, T)
U3_GA(X, Y, tail_out_ga(X, T)) → U4_GA(X, Y, eq_in_ag(Y, cons(nil, T)))
U3_GA(X, Y, tail_out_ga(X, T)) → EQ_IN_AG(Y, cons(nil, T))
GOPHER_IN_GA(X, Y) → U5_GA(X, Y, head_in_ga(X, H))
GOPHER_IN_GA(X, Y) → HEAD_IN_GA(X, H)
U5_GA(X, Y, head_out_ga(X, H)) → U6_GA(X, Y, H, head_in_aa(H, U))
U5_GA(X, Y, head_out_ga(X, H)) → HEAD_IN_AA(H, U)
U6_GA(X, Y, H, head_out_aa(H, U)) → U7_GA(X, Y, H, U, tail_in_aa(H, V))
U6_GA(X, Y, H, head_out_aa(H, U)) → TAIL_IN_AA(H, V)
U7_GA(X, Y, H, U, tail_out_aa(H, V)) → U8_GA(X, Y, H, U, V, tail_in_ga(X, W))
U7_GA(X, Y, H, U, tail_out_aa(H, V)) → TAIL_IN_GA(X, W)
U8_GA(X, Y, H, U, V, tail_out_ga(X, W)) → U9_GA(X, Y, gopher_in_aa(cons(U, cons(V, W)), Y))
U8_GA(X, Y, H, U, V, tail_out_ga(X, W)) → GOPHER_IN_AA(cons(U, cons(V, W)), Y)
GOPHER_IN_AA(nil, L) → U1_AA(L, eq_in_ag(L, nil))
GOPHER_IN_AA(nil, L) → EQ_IN_AG(L, nil)
GOPHER_IN_AA(X, Y) → U2_AA(X, Y, head_in_ag(X, nil))
GOPHER_IN_AA(X, Y) → HEAD_IN_AG(X, nil)
U2_AA(X, Y, head_out_ag(X, nil)) → U3_AA(X, Y, tail_in_aa(X, T))
U2_AA(X, Y, head_out_ag(X, nil)) → TAIL_IN_AA(X, T)
U3_AA(X, Y, tail_out_aa(X, T)) → U4_AA(X, Y, eq_in_aa(Y, cons(nil, T)))
U3_AA(X, Y, tail_out_aa(X, T)) → EQ_IN_AA(Y, cons(nil, T))
GOPHER_IN_AA(X, Y) → U5_AA(X, Y, head_in_aa(X, H))
GOPHER_IN_AA(X, Y) → HEAD_IN_AA(X, H)
U5_AA(X, Y, head_out_aa(X, H)) → U6_AA(X, Y, H, head_in_aa(H, U))
U5_AA(X, Y, head_out_aa(X, H)) → HEAD_IN_AA(H, U)
U6_AA(X, Y, H, head_out_aa(H, U)) → U7_AA(X, Y, H, U, tail_in_aa(H, V))
U6_AA(X, Y, H, head_out_aa(H, U)) → TAIL_IN_AA(H, V)
U7_AA(X, Y, H, U, tail_out_aa(H, V)) → U8_AA(X, Y, H, U, V, tail_in_aa(X, W))
U7_AA(X, Y, H, U, tail_out_aa(H, V)) → TAIL_IN_AA(X, W)
U8_AA(X, Y, H, U, V, tail_out_aa(X, W)) → U9_AA(X, Y, gopher_in_aa(cons(U, cons(V, W)), Y))
U8_AA(X, Y, H, U, V, tail_out_aa(X, W)) → GOPHER_IN_AA(cons(U, cons(V, W)), Y)

The TRS R consists of the following rules:

gopher_in_ga(nil, L) → U1_ga(L, eq_in_ag(L, nil))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(L, eq_out_ag(L, nil)) → gopher_out_ga(nil, L)
gopher_in_ga(X, Y) → U2_ga(X, Y, head_in_gg(X, nil))
head_in_gg([], X1) → head_out_gg([], X1)
head_in_gg(.(X, X2), X) → head_out_gg(.(X, X2), X)
U2_ga(X, Y, head_out_gg(X, nil)) → U3_ga(X, Y, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, X), X) → tail_out_ga(.(X3, X), X)
U3_ga(X, Y, tail_out_ga(X, T)) → U4_ga(X, Y, eq_in_ag(Y, cons(nil, T)))
U4_ga(X, Y, eq_out_ag(Y, cons(nil, T))) → gopher_out_ga(X, Y)
gopher_in_ga(X, Y) → U5_ga(X, Y, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(X, X2), X) → head_out_ga(.(X, X2), X)
U5_ga(X, Y, head_out_ga(X, H)) → U6_ga(X, Y, H, head_in_aa(H, U))
head_in_aa([], X1) → head_out_aa([], X1)
head_in_aa(.(X, X2), X) → head_out_aa(.(X, X2), X)
U6_ga(X, Y, H, head_out_aa(H, U)) → U7_ga(X, Y, H, U, tail_in_aa(H, V))
tail_in_aa([], []) → tail_out_aa([], [])
tail_in_aa(.(X3, X), X) → tail_out_aa(.(X3, X), X)
U7_ga(X, Y, H, U, tail_out_aa(H, V)) → U8_ga(X, Y, H, U, V, tail_in_ga(X, W))
U8_ga(X, Y, H, U, V, tail_out_ga(X, W)) → U9_ga(X, Y, gopher_in_aa(cons(U, cons(V, W)), Y))
gopher_in_aa(nil, L) → U1_aa(L, eq_in_ag(L, nil))
U1_aa(L, eq_out_ag(L, nil)) → gopher_out_aa(nil, L)
gopher_in_aa(X, Y) → U2_aa(X, Y, head_in_ag(X, nil))
head_in_ag([], X1) → head_out_ag([], X1)
head_in_ag(.(X, X2), X) → head_out_ag(.(X, X2), X)
U2_aa(X, Y, head_out_ag(X, nil)) → U3_aa(X, Y, tail_in_aa(X, T))
U3_aa(X, Y, tail_out_aa(X, T)) → U4_aa(X, Y, eq_in_aa(Y, cons(nil, T)))
eq_in_aa(X, X) → eq_out_aa(X, X)
U4_aa(X, Y, eq_out_aa(Y, cons(nil, T))) → gopher_out_aa(X, Y)
gopher_in_aa(X, Y) → U5_aa(X, Y, head_in_aa(X, H))
U5_aa(X, Y, head_out_aa(X, H)) → U6_aa(X, Y, H, head_in_aa(H, U))
U6_aa(X, Y, H, head_out_aa(H, U)) → U7_aa(X, Y, H, U, tail_in_aa(H, V))
U7_aa(X, Y, H, U, tail_out_aa(H, V)) → U8_aa(X, Y, H, U, V, tail_in_aa(X, W))
U8_aa(X, Y, H, U, V, tail_out_aa(X, W)) → U9_aa(X, Y, gopher_in_aa(cons(U, cons(V, W)), Y))
U9_aa(X, Y, gopher_out_aa(cons(U, cons(V, W)), Y)) → gopher_out_aa(X, Y)
U9_ga(X, Y, gopher_out_aa(cons(U, cons(V, W)), Y)) → gopher_out_ga(X, Y)

The argument filtering Pi contains the following mapping:
gopher_in_ga(x1, x2)  =  gopher_in_ga(x1)
nil  =  nil
U1_ga(x1, x2)  =  U1_ga(x2)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1, x2)
gopher_out_ga(x1, x2)  =  gopher_out_ga(x1)
U2_ga(x1, x2, x3)  =  U2_ga(x1, x3)
head_in_gg(x1, x2)  =  head_in_gg(x1, x2)
[]  =  []
head_out_gg(x1, x2)  =  head_out_gg(x1, x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3)  =  U3_ga(x1, x3)
tail_in_ga(x1, x2)  =  tail_in_ga(x1)
tail_out_ga(x1, x2)  =  tail_out_ga(x1, x2)
U4_ga(x1, x2, x3)  =  U4_ga(x1, x3)
cons(x1, x2)  =  cons(x1, x2)
U5_ga(x1, x2, x3)  =  U5_ga(x1, x3)
head_in_ga(x1, x2)  =  head_in_ga(x1)
head_out_ga(x1, x2)  =  head_out_ga(x1)
U6_ga(x1, x2, x3, x4)  =  U6_ga(x1, x4)
head_in_aa(x1, x2)  =  head_in_aa
head_out_aa(x1, x2)  =  head_out_aa
U7_ga(x1, x2, x3, x4, x5)  =  U7_ga(x1, x5)
tail_in_aa(x1, x2)  =  tail_in_aa
tail_out_aa(x1, x2)  =  tail_out_aa
U8_ga(x1, x2, x3, x4, x5, x6)  =  U8_ga(x1, x6)
U9_ga(x1, x2, x3)  =  U9_ga(x1, x3)
gopher_in_aa(x1, x2)  =  gopher_in_aa
U1_aa(x1, x2)  =  U1_aa(x2)
gopher_out_aa(x1, x2)  =  gopher_out_aa
U2_aa(x1, x2, x3)  =  U2_aa(x3)
head_in_ag(x1, x2)  =  head_in_ag(x2)
head_out_ag(x1, x2)  =  head_out_ag(x2)
U3_aa(x1, x2, x3)  =  U3_aa(x3)
U4_aa(x1, x2, x3)  =  U4_aa(x3)
eq_in_aa(x1, x2)  =  eq_in_aa
eq_out_aa(x1, x2)  =  eq_out_aa
U5_aa(x1, x2, x3)  =  U5_aa(x3)
U6_aa(x1, x2, x3, x4)  =  U6_aa(x4)
U7_aa(x1, x2, x3, x4, x5)  =  U7_aa(x5)
U8_aa(x1, x2, x3, x4, x5, x6)  =  U8_aa(x6)
U9_aa(x1, x2, x3)  =  U9_aa(x3)
GOPHER_IN_GA(x1, x2)  =  GOPHER_IN_GA(x1)
U1_GA(x1, x2)  =  U1_GA(x2)
EQ_IN_AG(x1, x2)  =  EQ_IN_AG(x2)
U2_GA(x1, x2, x3)  =  U2_GA(x1, x3)
HEAD_IN_GG(x1, x2)  =  HEAD_IN_GG(x1, x2)
U3_GA(x1, x2, x3)  =  U3_GA(x1, x3)
TAIL_IN_GA(x1, x2)  =  TAIL_IN_GA(x1)
U4_GA(x1, x2, x3)  =  U4_GA(x1, x3)
U5_GA(x1, x2, x3)  =  U5_GA(x1, x3)
HEAD_IN_GA(x1, x2)  =  HEAD_IN_GA(x1)
U6_GA(x1, x2, x3, x4)  =  U6_GA(x1, x4)
HEAD_IN_AA(x1, x2)  =  HEAD_IN_AA
U7_GA(x1, x2, x3, x4, x5)  =  U7_GA(x1, x5)
TAIL_IN_AA(x1, x2)  =  TAIL_IN_AA
U8_GA(x1, x2, x3, x4, x5, x6)  =  U8_GA(x1, x6)
U9_GA(x1, x2, x3)  =  U9_GA(x1, x3)
GOPHER_IN_AA(x1, x2)  =  GOPHER_IN_AA
U1_AA(x1, x2)  =  U1_AA(x2)
U2_AA(x1, x2, x3)  =  U2_AA(x3)
HEAD_IN_AG(x1, x2)  =  HEAD_IN_AG(x2)
U3_AA(x1, x2, x3)  =  U3_AA(x3)
U4_AA(x1, x2, x3)  =  U4_AA(x3)
EQ_IN_AA(x1, x2)  =  EQ_IN_AA
U5_AA(x1, x2, x3)  =  U5_AA(x3)
U6_AA(x1, x2, x3, x4)  =  U6_AA(x4)
U7_AA(x1, x2, x3, x4, x5)  =  U7_AA(x5)
U8_AA(x1, x2, x3, x4, x5, x6)  =  U8_AA(x6)
U9_AA(x1, x2, x3)  =  U9_AA(x3)

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

(35) DependencyGraphProof (EQUIVALENT transformation)

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

(36) Obligation:

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

GOPHER_IN_AA(X, Y) → U5_AA(X, Y, head_in_aa(X, H))
U5_AA(X, Y, head_out_aa(X, H)) → U6_AA(X, Y, H, head_in_aa(H, U))
U6_AA(X, Y, H, head_out_aa(H, U)) → U7_AA(X, Y, H, U, tail_in_aa(H, V))
U7_AA(X, Y, H, U, tail_out_aa(H, V)) → U8_AA(X, Y, H, U, V, tail_in_aa(X, W))
U8_AA(X, Y, H, U, V, tail_out_aa(X, W)) → GOPHER_IN_AA(cons(U, cons(V, W)), Y)

The TRS R consists of the following rules:

gopher_in_ga(nil, L) → U1_ga(L, eq_in_ag(L, nil))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(L, eq_out_ag(L, nil)) → gopher_out_ga(nil, L)
gopher_in_ga(X, Y) → U2_ga(X, Y, head_in_gg(X, nil))
head_in_gg([], X1) → head_out_gg([], X1)
head_in_gg(.(X, X2), X) → head_out_gg(.(X, X2), X)
U2_ga(X, Y, head_out_gg(X, nil)) → U3_ga(X, Y, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, X), X) → tail_out_ga(.(X3, X), X)
U3_ga(X, Y, tail_out_ga(X, T)) → U4_ga(X, Y, eq_in_ag(Y, cons(nil, T)))
U4_ga(X, Y, eq_out_ag(Y, cons(nil, T))) → gopher_out_ga(X, Y)
gopher_in_ga(X, Y) → U5_ga(X, Y, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(X, X2), X) → head_out_ga(.(X, X2), X)
U5_ga(X, Y, head_out_ga(X, H)) → U6_ga(X, Y, H, head_in_aa(H, U))
head_in_aa([], X1) → head_out_aa([], X1)
head_in_aa(.(X, X2), X) → head_out_aa(.(X, X2), X)
U6_ga(X, Y, H, head_out_aa(H, U)) → U7_ga(X, Y, H, U, tail_in_aa(H, V))
tail_in_aa([], []) → tail_out_aa([], [])
tail_in_aa(.(X3, X), X) → tail_out_aa(.(X3, X), X)
U7_ga(X, Y, H, U, tail_out_aa(H, V)) → U8_ga(X, Y, H, U, V, tail_in_ga(X, W))
U8_ga(X, Y, H, U, V, tail_out_ga(X, W)) → U9_ga(X, Y, gopher_in_aa(cons(U, cons(V, W)), Y))
gopher_in_aa(nil, L) → U1_aa(L, eq_in_ag(L, nil))
U1_aa(L, eq_out_ag(L, nil)) → gopher_out_aa(nil, L)
gopher_in_aa(X, Y) → U2_aa(X, Y, head_in_ag(X, nil))
head_in_ag([], X1) → head_out_ag([], X1)
head_in_ag(.(X, X2), X) → head_out_ag(.(X, X2), X)
U2_aa(X, Y, head_out_ag(X, nil)) → U3_aa(X, Y, tail_in_aa(X, T))
U3_aa(X, Y, tail_out_aa(X, T)) → U4_aa(X, Y, eq_in_aa(Y, cons(nil, T)))
eq_in_aa(X, X) → eq_out_aa(X, X)
U4_aa(X, Y, eq_out_aa(Y, cons(nil, T))) → gopher_out_aa(X, Y)
gopher_in_aa(X, Y) → U5_aa(X, Y, head_in_aa(X, H))
U5_aa(X, Y, head_out_aa(X, H)) → U6_aa(X, Y, H, head_in_aa(H, U))
U6_aa(X, Y, H, head_out_aa(H, U)) → U7_aa(X, Y, H, U, tail_in_aa(H, V))
U7_aa(X, Y, H, U, tail_out_aa(H, V)) → U8_aa(X, Y, H, U, V, tail_in_aa(X, W))
U8_aa(X, Y, H, U, V, tail_out_aa(X, W)) → U9_aa(X, Y, gopher_in_aa(cons(U, cons(V, W)), Y))
U9_aa(X, Y, gopher_out_aa(cons(U, cons(V, W)), Y)) → gopher_out_aa(X, Y)
U9_ga(X, Y, gopher_out_aa(cons(U, cons(V, W)), Y)) → gopher_out_ga(X, Y)

The argument filtering Pi contains the following mapping:
gopher_in_ga(x1, x2)  =  gopher_in_ga(x1)
nil  =  nil
U1_ga(x1, x2)  =  U1_ga(x2)
eq_in_ag(x1, x2)  =  eq_in_ag(x2)
eq_out_ag(x1, x2)  =  eq_out_ag(x1, x2)
gopher_out_ga(x1, x2)  =  gopher_out_ga(x1)
U2_ga(x1, x2, x3)  =  U2_ga(x1, x3)
head_in_gg(x1, x2)  =  head_in_gg(x1, x2)
[]  =  []
head_out_gg(x1, x2)  =  head_out_gg(x1, x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3)  =  U3_ga(x1, x3)
tail_in_ga(x1, x2)  =  tail_in_ga(x1)
tail_out_ga(x1, x2)  =  tail_out_ga(x1, x2)
U4_ga(x1, x2, x3)  =  U4_ga(x1, x3)
cons(x1, x2)  =  cons(x1, x2)
U5_ga(x1, x2, x3)  =  U5_ga(x1, x3)
head_in_ga(x1, x2)  =  head_in_ga(x1)
head_out_ga(x1, x2)  =  head_out_ga(x1)
U6_ga(x1, x2, x3, x4)  =  U6_ga(x1, x4)
head_in_aa(x1, x2)  =  head_in_aa
head_out_aa(x1, x2)  =  head_out_aa
U7_ga(x1, x2, x3, x4, x5)  =  U7_ga(x1, x5)
tail_in_aa(x1, x2)  =  tail_in_aa
tail_out_aa(x1, x2)  =  tail_out_aa
U8_ga(x1, x2, x3, x4, x5, x6)  =  U8_ga(x1, x6)
U9_ga(x1, x2, x3)  =  U9_ga(x1, x3)
gopher_in_aa(x1, x2)  =  gopher_in_aa
U1_aa(x1, x2)  =  U1_aa(x2)
gopher_out_aa(x1, x2)  =  gopher_out_aa
U2_aa(x1, x2, x3)  =  U2_aa(x3)
head_in_ag(x1, x2)  =  head_in_ag(x2)
head_out_ag(x1, x2)  =  head_out_ag(x2)
U3_aa(x1, x2, x3)  =  U3_aa(x3)
U4_aa(x1, x2, x3)  =  U4_aa(x3)
eq_in_aa(x1, x2)  =  eq_in_aa
eq_out_aa(x1, x2)  =  eq_out_aa
U5_aa(x1, x2, x3)  =  U5_aa(x3)
U6_aa(x1, x2, x3, x4)  =  U6_aa(x4)
U7_aa(x1, x2, x3, x4, x5)  =  U7_aa(x5)
U8_aa(x1, x2, x3, x4, x5, x6)  =  U8_aa(x6)
U9_aa(x1, x2, x3)  =  U9_aa(x3)
GOPHER_IN_AA(x1, x2)  =  GOPHER_IN_AA
U5_AA(x1, x2, x3)  =  U5_AA(x3)
U6_AA(x1, x2, x3, x4)  =  U6_AA(x4)
U7_AA(x1, x2, x3, x4, x5)  =  U7_AA(x5)
U8_AA(x1, x2, x3, x4, x5, x6)  =  U8_AA(x6)

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

(37) UsableRulesProof (EQUIVALENT transformation)

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

(38) Obligation:

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

GOPHER_IN_AA(X, Y) → U5_AA(X, Y, head_in_aa(X, H))
U5_AA(X, Y, head_out_aa(X, H)) → U6_AA(X, Y, H, head_in_aa(H, U))
U6_AA(X, Y, H, head_out_aa(H, U)) → U7_AA(X, Y, H, U, tail_in_aa(H, V))
U7_AA(X, Y, H, U, tail_out_aa(H, V)) → U8_AA(X, Y, H, U, V, tail_in_aa(X, W))
U8_AA(X, Y, H, U, V, tail_out_aa(X, W)) → GOPHER_IN_AA(cons(U, cons(V, W)), Y)

The TRS R consists of the following rules:

head_in_aa([], X1) → head_out_aa([], X1)
head_in_aa(.(X, X2), X) → head_out_aa(.(X, X2), X)
tail_in_aa([], []) → tail_out_aa([], [])
tail_in_aa(.(X3, X), X) → tail_out_aa(.(X3, X), X)

The argument filtering Pi contains the following mapping:
[]  =  []
.(x1, x2)  =  .(x1, x2)
cons(x1, x2)  =  cons(x1, x2)
head_in_aa(x1, x2)  =  head_in_aa
head_out_aa(x1, x2)  =  head_out_aa
tail_in_aa(x1, x2)  =  tail_in_aa
tail_out_aa(x1, x2)  =  tail_out_aa
GOPHER_IN_AA(x1, x2)  =  GOPHER_IN_AA
U5_AA(x1, x2, x3)  =  U5_AA(x3)
U6_AA(x1, x2, x3, x4)  =  U6_AA(x4)
U7_AA(x1, x2, x3, x4, x5)  =  U7_AA(x5)
U8_AA(x1, x2, x3, x4, x5, x6)  =  U8_AA(x6)

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

(39) PiDPToQDPProof (SOUND transformation)

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

(40) Obligation:

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

GOPHER_IN_AAU5_AA(head_in_aa)
U5_AA(head_out_aa) → U6_AA(head_in_aa)
U6_AA(head_out_aa) → U7_AA(tail_in_aa)
U7_AA(tail_out_aa) → U8_AA(tail_in_aa)
U8_AA(tail_out_aa) → GOPHER_IN_AA

The TRS R consists of the following rules:

head_in_aahead_out_aa
tail_in_aatail_out_aa

The set Q consists of the following terms:

head_in_aa
tail_in_aa

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

(41) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule GOPHER_IN_AAU5_AA(head_in_aa) at position [0] we obtained the following new rules [LPAR04]:

GOPHER_IN_AAU5_AA(head_out_aa)

(42) Obligation:

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

U5_AA(head_out_aa) → U6_AA(head_in_aa)
U6_AA(head_out_aa) → U7_AA(tail_in_aa)
U7_AA(tail_out_aa) → U8_AA(tail_in_aa)
U8_AA(tail_out_aa) → GOPHER_IN_AA
GOPHER_IN_AAU5_AA(head_out_aa)

The TRS R consists of the following rules:

head_in_aahead_out_aa
tail_in_aatail_out_aa

The set Q consists of the following terms:

head_in_aa
tail_in_aa

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

(43) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule U5_AA(head_out_aa) → U6_AA(head_in_aa) at position [0] we obtained the following new rules [LPAR04]:

U5_AA(head_out_aa) → U6_AA(head_out_aa)

(44) Obligation:

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

U6_AA(head_out_aa) → U7_AA(tail_in_aa)
U7_AA(tail_out_aa) → U8_AA(tail_in_aa)
U8_AA(tail_out_aa) → GOPHER_IN_AA
GOPHER_IN_AAU5_AA(head_out_aa)
U5_AA(head_out_aa) → U6_AA(head_out_aa)

The TRS R consists of the following rules:

head_in_aahead_out_aa
tail_in_aatail_out_aa

The set Q consists of the following terms:

head_in_aa
tail_in_aa

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:

U6_AA(head_out_aa) → U7_AA(tail_in_aa)
U7_AA(tail_out_aa) → U8_AA(tail_in_aa)
U8_AA(tail_out_aa) → GOPHER_IN_AA
GOPHER_IN_AAU5_AA(head_out_aa)
U5_AA(head_out_aa) → U6_AA(head_out_aa)

The TRS R consists of the following rules:

tail_in_aatail_out_aa

The set Q consists of the following terms:

head_in_aa
tail_in_aa

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].

head_in_aa

(48) Obligation:

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

U6_AA(head_out_aa) → U7_AA(tail_in_aa)
U7_AA(tail_out_aa) → U8_AA(tail_in_aa)
U8_AA(tail_out_aa) → GOPHER_IN_AA
GOPHER_IN_AAU5_AA(head_out_aa)
U5_AA(head_out_aa) → U6_AA(head_out_aa)

The TRS R consists of the following rules:

tail_in_aatail_out_aa

The set Q consists of the following terms:

tail_in_aa

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

(49) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule U6_AA(head_out_aa) → U7_AA(tail_in_aa) at position [0] we obtained the following new rules [LPAR04]:

U6_AA(head_out_aa) → U7_AA(tail_out_aa)

(50) Obligation:

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

U7_AA(tail_out_aa) → U8_AA(tail_in_aa)
U8_AA(tail_out_aa) → GOPHER_IN_AA
GOPHER_IN_AAU5_AA(head_out_aa)
U5_AA(head_out_aa) → U6_AA(head_out_aa)
U6_AA(head_out_aa) → U7_AA(tail_out_aa)

The TRS R consists of the following rules:

tail_in_aatail_out_aa

The set Q consists of the following terms:

tail_in_aa

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

(51) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule U7_AA(tail_out_aa) → U8_AA(tail_in_aa) at position [0] we obtained the following new rules [LPAR04]:

U7_AA(tail_out_aa) → U8_AA(tail_out_aa)

(52) Obligation:

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

U8_AA(tail_out_aa) → GOPHER_IN_AA
GOPHER_IN_AAU5_AA(head_out_aa)
U5_AA(head_out_aa) → U6_AA(head_out_aa)
U6_AA(head_out_aa) → U7_AA(tail_out_aa)
U7_AA(tail_out_aa) → U8_AA(tail_out_aa)

The TRS R consists of the following rules:

tail_in_aatail_out_aa

The set Q consists of the following terms:

tail_in_aa

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

(53) 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.

(54) Obligation:

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

U8_AA(tail_out_aa) → GOPHER_IN_AA
GOPHER_IN_AAU5_AA(head_out_aa)
U5_AA(head_out_aa) → U6_AA(head_out_aa)
U6_AA(head_out_aa) → U7_AA(tail_out_aa)
U7_AA(tail_out_aa) → U8_AA(tail_out_aa)

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

tail_in_aa

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

(55) 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_aa

(56) Obligation:

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

U8_AA(tail_out_aa) → GOPHER_IN_AA
GOPHER_IN_AAU5_AA(head_out_aa)
U5_AA(head_out_aa) → U6_AA(head_out_aa)
U6_AA(head_out_aa) → U7_AA(tail_out_aa)
U7_AA(tail_out_aa) → U8_AA(tail_out_aa)

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

(57) 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 = GOPHER_IN_AA evaluates to t =GOPHER_IN_AA

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




Rewriting sequence

GOPHER_IN_AAU5_AA(head_out_aa)
with rule GOPHER_IN_AAU5_AA(head_out_aa) at position [] and matcher [ ]

U5_AA(head_out_aa)U6_AA(head_out_aa)
with rule U5_AA(head_out_aa) → U6_AA(head_out_aa) at position [] and matcher [ ]

U6_AA(head_out_aa)U7_AA(tail_out_aa)
with rule U6_AA(head_out_aa) → U7_AA(tail_out_aa) at position [] and matcher [ ]

U7_AA(tail_out_aa)U8_AA(tail_out_aa)
with rule U7_AA(tail_out_aa) → U8_AA(tail_out_aa) at position [] and matcher [ ]

U8_AA(tail_out_aa)GOPHER_IN_AA
with rule U8_AA(tail_out_aa) → GOPHER_IN_AA

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.



(58) FALSE