0 Prolog
↳1 PrologToPiTRSProof (⇐)
↳2 PiTRS
↳3 DependencyPairsProof (⇔)
↳4 PiDP
↳5 DependencyGraphProof (⇔)
↳6 AND
↳7 PiDP
↳8 UsableRulesProof (⇔)
↳9 PiDP
↳10 PiDPToQDPProof (⇐)
↳11 QDP
↳12 QDPSizeChangeProof (⇔)
↳13 TRUE
↳14 PiDP
↳15 PiDPToQDPProof (⇐)
↳16 QDP
↳17 QDPOrderProof (⇔)
↳18 QDP
↳19 PrologToPiTRSProof (⇐)
↳20 PiTRS
↳21 DependencyPairsProof (⇔)
↳22 PiDP
↳23 DependencyGraphProof (⇔)
↳24 AND
↳25 PiDP
↳26 UsableRulesProof (⇔)
↳27 PiDP
↳28 PiDPToQDPProof (⇐)
↳29 QDP
↳30 QDPSizeChangeProof (⇔)
↳31 TRUE
↳32 PiDP
↳33 PiDPToQDPProof (⇐)
↳34 QDP
↳35 QDPOrderProof (⇔)
↳36 QDP
↳37 DependencyGraphProof (⇔)
↳38 TRUE
shanoi_in_gggga(s(0), A, B, C, .(mv(A, C), [])) → shanoi_out_gggga(s(0), A, B, C, .(mv(A, C), []))
shanoi_in_gggga(s(s(X)), A, B, C, M) → U1_gggga(X, A, B, C, M, eq_in_ag(N1, s(X)))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_gggga(X, A, B, C, M, eq_out_ag(N1, s(X))) → U2_gggga(X, A, B, C, M, N1, shanoi_in_gggga(N1, A, C, B, M1))
U2_gggga(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → U3_gggga(X, A, B, C, M, M1, shanoi_in_gggga(N1, B, A, C, M2))
U3_gggga(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → U4_gggga(X, A, B, C, M, M2, append_in_gga(M1, .(mv(A, C), []), T))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L), L1, .(H, R)) → U6_gga(H, L, L1, R, append_in_gga(L, L1, R))
U6_gga(H, L, L1, R, append_out_gga(L, L1, R)) → append_out_gga(.(H, L), L1, .(H, R))
U4_gggga(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → U5_gggga(X, A, B, C, M, append_in_gga(T, M2, M))
U5_gggga(X, A, B, C, M, append_out_gga(T, M2, M)) → shanoi_out_gggga(s(s(X)), A, B, C, M)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
shanoi_in_gggga(s(0), A, B, C, .(mv(A, C), [])) → shanoi_out_gggga(s(0), A, B, C, .(mv(A, C), []))
shanoi_in_gggga(s(s(X)), A, B, C, M) → U1_gggga(X, A, B, C, M, eq_in_ag(N1, s(X)))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_gggga(X, A, B, C, M, eq_out_ag(N1, s(X))) → U2_gggga(X, A, B, C, M, N1, shanoi_in_gggga(N1, A, C, B, M1))
U2_gggga(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → U3_gggga(X, A, B, C, M, M1, shanoi_in_gggga(N1, B, A, C, M2))
U3_gggga(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → U4_gggga(X, A, B, C, M, M2, append_in_gga(M1, .(mv(A, C), []), T))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L), L1, .(H, R)) → U6_gga(H, L, L1, R, append_in_gga(L, L1, R))
U6_gga(H, L, L1, R, append_out_gga(L, L1, R)) → append_out_gga(.(H, L), L1, .(H, R))
U4_gggga(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → U5_gggga(X, A, B, C, M, append_in_gga(T, M2, M))
U5_gggga(X, A, B, C, M, append_out_gga(T, M2, M)) → shanoi_out_gggga(s(s(X)), A, B, C, M)
SHANOI_IN_GGGGA(s(s(X)), A, B, C, M) → U1_GGGGA(X, A, B, C, M, eq_in_ag(N1, s(X)))
SHANOI_IN_GGGGA(s(s(X)), A, B, C, M) → EQ_IN_AG(N1, s(X))
U1_GGGGA(X, A, B, C, M, eq_out_ag(N1, s(X))) → U2_GGGGA(X, A, B, C, M, N1, shanoi_in_gggga(N1, A, C, B, M1))
U1_GGGGA(X, A, B, C, M, eq_out_ag(N1, s(X))) → SHANOI_IN_GGGGA(N1, A, C, B, M1)
U2_GGGGA(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → U3_GGGGA(X, A, B, C, M, M1, shanoi_in_gggga(N1, B, A, C, M2))
U2_GGGGA(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → SHANOI_IN_GGGGA(N1, B, A, C, M2)
U3_GGGGA(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → U4_GGGGA(X, A, B, C, M, M2, append_in_gga(M1, .(mv(A, C), []), T))
U3_GGGGA(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → APPEND_IN_GGA(M1, .(mv(A, C), []), T)
APPEND_IN_GGA(.(H, L), L1, .(H, R)) → U6_GGA(H, L, L1, R, append_in_gga(L, L1, R))
APPEND_IN_GGA(.(H, L), L1, .(H, R)) → APPEND_IN_GGA(L, L1, R)
U4_GGGGA(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → U5_GGGGA(X, A, B, C, M, append_in_gga(T, M2, M))
U4_GGGGA(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → APPEND_IN_GGA(T, M2, M)
shanoi_in_gggga(s(0), A, B, C, .(mv(A, C), [])) → shanoi_out_gggga(s(0), A, B, C, .(mv(A, C), []))
shanoi_in_gggga(s(s(X)), A, B, C, M) → U1_gggga(X, A, B, C, M, eq_in_ag(N1, s(X)))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_gggga(X, A, B, C, M, eq_out_ag(N1, s(X))) → U2_gggga(X, A, B, C, M, N1, shanoi_in_gggga(N1, A, C, B, M1))
U2_gggga(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → U3_gggga(X, A, B, C, M, M1, shanoi_in_gggga(N1, B, A, C, M2))
U3_gggga(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → U4_gggga(X, A, B, C, M, M2, append_in_gga(M1, .(mv(A, C), []), T))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L), L1, .(H, R)) → U6_gga(H, L, L1, R, append_in_gga(L, L1, R))
U6_gga(H, L, L1, R, append_out_gga(L, L1, R)) → append_out_gga(.(H, L), L1, .(H, R))
U4_gggga(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → U5_gggga(X, A, B, C, M, append_in_gga(T, M2, M))
U5_gggga(X, A, B, C, M, append_out_gga(T, M2, M)) → shanoi_out_gggga(s(s(X)), A, B, C, M)
SHANOI_IN_GGGGA(s(s(X)), A, B, C, M) → U1_GGGGA(X, A, B, C, M, eq_in_ag(N1, s(X)))
SHANOI_IN_GGGGA(s(s(X)), A, B, C, M) → EQ_IN_AG(N1, s(X))
U1_GGGGA(X, A, B, C, M, eq_out_ag(N1, s(X))) → U2_GGGGA(X, A, B, C, M, N1, shanoi_in_gggga(N1, A, C, B, M1))
U1_GGGGA(X, A, B, C, M, eq_out_ag(N1, s(X))) → SHANOI_IN_GGGGA(N1, A, C, B, M1)
U2_GGGGA(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → U3_GGGGA(X, A, B, C, M, M1, shanoi_in_gggga(N1, B, A, C, M2))
U2_GGGGA(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → SHANOI_IN_GGGGA(N1, B, A, C, M2)
U3_GGGGA(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → U4_GGGGA(X, A, B, C, M, M2, append_in_gga(M1, .(mv(A, C), []), T))
U3_GGGGA(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → APPEND_IN_GGA(M1, .(mv(A, C), []), T)
APPEND_IN_GGA(.(H, L), L1, .(H, R)) → U6_GGA(H, L, L1, R, append_in_gga(L, L1, R))
APPEND_IN_GGA(.(H, L), L1, .(H, R)) → APPEND_IN_GGA(L, L1, R)
U4_GGGGA(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → U5_GGGGA(X, A, B, C, M, append_in_gga(T, M2, M))
U4_GGGGA(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → APPEND_IN_GGA(T, M2, M)
shanoi_in_gggga(s(0), A, B, C, .(mv(A, C), [])) → shanoi_out_gggga(s(0), A, B, C, .(mv(A, C), []))
shanoi_in_gggga(s(s(X)), A, B, C, M) → U1_gggga(X, A, B, C, M, eq_in_ag(N1, s(X)))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_gggga(X, A, B, C, M, eq_out_ag(N1, s(X))) → U2_gggga(X, A, B, C, M, N1, shanoi_in_gggga(N1, A, C, B, M1))
U2_gggga(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → U3_gggga(X, A, B, C, M, M1, shanoi_in_gggga(N1, B, A, C, M2))
U3_gggga(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → U4_gggga(X, A, B, C, M, M2, append_in_gga(M1, .(mv(A, C), []), T))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L), L1, .(H, R)) → U6_gga(H, L, L1, R, append_in_gga(L, L1, R))
U6_gga(H, L, L1, R, append_out_gga(L, L1, R)) → append_out_gga(.(H, L), L1, .(H, R))
U4_gggga(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → U5_gggga(X, A, B, C, M, append_in_gga(T, M2, M))
U5_gggga(X, A, B, C, M, append_out_gga(T, M2, M)) → shanoi_out_gggga(s(s(X)), A, B, C, M)
APPEND_IN_GGA(.(H, L), L1, .(H, R)) → APPEND_IN_GGA(L, L1, R)
shanoi_in_gggga(s(0), A, B, C, .(mv(A, C), [])) → shanoi_out_gggga(s(0), A, B, C, .(mv(A, C), []))
shanoi_in_gggga(s(s(X)), A, B, C, M) → U1_gggga(X, A, B, C, M, eq_in_ag(N1, s(X)))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_gggga(X, A, B, C, M, eq_out_ag(N1, s(X))) → U2_gggga(X, A, B, C, M, N1, shanoi_in_gggga(N1, A, C, B, M1))
U2_gggga(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → U3_gggga(X, A, B, C, M, M1, shanoi_in_gggga(N1, B, A, C, M2))
U3_gggga(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → U4_gggga(X, A, B, C, M, M2, append_in_gga(M1, .(mv(A, C), []), T))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L), L1, .(H, R)) → U6_gga(H, L, L1, R, append_in_gga(L, L1, R))
U6_gga(H, L, L1, R, append_out_gga(L, L1, R)) → append_out_gga(.(H, L), L1, .(H, R))
U4_gggga(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → U5_gggga(X, A, B, C, M, append_in_gga(T, M2, M))
U5_gggga(X, A, B, C, M, append_out_gga(T, M2, M)) → shanoi_out_gggga(s(s(X)), A, B, C, M)
APPEND_IN_GGA(.(H, L), L1, .(H, R)) → APPEND_IN_GGA(L, L1, R)
APPEND_IN_GGA(.(H, L), L1) → APPEND_IN_GGA(L, L1)
From the DPs we obtained the following set of size-change graphs:
U1_GGGGA(X, A, B, C, M, eq_out_ag(N1, s(X))) → U2_GGGGA(X, A, B, C, M, N1, shanoi_in_gggga(N1, A, C, B, M1))
U2_GGGGA(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → SHANOI_IN_GGGGA(N1, B, A, C, M2)
SHANOI_IN_GGGGA(s(s(X)), A, B, C, M) → U1_GGGGA(X, A, B, C, M, eq_in_ag(N1, s(X)))
U1_GGGGA(X, A, B, C, M, eq_out_ag(N1, s(X))) → SHANOI_IN_GGGGA(N1, A, C, B, M1)
shanoi_in_gggga(s(0), A, B, C, .(mv(A, C), [])) → shanoi_out_gggga(s(0), A, B, C, .(mv(A, C), []))
shanoi_in_gggga(s(s(X)), A, B, C, M) → U1_gggga(X, A, B, C, M, eq_in_ag(N1, s(X)))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_gggga(X, A, B, C, M, eq_out_ag(N1, s(X))) → U2_gggga(X, A, B, C, M, N1, shanoi_in_gggga(N1, A, C, B, M1))
U2_gggga(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → U3_gggga(X, A, B, C, M, M1, shanoi_in_gggga(N1, B, A, C, M2))
U3_gggga(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → U4_gggga(X, A, B, C, M, M2, append_in_gga(M1, .(mv(A, C), []), T))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L), L1, .(H, R)) → U6_gga(H, L, L1, R, append_in_gga(L, L1, R))
U6_gga(H, L, L1, R, append_out_gga(L, L1, R)) → append_out_gga(.(H, L), L1, .(H, R))
U4_gggga(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → U5_gggga(X, A, B, C, M, append_in_gga(T, M2, M))
U5_gggga(X, A, B, C, M, append_out_gga(T, M2, M)) → shanoi_out_gggga(s(s(X)), A, B, C, M)
U1_GGGGA(A, B, C, eq_out_ag(N1)) → U2_GGGGA(A, B, C, N1, shanoi_in_gggga(N1, A, C, B))
U2_GGGGA(A, B, C, N1, shanoi_out_gggga(M1)) → SHANOI_IN_GGGGA(N1, B, A, C)
SHANOI_IN_GGGGA(s(s(X)), A, B, C) → U1_GGGGA(A, B, C, eq_in_ag(s(X)))
U1_GGGGA(A, B, C, eq_out_ag(N1)) → SHANOI_IN_GGGGA(N1, A, C, B)
shanoi_in_gggga(s(0), A, B, C) → shanoi_out_gggga(.(mv(A, C), []))
shanoi_in_gggga(s(s(X)), A, B, C) → U1_gggga(A, B, C, eq_in_ag(s(X)))
eq_in_ag(X) → eq_out_ag(X)
U1_gggga(A, B, C, eq_out_ag(N1)) → U2_gggga(A, B, C, N1, shanoi_in_gggga(N1, A, C, B))
U2_gggga(A, B, C, N1, shanoi_out_gggga(M1)) → U3_gggga(A, C, M1, shanoi_in_gggga(N1, B, A, C))
U3_gggga(A, C, M1, shanoi_out_gggga(M2)) → U4_gggga(M2, append_in_gga(M1, .(mv(A, C), [])))
append_in_gga([], L) → append_out_gga(L)
append_in_gga(.(H, L), L1) → U6_gga(H, append_in_gga(L, L1))
U6_gga(H, append_out_gga(R)) → append_out_gga(.(H, R))
U4_gggga(M2, append_out_gga(T)) → U5_gggga(append_in_gga(T, M2))
U5_gggga(append_out_gga(M)) → shanoi_out_gggga(M)
shanoi_in_gggga(x0, x1, x2, x3)
eq_in_ag(x0)
U1_gggga(x0, x1, x2, x3)
U2_gggga(x0, x1, x2, x3, x4)
U3_gggga(x0, x1, x2, x3)
append_in_gga(x0, x1)
U6_gga(x0, x1)
U4_gggga(x0, x1)
U5_gggga(x0)
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
U1_GGGGA(A, B, C, eq_out_ag(N1)) → U2_GGGGA(A, B, C, N1, shanoi_in_gggga(N1, A, C, B))
U1_GGGGA(A, B, C, eq_out_ag(N1)) → SHANOI_IN_GGGGA(N1, A, C, B)
POL(.(x1, x2)) = x1 + x2
POL(0) = 0
POL(SHANOI_IN_GGGGA(x1, x2, x3, x4)) = x1
POL(U1_GGGGA(x1, x2, x3, x4)) = x4
POL(U1_gggga(x1, x2, x3, x4)) = 0
POL(U2_GGGGA(x1, x2, x3, x4, x5)) = x4
POL(U2_gggga(x1, x2, x3, x4, x5)) = 0
POL(U3_gggga(x1, x2, x3, x4)) = 0
POL(U4_gggga(x1, x2)) = 0
POL(U5_gggga(x1)) = 0
POL(U6_gga(x1, x2)) = 0
POL([]) = 0
POL(append_in_gga(x1, x2)) = 1 + x1 + x2
POL(append_out_gga(x1)) = 0
POL(eq_in_ag(x1)) = 1 + x1
POL(eq_out_ag(x1)) = 1 + x1
POL(mv(x1, x2)) = 0
POL(s(x1)) = 1 + x1
POL(shanoi_in_gggga(x1, x2, x3, x4)) = 0
POL(shanoi_out_gggga(x1)) = 0
eq_in_ag(X) → eq_out_ag(X)
U2_GGGGA(A, B, C, N1, shanoi_out_gggga(M1)) → SHANOI_IN_GGGGA(N1, B, A, C)
SHANOI_IN_GGGGA(s(s(X)), A, B, C) → U1_GGGGA(A, B, C, eq_in_ag(s(X)))
shanoi_in_gggga(s(0), A, B, C) → shanoi_out_gggga(.(mv(A, C), []))
shanoi_in_gggga(s(s(X)), A, B, C) → U1_gggga(A, B, C, eq_in_ag(s(X)))
eq_in_ag(X) → eq_out_ag(X)
U1_gggga(A, B, C, eq_out_ag(N1)) → U2_gggga(A, B, C, N1, shanoi_in_gggga(N1, A, C, B))
U2_gggga(A, B, C, N1, shanoi_out_gggga(M1)) → U3_gggga(A, C, M1, shanoi_in_gggga(N1, B, A, C))
U3_gggga(A, C, M1, shanoi_out_gggga(M2)) → U4_gggga(M2, append_in_gga(M1, .(mv(A, C), [])))
append_in_gga([], L) → append_out_gga(L)
append_in_gga(.(H, L), L1) → U6_gga(H, append_in_gga(L, L1))
U6_gga(H, append_out_gga(R)) → append_out_gga(.(H, R))
U4_gggga(M2, append_out_gga(T)) → U5_gggga(append_in_gga(T, M2))
U5_gggga(append_out_gga(M)) → shanoi_out_gggga(M)
shanoi_in_gggga(x0, x1, x2, x3)
eq_in_ag(x0)
U1_gggga(x0, x1, x2, x3)
U2_gggga(x0, x1, x2, x3, x4)
U3_gggga(x0, x1, x2, x3)
append_in_gga(x0, x1)
U6_gga(x0, x1)
U4_gggga(x0, x1)
U5_gggga(x0)
shanoi_in_gggga(s(0), A, B, C, .(mv(A, C), [])) → shanoi_out_gggga(s(0), A, B, C, .(mv(A, C), []))
shanoi_in_gggga(s(s(X)), A, B, C, M) → U1_gggga(X, A, B, C, M, eq_in_ag(N1, s(X)))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_gggga(X, A, B, C, M, eq_out_ag(N1, s(X))) → U2_gggga(X, A, B, C, M, N1, shanoi_in_gggga(N1, A, C, B, M1))
U2_gggga(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → U3_gggga(X, A, B, C, M, M1, shanoi_in_gggga(N1, B, A, C, M2))
U3_gggga(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → U4_gggga(X, A, B, C, M, M2, append_in_gga(M1, .(mv(A, C), []), T))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L), L1, .(H, R)) → U6_gga(H, L, L1, R, append_in_gga(L, L1, R))
U6_gga(H, L, L1, R, append_out_gga(L, L1, R)) → append_out_gga(.(H, L), L1, .(H, R))
U4_gggga(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → U5_gggga(X, A, B, C, M, append_in_gga(T, M2, M))
U5_gggga(X, A, B, C, M, append_out_gga(T, M2, M)) → shanoi_out_gggga(s(s(X)), A, B, C, M)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
shanoi_in_gggga(s(0), A, B, C, .(mv(A, C), [])) → shanoi_out_gggga(s(0), A, B, C, .(mv(A, C), []))
shanoi_in_gggga(s(s(X)), A, B, C, M) → U1_gggga(X, A, B, C, M, eq_in_ag(N1, s(X)))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_gggga(X, A, B, C, M, eq_out_ag(N1, s(X))) → U2_gggga(X, A, B, C, M, N1, shanoi_in_gggga(N1, A, C, B, M1))
U2_gggga(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → U3_gggga(X, A, B, C, M, M1, shanoi_in_gggga(N1, B, A, C, M2))
U3_gggga(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → U4_gggga(X, A, B, C, M, M2, append_in_gga(M1, .(mv(A, C), []), T))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L), L1, .(H, R)) → U6_gga(H, L, L1, R, append_in_gga(L, L1, R))
U6_gga(H, L, L1, R, append_out_gga(L, L1, R)) → append_out_gga(.(H, L), L1, .(H, R))
U4_gggga(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → U5_gggga(X, A, B, C, M, append_in_gga(T, M2, M))
U5_gggga(X, A, B, C, M, append_out_gga(T, M2, M)) → shanoi_out_gggga(s(s(X)), A, B, C, M)
SHANOI_IN_GGGGA(s(s(X)), A, B, C, M) → U1_GGGGA(X, A, B, C, M, eq_in_ag(N1, s(X)))
SHANOI_IN_GGGGA(s(s(X)), A, B, C, M) → EQ_IN_AG(N1, s(X))
U1_GGGGA(X, A, B, C, M, eq_out_ag(N1, s(X))) → U2_GGGGA(X, A, B, C, M, N1, shanoi_in_gggga(N1, A, C, B, M1))
U1_GGGGA(X, A, B, C, M, eq_out_ag(N1, s(X))) → SHANOI_IN_GGGGA(N1, A, C, B, M1)
U2_GGGGA(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → U3_GGGGA(X, A, B, C, M, M1, shanoi_in_gggga(N1, B, A, C, M2))
U2_GGGGA(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → SHANOI_IN_GGGGA(N1, B, A, C, M2)
U3_GGGGA(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → U4_GGGGA(X, A, B, C, M, M2, append_in_gga(M1, .(mv(A, C), []), T))
U3_GGGGA(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → APPEND_IN_GGA(M1, .(mv(A, C), []), T)
APPEND_IN_GGA(.(H, L), L1, .(H, R)) → U6_GGA(H, L, L1, R, append_in_gga(L, L1, R))
APPEND_IN_GGA(.(H, L), L1, .(H, R)) → APPEND_IN_GGA(L, L1, R)
U4_GGGGA(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → U5_GGGGA(X, A, B, C, M, append_in_gga(T, M2, M))
U4_GGGGA(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → APPEND_IN_GGA(T, M2, M)
shanoi_in_gggga(s(0), A, B, C, .(mv(A, C), [])) → shanoi_out_gggga(s(0), A, B, C, .(mv(A, C), []))
shanoi_in_gggga(s(s(X)), A, B, C, M) → U1_gggga(X, A, B, C, M, eq_in_ag(N1, s(X)))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_gggga(X, A, B, C, M, eq_out_ag(N1, s(X))) → U2_gggga(X, A, B, C, M, N1, shanoi_in_gggga(N1, A, C, B, M1))
U2_gggga(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → U3_gggga(X, A, B, C, M, M1, shanoi_in_gggga(N1, B, A, C, M2))
U3_gggga(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → U4_gggga(X, A, B, C, M, M2, append_in_gga(M1, .(mv(A, C), []), T))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L), L1, .(H, R)) → U6_gga(H, L, L1, R, append_in_gga(L, L1, R))
U6_gga(H, L, L1, R, append_out_gga(L, L1, R)) → append_out_gga(.(H, L), L1, .(H, R))
U4_gggga(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → U5_gggga(X, A, B, C, M, append_in_gga(T, M2, M))
U5_gggga(X, A, B, C, M, append_out_gga(T, M2, M)) → shanoi_out_gggga(s(s(X)), A, B, C, M)
SHANOI_IN_GGGGA(s(s(X)), A, B, C, M) → U1_GGGGA(X, A, B, C, M, eq_in_ag(N1, s(X)))
SHANOI_IN_GGGGA(s(s(X)), A, B, C, M) → EQ_IN_AG(N1, s(X))
U1_GGGGA(X, A, B, C, M, eq_out_ag(N1, s(X))) → U2_GGGGA(X, A, B, C, M, N1, shanoi_in_gggga(N1, A, C, B, M1))
U1_GGGGA(X, A, B, C, M, eq_out_ag(N1, s(X))) → SHANOI_IN_GGGGA(N1, A, C, B, M1)
U2_GGGGA(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → U3_GGGGA(X, A, B, C, M, M1, shanoi_in_gggga(N1, B, A, C, M2))
U2_GGGGA(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → SHANOI_IN_GGGGA(N1, B, A, C, M2)
U3_GGGGA(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → U4_GGGGA(X, A, B, C, M, M2, append_in_gga(M1, .(mv(A, C), []), T))
U3_GGGGA(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → APPEND_IN_GGA(M1, .(mv(A, C), []), T)
APPEND_IN_GGA(.(H, L), L1, .(H, R)) → U6_GGA(H, L, L1, R, append_in_gga(L, L1, R))
APPEND_IN_GGA(.(H, L), L1, .(H, R)) → APPEND_IN_GGA(L, L1, R)
U4_GGGGA(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → U5_GGGGA(X, A, B, C, M, append_in_gga(T, M2, M))
U4_GGGGA(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → APPEND_IN_GGA(T, M2, M)
shanoi_in_gggga(s(0), A, B, C, .(mv(A, C), [])) → shanoi_out_gggga(s(0), A, B, C, .(mv(A, C), []))
shanoi_in_gggga(s(s(X)), A, B, C, M) → U1_gggga(X, A, B, C, M, eq_in_ag(N1, s(X)))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_gggga(X, A, B, C, M, eq_out_ag(N1, s(X))) → U2_gggga(X, A, B, C, M, N1, shanoi_in_gggga(N1, A, C, B, M1))
U2_gggga(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → U3_gggga(X, A, B, C, M, M1, shanoi_in_gggga(N1, B, A, C, M2))
U3_gggga(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → U4_gggga(X, A, B, C, M, M2, append_in_gga(M1, .(mv(A, C), []), T))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L), L1, .(H, R)) → U6_gga(H, L, L1, R, append_in_gga(L, L1, R))
U6_gga(H, L, L1, R, append_out_gga(L, L1, R)) → append_out_gga(.(H, L), L1, .(H, R))
U4_gggga(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → U5_gggga(X, A, B, C, M, append_in_gga(T, M2, M))
U5_gggga(X, A, B, C, M, append_out_gga(T, M2, M)) → shanoi_out_gggga(s(s(X)), A, B, C, M)
APPEND_IN_GGA(.(H, L), L1, .(H, R)) → APPEND_IN_GGA(L, L1, R)
shanoi_in_gggga(s(0), A, B, C, .(mv(A, C), [])) → shanoi_out_gggga(s(0), A, B, C, .(mv(A, C), []))
shanoi_in_gggga(s(s(X)), A, B, C, M) → U1_gggga(X, A, B, C, M, eq_in_ag(N1, s(X)))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_gggga(X, A, B, C, M, eq_out_ag(N1, s(X))) → U2_gggga(X, A, B, C, M, N1, shanoi_in_gggga(N1, A, C, B, M1))
U2_gggga(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → U3_gggga(X, A, B, C, M, M1, shanoi_in_gggga(N1, B, A, C, M2))
U3_gggga(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → U4_gggga(X, A, B, C, M, M2, append_in_gga(M1, .(mv(A, C), []), T))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L), L1, .(H, R)) → U6_gga(H, L, L1, R, append_in_gga(L, L1, R))
U6_gga(H, L, L1, R, append_out_gga(L, L1, R)) → append_out_gga(.(H, L), L1, .(H, R))
U4_gggga(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → U5_gggga(X, A, B, C, M, append_in_gga(T, M2, M))
U5_gggga(X, A, B, C, M, append_out_gga(T, M2, M)) → shanoi_out_gggga(s(s(X)), A, B, C, M)
APPEND_IN_GGA(.(H, L), L1, .(H, R)) → APPEND_IN_GGA(L, L1, R)
APPEND_IN_GGA(.(H, L), L1) → APPEND_IN_GGA(L, L1)
From the DPs we obtained the following set of size-change graphs:
U1_GGGGA(X, A, B, C, M, eq_out_ag(N1, s(X))) → U2_GGGGA(X, A, B, C, M, N1, shanoi_in_gggga(N1, A, C, B, M1))
U2_GGGGA(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → SHANOI_IN_GGGGA(N1, B, A, C, M2)
SHANOI_IN_GGGGA(s(s(X)), A, B, C, M) → U1_GGGGA(X, A, B, C, M, eq_in_ag(N1, s(X)))
U1_GGGGA(X, A, B, C, M, eq_out_ag(N1, s(X))) → SHANOI_IN_GGGGA(N1, A, C, B, M1)
shanoi_in_gggga(s(0), A, B, C, .(mv(A, C), [])) → shanoi_out_gggga(s(0), A, B, C, .(mv(A, C), []))
shanoi_in_gggga(s(s(X)), A, B, C, M) → U1_gggga(X, A, B, C, M, eq_in_ag(N1, s(X)))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_gggga(X, A, B, C, M, eq_out_ag(N1, s(X))) → U2_gggga(X, A, B, C, M, N1, shanoi_in_gggga(N1, A, C, B, M1))
U2_gggga(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → U3_gggga(X, A, B, C, M, M1, shanoi_in_gggga(N1, B, A, C, M2))
U3_gggga(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → U4_gggga(X, A, B, C, M, M2, append_in_gga(M1, .(mv(A, C), []), T))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L), L1, .(H, R)) → U6_gga(H, L, L1, R, append_in_gga(L, L1, R))
U6_gga(H, L, L1, R, append_out_gga(L, L1, R)) → append_out_gga(.(H, L), L1, .(H, R))
U4_gggga(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → U5_gggga(X, A, B, C, M, append_in_gga(T, M2, M))
U5_gggga(X, A, B, C, M, append_out_gga(T, M2, M)) → shanoi_out_gggga(s(s(X)), A, B, C, M)
U1_GGGGA(X, A, B, C, eq_out_ag(N1, s(X))) → U2_GGGGA(X, A, B, C, N1, shanoi_in_gggga(N1, A, C, B))
U2_GGGGA(X, A, B, C, N1, shanoi_out_gggga(N1, A, C, B, M1)) → SHANOI_IN_GGGGA(N1, B, A, C)
SHANOI_IN_GGGGA(s(s(X)), A, B, C) → U1_GGGGA(X, A, B, C, eq_in_ag(s(X)))
U1_GGGGA(X, A, B, C, eq_out_ag(N1, s(X))) → SHANOI_IN_GGGGA(N1, A, C, B)
shanoi_in_gggga(s(0), A, B, C) → shanoi_out_gggga(s(0), A, B, C, .(mv(A, C), []))
shanoi_in_gggga(s(s(X)), A, B, C) → U1_gggga(X, A, B, C, eq_in_ag(s(X)))
eq_in_ag(X) → eq_out_ag(X, X)
U1_gggga(X, A, B, C, eq_out_ag(N1, s(X))) → U2_gggga(X, A, B, C, N1, shanoi_in_gggga(N1, A, C, B))
U2_gggga(X, A, B, C, N1, shanoi_out_gggga(N1, A, C, B, M1)) → U3_gggga(X, A, B, C, M1, shanoi_in_gggga(N1, B, A, C))
U3_gggga(X, A, B, C, M1, shanoi_out_gggga(N1, B, A, C, M2)) → U4_gggga(X, A, B, C, M2, append_in_gga(M1, .(mv(A, C), [])))
append_in_gga([], L) → append_out_gga([], L, L)
append_in_gga(.(H, L), L1) → U6_gga(H, L, L1, append_in_gga(L, L1))
U6_gga(H, L, L1, append_out_gga(L, L1, R)) → append_out_gga(.(H, L), L1, .(H, R))
U4_gggga(X, A, B, C, M2, append_out_gga(M1, .(mv(A, C), []), T)) → U5_gggga(X, A, B, C, append_in_gga(T, M2))
U5_gggga(X, A, B, C, append_out_gga(T, M2, M)) → shanoi_out_gggga(s(s(X)), A, B, C, M)
shanoi_in_gggga(x0, x1, x2, x3)
eq_in_ag(x0)
U1_gggga(x0, x1, x2, x3, x4)
U2_gggga(x0, x1, x2, x3, x4, x5)
U3_gggga(x0, x1, x2, x3, x4, x5)
append_in_gga(x0, x1)
U6_gga(x0, x1, x2, x3)
U4_gggga(x0, x1, x2, x3, x4, x5)
U5_gggga(x0, x1, x2, x3, x4)
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
U1_GGGGA(X, A, B, C, eq_out_ag(N1, s(X))) → U2_GGGGA(X, A, B, C, N1, shanoi_in_gggga(N1, A, C, B))
U1_GGGGA(X, A, B, C, eq_out_ag(N1, s(X))) → SHANOI_IN_GGGGA(N1, A, C, B)
POL(.(x1, x2)) = 0
POL(0) = 0
POL(SHANOI_IN_GGGGA(x1, x2, x3, x4)) = x1
POL(U1_GGGGA(x1, x2, x3, x4, x5)) = 1 + x5
POL(U1_gggga(x1, x2, x3, x4, x5)) = 0
POL(U2_GGGGA(x1, x2, x3, x4, x5, x6)) = x5
POL(U2_gggga(x1, x2, x3, x4, x5, x6)) = 0
POL(U3_gggga(x1, x2, x3, x4, x5, x6)) = 0
POL(U4_gggga(x1, x2, x3, x4, x5, x6)) = 0
POL(U5_gggga(x1, x2, x3, x4, x5)) = 0
POL(U6_gga(x1, x2, x3, x4)) = 0
POL([]) = 0
POL(append_in_gga(x1, x2)) = 0
POL(append_out_gga(x1, x2, x3)) = 0
POL(eq_in_ag(x1)) = x1
POL(eq_out_ag(x1, x2)) = x1
POL(mv(x1, x2)) = 0
POL(s(x1)) = 1 + x1
POL(shanoi_in_gggga(x1, x2, x3, x4)) = 0
POL(shanoi_out_gggga(x1, x2, x3, x4, x5)) = 0
eq_in_ag(X) → eq_out_ag(X, X)
U2_GGGGA(X, A, B, C, N1, shanoi_out_gggga(N1, A, C, B, M1)) → SHANOI_IN_GGGGA(N1, B, A, C)
SHANOI_IN_GGGGA(s(s(X)), A, B, C) → U1_GGGGA(X, A, B, C, eq_in_ag(s(X)))
shanoi_in_gggga(s(0), A, B, C) → shanoi_out_gggga(s(0), A, B, C, .(mv(A, C), []))
shanoi_in_gggga(s(s(X)), A, B, C) → U1_gggga(X, A, B, C, eq_in_ag(s(X)))
eq_in_ag(X) → eq_out_ag(X, X)
U1_gggga(X, A, B, C, eq_out_ag(N1, s(X))) → U2_gggga(X, A, B, C, N1, shanoi_in_gggga(N1, A, C, B))
U2_gggga(X, A, B, C, N1, shanoi_out_gggga(N1, A, C, B, M1)) → U3_gggga(X, A, B, C, M1, shanoi_in_gggga(N1, B, A, C))
U3_gggga(X, A, B, C, M1, shanoi_out_gggga(N1, B, A, C, M2)) → U4_gggga(X, A, B, C, M2, append_in_gga(M1, .(mv(A, C), [])))
append_in_gga([], L) → append_out_gga([], L, L)
append_in_gga(.(H, L), L1) → U6_gga(H, L, L1, append_in_gga(L, L1))
U6_gga(H, L, L1, append_out_gga(L, L1, R)) → append_out_gga(.(H, L), L1, .(H, R))
U4_gggga(X, A, B, C, M2, append_out_gga(M1, .(mv(A, C), []), T)) → U5_gggga(X, A, B, C, append_in_gga(T, M2))
U5_gggga(X, A, B, C, append_out_gga(T, M2, M)) → shanoi_out_gggga(s(s(X)), A, B, C, M)
shanoi_in_gggga(x0, x1, x2, x3)
eq_in_ag(x0)
U1_gggga(x0, x1, x2, x3, x4)
U2_gggga(x0, x1, x2, x3, x4, x5)
U3_gggga(x0, x1, x2, x3, x4, x5)
append_in_gga(x0, x1)
U6_gga(x0, x1, x2, x3)
U4_gggga(x0, x1, x2, x3, x4, x5)
U5_gggga(x0, x1, x2, x3, x4)