(0) Obligation:

Clauses:

gopher(nil, nil).
gopher(X, cons(nil, T)) :- ','(no(empty(X)), ','(head(X, nil), tail(X, T))).
gopher(X, Y) :- ','(no(empty(X)), ','(head(X, H), ','(no(empty(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).
empty([]).
no(X) :- ','(X, ','(!, failure(a))).
no(X4).
failure(b).

Queries:

gopher(g,a).

(1) PrologToDTProblemTransformerProof (SOUND transformation)

Built DT problem from termination graph.

(2) Obligation:

Triples:

gopher1(.(.(T114, T115), T116), T58) :- gopher1(cons(T114, cons(T115, T116)), T58).
gopher1(.(.(T181, T182), T183), T125) :- gopher1(cons(T181, cons(T182, T183)), T125).

Clauses:

gopherc1(nil, nil).
gopherc1(.(nil, T49), cons(nil, T49)).
gopherc1(.(.(T114, T115), T116), T58) :- gopherc1(cons(T114, cons(T115, T116)), T58).
gopherc1(.(.(T181, T182), T183), T125) :- gopherc1(cons(T181, cons(T182, T183)), T125).

Afs:

gopher1(x1, x2)  =  gopher1(x1)

(3) TriplesToPiDPProof (SOUND transformation)

We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
gopher1_in: (b,f)
Transforming TRIPLES into the following Term Rewriting System:
Pi DP problem:
The TRS P consists of the following rules:

GOPHER1_IN_GA(.(.(T114, T115), T116), T58) → U1_GA(T114, T115, T116, T58, gopher1_in_ga(cons(T114, cons(T115, T116)), T58))
GOPHER1_IN_GA(.(.(T114, T115), T116), T58) → GOPHER1_IN_GA(cons(T114, cons(T115, T116)), T58)
GOPHER1_IN_GA(.(.(T181, T182), T183), T125) → U2_GA(T181, T182, T183, T125, gopher1_in_ga(cons(T181, cons(T182, T183)), T125))

R is empty.
The argument filtering Pi contains the following mapping:
gopher1_in_ga(x1, x2)  =  gopher1_in_ga(x1)
.(x1, x2)  =  .(x1, x2)
cons(x1, x2)  =  cons(x1, x2)
GOPHER1_IN_GA(x1, x2)  =  GOPHER1_IN_GA(x1)
U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x1, x2, x3, x5)
U2_GA(x1, x2, x3, x4, x5)  =  U2_GA(x1, x2, x3, x5)

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

Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES

(4) Obligation:

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

GOPHER1_IN_GA(.(.(T114, T115), T116), T58) → U1_GA(T114, T115, T116, T58, gopher1_in_ga(cons(T114, cons(T115, T116)), T58))
GOPHER1_IN_GA(.(.(T114, T115), T116), T58) → GOPHER1_IN_GA(cons(T114, cons(T115, T116)), T58)
GOPHER1_IN_GA(.(.(T181, T182), T183), T125) → U2_GA(T181, T182, T183, T125, gopher1_in_ga(cons(T181, cons(T182, T183)), T125))

R is empty.
The argument filtering Pi contains the following mapping:
gopher1_in_ga(x1, x2)  =  gopher1_in_ga(x1)
.(x1, x2)  =  .(x1, x2)
cons(x1, x2)  =  cons(x1, x2)
GOPHER1_IN_GA(x1, x2)  =  GOPHER1_IN_GA(x1)
U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x1, x2, x3, x5)
U2_GA(x1, x2, x3, x4, x5)  =  U2_GA(x1, x2, x3, x5)

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

(5) DependencyGraphProof (EQUIVALENT transformation)

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

(6) TRUE