(0) Obligation:

Clauses:

palindrome(Xs) :- reverse(Xs, Xs).
reverse(X1s, X2s) :- reverse(X1s, [], X2s).
reverse([], Xs, Xs).
reverse(.(X, X1s), X2s, Ys) :- reverse(X1s, .(X, X2s), Ys).

Query: palindrome(g)

(1) PrologToPiTRSViaGraphTransformerProof (SOUND transformation)

Transformed Prolog program to (Pi-)TRS.

(2) Obligation:

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

palindromeA_in_g([]) → palindromeA_out_g([])
palindromeA_in_g(.(T19, [])) → palindromeA_out_g(.(T19, []))
palindromeA_in_g(.(T42, .(T42, []))) → palindromeA_out_g(.(T42, .(T42, [])))
palindromeA_in_g(.(T75, .(T74, .(T75, [])))) → palindromeA_out_g(.(T75, .(T74, .(T75, []))))
palindromeA_in_g(.(T118, .(T117, .(T117, .(T118, []))))) → palindromeA_out_g(.(T118, .(T117, .(T117, .(T118, [])))))
palindromeA_in_g(.(T171, .(T170, .(T169, .(T170, .(T171, [])))))) → palindromeA_out_g(.(T171, .(T170, .(T169, .(T170, .(T171, []))))))
palindromeA_in_g(.(T234, .(T233, .(T232, .(T232, .(T233, .(T234, []))))))) → palindromeA_out_g(.(T234, .(T233, .(T232, .(T232, .(T233, .(T234, [])))))))
palindromeA_in_g(.(T307, .(T306, .(T305, .(T304, .(T305, .(T306, .(T307, [])))))))) → palindromeA_out_g(.(T307, .(T306, .(T305, .(T304, .(T305, .(T306, .(T307, []))))))))
palindromeA_in_g(.(T334, .(T333, .(T332, .(T331, .(T330, .(T329, .(T328, .(T326, T327))))))))) → U1_g(T334, T333, T332, T331, T330, T329, T328, T326, T327, reverseB_in_ggggg(T327, T326, .(T328, .(T329, .(T330, .(T331, .(T332, .(T333, .(T334, []))))))), T334, .(T333, .(T332, .(T331, .(T330, .(T329, .(T328, .(T326, T327)))))))))
reverseB_in_ggggg([], T365, T366, T365, T366) → reverseB_out_ggggg([], T365, T366, T365, T366)
reverseB_in_ggggg(.(T379, T380), T381, T382, T383, T384) → U2_ggggg(T379, T380, T381, T382, T383, T384, reverseB_in_ggggg(T380, T379, .(T381, T382), T383, T384))
U2_ggggg(T379, T380, T381, T382, T383, T384, reverseB_out_ggggg(T380, T379, .(T381, T382), T383, T384)) → reverseB_out_ggggg(.(T379, T380), T381, T382, T383, T384)
U1_g(T334, T333, T332, T331, T330, T329, T328, T326, T327, reverseB_out_ggggg(T327, T326, .(T328, .(T329, .(T330, .(T331, .(T332, .(T333, .(T334, []))))))), T334, .(T333, .(T332, .(T331, .(T330, .(T329, .(T328, .(T326, T327))))))))) → palindromeA_out_g(.(T334, .(T333, .(T332, .(T331, .(T330, .(T329, .(T328, .(T326, T327)))))))))

Pi is empty.

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

PALINDROMEA_IN_G(.(T334, .(T333, .(T332, .(T331, .(T330, .(T329, .(T328, .(T326, T327))))))))) → U1_G(T334, T333, T332, T331, T330, T329, T328, T326, T327, reverseB_in_ggggg(T327, T326, .(T328, .(T329, .(T330, .(T331, .(T332, .(T333, .(T334, []))))))), T334, .(T333, .(T332, .(T331, .(T330, .(T329, .(T328, .(T326, T327)))))))))
PALINDROMEA_IN_G(.(T334, .(T333, .(T332, .(T331, .(T330, .(T329, .(T328, .(T326, T327))))))))) → REVERSEB_IN_GGGGG(T327, T326, .(T328, .(T329, .(T330, .(T331, .(T332, .(T333, .(T334, []))))))), T334, .(T333, .(T332, .(T331, .(T330, .(T329, .(T328, .(T326, T327))))))))
REVERSEB_IN_GGGGG(.(T379, T380), T381, T382, T383, T384) → U2_GGGGG(T379, T380, T381, T382, T383, T384, reverseB_in_ggggg(T380, T379, .(T381, T382), T383, T384))
REVERSEB_IN_GGGGG(.(T379, T380), T381, T382, T383, T384) → REVERSEB_IN_GGGGG(T380, T379, .(T381, T382), T383, T384)

The TRS R consists of the following rules:

palindromeA_in_g([]) → palindromeA_out_g([])
palindromeA_in_g(.(T19, [])) → palindromeA_out_g(.(T19, []))
palindromeA_in_g(.(T42, .(T42, []))) → palindromeA_out_g(.(T42, .(T42, [])))
palindromeA_in_g(.(T75, .(T74, .(T75, [])))) → palindromeA_out_g(.(T75, .(T74, .(T75, []))))
palindromeA_in_g(.(T118, .(T117, .(T117, .(T118, []))))) → palindromeA_out_g(.(T118, .(T117, .(T117, .(T118, [])))))
palindromeA_in_g(.(T171, .(T170, .(T169, .(T170, .(T171, [])))))) → palindromeA_out_g(.(T171, .(T170, .(T169, .(T170, .(T171, []))))))
palindromeA_in_g(.(T234, .(T233, .(T232, .(T232, .(T233, .(T234, []))))))) → palindromeA_out_g(.(T234, .(T233, .(T232, .(T232, .(T233, .(T234, [])))))))
palindromeA_in_g(.(T307, .(T306, .(T305, .(T304, .(T305, .(T306, .(T307, [])))))))) → palindromeA_out_g(.(T307, .(T306, .(T305, .(T304, .(T305, .(T306, .(T307, []))))))))
palindromeA_in_g(.(T334, .(T333, .(T332, .(T331, .(T330, .(T329, .(T328, .(T326, T327))))))))) → U1_g(T334, T333, T332, T331, T330, T329, T328, T326, T327, reverseB_in_ggggg(T327, T326, .(T328, .(T329, .(T330, .(T331, .(T332, .(T333, .(T334, []))))))), T334, .(T333, .(T332, .(T331, .(T330, .(T329, .(T328, .(T326, T327)))))))))
reverseB_in_ggggg([], T365, T366, T365, T366) → reverseB_out_ggggg([], T365, T366, T365, T366)
reverseB_in_ggggg(.(T379, T380), T381, T382, T383, T384) → U2_ggggg(T379, T380, T381, T382, T383, T384, reverseB_in_ggggg(T380, T379, .(T381, T382), T383, T384))
U2_ggggg(T379, T380, T381, T382, T383, T384, reverseB_out_ggggg(T380, T379, .(T381, T382), T383, T384)) → reverseB_out_ggggg(.(T379, T380), T381, T382, T383, T384)
U1_g(T334, T333, T332, T331, T330, T329, T328, T326, T327, reverseB_out_ggggg(T327, T326, .(T328, .(T329, .(T330, .(T331, .(T332, .(T333, .(T334, []))))))), T334, .(T333, .(T332, .(T331, .(T330, .(T329, .(T328, .(T326, T327))))))))) → palindromeA_out_g(.(T334, .(T333, .(T332, .(T331, .(T330, .(T329, .(T328, .(T326, T327)))))))))

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

(4) Obligation:

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

PALINDROMEA_IN_G(.(T334, .(T333, .(T332, .(T331, .(T330, .(T329, .(T328, .(T326, T327))))))))) → U1_G(T334, T333, T332, T331, T330, T329, T328, T326, T327, reverseB_in_ggggg(T327, T326, .(T328, .(T329, .(T330, .(T331, .(T332, .(T333, .(T334, []))))))), T334, .(T333, .(T332, .(T331, .(T330, .(T329, .(T328, .(T326, T327)))))))))
PALINDROMEA_IN_G(.(T334, .(T333, .(T332, .(T331, .(T330, .(T329, .(T328, .(T326, T327))))))))) → REVERSEB_IN_GGGGG(T327, T326, .(T328, .(T329, .(T330, .(T331, .(T332, .(T333, .(T334, []))))))), T334, .(T333, .(T332, .(T331, .(T330, .(T329, .(T328, .(T326, T327))))))))
REVERSEB_IN_GGGGG(.(T379, T380), T381, T382, T383, T384) → U2_GGGGG(T379, T380, T381, T382, T383, T384, reverseB_in_ggggg(T380, T379, .(T381, T382), T383, T384))
REVERSEB_IN_GGGGG(.(T379, T380), T381, T382, T383, T384) → REVERSEB_IN_GGGGG(T380, T379, .(T381, T382), T383, T384)

The TRS R consists of the following rules:

palindromeA_in_g([]) → palindromeA_out_g([])
palindromeA_in_g(.(T19, [])) → palindromeA_out_g(.(T19, []))
palindromeA_in_g(.(T42, .(T42, []))) → palindromeA_out_g(.(T42, .(T42, [])))
palindromeA_in_g(.(T75, .(T74, .(T75, [])))) → palindromeA_out_g(.(T75, .(T74, .(T75, []))))
palindromeA_in_g(.(T118, .(T117, .(T117, .(T118, []))))) → palindromeA_out_g(.(T118, .(T117, .(T117, .(T118, [])))))
palindromeA_in_g(.(T171, .(T170, .(T169, .(T170, .(T171, [])))))) → palindromeA_out_g(.(T171, .(T170, .(T169, .(T170, .(T171, []))))))
palindromeA_in_g(.(T234, .(T233, .(T232, .(T232, .(T233, .(T234, []))))))) → palindromeA_out_g(.(T234, .(T233, .(T232, .(T232, .(T233, .(T234, [])))))))
palindromeA_in_g(.(T307, .(T306, .(T305, .(T304, .(T305, .(T306, .(T307, [])))))))) → palindromeA_out_g(.(T307, .(T306, .(T305, .(T304, .(T305, .(T306, .(T307, []))))))))
palindromeA_in_g(.(T334, .(T333, .(T332, .(T331, .(T330, .(T329, .(T328, .(T326, T327))))))))) → U1_g(T334, T333, T332, T331, T330, T329, T328, T326, T327, reverseB_in_ggggg(T327, T326, .(T328, .(T329, .(T330, .(T331, .(T332, .(T333, .(T334, []))))))), T334, .(T333, .(T332, .(T331, .(T330, .(T329, .(T328, .(T326, T327)))))))))
reverseB_in_ggggg([], T365, T366, T365, T366) → reverseB_out_ggggg([], T365, T366, T365, T366)
reverseB_in_ggggg(.(T379, T380), T381, T382, T383, T384) → U2_ggggg(T379, T380, T381, T382, T383, T384, reverseB_in_ggggg(T380, T379, .(T381, T382), T383, T384))
U2_ggggg(T379, T380, T381, T382, T383, T384, reverseB_out_ggggg(T380, T379, .(T381, T382), T383, T384)) → reverseB_out_ggggg(.(T379, T380), T381, T382, T383, T384)
U1_g(T334, T333, T332, T331, T330, T329, T328, T326, T327, reverseB_out_ggggg(T327, T326, .(T328, .(T329, .(T330, .(T331, .(T332, .(T333, .(T334, []))))))), T334, .(T333, .(T332, .(T331, .(T330, .(T329, .(T328, .(T326, T327))))))))) → palindromeA_out_g(.(T334, .(T333, .(T332, .(T331, .(T330, .(T329, .(T328, .(T326, T327)))))))))

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

(5) DependencyGraphProof (EQUIVALENT transformation)

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

(6) Obligation:

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

REVERSEB_IN_GGGGG(.(T379, T380), T381, T382, T383, T384) → REVERSEB_IN_GGGGG(T380, T379, .(T381, T382), T383, T384)

The TRS R consists of the following rules:

palindromeA_in_g([]) → palindromeA_out_g([])
palindromeA_in_g(.(T19, [])) → palindromeA_out_g(.(T19, []))
palindromeA_in_g(.(T42, .(T42, []))) → palindromeA_out_g(.(T42, .(T42, [])))
palindromeA_in_g(.(T75, .(T74, .(T75, [])))) → palindromeA_out_g(.(T75, .(T74, .(T75, []))))
palindromeA_in_g(.(T118, .(T117, .(T117, .(T118, []))))) → palindromeA_out_g(.(T118, .(T117, .(T117, .(T118, [])))))
palindromeA_in_g(.(T171, .(T170, .(T169, .(T170, .(T171, [])))))) → palindromeA_out_g(.(T171, .(T170, .(T169, .(T170, .(T171, []))))))
palindromeA_in_g(.(T234, .(T233, .(T232, .(T232, .(T233, .(T234, []))))))) → palindromeA_out_g(.(T234, .(T233, .(T232, .(T232, .(T233, .(T234, [])))))))
palindromeA_in_g(.(T307, .(T306, .(T305, .(T304, .(T305, .(T306, .(T307, [])))))))) → palindromeA_out_g(.(T307, .(T306, .(T305, .(T304, .(T305, .(T306, .(T307, []))))))))
palindromeA_in_g(.(T334, .(T333, .(T332, .(T331, .(T330, .(T329, .(T328, .(T326, T327))))))))) → U1_g(T334, T333, T332, T331, T330, T329, T328, T326, T327, reverseB_in_ggggg(T327, T326, .(T328, .(T329, .(T330, .(T331, .(T332, .(T333, .(T334, []))))))), T334, .(T333, .(T332, .(T331, .(T330, .(T329, .(T328, .(T326, T327)))))))))
reverseB_in_ggggg([], T365, T366, T365, T366) → reverseB_out_ggggg([], T365, T366, T365, T366)
reverseB_in_ggggg(.(T379, T380), T381, T382, T383, T384) → U2_ggggg(T379, T380, T381, T382, T383, T384, reverseB_in_ggggg(T380, T379, .(T381, T382), T383, T384))
U2_ggggg(T379, T380, T381, T382, T383, T384, reverseB_out_ggggg(T380, T379, .(T381, T382), T383, T384)) → reverseB_out_ggggg(.(T379, T380), T381, T382, T383, T384)
U1_g(T334, T333, T332, T331, T330, T329, T328, T326, T327, reverseB_out_ggggg(T327, T326, .(T328, .(T329, .(T330, .(T331, .(T332, .(T333, .(T334, []))))))), T334, .(T333, .(T332, .(T331, .(T330, .(T329, .(T328, .(T326, T327))))))))) → palindromeA_out_g(.(T334, .(T333, .(T332, .(T331, .(T330, .(T329, .(T328, .(T326, T327)))))))))

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

(7) UsableRulesProof (EQUIVALENT transformation)

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

(8) Obligation:

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

REVERSEB_IN_GGGGG(.(T379, T380), T381, T382, T383, T384) → REVERSEB_IN_GGGGG(T380, T379, .(T381, T382), T383, T384)

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

(9) PiDPToQDPProof (EQUIVALENT transformation)

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

(10) Obligation:

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

REVERSEB_IN_GGGGG(.(T379, T380), T381, T382, T383, T384) → REVERSEB_IN_GGGGG(T380, T379, .(T381, T382), T383, T384)

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

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

  • REVERSEB_IN_GGGGG(.(T379, T380), T381, T382, T383, T384) → REVERSEB_IN_GGGGG(T380, T379, .(T381, T382), T383, T384)
    The graph contains the following edges 1 > 1, 1 > 2, 4 >= 4, 5 >= 5

(12) YES