(0) Obligation:

Clauses:

reverse(L, LR) :- revacc(L, LR, []).
revacc([], L, L).
revacc(.(EL, T), R, A) :- revacc(T, R, .(EL, A)).

Query: reverse(g,a)

(1) PrologToPiTRSViaGraphTransformerProof (SOUND transformation)

Transformed Prolog program to (Pi-)TRS.

(2) Obligation:

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

reverseA_in_ga([], []) → reverseA_out_ga([], [])
reverseA_in_ga(.(T36, []), .(T36, [])) → reverseA_out_ga(.(T36, []), .(T36, []))
reverseA_in_ga(.(T70, .(T69, [])), .(T69, .(T70, []))) → reverseA_out_ga(.(T70, .(T69, [])), .(T69, .(T70, [])))
reverseA_in_ga(.(T114, .(T113, .(T112, []))), .(T112, .(T113, .(T114, [])))) → reverseA_out_ga(.(T114, .(T113, .(T112, []))), .(T112, .(T113, .(T114, []))))
reverseA_in_ga(.(T168, .(T167, .(T166, .(T165, [])))), .(T165, .(T166, .(T167, .(T168, []))))) → reverseA_out_ga(.(T168, .(T167, .(T166, .(T165, [])))), .(T165, .(T166, .(T167, .(T168, [])))))
reverseA_in_ga(.(T232, .(T231, .(T230, .(T229, .(T228, []))))), .(T228, .(T229, .(T230, .(T231, .(T232, [])))))) → reverseA_out_ga(.(T232, .(T231, .(T230, .(T229, .(T228, []))))), .(T228, .(T229, .(T230, .(T231, .(T232, []))))))
reverseA_in_ga(.(T306, .(T305, .(T304, .(T303, .(T302, .(T301, [])))))), .(T301, .(T302, .(T303, .(T304, .(T305, .(T306, []))))))) → reverseA_out_ga(.(T306, .(T305, .(T304, .(T303, .(T302, .(T301, [])))))), .(T301, .(T302, .(T303, .(T304, .(T305, .(T306, [])))))))
reverseA_in_ga(.(T390, .(T389, .(T388, .(T387, .(T386, .(T385, .(T384, []))))))), .(T384, .(T385, .(T386, .(T387, .(T388, .(T389, .(T390, [])))))))) → reverseA_out_ga(.(T390, .(T389, .(T388, .(T387, .(T386, .(T385, .(T384, []))))))), .(T384, .(T385, .(T386, .(T387, .(T388, .(T389, .(T390, []))))))))
reverseA_in_ga(.(T420, .(T419, .(T418, .(T417, .(T416, .(T415, .(T414, .(T411, T412)))))))), T421) → U1_ga(T420, T419, T418, T417, T416, T415, T414, T411, T412, T421, revaccB_in_gagg(T412, T421, T411, .(T414, .(T415, .(T416, .(T417, .(T418, .(T419, .(T420, [])))))))))
revaccB_in_gagg([], .(T460, T461), T460, T461) → revaccB_out_gagg([], .(T460, T461), T460, T461)
revaccB_in_gagg(.(T472, T473), T477, T475, T476) → U2_gagg(T472, T473, T477, T475, T476, revaccB_in_gagg(T473, T477, T472, .(T475, T476)))
U2_gagg(T472, T473, T477, T475, T476, revaccB_out_gagg(T473, T477, T472, .(T475, T476))) → revaccB_out_gagg(.(T472, T473), T477, T475, T476)
U1_ga(T420, T419, T418, T417, T416, T415, T414, T411, T412, T421, revaccB_out_gagg(T412, T421, T411, .(T414, .(T415, .(T416, .(T417, .(T418, .(T419, .(T420, []))))))))) → reverseA_out_ga(.(T420, .(T419, .(T418, .(T417, .(T416, .(T415, .(T414, .(T411, T412)))))))), T421)

The argument filtering Pi contains the following mapping:
reverseA_in_ga(x1, x2)  =  reverseA_in_ga(x1)
[]  =  []
reverseA_out_ga(x1, x2)  =  reverseA_out_ga(x1, x2)
.(x1, x2)  =  .(x1, x2)
U1_ga(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11)  =  U1_ga(x1, x2, x3, x4, x5, x6, x7, x8, x9, x11)
revaccB_in_gagg(x1, x2, x3, x4)  =  revaccB_in_gagg(x1, x3, x4)
revaccB_out_gagg(x1, x2, x3, x4)  =  revaccB_out_gagg(x1, x2, x3, x4)
U2_gagg(x1, x2, x3, x4, x5, x6)  =  U2_gagg(x1, x2, x4, x5, x6)

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

REVERSEA_IN_GA(.(T420, .(T419, .(T418, .(T417, .(T416, .(T415, .(T414, .(T411, T412)))))))), T421) → U1_GA(T420, T419, T418, T417, T416, T415, T414, T411, T412, T421, revaccB_in_gagg(T412, T421, T411, .(T414, .(T415, .(T416, .(T417, .(T418, .(T419, .(T420, [])))))))))
REVERSEA_IN_GA(.(T420, .(T419, .(T418, .(T417, .(T416, .(T415, .(T414, .(T411, T412)))))))), T421) → REVACCB_IN_GAGG(T412, T421, T411, .(T414, .(T415, .(T416, .(T417, .(T418, .(T419, .(T420, []))))))))
REVACCB_IN_GAGG(.(T472, T473), T477, T475, T476) → U2_GAGG(T472, T473, T477, T475, T476, revaccB_in_gagg(T473, T477, T472, .(T475, T476)))
REVACCB_IN_GAGG(.(T472, T473), T477, T475, T476) → REVACCB_IN_GAGG(T473, T477, T472, .(T475, T476))

The TRS R consists of the following rules:

reverseA_in_ga([], []) → reverseA_out_ga([], [])
reverseA_in_ga(.(T36, []), .(T36, [])) → reverseA_out_ga(.(T36, []), .(T36, []))
reverseA_in_ga(.(T70, .(T69, [])), .(T69, .(T70, []))) → reverseA_out_ga(.(T70, .(T69, [])), .(T69, .(T70, [])))
reverseA_in_ga(.(T114, .(T113, .(T112, []))), .(T112, .(T113, .(T114, [])))) → reverseA_out_ga(.(T114, .(T113, .(T112, []))), .(T112, .(T113, .(T114, []))))
reverseA_in_ga(.(T168, .(T167, .(T166, .(T165, [])))), .(T165, .(T166, .(T167, .(T168, []))))) → reverseA_out_ga(.(T168, .(T167, .(T166, .(T165, [])))), .(T165, .(T166, .(T167, .(T168, [])))))
reverseA_in_ga(.(T232, .(T231, .(T230, .(T229, .(T228, []))))), .(T228, .(T229, .(T230, .(T231, .(T232, [])))))) → reverseA_out_ga(.(T232, .(T231, .(T230, .(T229, .(T228, []))))), .(T228, .(T229, .(T230, .(T231, .(T232, []))))))
reverseA_in_ga(.(T306, .(T305, .(T304, .(T303, .(T302, .(T301, [])))))), .(T301, .(T302, .(T303, .(T304, .(T305, .(T306, []))))))) → reverseA_out_ga(.(T306, .(T305, .(T304, .(T303, .(T302, .(T301, [])))))), .(T301, .(T302, .(T303, .(T304, .(T305, .(T306, [])))))))
reverseA_in_ga(.(T390, .(T389, .(T388, .(T387, .(T386, .(T385, .(T384, []))))))), .(T384, .(T385, .(T386, .(T387, .(T388, .(T389, .(T390, [])))))))) → reverseA_out_ga(.(T390, .(T389, .(T388, .(T387, .(T386, .(T385, .(T384, []))))))), .(T384, .(T385, .(T386, .(T387, .(T388, .(T389, .(T390, []))))))))
reverseA_in_ga(.(T420, .(T419, .(T418, .(T417, .(T416, .(T415, .(T414, .(T411, T412)))))))), T421) → U1_ga(T420, T419, T418, T417, T416, T415, T414, T411, T412, T421, revaccB_in_gagg(T412, T421, T411, .(T414, .(T415, .(T416, .(T417, .(T418, .(T419, .(T420, [])))))))))
revaccB_in_gagg([], .(T460, T461), T460, T461) → revaccB_out_gagg([], .(T460, T461), T460, T461)
revaccB_in_gagg(.(T472, T473), T477, T475, T476) → U2_gagg(T472, T473, T477, T475, T476, revaccB_in_gagg(T473, T477, T472, .(T475, T476)))
U2_gagg(T472, T473, T477, T475, T476, revaccB_out_gagg(T473, T477, T472, .(T475, T476))) → revaccB_out_gagg(.(T472, T473), T477, T475, T476)
U1_ga(T420, T419, T418, T417, T416, T415, T414, T411, T412, T421, revaccB_out_gagg(T412, T421, T411, .(T414, .(T415, .(T416, .(T417, .(T418, .(T419, .(T420, []))))))))) → reverseA_out_ga(.(T420, .(T419, .(T418, .(T417, .(T416, .(T415, .(T414, .(T411, T412)))))))), T421)

The argument filtering Pi contains the following mapping:
reverseA_in_ga(x1, x2)  =  reverseA_in_ga(x1)
[]  =  []
reverseA_out_ga(x1, x2)  =  reverseA_out_ga(x1, x2)
.(x1, x2)  =  .(x1, x2)
U1_ga(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11)  =  U1_ga(x1, x2, x3, x4, x5, x6, x7, x8, x9, x11)
revaccB_in_gagg(x1, x2, x3, x4)  =  revaccB_in_gagg(x1, x3, x4)
revaccB_out_gagg(x1, x2, x3, x4)  =  revaccB_out_gagg(x1, x2, x3, x4)
U2_gagg(x1, x2, x3, x4, x5, x6)  =  U2_gagg(x1, x2, x4, x5, x6)
REVERSEA_IN_GA(x1, x2)  =  REVERSEA_IN_GA(x1)
U1_GA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11)  =  U1_GA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x11)
REVACCB_IN_GAGG(x1, x2, x3, x4)  =  REVACCB_IN_GAGG(x1, x3, x4)
U2_GAGG(x1, x2, x3, x4, x5, x6)  =  U2_GAGG(x1, x2, x4, x5, x6)

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

(4) Obligation:

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

REVERSEA_IN_GA(.(T420, .(T419, .(T418, .(T417, .(T416, .(T415, .(T414, .(T411, T412)))))))), T421) → U1_GA(T420, T419, T418, T417, T416, T415, T414, T411, T412, T421, revaccB_in_gagg(T412, T421, T411, .(T414, .(T415, .(T416, .(T417, .(T418, .(T419, .(T420, [])))))))))
REVERSEA_IN_GA(.(T420, .(T419, .(T418, .(T417, .(T416, .(T415, .(T414, .(T411, T412)))))))), T421) → REVACCB_IN_GAGG(T412, T421, T411, .(T414, .(T415, .(T416, .(T417, .(T418, .(T419, .(T420, []))))))))
REVACCB_IN_GAGG(.(T472, T473), T477, T475, T476) → U2_GAGG(T472, T473, T477, T475, T476, revaccB_in_gagg(T473, T477, T472, .(T475, T476)))
REVACCB_IN_GAGG(.(T472, T473), T477, T475, T476) → REVACCB_IN_GAGG(T473, T477, T472, .(T475, T476))

The TRS R consists of the following rules:

reverseA_in_ga([], []) → reverseA_out_ga([], [])
reverseA_in_ga(.(T36, []), .(T36, [])) → reverseA_out_ga(.(T36, []), .(T36, []))
reverseA_in_ga(.(T70, .(T69, [])), .(T69, .(T70, []))) → reverseA_out_ga(.(T70, .(T69, [])), .(T69, .(T70, [])))
reverseA_in_ga(.(T114, .(T113, .(T112, []))), .(T112, .(T113, .(T114, [])))) → reverseA_out_ga(.(T114, .(T113, .(T112, []))), .(T112, .(T113, .(T114, []))))
reverseA_in_ga(.(T168, .(T167, .(T166, .(T165, [])))), .(T165, .(T166, .(T167, .(T168, []))))) → reverseA_out_ga(.(T168, .(T167, .(T166, .(T165, [])))), .(T165, .(T166, .(T167, .(T168, [])))))
reverseA_in_ga(.(T232, .(T231, .(T230, .(T229, .(T228, []))))), .(T228, .(T229, .(T230, .(T231, .(T232, [])))))) → reverseA_out_ga(.(T232, .(T231, .(T230, .(T229, .(T228, []))))), .(T228, .(T229, .(T230, .(T231, .(T232, []))))))
reverseA_in_ga(.(T306, .(T305, .(T304, .(T303, .(T302, .(T301, [])))))), .(T301, .(T302, .(T303, .(T304, .(T305, .(T306, []))))))) → reverseA_out_ga(.(T306, .(T305, .(T304, .(T303, .(T302, .(T301, [])))))), .(T301, .(T302, .(T303, .(T304, .(T305, .(T306, [])))))))
reverseA_in_ga(.(T390, .(T389, .(T388, .(T387, .(T386, .(T385, .(T384, []))))))), .(T384, .(T385, .(T386, .(T387, .(T388, .(T389, .(T390, [])))))))) → reverseA_out_ga(.(T390, .(T389, .(T388, .(T387, .(T386, .(T385, .(T384, []))))))), .(T384, .(T385, .(T386, .(T387, .(T388, .(T389, .(T390, []))))))))
reverseA_in_ga(.(T420, .(T419, .(T418, .(T417, .(T416, .(T415, .(T414, .(T411, T412)))))))), T421) → U1_ga(T420, T419, T418, T417, T416, T415, T414, T411, T412, T421, revaccB_in_gagg(T412, T421, T411, .(T414, .(T415, .(T416, .(T417, .(T418, .(T419, .(T420, [])))))))))
revaccB_in_gagg([], .(T460, T461), T460, T461) → revaccB_out_gagg([], .(T460, T461), T460, T461)
revaccB_in_gagg(.(T472, T473), T477, T475, T476) → U2_gagg(T472, T473, T477, T475, T476, revaccB_in_gagg(T473, T477, T472, .(T475, T476)))
U2_gagg(T472, T473, T477, T475, T476, revaccB_out_gagg(T473, T477, T472, .(T475, T476))) → revaccB_out_gagg(.(T472, T473), T477, T475, T476)
U1_ga(T420, T419, T418, T417, T416, T415, T414, T411, T412, T421, revaccB_out_gagg(T412, T421, T411, .(T414, .(T415, .(T416, .(T417, .(T418, .(T419, .(T420, []))))))))) → reverseA_out_ga(.(T420, .(T419, .(T418, .(T417, .(T416, .(T415, .(T414, .(T411, T412)))))))), T421)

The argument filtering Pi contains the following mapping:
reverseA_in_ga(x1, x2)  =  reverseA_in_ga(x1)
[]  =  []
reverseA_out_ga(x1, x2)  =  reverseA_out_ga(x1, x2)
.(x1, x2)  =  .(x1, x2)
U1_ga(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11)  =  U1_ga(x1, x2, x3, x4, x5, x6, x7, x8, x9, x11)
revaccB_in_gagg(x1, x2, x3, x4)  =  revaccB_in_gagg(x1, x3, x4)
revaccB_out_gagg(x1, x2, x3, x4)  =  revaccB_out_gagg(x1, x2, x3, x4)
U2_gagg(x1, x2, x3, x4, x5, x6)  =  U2_gagg(x1, x2, x4, x5, x6)
REVERSEA_IN_GA(x1, x2)  =  REVERSEA_IN_GA(x1)
U1_GA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11)  =  U1_GA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x11)
REVACCB_IN_GAGG(x1, x2, x3, x4)  =  REVACCB_IN_GAGG(x1, x3, x4)
U2_GAGG(x1, x2, x3, x4, x5, x6)  =  U2_GAGG(x1, x2, x4, x5, x6)

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:

REVACCB_IN_GAGG(.(T472, T473), T477, T475, T476) → REVACCB_IN_GAGG(T473, T477, T472, .(T475, T476))

The TRS R consists of the following rules:

reverseA_in_ga([], []) → reverseA_out_ga([], [])
reverseA_in_ga(.(T36, []), .(T36, [])) → reverseA_out_ga(.(T36, []), .(T36, []))
reverseA_in_ga(.(T70, .(T69, [])), .(T69, .(T70, []))) → reverseA_out_ga(.(T70, .(T69, [])), .(T69, .(T70, [])))
reverseA_in_ga(.(T114, .(T113, .(T112, []))), .(T112, .(T113, .(T114, [])))) → reverseA_out_ga(.(T114, .(T113, .(T112, []))), .(T112, .(T113, .(T114, []))))
reverseA_in_ga(.(T168, .(T167, .(T166, .(T165, [])))), .(T165, .(T166, .(T167, .(T168, []))))) → reverseA_out_ga(.(T168, .(T167, .(T166, .(T165, [])))), .(T165, .(T166, .(T167, .(T168, [])))))
reverseA_in_ga(.(T232, .(T231, .(T230, .(T229, .(T228, []))))), .(T228, .(T229, .(T230, .(T231, .(T232, [])))))) → reverseA_out_ga(.(T232, .(T231, .(T230, .(T229, .(T228, []))))), .(T228, .(T229, .(T230, .(T231, .(T232, []))))))
reverseA_in_ga(.(T306, .(T305, .(T304, .(T303, .(T302, .(T301, [])))))), .(T301, .(T302, .(T303, .(T304, .(T305, .(T306, []))))))) → reverseA_out_ga(.(T306, .(T305, .(T304, .(T303, .(T302, .(T301, [])))))), .(T301, .(T302, .(T303, .(T304, .(T305, .(T306, [])))))))
reverseA_in_ga(.(T390, .(T389, .(T388, .(T387, .(T386, .(T385, .(T384, []))))))), .(T384, .(T385, .(T386, .(T387, .(T388, .(T389, .(T390, [])))))))) → reverseA_out_ga(.(T390, .(T389, .(T388, .(T387, .(T386, .(T385, .(T384, []))))))), .(T384, .(T385, .(T386, .(T387, .(T388, .(T389, .(T390, []))))))))
reverseA_in_ga(.(T420, .(T419, .(T418, .(T417, .(T416, .(T415, .(T414, .(T411, T412)))))))), T421) → U1_ga(T420, T419, T418, T417, T416, T415, T414, T411, T412, T421, revaccB_in_gagg(T412, T421, T411, .(T414, .(T415, .(T416, .(T417, .(T418, .(T419, .(T420, [])))))))))
revaccB_in_gagg([], .(T460, T461), T460, T461) → revaccB_out_gagg([], .(T460, T461), T460, T461)
revaccB_in_gagg(.(T472, T473), T477, T475, T476) → U2_gagg(T472, T473, T477, T475, T476, revaccB_in_gagg(T473, T477, T472, .(T475, T476)))
U2_gagg(T472, T473, T477, T475, T476, revaccB_out_gagg(T473, T477, T472, .(T475, T476))) → revaccB_out_gagg(.(T472, T473), T477, T475, T476)
U1_ga(T420, T419, T418, T417, T416, T415, T414, T411, T412, T421, revaccB_out_gagg(T412, T421, T411, .(T414, .(T415, .(T416, .(T417, .(T418, .(T419, .(T420, []))))))))) → reverseA_out_ga(.(T420, .(T419, .(T418, .(T417, .(T416, .(T415, .(T414, .(T411, T412)))))))), T421)

The argument filtering Pi contains the following mapping:
reverseA_in_ga(x1, x2)  =  reverseA_in_ga(x1)
[]  =  []
reverseA_out_ga(x1, x2)  =  reverseA_out_ga(x1, x2)
.(x1, x2)  =  .(x1, x2)
U1_ga(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11)  =  U1_ga(x1, x2, x3, x4, x5, x6, x7, x8, x9, x11)
revaccB_in_gagg(x1, x2, x3, x4)  =  revaccB_in_gagg(x1, x3, x4)
revaccB_out_gagg(x1, x2, x3, x4)  =  revaccB_out_gagg(x1, x2, x3, x4)
U2_gagg(x1, x2, x3, x4, x5, x6)  =  U2_gagg(x1, x2, x4, x5, x6)
REVACCB_IN_GAGG(x1, x2, x3, x4)  =  REVACCB_IN_GAGG(x1, x3, x4)

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:

REVACCB_IN_GAGG(.(T472, T473), T477, T475, T476) → REVACCB_IN_GAGG(T473, T477, T472, .(T475, T476))

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

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

(9) PiDPToQDPProof (SOUND 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:

REVACCB_IN_GAGG(.(T472, T473), T475, T476) → REVACCB_IN_GAGG(T473, T472, .(T475, T476))

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:

  • REVACCB_IN_GAGG(.(T472, T473), T475, T476) → REVACCB_IN_GAGG(T473, T472, .(T475, T476))
    The graph contains the following edges 1 > 1, 1 > 2

(12) YES