(0) Obligation:

Clauses:

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

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(.(T272, .(T271, .(T270, .(T269, .(T268, .(T267, .(T266, .(T264, T265))))))))) → U1_g(T272, T271, T270, T269, T268, T267, T266, T264, T265, reverse3B_in_ggggg(T265, T264, .(T266, .(T267, .(T268, .(T269, .(T270, .(T271, .(T272, []))))))), T272, .(T271, .(T270, .(T269, .(T268, .(T267, .(T266, .(T264, T265)))))))))
reverse3B_in_ggggg(.(T315, T316), T317, T318, T319, T320) → U2_ggggg(T315, T316, T317, T318, T319, T320, reverse3B_in_ggggg(T316, T315, .(T317, T318), T319, T320))
reverse3B_in_ggggg([], T332, T333, T332, T333) → reverse3B_out_ggggg([], T332, T333, T332, T333)
U2_ggggg(T315, T316, T317, T318, T319, T320, reverse3B_out_ggggg(T316, T315, .(T317, T318), T319, T320)) → reverse3B_out_ggggg(.(T315, T316), T317, T318, T319, T320)
U1_g(T272, T271, T270, T269, T268, T267, T266, T264, T265, reverse3B_out_ggggg(T265, T264, .(T266, .(T267, .(T268, .(T269, .(T270, .(T271, .(T272, []))))))), T272, .(T271, .(T270, .(T269, .(T268, .(T267, .(T266, .(T264, T265))))))))) → palindromeA_out_g(.(T272, .(T271, .(T270, .(T269, .(T268, .(T267, .(T266, .(T264, T265)))))))))
palindromeA_in_g(.(T354, .(T353, .(T352, .(T351, .(T352, .(T353, .(T354, [])))))))) → palindromeA_out_g(.(T354, .(T353, .(T352, .(T351, .(T352, .(T353, .(T354, []))))))))
palindromeA_in_g(.(T372, .(T371, .(T370, .(T370, .(T371, .(T372, []))))))) → palindromeA_out_g(.(T372, .(T371, .(T370, .(T370, .(T371, .(T372, [])))))))
palindromeA_in_g(.(T387, .(T386, .(T385, .(T386, .(T387, [])))))) → palindromeA_out_g(.(T387, .(T386, .(T385, .(T386, .(T387, []))))))
palindromeA_in_g(.(T399, .(T398, .(T398, .(T399, []))))) → palindromeA_out_g(.(T399, .(T398, .(T398, .(T399, [])))))
palindromeA_in_g(.(T408, .(T407, .(T408, [])))) → palindromeA_out_g(.(T408, .(T407, .(T408, []))))
palindromeA_in_g(.(T414, .(T414, []))) → palindromeA_out_g(.(T414, .(T414, [])))
palindromeA_in_g(.(T417, [])) → palindromeA_out_g(.(T417, []))
palindromeA_in_g([]) → palindromeA_out_g([])

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(.(T272, .(T271, .(T270, .(T269, .(T268, .(T267, .(T266, .(T264, T265))))))))) → U1_G(T272, T271, T270, T269, T268, T267, T266, T264, T265, reverse3B_in_ggggg(T265, T264, .(T266, .(T267, .(T268, .(T269, .(T270, .(T271, .(T272, []))))))), T272, .(T271, .(T270, .(T269, .(T268, .(T267, .(T266, .(T264, T265)))))))))
PALINDROMEA_IN_G(.(T272, .(T271, .(T270, .(T269, .(T268, .(T267, .(T266, .(T264, T265))))))))) → REVERSE3B_IN_GGGGG(T265, T264, .(T266, .(T267, .(T268, .(T269, .(T270, .(T271, .(T272, []))))))), T272, .(T271, .(T270, .(T269, .(T268, .(T267, .(T266, .(T264, T265))))))))
REVERSE3B_IN_GGGGG(.(T315, T316), T317, T318, T319, T320) → U2_GGGGG(T315, T316, T317, T318, T319, T320, reverse3B_in_ggggg(T316, T315, .(T317, T318), T319, T320))
REVERSE3B_IN_GGGGG(.(T315, T316), T317, T318, T319, T320) → REVERSE3B_IN_GGGGG(T316, T315, .(T317, T318), T319, T320)

The TRS R consists of the following rules:

palindromeA_in_g(.(T272, .(T271, .(T270, .(T269, .(T268, .(T267, .(T266, .(T264, T265))))))))) → U1_g(T272, T271, T270, T269, T268, T267, T266, T264, T265, reverse3B_in_ggggg(T265, T264, .(T266, .(T267, .(T268, .(T269, .(T270, .(T271, .(T272, []))))))), T272, .(T271, .(T270, .(T269, .(T268, .(T267, .(T266, .(T264, T265)))))))))
reverse3B_in_ggggg(.(T315, T316), T317, T318, T319, T320) → U2_ggggg(T315, T316, T317, T318, T319, T320, reverse3B_in_ggggg(T316, T315, .(T317, T318), T319, T320))
reverse3B_in_ggggg([], T332, T333, T332, T333) → reverse3B_out_ggggg([], T332, T333, T332, T333)
U2_ggggg(T315, T316, T317, T318, T319, T320, reverse3B_out_ggggg(T316, T315, .(T317, T318), T319, T320)) → reverse3B_out_ggggg(.(T315, T316), T317, T318, T319, T320)
U1_g(T272, T271, T270, T269, T268, T267, T266, T264, T265, reverse3B_out_ggggg(T265, T264, .(T266, .(T267, .(T268, .(T269, .(T270, .(T271, .(T272, []))))))), T272, .(T271, .(T270, .(T269, .(T268, .(T267, .(T266, .(T264, T265))))))))) → palindromeA_out_g(.(T272, .(T271, .(T270, .(T269, .(T268, .(T267, .(T266, .(T264, T265)))))))))
palindromeA_in_g(.(T354, .(T353, .(T352, .(T351, .(T352, .(T353, .(T354, [])))))))) → palindromeA_out_g(.(T354, .(T353, .(T352, .(T351, .(T352, .(T353, .(T354, []))))))))
palindromeA_in_g(.(T372, .(T371, .(T370, .(T370, .(T371, .(T372, []))))))) → palindromeA_out_g(.(T372, .(T371, .(T370, .(T370, .(T371, .(T372, [])))))))
palindromeA_in_g(.(T387, .(T386, .(T385, .(T386, .(T387, [])))))) → palindromeA_out_g(.(T387, .(T386, .(T385, .(T386, .(T387, []))))))
palindromeA_in_g(.(T399, .(T398, .(T398, .(T399, []))))) → palindromeA_out_g(.(T399, .(T398, .(T398, .(T399, [])))))
palindromeA_in_g(.(T408, .(T407, .(T408, [])))) → palindromeA_out_g(.(T408, .(T407, .(T408, []))))
palindromeA_in_g(.(T414, .(T414, []))) → palindromeA_out_g(.(T414, .(T414, [])))
palindromeA_in_g(.(T417, [])) → palindromeA_out_g(.(T417, []))
palindromeA_in_g([]) → palindromeA_out_g([])

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(.(T272, .(T271, .(T270, .(T269, .(T268, .(T267, .(T266, .(T264, T265))))))))) → U1_G(T272, T271, T270, T269, T268, T267, T266, T264, T265, reverse3B_in_ggggg(T265, T264, .(T266, .(T267, .(T268, .(T269, .(T270, .(T271, .(T272, []))))))), T272, .(T271, .(T270, .(T269, .(T268, .(T267, .(T266, .(T264, T265)))))))))
PALINDROMEA_IN_G(.(T272, .(T271, .(T270, .(T269, .(T268, .(T267, .(T266, .(T264, T265))))))))) → REVERSE3B_IN_GGGGG(T265, T264, .(T266, .(T267, .(T268, .(T269, .(T270, .(T271, .(T272, []))))))), T272, .(T271, .(T270, .(T269, .(T268, .(T267, .(T266, .(T264, T265))))))))
REVERSE3B_IN_GGGGG(.(T315, T316), T317, T318, T319, T320) → U2_GGGGG(T315, T316, T317, T318, T319, T320, reverse3B_in_ggggg(T316, T315, .(T317, T318), T319, T320))
REVERSE3B_IN_GGGGG(.(T315, T316), T317, T318, T319, T320) → REVERSE3B_IN_GGGGG(T316, T315, .(T317, T318), T319, T320)

The TRS R consists of the following rules:

palindromeA_in_g(.(T272, .(T271, .(T270, .(T269, .(T268, .(T267, .(T266, .(T264, T265))))))))) → U1_g(T272, T271, T270, T269, T268, T267, T266, T264, T265, reverse3B_in_ggggg(T265, T264, .(T266, .(T267, .(T268, .(T269, .(T270, .(T271, .(T272, []))))))), T272, .(T271, .(T270, .(T269, .(T268, .(T267, .(T266, .(T264, T265)))))))))
reverse3B_in_ggggg(.(T315, T316), T317, T318, T319, T320) → U2_ggggg(T315, T316, T317, T318, T319, T320, reverse3B_in_ggggg(T316, T315, .(T317, T318), T319, T320))
reverse3B_in_ggggg([], T332, T333, T332, T333) → reverse3B_out_ggggg([], T332, T333, T332, T333)
U2_ggggg(T315, T316, T317, T318, T319, T320, reverse3B_out_ggggg(T316, T315, .(T317, T318), T319, T320)) → reverse3B_out_ggggg(.(T315, T316), T317, T318, T319, T320)
U1_g(T272, T271, T270, T269, T268, T267, T266, T264, T265, reverse3B_out_ggggg(T265, T264, .(T266, .(T267, .(T268, .(T269, .(T270, .(T271, .(T272, []))))))), T272, .(T271, .(T270, .(T269, .(T268, .(T267, .(T266, .(T264, T265))))))))) → palindromeA_out_g(.(T272, .(T271, .(T270, .(T269, .(T268, .(T267, .(T266, .(T264, T265)))))))))
palindromeA_in_g(.(T354, .(T353, .(T352, .(T351, .(T352, .(T353, .(T354, [])))))))) → palindromeA_out_g(.(T354, .(T353, .(T352, .(T351, .(T352, .(T353, .(T354, []))))))))
palindromeA_in_g(.(T372, .(T371, .(T370, .(T370, .(T371, .(T372, []))))))) → palindromeA_out_g(.(T372, .(T371, .(T370, .(T370, .(T371, .(T372, [])))))))
palindromeA_in_g(.(T387, .(T386, .(T385, .(T386, .(T387, [])))))) → palindromeA_out_g(.(T387, .(T386, .(T385, .(T386, .(T387, []))))))
palindromeA_in_g(.(T399, .(T398, .(T398, .(T399, []))))) → palindromeA_out_g(.(T399, .(T398, .(T398, .(T399, [])))))
palindromeA_in_g(.(T408, .(T407, .(T408, [])))) → palindromeA_out_g(.(T408, .(T407, .(T408, []))))
palindromeA_in_g(.(T414, .(T414, []))) → palindromeA_out_g(.(T414, .(T414, [])))
palindromeA_in_g(.(T417, [])) → palindromeA_out_g(.(T417, []))
palindromeA_in_g([]) → palindromeA_out_g([])

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:

REVERSE3B_IN_GGGGG(.(T315, T316), T317, T318, T319, T320) → REVERSE3B_IN_GGGGG(T316, T315, .(T317, T318), T319, T320)

The TRS R consists of the following rules:

palindromeA_in_g(.(T272, .(T271, .(T270, .(T269, .(T268, .(T267, .(T266, .(T264, T265))))))))) → U1_g(T272, T271, T270, T269, T268, T267, T266, T264, T265, reverse3B_in_ggggg(T265, T264, .(T266, .(T267, .(T268, .(T269, .(T270, .(T271, .(T272, []))))))), T272, .(T271, .(T270, .(T269, .(T268, .(T267, .(T266, .(T264, T265)))))))))
reverse3B_in_ggggg(.(T315, T316), T317, T318, T319, T320) → U2_ggggg(T315, T316, T317, T318, T319, T320, reverse3B_in_ggggg(T316, T315, .(T317, T318), T319, T320))
reverse3B_in_ggggg([], T332, T333, T332, T333) → reverse3B_out_ggggg([], T332, T333, T332, T333)
U2_ggggg(T315, T316, T317, T318, T319, T320, reverse3B_out_ggggg(T316, T315, .(T317, T318), T319, T320)) → reverse3B_out_ggggg(.(T315, T316), T317, T318, T319, T320)
U1_g(T272, T271, T270, T269, T268, T267, T266, T264, T265, reverse3B_out_ggggg(T265, T264, .(T266, .(T267, .(T268, .(T269, .(T270, .(T271, .(T272, []))))))), T272, .(T271, .(T270, .(T269, .(T268, .(T267, .(T266, .(T264, T265))))))))) → palindromeA_out_g(.(T272, .(T271, .(T270, .(T269, .(T268, .(T267, .(T266, .(T264, T265)))))))))
palindromeA_in_g(.(T354, .(T353, .(T352, .(T351, .(T352, .(T353, .(T354, [])))))))) → palindromeA_out_g(.(T354, .(T353, .(T352, .(T351, .(T352, .(T353, .(T354, []))))))))
palindromeA_in_g(.(T372, .(T371, .(T370, .(T370, .(T371, .(T372, []))))))) → palindromeA_out_g(.(T372, .(T371, .(T370, .(T370, .(T371, .(T372, [])))))))
palindromeA_in_g(.(T387, .(T386, .(T385, .(T386, .(T387, [])))))) → palindromeA_out_g(.(T387, .(T386, .(T385, .(T386, .(T387, []))))))
palindromeA_in_g(.(T399, .(T398, .(T398, .(T399, []))))) → palindromeA_out_g(.(T399, .(T398, .(T398, .(T399, [])))))
palindromeA_in_g(.(T408, .(T407, .(T408, [])))) → palindromeA_out_g(.(T408, .(T407, .(T408, []))))
palindromeA_in_g(.(T414, .(T414, []))) → palindromeA_out_g(.(T414, .(T414, [])))
palindromeA_in_g(.(T417, [])) → palindromeA_out_g(.(T417, []))
palindromeA_in_g([]) → palindromeA_out_g([])

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:

REVERSE3B_IN_GGGGG(.(T315, T316), T317, T318, T319, T320) → REVERSE3B_IN_GGGGG(T316, T315, .(T317, T318), T319, T320)

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:

REVERSE3B_IN_GGGGG(.(T315, T316), T317, T318, T319, T320) → REVERSE3B_IN_GGGGG(T316, T315, .(T317, T318), T319, T320)

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:

  • REVERSE3B_IN_GGGGG(.(T315, T316), T317, T318, T319, T320) → REVERSE3B_IN_GGGGG(T316, T315, .(T317, T318), T319, T320)
    The graph contains the following edges 1 > 1, 1 > 2, 4 >= 4, 5 >= 5

(12) YES