(0) Obligation:

Clauses:

gopher(nil, nil).
gopher(cons(nil, Y), cons(nil, Y)).
gopher(cons(cons(U, V), W), X) :- gopher(cons(U, cons(V, W)), X).
samefringe(nil, nil).
samefringe(cons(U, V), cons(X, Y)) :- ','(gopher(cons(U, V), cons(U1, V1)), ','(gopher(cons(X, Y), cons(X1, Y1)), samefringe(V1, Y1))).

Queries:

samefringe(g,g).

(1) PrologToPrologProblemTransformerProof (SOUND transformation)

Built Prolog problem from termination graph.

(2) Obligation:

Clauses:

gopher15(nil, T26, nil, T26).
gopher15(cons(T33, T34), T35, X54, X55) :- gopher15(T33, cons(T34, T35), X54, X55).
p7(nil, T15, nil, T15, T9, T10, X16, X17) :- gopher15(T9, T10, X16, X17).
p7(nil, T15, nil, T15, T9, T10, T18, T19) :- ','(gopher15(T9, T10, T18, T19), samefringe1(T15, T19)).
p7(cons(T46, T47), T48, X78, X79, T9, T10, X16, X17) :- p7(T46, cons(T47, T48), X78, X79, T9, T10, X16, X17).
samefringe1(nil, nil).
samefringe1(cons(T7, T8), cons(T9, T10)) :- p7(T7, T8, X14, X15, T9, T10, X16, X17).

Queries:

samefringe1(g,g).

(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:
samefringe1_in: (b,b)
p7_in: (b,b,f,f,b,b,f,f)
gopher15_in: (b,b,f,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

samefringe1_in_gg(nil, nil) → samefringe1_out_gg(nil, nil)
samefringe1_in_gg(cons(T7, T8), cons(T9, T10)) → U6_gg(T7, T8, T9, T10, p7_in_ggaaggaa(T7, T8, X14, X15, T9, T10, X16, X17))
p7_in_ggaaggaa(nil, T15, nil, T15, T9, T10, X16, X17) → U2_ggaaggaa(T15, T9, T10, X16, X17, gopher15_in_ggaa(T9, T10, X16, X17))
gopher15_in_ggaa(nil, T26, nil, T26) → gopher15_out_ggaa(nil, T26, nil, T26)
gopher15_in_ggaa(cons(T33, T34), T35, X54, X55) → U1_ggaa(T33, T34, T35, X54, X55, gopher15_in_ggaa(T33, cons(T34, T35), X54, X55))
U1_ggaa(T33, T34, T35, X54, X55, gopher15_out_ggaa(T33, cons(T34, T35), X54, X55)) → gopher15_out_ggaa(cons(T33, T34), T35, X54, X55)
U2_ggaaggaa(T15, T9, T10, X16, X17, gopher15_out_ggaa(T9, T10, X16, X17)) → p7_out_ggaaggaa(nil, T15, nil, T15, T9, T10, X16, X17)
p7_in_ggaaggaa(nil, T15, nil, T15, T9, T10, T18, T19) → U3_ggaaggaa(T15, T9, T10, T18, T19, gopher15_in_ggaa(T9, T10, T18, T19))
U3_ggaaggaa(T15, T9, T10, T18, T19, gopher15_out_ggaa(T9, T10, T18, T19)) → U4_ggaaggaa(T15, T9, T10, T18, T19, samefringe1_in_gg(T15, T19))
U4_ggaaggaa(T15, T9, T10, T18, T19, samefringe1_out_gg(T15, T19)) → p7_out_ggaaggaa(nil, T15, nil, T15, T9, T10, T18, T19)
p7_in_ggaaggaa(cons(T46, T47), T48, X78, X79, T9, T10, X16, X17) → U5_ggaaggaa(T46, T47, T48, X78, X79, T9, T10, X16, X17, p7_in_ggaaggaa(T46, cons(T47, T48), X78, X79, T9, T10, X16, X17))
U5_ggaaggaa(T46, T47, T48, X78, X79, T9, T10, X16, X17, p7_out_ggaaggaa(T46, cons(T47, T48), X78, X79, T9, T10, X16, X17)) → p7_out_ggaaggaa(cons(T46, T47), T48, X78, X79, T9, T10, X16, X17)
U6_gg(T7, T8, T9, T10, p7_out_ggaaggaa(T7, T8, X14, X15, T9, T10, X16, X17)) → samefringe1_out_gg(cons(T7, T8), cons(T9, T10))

The argument filtering Pi contains the following mapping:
samefringe1_in_gg(x1, x2)  =  samefringe1_in_gg(x1, x2)
nil  =  nil
samefringe1_out_gg(x1, x2)  =  samefringe1_out_gg
cons(x1, x2)  =  cons(x1, x2)
U6_gg(x1, x2, x3, x4, x5)  =  U6_gg(x5)
p7_in_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p7_in_ggaaggaa(x1, x2, x5, x6)
U2_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U2_ggaaggaa(x1, x6)
gopher15_in_ggaa(x1, x2, x3, x4)  =  gopher15_in_ggaa(x1, x2)
gopher15_out_ggaa(x1, x2, x3, x4)  =  gopher15_out_ggaa(x3, x4)
U1_ggaa(x1, x2, x3, x4, x5, x6)  =  U1_ggaa(x6)
p7_out_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p7_out_ggaaggaa(x3, x4, x7, x8)
U3_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U3_ggaaggaa(x1, x6)
U4_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U4_ggaaggaa(x1, x4, x5, x6)
U5_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)  =  U5_ggaaggaa(x10)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(4) Obligation:

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

samefringe1_in_gg(nil, nil) → samefringe1_out_gg(nil, nil)
samefringe1_in_gg(cons(T7, T8), cons(T9, T10)) → U6_gg(T7, T8, T9, T10, p7_in_ggaaggaa(T7, T8, X14, X15, T9, T10, X16, X17))
p7_in_ggaaggaa(nil, T15, nil, T15, T9, T10, X16, X17) → U2_ggaaggaa(T15, T9, T10, X16, X17, gopher15_in_ggaa(T9, T10, X16, X17))
gopher15_in_ggaa(nil, T26, nil, T26) → gopher15_out_ggaa(nil, T26, nil, T26)
gopher15_in_ggaa(cons(T33, T34), T35, X54, X55) → U1_ggaa(T33, T34, T35, X54, X55, gopher15_in_ggaa(T33, cons(T34, T35), X54, X55))
U1_ggaa(T33, T34, T35, X54, X55, gopher15_out_ggaa(T33, cons(T34, T35), X54, X55)) → gopher15_out_ggaa(cons(T33, T34), T35, X54, X55)
U2_ggaaggaa(T15, T9, T10, X16, X17, gopher15_out_ggaa(T9, T10, X16, X17)) → p7_out_ggaaggaa(nil, T15, nil, T15, T9, T10, X16, X17)
p7_in_ggaaggaa(nil, T15, nil, T15, T9, T10, T18, T19) → U3_ggaaggaa(T15, T9, T10, T18, T19, gopher15_in_ggaa(T9, T10, T18, T19))
U3_ggaaggaa(T15, T9, T10, T18, T19, gopher15_out_ggaa(T9, T10, T18, T19)) → U4_ggaaggaa(T15, T9, T10, T18, T19, samefringe1_in_gg(T15, T19))
U4_ggaaggaa(T15, T9, T10, T18, T19, samefringe1_out_gg(T15, T19)) → p7_out_ggaaggaa(nil, T15, nil, T15, T9, T10, T18, T19)
p7_in_ggaaggaa(cons(T46, T47), T48, X78, X79, T9, T10, X16, X17) → U5_ggaaggaa(T46, T47, T48, X78, X79, T9, T10, X16, X17, p7_in_ggaaggaa(T46, cons(T47, T48), X78, X79, T9, T10, X16, X17))
U5_ggaaggaa(T46, T47, T48, X78, X79, T9, T10, X16, X17, p7_out_ggaaggaa(T46, cons(T47, T48), X78, X79, T9, T10, X16, X17)) → p7_out_ggaaggaa(cons(T46, T47), T48, X78, X79, T9, T10, X16, X17)
U6_gg(T7, T8, T9, T10, p7_out_ggaaggaa(T7, T8, X14, X15, T9, T10, X16, X17)) → samefringe1_out_gg(cons(T7, T8), cons(T9, T10))

The argument filtering Pi contains the following mapping:
samefringe1_in_gg(x1, x2)  =  samefringe1_in_gg(x1, x2)
nil  =  nil
samefringe1_out_gg(x1, x2)  =  samefringe1_out_gg
cons(x1, x2)  =  cons(x1, x2)
U6_gg(x1, x2, x3, x4, x5)  =  U6_gg(x5)
p7_in_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p7_in_ggaaggaa(x1, x2, x5, x6)
U2_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U2_ggaaggaa(x1, x6)
gopher15_in_ggaa(x1, x2, x3, x4)  =  gopher15_in_ggaa(x1, x2)
gopher15_out_ggaa(x1, x2, x3, x4)  =  gopher15_out_ggaa(x3, x4)
U1_ggaa(x1, x2, x3, x4, x5, x6)  =  U1_ggaa(x6)
p7_out_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p7_out_ggaaggaa(x3, x4, x7, x8)
U3_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U3_ggaaggaa(x1, x6)
U4_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U4_ggaaggaa(x1, x4, x5, x6)
U5_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)  =  U5_ggaaggaa(x10)

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

SAMEFRINGE1_IN_GG(cons(T7, T8), cons(T9, T10)) → U6_GG(T7, T8, T9, T10, p7_in_ggaaggaa(T7, T8, X14, X15, T9, T10, X16, X17))
SAMEFRINGE1_IN_GG(cons(T7, T8), cons(T9, T10)) → P7_IN_GGAAGGAA(T7, T8, X14, X15, T9, T10, X16, X17)
P7_IN_GGAAGGAA(nil, T15, nil, T15, T9, T10, X16, X17) → U2_GGAAGGAA(T15, T9, T10, X16, X17, gopher15_in_ggaa(T9, T10, X16, X17))
P7_IN_GGAAGGAA(nil, T15, nil, T15, T9, T10, X16, X17) → GOPHER15_IN_GGAA(T9, T10, X16, X17)
GOPHER15_IN_GGAA(cons(T33, T34), T35, X54, X55) → U1_GGAA(T33, T34, T35, X54, X55, gopher15_in_ggaa(T33, cons(T34, T35), X54, X55))
GOPHER15_IN_GGAA(cons(T33, T34), T35, X54, X55) → GOPHER15_IN_GGAA(T33, cons(T34, T35), X54, X55)
P7_IN_GGAAGGAA(nil, T15, nil, T15, T9, T10, T18, T19) → U3_GGAAGGAA(T15, T9, T10, T18, T19, gopher15_in_ggaa(T9, T10, T18, T19))
U3_GGAAGGAA(T15, T9, T10, T18, T19, gopher15_out_ggaa(T9, T10, T18, T19)) → U4_GGAAGGAA(T15, T9, T10, T18, T19, samefringe1_in_gg(T15, T19))
U3_GGAAGGAA(T15, T9, T10, T18, T19, gopher15_out_ggaa(T9, T10, T18, T19)) → SAMEFRINGE1_IN_GG(T15, T19)
P7_IN_GGAAGGAA(cons(T46, T47), T48, X78, X79, T9, T10, X16, X17) → U5_GGAAGGAA(T46, T47, T48, X78, X79, T9, T10, X16, X17, p7_in_ggaaggaa(T46, cons(T47, T48), X78, X79, T9, T10, X16, X17))
P7_IN_GGAAGGAA(cons(T46, T47), T48, X78, X79, T9, T10, X16, X17) → P7_IN_GGAAGGAA(T46, cons(T47, T48), X78, X79, T9, T10, X16, X17)

The TRS R consists of the following rules:

samefringe1_in_gg(nil, nil) → samefringe1_out_gg(nil, nil)
samefringe1_in_gg(cons(T7, T8), cons(T9, T10)) → U6_gg(T7, T8, T9, T10, p7_in_ggaaggaa(T7, T8, X14, X15, T9, T10, X16, X17))
p7_in_ggaaggaa(nil, T15, nil, T15, T9, T10, X16, X17) → U2_ggaaggaa(T15, T9, T10, X16, X17, gopher15_in_ggaa(T9, T10, X16, X17))
gopher15_in_ggaa(nil, T26, nil, T26) → gopher15_out_ggaa(nil, T26, nil, T26)
gopher15_in_ggaa(cons(T33, T34), T35, X54, X55) → U1_ggaa(T33, T34, T35, X54, X55, gopher15_in_ggaa(T33, cons(T34, T35), X54, X55))
U1_ggaa(T33, T34, T35, X54, X55, gopher15_out_ggaa(T33, cons(T34, T35), X54, X55)) → gopher15_out_ggaa(cons(T33, T34), T35, X54, X55)
U2_ggaaggaa(T15, T9, T10, X16, X17, gopher15_out_ggaa(T9, T10, X16, X17)) → p7_out_ggaaggaa(nil, T15, nil, T15, T9, T10, X16, X17)
p7_in_ggaaggaa(nil, T15, nil, T15, T9, T10, T18, T19) → U3_ggaaggaa(T15, T9, T10, T18, T19, gopher15_in_ggaa(T9, T10, T18, T19))
U3_ggaaggaa(T15, T9, T10, T18, T19, gopher15_out_ggaa(T9, T10, T18, T19)) → U4_ggaaggaa(T15, T9, T10, T18, T19, samefringe1_in_gg(T15, T19))
U4_ggaaggaa(T15, T9, T10, T18, T19, samefringe1_out_gg(T15, T19)) → p7_out_ggaaggaa(nil, T15, nil, T15, T9, T10, T18, T19)
p7_in_ggaaggaa(cons(T46, T47), T48, X78, X79, T9, T10, X16, X17) → U5_ggaaggaa(T46, T47, T48, X78, X79, T9, T10, X16, X17, p7_in_ggaaggaa(T46, cons(T47, T48), X78, X79, T9, T10, X16, X17))
U5_ggaaggaa(T46, T47, T48, X78, X79, T9, T10, X16, X17, p7_out_ggaaggaa(T46, cons(T47, T48), X78, X79, T9, T10, X16, X17)) → p7_out_ggaaggaa(cons(T46, T47), T48, X78, X79, T9, T10, X16, X17)
U6_gg(T7, T8, T9, T10, p7_out_ggaaggaa(T7, T8, X14, X15, T9, T10, X16, X17)) → samefringe1_out_gg(cons(T7, T8), cons(T9, T10))

The argument filtering Pi contains the following mapping:
samefringe1_in_gg(x1, x2)  =  samefringe1_in_gg(x1, x2)
nil  =  nil
samefringe1_out_gg(x1, x2)  =  samefringe1_out_gg
cons(x1, x2)  =  cons(x1, x2)
U6_gg(x1, x2, x3, x4, x5)  =  U6_gg(x5)
p7_in_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p7_in_ggaaggaa(x1, x2, x5, x6)
U2_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U2_ggaaggaa(x1, x6)
gopher15_in_ggaa(x1, x2, x3, x4)  =  gopher15_in_ggaa(x1, x2)
gopher15_out_ggaa(x1, x2, x3, x4)  =  gopher15_out_ggaa(x3, x4)
U1_ggaa(x1, x2, x3, x4, x5, x6)  =  U1_ggaa(x6)
p7_out_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p7_out_ggaaggaa(x3, x4, x7, x8)
U3_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U3_ggaaggaa(x1, x6)
U4_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U4_ggaaggaa(x1, x4, x5, x6)
U5_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)  =  U5_ggaaggaa(x10)
SAMEFRINGE1_IN_GG(x1, x2)  =  SAMEFRINGE1_IN_GG(x1, x2)
U6_GG(x1, x2, x3, x4, x5)  =  U6_GG(x5)
P7_IN_GGAAGGAA(x1, x2, x3, x4, x5, x6, x7, x8)  =  P7_IN_GGAAGGAA(x1, x2, x5, x6)
U2_GGAAGGAA(x1, x2, x3, x4, x5, x6)  =  U2_GGAAGGAA(x1, x6)
GOPHER15_IN_GGAA(x1, x2, x3, x4)  =  GOPHER15_IN_GGAA(x1, x2)
U1_GGAA(x1, x2, x3, x4, x5, x6)  =  U1_GGAA(x6)
U3_GGAAGGAA(x1, x2, x3, x4, x5, x6)  =  U3_GGAAGGAA(x1, x6)
U4_GGAAGGAA(x1, x2, x3, x4, x5, x6)  =  U4_GGAAGGAA(x1, x4, x5, x6)
U5_GGAAGGAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)  =  U5_GGAAGGAA(x10)

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

(6) Obligation:

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

SAMEFRINGE1_IN_GG(cons(T7, T8), cons(T9, T10)) → U6_GG(T7, T8, T9, T10, p7_in_ggaaggaa(T7, T8, X14, X15, T9, T10, X16, X17))
SAMEFRINGE1_IN_GG(cons(T7, T8), cons(T9, T10)) → P7_IN_GGAAGGAA(T7, T8, X14, X15, T9, T10, X16, X17)
P7_IN_GGAAGGAA(nil, T15, nil, T15, T9, T10, X16, X17) → U2_GGAAGGAA(T15, T9, T10, X16, X17, gopher15_in_ggaa(T9, T10, X16, X17))
P7_IN_GGAAGGAA(nil, T15, nil, T15, T9, T10, X16, X17) → GOPHER15_IN_GGAA(T9, T10, X16, X17)
GOPHER15_IN_GGAA(cons(T33, T34), T35, X54, X55) → U1_GGAA(T33, T34, T35, X54, X55, gopher15_in_ggaa(T33, cons(T34, T35), X54, X55))
GOPHER15_IN_GGAA(cons(T33, T34), T35, X54, X55) → GOPHER15_IN_GGAA(T33, cons(T34, T35), X54, X55)
P7_IN_GGAAGGAA(nil, T15, nil, T15, T9, T10, T18, T19) → U3_GGAAGGAA(T15, T9, T10, T18, T19, gopher15_in_ggaa(T9, T10, T18, T19))
U3_GGAAGGAA(T15, T9, T10, T18, T19, gopher15_out_ggaa(T9, T10, T18, T19)) → U4_GGAAGGAA(T15, T9, T10, T18, T19, samefringe1_in_gg(T15, T19))
U3_GGAAGGAA(T15, T9, T10, T18, T19, gopher15_out_ggaa(T9, T10, T18, T19)) → SAMEFRINGE1_IN_GG(T15, T19)
P7_IN_GGAAGGAA(cons(T46, T47), T48, X78, X79, T9, T10, X16, X17) → U5_GGAAGGAA(T46, T47, T48, X78, X79, T9, T10, X16, X17, p7_in_ggaaggaa(T46, cons(T47, T48), X78, X79, T9, T10, X16, X17))
P7_IN_GGAAGGAA(cons(T46, T47), T48, X78, X79, T9, T10, X16, X17) → P7_IN_GGAAGGAA(T46, cons(T47, T48), X78, X79, T9, T10, X16, X17)

The TRS R consists of the following rules:

samefringe1_in_gg(nil, nil) → samefringe1_out_gg(nil, nil)
samefringe1_in_gg(cons(T7, T8), cons(T9, T10)) → U6_gg(T7, T8, T9, T10, p7_in_ggaaggaa(T7, T8, X14, X15, T9, T10, X16, X17))
p7_in_ggaaggaa(nil, T15, nil, T15, T9, T10, X16, X17) → U2_ggaaggaa(T15, T9, T10, X16, X17, gopher15_in_ggaa(T9, T10, X16, X17))
gopher15_in_ggaa(nil, T26, nil, T26) → gopher15_out_ggaa(nil, T26, nil, T26)
gopher15_in_ggaa(cons(T33, T34), T35, X54, X55) → U1_ggaa(T33, T34, T35, X54, X55, gopher15_in_ggaa(T33, cons(T34, T35), X54, X55))
U1_ggaa(T33, T34, T35, X54, X55, gopher15_out_ggaa(T33, cons(T34, T35), X54, X55)) → gopher15_out_ggaa(cons(T33, T34), T35, X54, X55)
U2_ggaaggaa(T15, T9, T10, X16, X17, gopher15_out_ggaa(T9, T10, X16, X17)) → p7_out_ggaaggaa(nil, T15, nil, T15, T9, T10, X16, X17)
p7_in_ggaaggaa(nil, T15, nil, T15, T9, T10, T18, T19) → U3_ggaaggaa(T15, T9, T10, T18, T19, gopher15_in_ggaa(T9, T10, T18, T19))
U3_ggaaggaa(T15, T9, T10, T18, T19, gopher15_out_ggaa(T9, T10, T18, T19)) → U4_ggaaggaa(T15, T9, T10, T18, T19, samefringe1_in_gg(T15, T19))
U4_ggaaggaa(T15, T9, T10, T18, T19, samefringe1_out_gg(T15, T19)) → p7_out_ggaaggaa(nil, T15, nil, T15, T9, T10, T18, T19)
p7_in_ggaaggaa(cons(T46, T47), T48, X78, X79, T9, T10, X16, X17) → U5_ggaaggaa(T46, T47, T48, X78, X79, T9, T10, X16, X17, p7_in_ggaaggaa(T46, cons(T47, T48), X78, X79, T9, T10, X16, X17))
U5_ggaaggaa(T46, T47, T48, X78, X79, T9, T10, X16, X17, p7_out_ggaaggaa(T46, cons(T47, T48), X78, X79, T9, T10, X16, X17)) → p7_out_ggaaggaa(cons(T46, T47), T48, X78, X79, T9, T10, X16, X17)
U6_gg(T7, T8, T9, T10, p7_out_ggaaggaa(T7, T8, X14, X15, T9, T10, X16, X17)) → samefringe1_out_gg(cons(T7, T8), cons(T9, T10))

The argument filtering Pi contains the following mapping:
samefringe1_in_gg(x1, x2)  =  samefringe1_in_gg(x1, x2)
nil  =  nil
samefringe1_out_gg(x1, x2)  =  samefringe1_out_gg
cons(x1, x2)  =  cons(x1, x2)
U6_gg(x1, x2, x3, x4, x5)  =  U6_gg(x5)
p7_in_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p7_in_ggaaggaa(x1, x2, x5, x6)
U2_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U2_ggaaggaa(x1, x6)
gopher15_in_ggaa(x1, x2, x3, x4)  =  gopher15_in_ggaa(x1, x2)
gopher15_out_ggaa(x1, x2, x3, x4)  =  gopher15_out_ggaa(x3, x4)
U1_ggaa(x1, x2, x3, x4, x5, x6)  =  U1_ggaa(x6)
p7_out_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p7_out_ggaaggaa(x3, x4, x7, x8)
U3_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U3_ggaaggaa(x1, x6)
U4_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U4_ggaaggaa(x1, x4, x5, x6)
U5_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)  =  U5_ggaaggaa(x10)
SAMEFRINGE1_IN_GG(x1, x2)  =  SAMEFRINGE1_IN_GG(x1, x2)
U6_GG(x1, x2, x3, x4, x5)  =  U6_GG(x5)
P7_IN_GGAAGGAA(x1, x2, x3, x4, x5, x6, x7, x8)  =  P7_IN_GGAAGGAA(x1, x2, x5, x6)
U2_GGAAGGAA(x1, x2, x3, x4, x5, x6)  =  U2_GGAAGGAA(x1, x6)
GOPHER15_IN_GGAA(x1, x2, x3, x4)  =  GOPHER15_IN_GGAA(x1, x2)
U1_GGAA(x1, x2, x3, x4, x5, x6)  =  U1_GGAA(x6)
U3_GGAAGGAA(x1, x2, x3, x4, x5, x6)  =  U3_GGAAGGAA(x1, x6)
U4_GGAAGGAA(x1, x2, x3, x4, x5, x6)  =  U4_GGAAGGAA(x1, x4, x5, x6)
U5_GGAAGGAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)  =  U5_GGAAGGAA(x10)

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

(7) DependencyGraphProof (EQUIVALENT transformation)

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

(8) Complex Obligation (AND)

(9) Obligation:

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

GOPHER15_IN_GGAA(cons(T33, T34), T35, X54, X55) → GOPHER15_IN_GGAA(T33, cons(T34, T35), X54, X55)

The TRS R consists of the following rules:

samefringe1_in_gg(nil, nil) → samefringe1_out_gg(nil, nil)
samefringe1_in_gg(cons(T7, T8), cons(T9, T10)) → U6_gg(T7, T8, T9, T10, p7_in_ggaaggaa(T7, T8, X14, X15, T9, T10, X16, X17))
p7_in_ggaaggaa(nil, T15, nil, T15, T9, T10, X16, X17) → U2_ggaaggaa(T15, T9, T10, X16, X17, gopher15_in_ggaa(T9, T10, X16, X17))
gopher15_in_ggaa(nil, T26, nil, T26) → gopher15_out_ggaa(nil, T26, nil, T26)
gopher15_in_ggaa(cons(T33, T34), T35, X54, X55) → U1_ggaa(T33, T34, T35, X54, X55, gopher15_in_ggaa(T33, cons(T34, T35), X54, X55))
U1_ggaa(T33, T34, T35, X54, X55, gopher15_out_ggaa(T33, cons(T34, T35), X54, X55)) → gopher15_out_ggaa(cons(T33, T34), T35, X54, X55)
U2_ggaaggaa(T15, T9, T10, X16, X17, gopher15_out_ggaa(T9, T10, X16, X17)) → p7_out_ggaaggaa(nil, T15, nil, T15, T9, T10, X16, X17)
p7_in_ggaaggaa(nil, T15, nil, T15, T9, T10, T18, T19) → U3_ggaaggaa(T15, T9, T10, T18, T19, gopher15_in_ggaa(T9, T10, T18, T19))
U3_ggaaggaa(T15, T9, T10, T18, T19, gopher15_out_ggaa(T9, T10, T18, T19)) → U4_ggaaggaa(T15, T9, T10, T18, T19, samefringe1_in_gg(T15, T19))
U4_ggaaggaa(T15, T9, T10, T18, T19, samefringe1_out_gg(T15, T19)) → p7_out_ggaaggaa(nil, T15, nil, T15, T9, T10, T18, T19)
p7_in_ggaaggaa(cons(T46, T47), T48, X78, X79, T9, T10, X16, X17) → U5_ggaaggaa(T46, T47, T48, X78, X79, T9, T10, X16, X17, p7_in_ggaaggaa(T46, cons(T47, T48), X78, X79, T9, T10, X16, X17))
U5_ggaaggaa(T46, T47, T48, X78, X79, T9, T10, X16, X17, p7_out_ggaaggaa(T46, cons(T47, T48), X78, X79, T9, T10, X16, X17)) → p7_out_ggaaggaa(cons(T46, T47), T48, X78, X79, T9, T10, X16, X17)
U6_gg(T7, T8, T9, T10, p7_out_ggaaggaa(T7, T8, X14, X15, T9, T10, X16, X17)) → samefringe1_out_gg(cons(T7, T8), cons(T9, T10))

The argument filtering Pi contains the following mapping:
samefringe1_in_gg(x1, x2)  =  samefringe1_in_gg(x1, x2)
nil  =  nil
samefringe1_out_gg(x1, x2)  =  samefringe1_out_gg
cons(x1, x2)  =  cons(x1, x2)
U6_gg(x1, x2, x3, x4, x5)  =  U6_gg(x5)
p7_in_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p7_in_ggaaggaa(x1, x2, x5, x6)
U2_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U2_ggaaggaa(x1, x6)
gopher15_in_ggaa(x1, x2, x3, x4)  =  gopher15_in_ggaa(x1, x2)
gopher15_out_ggaa(x1, x2, x3, x4)  =  gopher15_out_ggaa(x3, x4)
U1_ggaa(x1, x2, x3, x4, x5, x6)  =  U1_ggaa(x6)
p7_out_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p7_out_ggaaggaa(x3, x4, x7, x8)
U3_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U3_ggaaggaa(x1, x6)
U4_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U4_ggaaggaa(x1, x4, x5, x6)
U5_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)  =  U5_ggaaggaa(x10)
GOPHER15_IN_GGAA(x1, x2, x3, x4)  =  GOPHER15_IN_GGAA(x1, x2)

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

(10) UsableRulesProof (EQUIVALENT transformation)

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

(11) Obligation:

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

GOPHER15_IN_GGAA(cons(T33, T34), T35, X54, X55) → GOPHER15_IN_GGAA(T33, cons(T34, T35), X54, X55)

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

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

(12) PiDPToQDPProof (SOUND transformation)

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

(13) Obligation:

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

GOPHER15_IN_GGAA(cons(T33, T34), T35) → GOPHER15_IN_GGAA(T33, cons(T34, T35))

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

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

  • GOPHER15_IN_GGAA(cons(T33, T34), T35) → GOPHER15_IN_GGAA(T33, cons(T34, T35))
    The graph contains the following edges 1 > 1

(15) YES

(16) Obligation:

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

SAMEFRINGE1_IN_GG(cons(T7, T8), cons(T9, T10)) → P7_IN_GGAAGGAA(T7, T8, X14, X15, T9, T10, X16, X17)
P7_IN_GGAAGGAA(nil, T15, nil, T15, T9, T10, T18, T19) → U3_GGAAGGAA(T15, T9, T10, T18, T19, gopher15_in_ggaa(T9, T10, T18, T19))
U3_GGAAGGAA(T15, T9, T10, T18, T19, gopher15_out_ggaa(T9, T10, T18, T19)) → SAMEFRINGE1_IN_GG(T15, T19)
P7_IN_GGAAGGAA(cons(T46, T47), T48, X78, X79, T9, T10, X16, X17) → P7_IN_GGAAGGAA(T46, cons(T47, T48), X78, X79, T9, T10, X16, X17)

The TRS R consists of the following rules:

samefringe1_in_gg(nil, nil) → samefringe1_out_gg(nil, nil)
samefringe1_in_gg(cons(T7, T8), cons(T9, T10)) → U6_gg(T7, T8, T9, T10, p7_in_ggaaggaa(T7, T8, X14, X15, T9, T10, X16, X17))
p7_in_ggaaggaa(nil, T15, nil, T15, T9, T10, X16, X17) → U2_ggaaggaa(T15, T9, T10, X16, X17, gopher15_in_ggaa(T9, T10, X16, X17))
gopher15_in_ggaa(nil, T26, nil, T26) → gopher15_out_ggaa(nil, T26, nil, T26)
gopher15_in_ggaa(cons(T33, T34), T35, X54, X55) → U1_ggaa(T33, T34, T35, X54, X55, gopher15_in_ggaa(T33, cons(T34, T35), X54, X55))
U1_ggaa(T33, T34, T35, X54, X55, gopher15_out_ggaa(T33, cons(T34, T35), X54, X55)) → gopher15_out_ggaa(cons(T33, T34), T35, X54, X55)
U2_ggaaggaa(T15, T9, T10, X16, X17, gopher15_out_ggaa(T9, T10, X16, X17)) → p7_out_ggaaggaa(nil, T15, nil, T15, T9, T10, X16, X17)
p7_in_ggaaggaa(nil, T15, nil, T15, T9, T10, T18, T19) → U3_ggaaggaa(T15, T9, T10, T18, T19, gopher15_in_ggaa(T9, T10, T18, T19))
U3_ggaaggaa(T15, T9, T10, T18, T19, gopher15_out_ggaa(T9, T10, T18, T19)) → U4_ggaaggaa(T15, T9, T10, T18, T19, samefringe1_in_gg(T15, T19))
U4_ggaaggaa(T15, T9, T10, T18, T19, samefringe1_out_gg(T15, T19)) → p7_out_ggaaggaa(nil, T15, nil, T15, T9, T10, T18, T19)
p7_in_ggaaggaa(cons(T46, T47), T48, X78, X79, T9, T10, X16, X17) → U5_ggaaggaa(T46, T47, T48, X78, X79, T9, T10, X16, X17, p7_in_ggaaggaa(T46, cons(T47, T48), X78, X79, T9, T10, X16, X17))
U5_ggaaggaa(T46, T47, T48, X78, X79, T9, T10, X16, X17, p7_out_ggaaggaa(T46, cons(T47, T48), X78, X79, T9, T10, X16, X17)) → p7_out_ggaaggaa(cons(T46, T47), T48, X78, X79, T9, T10, X16, X17)
U6_gg(T7, T8, T9, T10, p7_out_ggaaggaa(T7, T8, X14, X15, T9, T10, X16, X17)) → samefringe1_out_gg(cons(T7, T8), cons(T9, T10))

The argument filtering Pi contains the following mapping:
samefringe1_in_gg(x1, x2)  =  samefringe1_in_gg(x1, x2)
nil  =  nil
samefringe1_out_gg(x1, x2)  =  samefringe1_out_gg
cons(x1, x2)  =  cons(x1, x2)
U6_gg(x1, x2, x3, x4, x5)  =  U6_gg(x5)
p7_in_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p7_in_ggaaggaa(x1, x2, x5, x6)
U2_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U2_ggaaggaa(x1, x6)
gopher15_in_ggaa(x1, x2, x3, x4)  =  gopher15_in_ggaa(x1, x2)
gopher15_out_ggaa(x1, x2, x3, x4)  =  gopher15_out_ggaa(x3, x4)
U1_ggaa(x1, x2, x3, x4, x5, x6)  =  U1_ggaa(x6)
p7_out_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p7_out_ggaaggaa(x3, x4, x7, x8)
U3_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U3_ggaaggaa(x1, x6)
U4_ggaaggaa(x1, x2, x3, x4, x5, x6)  =  U4_ggaaggaa(x1, x4, x5, x6)
U5_ggaaggaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)  =  U5_ggaaggaa(x10)
SAMEFRINGE1_IN_GG(x1, x2)  =  SAMEFRINGE1_IN_GG(x1, x2)
P7_IN_GGAAGGAA(x1, x2, x3, x4, x5, x6, x7, x8)  =  P7_IN_GGAAGGAA(x1, x2, x5, x6)
U3_GGAAGGAA(x1, x2, x3, x4, x5, x6)  =  U3_GGAAGGAA(x1, x6)

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

(17) UsableRulesProof (EQUIVALENT transformation)

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

(18) Obligation:

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

SAMEFRINGE1_IN_GG(cons(T7, T8), cons(T9, T10)) → P7_IN_GGAAGGAA(T7, T8, X14, X15, T9, T10, X16, X17)
P7_IN_GGAAGGAA(nil, T15, nil, T15, T9, T10, T18, T19) → U3_GGAAGGAA(T15, T9, T10, T18, T19, gopher15_in_ggaa(T9, T10, T18, T19))
U3_GGAAGGAA(T15, T9, T10, T18, T19, gopher15_out_ggaa(T9, T10, T18, T19)) → SAMEFRINGE1_IN_GG(T15, T19)
P7_IN_GGAAGGAA(cons(T46, T47), T48, X78, X79, T9, T10, X16, X17) → P7_IN_GGAAGGAA(T46, cons(T47, T48), X78, X79, T9, T10, X16, X17)

The TRS R consists of the following rules:

gopher15_in_ggaa(nil, T26, nil, T26) → gopher15_out_ggaa(nil, T26, nil, T26)
gopher15_in_ggaa(cons(T33, T34), T35, X54, X55) → U1_ggaa(T33, T34, T35, X54, X55, gopher15_in_ggaa(T33, cons(T34, T35), X54, X55))
U1_ggaa(T33, T34, T35, X54, X55, gopher15_out_ggaa(T33, cons(T34, T35), X54, X55)) → gopher15_out_ggaa(cons(T33, T34), T35, X54, X55)

The argument filtering Pi contains the following mapping:
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
gopher15_in_ggaa(x1, x2, x3, x4)  =  gopher15_in_ggaa(x1, x2)
gopher15_out_ggaa(x1, x2, x3, x4)  =  gopher15_out_ggaa(x3, x4)
U1_ggaa(x1, x2, x3, x4, x5, x6)  =  U1_ggaa(x6)
SAMEFRINGE1_IN_GG(x1, x2)  =  SAMEFRINGE1_IN_GG(x1, x2)
P7_IN_GGAAGGAA(x1, x2, x3, x4, x5, x6, x7, x8)  =  P7_IN_GGAAGGAA(x1, x2, x5, x6)
U3_GGAAGGAA(x1, x2, x3, x4, x5, x6)  =  U3_GGAAGGAA(x1, x6)

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

(19) PiDPToQDPProof (SOUND transformation)

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

(20) Obligation:

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

SAMEFRINGE1_IN_GG(cons(T7, T8), cons(T9, T10)) → P7_IN_GGAAGGAA(T7, T8, T9, T10)
P7_IN_GGAAGGAA(nil, T15, T9, T10) → U3_GGAAGGAA(T15, gopher15_in_ggaa(T9, T10))
U3_GGAAGGAA(T15, gopher15_out_ggaa(T18, T19)) → SAMEFRINGE1_IN_GG(T15, T19)
P7_IN_GGAAGGAA(cons(T46, T47), T48, T9, T10) → P7_IN_GGAAGGAA(T46, cons(T47, T48), T9, T10)

The TRS R consists of the following rules:

gopher15_in_ggaa(nil, T26) → gopher15_out_ggaa(nil, T26)
gopher15_in_ggaa(cons(T33, T34), T35) → U1_ggaa(gopher15_in_ggaa(T33, cons(T34, T35)))
U1_ggaa(gopher15_out_ggaa(X54, X55)) → gopher15_out_ggaa(X54, X55)

The set Q consists of the following terms:

gopher15_in_ggaa(x0, x1)
U1_ggaa(x0)

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

(21) MRRProof (EQUIVALENT transformation)

By using the rule removal processor [LPAR04] with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

SAMEFRINGE1_IN_GG(cons(T7, T8), cons(T9, T10)) → P7_IN_GGAAGGAA(T7, T8, T9, T10)
P7_IN_GGAAGGAA(nil, T15, T9, T10) → U3_GGAAGGAA(T15, gopher15_in_ggaa(T9, T10))
U3_GGAAGGAA(T15, gopher15_out_ggaa(T18, T19)) → SAMEFRINGE1_IN_GG(T15, T19)

Strictly oriented rules of the TRS R:

gopher15_in_ggaa(nil, T26) → gopher15_out_ggaa(nil, T26)

Used ordering: Polynomial interpretation [POLO]:

POL(P7_IN_GGAAGGAA(x1, x2, x3, x4)) = x1 + x2 + x3 + x4   
POL(SAMEFRINGE1_IN_GG(x1, x2)) = 1 + x1 + x2   
POL(U1_ggaa(x1)) = x1   
POL(U3_GGAAGGAA(x1, x2)) = x1 + x2   
POL(cons(x1, x2)) = x1 + x2   
POL(gopher15_in_ggaa(x1, x2)) = 3 + x1 + x2   
POL(gopher15_out_ggaa(x1, x2)) = 2 + x1 + x2   
POL(nil) = 4   

(22) Obligation:

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

P7_IN_GGAAGGAA(cons(T46, T47), T48, T9, T10) → P7_IN_GGAAGGAA(T46, cons(T47, T48), T9, T10)

The TRS R consists of the following rules:

gopher15_in_ggaa(cons(T33, T34), T35) → U1_ggaa(gopher15_in_ggaa(T33, cons(T34, T35)))
U1_ggaa(gopher15_out_ggaa(X54, X55)) → gopher15_out_ggaa(X54, X55)

The set Q consists of the following terms:

gopher15_in_ggaa(x0, x1)
U1_ggaa(x0)

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

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

(24) Obligation:

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

P7_IN_GGAAGGAA(cons(T46, T47), T48, T9, T10) → P7_IN_GGAAGGAA(T46, cons(T47, T48), T9, T10)

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

gopher15_in_ggaa(x0, x1)
U1_ggaa(x0)

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

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

gopher15_in_ggaa(x0, x1)
U1_ggaa(x0)

(26) Obligation:

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

P7_IN_GGAAGGAA(cons(T46, T47), T48, T9, T10) → P7_IN_GGAAGGAA(T46, cons(T47, T48), T9, T10)

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

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

  • P7_IN_GGAAGGAA(cons(T46, T47), T48, T9, T10) → P7_IN_GGAAGGAA(T46, cons(T47, T48), T9, T10)
    The graph contains the following edges 1 > 1, 3 >= 3, 4 >= 4

(28) YES