(0) Obligation:

Clauses:

palindrome(L) :- ','(halves(L, X1s, X2s, EvenOdd), ','(eq(EvenOdd, even), eq(X1s, X2s))).
palindrome(L) :- ','(halves(L, X1s, X2s, EvenOdd), ','(eq(EvenOdd, odd), last(X1s, X1, X2s))).
halves([], [], [], even).
halves(.(X, []), .(X, []), [], odd).
halves(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) :- ','(last(.(Y, Xs), R, Rests), halves(Rests, Ts, Rs, EvenOdd)).
last(.(T, []), T, []).
last(.(H, T), X, .(H, M)) :- last(T, X, M).
eq(X, X).

Queries:

palindrome(g).

(1) PrologToPiTRSProof (SOUND transformation)

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

palindrome_in_g(L) → U1_g(L, halves_in_gaaa(L, X1s, X2s, EvenOdd))
halves_in_gaaa([], [], [], even) → halves_out_gaaa([], [], [], even)
halves_in_gaaa(.(X, []), .(X, []), [], odd) → halves_out_gaaa(.(X, []), .(X, []), [], odd)
halves_in_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))
last_in_gaa(.(T, []), T, []) → last_out_gaa(.(T, []), T, [])
last_in_gaa(.(H, T), X, .(H, M)) → U8_gaa(H, T, X, M, last_in_gaa(T, X, M))
U8_gaa(H, T, X, M, last_out_gaa(T, X, M)) → last_out_gaa(.(H, T), X, .(H, M))
U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_in_gaaa(Rests, Ts, Rs, EvenOdd))
U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_out_gaaa(Rests, Ts, Rs, EvenOdd)) → halves_out_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U2_g(L, X1s, X2s, eq_in_gg(EvenOdd, even))
eq_in_gg(X, X) → eq_out_gg(X, X)
U2_g(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → U3_g(L, eq_in_gg(X1s, X2s))
U3_g(L, eq_out_gg(X1s, X2s)) → palindrome_out_g(L)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U4_g(L, X1s, X2s, eq_in_gg(EvenOdd, odd))
U4_g(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → U5_g(L, last_in_gag(X1s, X1, X2s))
last_in_gag(.(T, []), T, []) → last_out_gag(.(T, []), T, [])
last_in_gag(.(H, T), X, .(H, M)) → U8_gag(H, T, X, M, last_in_gag(T, X, M))
U8_gag(H, T, X, M, last_out_gag(T, X, M)) → last_out_gag(.(H, T), X, .(H, M))
U5_g(L, last_out_gag(X1s, X1, X2s)) → palindrome_out_g(L)

The argument filtering Pi contains the following mapping:
palindrome_in_g(x1)  =  palindrome_in_g(x1)
U1_g(x1, x2)  =  U1_g(x2)
halves_in_gaaa(x1, x2, x3, x4)  =  halves_in_gaaa(x1)
[]  =  []
halves_out_gaaa(x1, x2, x3, x4)  =  halves_out_gaaa(x2, x3, x4)
.(x1, x2)  =  .(x1, x2)
U6_gaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_gaaa(x1, x8)
last_in_gaa(x1, x2, x3)  =  last_in_gaa(x1)
last_out_gaa(x1, x2, x3)  =  last_out_gaa(x2, x3)
U8_gaa(x1, x2, x3, x4, x5)  =  U8_gaa(x1, x5)
U7_gaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gaaa(x1, x5, x8)
U2_g(x1, x2, x3, x4)  =  U2_g(x2, x3, x4)
eq_in_gg(x1, x2)  =  eq_in_gg(x1, x2)
eq_out_gg(x1, x2)  =  eq_out_gg
even  =  even
U3_g(x1, x2)  =  U3_g(x2)
palindrome_out_g(x1)  =  palindrome_out_g
U4_g(x1, x2, x3, x4)  =  U4_g(x2, x3, x4)
odd  =  odd
U5_g(x1, x2)  =  U5_g(x2)
last_in_gag(x1, x2, x3)  =  last_in_gag(x1, x3)
last_out_gag(x1, x2, x3)  =  last_out_gag(x2)
U8_gag(x1, x2, x3, x4, x5)  =  U8_gag(x5)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(2) Obligation:

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

palindrome_in_g(L) → U1_g(L, halves_in_gaaa(L, X1s, X2s, EvenOdd))
halves_in_gaaa([], [], [], even) → halves_out_gaaa([], [], [], even)
halves_in_gaaa(.(X, []), .(X, []), [], odd) → halves_out_gaaa(.(X, []), .(X, []), [], odd)
halves_in_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))
last_in_gaa(.(T, []), T, []) → last_out_gaa(.(T, []), T, [])
last_in_gaa(.(H, T), X, .(H, M)) → U8_gaa(H, T, X, M, last_in_gaa(T, X, M))
U8_gaa(H, T, X, M, last_out_gaa(T, X, M)) → last_out_gaa(.(H, T), X, .(H, M))
U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_in_gaaa(Rests, Ts, Rs, EvenOdd))
U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_out_gaaa(Rests, Ts, Rs, EvenOdd)) → halves_out_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U2_g(L, X1s, X2s, eq_in_gg(EvenOdd, even))
eq_in_gg(X, X) → eq_out_gg(X, X)
U2_g(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → U3_g(L, eq_in_gg(X1s, X2s))
U3_g(L, eq_out_gg(X1s, X2s)) → palindrome_out_g(L)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U4_g(L, X1s, X2s, eq_in_gg(EvenOdd, odd))
U4_g(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → U5_g(L, last_in_gag(X1s, X1, X2s))
last_in_gag(.(T, []), T, []) → last_out_gag(.(T, []), T, [])
last_in_gag(.(H, T), X, .(H, M)) → U8_gag(H, T, X, M, last_in_gag(T, X, M))
U8_gag(H, T, X, M, last_out_gag(T, X, M)) → last_out_gag(.(H, T), X, .(H, M))
U5_g(L, last_out_gag(X1s, X1, X2s)) → palindrome_out_g(L)

The argument filtering Pi contains the following mapping:
palindrome_in_g(x1)  =  palindrome_in_g(x1)
U1_g(x1, x2)  =  U1_g(x2)
halves_in_gaaa(x1, x2, x3, x4)  =  halves_in_gaaa(x1)
[]  =  []
halves_out_gaaa(x1, x2, x3, x4)  =  halves_out_gaaa(x2, x3, x4)
.(x1, x2)  =  .(x1, x2)
U6_gaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_gaaa(x1, x8)
last_in_gaa(x1, x2, x3)  =  last_in_gaa(x1)
last_out_gaa(x1, x2, x3)  =  last_out_gaa(x2, x3)
U8_gaa(x1, x2, x3, x4, x5)  =  U8_gaa(x1, x5)
U7_gaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gaaa(x1, x5, x8)
U2_g(x1, x2, x3, x4)  =  U2_g(x2, x3, x4)
eq_in_gg(x1, x2)  =  eq_in_gg(x1, x2)
eq_out_gg(x1, x2)  =  eq_out_gg
even  =  even
U3_g(x1, x2)  =  U3_g(x2)
palindrome_out_g(x1)  =  palindrome_out_g
U4_g(x1, x2, x3, x4)  =  U4_g(x2, x3, x4)
odd  =  odd
U5_g(x1, x2)  =  U5_g(x2)
last_in_gag(x1, x2, x3)  =  last_in_gag(x1, x3)
last_out_gag(x1, x2, x3)  =  last_out_gag(x2)
U8_gag(x1, x2, x3, x4, x5)  =  U8_gag(x5)

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

PALINDROME_IN_G(L) → U1_G(L, halves_in_gaaa(L, X1s, X2s, EvenOdd))
PALINDROME_IN_G(L) → HALVES_IN_GAAA(L, X1s, X2s, EvenOdd)
HALVES_IN_GAAA(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))
HALVES_IN_GAAA(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → LAST_IN_GAA(.(Y, Xs), R, Rests)
LAST_IN_GAA(.(H, T), X, .(H, M)) → U8_GAA(H, T, X, M, last_in_gaa(T, X, M))
LAST_IN_GAA(.(H, T), X, .(H, M)) → LAST_IN_GAA(T, X, M)
U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → U7_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_in_gaaa(Rests, Ts, Rs, EvenOdd))
U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → HALVES_IN_GAAA(Rests, Ts, Rs, EvenOdd)
U1_G(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U2_G(L, X1s, X2s, eq_in_gg(EvenOdd, even))
U1_G(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → EQ_IN_GG(EvenOdd, even)
U2_G(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → U3_G(L, eq_in_gg(X1s, X2s))
U2_G(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → EQ_IN_GG(X1s, X2s)
U1_G(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U4_G(L, X1s, X2s, eq_in_gg(EvenOdd, odd))
U1_G(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → EQ_IN_GG(EvenOdd, odd)
U4_G(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → U5_G(L, last_in_gag(X1s, X1, X2s))
U4_G(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → LAST_IN_GAG(X1s, X1, X2s)
LAST_IN_GAG(.(H, T), X, .(H, M)) → U8_GAG(H, T, X, M, last_in_gag(T, X, M))
LAST_IN_GAG(.(H, T), X, .(H, M)) → LAST_IN_GAG(T, X, M)

The TRS R consists of the following rules:

palindrome_in_g(L) → U1_g(L, halves_in_gaaa(L, X1s, X2s, EvenOdd))
halves_in_gaaa([], [], [], even) → halves_out_gaaa([], [], [], even)
halves_in_gaaa(.(X, []), .(X, []), [], odd) → halves_out_gaaa(.(X, []), .(X, []), [], odd)
halves_in_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))
last_in_gaa(.(T, []), T, []) → last_out_gaa(.(T, []), T, [])
last_in_gaa(.(H, T), X, .(H, M)) → U8_gaa(H, T, X, M, last_in_gaa(T, X, M))
U8_gaa(H, T, X, M, last_out_gaa(T, X, M)) → last_out_gaa(.(H, T), X, .(H, M))
U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_in_gaaa(Rests, Ts, Rs, EvenOdd))
U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_out_gaaa(Rests, Ts, Rs, EvenOdd)) → halves_out_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U2_g(L, X1s, X2s, eq_in_gg(EvenOdd, even))
eq_in_gg(X, X) → eq_out_gg(X, X)
U2_g(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → U3_g(L, eq_in_gg(X1s, X2s))
U3_g(L, eq_out_gg(X1s, X2s)) → palindrome_out_g(L)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U4_g(L, X1s, X2s, eq_in_gg(EvenOdd, odd))
U4_g(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → U5_g(L, last_in_gag(X1s, X1, X2s))
last_in_gag(.(T, []), T, []) → last_out_gag(.(T, []), T, [])
last_in_gag(.(H, T), X, .(H, M)) → U8_gag(H, T, X, M, last_in_gag(T, X, M))
U8_gag(H, T, X, M, last_out_gag(T, X, M)) → last_out_gag(.(H, T), X, .(H, M))
U5_g(L, last_out_gag(X1s, X1, X2s)) → palindrome_out_g(L)

The argument filtering Pi contains the following mapping:
palindrome_in_g(x1)  =  palindrome_in_g(x1)
U1_g(x1, x2)  =  U1_g(x2)
halves_in_gaaa(x1, x2, x3, x4)  =  halves_in_gaaa(x1)
[]  =  []
halves_out_gaaa(x1, x2, x3, x4)  =  halves_out_gaaa(x2, x3, x4)
.(x1, x2)  =  .(x1, x2)
U6_gaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_gaaa(x1, x8)
last_in_gaa(x1, x2, x3)  =  last_in_gaa(x1)
last_out_gaa(x1, x2, x3)  =  last_out_gaa(x2, x3)
U8_gaa(x1, x2, x3, x4, x5)  =  U8_gaa(x1, x5)
U7_gaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gaaa(x1, x5, x8)
U2_g(x1, x2, x3, x4)  =  U2_g(x2, x3, x4)
eq_in_gg(x1, x2)  =  eq_in_gg(x1, x2)
eq_out_gg(x1, x2)  =  eq_out_gg
even  =  even
U3_g(x1, x2)  =  U3_g(x2)
palindrome_out_g(x1)  =  palindrome_out_g
U4_g(x1, x2, x3, x4)  =  U4_g(x2, x3, x4)
odd  =  odd
U5_g(x1, x2)  =  U5_g(x2)
last_in_gag(x1, x2, x3)  =  last_in_gag(x1, x3)
last_out_gag(x1, x2, x3)  =  last_out_gag(x2)
U8_gag(x1, x2, x3, x4, x5)  =  U8_gag(x5)
PALINDROME_IN_G(x1)  =  PALINDROME_IN_G(x1)
U1_G(x1, x2)  =  U1_G(x2)
HALVES_IN_GAAA(x1, x2, x3, x4)  =  HALVES_IN_GAAA(x1)
U6_GAAA(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_GAAA(x1, x8)
LAST_IN_GAA(x1, x2, x3)  =  LAST_IN_GAA(x1)
U8_GAA(x1, x2, x3, x4, x5)  =  U8_GAA(x1, x5)
U7_GAAA(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_GAAA(x1, x5, x8)
U2_G(x1, x2, x3, x4)  =  U2_G(x2, x3, x4)
EQ_IN_GG(x1, x2)  =  EQ_IN_GG(x1, x2)
U3_G(x1, x2)  =  U3_G(x2)
U4_G(x1, x2, x3, x4)  =  U4_G(x2, x3, x4)
U5_G(x1, x2)  =  U5_G(x2)
LAST_IN_GAG(x1, x2, x3)  =  LAST_IN_GAG(x1, x3)
U8_GAG(x1, x2, x3, x4, x5)  =  U8_GAG(x5)

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

(4) Obligation:

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

PALINDROME_IN_G(L) → U1_G(L, halves_in_gaaa(L, X1s, X2s, EvenOdd))
PALINDROME_IN_G(L) → HALVES_IN_GAAA(L, X1s, X2s, EvenOdd)
HALVES_IN_GAAA(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))
HALVES_IN_GAAA(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → LAST_IN_GAA(.(Y, Xs), R, Rests)
LAST_IN_GAA(.(H, T), X, .(H, M)) → U8_GAA(H, T, X, M, last_in_gaa(T, X, M))
LAST_IN_GAA(.(H, T), X, .(H, M)) → LAST_IN_GAA(T, X, M)
U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → U7_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_in_gaaa(Rests, Ts, Rs, EvenOdd))
U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → HALVES_IN_GAAA(Rests, Ts, Rs, EvenOdd)
U1_G(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U2_G(L, X1s, X2s, eq_in_gg(EvenOdd, even))
U1_G(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → EQ_IN_GG(EvenOdd, even)
U2_G(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → U3_G(L, eq_in_gg(X1s, X2s))
U2_G(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → EQ_IN_GG(X1s, X2s)
U1_G(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U4_G(L, X1s, X2s, eq_in_gg(EvenOdd, odd))
U1_G(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → EQ_IN_GG(EvenOdd, odd)
U4_G(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → U5_G(L, last_in_gag(X1s, X1, X2s))
U4_G(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → LAST_IN_GAG(X1s, X1, X2s)
LAST_IN_GAG(.(H, T), X, .(H, M)) → U8_GAG(H, T, X, M, last_in_gag(T, X, M))
LAST_IN_GAG(.(H, T), X, .(H, M)) → LAST_IN_GAG(T, X, M)

The TRS R consists of the following rules:

palindrome_in_g(L) → U1_g(L, halves_in_gaaa(L, X1s, X2s, EvenOdd))
halves_in_gaaa([], [], [], even) → halves_out_gaaa([], [], [], even)
halves_in_gaaa(.(X, []), .(X, []), [], odd) → halves_out_gaaa(.(X, []), .(X, []), [], odd)
halves_in_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))
last_in_gaa(.(T, []), T, []) → last_out_gaa(.(T, []), T, [])
last_in_gaa(.(H, T), X, .(H, M)) → U8_gaa(H, T, X, M, last_in_gaa(T, X, M))
U8_gaa(H, T, X, M, last_out_gaa(T, X, M)) → last_out_gaa(.(H, T), X, .(H, M))
U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_in_gaaa(Rests, Ts, Rs, EvenOdd))
U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_out_gaaa(Rests, Ts, Rs, EvenOdd)) → halves_out_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U2_g(L, X1s, X2s, eq_in_gg(EvenOdd, even))
eq_in_gg(X, X) → eq_out_gg(X, X)
U2_g(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → U3_g(L, eq_in_gg(X1s, X2s))
U3_g(L, eq_out_gg(X1s, X2s)) → palindrome_out_g(L)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U4_g(L, X1s, X2s, eq_in_gg(EvenOdd, odd))
U4_g(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → U5_g(L, last_in_gag(X1s, X1, X2s))
last_in_gag(.(T, []), T, []) → last_out_gag(.(T, []), T, [])
last_in_gag(.(H, T), X, .(H, M)) → U8_gag(H, T, X, M, last_in_gag(T, X, M))
U8_gag(H, T, X, M, last_out_gag(T, X, M)) → last_out_gag(.(H, T), X, .(H, M))
U5_g(L, last_out_gag(X1s, X1, X2s)) → palindrome_out_g(L)

The argument filtering Pi contains the following mapping:
palindrome_in_g(x1)  =  palindrome_in_g(x1)
U1_g(x1, x2)  =  U1_g(x2)
halves_in_gaaa(x1, x2, x3, x4)  =  halves_in_gaaa(x1)
[]  =  []
halves_out_gaaa(x1, x2, x3, x4)  =  halves_out_gaaa(x2, x3, x4)
.(x1, x2)  =  .(x1, x2)
U6_gaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_gaaa(x1, x8)
last_in_gaa(x1, x2, x3)  =  last_in_gaa(x1)
last_out_gaa(x1, x2, x3)  =  last_out_gaa(x2, x3)
U8_gaa(x1, x2, x3, x4, x5)  =  U8_gaa(x1, x5)
U7_gaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gaaa(x1, x5, x8)
U2_g(x1, x2, x3, x4)  =  U2_g(x2, x3, x4)
eq_in_gg(x1, x2)  =  eq_in_gg(x1, x2)
eq_out_gg(x1, x2)  =  eq_out_gg
even  =  even
U3_g(x1, x2)  =  U3_g(x2)
palindrome_out_g(x1)  =  palindrome_out_g
U4_g(x1, x2, x3, x4)  =  U4_g(x2, x3, x4)
odd  =  odd
U5_g(x1, x2)  =  U5_g(x2)
last_in_gag(x1, x2, x3)  =  last_in_gag(x1, x3)
last_out_gag(x1, x2, x3)  =  last_out_gag(x2)
U8_gag(x1, x2, x3, x4, x5)  =  U8_gag(x5)
PALINDROME_IN_G(x1)  =  PALINDROME_IN_G(x1)
U1_G(x1, x2)  =  U1_G(x2)
HALVES_IN_GAAA(x1, x2, x3, x4)  =  HALVES_IN_GAAA(x1)
U6_GAAA(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_GAAA(x1, x8)
LAST_IN_GAA(x1, x2, x3)  =  LAST_IN_GAA(x1)
U8_GAA(x1, x2, x3, x4, x5)  =  U8_GAA(x1, x5)
U7_GAAA(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_GAAA(x1, x5, x8)
U2_G(x1, x2, x3, x4)  =  U2_G(x2, x3, x4)
EQ_IN_GG(x1, x2)  =  EQ_IN_GG(x1, x2)
U3_G(x1, x2)  =  U3_G(x2)
U4_G(x1, x2, x3, x4)  =  U4_G(x2, x3, x4)
U5_G(x1, x2)  =  U5_G(x2)
LAST_IN_GAG(x1, x2, x3)  =  LAST_IN_GAG(x1, x3)
U8_GAG(x1, x2, x3, x4, x5)  =  U8_GAG(x5)

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

(5) DependencyGraphProof (EQUIVALENT transformation)

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

(6) Complex Obligation (AND)

(7) Obligation:

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

LAST_IN_GAG(.(H, T), X, .(H, M)) → LAST_IN_GAG(T, X, M)

The TRS R consists of the following rules:

palindrome_in_g(L) → U1_g(L, halves_in_gaaa(L, X1s, X2s, EvenOdd))
halves_in_gaaa([], [], [], even) → halves_out_gaaa([], [], [], even)
halves_in_gaaa(.(X, []), .(X, []), [], odd) → halves_out_gaaa(.(X, []), .(X, []), [], odd)
halves_in_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))
last_in_gaa(.(T, []), T, []) → last_out_gaa(.(T, []), T, [])
last_in_gaa(.(H, T), X, .(H, M)) → U8_gaa(H, T, X, M, last_in_gaa(T, X, M))
U8_gaa(H, T, X, M, last_out_gaa(T, X, M)) → last_out_gaa(.(H, T), X, .(H, M))
U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_in_gaaa(Rests, Ts, Rs, EvenOdd))
U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_out_gaaa(Rests, Ts, Rs, EvenOdd)) → halves_out_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U2_g(L, X1s, X2s, eq_in_gg(EvenOdd, even))
eq_in_gg(X, X) → eq_out_gg(X, X)
U2_g(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → U3_g(L, eq_in_gg(X1s, X2s))
U3_g(L, eq_out_gg(X1s, X2s)) → palindrome_out_g(L)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U4_g(L, X1s, X2s, eq_in_gg(EvenOdd, odd))
U4_g(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → U5_g(L, last_in_gag(X1s, X1, X2s))
last_in_gag(.(T, []), T, []) → last_out_gag(.(T, []), T, [])
last_in_gag(.(H, T), X, .(H, M)) → U8_gag(H, T, X, M, last_in_gag(T, X, M))
U8_gag(H, T, X, M, last_out_gag(T, X, M)) → last_out_gag(.(H, T), X, .(H, M))
U5_g(L, last_out_gag(X1s, X1, X2s)) → palindrome_out_g(L)

The argument filtering Pi contains the following mapping:
palindrome_in_g(x1)  =  palindrome_in_g(x1)
U1_g(x1, x2)  =  U1_g(x2)
halves_in_gaaa(x1, x2, x3, x4)  =  halves_in_gaaa(x1)
[]  =  []
halves_out_gaaa(x1, x2, x3, x4)  =  halves_out_gaaa(x2, x3, x4)
.(x1, x2)  =  .(x1, x2)
U6_gaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_gaaa(x1, x8)
last_in_gaa(x1, x2, x3)  =  last_in_gaa(x1)
last_out_gaa(x1, x2, x3)  =  last_out_gaa(x2, x3)
U8_gaa(x1, x2, x3, x4, x5)  =  U8_gaa(x1, x5)
U7_gaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gaaa(x1, x5, x8)
U2_g(x1, x2, x3, x4)  =  U2_g(x2, x3, x4)
eq_in_gg(x1, x2)  =  eq_in_gg(x1, x2)
eq_out_gg(x1, x2)  =  eq_out_gg
even  =  even
U3_g(x1, x2)  =  U3_g(x2)
palindrome_out_g(x1)  =  palindrome_out_g
U4_g(x1, x2, x3, x4)  =  U4_g(x2, x3, x4)
odd  =  odd
U5_g(x1, x2)  =  U5_g(x2)
last_in_gag(x1, x2, x3)  =  last_in_gag(x1, x3)
last_out_gag(x1, x2, x3)  =  last_out_gag(x2)
U8_gag(x1, x2, x3, x4, x5)  =  U8_gag(x5)
LAST_IN_GAG(x1, x2, x3)  =  LAST_IN_GAG(x1, x3)

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

(8) UsableRulesProof (EQUIVALENT transformation)

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

(9) Obligation:

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

LAST_IN_GAG(.(H, T), X, .(H, M)) → LAST_IN_GAG(T, X, M)

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

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

(10) PiDPToQDPProof (SOUND transformation)

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

(11) Obligation:

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

LAST_IN_GAG(.(H, T), .(H, M)) → LAST_IN_GAG(T, M)

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

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

  • LAST_IN_GAG(.(H, T), .(H, M)) → LAST_IN_GAG(T, M)
    The graph contains the following edges 1 > 1, 2 > 2

(13) TRUE

(14) Obligation:

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

LAST_IN_GAA(.(H, T), X, .(H, M)) → LAST_IN_GAA(T, X, M)

The TRS R consists of the following rules:

palindrome_in_g(L) → U1_g(L, halves_in_gaaa(L, X1s, X2s, EvenOdd))
halves_in_gaaa([], [], [], even) → halves_out_gaaa([], [], [], even)
halves_in_gaaa(.(X, []), .(X, []), [], odd) → halves_out_gaaa(.(X, []), .(X, []), [], odd)
halves_in_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))
last_in_gaa(.(T, []), T, []) → last_out_gaa(.(T, []), T, [])
last_in_gaa(.(H, T), X, .(H, M)) → U8_gaa(H, T, X, M, last_in_gaa(T, X, M))
U8_gaa(H, T, X, M, last_out_gaa(T, X, M)) → last_out_gaa(.(H, T), X, .(H, M))
U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_in_gaaa(Rests, Ts, Rs, EvenOdd))
U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_out_gaaa(Rests, Ts, Rs, EvenOdd)) → halves_out_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U2_g(L, X1s, X2s, eq_in_gg(EvenOdd, even))
eq_in_gg(X, X) → eq_out_gg(X, X)
U2_g(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → U3_g(L, eq_in_gg(X1s, X2s))
U3_g(L, eq_out_gg(X1s, X2s)) → palindrome_out_g(L)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U4_g(L, X1s, X2s, eq_in_gg(EvenOdd, odd))
U4_g(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → U5_g(L, last_in_gag(X1s, X1, X2s))
last_in_gag(.(T, []), T, []) → last_out_gag(.(T, []), T, [])
last_in_gag(.(H, T), X, .(H, M)) → U8_gag(H, T, X, M, last_in_gag(T, X, M))
U8_gag(H, T, X, M, last_out_gag(T, X, M)) → last_out_gag(.(H, T), X, .(H, M))
U5_g(L, last_out_gag(X1s, X1, X2s)) → palindrome_out_g(L)

The argument filtering Pi contains the following mapping:
palindrome_in_g(x1)  =  palindrome_in_g(x1)
U1_g(x1, x2)  =  U1_g(x2)
halves_in_gaaa(x1, x2, x3, x4)  =  halves_in_gaaa(x1)
[]  =  []
halves_out_gaaa(x1, x2, x3, x4)  =  halves_out_gaaa(x2, x3, x4)
.(x1, x2)  =  .(x1, x2)
U6_gaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_gaaa(x1, x8)
last_in_gaa(x1, x2, x3)  =  last_in_gaa(x1)
last_out_gaa(x1, x2, x3)  =  last_out_gaa(x2, x3)
U8_gaa(x1, x2, x3, x4, x5)  =  U8_gaa(x1, x5)
U7_gaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gaaa(x1, x5, x8)
U2_g(x1, x2, x3, x4)  =  U2_g(x2, x3, x4)
eq_in_gg(x1, x2)  =  eq_in_gg(x1, x2)
eq_out_gg(x1, x2)  =  eq_out_gg
even  =  even
U3_g(x1, x2)  =  U3_g(x2)
palindrome_out_g(x1)  =  palindrome_out_g
U4_g(x1, x2, x3, x4)  =  U4_g(x2, x3, x4)
odd  =  odd
U5_g(x1, x2)  =  U5_g(x2)
last_in_gag(x1, x2, x3)  =  last_in_gag(x1, x3)
last_out_gag(x1, x2, x3)  =  last_out_gag(x2)
U8_gag(x1, x2, x3, x4, x5)  =  U8_gag(x5)
LAST_IN_GAA(x1, x2, x3)  =  LAST_IN_GAA(x1)

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

(15) UsableRulesProof (EQUIVALENT transformation)

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

(16) Obligation:

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

LAST_IN_GAA(.(H, T), X, .(H, M)) → LAST_IN_GAA(T, X, M)

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

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

(17) PiDPToQDPProof (SOUND transformation)

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

(18) Obligation:

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

LAST_IN_GAA(.(H, T)) → LAST_IN_GAA(T)

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

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

  • LAST_IN_GAA(.(H, T)) → LAST_IN_GAA(T)
    The graph contains the following edges 1 > 1

(20) TRUE

(21) Obligation:

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

U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → HALVES_IN_GAAA(Rests, Ts, Rs, EvenOdd)
HALVES_IN_GAAA(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))

The TRS R consists of the following rules:

palindrome_in_g(L) → U1_g(L, halves_in_gaaa(L, X1s, X2s, EvenOdd))
halves_in_gaaa([], [], [], even) → halves_out_gaaa([], [], [], even)
halves_in_gaaa(.(X, []), .(X, []), [], odd) → halves_out_gaaa(.(X, []), .(X, []), [], odd)
halves_in_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))
last_in_gaa(.(T, []), T, []) → last_out_gaa(.(T, []), T, [])
last_in_gaa(.(H, T), X, .(H, M)) → U8_gaa(H, T, X, M, last_in_gaa(T, X, M))
U8_gaa(H, T, X, M, last_out_gaa(T, X, M)) → last_out_gaa(.(H, T), X, .(H, M))
U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_in_gaaa(Rests, Ts, Rs, EvenOdd))
U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_out_gaaa(Rests, Ts, Rs, EvenOdd)) → halves_out_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U2_g(L, X1s, X2s, eq_in_gg(EvenOdd, even))
eq_in_gg(X, X) → eq_out_gg(X, X)
U2_g(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → U3_g(L, eq_in_gg(X1s, X2s))
U3_g(L, eq_out_gg(X1s, X2s)) → palindrome_out_g(L)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U4_g(L, X1s, X2s, eq_in_gg(EvenOdd, odd))
U4_g(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → U5_g(L, last_in_gag(X1s, X1, X2s))
last_in_gag(.(T, []), T, []) → last_out_gag(.(T, []), T, [])
last_in_gag(.(H, T), X, .(H, M)) → U8_gag(H, T, X, M, last_in_gag(T, X, M))
U8_gag(H, T, X, M, last_out_gag(T, X, M)) → last_out_gag(.(H, T), X, .(H, M))
U5_g(L, last_out_gag(X1s, X1, X2s)) → palindrome_out_g(L)

The argument filtering Pi contains the following mapping:
palindrome_in_g(x1)  =  palindrome_in_g(x1)
U1_g(x1, x2)  =  U1_g(x2)
halves_in_gaaa(x1, x2, x3, x4)  =  halves_in_gaaa(x1)
[]  =  []
halves_out_gaaa(x1, x2, x3, x4)  =  halves_out_gaaa(x2, x3, x4)
.(x1, x2)  =  .(x1, x2)
U6_gaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_gaaa(x1, x8)
last_in_gaa(x1, x2, x3)  =  last_in_gaa(x1)
last_out_gaa(x1, x2, x3)  =  last_out_gaa(x2, x3)
U8_gaa(x1, x2, x3, x4, x5)  =  U8_gaa(x1, x5)
U7_gaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gaaa(x1, x5, x8)
U2_g(x1, x2, x3, x4)  =  U2_g(x2, x3, x4)
eq_in_gg(x1, x2)  =  eq_in_gg(x1, x2)
eq_out_gg(x1, x2)  =  eq_out_gg
even  =  even
U3_g(x1, x2)  =  U3_g(x2)
palindrome_out_g(x1)  =  palindrome_out_g
U4_g(x1, x2, x3, x4)  =  U4_g(x2, x3, x4)
odd  =  odd
U5_g(x1, x2)  =  U5_g(x2)
last_in_gag(x1, x2, x3)  =  last_in_gag(x1, x3)
last_out_gag(x1, x2, x3)  =  last_out_gag(x2)
U8_gag(x1, x2, x3, x4, x5)  =  U8_gag(x5)
HALVES_IN_GAAA(x1, x2, x3, x4)  =  HALVES_IN_GAAA(x1)
U6_GAAA(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_GAAA(x1, x8)

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

(22) UsableRulesProof (EQUIVALENT transformation)

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

(23) Obligation:

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

U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → HALVES_IN_GAAA(Rests, Ts, Rs, EvenOdd)
HALVES_IN_GAAA(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))

The TRS R consists of the following rules:

last_in_gaa(.(T, []), T, []) → last_out_gaa(.(T, []), T, [])
last_in_gaa(.(H, T), X, .(H, M)) → U8_gaa(H, T, X, M, last_in_gaa(T, X, M))
U8_gaa(H, T, X, M, last_out_gaa(T, X, M)) → last_out_gaa(.(H, T), X, .(H, M))

The argument filtering Pi contains the following mapping:
[]  =  []
.(x1, x2)  =  .(x1, x2)
last_in_gaa(x1, x2, x3)  =  last_in_gaa(x1)
last_out_gaa(x1, x2, x3)  =  last_out_gaa(x2, x3)
U8_gaa(x1, x2, x3, x4, x5)  =  U8_gaa(x1, x5)
HALVES_IN_GAAA(x1, x2, x3, x4)  =  HALVES_IN_GAAA(x1)
U6_GAAA(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_GAAA(x1, x8)

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

(24) PiDPToQDPProof (SOUND transformation)

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

(25) Obligation:

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

U6_GAAA(T, last_out_gaa(R, Rests)) → HALVES_IN_GAAA(Rests)
HALVES_IN_GAAA(.(T, .(Y, Xs))) → U6_GAAA(T, last_in_gaa(.(Y, Xs)))

The TRS R consists of the following rules:

last_in_gaa(.(T, [])) → last_out_gaa(T, [])
last_in_gaa(.(H, T)) → U8_gaa(H, last_in_gaa(T))
U8_gaa(H, last_out_gaa(X, M)) → last_out_gaa(X, .(H, M))

The set Q consists of the following terms:

last_in_gaa(x0)
U8_gaa(x0, x1)

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

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

U6_GAAA(T, last_out_gaa(R, Rests)) → HALVES_IN_GAAA(Rests)
HALVES_IN_GAAA(.(T, .(Y, Xs))) → U6_GAAA(T, last_in_gaa(.(Y, Xs)))

Strictly oriented rules of the TRS R:

last_in_gaa(.(T, [])) → last_out_gaa(T, [])
U8_gaa(H, last_out_gaa(X, M)) → last_out_gaa(X, .(H, M))

Used ordering: Polynomial interpretation [POLO]:

POL(.(x1, x2)) = 1 + x1 + 2·x2   
POL(HALVES_IN_GAAA(x1)) = x1   
POL(U6_GAAA(x1, x2)) = x1 + x2   
POL(U8_gaa(x1, x2)) = 2 + 2·x1 + 2·x2   
POL([]) = 2   
POL(last_in_gaa(x1)) = 2·x1   
POL(last_out_gaa(x1, x2)) = 1 + 2·x1 + x2   

(27) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

last_in_gaa(.(H, T)) → U8_gaa(H, last_in_gaa(T))

The set Q consists of the following terms:

last_in_gaa(x0)
U8_gaa(x0, x1)

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

(28) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(29) TRUE

(30) PrologToPiTRSProof (SOUND transformation)

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

palindrome_in_g(L) → U1_g(L, halves_in_gaaa(L, X1s, X2s, EvenOdd))
halves_in_gaaa([], [], [], even) → halves_out_gaaa([], [], [], even)
halves_in_gaaa(.(X, []), .(X, []), [], odd) → halves_out_gaaa(.(X, []), .(X, []), [], odd)
halves_in_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))
last_in_gaa(.(T, []), T, []) → last_out_gaa(.(T, []), T, [])
last_in_gaa(.(H, T), X, .(H, M)) → U8_gaa(H, T, X, M, last_in_gaa(T, X, M))
U8_gaa(H, T, X, M, last_out_gaa(T, X, M)) → last_out_gaa(.(H, T), X, .(H, M))
U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_in_gaaa(Rests, Ts, Rs, EvenOdd))
U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_out_gaaa(Rests, Ts, Rs, EvenOdd)) → halves_out_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U2_g(L, X1s, X2s, eq_in_gg(EvenOdd, even))
eq_in_gg(X, X) → eq_out_gg(X, X)
U2_g(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → U3_g(L, eq_in_gg(X1s, X2s))
U3_g(L, eq_out_gg(X1s, X2s)) → palindrome_out_g(L)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U4_g(L, X1s, X2s, eq_in_gg(EvenOdd, odd))
U4_g(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → U5_g(L, last_in_gag(X1s, X1, X2s))
last_in_gag(.(T, []), T, []) → last_out_gag(.(T, []), T, [])
last_in_gag(.(H, T), X, .(H, M)) → U8_gag(H, T, X, M, last_in_gag(T, X, M))
U8_gag(H, T, X, M, last_out_gag(T, X, M)) → last_out_gag(.(H, T), X, .(H, M))
U5_g(L, last_out_gag(X1s, X1, X2s)) → palindrome_out_g(L)

The argument filtering Pi contains the following mapping:
palindrome_in_g(x1)  =  palindrome_in_g(x1)
U1_g(x1, x2)  =  U1_g(x1, x2)
halves_in_gaaa(x1, x2, x3, x4)  =  halves_in_gaaa(x1)
[]  =  []
halves_out_gaaa(x1, x2, x3, x4)  =  halves_out_gaaa(x1, x2, x3, x4)
.(x1, x2)  =  .(x1, x2)
U6_gaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_gaaa(x1, x2, x3, x8)
last_in_gaa(x1, x2, x3)  =  last_in_gaa(x1)
last_out_gaa(x1, x2, x3)  =  last_out_gaa(x1, x2, x3)
U8_gaa(x1, x2, x3, x4, x5)  =  U8_gaa(x1, x2, x5)
U7_gaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gaaa(x1, x2, x3, x5, x8)
U2_g(x1, x2, x3, x4)  =  U2_g(x1, x2, x3, x4)
eq_in_gg(x1, x2)  =  eq_in_gg(x1, x2)
eq_out_gg(x1, x2)  =  eq_out_gg(x1, x2)
even  =  even
U3_g(x1, x2)  =  U3_g(x1, x2)
palindrome_out_g(x1)  =  palindrome_out_g(x1)
U4_g(x1, x2, x3, x4)  =  U4_g(x1, x2, x3, x4)
odd  =  odd
U5_g(x1, x2)  =  U5_g(x1, x2)
last_in_gag(x1, x2, x3)  =  last_in_gag(x1, x3)
last_out_gag(x1, x2, x3)  =  last_out_gag(x1, x2, x3)
U8_gag(x1, x2, x3, x4, x5)  =  U8_gag(x1, x2, x4, x5)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(31) Obligation:

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

palindrome_in_g(L) → U1_g(L, halves_in_gaaa(L, X1s, X2s, EvenOdd))
halves_in_gaaa([], [], [], even) → halves_out_gaaa([], [], [], even)
halves_in_gaaa(.(X, []), .(X, []), [], odd) → halves_out_gaaa(.(X, []), .(X, []), [], odd)
halves_in_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))
last_in_gaa(.(T, []), T, []) → last_out_gaa(.(T, []), T, [])
last_in_gaa(.(H, T), X, .(H, M)) → U8_gaa(H, T, X, M, last_in_gaa(T, X, M))
U8_gaa(H, T, X, M, last_out_gaa(T, X, M)) → last_out_gaa(.(H, T), X, .(H, M))
U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_in_gaaa(Rests, Ts, Rs, EvenOdd))
U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_out_gaaa(Rests, Ts, Rs, EvenOdd)) → halves_out_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U2_g(L, X1s, X2s, eq_in_gg(EvenOdd, even))
eq_in_gg(X, X) → eq_out_gg(X, X)
U2_g(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → U3_g(L, eq_in_gg(X1s, X2s))
U3_g(L, eq_out_gg(X1s, X2s)) → palindrome_out_g(L)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U4_g(L, X1s, X2s, eq_in_gg(EvenOdd, odd))
U4_g(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → U5_g(L, last_in_gag(X1s, X1, X2s))
last_in_gag(.(T, []), T, []) → last_out_gag(.(T, []), T, [])
last_in_gag(.(H, T), X, .(H, M)) → U8_gag(H, T, X, M, last_in_gag(T, X, M))
U8_gag(H, T, X, M, last_out_gag(T, X, M)) → last_out_gag(.(H, T), X, .(H, M))
U5_g(L, last_out_gag(X1s, X1, X2s)) → palindrome_out_g(L)

The argument filtering Pi contains the following mapping:
palindrome_in_g(x1)  =  palindrome_in_g(x1)
U1_g(x1, x2)  =  U1_g(x1, x2)
halves_in_gaaa(x1, x2, x3, x4)  =  halves_in_gaaa(x1)
[]  =  []
halves_out_gaaa(x1, x2, x3, x4)  =  halves_out_gaaa(x1, x2, x3, x4)
.(x1, x2)  =  .(x1, x2)
U6_gaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_gaaa(x1, x2, x3, x8)
last_in_gaa(x1, x2, x3)  =  last_in_gaa(x1)
last_out_gaa(x1, x2, x3)  =  last_out_gaa(x1, x2, x3)
U8_gaa(x1, x2, x3, x4, x5)  =  U8_gaa(x1, x2, x5)
U7_gaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gaaa(x1, x2, x3, x5, x8)
U2_g(x1, x2, x3, x4)  =  U2_g(x1, x2, x3, x4)
eq_in_gg(x1, x2)  =  eq_in_gg(x1, x2)
eq_out_gg(x1, x2)  =  eq_out_gg(x1, x2)
even  =  even
U3_g(x1, x2)  =  U3_g(x1, x2)
palindrome_out_g(x1)  =  palindrome_out_g(x1)
U4_g(x1, x2, x3, x4)  =  U4_g(x1, x2, x3, x4)
odd  =  odd
U5_g(x1, x2)  =  U5_g(x1, x2)
last_in_gag(x1, x2, x3)  =  last_in_gag(x1, x3)
last_out_gag(x1, x2, x3)  =  last_out_gag(x1, x2, x3)
U8_gag(x1, x2, x3, x4, x5)  =  U8_gag(x1, x2, x4, x5)

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

PALINDROME_IN_G(L) → U1_G(L, halves_in_gaaa(L, X1s, X2s, EvenOdd))
PALINDROME_IN_G(L) → HALVES_IN_GAAA(L, X1s, X2s, EvenOdd)
HALVES_IN_GAAA(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))
HALVES_IN_GAAA(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → LAST_IN_GAA(.(Y, Xs), R, Rests)
LAST_IN_GAA(.(H, T), X, .(H, M)) → U8_GAA(H, T, X, M, last_in_gaa(T, X, M))
LAST_IN_GAA(.(H, T), X, .(H, M)) → LAST_IN_GAA(T, X, M)
U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → U7_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_in_gaaa(Rests, Ts, Rs, EvenOdd))
U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → HALVES_IN_GAAA(Rests, Ts, Rs, EvenOdd)
U1_G(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U2_G(L, X1s, X2s, eq_in_gg(EvenOdd, even))
U1_G(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → EQ_IN_GG(EvenOdd, even)
U2_G(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → U3_G(L, eq_in_gg(X1s, X2s))
U2_G(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → EQ_IN_GG(X1s, X2s)
U1_G(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U4_G(L, X1s, X2s, eq_in_gg(EvenOdd, odd))
U1_G(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → EQ_IN_GG(EvenOdd, odd)
U4_G(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → U5_G(L, last_in_gag(X1s, X1, X2s))
U4_G(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → LAST_IN_GAG(X1s, X1, X2s)
LAST_IN_GAG(.(H, T), X, .(H, M)) → U8_GAG(H, T, X, M, last_in_gag(T, X, M))
LAST_IN_GAG(.(H, T), X, .(H, M)) → LAST_IN_GAG(T, X, M)

The TRS R consists of the following rules:

palindrome_in_g(L) → U1_g(L, halves_in_gaaa(L, X1s, X2s, EvenOdd))
halves_in_gaaa([], [], [], even) → halves_out_gaaa([], [], [], even)
halves_in_gaaa(.(X, []), .(X, []), [], odd) → halves_out_gaaa(.(X, []), .(X, []), [], odd)
halves_in_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))
last_in_gaa(.(T, []), T, []) → last_out_gaa(.(T, []), T, [])
last_in_gaa(.(H, T), X, .(H, M)) → U8_gaa(H, T, X, M, last_in_gaa(T, X, M))
U8_gaa(H, T, X, M, last_out_gaa(T, X, M)) → last_out_gaa(.(H, T), X, .(H, M))
U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_in_gaaa(Rests, Ts, Rs, EvenOdd))
U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_out_gaaa(Rests, Ts, Rs, EvenOdd)) → halves_out_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U2_g(L, X1s, X2s, eq_in_gg(EvenOdd, even))
eq_in_gg(X, X) → eq_out_gg(X, X)
U2_g(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → U3_g(L, eq_in_gg(X1s, X2s))
U3_g(L, eq_out_gg(X1s, X2s)) → palindrome_out_g(L)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U4_g(L, X1s, X2s, eq_in_gg(EvenOdd, odd))
U4_g(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → U5_g(L, last_in_gag(X1s, X1, X2s))
last_in_gag(.(T, []), T, []) → last_out_gag(.(T, []), T, [])
last_in_gag(.(H, T), X, .(H, M)) → U8_gag(H, T, X, M, last_in_gag(T, X, M))
U8_gag(H, T, X, M, last_out_gag(T, X, M)) → last_out_gag(.(H, T), X, .(H, M))
U5_g(L, last_out_gag(X1s, X1, X2s)) → palindrome_out_g(L)

The argument filtering Pi contains the following mapping:
palindrome_in_g(x1)  =  palindrome_in_g(x1)
U1_g(x1, x2)  =  U1_g(x1, x2)
halves_in_gaaa(x1, x2, x3, x4)  =  halves_in_gaaa(x1)
[]  =  []
halves_out_gaaa(x1, x2, x3, x4)  =  halves_out_gaaa(x1, x2, x3, x4)
.(x1, x2)  =  .(x1, x2)
U6_gaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_gaaa(x1, x2, x3, x8)
last_in_gaa(x1, x2, x3)  =  last_in_gaa(x1)
last_out_gaa(x1, x2, x3)  =  last_out_gaa(x1, x2, x3)
U8_gaa(x1, x2, x3, x4, x5)  =  U8_gaa(x1, x2, x5)
U7_gaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gaaa(x1, x2, x3, x5, x8)
U2_g(x1, x2, x3, x4)  =  U2_g(x1, x2, x3, x4)
eq_in_gg(x1, x2)  =  eq_in_gg(x1, x2)
eq_out_gg(x1, x2)  =  eq_out_gg(x1, x2)
even  =  even
U3_g(x1, x2)  =  U3_g(x1, x2)
palindrome_out_g(x1)  =  palindrome_out_g(x1)
U4_g(x1, x2, x3, x4)  =  U4_g(x1, x2, x3, x4)
odd  =  odd
U5_g(x1, x2)  =  U5_g(x1, x2)
last_in_gag(x1, x2, x3)  =  last_in_gag(x1, x3)
last_out_gag(x1, x2, x3)  =  last_out_gag(x1, x2, x3)
U8_gag(x1, x2, x3, x4, x5)  =  U8_gag(x1, x2, x4, x5)
PALINDROME_IN_G(x1)  =  PALINDROME_IN_G(x1)
U1_G(x1, x2)  =  U1_G(x1, x2)
HALVES_IN_GAAA(x1, x2, x3, x4)  =  HALVES_IN_GAAA(x1)
U6_GAAA(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_GAAA(x1, x2, x3, x8)
LAST_IN_GAA(x1, x2, x3)  =  LAST_IN_GAA(x1)
U8_GAA(x1, x2, x3, x4, x5)  =  U8_GAA(x1, x2, x5)
U7_GAAA(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_GAAA(x1, x2, x3, x5, x8)
U2_G(x1, x2, x3, x4)  =  U2_G(x1, x2, x3, x4)
EQ_IN_GG(x1, x2)  =  EQ_IN_GG(x1, x2)
U3_G(x1, x2)  =  U3_G(x1, x2)
U4_G(x1, x2, x3, x4)  =  U4_G(x1, x2, x3, x4)
U5_G(x1, x2)  =  U5_G(x1, x2)
LAST_IN_GAG(x1, x2, x3)  =  LAST_IN_GAG(x1, x3)
U8_GAG(x1, x2, x3, x4, x5)  =  U8_GAG(x1, x2, x4, x5)

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

(33) Obligation:

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

PALINDROME_IN_G(L) → U1_G(L, halves_in_gaaa(L, X1s, X2s, EvenOdd))
PALINDROME_IN_G(L) → HALVES_IN_GAAA(L, X1s, X2s, EvenOdd)
HALVES_IN_GAAA(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))
HALVES_IN_GAAA(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → LAST_IN_GAA(.(Y, Xs), R, Rests)
LAST_IN_GAA(.(H, T), X, .(H, M)) → U8_GAA(H, T, X, M, last_in_gaa(T, X, M))
LAST_IN_GAA(.(H, T), X, .(H, M)) → LAST_IN_GAA(T, X, M)
U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → U7_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_in_gaaa(Rests, Ts, Rs, EvenOdd))
U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → HALVES_IN_GAAA(Rests, Ts, Rs, EvenOdd)
U1_G(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U2_G(L, X1s, X2s, eq_in_gg(EvenOdd, even))
U1_G(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → EQ_IN_GG(EvenOdd, even)
U2_G(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → U3_G(L, eq_in_gg(X1s, X2s))
U2_G(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → EQ_IN_GG(X1s, X2s)
U1_G(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U4_G(L, X1s, X2s, eq_in_gg(EvenOdd, odd))
U1_G(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → EQ_IN_GG(EvenOdd, odd)
U4_G(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → U5_G(L, last_in_gag(X1s, X1, X2s))
U4_G(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → LAST_IN_GAG(X1s, X1, X2s)
LAST_IN_GAG(.(H, T), X, .(H, M)) → U8_GAG(H, T, X, M, last_in_gag(T, X, M))
LAST_IN_GAG(.(H, T), X, .(H, M)) → LAST_IN_GAG(T, X, M)

The TRS R consists of the following rules:

palindrome_in_g(L) → U1_g(L, halves_in_gaaa(L, X1s, X2s, EvenOdd))
halves_in_gaaa([], [], [], even) → halves_out_gaaa([], [], [], even)
halves_in_gaaa(.(X, []), .(X, []), [], odd) → halves_out_gaaa(.(X, []), .(X, []), [], odd)
halves_in_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))
last_in_gaa(.(T, []), T, []) → last_out_gaa(.(T, []), T, [])
last_in_gaa(.(H, T), X, .(H, M)) → U8_gaa(H, T, X, M, last_in_gaa(T, X, M))
U8_gaa(H, T, X, M, last_out_gaa(T, X, M)) → last_out_gaa(.(H, T), X, .(H, M))
U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_in_gaaa(Rests, Ts, Rs, EvenOdd))
U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_out_gaaa(Rests, Ts, Rs, EvenOdd)) → halves_out_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U2_g(L, X1s, X2s, eq_in_gg(EvenOdd, even))
eq_in_gg(X, X) → eq_out_gg(X, X)
U2_g(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → U3_g(L, eq_in_gg(X1s, X2s))
U3_g(L, eq_out_gg(X1s, X2s)) → palindrome_out_g(L)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U4_g(L, X1s, X2s, eq_in_gg(EvenOdd, odd))
U4_g(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → U5_g(L, last_in_gag(X1s, X1, X2s))
last_in_gag(.(T, []), T, []) → last_out_gag(.(T, []), T, [])
last_in_gag(.(H, T), X, .(H, M)) → U8_gag(H, T, X, M, last_in_gag(T, X, M))
U8_gag(H, T, X, M, last_out_gag(T, X, M)) → last_out_gag(.(H, T), X, .(H, M))
U5_g(L, last_out_gag(X1s, X1, X2s)) → palindrome_out_g(L)

The argument filtering Pi contains the following mapping:
palindrome_in_g(x1)  =  palindrome_in_g(x1)
U1_g(x1, x2)  =  U1_g(x1, x2)
halves_in_gaaa(x1, x2, x3, x4)  =  halves_in_gaaa(x1)
[]  =  []
halves_out_gaaa(x1, x2, x3, x4)  =  halves_out_gaaa(x1, x2, x3, x4)
.(x1, x2)  =  .(x1, x2)
U6_gaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_gaaa(x1, x2, x3, x8)
last_in_gaa(x1, x2, x3)  =  last_in_gaa(x1)
last_out_gaa(x1, x2, x3)  =  last_out_gaa(x1, x2, x3)
U8_gaa(x1, x2, x3, x4, x5)  =  U8_gaa(x1, x2, x5)
U7_gaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gaaa(x1, x2, x3, x5, x8)
U2_g(x1, x2, x3, x4)  =  U2_g(x1, x2, x3, x4)
eq_in_gg(x1, x2)  =  eq_in_gg(x1, x2)
eq_out_gg(x1, x2)  =  eq_out_gg(x1, x2)
even  =  even
U3_g(x1, x2)  =  U3_g(x1, x2)
palindrome_out_g(x1)  =  palindrome_out_g(x1)
U4_g(x1, x2, x3, x4)  =  U4_g(x1, x2, x3, x4)
odd  =  odd
U5_g(x1, x2)  =  U5_g(x1, x2)
last_in_gag(x1, x2, x3)  =  last_in_gag(x1, x3)
last_out_gag(x1, x2, x3)  =  last_out_gag(x1, x2, x3)
U8_gag(x1, x2, x3, x4, x5)  =  U8_gag(x1, x2, x4, x5)
PALINDROME_IN_G(x1)  =  PALINDROME_IN_G(x1)
U1_G(x1, x2)  =  U1_G(x1, x2)
HALVES_IN_GAAA(x1, x2, x3, x4)  =  HALVES_IN_GAAA(x1)
U6_GAAA(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_GAAA(x1, x2, x3, x8)
LAST_IN_GAA(x1, x2, x3)  =  LAST_IN_GAA(x1)
U8_GAA(x1, x2, x3, x4, x5)  =  U8_GAA(x1, x2, x5)
U7_GAAA(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_GAAA(x1, x2, x3, x5, x8)
U2_G(x1, x2, x3, x4)  =  U2_G(x1, x2, x3, x4)
EQ_IN_GG(x1, x2)  =  EQ_IN_GG(x1, x2)
U3_G(x1, x2)  =  U3_G(x1, x2)
U4_G(x1, x2, x3, x4)  =  U4_G(x1, x2, x3, x4)
U5_G(x1, x2)  =  U5_G(x1, x2)
LAST_IN_GAG(x1, x2, x3)  =  LAST_IN_GAG(x1, x3)
U8_GAG(x1, x2, x3, x4, x5)  =  U8_GAG(x1, x2, x4, x5)

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

(34) DependencyGraphProof (EQUIVALENT transformation)

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

(35) Complex Obligation (AND)

(36) Obligation:

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

LAST_IN_GAG(.(H, T), X, .(H, M)) → LAST_IN_GAG(T, X, M)

The TRS R consists of the following rules:

palindrome_in_g(L) → U1_g(L, halves_in_gaaa(L, X1s, X2s, EvenOdd))
halves_in_gaaa([], [], [], even) → halves_out_gaaa([], [], [], even)
halves_in_gaaa(.(X, []), .(X, []), [], odd) → halves_out_gaaa(.(X, []), .(X, []), [], odd)
halves_in_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))
last_in_gaa(.(T, []), T, []) → last_out_gaa(.(T, []), T, [])
last_in_gaa(.(H, T), X, .(H, M)) → U8_gaa(H, T, X, M, last_in_gaa(T, X, M))
U8_gaa(H, T, X, M, last_out_gaa(T, X, M)) → last_out_gaa(.(H, T), X, .(H, M))
U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_in_gaaa(Rests, Ts, Rs, EvenOdd))
U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_out_gaaa(Rests, Ts, Rs, EvenOdd)) → halves_out_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U2_g(L, X1s, X2s, eq_in_gg(EvenOdd, even))
eq_in_gg(X, X) → eq_out_gg(X, X)
U2_g(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → U3_g(L, eq_in_gg(X1s, X2s))
U3_g(L, eq_out_gg(X1s, X2s)) → palindrome_out_g(L)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U4_g(L, X1s, X2s, eq_in_gg(EvenOdd, odd))
U4_g(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → U5_g(L, last_in_gag(X1s, X1, X2s))
last_in_gag(.(T, []), T, []) → last_out_gag(.(T, []), T, [])
last_in_gag(.(H, T), X, .(H, M)) → U8_gag(H, T, X, M, last_in_gag(T, X, M))
U8_gag(H, T, X, M, last_out_gag(T, X, M)) → last_out_gag(.(H, T), X, .(H, M))
U5_g(L, last_out_gag(X1s, X1, X2s)) → palindrome_out_g(L)

The argument filtering Pi contains the following mapping:
palindrome_in_g(x1)  =  palindrome_in_g(x1)
U1_g(x1, x2)  =  U1_g(x1, x2)
halves_in_gaaa(x1, x2, x3, x4)  =  halves_in_gaaa(x1)
[]  =  []
halves_out_gaaa(x1, x2, x3, x4)  =  halves_out_gaaa(x1, x2, x3, x4)
.(x1, x2)  =  .(x1, x2)
U6_gaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_gaaa(x1, x2, x3, x8)
last_in_gaa(x1, x2, x3)  =  last_in_gaa(x1)
last_out_gaa(x1, x2, x3)  =  last_out_gaa(x1, x2, x3)
U8_gaa(x1, x2, x3, x4, x5)  =  U8_gaa(x1, x2, x5)
U7_gaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gaaa(x1, x2, x3, x5, x8)
U2_g(x1, x2, x3, x4)  =  U2_g(x1, x2, x3, x4)
eq_in_gg(x1, x2)  =  eq_in_gg(x1, x2)
eq_out_gg(x1, x2)  =  eq_out_gg(x1, x2)
even  =  even
U3_g(x1, x2)  =  U3_g(x1, x2)
palindrome_out_g(x1)  =  palindrome_out_g(x1)
U4_g(x1, x2, x3, x4)  =  U4_g(x1, x2, x3, x4)
odd  =  odd
U5_g(x1, x2)  =  U5_g(x1, x2)
last_in_gag(x1, x2, x3)  =  last_in_gag(x1, x3)
last_out_gag(x1, x2, x3)  =  last_out_gag(x1, x2, x3)
U8_gag(x1, x2, x3, x4, x5)  =  U8_gag(x1, x2, x4, x5)
LAST_IN_GAG(x1, x2, x3)  =  LAST_IN_GAG(x1, x3)

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:

LAST_IN_GAG(.(H, T), X, .(H, M)) → LAST_IN_GAG(T, X, M)

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

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:

LAST_IN_GAG(.(H, T), .(H, M)) → LAST_IN_GAG(T, M)

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

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

  • LAST_IN_GAG(.(H, T), .(H, M)) → LAST_IN_GAG(T, M)
    The graph contains the following edges 1 > 1, 2 > 2

(42) TRUE

(43) Obligation:

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

LAST_IN_GAA(.(H, T), X, .(H, M)) → LAST_IN_GAA(T, X, M)

The TRS R consists of the following rules:

palindrome_in_g(L) → U1_g(L, halves_in_gaaa(L, X1s, X2s, EvenOdd))
halves_in_gaaa([], [], [], even) → halves_out_gaaa([], [], [], even)
halves_in_gaaa(.(X, []), .(X, []), [], odd) → halves_out_gaaa(.(X, []), .(X, []), [], odd)
halves_in_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))
last_in_gaa(.(T, []), T, []) → last_out_gaa(.(T, []), T, [])
last_in_gaa(.(H, T), X, .(H, M)) → U8_gaa(H, T, X, M, last_in_gaa(T, X, M))
U8_gaa(H, T, X, M, last_out_gaa(T, X, M)) → last_out_gaa(.(H, T), X, .(H, M))
U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_in_gaaa(Rests, Ts, Rs, EvenOdd))
U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_out_gaaa(Rests, Ts, Rs, EvenOdd)) → halves_out_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U2_g(L, X1s, X2s, eq_in_gg(EvenOdd, even))
eq_in_gg(X, X) → eq_out_gg(X, X)
U2_g(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → U3_g(L, eq_in_gg(X1s, X2s))
U3_g(L, eq_out_gg(X1s, X2s)) → palindrome_out_g(L)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U4_g(L, X1s, X2s, eq_in_gg(EvenOdd, odd))
U4_g(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → U5_g(L, last_in_gag(X1s, X1, X2s))
last_in_gag(.(T, []), T, []) → last_out_gag(.(T, []), T, [])
last_in_gag(.(H, T), X, .(H, M)) → U8_gag(H, T, X, M, last_in_gag(T, X, M))
U8_gag(H, T, X, M, last_out_gag(T, X, M)) → last_out_gag(.(H, T), X, .(H, M))
U5_g(L, last_out_gag(X1s, X1, X2s)) → palindrome_out_g(L)

The argument filtering Pi contains the following mapping:
palindrome_in_g(x1)  =  palindrome_in_g(x1)
U1_g(x1, x2)  =  U1_g(x1, x2)
halves_in_gaaa(x1, x2, x3, x4)  =  halves_in_gaaa(x1)
[]  =  []
halves_out_gaaa(x1, x2, x3, x4)  =  halves_out_gaaa(x1, x2, x3, x4)
.(x1, x2)  =  .(x1, x2)
U6_gaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_gaaa(x1, x2, x3, x8)
last_in_gaa(x1, x2, x3)  =  last_in_gaa(x1)
last_out_gaa(x1, x2, x3)  =  last_out_gaa(x1, x2, x3)
U8_gaa(x1, x2, x3, x4, x5)  =  U8_gaa(x1, x2, x5)
U7_gaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gaaa(x1, x2, x3, x5, x8)
U2_g(x1, x2, x3, x4)  =  U2_g(x1, x2, x3, x4)
eq_in_gg(x1, x2)  =  eq_in_gg(x1, x2)
eq_out_gg(x1, x2)  =  eq_out_gg(x1, x2)
even  =  even
U3_g(x1, x2)  =  U3_g(x1, x2)
palindrome_out_g(x1)  =  palindrome_out_g(x1)
U4_g(x1, x2, x3, x4)  =  U4_g(x1, x2, x3, x4)
odd  =  odd
U5_g(x1, x2)  =  U5_g(x1, x2)
last_in_gag(x1, x2, x3)  =  last_in_gag(x1, x3)
last_out_gag(x1, x2, x3)  =  last_out_gag(x1, x2, x3)
U8_gag(x1, x2, x3, x4, x5)  =  U8_gag(x1, x2, x4, x5)
LAST_IN_GAA(x1, x2, x3)  =  LAST_IN_GAA(x1)

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

(44) UsableRulesProof (EQUIVALENT transformation)

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

(45) Obligation:

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

LAST_IN_GAA(.(H, T), X, .(H, M)) → LAST_IN_GAA(T, X, M)

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

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

(46) PiDPToQDPProof (SOUND transformation)

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

(47) Obligation:

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

LAST_IN_GAA(.(H, T)) → LAST_IN_GAA(T)

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

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

  • LAST_IN_GAA(.(H, T)) → LAST_IN_GAA(T)
    The graph contains the following edges 1 > 1

(49) TRUE

(50) Obligation:

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

U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → HALVES_IN_GAAA(Rests, Ts, Rs, EvenOdd)
HALVES_IN_GAAA(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))

The TRS R consists of the following rules:

palindrome_in_g(L) → U1_g(L, halves_in_gaaa(L, X1s, X2s, EvenOdd))
halves_in_gaaa([], [], [], even) → halves_out_gaaa([], [], [], even)
halves_in_gaaa(.(X, []), .(X, []), [], odd) → halves_out_gaaa(.(X, []), .(X, []), [], odd)
halves_in_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))
last_in_gaa(.(T, []), T, []) → last_out_gaa(.(T, []), T, [])
last_in_gaa(.(H, T), X, .(H, M)) → U8_gaa(H, T, X, M, last_in_gaa(T, X, M))
U8_gaa(H, T, X, M, last_out_gaa(T, X, M)) → last_out_gaa(.(H, T), X, .(H, M))
U6_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_in_gaaa(Rests, Ts, Rs, EvenOdd))
U7_gaaa(T, Y, Xs, Ts, R, Rs, EvenOdd, halves_out_gaaa(Rests, Ts, Rs, EvenOdd)) → halves_out_gaaa(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U2_g(L, X1s, X2s, eq_in_gg(EvenOdd, even))
eq_in_gg(X, X) → eq_out_gg(X, X)
U2_g(L, X1s, X2s, eq_out_gg(EvenOdd, even)) → U3_g(L, eq_in_gg(X1s, X2s))
U3_g(L, eq_out_gg(X1s, X2s)) → palindrome_out_g(L)
U1_g(L, halves_out_gaaa(L, X1s, X2s, EvenOdd)) → U4_g(L, X1s, X2s, eq_in_gg(EvenOdd, odd))
U4_g(L, X1s, X2s, eq_out_gg(EvenOdd, odd)) → U5_g(L, last_in_gag(X1s, X1, X2s))
last_in_gag(.(T, []), T, []) → last_out_gag(.(T, []), T, [])
last_in_gag(.(H, T), X, .(H, M)) → U8_gag(H, T, X, M, last_in_gag(T, X, M))
U8_gag(H, T, X, M, last_out_gag(T, X, M)) → last_out_gag(.(H, T), X, .(H, M))
U5_g(L, last_out_gag(X1s, X1, X2s)) → palindrome_out_g(L)

The argument filtering Pi contains the following mapping:
palindrome_in_g(x1)  =  palindrome_in_g(x1)
U1_g(x1, x2)  =  U1_g(x1, x2)
halves_in_gaaa(x1, x2, x3, x4)  =  halves_in_gaaa(x1)
[]  =  []
halves_out_gaaa(x1, x2, x3, x4)  =  halves_out_gaaa(x1, x2, x3, x4)
.(x1, x2)  =  .(x1, x2)
U6_gaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_gaaa(x1, x2, x3, x8)
last_in_gaa(x1, x2, x3)  =  last_in_gaa(x1)
last_out_gaa(x1, x2, x3)  =  last_out_gaa(x1, x2, x3)
U8_gaa(x1, x2, x3, x4, x5)  =  U8_gaa(x1, x2, x5)
U7_gaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gaaa(x1, x2, x3, x5, x8)
U2_g(x1, x2, x3, x4)  =  U2_g(x1, x2, x3, x4)
eq_in_gg(x1, x2)  =  eq_in_gg(x1, x2)
eq_out_gg(x1, x2)  =  eq_out_gg(x1, x2)
even  =  even
U3_g(x1, x2)  =  U3_g(x1, x2)
palindrome_out_g(x1)  =  palindrome_out_g(x1)
U4_g(x1, x2, x3, x4)  =  U4_g(x1, x2, x3, x4)
odd  =  odd
U5_g(x1, x2)  =  U5_g(x1, x2)
last_in_gag(x1, x2, x3)  =  last_in_gag(x1, x3)
last_out_gag(x1, x2, x3)  =  last_out_gag(x1, x2, x3)
U8_gag(x1, x2, x3, x4, x5)  =  U8_gag(x1, x2, x4, x5)
HALVES_IN_GAAA(x1, x2, x3, x4)  =  HALVES_IN_GAAA(x1)
U6_GAAA(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_GAAA(x1, x2, x3, x8)

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

(51) UsableRulesProof (EQUIVALENT transformation)

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

(52) Obligation:

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

U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_out_gaa(.(Y, Xs), R, Rests)) → HALVES_IN_GAAA(Rests, Ts, Rs, EvenOdd)
HALVES_IN_GAAA(.(T, .(Y, Xs)), .(T, Ts), .(R, Rs), EvenOdd) → U6_GAAA(T, Y, Xs, Ts, R, Rs, EvenOdd, last_in_gaa(.(Y, Xs), R, Rests))

The TRS R consists of the following rules:

last_in_gaa(.(T, []), T, []) → last_out_gaa(.(T, []), T, [])
last_in_gaa(.(H, T), X, .(H, M)) → U8_gaa(H, T, X, M, last_in_gaa(T, X, M))
U8_gaa(H, T, X, M, last_out_gaa(T, X, M)) → last_out_gaa(.(H, T), X, .(H, M))

The argument filtering Pi contains the following mapping:
[]  =  []
.(x1, x2)  =  .(x1, x2)
last_in_gaa(x1, x2, x3)  =  last_in_gaa(x1)
last_out_gaa(x1, x2, x3)  =  last_out_gaa(x1, x2, x3)
U8_gaa(x1, x2, x3, x4, x5)  =  U8_gaa(x1, x2, x5)
HALVES_IN_GAAA(x1, x2, x3, x4)  =  HALVES_IN_GAAA(x1)
U6_GAAA(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_GAAA(x1, x2, x3, x8)

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

(53) PiDPToQDPProof (SOUND transformation)

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

(54) Obligation:

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

U6_GAAA(T, Y, Xs, last_out_gaa(.(Y, Xs), R, Rests)) → HALVES_IN_GAAA(Rests)
HALVES_IN_GAAA(.(T, .(Y, Xs))) → U6_GAAA(T, Y, Xs, last_in_gaa(.(Y, Xs)))

The TRS R consists of the following rules:

last_in_gaa(.(T, [])) → last_out_gaa(.(T, []), T, [])
last_in_gaa(.(H, T)) → U8_gaa(H, T, last_in_gaa(T))
U8_gaa(H, T, last_out_gaa(T, X, M)) → last_out_gaa(.(H, T), X, .(H, M))

The set Q consists of the following terms:

last_in_gaa(x0)
U8_gaa(x0, x1, x2)

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